/* Extracted unchanged from the prototype site/conference.html. */
/* Conference registration: one question at a time, progress on top, ChuoLink dark theme with a light switch. */
:root {
  color-scheme: dark;
  --bg: #0D0D0D; --surface: #151415; --surface-2: #1E1D1E; --ink: #F2F2F2; --text: #DEDEDE; --muted: #A3A3A3; --faint: #737373;
  --line: #262526; --line-strong: #333333; --accent: #F4C644; --accent-2: #FFDE69; --accent-soft: rgba(244,198,68,.12); --accent-text: #F4C644;
  --hard: #F9F6E0; --good: #5BD38D; --good-soft: rgba(91,211,141,.14); --bad: #FF7A6B; --link: #F4C644; --glass: rgba(13,13,13,.86);
  --display: 'Bricolage Grotesque', 'Arial Black', Arial, sans-serif; --body: 'DM Sans', 'Segoe UI', Roboto, Arial, sans-serif; --mono: 'Space Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2,0,0,1);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ECECEF; --surface: #FFFFFF; --surface-2: #F4F4F6; --ink: #141418; --text: #2B2B31; --muted: #62626B; --faint: #8A8A93;
  --line: #E6E6EA; --line-strong: #D4D4DA; --accent: #F6C028; --accent-2: #FFD24A; --accent-soft: rgba(246,192,40,.16); --accent-text: #8A6100;
  --hard: #141418; --good: #16804A; --good-soft: #DDF3E6; --bad: #C23A2C; --link: #1D3FD6; --glass: rgba(236,236,239,.88);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: #F4C644; color: #111; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 17px/1.55 var(--body); -webkit-text-size-adjust: 100%; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; color: var(--ink); margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 8px; }

/* Brand lockup, progress and theme switch (no nav bar) */
.theme { position: fixed; top: 18px; right: 18px; z-index: 20; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--link); display: grid; place-items: center; cursor: pointer; }
.theme svg { width: 18px; height: 18px; }
.theme:hover { border-color: var(--accent); }
.brand { display: grid; justify-items: center; gap: 10px; padding: 44px 20px 0; text-decoration: none; }
.brand .row { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.035em; color: var(--ink); line-height: 1; }
.brand .tag { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .14em; color: #111; background: var(--accent); padding: 6px 12px; border-radius: 8px; border: 2px solid var(--hard); box-shadow: 3px 3px 0 var(--hard); transform: rotate(-2deg); }
:root[data-theme="light"] .brand .tag { border-color: transparent; box-shadow: none; }
.about { max-width: 40rem; max-height: 12rem; overflow: hidden; margin: 18px auto 0; padding: 0 20px; text-align: center; color: var(--muted); font-size: .98rem; transition: max-height .55s var(--ease), opacity .3s ease, margin .55s var(--ease); }
/* After the first question: the event lines fold away and the brand grows into the space */
.brand img, .brand b, .brand .tag { transition: width .55s var(--ease), height .55s var(--ease), font-size .55s var(--ease), padding .55s var(--ease); }
body.past .about { max-height: 0; opacity: 0; margin-top: 0; }
body.past .brand img { width: 60px; height: 60px; }
body.past .brand b { font-size: 2.45rem; }
body.past .brand .tag { font-size: .8rem; padding: 7px 14px; }
/* Button loading state */
.btn.loading { pointer-events: none; }
.btn.loading svg { display: none; }
.btn.loading::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.about p { margin: 0; }
.about .when { margin-top: 8px; font-size: .88rem; line-height: 1.7; color: var(--faint); }
.about .when i { font-style: normal; color: var(--accent-text); font-weight: 700; margin: 0 6px; }
/* Stage */
main { flex: 1; display: grid; place-items: center; padding: 28px 20px 40px; }
.card { width: 100%; max-width: 40rem; }
.enter { animation: rise .45s var(--ease) both; }
.back-anim { animation: drop .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-26px); } }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; min-height: 44px; }
.backb { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 700; font-size: .95rem; cursor: pointer; }
.backb svg { width: 18px; height: 18px; }
.backb:hover { border-color: var(--accent); }
.qprog { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.qprog b { font-family: var(--mono); font-size: .85rem; color: var(--accent-text); white-space: nowrap; }
.qbar { width: 140px; height: 8px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.qbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .5s var(--ease); }
.qn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .82rem; font-weight: 700; color: var(--accent-text); margin-bottom: 10px; }
.qn svg { width: 14px; height: 14px; }
h1.q { font-size: clamp(1.6rem, 4.4vw, 2.3rem); }
h1.q .req { color: var(--accent-text); }
.hint { color: var(--muted); margin-top: 10px; font-size: 1rem; }
.field { margin-top: 26px; }

/* Inputs */
.in { width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--line-strong); padding: 10px 2px; font-size: clamp(1.25rem, 3.4vw, 1.6rem); color: var(--ink); border-radius: 0; }
.in::placeholder { color: var(--faint); }
.in:focus { outline: none; border-bottom-color: var(--accent); }
.tel { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--line-strong); }
.tel:focus-within { border-bottom-color: var(--accent); }
.tel .cc { display: flex; align-items: center; gap: 8px; font-size: clamp(1.15rem, 3vw, 1.4rem); font-weight: 700; color: var(--ink); white-space: nowrap; }
.tel .in { border: 0; letter-spacing: .04em; }
.tzflag { width: 30px; height: 20px; display: block; }

/* Choices */
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 34px minmax(0, 1fr) 22px; gap: 14px; align-items: center; width: 100%; text-align: left; min-height: 58px; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
@media (hover: hover) { .opt:hover, .chip:hover, .consent:hover { border-color: var(--accent); } }
.opt:active { transform: scale(.99); }
.opt .k { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); }
.opt .tick { width: 22px; height: 22px; color: var(--accent-text); opacity: 0; transition: opacity .15s; }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt[aria-pressed="true"] .k, .opt[aria-checked="true"] .k { background: var(--accent); color: #111; border-color: var(--accent); }
.opt[aria-pressed="true"] .tick, .opt[aria-checked="true"] .tick { opacity: 1; }
.opt.flash { animation: flash .35s ease 2; }
@keyframes flash { 50% { background: var(--surface-2); } }
.other { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font-family: var(--mono); font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); color: #111; border-color: var(--accent); }
.rlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 18rem; overflow-y: auto; margin-top: 14px; padding: 2px; }
.rlist .opt { min-height: 48px; grid-template-columns: minmax(0, 1fr) 20px; font-size: .98rem; padding: 8px 14px; }
.rlist.combos { grid-template-columns: minmax(0, 1fr); }
.cc2 { font-family: var(--mono); color: var(--accent-text); margin-right: 10px; }
.rlist .empty { grid-column: 1 / -1; color: var(--muted); padding: 10px 2px; }
.consent { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 1.05rem; color: var(--ink); }
.consent .box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: transparent; }
.consent .box svg { width: 16px; height: 16px; }
.consent[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.consent[aria-checked="true"] .box { background: var(--accent); border-color: var(--accent); color: #111; }

/* Actions */
.acts { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 12px; border: 2px solid var(--hard); background: var(--accent); color: #111; font-weight: 700; font-size: 1.02rem; cursor: pointer; text-decoration: none; box-shadow: 4px 4px 0 var(--hard); transition: transform .12s, box-shadow .12s, background .15s; }
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--hard); }
.btn svg { width: 18px; height: 18px; }
.btn.alt { background: var(--surface); color: var(--ink); }
:root[data-theme="light"] .btn { border-width: 1px; box-shadow: 0 1px 2px rgba(0,0,0,.08); border-color: #E2AE12; }
:root[data-theme="light"] .btn.alt { border-color: var(--line-strong); }
:root[data-theme="light"] .btn:active { transform: scale(.98); }
.keyhint { font-size: .85rem; color: var(--muted); }
.keyhint kbd { font-family: var(--mono); font-size: .75rem; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); }
.skip { background: none; border: 0; color: var(--muted); font-weight: 700; cursor: pointer; padding: 6px 2px; }
.skip:hover { color: var(--ink); }
.err { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255,122,107,.12); color: var(--bad); font-weight: 600; font-size: .95rem; }
:root[data-theme="light"] .err { background: #FBE4E1; }
.err svg { width: 16px; height: 16px; }

/* Bottom nav */

/* Finish */
.done { text-align: left; }
.done .seal { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #0D0D0D; margin-bottom: 20px; animation: pop .5s var(--ease) both; }
.done .seal svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done h1 { font-size: clamp(2rem, 5.4vw, 2.9rem); }
.done .lead { margin-top: 12px; font-size: 1.1rem; }
.next { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px; border-radius: 20px; background: var(--accent); color: #111; border: 2px solid var(--hard); box-shadow: 6px 6px 0 var(--hard); overflow: hidden; }
:root[data-theme="light"] .next { border: 0; box-shadow: 0 10px 30px rgba(20,20,24,.1); }
.next h2 { color: #111; font-size: 1.45rem; }
.next p { color: #2A2510; margin-top: 6px; }
.next .btn { margin-top: 14px; background: #111; color: var(--accent); border-color: #111; box-shadow: none; }
.next .btn:hover { background: #222; }
.next img { width: 120px; height: auto; }
.mine { margin-top: 20px; color: var(--muted); font-size: .95rem; }
.mine b { color: var(--ink); }

.foot { text-align: center; color: var(--faint); font-size: .8rem; padding: 0 20px 22px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .theme { top: 14px; right: 14px; width: 38px; height: 38px; }
  .brand { padding-top: 30px; gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  .brand b { font-size: 1.55rem; }
  .qbar { width: 90px; }
  .qhead { margin-bottom: 18px; }
  .about { margin-top: 14px; font-size: .92rem; }
  body.past .brand img { width: 46px; height: 46px; }
  body.past .brand b { font-size: 1.85rem; }
  body.past .brand .tag { font-size: .74rem; padding: 6px 12px; }
  main { place-items: start center; padding: 26px 16px 24px; }
  .rlist { grid-template-columns: minmax(0, 1fr); }
  .next { grid-template-columns: minmax(0, 1fr); }
  .next img { display: none; }
  .acts .btn { flex: 1; }
  .keyhint { display: none; }
  }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Server rendered additions: the theme button carries both icons and CSS shows the right one */
.theme .i-sun, .theme .i-moon { display: contents; }
.theme .i-moon, :root[data-theme="light"] .theme .i-sun { display: none; }
:root[data-theme="light"] .theme .i-moon { display: contents; }
