/* Global Tier List — single consolidated stylesheet */
:root {
  --bg: #0e1015; --panel: #161920; --panel2: #1d212b; --panel3: #282d39; --line: #242936;
  --text: #e9ebf1; --muted: #8a91a3; --faint: #5f667a;
  --accent: #7c9cff; --accent2: #ff6b4a; --good: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --S: #ff7f7f; --A: #ffbf7f; --B: #ffdf7f; --C: #bfff7f; --D: #7fbfff; --F: #c97fff;
  --r: 10px; --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.hint, .muted { color: var(--muted); font-size: 13px; }
h1 { margin: 0; font-size: 28px; letter-spacing: -.5px; line-height: 1.15; }
h2 { font-size: 18px; margin: 28px 0 12px; letter-spacing: -.2px; }
input, textarea, select { width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; transition: border-color .1s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- header ---------- */
header { display: flex; align-items: center; gap: 14px; padding: 10px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(14,16,21,.85); backdrop-filter: blur(10px); }
.logo { font-weight: 800; font-size: 19px; color: var(--text) !important; text-decoration: none !important; letter-spacing: -.4px; white-space: nowrap; }
.logo span { color: var(--accent); margin: 0 1px; }
header .search { flex: 1; max-width: 420px; background: var(--panel); border-color: transparent; }
header .search:focus { border-color: var(--accent); }
header .spacer { flex: 1; }
.authbox { display: flex; align-items: center; gap: 10px; position: relative; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel3) center/cover; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.userbtn { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.userbtn:hover { background: var(--panel2); }
.menu { position: absolute; right: 0; top: 42px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 180px; padding: 6px; box-shadow: 0 12px 32px #000a; }
.menu a, .menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--panel2); text-decoration: none; }
main { max-width: 1120px; margin: 0 auto; padding: 24px; }

/* ---------- buttons & controls ---------- */
.btn { background: var(--accent); color: #0b0d12; border: 0; padding: 8px 15px; border-radius: 8px; font-weight: 650; cursor: pointer; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; transition: filter .1s, transform .06s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--panel2); color: var(--text); }
.btn.danger { background: #3a1f24; color: var(--bad); }
.btn.good { background: #173322; color: var(--good); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.iconbtn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; transition: color .1s, border-color .1s; }
.iconbtn:hover { color: var(--text); border-color: var(--panel3); }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; }
.linkbtn:hover { color: var(--text); text-decoration: underline; }
.seg { display: inline-flex; background: var(--panel); border-radius: 9px; padding: 3px; border: 1px solid var(--line); }
.seg button { background: none; border: 0; color: var(--muted); padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: background .1s, color .1s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel3); color: var(--text); }
.seg.big button { padding: 7px 16px; font-size: 14px; font-weight: 600; }

/* ---------- home ---------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 5px 11px; border-radius: 999px; cursor: pointer; font-size: 13px; transition: all .1s; }
.chip:hover { color: var(--text); border-color: var(--panel3); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.chip .n { opacity: .55; margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text); transition: transform .12s var(--ease), border-color .12s; display: block; }
.card:hover { transform: translateY(-3px); border-color: var(--panel3); text-decoration: none; }
.collage { height: 128px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; background: var(--panel2); }
.collage div { background: var(--panel3) center/cover no-repeat; }
.collage.one div { grid-column: 1 / 3; grid-row: 1 / 3; background-size: contain; background-color: #f4f5f7; background-origin: content-box; padding: 10px; }
.collage.two div { grid-row: 1 / 3; }
.collage.empty { display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; color: var(--faint); }
.card .body { padding: 11px 13px 13px; }
.card .title { font-weight: 700; line-height: 1.25; }
.card .meta { display: flex; gap: 10px; margin-top: 6px; }
.cat { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 3px; }
.hot { color: var(--accent2); font-weight: 700; }
.empty { color: var(--muted); text-align: center; padding: 50px 0; }
.center { text-align: center; margin: 24px 0; }

/* ---------- board header ---------- */
.board-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.back { color: var(--muted); font-size: 13px; }
.back:hover { color: var(--text); text-decoration: none; }
.board-actions { display: flex; gap: 6px; }
.board-title { font-size: 30px; }
.board-desc { color: var(--muted); margin: 6px 0 0; max-width: 720px; }
.board-bar { display: flex; align-items: center; gap: 14px; margin: 20px 0 14px; flex-wrap: wrap; }
.board-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 6px var(--good); }
.asof-big { color: var(--warn); font-weight: 700; }
.warnbox { background: #3d3214; border: 1px solid #6b5520; color: #fde68a; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 10px 0; }

/* ---------- tier rows & tiles ---------- */
.tiers { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); transition: box-shadow .15s; }
.tiers.historic { box-shadow: 0 0 0 2px #fbbf2440; }
.row { display: flex; min-height: 92px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .label { width: 78px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #15161a; user-select: none; }
.drop { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; align-content: flex-start; min-height: 92px; transition: background .1s; }
.tile { width: 80px; height: 80px; border-radius: 7px; background: var(--panel3) center/cover no-repeat; position: relative; user-select: none; -webkit-user-select: none; display: flex; align-items: flex-end; overflow: hidden; flex-shrink: 0; }
.tile .name { width: 100%; font-size: 11px; line-height: 1.15; padding: 3px 4px; background: linear-gradient(transparent, #000d 45%); color: #fff; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
.tile.noimg { align-items: center; justify-content: center; background: #2b3142; }
.tile.noimg .name { background: none; font-size: 12px; font-weight: 600; }
.tile .badge { position: absolute; top: 3px; right: 3px; background: #000c; color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 4px; font-weight: 600; }
.tile .badge:empty { display: none; }
.tile .mine { position: absolute; top: 3px; left: 3px; font-size: 10px; padding: 1px 5px; border-radius: 4px; color: #111; font-weight: 800; }
.tile .pend { position: absolute; top: 3px; left: 3px; right: 3px; font-size: 9px; padding: 1px 3px; border-radius: 4px; background: var(--warn); color: #111; font-weight: 700; text-align: center; }
.tile .mv { position: absolute; bottom: 20px; right: 4px; font-size: 11px; text-shadow: 0 1px 2px #000; }
.tile .mv.up { color: var(--good); }
.tile .mv.down { color: var(--bad); }
.tiers.g .tile { cursor: pointer; transition: box-shadow .08s; }
.tiers.g .tile:hover { box-shadow: 0 0 0 2px var(--accent); }
.pool { margin-top: 10px; min-height: 96px; border: 1px dashed var(--panel3); border-radius: var(--r); padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.pool.g { border-style: solid; }
.g-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---------- ranking (drag & drop) ---------- */
.ranker .tile { cursor: grab; touch-action: none; transition: box-shadow .1s, opacity .1s; }
.ranker .tile:hover { box-shadow: 0 0 0 2px var(--panel3); }
.ranker .tile.sel { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px #7c9cff33; }
.ranker.picking .drop { cursor: pointer; }
.ranker.picking .drop:hover { background: #7c9cff10; }
.ranker .drop.over { background: #7c9cff12; }
.ranker .tile.placeholder { opacity: .25; box-shadow: inset 0 0 0 2px var(--accent); }
.ranker .tile.landed { animation: land .25s var(--ease); }
@keyframes land { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.tile.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: 0 14px 30px #000b; cursor: grabbing; will-change: transform; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none !important; }
.pool.empty::before { content: 'All items ranked'; color: var(--faint); font-size: 13px; margin: auto; }
/* unranked tray sticks to the bottom of the screen so every item is in reach of every tier */
.tray { position: sticky; bottom: 0; z-index: 10; margin-top: 14px; padding: 10px 12px; background: rgba(18,20,27,.94); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; box-shadow: 0 -10px 30px #0007; }
.tray-head { display: flex; align-items: baseline; gap: 10px; font-size: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.tray .pool { margin: 0; max-height: 196px; overflow-y: auto; border: 0; padding: 2px; min-height: 84px; }
.savebar { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.savebar.dirty #placedCount { color: var(--accent); }

/* ---------- timeline ---------- */
.timeline { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.timeline.past { border-color: #fbbf2455; }
.tl-play { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--panel3); color: var(--text); cursor: pointer; font-size: 11px; flex-shrink: 0; transition: background .1s, transform .06s; }
.tl-play:hover { background: var(--accent); color: #0b0d12; }
.tl-play:active { transform: scale(.92); }
.tl-track { position: relative; flex: 1; height: 30px; display: flex; align-items: center; }
.tl-track::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: var(--panel3); }
.tl-fill { position: absolute; left: 0; height: 4px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.timeline.past .tl-fill { background: var(--warn); }
.tl-track input[type=range] { position: relative; z-index: 1; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; -webkit-appearance: none; appearance: none; height: 30px; cursor: pointer; }
.tl-track input[type=range]::-webkit-slider-runnable-track { height: 30px; background: transparent; }
.tl-track input[type=range]::-moz-range-track { height: 4px; background: transparent; }
.tl-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: 7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0009; transition: transform .08s; }
.tl-track input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0009; }
.tl-track input[type=range]:active::-webkit-slider-thumb { transform: scale(1.2); }
.tl-date { min-width: 96px; text-align: right; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-date.past { color: var(--warn); }
.tl-live { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.tl-live:hover { border-color: var(--accent); }

/* ---------- popup ---------- */
.tip { position: fixed; z-index: 50; background: #12141b; border: 1px solid var(--panel3); border-radius: var(--r); padding: 12px; width: 250px; box-shadow: 0 14px 36px #000b;
  opacity: 0; visibility: hidden; transform: translateY(4px) scale(.98); transform-origin: var(--ax, 50%) 100%;
  transition: opacity .09s ease-out, transform .09s ease-out, visibility 0s linear .09s; will-change: transform, opacity; pointer-events: none; }
.tip.below { transform: translateY(-4px) scale(.98); transform-origin: var(--ax, 50%) 0; }
.tip.show { opacity: 1; visibility: visible; transform: none; transition: opacity .08s ease-out, transform .08s ease-out, visibility 0s; }
.tip.show.slide { transition: left .11s var(--ease), top .11s var(--ease), opacity .08s, transform .08s; }
.tip.show.interactive { pointer-events: auto; }
.tip::after { content: ''; position: absolute; left: var(--ax, 50%); bottom: -6px; width: 10px; height: 10px; background: #12141b; border-right: 1px solid var(--panel3); border-bottom: 1px solid var(--panel3); transform: translateX(-50%) rotate(45deg); }
.tip.below::after { bottom: auto; top: -6px; transform: translateX(-50%) rotate(225deg); }
.tip-bridge { position: fixed; z-index: 49; display: none; }
.tip .t-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.tip .t-img { width: 42px; height: 42px; border-radius: 6px; background: var(--panel3) center/cover; flex-shrink: 0; }
.tip .t-name { font-weight: 700; line-height: 1.2; }
.tip .asof { color: var(--warn); }
.hist { display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.hist .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.hist .bar { width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; }
.hist .pct { font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.hist-labels { display: flex; gap: 6px; margin-top: 4px; }
.hist-labels span, .hist-labels .tv { flex: 1; text-align: center; font-weight: 800; font-size: 12px; border-radius: 4px; color: #15161a; }
.hist-labels .tv { border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 3px 0; transition: transform .06s, box-shadow .06s, filter .06s; }
.hist-labels .tv:hover { transform: translateY(-2px); box-shadow: 0 3px 8px #0008; }
.hist-labels .tv:active, .hist-labels .tv.pressed { transform: scale(.92); filter: brightness(1.1); }
.hist-labels .tv.mine { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.hist-labels .tv:disabled { opacity: .6; cursor: wait; }
.tip .t-vote { margin-top: 6px; font-size: 12px; }
.tip .t-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tip .t-credit { margin-top: 8px; font-size: 10px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 6px; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .tip, .tip.show, .tip.show.slide { transition: none; } }

/* ---------- breakdown table ---------- */
.breakdown { margin-top: 18px; }
.breakdown summary, .credits summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; list-style: none; padding: 6px 0; user-select: none; }
.breakdown summary::-webkit-details-marker, .credits summary::-webkit-details-marker { display: none; }
.breakdown summary::before, .credits summary::before { content: '\25B8'; display: inline-block; margin-right: 6px; transition: transform .12s; }
.breakdown[open] summary::before, .credits[open] summary::before { transform: rotate(90deg); }
.breakdown summary:hover, .credits summary:hover { color: var(--text); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.dbar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; min-width: 160px; background: var(--panel2); }
.dbar span { display: block; height: 100%; }
.pill { display: inline-block; min-width: 24px; text-align: center; border-radius: 4px; color: #15161a; font-weight: 800; padding: 0 4px; }
.thumb { width: 32px; height: 32px; border-radius: 5px; background: var(--panel3) center/cover; display: inline-block; vertical-align: middle; margin-right: 8px; }
.credits { margin-top: 8px; color: var(--muted); font-size: 13px; }
.credits ul { columns: 2; column-gap: 24px; padding-left: 18px; }
.credits li { margin-bottom: 4px; break-inside: avoid; overflow-wrap: anywhere; }

/* ---------- suggestions ---------- */
.suggest { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.sg-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sg-head h2 { font-size: 18px; }
.sg-form { display: flex; gap: 8px; margin: 12px 0; max-width: 520px; }
.sg-list { display: flex; flex-direction: column; gap: 8px; }
.sg-item { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; flex-wrap: wrap; }
.sg-item .vote { flex-direction: column; gap: 0; }
.sg-main { flex: 1; min-width: 160px; }
.sg-bar { height: 4px; background: var(--panel3); border-radius: 2px; margin-top: 6px; overflow: hidden; max-width: 260px; }
.sg-bar span { display: block; height: 100%; background: var(--good); transition: width .2s var(--ease); }
.added { color: var(--good); font-weight: 600; }
.rejected { color: var(--bad); }

/* ---------- comments ---------- */
.discussion { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 8px; }
.composer { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; margin: 12px 0 18px; transition: border-color .1s; }
.composer:focus-within { border-color: var(--panel3); }
.composer textarea { background: transparent; border: 0; min-height: 64px; padding: 4px; }
.composer .bar2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.comment { display: flex; gap: 8px; margin-top: 12px; }
.comment .rail { display: flex; flex-direction: column; align-items: center; width: 22px; flex-shrink: 0; }
.comment .thread-line { flex: 1; width: 2px; background: var(--line); margin-top: 6px; cursor: pointer; border-radius: 2px; transition: background .1s; }
.comment .thread-line:hover { background: var(--accent); }
.comment .main { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.c-head .who { color: var(--text); font-weight: 600; }
.flair { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; }
.flair.op { background: #233158; color: var(--accent); }
.flair.mod { background: #1d3a26; color: var(--good); }
.flair.pending { background: #3d3214; color: var(--warn); }
.flair.hiddenf { background: #3a1f24; color: var(--bad); }
.c-body { margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-body.gone { color: var(--muted); font-style: italic; }
.c-actions { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.vote { display: inline-flex; align-items: center; gap: 4px; }
.vote button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 4px; line-height: 1; transition: background .08s, color .08s; }
.vote button:hover { background: var(--panel2); }
.vote button.up.on { color: var(--accent2); }
.vote button.down.on { color: var(--accent); }
.vote .score { font-weight: 700; color: var(--text); min-width: 18px; text-align: center; }
.c-actions .act { background: none; border: 0; color: var(--muted); cursor: pointer; font-weight: 600; padding: 2px 4px; border-radius: 4px; font-size: 12px; }
.c-actions .act:hover { background: var(--panel2); color: var(--text); }
.collapsed .c-body, .collapsed .c-actions, .collapsed .children, .collapsed .reply-box { display: none; }
.expand { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0; }
.notice { background: #233158; border: 1px solid #34478a; padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; margin: 10px 0; text-align: center; }

/* ---------- create ---------- */
.item-rows { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.item-row .ithumb { width: 46px; height: 46px; border-radius: 6px; background: var(--panel3) center/cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); text-align: center; }
.item-row input[type=text] { flex: 1; }
.item-row .st { font-size: 11px; width: 110px; flex-shrink: 0; }
.st.approved { color: var(--good); } .st.pending { color: var(--warn); } .st.error { color: var(--bad); }
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 0 16px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }

/* ---------- modal, toast, mod, footer ---------- */
.modal-bg { position: fixed; inset: 0; background: #000a; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .12s; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: 100%; max-width: 400px; position: relative; animation: pop .14s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.modal .x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.gbtn-wrap { display: flex; justify-content: center; margin: 18px 0 8px; min-height: 44px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 8px); background: var(--panel2); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; opacity: 0; transition: opacity .12s, transform .12s var(--ease); pointer-events: none; z-index: 70; max-width: 90vw; font-size: 14px; box-shadow: 0 8px 24px #0008; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: #6b2a32; color: #fecaca; }
.mod-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; display: flex; gap: 12px; }
.mod-item .mimg { width: 110px; height: 110px; border-radius: 8px; background: var(--panel3) center/contain no-repeat; flex-shrink: 0; }
.mod-item .mbody { flex: 1; min-width: 0; }
.mod-item .mbtns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; margin: 18px 0 14px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; color: var(--muted); padding: 10px 14px; cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.prose { max-width: 760px; }
.prose p, .prose li { line-height: 1.6; }
footer { max-width: 1120px; margin: 40px auto 0; padding: 20px 24px 40px; border-top: 1px solid var(--line); display: flex; gap: 18px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 700px) {
  header { padding: 10px 12px; } header .search { display: none; }
  main { padding: 16px; }
  .tile { width: 64px; height: 64px; }
  .row .label { width: 52px; font-size: 22px; }
  .row, .drop { min-height: 76px; }
  .form-grid { grid-template-columns: 1fr; }
  .credits ul { columns: 1; }
  h1, .board-title { font-size: 24px; }
  .tl-date { min-width: 0; }
}
