:root {
  color-scheme: light;
  --ink: #232323;
  --muted: #6b6b6b;
  --paper: #f9f9f9;
  --white: #ffffff;
  --line: #e7e7e7;
  --accent: #535353;
  --black: #3c3c3c;
  --light: #eaeaea;
  --silver: #bdbdbd;
  --pale: #e7e7e7;
  font: 16px/1.45 "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:disabled { opacity: .58; cursor: default; }
:focus-visible { outline: 3px solid #767676; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.icon { flex: none; vertical-align: middle; }
.brand { display: inline-flex; align-items: center; width: max-content; text-decoration: none; font-size: 1.55rem; font-weight: 850; letter-spacing: -.065em; line-height: 1; }
.brand-dot { color: var(--accent); }
.mark { display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 2px; place-content: center; background: var(--accent); border-radius: 10px; width: 34px; height: 34px; margin-right: 10px; }
.mark i { background: #ffffff; border-radius: 5px 5px 1px 5px; }
.mark i:nth-child(2) { transform: rotate(90deg); }
.mark i:nth-child(3) { transform: rotate(-90deg); }
.mark i:nth-child(4) { transform: rotate(180deg); background: var(--pale); }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { background: #ffffff; border-right: 1px solid var(--line); padding: 29px 19px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 35px; }
.sidebar .brand { margin-left: 10px; }
.sidebar nav { margin-top: 57px; display: grid; gap: 6px; }
.eyebrow { font-weight: 780; font-size: .71rem; letter-spacing: .15em; color: var(--muted); }
.sidebar .eyebrow { margin: 0 0 8px 12px; }
.nav-item { text-align: left; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; font-size: .91rem; color: #595959; font-weight: 650; }
.nav-item:hover { background: #f5f5f5; }
.nav-item.active { color: var(--black); background: var(--light); }
.sidebar-bottom { display: grid; gap: 20px; }
.join-side { display: flex; gap: 9px; align-items: center; background: #f7f7f7; border: 1px solid #eaeaea; border-radius: 12px; padding: 12px 10px; }
.join-side strong, .join-side a { display: block; font-size: .78rem; white-space: nowrap; }
.join-side a { color: var(--black); text-underline-offset: 3px; }
.join-icon { display: grid; place-items: center; background: #e6e6e6; color: var(--accent); border-radius: 8px; width: 31px; height: 31px; flex: none; }
.join-icon .icon { width: 16px; }
.credit { font-size: .78rem; color: var(--muted); }
.credit b { color: var(--ink); }
.sidebar-bottom .credit { margin-left: 10px; }
.topbar, .live-header { min-height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #ffffff; padding: 12px clamp(18px, 3.7vw, 52px); }
.crumb { font-size: .86rem; color: var(--muted); }
.crumb span { color: #a2a2a2; margin: 0 8px; }
.crumb strong { color: var(--ink); }
.main-content { max-width: 1440px; margin: 0 auto; padding: 35px clamp(20px, 4vw, 58px) 50px; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.page-heading h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); line-height: 1.1; letter-spacing: -.055em; font-weight: 820; }
.page-heading p, .section-heading p { color: var(--muted); margin-top: 7px; }
.button { min-height: 42px; white-space: nowrap; border: 1px solid transparent; border-radius: 9px; padding: 9px 15px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: #ffffff; text-decoration: none; font-size: .88rem; line-height: 1.2; font-weight: 720; color: var(--ink); transition: background .16s ease, transform .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button .icon { width: 17px; height: 17px; }
.button.primary { color: #ffffff; background: var(--accent); }
.button.primary:hover { background: var(--black); }
.button.outline { border-color: #dddddd; }
.button.outline:hover { background: #f6f6f6; }
.button.soft { color: var(--black); background: #ebebeb; }
.button.dark { background: #252525; color: #ffffff; }
.button.hero-outline { color: #272727; border-color: #7d7d7d; background: #e8e8e855; }
.button.compact { min-height: 36px; padding: 7px 12px; }
.button.square { padding: 0; width: 42px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hero { overflow: hidden; isolation: isolate; position: relative; display: flex; align-items: center; min-height: 344px; padding: 34px clamp(24px, 4vw, 54px); border-radius: 20px; background: radial-gradient(ellipse at 82% 38%, #d4d4d4 0%, #c3c3c3 54%, #cccccc 100%); }
.hero-copy { position: relative; z-index: 2; max-width: 430px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid #909090; border-radius: 6px; color: #3d3d3d; font-size: .68rem; letter-spacing: .115em; font-weight: 820; }
.hero-kicker span { width: 7px; height: 7px; border-radius: 50%; background: #595959; }
.hero h2 { font-size: clamp(2.55rem, 5.25vw, 5.05rem); line-height: .97; font-weight: 840; letter-spacing: -.08em; margin: 17px 0 16px; }
.hero h2 em { font-family: Georgia, serif; font-weight: 500; color: #464646; letter-spacing: -.085em; }
.hero p { color: #3e3e3e; max-width: 310px; }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 9px; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 53%; pointer-events: none; }
.library-section { margin-top: 32px; }
.section-heading h2, .panel h2 { font-size: 1.34rem; letter-spacing: -.038em; }
.section-heading p { margin-top: 3px; font-size: .92rem; }
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.quiz-card, .new-card { min-width: 0; overflow: hidden; border-radius: 15px; border: 1px solid var(--line); background: #ffffff; }
.quiz-cover { height: 115px; display: grid; place-items: center; overflow: hidden; position: relative; background: #eaeaea; }
.cover-orbit { position: absolute; width: 170px; height: 85px; border: 1px solid #9f9f9f; border-radius: 50%; transform: rotate(-15deg); }
.cover-star { position: absolute; color: #4f4f4f; font-size: 22px; left: calc(50% - 79px); top: 23px; }
.cover-star.small { left: auto; right: calc(50% - 73px); bottom: 19px; top: auto; }
.cover-sheet { z-index: 1; display: grid; place-items: center; width: 53px; height: 65px; transform: rotate(-11deg); background: #f9f9f9; border: 1.5px solid #444444; border-radius: 9px; color: #535353; box-shadow: 4px 4px 0 #444444; font: italic 3rem/1 Georgia, serif; }
.cover-dot { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--silver); top: 20px; right: calc(50% - 60px); border: 1px solid #444444; }
.quiz-card-body { padding: 15px; }
.quiz-card h3 { overflow-wrap: anywhere; font-size: 1.05rem; letter-spacing: -.025em; }
.quiz-card p { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.quiz-card p span { margin: 0 3px; }
.quiz-card-actions { display: flex; gap: 7px; margin-top: 13px; }
.quiz-card-actions .soft { flex: 1; }
.new-card { min-height: 217px; display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; padding: 19px; color: var(--ink); border: 1px dashed #c2c2c2; background: #fafafa; }
.new-card:hover { background: #eeeeee; }
.new-card > span:last-child { color: var(--muted); font-size: .86rem; }
.new-card-icon { display: inline-grid; place-items: center; color: var(--black); background: var(--light); border-radius: 13px; width: 46px; height: 46px; margin-bottom: 7px; font-size: 1.5rem; flex: none; }
.recent { margin-top: 22px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #ffffff; }
.recent div { display: flex; gap: 10px; align-items: center; }
.panel { border: 1px solid var(--line); border-radius: 17px; padding: clamp(17px, 3.5vw, 34px); background: #ffffff; }
.import-panel { max-width: 880px; }
.drop-zone { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; background: #f8f8f8; border-radius: 14px; border: 1px dashed #979797; cursor: pointer; }
.drop-zone:hover { background: #ededed; }
.drop-zone span:last-child, .import-help p, .hint { color: var(--muted); }
.hint { margin-top: 10px; }
.import-help { margin-top: 24px; }
.import-help p { max-width: 65ch; margin: 8px 0 15px; }
.editor { display: grid; justify-items: stretch; gap: 15px; }
.editor > button { justify-self: start; }
.field { display: grid; gap: 6px; min-width: 0; font-size: .9rem; font-weight: 720; }
.field input, .option-editor > input, .duration input { width: 100%; color: var(--ink); background: #ffffff; border: 1px solid #dbdbdb; border-radius: 8px; padding: 10px 12px; font-size: 1rem; font-weight: 500; }
.field input::placeholder, .option-editor input::placeholder { color: #757575; }
.question-editor { display: grid; gap: 14px; }
.question-editor-top { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.question-editor-top > div, .duration { display: flex; align-items: center; gap: 8px; }
.duration { color: var(--muted); font-size: .85rem; }
.duration input { padding: 7px; width: 61px; }
.editor-options, .answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option-editor { display: flex; gap: 7px; align-items: center; }
.option-editor.is-correct > input { border-color: #888888; background: #f9f9f9; }
.correct-radio { display: inline-flex; align-items: center; gap: 4px; color: var(--black); font-weight: 750; }
.correct-radio input { accent-color: var(--accent); width: 17px; height: 17px; }
.missing, .form-error { color: #444444; font-size: .88rem; }
.live-shell { min-height: 100vh; background: radial-gradient(ellipse at 65% 5%, #e9e9e9, #f9f9f9 68%); }
.live-main { width: min(1160px, 100%); margin: 0 auto; display: grid; gap: 15px; padding: clamp(16px, 4vw, 46px); }
.live-main footer { text-align: center; padding: 8px; }
.room-label { color: var(--muted); font-size: .85rem; }
.room-label strong { margin-left: 7px; color: var(--black); font-variant-numeric: tabular-nums; }
.host-controls { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
#connection:empty { display: none; }
#connection { color: var(--black); }
.join-page { padding: max(28px, 7vh) 18px 30px; display: grid; justify-items: center; gap: 18px; }
.join-form { width: min(440px, 100%); display: grid; gap: 14px; }
.join-form h1, .center h1, .lobby h1, .question-live h1 { font-size: clamp(1.85rem, 4.6vw, 3.6rem); letter-spacing: -.055em; line-height: 1.08; overflow-wrap: anywhere; }
.join-form p, .center p, .lobby p { color: var(--muted); }
.join-form .form-error { color: #444444; }
.form-error:empty { display: none; }
.center { text-align: center; display: grid; justify-items: center; gap: 11px; padding-block: clamp(32px, 7vw, 88px); }
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 250px); gap: 26px; align-items: center; }
.lobby h1 { margin: 9px 0; }
.pin { margin: 13px 0; font-size: clamp(2.6rem, 8vw, 6.3rem); font-weight: 850; letter-spacing: -.07em; line-height: 1; color: var(--black); }
.pin span { color: #626262; }
.qr-wrap { display: grid; justify-items: center; gap: 8px; }
.qr-wrap img { width: min(240px, 100%); height: auto; }
.live-count { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .92rem; font-weight: 650; }
.player-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.player-list span { padding: 4px 8px; color: var(--black); background: var(--light); border-radius: 7px; overflow-wrap: anywhere; }
.question-live { display: grid; gap: 17px; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 720; color: var(--muted); font-size: .87rem; }
.timer, .result-tag { border-radius: 7px; padding: 4px 9px; color: var(--black); background: var(--light); font-variant-numeric: tabular-nums; }
.timer-track { height: 5px; background: #ebebeb; border-radius: 7px; overflow: hidden; }
#timer-bar { height: 100%; background: var(--accent); transition: width .12s linear; }
.answer { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 69px; text-align: left; border-radius: 11px; border: 2px solid transparent; padding: 10px 12px; color: #282828; font-weight: 700; overflow-wrap: anywhere; }
button.answer:hover { border-color: var(--accent); }
.answer-letter { background: #ffffffa0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; flex: none; }
.color-0 { background: #e6e6e6; }
.color-1 { background: #e8e8e8; }
.color-2 { background: #ebebeb; }
.color-3 { background: #e9e9e9; }
.answer.correct { border-color: #787878; }
.answer.selected { box-shadow: inset 0 0 0 2px #535353; }
.votes { margin-left: auto; color: #494949; font-size: .78rem; white-space: nowrap; }
.right-mark { font-size: 1.05rem; color: #565656; }
.leaderboard ol { margin: 10px 0 0; padding-left: 21px; }
.leaderboard li { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.leaderboard li strong { float: right; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; text-align: left; }
th, td { padding: 9px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .84rem; }
.projector .live-main { max-width: 1450px; }
.projector .answer { min-height: 88px; font-size: 1.25rem; }
#toast { position: fixed; z-index: 10; bottom: 19px; right: 19px; max-width: min(calc(100% - 38px), 430px); border-radius: 10px; background: #292929; color: #ffffff; padding: 12px 15px; box-shadow: 0 8px 30px #2828283f; }
@media (min-width: 1100px) { .quiz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 850px) {
  .workspace { grid-template-columns: 175px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .hero-art { width: 44%; }
  .hero-copy { max-width: 360px; }
}
@media (max-width: 650px) {
  .workspace { display: block; }
  .sidebar { padding: 14px 16px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0; }
  .sidebar nav { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 3px; }
  .sidebar nav .eyebrow, .sidebar-bottom, .topbar { display: none; }
  .nav-item { padding: 8px; font-size: .82rem; gap: 5px; }
  .nav-item .icon { width: 15px; }
  .main-content { padding: 23px 16px 34px; }
  .page-heading { align-items: flex-start; }
  .page-heading p { font-size: .9rem; }
  .hero { min-height: 0; padding: 25px 18px; }
  .hero-art { width: 49%; opacity: .37; }
  .hero h2 { font-size: clamp(2.5rem, 11vw, 4.2rem); }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-card-body { padding: 11px; }
  .editor-heading { flex-wrap: wrap; }
  .editor-options, .answer-grid { grid-template-columns: 1fr; }
  .lobby { grid-template-columns: 1fr; }
  .qr-wrap img { max-width: 190px; }
}
@media (max-width: 355px) { .quiz-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

:root {
  --ink: #181818;
  --muted: #626262;
  --paper: #f7f7f5;
  --line: #e4e4e1;
  --accent: #262626;
  --black: #161616;
  --light: #eaeae8;
  --silver: #c9c9c6;
  --pale: #ededeb;
}
:focus-visible { outline-color: #515151; }
.mobile-join { display: none; }
.hero {
  background: #161616;
  color: #f9f9f6;
  min-height: 376px;
  border-radius: 19px;
}
.hero-copy { max-width: 470px; }
.hero-kicker { color: #d5d5d0; border: 0; padding: 0; letter-spacing: .15em; }
.hero-kicker span { background: #fff; box-shadow: 0 0 11px #ffffff70; }
.hero h2 { font-size: clamp(2.8rem, 5.75vw, 5.9rem); }
.hero h2 em { color: #e1e1dc; }
.hero p { color: #c7c7c4; }
.hero .button.dark { color: #161616; background: #fafafa; }
.hero .button.hero-outline { color: #f9f9f6; border-color: #737373; background: #222; }
.hero .hero-art {
  width: 52%;
  mask-image: linear-gradient(90deg, transparent, #000 16%);
  background: radial-gradient(ellipse at 62% 54%, #3b3b3b, transparent 63%);
}
.art-grid { position: absolute; inset: 0; opacity: .41; background-image: linear-gradient(#6666 1px, transparent 1px), linear-gradient(90deg, #6666 1px, transparent 1px); background-size: 29px 29px; }
.art-orbit { position: absolute; border: 1px solid #a3a3a36e; border-radius: 50%; width: 86%; height: 52%; top: 27%; left: 8%; transform: rotate(-27deg); }
.art-board {
  position: absolute; top: 50%; left: 53%; width: min(61%, 273px); aspect-ratio: 1.12;
  transform: translate(-50%, -50%) rotate(-9deg); border-radius: 18px; border: 1px solid #616161;
  background: #262626; box-shadow: 12px 15px 0 #0d0d0d, 0 16px 46px #0b0b0baa;
  padding: clamp(10px, 1.5vw, 20px); display: grid; align-content: space-between; gap: 8px;
}
.art-board-top { display: flex; justify-content: space-between; color: #d5d5d5; font-size: clamp(.55rem, .88vw, .73rem); letter-spacing: .08em; }
.art-board-top i { display: inline-block; border-radius: 50%; width: 6px; height: 6px; background: #fff; margin-right: 4px; }
.art-ask { text-align: center; font: italic clamp(3rem, 8vw, 7.4rem)/.8 Georgia, serif; }
.art-answers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.art-answers span { border: 1px solid #6a6a6a; display: flex; justify-content: space-around; border-radius: 5px; padding: 5px 3px; font-weight: 700; font-size: clamp(.65rem, 1vw, .82rem); }
.art-answers span:nth-child(3) { color: #161616; background: #ececec; border-color: #ececec; }
.art-ring-badge { position: absolute; top: 18%; right: 15%; color: #dbdbd8; font-size: clamp(1.5rem, 3vw, 3rem); }
.art-check { position: absolute; display: grid; place-items: center; top: 68%; left: 19%; width: clamp(38px, 5.5vw, 70px); aspect-ratio: 1; color: #121212; background: #e9e9e5; border-radius: 13px; border: 1px solid #fff; box-shadow: 5px 5px 0 #0a0a0a; transform: rotate(12deg); }
.art-check .icon { width: 46%; height: 46%; stroke-width: 2.5; }
.cover-sheet { color: #252525; }
.new-card { background: #f6f6f4; }
.new-card:hover, .button.outline:hover { background: #eaeae8; }
.guide-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.guide-steps li { display: flex; gap: 13px; align-items: flex-start; }
.guide-steps p, .guide-note p { margin-top: 5px; color: var(--muted); }
.step-number { width: 32px; height: 32px; display: grid; flex: none; place-items: center; border-radius: 8px; color: #fff; background: #242424; font-weight: 750; }
.guide-note { margin: 16px 0; padding: 15px; background: #efefec; border-radius: 10px; }
.room-label .fullscreen { margin-left: 8px; }
.projector { background: #161616; color: #f7f7f7; }
.projector .live-header, .projector .panel { background: #222; border-color: #4e4e4e; }
.projector .room-label, .projector .credit, .projector .eyebrow, .projector .lobby p, .projector .question-meta, .projector .live-count { color: #ccc; }
.projector .brand-dot, .projector .room-label strong, .projector .pin, .projector .pin span, .projector .credit b { color: #fff; }
.projector .mark { border: 1px solid #797979; }
.projector .qr-wrap { background: #fff; border-radius: 12px; }
.projector .answer:not(.correct) { background: #373737; color: #fafafa; }
.projector .answer:not(.correct) .answer-letter { background: #555; }
.projector .answer:not(.correct) .votes { color: #ebebeb; }
.projector .answer.correct { background: #f5f5f5; color: #151515; border-color: #fff; }
.projector .timer-track { background: #5a5a5a; }
.projector #timer-bar { background: #f3f3f3; }
.answer.correct .right-mark { color: #171717; }
@keyframes answer-in {
  from { opacity: .2; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .art-check { animation: answer-in .4s ease-out both; }
  .answer.correct, .finished .new-card-icon { animation: answer-in .28s ease-out both; }
}
@media (max-width: 650px) {
  .sidebar > div:first-child { position: relative; }
  .mobile-join { display: flex; position: absolute; top: 0; right: 0; text-decoration: none; }
  .hero { min-height: 300px; }
  .hero .hero-art { width: 53%; opacity: .4; }
  .hero h2 { font-size: clamp(2.6rem, 10vw, 4.3rem); }
  .guide-steps { grid-template-columns: 1fr; }
}
.join-address { overflow-wrap: anywhere; }
@media (min-width: 1050px) {
  .hero-copy { max-width: 56%; }
}
.answer { position: relative; isolation: isolate; overflow: hidden; }
.vote-meter { position: absolute; z-index: -1; left: 0; bottom: 0; height: 4px; width: var(--vote-share); background: #777; }
.answer.correct .vote-meter { background: #181818; }
.projector .answer:not(.correct) .vote-meter { background: #a7a7a7; }
@keyframes vote-fill { from { width: 0; } to { width: var(--vote-share); } }
@media (prefers-reduced-motion: no-preference) {
  .vote-meter { animation: vote-fill .45s ease-out both; }
}
.topbar-actions, .account-controls { display: flex; gap: 8px; align-items: center; }
.account-controls span { font-size: .83rem; color: var(--muted); max-width: min(28vw, 16rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-storage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; padding: 12px 14px; background: #efefec; border-radius: 10px; margin-bottom: 16px; color: var(--muted); font-size: .9rem; }
@media (max-width: 650px) {
  .topbar:has(.topbar-actions > :not(.desktop-join)) { display: flex; min-height: 0; padding: 8px 16px; }
  .topbar .crumb, .topbar .desktop-join { display: none; }
  .account-controls span { max-width: 64vw; }
}
