/* Light theme. --accent is the bright gold for fills (buttons, bars); --accent-text is a deeper
   gold for words, because bright gold text on white is too faint to read (contrast 1.8:1). */
:root { --bg:#ffffff; --panel:#f4f3ef; --text:#111114; --dim:#5f5c66; --line:#e4e2dc; --accent:#ffb400; --accent-text:#9a6700; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.5 system-ui, sans-serif; }
.stage { margin:0; padding:6px 16px; background:var(--panel); color:var(--dim); font-size:13px; }
main { max-width:640px; margin:0 auto; padding:16px; }
h1 { font-size:28px; line-height:1.15; margin:.3em 0; } h2 { font-size:17px; margin:1.2em 0 .4em; }
a { color:var(--accent-text); }
.card { display:flex; gap:14px; align-items:center; padding:14px; margin:8px 0; background:var(--panel); border-radius:10px; color:var(--text); text-decoration:none; }
.code { font-weight:800; color:var(--accent-text); font-variant-numeric:tabular-nums; }
.code.big { font-size:22px; margin:0; }
.panel { background:var(--panel); border-radius:10px; padding:4px 14px 12px; margin:16px 0; }
.note { color:var(--dim); font-size:14px; }
.flash { background:#fff4d6; border-left:4px solid var(--accent); padding:10px 12px; border-radius:6px; }
audio, video { width:100%; margin:10px 0; border-radius:10px; }
label { display:block; margin:10px 0; font-size:14px; color:var(--dim); }
input, select, textarea { display:block; width:100%; padding:10px; margin-top:4px; border-radius:8px; border:1px solid #d4d2cc; background:#ffffff; color:var(--text); font:inherit; }
button, .button { display:inline-block; padding:11px 18px; margin:8px 0; border:0; border-radius:8px; background:var(--accent); color:#16130a; font:inherit; font-weight:700; text-decoration:none; cursor:pointer; }
button.quiet { background:#e8e6e0; color:var(--text); font-weight:500; } button:disabled { opacity:.5; }
table { width:100%; border-collapse:collapse; font-size:14px; } th, td { text-align:left; padding:8px 6px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--dim); font-weight:500; } tr.out { opacity:.45; } small { color:var(--dim); }
footer { text-align:center; color:var(--dim); font-size:12px; padding:24px; }
tr.on td { background:#fff4d6; } .now h2 { font-size:22px; margin:.2em 0; }
[hidden] { display:none !important; }
.meter { margin:10px 0; } .tally { margin:0 0 6px; font-size:15px; } .tally strong { font-size:26px; color:var(--accent-text); }
.bar { height:8px; background:#e8e6e0; border-radius:4px; overflow:hidden; } #fill { height:100%; width:0; background:var(--accent); transition:width .3s; }
.totals { margin:.3em 0 .8em; font-size:15px; } .totals strong { font-size:20px; }

/* Instagram-style header: action left, name centred, action right */
header.top { position:sticky; top:0; z-index:5; display:grid; grid-template-columns:64px 1fr 64px; align-items:center;
  padding:10px 12px; background:rgba(255,255,255,.94); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.brand { justify-self:center; font-weight:800; letter-spacing:.04em; color:var(--accent-text); text-decoration:none; font-size:20px; }
.icon-btn { display:flex; align-items:center; justify-content:center; width:44px; height:44px; color:var(--text); }
.join-link { justify-self:end; color:var(--accent-text); font-weight:700; text-decoration:none; }

/* Story-style circles that switch between the city and national competitions */
.stories { display:flex; justify-content:safe center; gap:18px; padding:6px 16px 12px; overflow-x:auto; border-bottom:1px solid var(--line); }
.story { display:flex; flex-direction:column; align-items:center; gap:6px; text-decoration:none; color:var(--text); flex:none; }
.story .ring { padding:3px; border-radius:50%; background:#d4d2cc; }
.story.on .ring { background:conic-gradient(from 210deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.story .disc { display:flex; align-items:center; justify-content:center; width:66px; height:66px; border-radius:50%;
  background:var(--panel); border:3px solid var(--bg); font-weight:800; font-size:17px; color:var(--accent-text); }
.story .label { font-size:13px; } .story.later .disc { color:var(--dim); }

/* Floating pill dock at the bottom */
body.has-dock { padding-bottom:96px; }
.dock { position:fixed; left:50%; bottom:calc(14px + env(safe-area-inset-bottom)); transform:translateX(-50%); z-index:6;
  display:flex; justify-content:space-between; width:min(92vw, 440px); padding:8px 10px; border-radius:999px;
  background:rgba(255,255,255,.9); backdrop-filter:blur(16px); border:1px solid var(--line); box-shadow:0 8px 30px rgba(0,0,0,.12); }
.dock a { display:flex; align-items:center; justify-content:center; width:56px; height:44px; border-radius:999px; color:var(--text); }
.dock a.on { background:rgba(0,0,0,.06); }
.dock a.on svg path, .dock a.on svg rect { fill:currentColor; fill-opacity:.15; }
a.stage { display:block; text-decoration:none; }
.searchbar input { border-radius:12px; padding:12px 14px; background:var(--panel); border-color:var(--line); }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 4px; }
.chip { padding:6px 12px; border-radius:999px; background:var(--panel); color:var(--text); text-decoration:none; font-size:14px; }
.card.out { opacity:.5; }

/* Shared bits for the desktop columns */
.avatar { display:inline-flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; border-radius:50%;
  background:var(--panel); border:1px solid #d4d2cc; color:var(--accent-text); font-weight:800; font-size:11px; text-decoration:none; }
.avatar.big { width:56px; height:56px; font-size:16px; }
button.link { background:none; color:#1d6fd8; padding:0; margin:0; font-weight:700; font-size:14px; }
.rail, .side, .share-pill { display:none; }

/* Mobile: header, circles and dock centred on the same column as the page */
header.top { max-width:640px; margin:0 auto; }
.stage { text-align:center; }

/* Desktop: Instagram's web layout. Icon rail on the left, the page in the middle, profile and suggestions on the right. */
@media (min-width: 900px) {
  body.has-dock { padding:0 0 0 76px; }
  body.has-dock header.top, body.has-dock .dock { display:none; }
  .rail { display:flex; flex-direction:column; align-items:center; gap:6px; position:fixed; inset:0 auto 0 0; width:76px;
    padding:22px 0; border-right:1px solid var(--line); background:var(--bg); z-index:7; }
  .rail a { display:flex; align-items:center; justify-content:center; width:52px; height:52px; border-radius:12px; color:var(--text); text-decoration:none; }
  .rail a:hover { background:#f0efe9; } .rail a.on svg path, .rail a.on svg rect { fill:currentColor; fill-opacity:.15; }
  .rail a > span:not(.avatar) { display:none; }
  .rail .rail-logo { font-size:30px; font-weight:900; color:var(--accent-text); margin-bottom:14px; }
  .rail a:last-child { margin-top:auto; }
  .wrap { display:flex; justify-content:center; gap:64px; padding:18px 24px 0; }
  .col { width:100%; max-width:630px; }
  .stories { justify-content:flex-start; border-bottom:0; padding-left:0; }
  .stage { text-align:left; border-radius:8px; }
  main { padding:16px 0; }
  .share-pill { display:flex; align-items:center; gap:12px; position:fixed; right:28px; bottom:24px; padding:14px 22px; border-radius:999px;
    background:#111114; color:#ffffff; text-decoration:none; font-size:17px; box-shadow:0 8px 30px rgba(0,0,0,.18); z-index:6; }
}
@media (min-width: 1160px) {
  .side { display:block; width:320px; flex:none; padding-top:18px; }
  .whoami { display:flex; align-items:center; gap:14px; margin-bottom:22px; }
  .whoami span:nth-child(2) { flex:1; } .whoami a, .side-head a { font-size:14px; font-weight:700; color:#1d6fd8; text-decoration:none; }
  .side-head { display:flex; justify-content:space-between; color:var(--dim); font-size:15px; }
  .suggest { display:flex; align-items:center; gap:12px; margin:14px 0; }
  .suggest .avatar { width:44px; height:44px; font-size:13px; }
  .suggest .who { flex:1; color:var(--text); text-decoration:none; font-size:14px; line-height:1.35; min-width:0; }
  .suggest form { margin:0; }
  .side-foot { color:var(--dim); font-size:12px; margin-top:26px; line-height:1.8; } .side-foot a { color:var(--dim); text-decoration:none; }
}
.note.demo { border-left:3px solid var(--accent); padding-left:10px; }
.note.demo a { color:var(--accent-text); font-weight:700; }

/* admin upload: license checkbox on one line with its text */
label.check { display:flex; gap:10px; align-items:flex-start; }
label.check input { width:auto; margin-top:4px; }
