/* VoteDesk organiser app: cream and white, cocoa ink, bronze and gold. A sidebar app on desktop, a tab bar on phones. */
:root {
  --bg: #FBF6EC; --card: #FFFFFF; --soft: #F6ECD8; --soft2: #FDF9F1; --ink: #2B1F16; --muted: #7A6A58; --line: #EADFCB;
  --accent: #A8741A; --accent-ink: #7B5410; --gold: #D9A441; --cocoa: #2B1F16; --cream: #FBF6EC;
  --ok: #2E7D4F; --ok-bg: #E6F2EA; --warn: #A86B00; --warn-bg: #FFF2D9; --bad: #B3261E; --bad-bg: #FDE8E7;
  --r: 16px; --shadow: 0 1px 2px rgba(43,31,22,.05), 0 6px 20px rgba(43,31,22,.07); --lift: 0 10px 30px rgba(43,31,22,.14);
  --f: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #15110C; --card: #1F1913; --soft: #2A2118; --soft2: #1A150F; --ink: #F5EBDD; --muted: #B5A592; --line: #3A2E22;
  --accent: #E0AE55; --accent-ink: #F0C97F; --cocoa: #F5EBDD; --cream: #15110C; --ok-bg: #183324; --warn-bg: #3A2A0A; --bad-bg: #3B1614;
  --shadow: none; --lift: 0 10px 30px rgba(0,0,0,.5); color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #15110C; --card: #1F1913; --soft: #2A2118; --soft2: #1A150F; --ink: #F5EBDD; --muted: #B5A592; --line: #3A2E22; --accent: #E0AE55; --accent-ink: #F0C97F; --cocoa: #F5EBDD; --cream: #15110C; --shadow: none; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13.5px; }
svg { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* app shell */
.app { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.app.auth { grid-template-columns: 1fr; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--card); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 22px var(--serif); padding: 2px 8px 6px; }
.nav { display: grid; gap: 2px; }
.nav button, .tabbar button { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--muted); font: 600 14.5px var(--f); padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left; }
.nav button:hover { background: var(--soft2); color: var(--ink); }
.nav button[aria-current="page"] { background: var(--soft); color: var(--ink); }
.nav .count { margin-left: auto; font-size: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--soft2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--cocoa); color: var(--cream); font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me .who { min-width: 0; flex: 1; } .me b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me span { font-size: 12px; color: var(--muted); }
.iconbtn { border: 0; background: none; color: var(--muted); padding: 7px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.iconbtn:hover { background: var(--soft); color: var(--ink); }
.main { min-width: 0; padding: 26px clamp(16px, 3vw, 38px) 90px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar button { flex-direction: column; gap: 2px; font-size: 11.5px; padding: 6px 10px; }
.tabbar button[aria-current="page"] { color: var(--accent-ink); }
.tabbar .fab { background: var(--cocoa); color: var(--cream); border-radius: 14px; padding: 8px 14px; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; } .side { display: none; } .tabbar { display: flex; } .app.auth .tabbar { display: none; }
  .main { padding: 18px 16px 100px; }
}

/* building blocks */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 14.5px var(--f); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.btn.primary:hover { background: color-mix(in srgb, var(--cocoa) 85%, var(--gold)); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2B1F16; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.wa { background: #1FAF55; border-color: #1FAF55; color: #fff; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { background: var(--ok-bg); color: var(--ok); } .pill.live::before { animation: pulse 1.6s infinite; }
.pill.draft { background: var(--soft); color: var(--muted); } .pill.closed { background: var(--soft); color: var(--ink); } .pill.suspended { background: var(--bad-bg); color: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pill.live::before { animation: none; } * { transition: none !important; } }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: 12.5px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--soft2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, button:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 1px; }
.hint { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.hint.ok { background: var(--ok-bg); color: var(--ok); }
.hint.info { background: var(--soft); color: var(--ink); }
.loading { display: grid; place-items: center; min-height: 40vh; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--cocoa); color: var(--cream); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 60; max-width: calc(100vw - 32px); transition: all .2s ease; box-shadow: var(--lift); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20,14,8,.45); display: grid; place-items: center; padding: 16px; }
.sheet { background: var(--card); border-radius: 22px; box-shadow: var(--lift); width: min(860px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; }
@media (max-width: 640px) { .modal { place-items: end center; padding: 0; } .sheet { border-radius: 22px 22px 0 0; max-height: 92vh; } }
.pagehead { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead .grow p { margin-top: 4px; }
.crumbs { font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi b { font: 600 26px var(--serif); letter-spacing: -.01em; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.kpi.hl { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); } .kpi.hl span, .kpi.hl small { color: color-mix(in srgb, var(--cream) 75%, transparent); }

/* home */
.welcome { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 18px; }
.hero { background: linear-gradient(135deg, #2B1F16, #4A3420); color: #FBF6EC; border-radius: 22px; padding: 26px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.hero h1 { color: #FBF6EC; } .hero p { color: rgba(251,246,236,.8); max-width: 46ch; }
.hero .btn.gold { justify-self: start; }
.hero .deco { position: absolute; right: -20px; bottom: -30px; width: 190px; opacity: .25; }
.checklist { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); cursor: pointer; }
.check .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.check.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.done b { text-decoration: line-through; color: var(--muted); }
.check .tick svg { width: 14px; height: 14px; stroke-width: 3; }
.progress { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
@media (max-width: 900px) { .welcome { grid-template-columns: 1fr; } }

/* contest cards */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); display: grid; cursor: pointer; transition: transform .12s ease, box-shadow .15s ease; text-align: left; padding: 0; font: inherit; color: inherit; }
.ccard:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.ccover { aspect-ratio: 16/7; position: relative; display: grid; place-items: center; background: linear-gradient(135deg, var(--c, #A8741A), color-mix(in srgb, var(--c, #A8741A) 55%, #2B1F16)); }
.ccover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ccover .emoji { font-size: 40px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.ccover .pill { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); }
.ccover .pill.live { background: #E6F2EA; }
.cbody { padding: 14px 16px 16px; display: grid; gap: 8px; }
.cbody h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmeta { display: flex; gap: 14px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; } .cmeta b { color: var(--ink); }
.newcard { border: 2px dashed var(--line); border-radius: 20px; display: grid; place-items: center; gap: 8px; min-height: 230px; background: transparent; cursor: pointer; color: var(--muted); font: 600 15px var(--f); }
.newcard:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--soft2); }
.newcard .plus { width: 54px; height: 54px; border-radius: 16px; background: var(--soft); display: grid; place-items: center; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chipbtn { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font: 600 13.5px var(--f); color: var(--muted); cursor: pointer; }
.chipbtn[aria-pressed="true"] { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.empty { text-align: center; padding: 44px 20px; display: grid; gap: 12px; justify-items: center; }
.empty .art { width: 120px; }

/* template picker */
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.tpl { border: 1px solid var(--line); background: var(--soft2); border-radius: 16px; padding: 16px; text-align: left; cursor: pointer; display: grid; gap: 6px; font: inherit; color: inherit; transition: all .12s ease; }
.tpl:hover, .tpl:focus-visible { border-color: var(--accent); background: var(--card); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl .emoji { font-size: 30px; } .tpl b { font-size: 15px; } .tpl small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

/* builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 1150px) { .builder { grid-template-columns: 1fr; } .previewcol { display: none; } }
.steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 16px; scrollbar-width: none; }
.step { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 14px 7px 7px; font: 600 13.5px var(--f); color: var(--muted); cursor: pointer; white-space: nowrap; }
.step i { width: 24px; height: 24px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-style: normal; font-size: 12px; }
.step[aria-current="step"] { border-color: var(--cocoa); color: var(--ink); } .step[aria-current="step"] i { background: var(--cocoa); color: var(--cream); }
.step.done i { background: var(--ok); color: #fff; }
.savebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: 10px 0 12px; margin: -10px 0 8px; }
.saved { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.saved.dirty { color: var(--warn); } .saved.err { color: var(--bad); }
.section { display: grid; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; display: grid; gap: 6px; place-items: center; background: var(--soft2); transition: all .12s ease; position: relative; overflow: hidden; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--accent-ink); background: var(--card); }
.drop.banner { aspect-ratio: 16/6; padding: 0; } .drop.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop.banner .lbl { position: relative; background: rgba(255,255,255,.9); color: #2B1F16; padding: 7px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.drop input { display: none; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; background: var(--soft2); cursor: pointer; text-align: left; display: grid; gap: 4px; font: inherit; color: inherit; }
.choice b { font-size: 14.5px; display: flex; gap: 8px; align-items: center; } .choice small { color: var(--muted); font-size: 12.5px; }
.choice[aria-pressed="true"] { border-color: var(--cocoa); background: var(--card); box-shadow: inset 0 0 0 1px var(--cocoa); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.calc { background: var(--cocoa); color: var(--cream); border-radius: 16px; padding: 16px 18px; display: grid; gap: 8px; }
.calc .big { font: 600 28px var(--serif); } .calc span { color: color-mix(in srgb, var(--cream) 75%, transparent); font-size: 13.5px; }
.calc input[type=range] { padding: 0; background: none; border: 0; accent-color: var(--gold); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

/* categories and nominees (drag and drop) */
.cat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.cat.dragging { opacity: .5; }
.cathead { display: flex; gap: 8px; align-items: center; }
.cathead input.name { font: 600 17px var(--serif); background: transparent; border-color: transparent; padding: 6px 8px; }
.cathead input.name:hover, .cathead input.name:focus { background: var(--soft2); border-color: var(--line); }
.handle { cursor: grab; color: var(--muted); padding: 6px; border-radius: 8px; display: grid; place-items: center; touch-action: none; }
.handle:hover { background: var(--soft); color: var(--ink); }
.noms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; min-height: 60px; border-radius: 14px; }
.noms.over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.nom { background: var(--soft2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; position: relative; cursor: grab; }
.nom.dragging { opacity: .4; } .nom.drop-before { box-shadow: -4px 0 0 var(--accent); }
.nom .ph { aspect-ratio: 1; position: relative; background: linear-gradient(135deg, var(--soft), var(--soft2)); display: grid; place-items: center; font: 600 32px var(--serif); color: var(--accent); cursor: pointer; }
.nom .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nom .ph .up { position: absolute; bottom: 8px; right: 8px; background: rgba(255,255,255,.92); color: #2B1F16; border-radius: 99px; padding: 4px 9px; font: 600 11.5px var(--f); display: flex; gap: 4px; align-items: center; opacity: 0; transition: opacity .12s; }
.nom .ph .up svg { width: 13px; height: 13px; }
.nom:hover .ph .up, .nom .ph.empty .up { opacity: 1; }
.nom .ph.over { outline: 3px solid var(--accent); outline-offset: -3px; }
.nom .meta { padding: 8px; display: grid; gap: 4px; }
.nom input { padding: 6px 8px; border-radius: 8px; font-size: 13.5px; background: var(--card); }
.nom input.n { font-weight: 600; }
.nom .x { position: absolute; top: 6px; right: 6px; z-index: 2; background: rgba(255,255,255,.92); color: #2B1F16; border: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; opacity: 0; }
.nom:hover .x, .nom:focus-within .x { opacity: 1; }
@media (hover: none) { .nom .x, .nom .ph .up { opacity: 1; } }
.addnom { border: 2px dashed var(--line); border-radius: 14px; background: transparent; display: grid; place-items: center; gap: 4px; color: var(--muted); font: 600 13.5px var(--f); cursor: pointer; min-height: 150px; padding: 10px; text-align: center; }
.addnom:hover, .addnom.over { border-color: var(--accent); color: var(--accent-ink); background: var(--soft2); }
.addnom small { font-weight: 500; font-size: 11.5px; }
.catfoot { display: flex; gap: 8px; flex-wrap: wrap; }

/* phone preview */
.previewcol { position: sticky; top: 20px; display: grid; gap: 10px; justify-items: center; }
.phone { width: 300px; height: 600px; border-radius: 40px; background: #1A1410; padding: 11px; box-shadow: var(--lift); }
.screen { width: 100%; height: 100%; border-radius: 30px; overflow: auto; background: #FBF6EC; color: #2B1F16; scrollbar-width: none; font-size: 12px; }
.screen .pbanner { height: 110px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #2B1F16)); position: relative; display: grid; place-items: center; font-size: 34px; }
.screen .pbanner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .pin { padding: 12px; display: grid; gap: 8px; }
.screen h4 { margin: 0; font: 700 17px var(--serif); }
.screen .pprize { background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #2B1F16); border-radius: 10px; padding: 7px 9px; font-weight: 600; }
.screen .pcat { font: 700 13px var(--serif); margin-top: 6px; }
.screen .pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.screen .pnom { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #EADFCB; }
.screen .pnom .pph { aspect-ratio: 1; background: #F6ECD8; display: grid; place-items: center; font: 700 18px var(--serif); color: var(--c); position: relative; }
.screen .pnom .pph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .pnom b { display: block; padding: 5px 6px 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen .pvote { margin: 5px 6px 6px; background: var(--c); color: #fff; border-radius: 7px; text-align: center; padding: 4px; font-weight: 700; font-size: 10.5px; }

/* contest detail */
.dtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.dtab { border: 0; background: none; padding: 11px 14px; font: 600 14.5px var(--f); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.dtab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; } @media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
.board { display: grid; gap: 10px; }
.lb { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.lb .rk { font: 700 16px var(--serif); color: var(--muted); text-align: center; }
.lb .rk.r1 { color: #C08A1E; } .lb .rk.r2 { color: #8E8E8E; } .lb .rk.r3 { color: #A0612F; }
.lb .av { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-weight: 700; color: var(--accent); overflow: hidden; }
.lb .av img { width: 100%; height: 100%; object-fit: cover; }
.lb .nm { display: grid; gap: 5px; } .lb .nm b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent)); transition: width .5s ease; }
.lb .v { font: 600 16px var(--serif); text-align: right; } .lb .v small { display: block; font: 500 12px var(--f); color: var(--muted); }
.chart { width: 100%; height: 170px; } .chart path.area { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: none; } .chart path.line { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--f); } .chart line { stroke: var(--line); }
.feed { display: grid; gap: 2px; }
.feed .it { display: flex; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; } .feed .it:last-child { border-bottom: 0; }
.feed .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--soft2); }
tr:last-child td { border-bottom: 0; }
.sharegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.shareitem { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 10px; }
.shareitem .top { display: flex; gap: 10px; align-items: center; } .shareitem .top .av { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: var(--soft); display: grid; place-items: center; font-weight: 700; color: var(--accent); flex: none; }
.shareitem .top .av img { width: 100%; height: 100%; object-fit: cover; }
.linkbox { display: flex; gap: 6px; align-items: center; background: var(--soft2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; font-size: 13.5px; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.qr { background: #fff; padding: 10px; border-radius: 14px; display: inline-grid; border: 1px solid var(--line); } .qr img, .qr canvas { width: 150px !important; height: 150px !important; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }

/* auth */
.authwrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.authart { background: linear-gradient(160deg, #2B1F16, #4A3420 70%, #6B4A26); color: #FBF6EC; padding: 48px; display: grid; align-content: space-between; gap: 30px; position: relative; overflow: hidden; }
.authart h1 { color: #FBF6EC; font-size: clamp(30px, 3.4vw, 44px); max-width: 15ch; } .authart p { color: rgba(251,246,236,.78); max-width: 40ch; }
.authart ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; } .authart li { display: flex; gap: 10px; align-items: center; color: rgba(251,246,236,.9); }
.authart li svg { color: #D9A441; }
.authform { display: grid; place-items: center; padding: 32px 18px; }
.authform form { width: min(420px, 100%); display: grid; gap: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; padding: 9px; border-radius: 9px; font: 600 14px var(--f); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 860px) { .authwrap { grid-template-columns: 1fr; } .authart { padding: 28px 20px; } .authart ul, .authart .deco { display: none; } }
