/* Jungle: deep greens around the BrainFrog 7TV emote (01G9TEZGDG0008CS0Q67AD709E: brain pink #d08080,
   mouth brown #905020, tongue #d00050, outline #001000). One committed dark look; mahogany wood only
   on the Home Build card and the Saved board. Display face Chewy, body Atkinson Hyperlegible. */
:root {
  color-scheme: dark;
  --ink: #07160b;
  --night: #0a1d10;
  --canopy: #0e2a17;
  --panel: #15321f;
  --panel-2: #1b3d27;
  --panel-3: #0f2617;
  --line: #2a5035;
  --line-2: #356341;
  --leaf: #2f7337;
  --leaf-m: #3f8a40;
  --leaf-l: #6aaa4e;
  --lime: #b4d861;
  --brain: #e39595;
  --brain-l: #f3c6bf;
  --brain-ink: #2a0d12;
  --mouth: #d00050;
  --title: #f6ead8;
  --text: #e6efdc;
  --muted: #a3bb9a;
  --faint: #7d9a77;
  --warn: #ff7aa5;
  --twitch: #9146ff;
  --twitch-d: #772ce8;
  --display: "Chewy", "Comic Sans MS", system-ui, sans-serif;
  --sans: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 4px 18px 4px 18px;
  --rs: 3px 12px 3px 12px;
  /* one frame for every card, wood or green: soft border, lighter top edge, same shadow */
  --frame: inset 0 1px 0 rgb(255 235 205 / .13), inset 0 0 0 1px rgb(255 255 255 / .035), 0 10px 30px -12px rgb(0 0 0 / .7);
  /* finished mahogany: long dark figure + soft lighter bands (SVG noise) over a warm gradient */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='320'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0025 0.07' numOctaves='4' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.035 0 0 0 0 0.015 0 0 0 1.25 -0.42'/%3E%3C/filter%3E%3Cfilter id='h'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0015 0.03' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.78 0 0 0 0 0.6 0 0 0 0.45 -0.2'/%3E%3C/filter%3E%3Crect width='800' height='320' filter='url(%23h)'/%3E%3Crect width='800' height='320' filter='url(%23g)'/%3E%3C/svg%3E");
  --wood: linear-gradient(180deg, rgb(255 215 170 / .05), transparent 20%, transparent 80%, rgb(0 0 0 / .16)),
          var(--grain) 0 0 / 800px 320px,
          linear-gradient(96deg, #5a2712, #6e3219 40%, #602a14 70%, #703520 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(80% 55% at 50% 0%, #12341c 0%, transparent 70%), var(--night);
  color: var(--text);
  font: 16px/1.5 var(--sans);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lime); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.leafdefs { position: absolute; width: 0; height: 0; overflow: hidden; }
img { max-width: 100%; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main.wrap { position: relative; z-index: 1; padding-bottom: 80px; }

/* foliage, fixed behind everything */
#scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#scene svg { position: absolute; top: 0; height: 100vh; height: 100lvh; width: auto; overflow: visible; }
#scene .cl { left: 0; }
#scene .cr { right: 0; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: rgb(10 29 16 / .94); backdrop-filter: blur(6px); border-bottom: 2px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 8px 22px; min-height: 58px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--brain-l); }
.mark img { width: 48px; height: 40px; display: block; object-fit: contain; }
.wm { font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: .01em; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { position: relative; color: var(--muted); font-weight: 700; text-decoration: none; padding: 10px 12px 12px; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--title); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 5px; background: var(--lime); border-radius: 0 6px 0 6px; }
.nav a.key::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brain); margin-right: 6px; vertical-align: 2px; }
.login {
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 6px; height: 38px; padding: 0 14px;
  background: var(--twitch); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; max-width: 220px; overflow: hidden;
}
.login:hover { background: var(--twitch-d); }
.login svg { width: 17px; height: 17px; flex: none; fill: #fff; }
.login .av { width: 20px; height: 20px; border-radius: 50%; background: var(--brain); border: 2px solid #fff; flex: none; }
.login[aria-disabled="true"] { cursor: default; }

/* ---------- shared bits ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--frame); }
.card.wood { background: var(--wood); border-color: #7a4327; color: #f7e6d4; }
.h1 { font-family: var(--display); font-weight: 400; margin: 0; font-size: clamp(40px, 5vw, 60px); line-height: 1; color: var(--title); letter-spacing: .01em; text-shadow: 0 3px 0 var(--ink); }
.h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 28px; line-height: 1.1; color: var(--title); letter-spacing: .01em; }
.h2.small { font-size: 24px; }
.phead { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin: 26px 0 16px; }
.blockh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.lnk { color: var(--lime); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.count { font-size: 14px; color: var(--muted); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.n { color: var(--muted); font-weight: 400; font-size: 12px; font-variant-numeric: tabular-nums; }

.seg { display: inline-flex; flex-wrap: wrap; background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; }
.seg[hidden] { display: none; }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 2px 11px 2px 11px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--leaf); color: #fff; }
.seg.big2 button { font-family: var(--display); font-weight: 400; font-size: 21px; padding: 4px 18px; letter-spacing: .02em; }
.seg.big2 button[aria-pressed="true"] { background: var(--brain); color: var(--brain-ink); }
.seg.small button { font-size: 13px; padding: 4px 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 14px; border-radius: var(--rs);
}
.btn:hover:not([disabled]) { border-color: var(--leaf-l); }
.btn.primary { background: var(--brain); border-color: var(--brain); color: var(--brain-ink); }
.btn.primary:hover:not([disabled]) { background: var(--brain-l); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.done { background: var(--lime); border-color: var(--lime); color: #13230c; }
.token { font-family: var(--mono); font-size: 12px; }
.big {
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: var(--r); text-decoration: none;
  background: var(--brain); color: var(--brain-ink); font-weight: 700; font-size: 19px; padding: 14px 24px;
  box-shadow: 0 4px 0 #8a4a4a, 0 14px 30px -10px rgb(227 149 149 / .55);
}
.big:hover { background: var(--brain-l); }
.big svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.more-btn { display: flex; margin: 16px auto 0; }

/* 7TV emotes keep their own box; a missing image never moves the layout */
.emote { display: block; object-fit: contain; }
.pals { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.loading, .empty { padding: 34px 16px; display: grid; justify-items: center; gap: 10px; color: var(--muted); text-align: center; }
.loading img { width: 186px; height: 64px; object-fit: contain; }

/* ---------- dense rows ---------- */
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.row {
  display: grid; grid-template-columns: 44px 36px minmax(0, 1fr) auto auto 32px; column-gap: 12px; align-items: center;
  padding: 8px 12px 8px 6px; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row:hover { background: rgb(255 255 255 / .025); }
.row.open, .row.playing { background: var(--panel-2); }
.row.norank { grid-template-columns: 36px minmax(0, 1fr) auto auto 32px; padding-left: 12px; }
.rk { text-align: center; line-height: 1; }
.rk .n { font-family: var(--display); font-size: 24px; color: var(--title); }
.play {
  width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; padding: 0; background: var(--leaf); color: #fff;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
}
.play:hover { background: var(--leaf-m); }
.play svg { width: 13px; height: 13px; fill: currentColor; }
.play[aria-pressed="true"] { background: var(--brain); color: var(--brain-ink); }
.play.discord { background: var(--panel-3); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.play.discord svg { width: 16px; height: 16px; }
.play.discord:hover { color: #fff; background: #5865f2; }
.mid { min-width: 0; }
.ttl {
  display: block; max-width: 100%; border: 0; background: none; padding: 0; text-align: left; color: var(--title);
  font-family: var(--display); font-size: 22px; line-height: 1.15; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ttl:hover { color: #fff; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; margin-top: 1px; min-width: 0; }
.meta > * { flex: none; }
.meta .who { color: var(--text); font-weight: 700; }
.meta .who.anon { font-weight: 400; font-style: italic; color: var(--muted); }
.meta .dim::before, .meta .gs::before { content: "·"; margin-right: 6px; color: var(--faint); }
.meta .gs { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; color: var(--faint); }
.auto { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 2px 8px 2px 8px; background: rgb(180 216 97 / .16); color: var(--lime); }
.voice { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 2px 8px 2px 8px; background: rgb(145 70 255 / .22); color: #d4bcff; }
.bits { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 2px 8px 2px 8px; background: rgb(233 196 106 / .18); color: #f0d38e; }
.vote {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 62px; height: 30px; padding: 0 9px;
  border: 1px solid var(--line-2); border-radius: var(--rs); background: var(--panel-3); color: var(--text);
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.vote svg { width: 11px; height: 11px; fill: var(--lime); }
.vote:hover { border-color: var(--leaf-l); }
.vote[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #13230c; }
.vote[aria-pressed="true"] svg { fill: #13230c; }
.vote.hinting, .rx.hinting { font-size: 12px; color: var(--muted); }
.exp { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; padding: 0; }
.exp:hover { background: var(--panel-2); color: var(--text); }
.exp svg { width: 14px; height: 14px; fill: none; transition: transform .2s; }
.exp svg path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.row.open .exp svg { transform: rotate(180deg); }
.detail { grid-column: 3 / -1; display: none; padding: 10px 0 8px; min-width: 0; }
.row.norank .detail { grid-column: 2 / -1; }
.row.open .detail { display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.tag { font-size: 12.5px; padding: 1px 8px; border-radius: 2px 8px 2px 8px; background: var(--panel-3); border: 1px solid var(--line); color: var(--muted); }
.lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.text { margin: 0; font-size: 16.5px; line-height: 1.65; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; max-width: 46em; border-left: 3px solid var(--leaf); padding-left: 14px; }
.text.desc { font-style: italic; }
.dfoot { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.dfoot .grow { flex: 1; }
.dacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dacts .grow { flex: 1; }
.dacts .token { color: var(--muted); user-select: all; }
.nowplaying { height: 20px; width: auto; }
.progress { grid-column: 2 / -1; display: none; height: 4px; margin-top: 8px; background: var(--line); border-radius: 2px; }
.row.norank .progress { grid-column: 1 / -1; }
.row.playing .progress { display: block; }
.progress > i { display: block; height: 100%; width: 0; background: var(--leaf-l); border-radius: 2px; }

/* reactions: fixed 22px glyph box, image scaled down to fit inside, never cropped */
.rxs, .reacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reacts { margin-top: 12px; }
.rx {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 5px; flex: none; white-space: nowrap;
  border: 1px solid var(--line-2); border-radius: var(--rs); background: var(--panel-3); color: var(--text);
  font-size: 13px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.rx:hover { border-color: var(--leaf-l); }
.rx[aria-pressed="true"] { border-color: var(--brain); background: rgb(227 149 149 / .18); }
.emw { height: 22px; display: flex; align-items: center; justify-content: center; flex: none; }
.emw img { height: 100%; width: auto; max-width: 48px; object-fit: contain; display: block; }
.emw.char { font-size: 17px; line-height: 1; width: 22px; }
.rx-add { padding: 0 8px; color: var(--muted); }
.rx-add svg { width: 15px; height: 15px; fill: currentColor; }
.rx-wrap { position: relative; }
.rx-picker {
  position: absolute; z-index: 5; top: 34px; left: 0; display: flex; gap: 2px; padding: 5px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 24px rgb(0 0 0 / .45);
}
.rx-picker[hidden] { display: none; }
.rx-opt { border: 0; background: none; border-radius: 6px; padding: 4px 6px; display: grid; place-items: center; height: 34px; }
.rx-opt:hover, .rx-opt[aria-pressed="true"] { background: var(--panel-3); }
.rx-opt[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--brain); }

/* ---------- Home ---------- */
.hhero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 42px 0 30px; }
.hhero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 6vw, 78px); line-height: .98; margin: 0; color: var(--title); text-shadow: 0 4px 0 var(--ink); }
.hhero h1 em { font-style: normal; color: var(--brain); }
.hhero .sub { font-size: 19px; max-width: 34em; margin: 16px 0 24px; line-height: 1.55; }
.cta { display: flex; gap: 12px 18px; flex-wrap: wrap; align-items: center; }
.hscene { position: relative; height: 300px; }
.hscene svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.perchbar { position: absolute; left: 8%; right: 4%; top: 190px; height: 22px; border-radius: 11px 6px 9px 12px; background: var(--wood); box-shadow: inset 0 2px 0 rgb(255 210 170 / .18), inset 0 -3px 0 rgb(0 0 0 / .35), 0 8px 18px -6px #000; }
.perch { position: absolute; left: 50%; top: 128px; margin-left: -93px; width: 186px; height: 64px; overflow: hidden; }
.perch .bfm { width: 186px; height: 64px; }
.hscene .ab { position: absolute; width: 69px; height: 32px; }
.hscene .ab1 { left: calc(50% + 104px); top: 158px; }
.hscene .ab2 { left: 9%; bottom: 34px; transform: rotate(-8deg); }
.partL, .partR { transform-box: view-box; }
.partL { transform-origin: 150px -6px; }
.partR { transform-origin: 330px -6px; }
@media (prefers-reduced-motion: no-preference) {
  .intro .partL { animation: partL 1.1s cubic-bezier(.2, .9, .3, 1.15) .15s both; }
  .intro .partR { animation: partR 1.1s cubic-bezier(.2, .9, .3, 1.15) .25s both; }
  .intro .perch .bfm { animation: rise .8s cubic-bezier(.3, 1.4, .6, 1) .9s both; }
}
@keyframes partL { from { transform: rotate(-34deg); } to { transform: none; } }
@keyframes partR { from { transform: rotate(32deg); } to { transform: none; } }
@keyframes rise { from { transform: translateY(64px); } to { transform: none; } }

.sections { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 16px; margin: 8px 0 34px; }
.sec { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sec .h2 { font-size: 30px; }
.sec p { margin: 0; }
.sec .go { margin-top: auto; align-self: flex-start; }
.sec.wood p { color: #f3dcc6; }
.sec.wood .h2 { color: #fff1e2; text-shadow: 0 2px 0 rgb(0 0 0 / .4); }
.sec.wood .big { font-size: 17px; padding: 11px 20px; }
.sample { font-family: var(--mono); font-size: 13.5px; background: rgb(10 20 10 / .6); border: 1px solid rgb(0 0 0 / .25); border-radius: 6px; padding: 10px 12px; overflow-wrap: anywhere; margin: 4px 0 6px; color: var(--text); }
.sample .k, .out .k { color: var(--brain); }
.sample .g, .out .g { color: var(--lime); }
.hgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* placeholder lists (no data yet) */
.mp { padding: 18px 18px 20px; }
.ghost { list-style: none; margin: 4px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ghost li { display: grid; grid-template-columns: 22px 28px 1fr 46px; gap: 10px; align-items: center; height: 38px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: var(--rs); opacity: var(--o, 1); }
.ghost i { display: block; height: 9px; border-radius: 5px; background: var(--line); }
.ghost .c { width: 28px; height: 28px; border-radius: 50%; border: 2px dashed var(--line-2); background: none; }
.ghost .w1 { width: 70%; } .ghost .w2 { width: 52%; } .ghost .w3 { width: 62%; }
.note { display: flex; align-items: center; gap: 14px; }
.note b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--title); line-height: 1.1; }
.note span { color: var(--muted); font-size: 14.5px; }

/* Home vine swing: behind the content, transform-only, Home only */
#tarzan { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; display: none; }
#tarzan.go { display: block; }
#tarzan .car { position: absolute; top: -14vh; left: 0; width: 120px; height: 94vh; will-change: transform; }
#tarzan .pend { position: absolute; inset: 0; transform-origin: 60px 0; will-change: transform; }
#tarzan .rope { position: absolute; left: 0; top: 0; width: 120px; height: 100%; overflow: visible; }
#tarzan .riders { position: absolute; left: 0; right: 0; top: 100%; margin-top: -6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#tarzan .rider:nth-child(3) { margin-left: 34px; }
#tarzan .rider:nth-child(4) { margin-left: -30px; }
#tarzan .rider:nth-child(5) { margin-left: 44px; }
#tarzan .rider:nth-child(6) { margin-left: -40px; }
#tarzan .rider:nth-child(7) { margin-left: 18px; }
#tarzan.rtl .riders { transform: scaleX(-1); }
#tarzan.go .car { animation: tz-car 7.5s linear both; }
#tarzan.go .pend { animation: tz-pend 7.5s cubic-bezier(.45, 0, .55, 1) both; }
#tarzan.go.rtl .car { animation-name: tz-car-r; }
#tarzan.go.rtl .pend { animation-name: tz-pend-r; }
@keyframes tz-car { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 140px)); } }
@keyframes tz-car-r { from { transform: translateX(calc(100vw + 140px)); } to { transform: translateX(-260px); } }
@keyframes tz-pend { from { transform: rotate(58deg); } to { transform: rotate(-58deg); } }
@keyframes tz-pend-r { from { transform: rotate(-58deg); } to { transform: rotate(58deg); } }

/* ---------- Charts / Library ---------- */
.cgrid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.cgrid aside { padding-top: 29px; }
.controls { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.search { display: flex; align-items: center; gap: 10px; max-width: 640px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 2px 6px 2px 14px; }
.search:focus-within { border-color: var(--lime); }
.search svg { width: 19px; height: 19px; flex: none; stroke: var(--muted); stroke-width: 2.6; fill: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; font-size: 17px; outline: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }

/* ---------- Build ---------- */
.bgrid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); gap: 24px; align-items: start; }
.bmain, .bside { display: grid; gap: 16px; min-width: 0; }
.panel { display: grid; gap: 16px; min-width: 0; }
.panel[hidden] { display: none; }
.box { padding: 18px 20px 20px; min-width: 0; }
.box h2, .savedhead h2 { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--title); margin: 0 0 10px; letter-spacing: .01em; }
.box h2 small { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.box > h2:not(:first-child) { margin-top: 18px; }
.box > .seg { margin-bottom: 16px; }
label.l { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.field, textarea {
  width: 100%; border: 1px solid var(--line-2); background: var(--panel-3); border-radius: 6px; color: var(--text);
}
.field { height: 38px; padding: 0 12px; }
textarea { padding: 10px 12px; min-height: 160px; resize: vertical; line-height: 1.6; font-size: 16.5px; display: block; }
.field:focus, textarea:focus { outline: 2px solid var(--lime); outline-offset: -1px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.err { color: var(--warn); }
.inline { display: flex; gap: 8px; }
.inline .field { flex: 1; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-3); padding: 5px; min-height: 40px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; padding: 3px 4px 3px 10px; border-radius: var(--rs); background: var(--leaf); color: #fff; }
.chip button { border: 0; background: none; color: rgb(255 255 255 / .75); padding: 0 4px; line-height: 1; }
.chips input { border: 0; background: none; flex: 1; min-width: 120px; height: 28px; outline: none; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.suggest button { font-size: 13.5px; font-weight: 700; border: 1px solid var(--line-2); background: var(--panel-3); border-radius: var(--rs); padding: 4px 11px; color: var(--text); }
.suggest button:hover:not([disabled]) { border-color: var(--leaf-l); }

.out { font-family: var(--mono); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; background: #08150b; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; min-height: 48px; }
.out.placeholder { color: var(--faint); }
.outbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 12px; }
.btns { display: flex; gap: 8px; flex: none; }
.optbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.optnote { font-size: 13.5px; color: var(--muted); }
.optnote b { color: var(--lime); }
.undo { border: 0; background: none; padding: 0 2px; color: var(--brain-l); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; }
.how { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.part { display: flex; align-items: center; gap: 8px; min-width: 0; }
.part.none { color: var(--muted); font-size: 14px; padding: 8px 0; }
.part .who { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; color: var(--brain-l); }
.part.is-clip .who, .part.is-sfx .who { color: #ffb3c9; }
.part .field { flex: 1; min-width: 0; }
.part .grow { flex: 1; }
.order { display: flex; gap: 2px; }
.secs { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 13px; flex: none; }
.secs input { width: 64px; height: 32px; border: 1px solid var(--line-2); background: var(--panel-3); border-radius: 6px; padding: 0 6px; font-family: var(--mono); font-size: 13px; }
.mini {
  width: 30px; height: 30px; flex: none; padding: 0; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--muted); font-size: 12px; line-height: 1;
}
.part .mini, .pick .mini, .saved-row .mini { font-family: var(--sans); margin: 0; }
.mini:hover:not([disabled]) { color: var(--text); border-color: var(--leaf-l); }
.mini[disabled] { opacity: .35; cursor: default; }
.mini[aria-pressed="true"] { background: var(--brain); border-color: var(--brain); color: var(--brain-ink); }

.sfxc { display: flex; flex-direction: column; gap: 10px; }
.dur { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dur button { border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); font-weight: 700; font-size: 13.5px; border-radius: var(--rs); padding: 5px 10px; }
.dur button[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf-l); color: #fff; }
.dur .nod { margin-left: auto; font-weight: 400; color: var(--muted); }
.durn { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 14px; }
.durn input { width: 66px; height: 31px; border: 1px solid var(--line-2); background: var(--panel-3); border-radius: 6px; padding: 0 6px; font-size: 14px; font-family: var(--mono); }
.tok { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tok code { flex: 1 1 200px; min-width: 0; font-family: var(--mono); font-size: 14px; color: #ffb3c9; background: rgb(208 0 80 / .14); border: 1px solid rgb(208 0 80 / .35); border-radius: 6px; padding: 7px 10px; overflow-wrap: anywhere; }
.tok code.empty { color: var(--faint); background: none; border-style: dashed; }
.ex { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.9; }
.exb { font-family: var(--mono); font-size: 12px; border: 0; background: none; color: var(--lime); padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; }

.pickhead { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pickhead .search { flex: 1 1 160px; height: 38px; padding: 0 12px; }
.cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.cats[hidden] { display: none; }
.cats button { border: 1px solid var(--line); background: none; border-radius: var(--rs); padding: 2px 9px; font-size: 13px; color: var(--muted); }
.cats button[aria-pressed="true"] { color: #fff; background: var(--leaf); border-color: var(--leaf); }
.pick { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 360px; overflow-y: auto; }
.pick li { display: flex; gap: 4px; min-width: 0; }
.pick li.empty { grid-column: 1 / -1; display: grid; }
.pickitem { flex: 1; min-width: 0; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-3); padding: 4px 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.pickitem:hover { border-color: var(--leaf-l); }
.pickitem .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickitem small { color: var(--faint); font-size: 11px; flex: none; }

/* Saved board (wood) */
.board { position: relative; margin-top: 52px; }
.perched { position: absolute; left: 22px; right: 26px; top: -63px; height: 64px; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.perched .ab { width: 69px; height: 32px; }
.perched .bf { width: 76px; height: 64px; }
.boardin { padding: 14px 14px 16px; }
.savedhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.savedhead h2 { margin: 0; color: #fff1e2; text-shadow: 0 2px 0 rgb(0 0 0 / .45); font-size: 24px; }
.savedhead .n { color: #f3dcc6; }
.boardin .seg { background: rgb(12 24 14 / .55); border-color: rgb(0 0 0 / .3); }
.saved { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 460px; overflow-y: auto; }
.saved-row { display: flex; gap: 4px; align-items: flex-start; min-width: 0; background: rgb(12 24 14 / .82); border-radius: var(--rs); padding: 8px; }
.saved-open { flex: 1; min-width: 0; text-align: left; display: grid; gap: 4px; border: 0; background: none; padding: 0 4px; color: var(--text); }
.saved-text { font-size: 14.5px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.saved-meta { order: 2; display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.saved-meta .tag { font-size: 11px; padding: 0 6px; }
.st-copied { color: var(--lime); }
.saved .empty { background: rgb(12 24 14 / .6); border-radius: var(--rs); color: #f3dcc6; }
.savenote { margin: 12px 0 0; font-size: 13px; color: #f3dcc6; line-height: 1.5; }
.savenote[hidden] { display: none; }
.tlogin { border: 0; background: var(--twitch); color: #fff; font-weight: 700; font-size: 11.5px; border-radius: 4px; padding: 2px 7px; vertical-align: 1px; }
.tlogin[aria-disabled="true"] { cursor: default; }
.soon .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.soon .ghost li { grid-template-columns: 28px 1fr 46px; }
.pill { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--rs); background: rgb(180 216 97 / .16); color: var(--lime); white-space: nowrap; }
.soonp { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .cgrid, .hgrid { grid-template-columns: 1fr; }
  .cgrid aside { padding-top: 0; }
  .sections { grid-template-columns: 1fr 1fr; }
  .sections .wood { grid-column: 1 / -1; }
  .bgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hhero { grid-template-columns: 1fr; padding: 22px 0 18px; }
  .hscene { height: 220px; order: -1; margin-bottom: -10px; }
  .perchbar { top: 150px; }
  .perch { top: 88px; }
  .hscene .ab1 { top: 118px; }
}
@media (max-width: 560px) {
  .bar .wrap { gap: 2px 10px; padding-top: 6px; }
  .mark { margin-right: auto; }
  .nav { order: 3; width: 100%; margin: 0 -8px; justify-content: space-between; }
  .nav a { font-size: 15px; padding: 8px 8px 11px; }
  .wm { font-size: 25px; }
  .login { height: 34px; font-size: 13px; padding: 0 10px; }
  .login .wide { display: none; }
  .hhero .sub { font-size: 17px; }
  .sections { grid-template-columns: 1fr; }
  .row { grid-template-columns: 30px 34px minmax(0, 1fr) auto; column-gap: 9px; padding: 8px 6px 8px 2px; }
  .row.norank { grid-template-columns: 34px minmax(0, 1fr) auto; padding-left: 8px; }
  .row .rxs, .row .exp { display: none; }
  .ttl { font-size: 19.5px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.1; }
  .vote { min-width: 50px; padding: 0 7px; font-size: 14px; }
  .detail, .row.norank .detail { grid-column: 1 / -1; padding-left: 6px; }
  .progress, .row.norank .progress { grid-column: 1 / -1; }
  .text { font-size: 16px; }
  .box { padding: 16px 14px 18px; }
  .order { display: none; }
  .dur .nod { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  #tarzan { display: none !important; }
}
