:root {
  --bg: #0a0a0b; --panel: #141416; --panel2: #1b1b1e; --line: #2a2a2e;
  --text: #f4f4f5; --muted: #9a9aa2; --red: #e11d2e; --red2: #ff3b4a; --redglow: rgba(225,29,46,.35);
  --good: #3ddc84; --mid: #f5b73b; --bad: #ff4d5a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(1200px 500px at 50% -200px, rgba(225,29,46,.18), transparent), var(--bg);
  color: var(--text); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(10,10,11,.8); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.brand b { color: var(--red2); font-weight: 900; }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--red); box-shadow: 0 0 20px var(--redglow); font-size: 16px; }

.btn { border: 1px solid var(--line); background: var(--panel2); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: .15s; }
.btn:hover { border-color: #444; background: #232327; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 20px var(--redglow); }
.btn.primary:hover { background: var(--red2); border-color: var(--red2); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 0 0 10px; letter-spacing: -.035em; font-weight: 900; }
.hero h1 span { color: var(--red2); }
.hero p { color: var(--muted); margin: 0; font-size: 16px; max-width: 560px; }

.controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 20px; }
.input, select, textarea { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 14px; outline: none; transition: border-color .15s; }
.input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,29,46,.18); }
.controls .input { flex: 1; min-width: 200px; }
select option { background: var(--panel); }
.count { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; transition: .15s; }
.card:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--redglow); }
.card .info { flex: 1; min-width: 0; }
.card .name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .role { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .meta { color: var(--muted); font-size: 12px; margin-top: 8px; display: flex; gap: 12px; }
.card .meta b { color: var(--text); font-weight: 600; }

.avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-weight: 800; font-size: 16px;
  background: linear-gradient(135deg, #3a0d12, #1a1a1d); border: 1px solid #4a1a20; color: #ffb3ba; }
.avatar.lg { width: 72px; height: 72px; border-radius: 20px; font-size: 26px; }

.score { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; font-weight: 800; font-size: 20px; color: #0a0a0b; letter-spacing: -.02em; }
.score.good { background: var(--good); } .score.mid { background: var(--mid); } .score.bad { background: var(--bad); }
.score.none { background: var(--panel2); color: var(--muted); font-size: 13px; font-weight: 600; border: 1px dashed #3a3a40; }
.score.lg { width: 112px; height: 112px; border-radius: 26px; font-size: 44px; }

/* detail */
.back { display: inline-block; margin: 28px 0 16px; color: var(--muted); font-size: 14px; font-weight: 500; }
.back:hover { color: var(--red2); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.t-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.t-head h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; font-weight: 800; }
.t-head .role { color: var(--muted); margin-top: 4px; }
.t-head .grow { flex: 1; min-width: 200px; }
.stats { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.overall { display: flex; gap: 18px; align-items: center; }
.overall .lbl { color: var(--muted); font-size: 13px; }
.overall .big { font-size: 13px; margin-top: 4px; color: var(--muted); }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--red), var(--red2)); }
.bar-row b { text-align: right; font-weight: 700; }
.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pill { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.pill b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.pill span { color: var(--muted); font-size: 12px; }
.dist { display: grid; gap: 6px; margin-top: 22px; }
.dist .bar-row { grid-template-columns: 24px 1fr 28px; font-size: 12px; color: var(--muted); }

.rev-head { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 14px; flex-wrap: wrap; gap: 10px; }
.rev-head h3 { margin: 0; font-size: 20px; }
.reviews { display: grid; gap: 12px; margin-bottom: 40px; }
.review { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 16px; }
.review .score { width: 52px; height: 52px; }
.review .top-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review .course { font-weight: 700; }
.review .date { color: var(--muted); font-size: 12px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.tag b { color: var(--text); }
.tag.yes { color: var(--good); border-color: rgba(61,220,132,.35); } .tag.no { color: var(--bad); border-color: rgba(255,77,90,.35); }
.comment { margin: 6px 0 0; line-height: 1.55; color: #dcdce0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nocomment { color: var(--muted); font-style: italic; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.act { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--muted); transition: .15s; }
.act:hover { color: var(--text); border-color: #555; }
.act.on { color: #fff; background: var(--red); border-color: var(--red); }
.act.report { margin-left: auto; }
.act.report.on { background: transparent; color: var(--muted); border-color: var(--line); cursor: default; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; border: 1px dashed var(--line); border-radius: 16px; }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); display: grid; place-items: start center; overflow-y: auto; padding: 30px 14px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 30px 80px -20px #000, 0 0 60px -30px var(--redglow); animation: pop .18s; }
.modal h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.modal .sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.field { margin-bottom: 18px; }
.field > label, .field > .lab { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.field > label small, .field > .lab small { color: var(--muted); font-weight: 400; }
.field .input, .field select, .field textarea { width: 100%; }
textarea { resize: vertical; min-height: 96px; }
.counter { text-align: right; font-size: 11px; color: var(--muted); margin-top: 4px; }
.rate-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rate-row:last-child { border: 0; }
.rate-row span { font-size: 14px; }
.stars { display: flex; gap: 4px; }
.stars button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; font-size: 14px; color: var(--muted); transition: .12s; }
.stars button:hover { border-color: var(--red); color: var(--text); }
.stars button.fill { background: var(--red); border-color: var(--red); color: #fff; }
.scale-note { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.yn { display: flex; gap: 10px; }
.yn button { flex: 1; padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-weight: 600; }
.yn button.sel { background: var(--red); border-color: var(--red); color: #fff; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.foot { color: #5f5f66; font-size: 12px; text-align: center; padding: 30px 20px 40px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--text); color: #000; font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98) } }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .review { grid-template-columns: 1fr; }
  .review .score { width: 46px; height: 46px; font-size: 17px; }
  .bar-row { grid-template-columns: 96px 1fr 30px; }
  .stars button { width: 32px; height: 32px; }
}

.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.top-actions, #auth-slot { display: flex; gap: 8px; align-items: center; }
.ts-box { min-height: 65px; margin-bottom: 8px; }
.code-input { font-size: 28px; letter-spacing: .4em; text-align: center; font-weight: 700; }
.tabs { display: flex; gap: 8px; }
.tab { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tab.on { background: var(--red); border-color: var(--red); color: #fff; }
.admin-stats { grid-template-columns: repeat(5, 1fr); margin-top: 0; }
.admin-row .actions { flex-wrap: wrap; }
@media (max-width: 720px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } .top-actions .btn { padding: 9px 12px; } }

.top-in { gap: 16px; }
.nav { display: flex; gap: 4px; margin-right: auto; margin-left: 18px; }
.nav a { padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--muted); transition: .15s; }
.nav a:hover { color: var(--text); }
.nav a.on { background: rgba(225,29,46,.16); color: var(--red2); }
.lb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px; align-items: start; }
.lb h3 { margin: 0 0 2px; font-size: 20px; }
.lb .count { margin: 0 0 14px; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel2); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; transition: .15s; }
.lb-row:hover { border-color: var(--red); }
.lb-row .avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 13px; }
.rank { width: 26px; text-align: center; font-weight: 800; color: var(--muted); }
.rank.r1 { color: #ffd34d; } .rank.r2 { color: #cfd3da; } .rank.r3 { color: #e0955a; }
.lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-info b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-info small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-val { font-weight: 800; font-size: 18px; color: var(--good); }
.lb-val.bad { color: var(--bad); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 720px) { .lb-cols { grid-template-columns: 1fr; } .nav { margin-left: 4px; } .nav a { padding: 7px 10px; } .brand span:last-child { display: none; } }

/* ===== v2 additions ===== */
.lnk { color: var(--red2); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; line-height: 1.5; }
.hint a { color: var(--red2); }
.sm { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 6px; }
.grow { flex: 1; min-width: 0; }
.block { display: block; margin-top: 2px; }
.you { margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--red2); background: rgba(225,29,46,.14); padding: 2px 8px; border-radius: 99px; }
.review.own { border-color: rgba(225,29,46,.45); }
.btn.danger { background: #7a1018; border-color: #a31826; color: #fff; }
.btn.danger:hover { background: #a31826; }
.btn.icon { padding: 9px; width: 40px; height: 40px; display: grid; place-items: center; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 8px; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }

/* header */
.top-in { gap: 14px; }
.nav { flex: 1; min-width: 0; display: flex; gap: 2px; margin: 0 0 0 10px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; }
.top-actions { flex: none; }

/* site banner + rank icons */
.site-banner { font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-banner .sb-in { display: flex; align-items: center; gap: 12px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.site-banner.info { background: #3a0d12; color: #ffd5d9; }
.site-banner.warning { background: #4a3406; color: #ffe3a3; }
.site-banner.alert { background: var(--red); color: #fff; }
.sb-msg { flex: 1; line-height: 1.4; overflow-wrap: anywhere; }
.staff-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.staff-chip b { font-weight: 700; font-size: 13.5px; }
.staff-pfp { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: #2a0e12; border: 1px solid rgba(255,255,255,.18); font-size: 11px; font-weight: 800; color: #ffb3ba; flex: none; }
.staff-pfp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.staff-chip.sm .staff-pfp { width: 24px; height: 24px; font-size: 10px; }
.staff-chip.lg .staff-pfp { width: 64px; height: 64px; font-size: 20px; }
.staff-chip.lg b { font-size: 18px; }
.rank-icon { position: relative; cursor: help; font-size: 15px; line-height: 1; outline: none; }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); background: #000; color: #fff; border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: .12s; z-index: 70; }
.tip:hover::after, .tip:focus::after { opacity: 1; transform: translateX(-50%); }

/* settings menu */
.menu-wrap { position: relative; }
.menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 8px; z-index: 40; }
.menu-wrap:hover .menu, .menu-wrap.open .menu, .menu-wrap:focus-within .menu { display: block; }
.menu-card { min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 20px 50px -10px #000; }
.menu-head { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.menu-head small { color: var(--muted); font-weight: 400; font-size: 12px; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; }
.menu-item:hover { background: var(--panel2); }
.menu-item.danger { color: var(--bad); }

/* announcements, guidelines */
.announce.pinned { border-color: rgba(225,29,46,.5); }
.a-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.a-head .date { color: var(--muted); font-size: 12px; }
.announce h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.02em; }
.a-body { margin: 0; line-height: 1.6; color: #dcdce0; white-space: pre-wrap; overflow-wrap: anywhere; }
.announce-form .field { margin-bottom: 12px; }
.g-sec { margin-bottom: 14px; }
.g-sec h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.02em; }
.g-sec p { color: #dcdce0; line-height: 1.6; margin: 0 0 10px; }
.g-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 9px; color: #dcdce0; line-height: 1.55; }
.g-sec li::marker { color: var(--red2); }
.foot-links { margin: 20px 0 40px; }
.foot a { color: var(--muted); text-decoration: underline; }
.foot a:hover { color: var(--red2); }

/* modal tweaks */
.modal.wide { max-width: 820px; }
.g-box { margin-bottom: 4px; }

/* tier list */
.tl-board { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); margin-bottom: 16px; }
.tl-row { display: flex; border-bottom: 1px solid #000; }
.tl-row:last-child { border-bottom: 0; }
.tl-label { flex: none; width: 82px; display: grid; place-items: center; font-weight: 900; font-size: 30px; color: #111; }
.tl-zone { flex: 1; min-height: 96px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 8px; background: #151518; transition: background .12s; }
.tl-zone.hot { background: #2a1013; box-shadow: inset 0 0 0 2px var(--red); }
.tl-tray { min-height: 96px; background: var(--panel2); border-radius: 12px; border: 1px dashed #3a3a40; }
.tl-empty { color: var(--muted); font-size: 13px; align-self: center; padding: 0 8px; }
.tl-chip { position: relative; width: 80px; height: 80px; border-radius: 10px; overflow: hidden; background: #26262b; border: 1px solid #3a3a40; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; flex: none; }
.tl-chip img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tl-chip.noimg { display: grid; place-items: center; background: linear-gradient(135deg, #3a0d12, #1a1a1d); }
.tl-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 3px 3px; font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.1; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.tl-chip.noimg .tl-name { position: static; background: none; padding: 4px; white-space: normal; font-size: 12px; color: #ffb3ba; }
.tl-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.75); color: #fff; font-size: 14px; line-height: 1; display: none; place-items: center; padding: 0; }
.tl-chip:hover .tl-x { display: grid; }
@media (hover: none) { .tl-x { display: grid; } }
.tl-chip.dragging { opacity: .25; }
.tl-ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: .92; box-shadow: 0 14px 34px rgba(0,0,0,.6); transform-origin: top left; }
body.tl-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.tl-pool-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tl-pool-head h3 { margin: 0; }
.tl-results { margin-top: 10px; max-height: 260px; overflow-y: auto; display: grid; gap: 4px; padding-right: 4px; }
.tl-res { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel2); border: 1px solid transparent; border-radius: 10px; padding: 7px 10px; }
.tl-res:hover:not(:disabled) { border-color: var(--red); }
.tl-res.added { opacity: .5; cursor: default; }
.tl-res .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.tl-res-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-res-info small { color: var(--muted); font-size: 12px; }
.tl-add { font-size: 13px; font-weight: 700; color: var(--red2); }

/* admin */
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 30px 0 14px; }
.adm-head h1 { margin: 0; font-size: 32px; letter-spacing: -.03em; font-weight: 900; }
.adm-tabs { flex-wrap: wrap; margin-bottom: 16px; }
.adm-panel { margin-bottom: 14px; }
.adm-panel h3 { margin: 0 0 12px; font-size: 18px; }
.adm-panel h4 { margin: 14px 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.admin-stats.six { grid-template-columns: repeat(6, 1fr); }
.tag.linkish { cursor: pointer; font: inherit; font-size: 12px; }
.tag.linkish:hover { color: var(--text); border-color: var(--red); }
.user-list { display: grid; gap: 6px; margin-bottom: 40px; }
.user-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.user-row:hover { border-color: var(--red); }
.user-row small { color: var(--muted); }
.audit-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.audit-row:last-child { border: 0; }
.audit-row small { color: var(--muted); }
.audit-row code { background: var(--panel2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: 12px; color: var(--red2); }
.prof { display: flex; align-items: center; gap: 16px; margin: 14px 0 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col.tight { gap: 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.hbars { display: grid; gap: 8px; }
.bar-row.wide { grid-template-columns: 120px 1fr 40px; font-size: 13px; }
.bar-row.wide span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border: 0; }
.toggle-row p { margin: 4px 0 0; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--panel2); border: 1px solid #3a3a40; border-radius: 99px; cursor: pointer; transition: .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #aaa; transition: .15s; }
.switch input:checked + span { background: var(--red); border-color: var(--red); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.backup-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.backup-row:last-child { border: 0; }
.backup-row small { color: var(--muted); }

@media (max-width: 720px) {
  .admin-stats.six { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .tl-label { width: 54px; font-size: 22px; }
  .tl-chip { width: 66px; height: 66px; }
  .nav { margin-left: 2px; }
  .top-in { gap: 8px; }
  .top-actions .btn:not(.icon) { padding: 9px 12px; font-size: 13px; }
  .staff-chip b { font-size: 12.5px; }
}

/* ===== v3 additions ===== */
img.logo { display: block; width: auto; height: 40px; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 0 10px rgba(225,29,46,.35)); }
.brand { gap: 10px; white-space: nowrap; }
.admin-stats, .admin-stats.six { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }
.site-banner { border-bottom: 1px solid rgba(255,255,255,.08); }
.site-banner .sb-in { min-height: 38px; }

/* settings dot + menu badge */
.btn.icon { position: relative; }
.dot { position: absolute; right: 4px; bottom: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--red2); border: 2px solid var(--bg); box-shadow: 0 0 8px var(--redglow); }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 8px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; text-align: center; }

/* notifications */
.notif { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.notif.unread { border-color: rgba(225,29,46,.55); box-shadow: inset 3px 0 0 var(--red); }
.n-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; font-size: 19px; }
.n-text { font-weight: 600; line-height: 1.45; }
.n-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.n-why { margin-top: 8px; padding: 9px 12px; background: var(--panel2); border-radius: 10px; font-size: 13.5px; color: #dcdce0; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.n-why b { color: var(--muted); font-weight: 600; margin-right: 6px; }
.n-foot { margin-top: 8px; text-align: right; }
.tiny-btn { background: none; border: 0; color: var(--muted); font-size: 11.5px; text-decoration: underline; padding: 2px 0; }
.tiny-btn:hover { color: var(--red2); }

/* frozen reviews */
.tag.frozen { color: #8fd3ff; border-color: rgba(143,211,255,.4); background: rgba(143,211,255,.08); }
.frozen-note { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: rgba(143,211,255,.07); border: 1px solid rgba(143,211,255,.35); color: #cfeaff; font-size: 14px; line-height: 1.5; }
.frozen-note .staff-chip b { color: #fff; }
.t-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* feedback + staff views */
.fb { display: grid; gap: 8px; }
.fb-msg { margin: 6px 0 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: #dcdce0; }
.fb-ref { margin: 8px 0 0; padding: 7px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: 12.5px; }
.fb-reply { margin: 8px 0 0; padding: 8px 12px; background: var(--panel2); border-radius: 10px; font-size: 13.5px; }
.sec-note { color: var(--muted); font-size: 12.5px; margin: -4px 0 10px; }
.arch { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.arch .comment { margin-top: 6px; }
.hist-row { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.hist-row:last-child { border: 0; }
.hist-row small { color: var(--muted); }
.hist-row code { background: var(--panel); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: 11.5px; color: var(--red2); }
.modal select, .modal textarea { width: 100%; }

@media (max-width: 720px) {
  img.logo { height: 34px; }
  .notif { grid-template-columns: 1fr; }
  .n-ico { display: none; }
}

.g-sub { margin: 18px 0 8px; font-size: 15px; color: var(--red2); letter-spacing: -.01em; }
.g-sec h4.g-sub:first-of-type { margin-top: 6px; }

/* ===== v4 additions ===== */
.frozen-note.silent { background: rgba(245,183,59,.07); border-color: rgba(245,183,59,.4); color: #ffe3a3; }
.flag-box { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,77,90,.07); border: 1px solid rgba(255,77,90,.35); font-size: 13.5px; display: grid; gap: 6px; line-height: 1.5; }
.flag-box small { color: var(--muted); }
.inc-reviews { margin: 10px 0; }
.inc-reviews summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--red2); }
.toggle-row select { flex: none; width: auto; max-width: 260px; }

.adm-panel .top-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.adm-panel .top-line .date { color: var(--muted); font-size: 12px; }

/* ===== v5: exports + saved tier lists ===== */
.tl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-status { margin: -4px 0 12px; font-size: 12.5px; color: var(--muted); }
.tl-status .tiny-btn { color: var(--red2); font-size: 12.5px; }

/* ===== phones: the page links get their own full-width row under the logo and buttons ===== */
@media (max-width: 720px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; row-gap: 8px; justify-content: space-between; }
  .nav { order: 3; flex: 0 0 auto; width: calc(100% + 40px); margin: 0 -20px; padding: 0 20px; gap: 2px; justify-content: space-between; }
  .nav a { padding: 7px 6px; font-size: clamp(11.5px, 3.3vw, 13.5px); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 116px 1fr 30px; }
  .tl-zone { min-height: 80px; }
  .tl-pool-head { flex-wrap: wrap; gap: 10px; }
  .hero { padding: 30px 0 20px; }
  .panel { padding: 18px; }
  .modal { padding: 20px; }
  .overlay { padding: 16px 10px; }
  .input, select, textarea { font-size: 16px; } /* below 16px, iPhones zoom the page in when a field is tapped */
  .stars { gap: 6px; }
  .stars button { flex: 1; width: auto; height: 44px; font-size: 16px; }
  .rate-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; }
  .toast { width: max-content; max-width: calc(100vw - 28px); text-align: center; }
  .modal-actions { flex-wrap: wrap; }
}
.tl-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.tl-pick button { aspect-ratio: 1; border: 0; border-radius: 12px; font-weight: 900; font-size: 22px; color: #111; }
.tl-pick button:hover { filter: brightness(1.12); }
.tl-pool .input { width: 100%; }
/* Touch screens: the settings menu opens and closes by tapping only (hover and focus would leave it stuck open). */
@media (hover: none) {
  .menu-wrap:hover .menu, .menu-wrap:focus-within .menu { display: none; }
  .menu-wrap.open .menu { display: block; }
}
@media (max-width: 720px) { .menu { position: fixed; right: 12px; top: 50px; max-width: calc(100vw - 24px); } }
select, .input, textarea { max-width: 100%; }
@media (max-width: 720px) {
  .lb-cols { grid-template-columns: minmax(0, 1fr); }
  .tabs { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .toggle-row:has(> select) { flex-direction: column; align-items: stretch; gap: 10px; }
  .toggle-row > select { width: 100%; }
}
.lb-list { grid-template-columns: minmax(0, 1fr); }
