/* Ralphthon DayDream board — same design system as the stage deck (ralphthon-slides/kit/engine/deck.css, design/DESIGN.md):
   black bar + neon #DFFF2F · cream body · white rounded cards · pixel labels · Geist. Mobile first. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/fonts/Silkscreen-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #111; --soft: #4a4a4a; --mute: #8a8780; --cream: #FDFAE8; --paper: #fff; --line: #e8e3cc;
  --neon: #DFFF2F; --peach: #ffb06c; --lilac: #af98ef; --sky: #8bc7fc; --rose: #fc9ea0; --mint: #7de290;
  --night: #000; --night-text: #f2f0e6; --night-soft: #cfccc1; --night-mute: #9c998f; --night-line: #2a2a2a;
  --sans: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", var(--sans);
  --mono: "Geist Mono", ui-monospace, monospace; --pixel: "Silkscreen", var(--mono);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; min-height: 100vh; font-size: 16px; line-height: 1.5; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; height: 52px; background: rgba(0,0,0,.92); color: var(--night-text); border-bottom: 1px solid var(--night-line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topbar a.brand { font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.topbar a.brand i { display: inline-block; width: 9px; height: 9px; background: var(--neon); margin-right: 9px; vertical-align: 0; }
.topbar nav { display: flex; gap: 14px; font-family: var(--mono); font-size: 13px; color: #a7a49a; }
.topbar nav a { text-decoration: none; } .topbar nav a.on { color: var(--night-text); }

/* hero */
.hero { background: var(--night); color: var(--night-text); padding: 30px 20px 34px; position: relative; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.hero > * { position: relative; }
.prompt { font-family: var(--pixel); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--neon); }
.prompt .cur { display: inline-block; width: 7px; height: 13px; background: var(--neon); vertical-align: -2px; margin-left: 6px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { font-weight: 400; font-size: 34px; line-height: 1.08; letter-spacing: -.03em; margin-top: 14px; text-wrap: balance; }
.hero h1 mark, h2 mark { background: var(--neon); color: #000; padding: 0 .1em; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero p { color: var(--night-soft); margin-top: 12px; font-size: 15px; max-width: 640px; }
.zh { display: block; font-family: var(--zh); color: var(--mute); font-size: .86em; margin-top: 2px; letter-spacing: 0; }
.hero .zh { color: var(--night-mute); }

.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 120px; }
.wide { max-width: 1200px; }
.label { font-family: var(--pixel); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
h2 { font-weight: 400; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; margin: 6px 0 14px; }
.k { display: inline-block; font-family: var(--pixel); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: 3px 11px; background: var(--neon); color: #111; }
.k.peach { background: var(--peach); } .k.sky { background: var(--sky); } .k.lilac { background: var(--lilac); } .k.rose { background: var(--rose); } .k.mint { background: var(--mint); } .k.gray { background: var(--line); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
.card + .card { margin-top: 14px; }
.note { color: var(--soft); font-size: 14px; }
.banner { border-radius: 18px; padding: 14px 16px; font-size: 14px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 14px; }
.banner.ok { background: #f3ffc4; border-color: #d4ef5a; }
.banner.bad { background: #fff0ef; border-color: #f7c5c3; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 16px; padding: 14px 22px; cursor: pointer; text-decoration: none; min-height: 50px; transition: transform .15s var(--ease), opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.neon { background: var(--neon); color: #000; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* form */
.field { margin-top: 18px; }
.field label { display: block; font-weight: 600; font-size: 15px; }
.field .hint { color: var(--mute); font-size: 13px; margin-top: 2px; }
.field input, .field textarea { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 13px 14px; font-size: 16px; outline: none; transition: border-color .15s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field .count { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--mute); margin-top: 4px; }
.drop { margin-top: 8px; border: 1.5px dashed #cfc9ad; border-radius: 18px; background: #fff; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 18px; cursor: pointer; position: relative; overflow: hidden; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; }
.drop .big { font-size: 30px; }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; font-size: 13px; }
.tips div { border-radius: 14px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); }
.tips b { display: block; font-family: var(--pixel); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }

/* gallery */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; background: #fff; font-size: 16px; outline: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.team { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; cursor: pointer; text-align: left; width: 100%; padding: 0; display: block; transition: transform .2s var(--ease); position: relative; }
.team:active { transform: scale(.985); }
.team .ph { aspect-ratio: 1 / 1; background: #eee9d2 center / cover no-repeat; }
.team .meta { padding: 10px 12px 13px; }
.team .meta b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; margin-top: 8px; line-height: 1.25; }
.team .meta p { color: var(--soft); font-size: 13px; line-height: 1.4; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.team.mine { outline: 3px solid var(--neon); outline-offset: -3px; }
.team .voted { position: absolute; top: 8px; left: 8px; }
@media (min-width: 760px) { .team .meta { padding: 14px 16px 16px; } .team .meta b { font-size: 19px; } .team .meta p { font-size: 14px; } }
.hero.slim { padding: 20px 20px 22px; } .hero.slim h1 { font-size: 27px; margin-top: 10px; } .hero.slim p { font-size: 14px; margin-top: 8px; }

/* detail sheet */
.sheet { position: fixed; inset: 0; z-index: 50; display: none; }
.sheet.on { display: block; }
.sheet .bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); animation: fade .25s var(--ease); }
.sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--cream); border-radius: 26px 26px 0 0; animation: up .35s var(--ease); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (min-width: 760px) { .sheet .panel { left: 50%; right: auto; width: 640px; transform: translateX(-50%); bottom: 4vh; border-radius: 26px; max-height: 90vh; animation: fade .25s var(--ease); } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #d8d2b8; margin: 10px auto 0; }
.sheet .x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; }
.sheet .hero-img { width: 100%; max-height: 52vh; object-fit: cover; background: #eee9d2; margin-top: 10px; }
.sheet .body { padding: 18px 18px 120px; }
.sheet .body h3 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 10px; }
.sheet .body .title { font-size: 17px; margin-top: 6px; color: var(--soft); }
.sheet .body .desc { white-space: pre-wrap; margin-top: 16px; font-size: 16px; line-height: 1.6; }
.sheet .body .gh { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.sheet .cta { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--cream) 30%); }

/* sticky my-vote bar */
.mybar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; background: #000; color: var(--night-text); border-radius: 999px; padding: 10px 10px 10px 18px; display: none; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 696px; margin: 0 auto; }
.mybar.on { display: flex; }
.mybar b { color: var(--neon); font-weight: 600; }
.mybar button { border: 0; background: #222; color: var(--night-text); border-radius: 999px; padding: 9px 14px; font-size: 13px; cursor: pointer; }

/* modal (email) */
.modal .panel { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }

/* toast */
.toast { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 80; background: #000; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; }

/* states */
.empty { text-align: center; color: var(--mute); padding: 50px 10px; }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--pixel); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); font-weight: 400; padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.n { font-family: var(--mono); text-align: right; white-space: nowrap; }
td input { width: 70px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; text-align: right; font-family: var(--mono); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; }
.stat .num { font-family: var(--mono); font-weight: 600; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.sw { position: relative; width: 52px; height: 30px; flex: none; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; background: #d8d2b8; border-radius: 999px; cursor: pointer; transition: background .2s; }
.sw span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s var(--ease); }
.sw input:checked + span { background: var(--ink); }
.sw input:checked + span::after { transform: translateX(22px); background: var(--neon); }
.bar { height: 8px; background: #efead3; border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.thumb { width: 54px; height: 40px; border-radius: 8px; object-fit: cover; background: #eee9d2; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rank1 td { background: #f7ffd0; }
