:root {
  --bg: #12171f;
  --bg-deep: #0c1016;
  --panel: #1b222c;
  --panel-2: #222b37;
  --line: #2c3644;
  --text: #e6ebf2;
  --muted: #8e9aab;
  --shrimp: #ff7a59;
  --shrimp-2: #ffa07a;
  --shrimp-deep: #e2553a;
  --sea: #3ec7c2;
  --danger: #ff5d6c;
  --gold: #ffd166;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 "Nunito", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--shrimp-2); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* Video background: cover the viewport at 16:9, dimmed so text stays readable. */
.bg-video { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-video iframe { position: absolute; top: 50%; left: 50%; width: 100vw; height: 56.25vw; min-width: 177.78vh; min-height: 100vh; transform: translate(-50%, -50%); border: 0; }
.bg-video::after { content: ""; position: absolute; inset: 0; background: rgba(12, 16, 22, .72); }

/* Header */
header.top { background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 22px "Fredoka", sans-serif; letter-spacing: .3px; }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand span b { color: var(--shrimp); }
.spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; font: 600 15px "Fredoka", sans-serif; border: 0; cursor: var(--cur-ptr); color: var(--text); }
.btn:disabled { opacity: .6; cursor: var(--cur); }
.btn-store { background: linear-gradient(180deg, var(--shrimp-2), var(--shrimp)); color: #2a0e05; box-shadow: 0 3px 0 var(--shrimp-deep); }
.btn-store:hover { filter: brightness(1.07); }
.btn-sea { background: var(--sea); color: #052322; box-shadow: 0 3px 0 #2a8f8b; }
.btn-discord { background: #5865f2; color: #fff; box-shadow: 0 3px 0 #3c45a5; width: 100%; margin-top: 4px; }
.btn-discord:hover { filter: brightness(1.08); }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill.open { background: rgba(62,199,194,.15); color: var(--sea); border-color: var(--sea); }
.pill.closed { color: var(--muted); }
.pill.queued, .pill.pending_close { background: rgba(255,209,102,.12); color: var(--gold); border-color: var(--gold); }
.pill.banned { background: rgba(255,93,108,.12); color: var(--danger); border-color: var(--danger); }
.notice { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; background: rgba(88,101,242,.12); border: 1px solid #5865f2; }
.notice.bad { background: rgba(255,93,108,.1); border-color: var(--danger); }
.notice.good { background: rgba(62,199,194,.1); border-color: var(--sea); }
.field select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; padding: 10px 12px; }
.grid-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid-table th, .grid-table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.grid-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; border-top: 0; }
.grid-table select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stats div { background: var(--panel); border-radius: var(--radius); padding: 14px 16px; }
.stats b { display: block; font: 700 26px "Fredoka", sans-serif; color: var(--shrimp); }
.stats span { color: var(--muted); font-size: 13px; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-line { background: var(--panel-2); border: 1px solid var(--line); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.user-chip .av { width: 30px; height: 30px; border-radius: 50%; background: var(--shrimp); color: #2a0e05; display: grid; place-items: center; font: 700 14px "Fredoka", sans-serif; }
.role { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 4px; background: var(--sea); color: #052322; text-transform: uppercase; }
nav.tabs { background: var(--bg-deep); }
nav.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 4px; overflow-x: auto; }
nav.tabs a { display: block; padding: 12px 16px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; white-space: nowrap; }
nav.tabs a:hover { color: var(--text); }
nav.tabs a.on { color: var(--text); border-color: var(--shrimp); }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(22,48,58,.55) 0%, rgba(18,23,31,.2) 100%); border-bottom: 1px solid var(--line); }
.hero .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.hero h1 { margin: 0 0 6px; font: 700 40px/1.1 "Fredoka", sans-serif; }
.hero h1 b { color: var(--shrimp); }
.hero p { margin: 0 0 18px; color: var(--muted); max-width: 520px; }
.ip { display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border: 1px dashed var(--sea); border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: var(--cur-ptr); color: var(--text); font-family: inherit; font-size: 15px; }
.ip small { color: var(--sea); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero .big-shrimp { width: 220px; height: 220px; flex: none; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
.bubbles span { position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(62,199,194,.5); animation: rise 9s linear infinite; }
@keyframes rise { to { transform: translateY(-340px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .big-shrimp, .bubbles span { animation: none; } }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding-top: 28px; padding-bottom: 40px; }
.head-row { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.head-row h2 { margin: 0; font: 600 28px "Fredoka", sans-serif; }
.crumbs { color: var(--muted); font-size: 14px; }
.crumbs a:hover { color: var(--text); }

/* Categories */
.cat { background: var(--panel); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.cat > summary, .cat-head { list-style: none; cursor: var(--cur-ptr); display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font: 600 17px "Fredoka", sans-serif; border-bottom: 3px solid var(--shrimp); background: var(--panel-2); }
.cat-head { cursor: var(--cur); }
.cat > summary::-webkit-details-marker { display: none; }
.cat > summary::after { content: "\25B4"; color: var(--muted); }
.cat:not([open]) > summary::after { content: "\25BE"; }
.node { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.cat > summary + .node, .cat-head + .node { border-top: 0; }
.node:hover { background: rgba(255,122,89,.05); }
.node .ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--panel-2); color: var(--shrimp); font-size: 19px; }
.node.hot .ico { background: var(--shrimp); color: #2a0e05; }
.node h3 { margin: 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.node p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.node .go { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; text-align: right; }
.node .go b { display: block; color: var(--text); font-size: 15px; }
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 700; vertical-align: 2px; background: var(--sea); color: #052322; }
.empty { padding: 24px 16px; color: var(--muted); text-align: center; }

/* Sidebar */
aside .card { background: var(--panel); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
aside h4 { margin: 0 0 10px; font: 600 15px "Fredoka", sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
aside .card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
aside .btn { width: 100%; }
.store-card { background: linear-gradient(160deg, #3a1d18, var(--panel) 70%); border: 1px solid rgba(255,122,89,.35); }
.store-card h4 { color: var(--shrimp-2); }
.links a { display: block; padding: 6px 0; color: var(--text); border-bottom: 1px solid var(--line); }
.links a:last-child { border-bottom: 0; }
.links a:hover { color: var(--shrimp-2); }
.toc { position: sticky; top: 16px; }

/* Rules document */
.doc { background: var(--panel); border-radius: var(--radius); padding: 24px 28px; min-width: 0; }
.doc h1 { margin: 0 0 8px; font: 700 32px "Fredoka", sans-serif; color: var(--shrimp); }
.doc h2 { margin: 32px 0 8px; padding-bottom: 6px; border-bottom: 3px solid var(--shrimp); font: 600 22px "Fredoka", sans-serif; scroll-margin-top: 16px; }
.doc h3 { margin: 24px 0 8px; font: 600 18px "Fredoka", sans-serif; color: var(--shrimp-2); scroll-margin-top: 16px; }
.doc p { color: var(--muted); }
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list li { padding: 12px 14px; margin: 8px 0; background: var(--panel-2); border-left: 3px solid var(--shrimp); border-radius: 6px; color: var(--gold); }
.rule-list strong { color: var(--shrimp-2); }
.doc a { color: var(--sea); text-decoration: underline; }
.table-scroll { overflow-x: auto; margin: 8px 0 16px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; min-width: 120px; }
.doc th { background: var(--panel-2); color: var(--shrimp-2); }
.doc td:first-child { font-weight: 700; white-space: nowrap; }

/* Forms & modal */
.field { display: block; margin-bottom: 12px; }
.field span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; padding: 10px 12px; }
.field textarea { min-height: 140px; resize: vertical; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 0 0 8px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog form { padding: 20px; }
dialog h3 { margin: 0 0 14px; font: 600 22px "Fredoka", sans-serif; }
.tabs-mini { display: flex; gap: 6px; margin-bottom: 16px; }
.tabs-mini button { flex: 1; }
.tabs-mini button.on { background: var(--shrimp); color: #2a0e05; }
.row { display: flex; gap: 8px; justify-content: flex-end; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }

/* Posts */
.post { display: grid; grid-template-columns: 140px minmax(0, 1fr); background: var(--panel); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.post .who { background: var(--panel-2); padding: 16px; text-align: center; font-weight: 700; overflow-wrap: anywhere; }
.post .who .av { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--shrimp); color: #2a0e05; display: grid; place-items: center; font: 700 24px "Fredoka", sans-serif; }
.post .msg { padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .when { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; white-space: normal; }

footer { border-top: 1px solid var(--line); background: var(--bg-deep); color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
footer a:hover { color: var(--text); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--sea); color: #052322; font-weight: 700; padding: 8px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .hero .big-shrimp { width: 130px; height: 130px; }
  .toc { position: static; }
}
@media (max-width: 560px) {
  .bar { height: 64px; gap: 6px; }
  .brand { font-size: 19px; }
  .brand svg { width: 36px; height: 36px; }
  .brand span { display: none; }
  .hide-sm { display: none; }
  .btn { padding: 0 12px; }
  .hero h1 { font-size: 30px; }
  .hero .big-shrimp { display: none; }
  .node .go { display: none; }
  .doc { padding: 18px 16px; }
  .post { grid-template-columns: 1fr; }
  .post .who { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 16px; }
  .post .who .av { width: 32px; height: 32px; margin: 0; font-size: 15px; }
}

/* Shrimp cursor (antenna tip is the hotspot); pointer variant is lighter. */
:root { --cur: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 64 64"%3E%3Cg transform="translate%2864 0%29 scale%28-1 1%29" stroke="%2312171f" stroke-width="3" stroke-linejoin="round"%3E%3Cpath d="M46 10c-14-2-30 6-34 20-3 10 3 20 13 22 6 1 11-1 14-5-5 1-10-1-12-5-3-6 1-13 8-15 7-2 14 1 17 7 2-8-1-19-6-24z" fill="%23ff7a59"/%3E%3Cpath d="M48 12c6-6 10-8 14-8M47 14c7-2 11-1 15 2" fill="none"/%3E%3C/g%3E%3Cg transform="translate%2864 0%29 scale%28-1 1%29"%3E%3Cpath d="M48 12c6-6 10-8 14-8M47 14c7-2 11-1 15 2" stroke="%23ffa07a" stroke-width="1.8" fill="none" stroke-linecap="round"/%3E%3Cpath d="M20 26c2 3 2 7 0 10M27 21c3 4 3 10 0 14M35 19c3 5 3 11 0 16" stroke="%23e2553a" stroke-width="2.5" fill="none" stroke-linecap="round"/%3E%3Ccircle cx="44" cy="17" r="2.6" fill="%2312171f"/%3E%3C/g%3E%3C/svg%3E') 2 4, auto; --cur-ptr: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 64 64"%3E%3Cg transform="translate%2864 0%29 scale%28-1 1%29" stroke="%2312171f" stroke-width="3" stroke-linejoin="round"%3E%3Cpath d="M46 10c-14-2-30 6-34 20-3 10 3 20 13 22 6 1 11-1 14-5-5 1-10-1-12-5-3-6 1-13 8-15 7-2 14 1 17 7 2-8-1-19-6-24z" fill="%23ffd166"/%3E%3Cpath d="M48 12c6-6 10-8 14-8M47 14c7-2 11-1 15 2" fill="none"/%3E%3C/g%3E%3Cg transform="translate%2864 0%29 scale%28-1 1%29"%3E%3Cpath d="M48 12c6-6 10-8 14-8M47 14c7-2 11-1 15 2" stroke="%23ffa07a" stroke-width="1.8" fill="none" stroke-linecap="round"/%3E%3Cpath d="M20 26c2 3 2 7 0 10M27 21c3 4 3 10 0 14M35 19c3 5 3 11 0 16" stroke="%23e2553a" stroke-width="2.5" fill="none" stroke-linecap="round"/%3E%3Ccircle cx="44" cy="17" r="2.6" fill="%2312171f"/%3E%3C/g%3E%3C/svg%3E') 2 4, pointer; }
html { cursor: var(--cur); }
a, button, summary, select, label, [role="button"] { cursor: var(--cur-ptr); }
input, textarea { cursor: text; }
