/* Coocrea identity. app.css owns the base components and responsive layout. */
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-extrabold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #044295;
  --brand-dark: #062b60;
  --cyan: #009fe3;
  --turquoise: #2cc1b9;
  --fuchsia: #c22077;
  --ink: #1a2541;
  --paper: #f6f8fc;
  --line: #e0e7f0;
  --muted: #607088;
  --teal: #044295;
  --lime: #ddf4f1;
  --purple: #ece3f4;
  --orange: #fae2ed;
  --blue: #dff2fc;
  --red: #ae2548;
  --radius: 24px;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { width: 100%; }
a { text-underline-offset: 4px; }
h1, h2, h3 { color: var(--ink); }
h1 { font-weight: 700; letter-spacing: -2px; }
h2 { font-weight: 700; letter-spacing: -1px; }
h3 { font-weight: 700; letter-spacing: -.5px; }
.accent { color: #007bac; font-style: normal; font-weight: inherit; }
.eyebrow { color: var(--brand); font-size: 10px; letter-spacing: 1.7px; }
.tiny-line { width: 22px; height: 3px; border-radius: 2px; background: var(--turquoise); }

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 30;
  padding: 12px 20px;
  border-radius: 10px;
  background: white;
  color: var(--brand);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }
.topbar {
  flex-shrink: 0;
  min-height: 94px;
  height: auto;
  margin: 0;
  padding: 24px max(32px, calc((100vw - 1240px) / 2));
  background: #fff;
  border-bottom-color: var(--line);
}
.brand { gap: 23px; letter-spacing: 0; }
.brand-logo { width: 180px; height: auto; display: block; }
.brand-product {
  display: block;
  padding-left: 23px;
  border-left: 1px solid #d8e1ee;
  color: var(--brand);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.6px;
}
.brand-product span {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: .35px;
  color: var(--muted);
  font-weight: 500;
}
.top-meta {
  color: var(--brand);
  padding: 9px 14px;
  border: 1px solid #dfeaf7;
  border-radius: 100px;
  background: #f5f9ff;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.live-dot { background: #087f78; box-shadow: 0 0 0 4px #2cc1b915; }

/* Joining: a Coocrea blue conversation panel and a quiet, practical form. */
.participant-layout {
  max-width: 1240px;
  margin: 44px auto 0;
  padding: 0 32px;
  gap: 54px;
  grid-template-columns: 1.14fr 1fr;
  align-items: center;
}
.intro {
  position: relative;
  isolation: isolate;
  padding: 42px 42px 30px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #044295, #073578 75%, #072b64);
  color: white;
}
.intro::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid #ffffff10;
  border-radius: 50%;
  top: -170px;
  right: -130px;
  z-index: -1;
}
.intro .eyebrow { color: #bfece9; margin-bottom: 24px; font-size: 9px; letter-spacing: 1.4px; }
.intro h1 { color: white; font-size: clamp(40px, 4.5vw, 62px); line-height: 1.08; letter-spacing: -2.7px; margin-bottom: 24px; }
.intro .accent { color: #53d4e9; }
.intro > p { color: #dce8f8; font-size: 15px; line-height: 1.8; max-width: 385px; margin-bottom: 0; }
.intro-tags { margin-top: 24px; gap: 9px; }
.intro-tags span { padding: 6px 13px; border: 1px solid #ffffff38; border-radius: 100px; font-size: 10px; color: #f4fbff; }
.conversation-art { position: relative; height: 144px; margin-top: 28px; }
.art-ring { position: absolute; width: 120px; height: 120px; border: 22px solid; border-radius: 50%; top: 0; }
.art-ring-first { left: 10px; border-color: #2cc1b9; }
.art-ring-second { left: 98px; border-color: #00bde3; }
.art-dot { position: absolute; width: 19px; height: 19px; border-radius: 50%; background: #ca81c7; top: 3px; left: 255px; }
.art-message {
  position: absolute;
  left: 135px;
  top: 89px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 1px solid #ffffff38;
  border-radius: 12px;
  background: #164c8b;
  box-shadow: 0 8px 24px #031d4a30;
  color: white;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.art-message-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--turquoise); display: grid; place-items: center; font-size: 17px; color: #062b60; }
.intro-footnote { padding-top: 20px; border-top: 1px solid #ffffff25; font-size: 8px; letter-spacing: 1.5px; color: #c5d7f0; }
.join-card { padding: 32px 34px; box-shadow: 0 18px 65px #153e7810; }
.step-label { justify-content: flex-start; gap: 10px; align-items: center; font-size: 8px; letter-spacing: 1.05px; margin-bottom: 28px; color: var(--muted); }
.join-symbol { display: grid; place-items: center; width: 30px; height: 30px; background: #e3f5fc; color: var(--brand); border-radius: 9px; font-size: 20px; }
.join-card h2 { font-size: 32px; margin-bottom: 13px; }
.join-card > p { max-width: 340px; font-size: 12px; line-height: 1.8; margin-bottom: 25px; }
label { font-size: 12px; font-weight: 600; }
input, textarea, select { border-color: #dbe4ef; border-radius: 12px; background: #fafcff; padding: 13px 15px; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #8a97aa; }
input.code-input { color: var(--brand); background: #f3f8fe; font-size: 30px; letter-spacing: 11px; font-weight: 600; height: 70px; font-variant-numeric: tabular-nums; }
.code-input::placeholder { color: #b3c5df; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 2px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.btn { border-radius: 100px; border-color: #d6e1f0; font-size: 12px; font-weight: 600; min-height: 46px; padding: 12px 21px; }
.btn:hover:not(:disabled) { background: #edf5ff; }
.btn.primary { background: var(--brand); border-color: var(--brand); box-shadow: 0 5px 12px #04429514; }
.btn.primary:hover:not(:disabled) { background: #073577; border-color: #073577; }
.btn.lime { background: var(--turquoise); color: #052f50; border-color: var(--turquoise); }
.btn.lime:hover:not(:disabled) { background: #54d4cd; }
.btn.danger { color: var(--red); border-color: #efc8d2; }
.btn.danger:hover:not(:disabled) { background: #fff0f5; }
.btn.small { font-size: 10px; padding: 8px 13px; min-height: 36px; }
.wide { font-size: 12px; min-height: 50px; }
.card-note { font-size: 10px; line-height: 1.7; padding-top: 18px; margin-top: 22px; align-items: center; }
.card-note > span { color: #087f78; font-size: 16px; font-weight: 700; }
.presenter-link { font-size: 11px; margin: 26px 0 34px; }
.presenter-link a { color: var(--brand); }
.footer { margin: auto 0 0; padding: 23px max(32px, calc((100vw - 1176px) / 2)); font-size: 9px; border-top-color: var(--line); }
.footer > span:last-child { letter-spacing: 0; }
.footer strong { color: var(--brand); font-weight: 600; }
.footer-dot { color: var(--cyan); padding: 0 8px; }

/* Shared quiz, vote and result components. Letters stay visible alongside color. */
.play-panel { max-width: 840px; margin: 0 auto 48px; }
.play-top { gap: 14px; }
.play-top > .badge { max-width: 75%; overflow-wrap: anywhere; }
.badge { background: #e8effa; color: var(--brand); font-size: 10px; letter-spacing: .2px; padding: 7px 13px; }
.badge.quiz { color: #6e2383; background: #eee4f7; }
.badge.poll { color: #006b68; background: #dcf3ef; }
.connection { font-size: 10px; white-space: nowrap; }
.state-card { border-color: #dfe7f1; box-shadow: 0 12px 40px #153e7807; }
.empty-state h2 { letter-spacing: -1.5px; }
.empty-icon { background: #e3f3fc; color: var(--brand); }
.empty-state .eyebrow { color: var(--brand); }
.empty-state p { font-size: 14px; line-height: 1.8; }
.question-title { color: var(--ink); font-size: clamp(25px, 3vw, 40px); line-height: 1.25; font-weight: 700; }
.timer { background: #e5f4fc; color: var(--brand); border-radius: 100px; padding: 6px 12px; font-size: 17px; }
.timer.expired { background: #fff0f3; color: var(--red); }
.option { border: 1px solid transparent; border-radius: 16px; padding: 18px 20px; gap: 14px; font-size: 16px; font-weight: 500; transition: box-shadow .15s, transform .15s; }
.option[data-color="0"] { background: #e2eefb; --option-accent: #044295; }
.option[data-color="1"] { background: #ddf3f0; --option-accent: #087c76; }
.option[data-color="2"] { background: #eee5f6; --option-accent: #6e2383; }
.option[data-color="3"] { background: #fbe5f0; --option-accent: #ac206a; }
.option[data-color="4"] { background: #eef2d7; --option-accent: #586d07; }
.option[data-color="5"] { background: #e0f2fb; --option-accent: #006c9b; }
.option-letter { border: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--option-accent, #e5eefb); color: var(--brand); font-size: 13px; }
.option .option-letter { color: white; }
.option:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--option-accent); transform: translateY(-1px); }
.option.selected { box-shadow: inset 0 0 0 3px var(--option-accent, var(--brand)); }
.option.selected > b { margin-left: auto; color: var(--option-accent); }
.question-foot { font-size: 11px; }
.feedback { border: 0; background: #e9f7f4; color: #345b58; border-radius: 12px; line-height: 1.8; font-size: 12px; }
.feedback strong { color: #08736e; }
.result-row { background: #f5f8fc; border-color: #e3eaf4; border-radius: 14px; padding: 18px 20px; }
.result-label { font-size: 14px; }
.result-label b { color: #08736e; font-size: .85em; }
.result-label strong { color: var(--brand); }
.result-progress { background: #e1eaf5; height: 10px; }
.result-progress::-webkit-progress-bar { background: #e1eaf5; }
.result-progress::-webkit-progress-value { background: var(--brand); }
.result-progress::-moz-progress-bar { background: var(--brand); }
.result-count { font-size: 10px; }
.rank-row { font-size: 13px; padding: 14px 8px; border-color: #e5ebf4; }
.rank-num { color: var(--brand); font-size: 18px; }
.rank-points { color: var(--brand); font-size: 16px; }
.rank-row.me { background: #e8f4fc; border-radius: 8px; }
.winner-names { font-family: inherit; font-style: normal; color: var(--brand); font-weight: 700; letter-spacing: -1.5px; }
.notice { background: var(--brand); font-size: 12px; line-height: 1.6; padding: 14px 20px; }
.notice.error { background: #a6224b; }

/* Presenter workspace. */
body[data-mode="admin"] { background: radial-gradient(ellipse at 15% 10%, #eaf4ff 0, transparent 55%), var(--paper); }
.admin-layout { margin-top: 44px; margin-bottom: 56px; padding: 0 32px; }
.login-card { max-width: 540px; margin: 32px auto; padding: 40px; border-top: 4px solid var(--cyan); box-shadow: 0 20px 70px #0442950b; }
.login-card h1 { font-size: 42px; letter-spacing: -1.8px; }
.login-card > p { font-size: 13px; line-height: 1.8; }
.page-heading h1 { font-size: 48px; letter-spacing: -2px; }
.page-heading p { font-size: 13px; }
.session-card { padding: 25px; border-radius: 20px; border-color: var(--line); border-top: 4px solid var(--brand); box-shadow: 0 8px 30px #04429505; }
.session-card:nth-child(3n + 2) { border-top-color: var(--turquoise); }
.session-card:nth-child(3n) { border-top-color: #6e2383; }
.session-card h3 { font-size: 20px; }
.session-card p { font-size: 12px; line-height: 1.8; }
.session-card .eyebrow { font-size: 9px; color: var(--brand); letter-spacing: 1px; }
.section-heading h2 { font-size: 23px; }
.run-row { border-radius: 16px; }
.run-row strong { font-size: 13px; }
.run-code, .host-code { color: var(--brand); font-variant-numeric: tabular-nums; }
.editor-section { border-radius: 20px; padding: 28px; }
.editor-question-head h3 { font-size: 20px; }
.editor-actions { background: var(--brand); border-radius: 18px; box-shadow: 0 8px 25px #04429522; }
.editor-actions > .muted { color: #d1e4ff; }
.editor-actions .btn.quiet { border-color: #ffffff60; }
.editor-actions .btn.quiet:hover { background: #ffffff18; }
.host-sidebar { background: var(--brand); color: white; border: 0; border-radius: 22px; padding: 26px; }
.host-sidebar .eyebrow, .host-sidebar .host-code { color: white; }
.host-sidebar .host-code { text-align: center; font-size: 36px; letter-spacing: 5px; }
.host-sidebar .join-url { color: #d2edff; }
.host-sidebar .muted { color: #d6e7fb; font-size: 11px; line-height: 1.8; }
.host-sidebar hr { border-color: #ffffff38; }
.host-sidebar .btn { background: #ffffff10; color: white; border-color: #ffffff55; font-size: 11px; }
.host-sidebar .btn:hover:not(:disabled) { background: #ffffff25; }
.host-sidebar .btn.primary { background: white; color: var(--brand); border-color: white; }
.host-sidebar .btn.primary:hover:not(:disabled) { background: #e5f4fc; }
.host-sidebar .btn.danger { color: #ffe2eb; border-color: #ffcada80; }
.host-sidebar .btn.danger:hover:not(:disabled) { background: #81133e; }
.host-content .state-card { border-radius: 22px; }
.host-content .question-title { font-size: 28px; }
.qr { border-radius: 16px; padding: 14px; }
.empty-list { border-color: #c7d8ef; font-size: 13px; background: #ffffff70; }

/* Projection: the brand's deep blue keeps white question cards readable at distance. */
body[data-mode="projection"] { background: #062c61; color: white; }
body[data-mode="projection"] .topbar { background: #062c61; border-bottom-color: #ffffff22; }
body[data-mode="projection"] .brand-product { color: white; border-left-color: #ffffff40; }
body[data-mode="projection"] .brand-product span { color: #bcd6f5; }
body[data-mode="projection"] .top-meta { background: #ffffff0b; border-color: #ffffff2b; color: #e8f6ff; }
body[data-mode="projection"] .live-dot { background: #53d9cf; box-shadow: 0 0 0 4px #53d9cf15; }
body[data-mode="projection"] .footer { border-top-color: #ffffff22; color: #c1d3ed; }
body[data-mode="projection"] .footer strong { color: white; }
.projection-layout { max-width: 1560px; margin: 40px auto 56px; padding: 0 48px; }
.projection-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 38px; }
.projection-main { min-width: 0; }
.projection-main > .empty-state h1, #projection > .empty-state h1 { color: white; }
.projection-main .empty-state h1 { font-size: clamp(50px, 5vw, 78px); letter-spacing: -3px; line-height: 1.1; }
.projection-main .empty-state .accent, #projection > .empty-state .accent { color: #46d5e8; }
.projection-main > .empty-state p, #projection > .empty-state p { color: #d1e1f5; }
.projection-main .empty-state p { font-size: 20px; line-height: 1.7; }
.projection-main > .empty-state .eyebrow, #projection > .empty-state .eyebrow { color: #7ae0d8; }
.projection-main .play-top { margin-bottom: 25px; }
.projection-main .play-top .badge { color: #e7f5ff; background: #ffffff13; padding: 8px 16px; font-size: 12px; }
.projection-main .connection { color: #c7dcf7; font-size: 11px; }
.projection-main .connection.offline { color: #ffd2dc; }
.projection-main .state-card { color: var(--ink); border: 0; padding: 36px; border-radius: 26px; box-shadow: 0 20px 60px #001b4820; }
.projection-main .question-title { font-size: clamp(32px, 3.4vw, 52px); line-height: 1.2; letter-spacing: -1.8px; margin: 26px 0 30px; }
.projection-main .option { font-size: clamp(20px, 1.9vw, 28px); min-height: 112px; }
.projection-main .option-letter { width: 42px; height: 42px; font-size: 18px; }
.projection-main .timer { font-size: 28px; padding: 7px 15px; }
.projection-main .question-foot { font-size: 14px; }
.projection-main .result-label { font-size: 23px; }
.projection-main .result-count { font-size: 14px; }
.projection-main .result-progress { height: 14px; }
.projection-main .ranking h3 { font-size: 26px; }
.projection-main .rank-row { font-size: 21px; }
.projection-main .rank-points { font-size: 24px; }
.projection-main .empty-state > .badge { background: #daeffc; color: var(--brand); font-size: 13px; }
.projection-main .state-card .empty-state > .eyebrow { color: var(--brand); }
.projection-aside { padding: 30px 22px; border: 0; border-radius: 24px; background: white; color: var(--ink); }
.projection-aside .eyebrow { color: var(--brand); font-size: 10px; }
.projection-aside .host-code { font-size: 38px; letter-spacing: 4px; margin: 20px 0 12px; }
.projection-aside .muted { font-size: 10px; }
.projection-aside .qr { width: 205px; max-width: 100%; margin: 20px auto; padding: 12px; border: 1px solid var(--line); }
.projection-aside .join-url { font-size: 10px; color: var(--brand); line-height: 1.8; }

@media (max-width: 1100px) {
  .participant-layout { gap: 30px; }
  .intro { padding: 36px 30px 26px; }
  .intro h1 { font-size: 48px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: .9px; }
  .art-message { left: 100px; font-size: 9px; padding: 10px; }
  .art-dot { left: 240px; }
  .join-card { padding: 28px; }
  .projection-grid { grid-template-columns: minmax(0, 1fr) 230px; gap: 26px; }
  .projection-aside { padding: 26px 18px; }
  .projection-aside .host-code { font-size: 32px; }
}

@media (max-width: 760px) {
  .topbar { min-height: 78px; padding: 20px; gap: 12px; }
  .brand { gap: 12px; }
  .brand-logo { width: 121px; }
  .brand-product { padding-left: 12px; font-size: 15px; letter-spacing: -.4px; }
  .brand-product span { display: none; }
  .top-meta { font-size: 8px; padding: 7px 9px; gap: 6px; }
  .live-dot { width: 5px; height: 5px; box-shadow: none; }
  .participant-layout { max-width: 520px; padding: 0 20px; margin: 24px auto 0; }
  .intro { padding: 25px 26px; border-radius: 20px; }
  .intro h1 { font-size: 36px; letter-spacing: -1.5px; line-height: 1.12; margin: 0; }
  .intro .eyebrow, .intro > p, .intro-tags, .conversation-art, .intro-footnote { display: none; }
  .join-card { margin-top: 22px; padding: 25px; border-radius: 20px; }
  .step-label { font-size: 7px; letter-spacing: .7px; gap: 8px; margin-bottom: 20px; }
  .join-symbol { width: 26px; height: 26px; font-size: 17px; }
  .join-card h2 { font-size: 28px; }
  .join-card > p { font-size: 11px; margin-bottom: 22px; }
  .card-note { font-size: 9px; }
  .presenter-link { margin: 24px 20px 28px; font-size: 10px; }
  .footer { padding: 20px; font-size: 8px; flex-wrap: wrap; justify-content: center; text-align: center; gap: 8px; }
  .footer > span { width: 100%; }
  .play-panel { margin: 4px auto 10px; }
  .play-top { margin-bottom: 18px; }
  .play-top .badge { font-size: 9px; }
  .connection { font-size: 8px; }
  .state-card { padding: 24px 20px; border-radius: 20px; }
  .question-title { font-size: 26px; line-height: 1.25; }
  .option { min-height: 74px; font-size: 15px; padding: 16px; border-radius: 14px; }
  .option-letter { width: 32px; height: 32px; }
  .question-foot { font-size: 9px; line-height: 1.6; }
  .timer { font-size: 16px; }
  .feedback { padding: 14px; font-size: 11px; }
  .empty-state h2 { font-size: 29px; }
  .empty-state p { font-size: 12px; }
  .result-row { padding: 16px; }
  .result-label { font-size: 12px; gap: 10px; }
  .rank-row { font-size: 12px; gap: 8px; grid-template-columns: 28px 1fr auto; }
  .rank-points { font-size: 14px; }
  .rank-time { font-size: 8px; }
  .admin-layout { padding: 0 20px; margin: 28px auto 44px; }
  .login-card { padding: 28px 24px; margin: 12px auto; border-radius: 20px; }
  .login-card h1 { font-size: 34px; letter-spacing: -1.5px; }
  .login-card .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .page-heading h1 { font-size: 38px; }
  .page-heading p { font-size: 12px; }
  .session-card { padding: 24px; }
  .run-row .actions { gap: 8px; }
  .editor-section { padding: 22px 18px; }
  .editor-actions { padding: 12px; }
  .editor-actions > .muted { display: none; }
  .editor-actions > .actions { width: 100%; justify-content: space-between; }
  .editor-actions .btn { font-size: 10px; }
  .host-sidebar { padding: 24px; }
  .host-sidebar .actions { gap: 10px; }
  .host-sidebar .join-url { margin: 0 0 20px; }
  .host-content .question-title { font-size: 25px; }
  .projection-layout { padding: 0 20px; margin: 26px auto 44px; }
  .projection-grid { grid-template-columns: 1fr; gap: 24px; }
  .projection-main .empty-state h1 { font-size: 44px; letter-spacing: -2px; }
  .projection-main .empty-state p { font-size: 16px; }
  .projection-main .state-card { padding: 25px 20px; border-radius: 20px; }
  .projection-main .question-title { font-size: 29px; letter-spacing: -1px; }
  .projection-main .option { min-height: 80px; font-size: 19px; padding: 17px; }
  .projection-main .option-letter { width: 36px; height: 36px; font-size: 15px; }
  .projection-main .question-foot { font-size: 10px; }
  .projection-main .timer { font-size: 21px; }
  .projection-main .result-label { font-size: 17px; }
  .projection-main .rank-row { font-size: 16px; }
  .projection-main .rank-points { font-size: 18px; }
  .projection-aside { padding: 24px; }
  .projection-aside .host-code { font-size: 34px; margin: 12px 0 6px; }
  .projection-aside .qr { width: 140px; margin: 0; }
}

@media (max-width: 380px) {
  .topbar { padding: 18px 16px; }
  .brand-logo { width: 108px; }
  .brand { gap: 9px; }
  .brand-product { padding-left: 9px; font-size: 14px; }
  .top-meta { font-size: 7px; padding: 7px; }
  .participant-layout { padding: 0 16px; }
  .join-card { padding: 22px; }
  .intro h1 { font-size: 33px; }
}
