/* Arcanum ID — Revision 3. Own OSSN-derived site shell + profile wall, scoped
   to /id/ pages only. Deliberately does NOT import assets/site.css's hex-grid
   background decoration — a plain canvas so a player's own customization
   (bottom of this file, .sandbox-*) is the visual interest, not site chrome. */

:root{
  --bg:#0d0d0f; --surface:#141416; --surface-raised:#1a1a1d;
  --border:#242428; --border-soft:#2c2c30;
  --accent:#991b1b; --accent-hover:#b32222; --accent-soft:rgba(153,27,27,.15);
  --gold:#b59540; --gold-soft:rgba(181,149,64,.15);
  --sandbox:#5b7a99; --sandbox-soft:rgba(91,122,153,.16);
  --r-like:#4a7fb5; --r-wow:#b5843b; --r-angry:#9c4a2e;
  --online:#3fae6a;
  --text:#d1d5db; --muted:#9ca3af; --heading:#f9fafb;
  --radius:7px; --radius-lg:10px;
  --serif:'EB Garamond',Georgia,'Iowan Old Style','Times New Roman',serif;
  --sans:'Lato',-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;
  --mono:'IBM Plex Mono','JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
@media (prefers-color-scheme: light){
  :root{
    --bg:#eeece4; --surface:#f8f7f2; --surface-raised:#ffffff;
    --border:#d8d4c8; --border-soft:#e2ded0;
    --accent:#7a1616; --accent-hover:#8f1c1c; --accent-soft:rgba(122,22,22,.10);
    --gold:#7c611f; --gold-soft:rgba(124,97,31,.12);
    --sandbox:#2f5170; --sandbox-soft:rgba(47,81,112,.12);
    --text:#211d1a; --muted:#5c554a; --heading:#15120f;
  }
}
:root[data-theme="light"]{
  --bg:#eeece4; --surface:#f8f7f2; --surface-raised:#ffffff;
  --border:#d8d4c8; --border-soft:#e2ded0;
  --accent:#7a1616; --accent-hover:#8f1c1c; --accent-soft:rgba(122,22,22,.10);
  --gold:#7c611f; --gold-soft:rgba(124,97,31,.12);
  --sandbox:#2f5170; --sandbox-soft:rgba(47,81,112,.12);
  --text:#211d1a; --muted:#5c554a; --heading:#15120f;
}
:root[data-theme="dark"]{
  --bg:#0d0d0f; --surface:#141416; --surface-raised:#1a1a1d;
  --border:#242428; --border-soft:#2c2c30;
  --accent:#991b1b; --accent-hover:#b32222; --accent-soft:rgba(153,27,27,.15);
  --gold:#b59540; --gold-soft:rgba(181,149,64,.15);
  --sandbox:#5b7a99; --sandbox-soft:rgba(91,122,153,.16);
  --text:#d1d5db; --muted:#9ca3af; --heading:#f9fafb;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0; background:var(--bg); color:var(--text); font-family:var(--sans);
  font-size:16px; line-height:1.6; overflow-x:hidden;
}
h1,h2,h3{font-family:var(--serif); color:var(--heading); text-wrap:balance; margin:0;}
a{color:inherit;}
button{font-family:var(--sans); cursor:pointer;}
input,textarea{font-family:var(--sans);}
.visually-hidden{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;}
:focus-visible{outline:2px solid var(--gold); outline-offset:2px;}
@media (prefers-reduced-motion:reduce){ *{animation-duration:.001ms !important; transition-duration:.001ms !important;} }

.skip-link{
  position:absolute; left:-999px; top:0; background:var(--accent); color:#fff; padding:.6rem 1rem;
  z-index:100; border-radius:0 0 var(--radius) 0; text-decoration:none; font-size:.85rem;
}
.skip-link:focus{left:0; top:0;}

/* ================= TOPBAR ================= */
.topbar{
  position:fixed; top:0; left:0; right:0; height:58px; z-index:40;
  display:flex; align-items:center; gap:1rem; padding:0 1.1rem;
  background:var(--surface); border-bottom:1px solid var(--border);
}
.menu-btn{
  background:transparent; border:1px solid var(--border-soft); border-radius:var(--radius);
  padding:.5rem; color:var(--muted); display:none; flex:none;
}
.menu-btn svg{width:18px; height:18px;}
.topbar .brand{font-family:var(--serif); font-size:1.05rem; color:var(--heading); text-decoration:none; white-space:nowrap;}
.topbar .searchbox{
  position:relative; flex:1; max-width:340px; display:flex; align-items:center; gap:.5rem; background:var(--surface-raised);
  border:1px solid var(--border-soft); border-radius:99px; padding:.45rem .9rem; color:var(--muted);
}
.topbar .searchbox svg{width:15px; height:15px; flex:none;}
.topbar .searchbox input{border:none; background:none; outline:none; color:var(--text); font-size:.85rem; width:100%;}
.topbar .searchbox input::placeholder{color:var(--muted);}
.top-actions{margin-left:auto; display:flex; align-items:center; gap:.5rem;}
.top-icon-btn{
  position:relative; background:transparent; border:1px solid var(--border-soft); border-radius:50%;
  width:38px; height:38px; display:flex; align-items:center; justify-content:center; color:var(--muted); flex:none;
}
.top-icon-btn svg{width:17px; height:17px;}
.top-icon-btn:hover{color:var(--heading); border-color:var(--gold);}
.badge-dot{
  position:absolute; top:-4px; right:-4px; min-width:16px; height:16px; padding:0 3px; border-radius:99px;
  background:var(--accent); color:#fff; font-size:.6rem; font-family:var(--mono); display:flex;
  align-items:center; justify-content:center; border:2px solid var(--surface);
}
.badge-dot[hidden]{display:none;}
.top-user{
  display:flex; align-items:center; gap:.45rem; background:transparent; border:1px solid var(--border-soft);
  border-radius:99px; padding:.2rem .65rem .2rem .2rem; color:var(--text); flex:none;
}
.top-user img.tu-avatar{width:28px; height:28px; border-radius:50%; display:block; object-fit:cover;}
.top-user svg.chev{width:12px; height:12px; color:var(--muted);}
.theme-toggle{
  background:transparent; border:1px solid var(--border-soft); border-radius:50%; width:38px; height:38px;
  display:flex; align-items:center; justify-content:center; color:var(--muted); flex:none;
}
.theme-toggle svg{width:16px; height:16px;}
.theme-toggle:hover{color:var(--gold); border-color:var(--gold);}
.signin-btn{background:var(--accent); color:#fff; border:none; border-radius:99px; padding:.5rem 1.1rem; font-size:.85rem; font-weight:600;}
.signin-btn:hover{background:var(--accent-hover);}

/* ================= LEFT SHELL NAV ================= */
.shell-nav{
  position:fixed; top:58px; left:0; bottom:0; width:246px; overflow-y:auto;
  background:var(--surface); border-right:1px solid var(--border); padding:1.1rem .9rem 2rem; z-index:30;
  transition:transform .2s ease;
}
.nav-profile{display:flex; align-items:center; gap:.6rem; padding:.4rem; margin-bottom:1rem;}
.nav-profile img.np-avatar{width:38px; height:38px; border-radius:50%; flex:none; object-fit:cover;}
.nav-profile .np-name{font-family:var(--serif); font-size:.92rem; color:var(--heading);}
.nav-profile .np-edit{font-size:.72rem; color:var(--muted); text-decoration:none;}
.nav-profile .np-edit:hover{color:var(--gold);}
.nav-search{
  display:flex; align-items:center; gap:.5rem; background:var(--surface-raised); border:1px solid var(--border-soft);
  border-radius:var(--radius); padding:.5rem .7rem; margin-bottom:1.1rem; position:relative;
}
.nav-search svg{width:14px; height:14px; color:var(--muted); flex:none;}
.nav-search input{border:none; background:none; outline:none; color:var(--text); font-size:.82rem; width:100%;}
.nav-search-results{
  position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:40; max-height:320px; overflow-y:auto;
  background:var(--surface-raised); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:0 12px 28px rgba(0,0,0,.4); padding:.35rem;
}
.nav-search-results[hidden]{display:none;}
.nav-search-empty{padding:.6rem; font-size:.8rem; color:var(--muted); text-align:center;}
.nav-search-row{display:flex; align-items:center; gap:.6rem; padding:.5rem .5rem; border-radius:var(--radius); text-decoration:none;}
.nav-search-row:hover{background:var(--surface);}
.nav-search-row img.mini-avatar{width:30px; height:30px; border-radius:50%; flex:none; object-fit:cover;}
.nsr-body{display:flex; flex-direction:column; min-width:0;}
.nsr-name{font-size:.82rem; color:var(--heading); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.nsr-handle{font-family:var(--mono); font-size:.68rem; color:var(--muted);}
.nav-group{border:none; margin-bottom:.3rem;}
.nav-group summary{
  list-style:none; display:flex; align-items:center; justify-content:space-between; cursor:pointer;
  font-family:var(--mono); font-size:.66rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);
  padding:.5rem .4rem;
}
.nav-group summary::-webkit-details-marker{display:none;}
.nav-group summary svg{width:12px; height:12px; transition:transform .15s;}
.nav-group[open] summary svg{transform:rotate(180deg);}
.nav-links{list-style:none; margin:.2rem 0 .6rem; padding:0; display:flex; flex-direction:column; gap:.1rem;}
.nav-links a{
  display:flex; align-items:center; gap:.65rem; padding:.55rem .5rem; border-radius:var(--radius);
  color:var(--text); text-decoration:none; font-size:.87rem;
}
.nav-links a svg{width:17px; height:17px; color:var(--muted); flex:none;}
.nav-links a:hover{background:var(--surface-raised); color:var(--heading);}
.nav-links a:hover svg{color:var(--gold);}
.nav-links a.current{background:var(--accent-soft); color:var(--heading);}
.nav-links a.current svg{color:var(--accent);}
.nav-links a .nlbadge{
  margin-left:auto; font-family:var(--mono); font-size:.64rem; background:var(--accent); color:#fff;
  border-radius:99px; padding:.05rem .4rem;
}
.nav-links a .nlbadge[hidden]{display:none;}
.nav-overlay{display:none; position:fixed; inset:58px 0 0 0; background:rgba(0,0,0,.5); z-index:25;}

/* ================= RIGHT FRIEND RAIL ================= */
.friend-rail{
  position:fixed; top:58px; right:0; bottom:0; width:68px; overflow-y:auto;
  background:var(--surface); border-left:1px solid var(--border); z-index:30;
  display:flex; flex-direction:column; align-items:center; gap:.85rem; padding:1rem .4rem;
}
.friend-rail .rail-title{font-family:var(--mono); font-size:.58rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); text-align:center;}
.friend-rail a{position:relative; display:block;}
.friend-rail img.ra-avatar{width:40px; height:40px; border-radius:50%; border:2px solid var(--border-soft); display:block; object-fit:cover;}
.friend-rail .ra-dot{
  position:absolute; bottom:0; right:0; width:11px; height:11px; border-radius:50%;
  background:var(--online); border:2px solid var(--surface);
}

/* ================= LAYOUT OFFSET ================= */
main{margin-left:246px; margin-right:68px; padding-top:58px;}
.content-inner{max-width:880px; margin:0 auto; padding:0 1.5rem 5rem; position:relative; z-index:1;}
@media (max-width:1100px){
  .friend-rail{display:none;}
  main{margin-right:0;}
}
@media (max-width:880px){
  .menu-btn{display:flex;}
  .shell-nav{transform:translateX(-100%);}
  body.nav-open .shell-nav{transform:translateX(0); box-shadow:8px 0 28px rgba(0,0,0,.45);}
  body.nav-open .nav-overlay{display:block;}
  main{margin-left:0;}
}
/* Logged-out viewers never get shell-nav/friend-rail -- don't reserve their
   gutter, or landing/auth content renders visibly off-center. Higher
   specificity than the plain `main{...}` rules above (incl. inside their
   media queries) so this wins regardless of viewport width. */
body.no-shell main{margin-left:0; margin-right:0;}

/* ---------- state messages ---------- */
.state-msg{max-width:880px; margin:6rem auto 0; padding:0 1.5rem; text-align:center; color:var(--muted);}
.state-msg[hidden]{display:none;}

/* ---------- profile header ---------- */
.profile-header{margin-top:2.25rem; position:relative;}
.cover{
  height:180px; border-radius:var(--radius-lg); border:1px solid var(--border);
  background:var(--surface); position:relative; overflow:hidden;
}
.cover iframe.cover-custom{width:100%; height:100%; border:none; display:block;}
.cover-badge{
  position:absolute; top:.85rem; right:.85rem; display:flex; align-items:center; gap:.35rem;
  font-family:var(--mono); font-size:.62rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted); background:rgba(13,13,15,.4); border:1px solid var(--border-soft);
  padding:.3rem .55rem; border-radius:99px; backdrop-filter:blur(2px);
}
.cover-badge svg{width:11px; height:11px;}
.cover-badge[hidden]{display:none;}

.id-block{display:flex; align-items:flex-end; gap:1.25rem; padding:0 .5rem; flex-wrap:wrap;}
.avatar{
  width:104px; height:104px; border-radius:50%; flex:none; position:relative; top:-52px;
  border:4px solid var(--bg); background:var(--surface-raised); box-shadow:0 8px 22px rgba(0,0,0,.4);
}
.avatar img{width:100%; height:100%; border-radius:50%; display:block; object-fit:cover;}
.avatar-edit-btn{
  position:absolute; bottom:2px; right:2px; width:30px; height:30px; border-radius:50%;
  background:var(--gold); border:2px solid var(--bg); color:#141416; display:flex;
  align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(0,0,0,.4);
}
.avatar-edit-btn[hidden]{display:none;}
.avatar-edit-btn:hover{background:var(--accent); color:#fff;}
.avatar-edit-btn svg{width:14px; height:14px;}
.id-name{padding-bottom:.4rem;}
.id-name h1{font-size:1.7rem;}
.id-name .handle{font-family:var(--mono); font-size:.82rem; color:var(--muted); margin-top:.15rem;}
.id-actions{display:flex; gap:.6rem; margin-left:auto; padding-bottom:.4rem;}

.bio{max-width:58ch; margin:1.1rem 0 0; padding:0 .5rem; color:var(--text); font-size:.94rem;}
.bio:empty{display:none;}

.stat-strip{
  display:flex; margin-top:1.4rem; border:1px solid var(--border); border-radius:var(--radius-lg);
  background:var(--surface); overflow:hidden; flex-wrap:wrap;
}
.stat{flex:1 1 110px; padding:.85rem 1.1rem; border-right:1px solid var(--border-soft); display:flex; flex-direction:column; gap:.15rem;}
.stat:last-child{border-right:none;}
.stat .label{font-family:var(--mono); font-size:.62rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted);}
.stat .value{font-family:var(--mono); font-variant-numeric:tabular-nums; font-size:1.25rem; color:var(--heading); font-weight:600;}
.stat .value.gold{color:var(--gold);}

/* ---------- two column body ---------- */
.profile-body{display:grid; grid-template-columns:1fr 300px; gap:1.75rem; margin-top:2.25rem; align-items:start;}
@media (max-width:760px){ .profile-body{grid-template-columns:1fr;} }

.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.25rem 1.35rem;}

.composer textarea{
  width:100%; resize:vertical; min-height:64px; background:var(--surface-raised); color:var(--text);
  border:1px solid var(--border-soft); border-radius:var(--radius); padding:.7rem .85rem;
  font-family:var(--sans); font-size:.95rem; line-height:1.5;
}
.composer-row{display:flex; justify-content:space-between; align-items:center; margin-top:.7rem; gap:.6rem;}
.composer-hint{font-size:.78rem; color:var(--muted);}
.composer-visibility{
  background:var(--surface-raised); color:var(--text); border:1px solid var(--border-soft);
  border-radius:var(--radius); padding:.35rem .6rem; font-size:.78rem; font-family:var(--sans);
}
.btn{border:none; border-radius:var(--radius); padding:.55rem 1.1rem; font-size:.88rem; font-weight:600; background:var(--accent); color:#f9fafb; transition:background .18s;}
.btn:hover{background:var(--accent-hover);}
.btn:disabled{opacity:.5; cursor:not-allowed;}
.btn.ghost{background:transparent; border:1px solid var(--border-soft); color:var(--muted);}
.btn.ghost:hover{color:var(--heading); border-color:var(--gold);}
.btn.small{padding:.4rem .8rem; font-size:.8rem;}
.form-error{color:var(--r-angry); font-size:.8rem; margin-top:.5rem;}
.form-error[hidden]{display:none;}
.form-ok{color:var(--online); font-size:.8rem; margin-top:.5rem;}
.form-ok[hidden]{display:none;}

.feed{display:flex; flex-direction:column; gap:1rem; margin-top:1.25rem;}
.feed-empty{color:var(--muted); font-size:.88rem; text-align:center; padding:1.5rem 0;}
.entry{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.05rem 1.2rem;}
.entry.activity{display:flex; align-items:center; gap:.65rem; padding:.75rem 1.1rem; font-size:.88rem; color:var(--muted);}
.entry.activity svg{width:15px; height:15px; color:var(--gold); flex:none;}
.entry.activity a{color:var(--heading); text-decoration:none; border-bottom:1px dotted var(--muted);}
.entry.activity time{margin-left:auto; font-family:var(--mono); font-size:.72rem;}

.post-head{display:flex; align-items:center; gap:.6rem;}
.post-head img.mini-avatar{width:34px; height:34px; border-radius:50%; flex:none; object-fit:cover;}
.post-head .who{font-family:var(--serif); font-size:1rem; color:var(--heading); text-decoration:none;}
.post-head time{margin-left:auto; font-family:var(--mono); font-size:.72rem; color:var(--muted);}
.post-visibility-tag{
  font-family:var(--mono); font-size:.64rem; letter-spacing:.03em; color:var(--muted);
  border:1px solid var(--border-soft); border-radius:99px; padding:.1rem .5rem;
}

.feed-tabs{display:flex; gap:1.5rem; border-bottom:1px solid var(--border); margin-bottom:1.25rem;}
.feed-tab{
  background:none; border:none; border-bottom:2px solid transparent; padding:.6rem .1rem;
  font-family:var(--serif); font-size:.95rem; color:var(--muted); cursor:pointer; margin-bottom:-1px;
}
.feed-tab:hover{color:var(--heading);}
.feed-tab.current{color:var(--heading); border-bottom-color:var(--gold);}
.post-body{margin-top:.7rem; font-size:.95rem; color:var(--text); word-break:break-word;}
.post-body p{margin:0 0 .6rem;}
.post-body p:last-child{margin-bottom:0;}
.post-body code{
  display:inline-block; background:var(--surface-raised); border:1px solid var(--border-soft);
  border-radius:4px; padding:.05rem .35rem; font-family:var(--mono); font-size:.85em; color:var(--gold);
}
.post-body pre code{
  display:block; padding:.6rem .75rem; white-space:pre-wrap; word-break:break-word;
}

/* reaction summary + picker */
.reaction-summary{display:flex; align-items:center; gap:.45rem; margin-top:.9rem; font-size:.78rem; color:var(--muted);}
.reaction-summary[hidden]{display:none;}
.rs-icons{display:flex;}
.rs-icons i{width:19px; height:19px; border-radius:50%; background:var(--surface); border:2px solid var(--surface); display:flex; align-items:center; justify-content:center; color:var(--rc); margin-left:-6px; font-style:normal;}
.rs-icons i:first-child{margin-left:0;}
.rs-icons i svg{width:11px; height:11px;}

.post-actions{display:flex; align-items:center; gap:.2rem; margin-top:.5rem; padding-top:.6rem; border-top:1px solid var(--border-soft);}
.action-link{flex:1; text-align:center; background:transparent; border:none; padding:.5rem; border-radius:var(--radius); color:var(--muted); font-size:.85rem; font-weight:600;}
.action-link:hover{background:var(--surface-raised); color:var(--heading);}
.react-wrap{position:relative; flex:1;}
.like-btn{
  width:100%; text-align:center; background:transparent; border:none; padding:.5rem; border-radius:var(--radius);
  color:var(--muted); font-size:.85rem; font-weight:600; display:flex; align-items:center; justify-content:center; gap:.35rem;
}
.like-btn svg{width:16px; height:16px;}
.like-btn:hover, .like-btn.active{background:var(--surface-raised); color:var(--r-like);}
.reaction-picker{
  position:absolute; bottom:100%; left:50%; transform:translate(-50%,4px) scale(.95); margin-bottom:.4rem;
  display:flex; gap:.15rem; background:var(--surface-raised); border:1px solid var(--border-soft); border-radius:99px;
  padding:.3rem; box-shadow:0 10px 24px rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:opacity .15s, transform .15s;
  z-index:5;
}
.react-wrap:hover .reaction-picker, .react-wrap:focus-within .reaction-picker, .reaction-picker.open{
  opacity:1; pointer-events:auto; transform:translate(-50%,0) scale(1);
}
.rpick{width:32px; height:32px; border-radius:50%; border:none; background:transparent; display:flex; align-items:center; justify-content:center; color:var(--rc); transition:transform .12s, background .12s;}
.rpick:hover{transform:scale(1.2) translateY(-3px);}
.rpick svg{width:19px; height:19px;}

details.thread{margin-top:.7rem;}
details.thread summary{cursor:pointer; font-size:.82rem; color:var(--muted); list-style:none; display:flex; align-items:center; gap:.35rem;}
details.thread summary::-webkit-details-marker{display:none;}
details.thread summary svg{width:11px; height:11px; transition:transform .15s;}
details.thread[open] summary svg{transform:rotate(90deg);}
.thread-body{margin-top:.65rem; padding-left:1rem; border-left:2px solid var(--border-soft); display:flex; flex-direction:column; gap:.65rem;}
.comment{font-size:.85rem;}
.comment .who{font-family:var(--serif); color:var(--heading); margin-right:.4rem;}
.comment .muted{color:var(--muted); font-size:.72rem;}
.comment.hidden-comment{opacity:.55; font-style:italic;}
.comment-composer{display:flex; gap:.5rem; margin-top:.7rem;}
.comment-composer input{
  flex:1; background:var(--surface-raised); border:1px solid var(--border-soft); border-radius:99px;
  padding:.45rem .9rem; color:var(--text); font-size:.82rem; outline:none;
}
.comment-composer input:focus{border-color:var(--gold);}
.lock-note{
  display:flex; align-items:center; gap:.4rem; margin-top:.6rem; font-size:.76rem; color:var(--muted);
  border:1px dashed var(--border-soft); border-radius:var(--radius); padding:.5rem .65rem;
}
.lock-note svg{width:12px; height:12px; flex:none;}

/* sidebar cards */
.sidebar{display:flex; flex-direction:column; gap:1.25rem; position:sticky; top:78px;}
.sidebar h2{font-size:1.05rem;}
.sidebar .sub{font-family:var(--serif); font-style:italic; font-size:.8rem; color:var(--muted); margin-top:.1rem;}
.friend-list{list-style:none; margin:1rem 0 0; padding:0; display:flex; flex-direction:column; gap:.7rem;}
.friend-list li{display:flex; align-items:center; gap:.6rem;}
.friend-list img.mini-avatar{width:32px; height:32px; border-radius:50%; flex:none; object-fit:cover;}
.friend-list .name{font-size:.88rem; text-decoration:none; color:var(--text);}
.friend-list .rank{display:block; font-family:var(--mono); font-size:.68rem; color:var(--muted);}
.list-empty{color:var(--muted); font-size:.8rem;}
.incoming{margin-top:1rem; padding-top:.9rem; border-top:1px solid var(--border-soft);}
.incoming[hidden]{display:none;}
.incoming .label{font-family:var(--mono); font-size:.65rem; letter-spacing:.08em; text-transform:uppercase; color:var(--gold);}
.incoming-row{display:flex; align-items:center; gap:.5rem; margin-top:.6rem;}
.incoming-row .name{font-size:.85rem; flex:1;}
.incoming-row .btn.small{padding:.3rem .55rem; font-size:.72rem;}

.playing-card[hidden]{display:none;}
.playing-head{display:flex; align-items:center; justify-content:space-between;}
.opt-tag{
  font-family:var(--mono); font-size:.6rem; letter-spacing:.06em; text-transform:uppercase; color:var(--gold);
  border:1px solid var(--gold-soft); background:var(--gold-soft); padding:.2rem .5rem; border-radius:99px; white-space:nowrap;
}
/* groups browse + detail */
.groups-page-head{display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;}
.groups-list{display:flex; flex-direction:column; gap:.85rem;}
.group-card{display:flex; align-items:center; gap:1rem; flex-wrap:wrap;}
.group-card-main{flex:1; min-width:200px;}
.group-card-name{font-family:var(--serif); font-size:1.1rem; color:var(--heading); text-decoration:none;}
.group-card-name:hover{color:var(--gold);}
.group-card .opt-tag{margin-left:.6rem;}
.group-card-desc{margin:.3rem 0 0; color:var(--text); font-size:.88rem; max-width:60ch;}
.group-card-meta{display:block; margin-top:.4rem; font-family:var(--mono); font-size:.72rem; color:var(--muted);}

.playing-game{display:flex; align-items:center; gap:.65rem; margin-top:.9rem;}
.game-icon{width:36px; height:36px; border-radius:8px; background:var(--surface-raised); border:1px solid var(--border-soft); display:flex; align-items:center; justify-content:center; color:var(--gold); flex:none;}
.game-icon svg{width:18px; height:18px;}
.game-name{font-family:var(--serif); font-size:.95rem; color:var(--heading);}
.game-stats{font-family:var(--mono); font-size:.72rem; color:var(--muted); margin-top:.1rem;}
.playing-manage{margin-top:.9rem; width:100%;}

/* ---------- settings: connected games ---------- */
.settings-game-row{display:flex; align-items:center; gap:.75rem; padding:.75rem 0; border-bottom:1px solid var(--border);}
.settings-game-row:last-child{border-bottom:none;}
.settings-game-info{flex:1; min-width:0;}
.settings-game-status{font-size:.78rem; color:var(--muted); margin-top:.15rem;}
.toggle-switch{position:relative; display:inline-block; width:42px; height:24px; flex:none;}
.toggle-switch input{position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer;}
.toggle-track{position:absolute; inset:0; background:var(--surface-raised); border:1px solid var(--border-soft); border-radius:99px; transition:background .18s, border-color .18s;}
.toggle-track::before{content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:var(--muted); transition:transform .18s, background .18s;}
.toggle-switch input:checked ~ .toggle-track{background:var(--accent-soft); border-color:var(--accent);}
.toggle-switch input:checked ~ .toggle-track::before{transform:translateX(18px); background:var(--accent);}
.toggle-switch input:focus-visible ~ .toggle-track{outline:2px solid var(--gold); outline-offset:2px;}
.toggle-switch input:disabled ~ .toggle-track{opacity:.5; cursor:not-allowed;}

.groups-card ul{list-style:none; margin:.9rem 0 0; padding:0; display:flex; flex-direction:column; gap:.6rem;}
.groups-card li{display:flex; align-items:center; gap:.6rem;}
.group-icon{width:34px; height:34px; border-radius:8px; background:var(--surface-raised); border:1px solid var(--border-soft); display:flex; align-items:center; justify-content:center; color:var(--gold); flex:none;}
.group-icon svg{width:16px; height:16px;}
.group-name{font-size:.85rem; color:var(--heading); text-decoration:none;}
.group-meta{display:block; font-family:var(--mono); font-size:.68rem; color:var(--muted);}
.groups-card .btn{width:100%; margin-top:.9rem;}

.quick-links{display:flex; flex-direction:column; gap:.5rem;}
.quick-links button, .quick-links a{
  display:flex; align-items:center; gap:.5rem; text-decoration:none; color:var(--text); font-size:.86rem;
  padding:.55rem .2rem; border-bottom:1px solid var(--border-soft); background:none; border-left:none; border-right:none;
  border-top:none; width:100%; text-align:left;
}
.quick-links button:last-child, .quick-links a:last-child{border-bottom:none;}
.quick-links button svg, .quick-links a svg{width:14px; height:14px; color:var(--gold); flex:none;}
.quick-links button:hover, .quick-links a:hover{color:var(--gold);}

/* avatar emblem editor */
.emblem-section{margin-top:2.5rem;}
.emblem-section[hidden]{display:none;}
.emblem-header p{margin:.35rem 0 0; color:var(--muted); font-size:.9rem; max-width:62ch;}
.emblem-panel{margin-top:1.1rem;}
.emblem-layout{display:grid; grid-template-columns:260px 1fr; gap:1.5rem; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.3rem;}
@media (max-width:760px){ .emblem-layout{grid-template-columns:1fr;} }

/* The controls column can run long (layer list + shape/color grids + sliders
   + position grid) -- rather than pushing Save/Reset down the page past the
   visible viewport, this column scrolls on its own within a bounded height
   so the preview stays put and every control (including Save) is always
   reachable with a short scroll, never fully off screen. */
.emblem-editor-col{max-height:min(640px, calc(100vh - 260px)); overflow-y:auto; padding-right:.4rem;}
@media (max-width:760px){ .emblem-editor-col{max-height:none; overflow-y:visible;} }

.emblem-preview-col{display:flex; flex-direction:column; align-items:center; gap:1rem; position:sticky; top:0;}
@media (max-width:760px){ .emblem-preview-col{position:static;} }
.emblem-canvas-large{
  width:240px; height:240px; border-radius:50%; overflow:hidden; border:3px solid var(--border-soft);
  background:var(--surface-raised); box-shadow:0 8px 22px rgba(0,0,0,.35); flex:none;
}
.emblem-canvas-large svg{display:block; width:100%; height:100%;}
.emblem-small-wrap{display:flex; flex-direction:column; align-items:center; gap:.4rem;}
.emblem-small-label{font-family:var(--mono); font-size:.62rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}
.emblem-canvas-small{width:40px; height:40px; border-radius:50%; overflow:hidden; border:2px solid var(--border-soft); background:var(--surface-raised);}
.emblem-canvas-small svg{display:block; width:100%; height:100%;}

.emblem-favorites{display:flex; flex-direction:column; align-items:center; gap:.5rem; margin-top:1.4rem; padding-top:1.2rem; border-top:1px solid var(--border-soft); width:100%;}
.emblem-favorites-grid{display:flex; gap:.9rem; justify-content:center;}
.favorite-slot{display:flex; flex-direction:column; align-items:center; gap:.3rem;}
.favorite-slot.empty{
  width:56px; height:56px; border-radius:50%; border:2px dashed var(--border-soft); background:transparent;
  color:var(--muted); display:flex; align-items:center; justify-content:center;
}
.favorite-slot.empty:hover{border-color:var(--gold); color:var(--gold);}
.favorite-plus{font-size:1.4rem; line-height:1;}
.favorite-swatch{
  width:56px; height:56px; border-radius:50%; overflow:hidden; padding:0; border:2px solid var(--border-soft);
  background:var(--surface-raised); flex:none;
}
.favorite-swatch:hover{border-color:var(--gold);}
.favorite-swatch svg{display:block; width:100%; height:100%;}
.favorite-slot-actions{display:flex; gap:.5rem;}
.favorite-mini-link{
  background:none; border:none; padding:0; color:var(--muted); font-size:.68rem; font-family:var(--mono);
  text-transform:uppercase; letter-spacing:.04em;
}
.favorite-mini-link:hover{color:var(--gold);}

.emblem-layer-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.4rem;}
.emblem-layer-row{
  display:flex; align-items:center; gap:.6rem; padding:.4rem .5rem; border-radius:var(--radius);
  border:1px solid var(--border-soft); background:var(--surface-raised); cursor:pointer;
}
.emblem-layer-row.active{border-color:var(--gold); background:var(--gold-soft);}
.elr-thumb{width:30px; height:30px; flex:none; display:flex; border-radius:6px; overflow:hidden; background:var(--bg);}
.elr-thumb svg{width:100%; height:100%;}
.elr-name{flex:1; font-size:.85rem; color:var(--heading);}
.elr-fixed{font-family:var(--mono); font-size:.62rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);}
.elr-reorder{display:flex; flex-direction:column; gap:1px;}
.elr-btn{
  width:22px; height:18px; min-height:0; padding:0; background:transparent; border:1px solid var(--border-soft);
  border-radius:4px; color:var(--muted); font-size:.55rem; line-height:1; display:flex; align-items:center; justify-content:center;
}
.elr-btn:hover:not(:disabled){color:var(--gold); border-color:var(--gold);}
.elr-btn:disabled{opacity:.3; cursor:not-allowed;}
.elr-remove{
  width:26px; height:26px; min-height:0; flex:none; background:transparent; border:1px solid var(--border-soft);
  border-radius:50%; color:var(--muted); font-size:1rem; line-height:1; display:flex; align-items:center; justify-content:center;
}
.elr-remove:hover{color:var(--r-angry); border-color:var(--r-angry);}

.emblem-layer-actions{margin-top:.7rem;}
.emblem-layer-actions .btn:disabled{opacity:.4;}

.emblem-controls{margin-top:1.2rem; padding-top:1.1rem; border-top:1px solid var(--border-soft);}
.emblem-controls-label{font-family:var(--mono); font-size:.66rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:.5rem;}

.emblem-cat-tabs{display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.8rem;}
.ect-btn{
  padding:.4rem .75rem; min-height:36px; border-radius:99px; border:1px solid var(--border-soft);
  background:var(--surface-raised); color:var(--muted); font-size:.78rem;
}
.ect-btn.active{background:var(--accent-soft); border-color:var(--accent); color:var(--heading);}
.ect-btn:hover{color:var(--heading); border-color:var(--gold);}

.emblem-shape-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(44px,1fr)); gap:.5rem; margin-bottom:1rem;}
.esg-btn{
  width:44px; height:44px; min-height:0; padding:.4rem; border-radius:var(--radius); border:1px solid var(--border-soft);
  background:var(--surface-raised); display:flex; align-items:center; justify-content:center;
}
.esg-btn svg{width:100%; height:100%;}
.esg-btn.active{border-color:var(--gold); background:var(--gold-soft);}
.esg-btn:hover{border-color:var(--gold);}

.emblem-color-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(80px,1fr)); gap:.4rem; margin-bottom:1rem;}
.ecg-btn{
  display:flex; align-items:center; gap:.4rem; padding:.4rem .5rem; min-height:44px; border-radius:var(--radius);
  border:1px solid var(--border-soft); background:var(--surface-raised); color:var(--text); font-size:.76rem; text-align:left;
}
.ecg-btn.active{border-color:var(--gold); background:var(--gold-soft); color:var(--heading);}
.ecg-btn:hover{border-color:var(--gold);}
.ecg-swatch{width:18px; height:18px; border-radius:50%; flex:none; border:1px solid rgba(255,255,255,.15);}
.ecg-label{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}

.emblem-range-row{display:grid; grid-template-columns:1fr 1fr; gap:1.2rem; margin-bottom:1rem;}
@media (max-width:420px){ .emblem-range-row{grid-template-columns:1fr;} }
.emblem-range-row label{display:flex; flex-direction:column; gap:.35rem; font-family:var(--mono); font-size:.66rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);}
.emblem-range-row input[type="range"]{accent-color:var(--gold); width:100%; height:44px;}

.emblem-position-grid{display:grid; gap:4px; max-width:220px;}
.epg-cell{
  width:100%; aspect-ratio:1; min-height:0; padding:0; border-radius:3px; border:1px solid var(--border-soft);
  background:var(--surface-raised);
}
.epg-cell:hover{border-color:var(--gold);}
.epg-cell.active{background:var(--gold); border-color:var(--gold);}

.emblem-actions{display:flex; gap:.6rem; margin-top:1.2rem;}

/* customization / sandbox */
.sandbox-section{margin-top:2.5rem;}
.sandbox-section[hidden]{display:none;}
.sandbox-header{display:flex; align-items:baseline; gap:.7rem; flex-wrap:wrap;}
.sandbox-header p{margin:.35rem 0 0; color:var(--muted); font-size:.9rem; max-width:62ch;}
.seal-tag{
  display:inline-flex; align-items:center; gap:.35rem; font-family:var(--mono); font-size:.66rem;
  letter-spacing:.08em; text-transform:uppercase; color:var(--sandbox); border:1px solid var(--sandbox);
  background:var(--sandbox-soft); padding:.28rem .6rem; border-radius:99px;
}
.seal-tag svg{width:11px; height:11px;}
.sandbox-panel{margin-top:1.1rem; border:1px dashed var(--sandbox); border-radius:var(--radius-lg); background:var(--sandbox-soft); padding:1.3rem;}
.editor-grid{display:grid; grid-template-columns:1fr 1fr; gap:1rem;}
@media (max-width:760px){ .editor-grid{grid-template-columns:1fr;} }
.editor-col label{display:block; font-family:var(--mono); font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:.4rem;}
.editor-col textarea{
  width:100%; height:150px; resize:vertical; background:var(--surface-raised); color:var(--text);
  border:1px solid var(--border-soft); border-radius:var(--radius); padding:.65rem .75rem;
  font-family:var(--mono); font-size:.78rem; line-height:1.55; tab-size:2;
}
.preview-wrap{margin-top:1.1rem;}
.preview-wrap .plabel{display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem;}
.preview-wrap .plabel span{font-family:var(--mono); font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}
.preview-frame-shell{border:2px solid var(--sandbox); border-radius:var(--radius); overflow:hidden; background:var(--bg); box-shadow:0 0 0 4px var(--sandbox-soft);}
iframe.preview{width:100%; height:160px; border:none; display:block; background:#111;}
.sandbox-actions{display:flex; gap:.6rem; margin-top:1rem;}

/* settings sub-navigation */
.settings-layout{display:grid; grid-template-columns:200px 1fr; gap:1.75rem; align-items:start;}
@media (max-width:760px){ .settings-layout{grid-template-columns:1fr;} }

.settings-nav{display:flex; flex-direction:column; gap:.3rem; position:sticky; top:1.5rem;}
@media (max-width:760px){
  .settings-nav{
    flex-direction:row; overflow-x:auto; position:static; gap:.5rem;
    padding-bottom:.6rem; margin-bottom:.5rem; border-bottom:1px solid var(--border);
    -webkit-overflow-scrolling:touch;
  }
}
.settings-nav-item{
  display:flex; align-items:center; gap:.6rem; padding:.65rem .8rem; min-height:44px;
  border-radius:var(--radius); border:1px solid transparent; background:transparent;
  color:var(--muted); font-size:.88rem; text-align:left; white-space:nowrap; flex:none;
  cursor:pointer;
}
.settings-nav-item svg{width:16px; height:16px; flex:none;}
.settings-nav-item:hover{color:var(--heading); background:var(--surface-raised);}
.settings-nav-item[aria-current="true"]{
  color:var(--heading); background:var(--gold-soft); border-color:var(--gold); font-weight:600;
}

.settings-pane[hidden]{display:none;}
.pane-loading{color:var(--muted); font-size:.85rem; padding:2rem 0; text-align:center;}

/* messages inbox */
.messages-layout{display:grid; grid-template-columns:260px 1fr; gap:1.25rem; height:calc(100vh - 220px); min-height:420px;}
@media (max-width:760px){ .messages-layout{grid-template-columns:1fr; height:auto;} }

.messages-threads{
  display:flex; flex-direction:column; gap:.3rem; overflow-y:auto;
  border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface); padding:.5rem;
}
.thread-row{
  display:flex; align-items:center; gap:.6rem; padding:.6rem; min-height:44px; border-radius:var(--radius);
  border:1px solid transparent; background:transparent; text-align:left; width:100%;
}
.thread-row img.mini-avatar{width:36px; height:36px; border-radius:50%; flex:none; object-fit:cover;}
.thread-row-body{flex:1; min-width:0; display:flex; flex-direction:column;}
.thread-row-name{font-size:.85rem; color:var(--heading); font-weight:600;}
.thread-row-preview{font-size:.78rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.thread-row:hover{background:var(--surface-raised);}
.thread-row.active{background:var(--gold-soft); border-color:var(--gold);}
.thread-row.unread .thread-row-name{color:var(--gold);}
.thread-row .badge-dot{color:var(--accent); font-size:1.2rem; line-height:1; flex:none;}

.messages-conversation{
  display:flex; flex-direction:column; border:1px solid var(--border); border-radius:var(--radius-lg);
  background:var(--surface); overflow:hidden;
}
#conversation-empty{margin:auto; padding:1.5rem; text-align:center;}
#conversation-active{display:flex; flex-direction:column; height:100%; min-height:0;}
.conversation-header{display:flex; align-items:center; gap:.6rem; padding:.9rem 1.1rem; border-bottom:1px solid var(--border-soft); flex:none;}
.conversation-header img.mini-avatar{width:34px; height:34px; border-radius:50%; flex:none; object-fit:cover;}
.conversation-header .who{color:var(--heading); font-weight:600; text-decoration:none; font-family:var(--serif);}
.conversation-header .who:hover{color:var(--gold);}
.conversation-messages{flex:1; overflow-y:auto; padding:1rem 1.1rem; display:flex; flex-direction:column; gap:.5rem;}
.message-row{display:flex; flex-direction:column; align-items:flex-start;}
.message-row time{font-family:var(--mono); font-size:.65rem; color:var(--muted); margin:.15rem .2rem 0;}
.message-row.mine{align-items:flex-end;}
.message-row.mine .chat-bubble{background:var(--gold-soft); border-color:var(--gold);}
.conversation-composer{display:flex; gap:.6rem; padding:.9rem 1.1rem; border-top:1px solid var(--border-soft); flex:none;}
.conversation-composer textarea{
  flex:1; resize:none; background:var(--surface-raised); border:1px solid var(--border-soft); border-radius:var(--radius);
  padding:.6rem .75rem; color:var(--text); font-size:.88rem; font-family:inherit; outline:none;
}
.conversation-composer textarea:focus{border-color:var(--gold);}

/* notifications */
.notifications-list{display:flex; flex-direction:column; gap:.4rem;}
.notification-row{
  display:flex; align-items:center; gap:.75rem; padding:.75rem .9rem; border-radius:var(--radius);
  border:1px solid var(--border); background:var(--surface); text-decoration:none;
}
.notification-row:hover{border-color:var(--gold);}
.notification-row.unread{background:var(--gold-soft); border-color:var(--gold);}
.notification-row img.mini-avatar{width:36px; height:36px; border-radius:50%; flex:none; object-fit:cover;}
.notification-body{display:flex; flex-direction:column; gap:.1rem;}
.notification-text{color:var(--text); font-size:.9rem;}
.notification-row.unread .notification-text{color:var(--heading); font-weight:600;}
.notification-body time{font-family:var(--mono); font-size:.68rem; color:var(--muted);}

/* chat widget */
.chat-widget{
  position:fixed; bottom:0; right:88px; width:260px; background:var(--surface); border:1px solid var(--border);
  border-bottom:none; border-radius:var(--radius-lg) var(--radius-lg) 0 0; box-shadow:0 -8px 26px rgba(0,0,0,.4); z-index:35;
}
.chat-widget[hidden]{display:none;}
@media (max-width:1100px){ .chat-widget{right:18px;} }
@media (max-width:400px){ .chat-widget{display:none !important;} }
.chat-head{display:flex; align-items:center; gap:.5rem; padding:.6rem .8rem; border-bottom:1px solid var(--border-soft);}
.chat-head img.ca-avatar{width:26px; height:26px; border-radius:50%; display:block; object-fit:cover;}
.chat-head .cname{font-size:.82rem; font-weight:600; color:var(--heading); flex:1; text-decoration:none;}
.chat-head .cstatus{width:8px; height:8px; border-radius:50%; background:var(--online); flex:none;}
.chat-head button{background:transparent; border:none; color:var(--muted); padding:.2rem; display:flex;}
.chat-head button svg{width:13px; height:13px;}
.chat-body{padding:.8rem; font-size:.82rem; max-height:220px; overflow-y:auto;}
.chat-bubble{background:var(--surface-raised); border:1px solid var(--border-soft); border-radius:var(--radius); padding:.5rem .7rem; display:inline-block; max-width:85%; margin-bottom:.4rem;}
.chat-foot{display:flex; align-items:center; gap:.4rem; padding:.6rem .7rem; border-top:1px solid var(--border-soft);}
.chat-foot input{flex:1; border:1px solid var(--border-soft); background:var(--surface-raised); border-radius:99px; padding:.4rem .7rem; color:var(--text); font-size:.8rem; outline:none;}
.chat-foot button{background:var(--accent); border:none; border-radius:50%; width:30px; height:30px; display:flex; align-items:center; justify-content:center; color:#fff; flex:none;}
.chat-foot button svg{width:14px; height:14px;}

footer.id-footer{border-top:1px solid var(--border); padding:2.5rem 2rem; margin-top:3rem; text-align:center; font-size:.8rem; color:var(--muted); margin-left:246px; margin-right:68px;}
@media (max-width:1100px){ footer.id-footer{margin-right:0;} }
@media (max-width:880px){ footer.id-footer{margin-left:0;} }

/* ---------- auth modal ---------- */
.auth-backdrop{
  display:none; position:fixed; inset:0; background:rgba(6,6,7,.68); backdrop-filter:blur(2px);
  z-index:60; align-items:center; justify-content:center; padding:1.5rem;
}
.auth-backdrop.open{display:flex;}
.auth-modal{
  background:var(--surface-raised); border:1px solid var(--border); border-radius:var(--radius-lg);
  width:100%; max-width:400px; max-height:90vh; overflow-y:auto; padding:2rem 1.9rem 1.8rem; position:relative;
  box-shadow:0 30px 70px rgba(0,0,0,.55);
}
.auth-close{
  position:absolute; top:.9rem; right:.9rem; background:transparent; border:1px solid var(--border-soft);
  border-radius:50%; width:30px; height:30px; display:flex; align-items:center; justify-content:center; color:var(--muted);
}
.auth-close svg{width:14px; height:14px;}
.auth-close:hover{color:var(--heading); border-color:var(--gold);}
.auth-modal h2{font-size:1.35rem; text-align:center; padding-right:1.5rem;}
.auth-subtitle{text-align:center; font-size:.85rem; color:var(--muted); line-height:1.5; margin:.5rem 0 1.1rem;}
.auth-switch{text-align:center; font-size:.83rem; color:var(--muted); margin-top:.5rem;}
.auth-switch button{background:none; border:none; padding:0; color:var(--gold); text-decoration:none; font-weight:600; font-size:.83rem; cursor:pointer;}
.auth-switch button:hover{text-decoration:underline;}

.discord-btn{
  width:100%; display:flex; align-items:center; justify-content:center; gap:.6rem; margin-top:1.5rem;
  background:#5865f2; border:none; border-radius:var(--radius); padding:.75rem; color:#fff;
  font-size:.9rem; font-weight:700; text-decoration:none;
}
.discord-btn:hover{background:#4954c4;}
.discord-btn svg{width:19px; height:19px; fill:#fff;}

.oauth-grid{display:grid; grid-template-columns:1fr 1fr; gap:.6rem; margin-top:.6rem;}
.oauth-btn{
  display:flex; align-items:center; justify-content:center; gap:.5rem; border-radius:var(--radius);
  padding:.65rem; font-size:.84rem; font-weight:700; border:1px solid var(--border-soft); text-decoration:none;
}
.oauth-btn svg{width:17px; height:17px; flex:none;}
.oauth-btn.google{background:#fff; color:#3c4043;}
.oauth-btn.google:hover{background:#f1f1f1;}
.oauth-btn.github{background:var(--surface); color:var(--text);}
.oauth-btn.github svg{fill:currentColor;}
.oauth-btn.github:hover{border-color:var(--gold); color:var(--heading);}

.auth-divider{display:flex; align-items:center; gap:.75rem; margin:1.3rem 0; color:var(--muted); font-family:var(--mono); font-size:.66rem; letter-spacing:.1em; text-transform:uppercase;}
.auth-divider::before,.auth-divider::after{content:""; flex:1; height:1px; background:var(--border-soft);}

.auth-field{margin-bottom:.8rem;}
.auth-field label{display:block; font-family:var(--mono); font-size:.66rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-bottom:.35rem;}
.auth-field input, .auth-field textarea{width:100%; background:var(--surface); border:1px solid var(--border-soft); border-radius:var(--radius); padding:.65rem .8rem; color:var(--text); font-size:.9rem; outline:none; font-family:inherit;}
.auth-field textarea{resize:vertical;}
.auth-field input:focus, .auth-field textarea:focus{border-color:var(--gold);}
.handle-preview{font-family:var(--mono); font-size:.72rem; color:var(--muted); margin-top:.4rem;}
.handle-preview strong{color:var(--gold); font-weight:600;}

.auth-submit{width:100%; margin-top:.5rem;}
.auth-legal{font-size:.75rem; color:var(--muted); text-align:center; margin-top:1.2rem; line-height:1.55;}
.auth-legal a{color:var(--gold); text-decoration:underline;}
.auth-check{display:flex; align-items:flex-start; gap:.55rem; margin-top:.85rem; font-size:.78rem; color:var(--muted); text-align:left;}
.auth-check input{margin-top:.2rem; accent-color:var(--accent); flex:none;}

[data-auth-view]{display:none;}
[data-auth-view].active{display:block;}
