/* GidiReads profile redesign — scoped styles only */
.gr-profile-page,.gr-edit-page{--gp-bg:#100a16;--gp-panel:#1b1024;--gp-panel2:#24132f;--gp-line:rgba(217,185,239,.18);--gp-text:#f8effb;--gp-muted:#b4a0c1;--gp-lilac:#cda5f1;--gp-pink:#f1a6d1;--gp-gold:#e8c16b;color:var(--gp-text);background:radial-gradient(ellipse at 50% 0%,#2a1537 0%,var(--gp-bg) 54%);min-height:70vh;padding-bottom:52px}
.gr-profile-page *,.gr-edit-page *{box-sizing:border-box}
.gr-profile-wrap{width:min(1100px,calc(100% - 36px));margin:0 auto}
.gr-cover{height:clamp(210px,35vw,350px);position:relative;border-radius:0 0 24px 24px;overflow:hidden;background:#24132f;border:1px solid var(--gp-line);border-top:0;isolation:isolate}
.gr-cover:before{content:"";position:absolute;inset:0;background-image:var(--gr-cover-image);background-size:cover;background-position:center 34%;filter:saturate(1.04);z-index:-2}
.gr-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(13,7,18,.95),rgba(13,7,18,.08) 80%),linear-gradient(90deg,rgba(15,8,20,.18),transparent 65%);z-index:-1}
.gr-profile-card{position:relative;margin:-62px 18px 0;background:linear-gradient(145deg,rgba(35,19,47,.98),rgba(17,10,23,.98));border:1px solid var(--gp-line);border-radius:22px;padding:24px clamp(18px,4vw,42px) 28px;box-shadow:0 22px 70px rgba(0,0,0,.32)}
.gr-profile-top{display:flex;align-items:flex-end;gap:22px;flex-wrap:wrap;margin-top:-72px;position:relative}
.gr-pfp-ring{width:124px;height:124px;flex:0 0 124px;padding:4px;border-radius:50%;background:linear-gradient(135deg,#ffd4f1,#d6a0fa,#f1a6d1);box-shadow:0 0 0 4px rgba(205,165,241,.1),0 0 24px rgba(241,166,209,.72),0 0 48px rgba(177,112,227,.3)}
.gr-pfp{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block;border:4px solid #170d20;background:#2a1834;color:var(--gp-text);text-align:center}
.gr-profile-names{flex:1;min-width:200px;padding-bottom:5px}.gr-profile-names h1{font:500 clamp(2rem,5vw,3.2rem)/1.04 Fraunces,Georgia,serif;letter-spacing:-.035em;margin:0 0 8px}.gr-handle{color:var(--gp-lilac);font-size:.92rem}.gr-bio{color:#e0d3e8;line-height:1.7;max-width:720px;margin:22px 0 18px;white-space:pre-wrap;overflow-wrap:anywhere}.gr-joined{color:var(--gp-muted);font-size:.8rem}
.gr-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.gr-btn{appearance:none;border:1px solid rgba(205,165,241,.42);border-radius:999px;padding:11px 18px;background:#24152f;color:var(--gp-text);font:600 .85rem Inter,Arial,sans-serif;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;transition:transform .18s,border-color .18s,box-shadow .18s}.gr-btn:hover{border-color:var(--gp-pink);box-shadow:0 0 20px rgba(241,166,209,.15);transform:translateY(-1px)}.gr-btn-primary{background:linear-gradient(120deg,#cda5f1,#e4a9d5);color:#201127;border-color:transparent}.gr-btn:disabled{opacity:.6;cursor:wait;transform:none}.gr-stats{display:flex;gap:22px;flex-wrap:wrap;margin-top:21px}.gr-stat{border:0;background:none;color:var(--gp-muted);padding:0;cursor:pointer;text-align:left;font-size:.83rem}.gr-stat strong{color:var(--gp-text);font-size:1.12rem;display:block;margin-bottom:3px}.gr-stat:hover strong{color:var(--gp-pink)}
.gr-section{padding:42px 0 0}.gr-section-kicker{color:var(--gp-lilac);font-size:.7rem;letter-spacing:.22em;font-weight:700;text-transform:uppercase;margin:0 0 10px}.gr-section-title{font:500 clamp(1.7rem,4vw,2.3rem)/1.1 Fraunces,Georgia,serif;margin:0 0 22px}.gr-story-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:17px}.gr-story-card{display:block;min-width:0;overflow:hidden;text-decoration:none;color:var(--gp-text);background:#1a1022;border:1px solid var(--gp-line);border-radius:14px;transition:transform .2s,border-color .2s}.gr-story-card:hover{transform:translateY(-4px);border-color:rgba(241,166,209,.55)}.gr-story-cover{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;background:#2a1834}.gr-story-copy{padding:12px}.gr-story-copy strong{display:block;font-size:.9rem;line-height:1.4}.gr-story-copy span{display:block;color:var(--gp-muted);font-size:.75rem;margin-top:5px}.gr-empty{padding:25px;border:1px dashed var(--gp-line);border-radius:14px;color:var(--gp-muted)}
.gr-editor-head{padding:42px 0 26px}.gr-editor-head h1{font:500 clamp(2.2rem,5vw,3.2rem)/1.1 Fraunces,Georgia,serif;margin:0 0 10px}.gr-editor-head p{color:var(--gp-muted);max-width:650px;line-height:1.7;margin:0}.gr-editor-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);gap:22px;align-items:start}.gr-panel{background:linear-gradient(150deg,rgba(37,20,49,.96),rgba(20,12,27,.98));border:1px solid var(--gp-line);border-radius:20px;padding:clamp(17px,3vw,27px);min-width:0}.gr-panel h2{font:500 1.35rem Fraunces,Georgia,serif;margin:0 0 18px}.gr-field{display:grid;gap:8px;margin-bottom:17px}.gr-field>span{font-size:.82rem;font-weight:600;color:#e9dcef}.gr-field input,.gr-field textarea{width:100%;min-width:0;background:#100a17;border:1px solid rgba(205,165,241,.28);border-radius:11px;padding:13px 14px;color:var(--gp-text);font:400 .94rem Inter,Arial,sans-serif;outline:none}.gr-field textarea{resize:vertical;min-height:112px;line-height:1.6}.gr-field input:focus,.gr-field textarea:focus{border-color:var(--gp-pink);box-shadow:0 0 0 3px rgba(241,166,209,.1)}.gr-upload-row{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:22px}.gr-upload-pfp{width:90px;height:90px;border-radius:50%;object-fit:cover;border:3px solid #e7b4f2;box-shadow:0 0 23px rgba(241,166,209,.42);background:#2a1834}.gr-upload-actions{display:flex;gap:9px;flex-wrap:wrap}.gr-btn-danger{border-color:rgba(241,120,159,.45);color:#ffc0d7;background:#2b1324}.gr-headers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gr-header-option{position:relative;border:1px solid var(--gp-line);border-radius:13px;overflow:hidden;padding:0;background:#120b19;color:var(--gp-text);text-align:left;cursor:pointer;min-width:0}.gr-header-option img{display:block;width:100%;aspect-ratio:1.45/1;object-fit:cover;transition:transform .3s}.gr-header-option:hover img{transform:scale(1.035)}.gr-header-option span{display:block;padding:10px 11px;font-size:.78rem;line-height:1.35}.gr-header-option[aria-pressed="true"]{border-color:#f1a6d1;box-shadow:0 0 0 2px rgba(241,166,209,.2),0 0 22px rgba(205,165,241,.18)}.gr-header-option[aria-pressed="true"]:after{content:"✓ Selected";position:absolute;top:8px;left:8px;border-radius:999px;padding:5px 8px;background:#21112d;color:#ffd5ef;font-size:.68rem;border:1px solid rgba(241,166,209,.65)}.gr-preview-cover{height:155px;border-radius:14px 14px 0 0;background-size:cover;background-position:center 34%;position:relative;overflow:hidden}.gr-preview-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#1b1024,transparent 80%)}.gr-preview-body{padding:0 18px 20px}.gr-preview-user{display:flex;gap:12px;align-items:center;margin-top:-33px;position:relative;z-index:1}.gr-preview-user img{width:65px;height:65px;border-radius:50%;object-fit:cover;border:3px solid #24132f;box-shadow:0 0 18px rgba(241,166,209,.55);background:#2a1834}.gr-preview-user strong{display:block}.gr-preview-user small{display:block;color:var(--gp-muted);margin-top:4px}.gr-preview-bio{color:#cdbed6;font-size:.82rem;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:16px 0 0}.gr-editor-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px}.gr-status{font-size:.82rem;color:var(--gp-muted);line-height:1.5}.gr-status.error{color:#ffb5ce}.gr-status.success{color:#bdeacb}
.gr-modal-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(5,3,8,.78);backdrop-filter:blur(9px);display:grid;place-items:center;padding:18px}.gr-modal-backdrop[hidden]{display:none}.gr-follow-modal{width:min(480px,100%);max-height:min(76vh,650px);display:flex;flex-direction:column;background:#180e20;border:1px solid rgba(205,165,241,.3);border-radius:18px;overflow:hidden;box-shadow:0 25px 90px #0008}.gr-modal-head{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--gp-line)}.gr-modal-head h2{font:500 1.35rem Fraunces,Georgia,serif;margin:0}.gr-modal-close{border:1px solid var(--gp-line);background:#281631;color:var(--gp-text);border-radius:50%;width:36px;height:36px;font-size:1.2rem;cursor:pointer}.gr-follow-list{overflow:auto;padding:8px 14px 14px}.gr-follow-row{display:flex;align-items:center;gap:12px;padding:11px 7px;text-decoration:none;color:var(--gp-text);border-bottom:1px solid rgba(205,165,241,.1)}.gr-follow-row:hover{background:rgba(205,165,241,.07);border-radius:10px}.gr-follow-row img,.gr-follow-fallback{width:45px;height:45px;border-radius:50%;object-fit:cover;border:1px solid rgba(241,166,209,.45);background:#2c1937;display:grid;place-items:center;color:var(--gp-pink);font-weight:700}.gr-follow-row strong{display:block;font-size:.88rem}.gr-follow-row small{display:block;color:var(--gp-muted);font-size:.76rem;margin-top:4px}.gr-follow-empty{padding:22px;text-align:center;color:var(--gp-muted)}
.gr-profile-page .top-profile-btn .gr-nav-avatar,.gr-edit-page .top-profile-btn .gr-nav-avatar{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.gr-profile-page .top-profile-btn:has(.gr-nav-avatar),.gr-edit-page .top-profile-btn:has(.gr-nav-avatar){overflow:hidden;padding:2px;border-radius:50%;box-shadow:0 0 12px rgba(241,166,209,.3)}
@media(max-width:720px){.gr-profile-wrap{width:min(100% - 22px,1100px)}.gr-cover{height:225px;border-radius:0 0 17px 17px}.gr-profile-card{margin:-42px 0 0;padding:17px 17px 23px;border-radius:17px}.gr-profile-top{margin-top:-61px;gap:14px}.gr-pfp-ring{width:100px;height:100px;flex-basis:100px}.gr-profile-names{min-width:calc(100% - 115px)}.gr-profile-names h1{font-size:2rem}.gr-bio{margin-top:18px}.gr-stats{gap:17px}.gr-editor-layout{grid-template-columns:1fr}.gr-headers{grid-template-columns:repeat(2,minmax(0,1fr))}.gr-editor-head{padding:30px 0 21px}.gr-section{padding-top:32px}.gr-story-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(prefers-reduced-motion:reduce){.gr-btn,.gr-story-card,.gr-header-option img{transition:none}}

.gr-pfp-initial{position:absolute;inset:4px;display:grid;place-items:center;border-radius:50%;font:500 2.5rem Fraunces,Georgia,serif;color:#f7d9f0;background:linear-gradient(135deg,#4b2a60,#21112d);border:4px solid #170d20}.gr-upload-pfp[data-has-avatar="false"]{visibility:hidden}

.gr-nav-fallback{width:100%;height:100%;min-width:32px;min-height:32px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#4b2a60,#21112d);color:#f5d7f0;font-weight:700}

/* Fix 04: explicit sizing prevents global image rules from inflating profile pictures. */
.gr-profile-page .gr-profile-top{align-items:flex-end;position:relative;z-index:1}
.gr-profile-page .gr-profile-top > .gr-pfp-ring{position:relative;display:block;width:124px;height:124px;min-width:124px;max-width:124px;flex:0 0 124px;overflow:hidden;isolation:isolate}
.gr-profile-page .gr-profile-top > .gr-pfp-ring > .gr-pfp{position:relative!important;inset:auto!important;display:block;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;object-fit:cover!important;border-radius:50%!important}
.gr-profile-page .gr-pfp-ring.gr-pfp-empty{display:grid;place-items:center;color:#f8effb;font:600 2.4rem Fraunces,Georgia,serif}
.gr-profile-page .gr-pfp-ring.gr-pfp-empty:before{content:attr(data-initial)}
.gr-profile-page .top-profile-btn,.gr-edit-page .top-profile-btn,.people-page .top-profile-btn{display:inline-flex!important;align-items:center;justify-content:center;width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;min-height:42px!important;max-height:42px!important;overflow:hidden!important;border-radius:50%!important;flex:0 0 42px!important;padding:0!important}
.gr-profile-page .top-profile-btn .gr-nav-avatar,.gr-edit-page .top-profile-btn .gr-nav-avatar,.people-page .top-profile-btn .gr-nav-avatar{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;border-radius:50%!important}
.gr-people-page .gr-panel{padding:8px 16px}.gr-people-list{display:grid;gap:0}.gr-people-row{display:flex;align-items:center;gap:14px;padding:15px 6px;border-bottom:1px solid var(--gp-line);text-decoration:none;color:var(--gp-text);min-width:0}.gr-people-row:last-child{border-bottom:0}.gr-people-row>img,.gr-people-row>.gr-follow-fallback{width:54px!important;height:54px!important;min-width:54px;max-width:54px;border-radius:50%;object-fit:cover;flex:0 0 54px}.gr-people-copy{display:grid;gap:4px;min-width:0;flex:1}.gr-people-copy strong{font-size:.94rem;overflow-wrap:anywhere}.gr-people-copy small{color:var(--gp-lilac);font-size:.78rem}.gr-people-bio{color:var(--gp-muted);font-size:.8rem;line-height:1.4;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.gr-people-arrow{font-size:1.6rem;color:var(--gp-muted)}.gr-verified{color:var(--gp-gold)}.gr-stat{display:inline-block;text-decoration:none}.gr-stat:hover{color:var(--gp-pink)}
@media(max-width:720px){.gr-profile-page .gr-profile-top > .gr-pfp-ring{width:100px;height:100px;min-width:100px;max-width:100px;flex-basis:100px}.gr-people-row{gap:11px;padding:13px 2px}}


/* Fix 06: readable controls on dedicated community pages; no ivory-on-ivory buttons. */
.people-page .site-nav .nav-actions .gr-btn,
.people-page .site-nav .nav-actions a.gr-btn {
  color: #f8effb !important;
  background: #281633 !important;
  border: 1px solid rgba(205,165,241,.68) !important;
  min-width: 88px;
  min-height: 42px;
  text-align: center;
  text-shadow: none !important;
}
.people-page .site-nav .nav-actions .gr-btn:hover {
  color: #fff !important; background: #3a2049 !important; border-color: #f1a6d1 !important;
}
.bottom-nav-item { color: #d5c6df; }
.bottom-nav-item svg { display: block; width: 22px; height: 22px; flex: 0 0 22px; stroke: currentColor; opacity: .98; }
.bottom-nav-item span { color: inherit; }
.bottom-nav-item.active { color: #d5aaf5; }
@media (max-width: 600px) { .bottom-nav-item { font-size: .72rem; gap: 5px; } }

/* Respect the hidden attribute on profile buttons (owner-only buttons must stay hidden for visitors) */
.gr-actions [hidden],.gr-btn[hidden]{display:none!important}

/* Optional country sharing controls for anonymous readership statistics. */
.gr-country-settings{margin:22px 0;padding:18px;border:1px solid var(--line,rgba(150,130,170,.25));border-radius:14px}.gr-country-settings h3{margin:0 0 8px}.gr-country-settings .gr-field{margin-top:14px}.gr-country-consent{display:flex;align-items:flex-start;gap:10px;margin-top:12px;line-height:1.5}.gr-country-consent input{margin-top:4px;accent-color:#7654a5}.gr-country-settings select:disabled{opacity:.55}
