@font-face {
  font-family: "Fredoka"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("/static/fredoka-latin.woff2") format("woff2");
}
/* DOXA palette: teal #328076, yellow #fff945, mint #a3d49f (from the Doxa logo) */
:root {
  --teal: #328076;
  --teal-dark: #24635b;
  --yellow: #fff945;
  --mint: #a3d49f;
  --bg: #eef5f2;
  --surface: #ffffff;
  --text: #13201e;
  --muted: #55665f;
  --line: #d3e2dc;
  --accent: #328076;
  --accent-text: #ffffff;
  --danger: #b42318;
  --green: #1f9d55;
  --green-soft: #e1f4e6;
  --amber: #c99700;
  --yellow-soft: #fff8cf;
  --red: #dc2626;
  --red-soft: #fde6e6;
  --suggest: #e6f2ee;
  --shadow: 0 1px 2px rgba(16, 40, 34, .06), 0 1px 3px rgba(16, 40, 34, .08);
  --radius: 16px;
  --display: "Fredoka", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a18; --surface: #182724; --text: #e9f2ef; --muted: #9fb3ac; --line: #2a3f3a;
    --accent: #5fb3a5; --accent-text: #08201c; --danger: #ff7b72;
    --green: #3ccf75; --green-soft: #15301f; --amber: #f2c84b; --yellow-soft: #33290c; --red: #ff6b6b; --red-soft: #3a1717;
    --suggest: #1d3631; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1a18; --surface: #182724; --text: #e9f2ef; --muted: #9fb3ac; --line: #2a3f3a;
  --accent: #5fb3a5; --accent-text: #08201c; --danger: #ff7b72;
  --green: #3ccf75; --green-soft: #15301f; --amber: #f2c84b; --yellow-soft: #33290c; --red: #ff6b6b; --red-soft: #3a1717;
  --suggest: #1d3631; --shadow: none; color-scheme: dark;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2 { line-height: 1.15; margin: 0 0 .4em; font-family: var(--display); font-weight: 600; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap { gap: 8px; }
.stack { display: grid; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

button, .btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); padding: 12px 18px; min-height: 46px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:disabled { opacity: .55; cursor: default; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--line); }
button.big { width: 100%; min-height: 54px; font-size: 1.05rem; }
button.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--line); }
.small-btn { min-height: 38px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface); width: 100%;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 46px;
}
select { width: auto; max-width: 100%; }
textarea { resize: vertical; min-height: 140px; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
label.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
label.switch input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
.error { color: var(--danger); font-weight: 600; }
.note { background: var(--yellow-soft); border-radius: 10px; padding: 8px 12px; margin: 8px 0 0; font-size: .9rem; }

/* public pages (attendees + login): DOXA look */
body.center {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  background: var(--teal); color: #fff;
}
.narrow { width: 100%; max-width: 520px; padding: 28px 16px 40px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.logo { width: 64px; height: 64px; flex: none; overflow: hidden; border-radius: 14px; background: var(--teal); }
.logo img { width: 176px; height: 176px; margin: -56px 0 0 -56px; display: block; }
.brand-name { font-family: var(--display); font-weight: 600; color: var(--mint); font-size: .95rem; line-height: 1.25; }
body.center h1 { color: var(--yellow); font-size: 2rem; }
body.center h2 { color: var(--yellow); }
body.center .muted { color: #d9ece6; }
body.center a { color: var(--yellow); }
.panel { background: var(--surface); color: var(--text); border-radius: 20px; padding: 16px; box-shadow: 0 0 0 4px var(--mint); margin-top: 18px; }
.panel .muted { color: var(--muted); }
.narrow form { display: grid; gap: 12px; }
body.center button:not(.ghost) { background: var(--yellow); color: var(--teal-dark); font-family: var(--display); font-size: 1.1rem; }
body.center button.ghost { color: #fff; box-shadow: inset 0 0 0 2px var(--mint); }
.panel button.ghost { color: var(--teal); box-shadow: inset 0 0 0 2px var(--line); }
.eyebrow { color: var(--mint); font-weight: 700; font-size: .85rem; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.speaker { font-family: var(--display); font-size: 1.15rem; color: #fff; margin: 0; }
.foot { margin-top: 40px; font-size: .9rem; }
.thanks-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); color: var(--teal); font-size: 34px; font-weight: 700; display: grid; place-items: center; margin: 8px 0 12px; }
#thanks h2 { font-size: 1.5rem; }
#thanks button { margin-top: 12px; }
.mine { margin-top: 26px; }
.mine h2 { font-size: 1.1rem; color: var(--mint); }
.mine ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mine li { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; overflow-wrap: anywhere; }
.mine time { display: block; font-size: .8rem; color: var(--mint); }
.code-input { font-size: 1.6rem; letter-spacing: .25em; text-align: center; }

/* staff app */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 4px;
  background: var(--teal); color: #fff; padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top));
}
.bar-logo { width: 40px; height: 40px; overflow: hidden; border-radius: 10px; flex: none; margin-left: 4px; }
.bar-logo img { width: 110px; height: 110px; margin: -35px 0 0 -35px; display: block; }
.bar-title { flex: 1; font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--yellow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.icon-btn { background: transparent; color: inherit; font-size: 1.6rem; min-width: 46px; padding: 0 8px; }
.menu-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(0,0,0,.25); }
.menu {
  position: fixed; z-index: 20; top: 56px; right: 8px; background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); display: grid; min-width: 230px; overflow: hidden; border: 1px solid var(--line);
}
.menu a, .menu button { padding: 14px 18px; text-decoration: none; color: var(--text); background: none; text-align: left; justify-content: flex-start; border-radius: 0; font-weight: 500; border-bottom: 1px solid var(--line); }
.menu button { color: var(--danger); border-bottom: 0; }
.view { max-width: 760px; margin: 0 auto; padding: 14px 16px 80px; }
.h-page { margin: 6px 0 12px; }
.year { min-height: 40px; padding: 6px 10px; }
.empty { text-align: center; padding: 40px 12px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 16px; margin: 0 0 14px; }
.form { display: grid; gap: 12px; }

.day { margin-bottom: 18px; }
.day-title { font-size: 1rem; margin: 18px 0 8px; }
.list { display: grid; gap: 8px; }
.session-link {
  display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); text-decoration: none; box-shadow: var(--shadow); min-height: 60px;
}
.session-link.general { background: transparent; box-shadow: none; border-style: dashed; }
.session-link .st { font-weight: 600; }
.open-form { font-size: .85rem; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; min-width: 3.1em; font-size: .95rem; }
.badge { background: var(--accent); color: var(--accent-text); border-radius: 999px; min-width: 28px; height: 28px; padding: 0 8px; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.badge.done { background: var(--green-soft); color: var(--green); }
.chev { color: var(--muted); font-size: 1.4rem; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .88rem; white-space: nowrap; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; }
.chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.session-head { margin-bottom: 10px; }
.counts { font-size: 1.05rem; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--amber); } .dot.red { background: var(--red); }

.qlist { display: grid; gap: 8px; }
.qcard {
  position: relative; display: grid; grid-template-columns: 34px 34px 1fr 50px; align-items: start; column-gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 8px 10px 4px; touch-action: pan-y;
}
.qcard.c-green { border-left-color: var(--green); background: var(--green-soft); }
.qcard.c-yellow { border-left-color: var(--amber); background: var(--yellow-soft); }
.qcard.c-red { border-left-color: var(--red); background: var(--red-soft); }
.qcard.asked { opacity: .55; }
.qcard.asked .qtext { text-decoration: line-through; text-decoration-thickness: 1px; }
.qcard.dragging { z-index: 5; box-shadow: 0 12px 28px rgba(0,0,0,.25); opacity: .97; transition: none; }
.qcard.merging { outline: 3px dashed var(--accent); }
.handle {
  background: none; color: var(--muted); min-height: 44px; min-width: 34px; padding: 0; font-size: 1.1rem; letter-spacing: -3px;
  touch-action: none; cursor: grab; align-self: center;
}
.colorbtn { min-height: 44px; min-width: 34px; padding: 0; background: none; position: relative; }
.colorbtn::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid var(--muted); }
.colorbtn.dot-green::after { background: var(--green); border-color: var(--green); }
.colorbtn.dot-yellow::after { background: var(--amber); border-color: var(--amber); }
.colorbtn.dot-red::after { background: var(--red); border-color: var(--red); }
.qbody { padding: 10px 2px; cursor: pointer; min-width: 0; }
.qtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; }
.times { display: inline-block; margin-top: 6px; background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 1px 9px; font-size: .8rem; font-weight: 700; }
.check {
  width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 12px; background: var(--surface); color: transparent;
  box-shadow: inset 0 0 0 2px var(--line); font-size: 1.4rem; align-self: center;
}
.check.on { background: var(--green); color: #fff; box-shadow: none; }
.suggest, .actions { grid-column: 2 / -1; margin-top: 6px; display: grid; gap: 8px; }
.suggest { background: var(--suggest); border-radius: 10px; padding: 10px; }
.actions select { min-height: 38px; padding: 6px 10px; font-size: .9rem; }
.variants ul { margin: 4px 0 0; padding-left: 18px; }
.merge-banner { position: sticky; top: 58px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--accent); color: var(--accent-text); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-weight: 600; }
.merge-banner .ghost { color: var(--accent-text); box-shadow: inset 0 0 0 1.5px currentColor; }
.footer-actions { margin-top: 22px; }

.manage-list { list-style: none; margin: 8px 0 12px; padding: 0; }
.manage-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: 80px 1fr; gap: 8px; }
.grid3 input[name="speaker"] { grid-column: 1 / -1; }
@media (min-width: 640px) { .grid3 { grid-template-columns: 80px 1.4fr 1fr; } .grid3 input[name="speaker"] { grid-column: auto; } }
.inline-form { gap: 8px; }

.qr-sheet { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.qr-card { background: #328076; color: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; text-align: center; }
.qr-card h2 { font-size: 1.25rem; margin: 4px 0; }
.qr-card .qr-img { width: 100%; max-width: 300px; height: auto; margin: 12px auto; display: block; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 0 0 5px #a3d49f; }
.qr-card .logo { margin: 0 auto 8px; }
.qr-card h2 { color: #fff945; }
.qr-event { font-weight: 700; color: #a3d49f; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }
.qr-speaker { color: #fff; font-family: var(--display); }
.qr-cta { font-weight: 700; font-size: 1.1rem; }
.qr-url { color: #d9ece6; font-size: .9rem; margin-top: 4px; }

.preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 30; max-width: calc(100vw - 32px); }

@media print {
  .bar, .menu, .no-print, .toast { display: none !important; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .view { padding: 0; max-width: none; }
  .qr-sheet { display: block; }
  .qr-card { border: 0; page-break-after: always; break-after: page; padding-top: 12vh; }
  .qr-card h2 { font-size: 2rem; }
  .qr-card img { max-width: 70%; }
  .qr-cta { font-size: 1.6rem; }
}
