/* Training studio: calm, warm and friendly. Soft sage, cream and gold with
   gentle pastels; big touch targets for phones. */
.studio {
  --st-sage: #E7F3EC; --st-cream: #FFF8EC; --st-gold: #F4C842; --st-coral: #FFB59E; --st-sky: #E3F1FB; --st-lilac: #F1EDFF;
  --st-ink: #12201D; --st-muted: #4E625C;
  background:
    radial-gradient(900px 500px at 100% -10%, rgb(244 200 66 / .14), transparent 60%),
    radial-gradient(800px 500px at -10% 30%, rgb(45 190 143 / .10), transparent 60%),
    var(--bg);
}
.st-main { padding-top: 18px; padding-bottom: 60px; }
.st-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 6px; margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; scrollbar-width: none; }
.st-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.st-tabs a:hover { background: var(--soft); }
.st-tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.st-view { display: none; }
.st-view.on { display: block; animation: st-in .25s ease; }
@keyframes st-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Home */
.st-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; background: linear-gradient(135deg, #FFF8EC, #E7F3EC); border-radius: 28px; padding: 28px; border: 1px solid #E5EDE6; color: var(--st-ink); }
.st-hero h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.1; margin: 6px 0 16px; }
.st-hero-art { width: 100%; height: auto; border-radius: 22px; }
.st-kicker { display: inline-block; font-weight: 700; color: #0B6A4F; background: #DCF0E6; border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.st-quote { margin: 0; background: #FFFFFF; border-radius: 18px; padding: 18px 20px; box-shadow: 0 10px 26px rgb(18 32 29 / .08); border-left: 6px solid var(--st-gold); }
.st-quote-label { font-weight: 700; color: #8A6408; font-size: .9rem; }
.st-quote blockquote { margin: 6px 0 4px; font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.3; }
.st-quote figcaption { color: var(--st-muted); font-size: .95rem; }
.st-quote figcaption:not(:empty)::before { content: "— "; }
.st-join { margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.st-join-row { display: flex; gap: 10px; margin-top: 8px; }
.st-join-row input { font-family: var(--font-mono); font-size: 1.4rem; letter-spacing: .2em; text-transform: uppercase; max-width: 240px; }
.st-join-row input::placeholder { font-family: var(--font-body); font-size: 1rem; letter-spacing: normal; text-transform: none; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.st-chips button { border-radius: 999px; background: var(--soft); }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.st-tile { display: grid; gap: 4px; text-decoration: none; color: var(--st-ink); background: #FFFFFF; border: 1px solid #E5EDE6; border-radius: 22px; padding: 14px 14px 18px; transition: transform .18s ease, box-shadow .18s ease; }
.st-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(18 32 29 / .12); }
.st-tile img { width: 100%; height: auto; border-radius: 16px; margin-bottom: 6px; }
.st-tile b { font-family: var(--font-display); font-size: 1.2rem; }
.st-tile span { color: var(--st-muted); }
.st-lead-link { margin-top: 16px; }

/* Section headers and cards */
.st-head { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.st-head img { width: 150px; height: auto; border-radius: 18px; }
.st-head h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 4px; }
.st-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.st-card { border-radius: 20px; padding: 20px; margin-bottom: 16px; }
.st-card h3 { font-family: var(--font-display); margin: 0 0 8px; font-size: 1.25rem; }
.st-sub { font-family: var(--font-display); margin: 22px 0 10px; }
.st-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.st-row > input, .st-row > select { flex: 1 1 260px; }
.st-list { display: grid; gap: 10px; }
.st-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.st-item b { font-family: var(--font-display); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.st-empty { text-align: center; color: var(--muted); padding: 18px; }
.st-empty img { width: 160px; display: block; margin: 0 auto 8px; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 700; background: var(--soft); color: var(--accent); }
.pill.gold { background: #FDF0C4; color: #7A5806; }
.pill.done { background: #DCF0E6; color: #0B6A4F; }

/* Wellbeing */
.wq { margin: 0 0 16px; border: 0; padding: 0; }
.studio .wq legend { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: 8px; text-transform: none; letter-spacing: normal; color: var(--ink); padding: 0; }
.studio .wq legend::before { content: none; display: none; }
.faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 560px; }
.faces label { cursor: pointer; }
.faces input { position: absolute; opacity: 0; pointer-events: none; }
.faces span { display: grid; place-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font-size: 1.7rem; transition: transform .12s ease, border-color .12s ease; }
.faces span small { font-size: .72rem; color: var(--muted); font-weight: 600; }
.faces input:checked + span { border-color: var(--accent); background: var(--soft); transform: scale(1.06); }
.faces input:focus-visible + span { outline: 3px solid var(--st-gold); outline-offset: 2px; }
.st-encourage { background: linear-gradient(135deg, #FFF8EC, #FFF1EA); border: 1px solid #F6DCCF; color: var(--st-ink); }
.st-encourage h3 { font-size: 1.4rem; }
.st-encourage blockquote { margin: 10px 0 0; padding-left: 14px; border-left: 4px solid var(--st-gold); font-family: var(--font-display); font-size: 1.15rem; }
.st-encourage .support { margin-top: 12px; background: #FFFFFF; border-radius: 12px; padding: 10px 12px; }
.w-history { display: flex; gap: 8px; flex-wrap: wrap; }
.w-dot { display: grid; place-items: center; width: 56px; padding: 6px 0; border-radius: 14px; background: var(--soft); font-size: 1.3rem; }
.w-dot small { font-size: .7rem; color: var(--muted); }
.w-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 10px 0; }
.w-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.w-stat b { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--accent); }
.meter5 { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; margin-top: 6px; }
.meter5 span { display: block; height: 100%; background: linear-gradient(90deg, #8CC7AE, #2DBE8F); border-radius: 999px; }
.trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 140px; margin-top: 10px; }
.trend div { display: grid; gap: 4px; justify-items: center; align-content: end; height: 100%; font-size: .8rem; color: var(--muted); }
.trend i { display: block; width: 70%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #F4C842, #8CC7AE); }
.trend i.none { background: var(--soft); height: 6px !important; }
.quotes-wall { display: grid; gap: 8px; margin-top: 10px; }
.quotes-wall p { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }

/* Bars (polls, quizzes, survey choices) */
.bars5 { display: grid; gap: 10px; }
.bar5 { display: grid; gap: 4px; }
.bar5 .lab { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.bar5 .trk { height: 18px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar5 .trk span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8CC7AE, #2DBE8F); transition: width .5s ease; }
.bar5.correct .trk span { background: linear-gradient(90deg, #F4C842, #E8A90E); }
.bar5.correct .lab::after { content: "✓ correct"; color: #8A6408; }

/* Host screen: readable from the back of the hall */
.host-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.host-top h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); margin: 4px 0 0; }
.host-code { display: grid; justify-items: end; background: #12201D; color: #FFFFFF; border-radius: 20px; padding: 12px 20px; }
.host-code strong { font-family: var(--font-mono); font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: .18em; color: var(--st-gold); line-height: 1.1; }
.host-code span { font-size: .95rem; opacity: .9; }
.host-stage { border-radius: 24px; padding: clamp(18px, 4vw, 36px); min-height: 320px; }
.host-stage .kind { margin-bottom: 8px; }
.host-stage h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 3.4vw, 2.3rem); line-height: 1.2; margin: 0 0 18px; }
.host-stage .bar5 .lab { font-size: 1.15rem; }
.host-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.host-controls button { font-size: 1.05rem; padding: 10px 18px; }
.answer-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.answer-wall p { margin: 0; background: #FFF8EC; border: 1px solid #F1E2BD; border-radius: 16px; padding: 14px; color: var(--st-ink); font-size: 1.05rem; animation: st-in .3s ease; }
.answer-wall p b { display: block; color: #0B6A4F; font-size: .9rem; }
.lobby { text-align: center; }
.lobby img { width: 220px; }
.lobby h3 { margin-top: 8px; }
.edit-act { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; background: var(--surface); }
.edit-act .st-row { margin: 0; }
.edit-act textarea { min-height: 60px; }

/* Participant screen (phones) */
.join-card { max-width: 620px; margin: 0 auto; border-radius: 24px; padding: 22px; }
.join-card h2 { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; margin: 6px 0 16px; }
.choices { display: grid; gap: 10px; }
.choices button { text-align: left; font-size: 1.1rem; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); }
.choices button[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); }
.choices button.right { border-color: #E8A90E; background: #FFF4D2; }
.join-card textarea { font-size: 1.05rem; }
.join-done { text-align: center; color: var(--accent); font-weight: 700; margin-top: 10px; }
.progress-dots { display: flex; gap: 6px; }
.progress-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.progress-dots i.on { background: var(--accent); }

/* Shared practice and coaching */
.post-card { display: grid; gap: 6px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; transition: transform .15s ease, box-shadow .15s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(18 32 29 / .1); }
.post-card b { font-family: var(--font-display); font-size: 1.1rem; }
.share-preview { max-width: 260px; border-radius: 12px; margin: 6px 0; display: block; }
.post-image { max-width: 100%; max-height: 520px; border-radius: 16px; display: block; margin: 10px 0; }
.post-source { max-height: 260px; overflow: auto; white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 12px; font-size: .95rem; }
.guide { background: linear-gradient(135deg, #FFF8EC, #E7F3EC); border-radius: 18px; padding: 16px 18px; margin: 14px 0; color: var(--st-ink); }
.guide h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.1rem; }
.guide ol { margin: 8px 0; padding-left: 22px; display: grid; gap: 6px; }
.comments { display: grid; gap: 10px; margin: 12px 0; }
.comment { border-radius: 14px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); }
.comment.warm { border-left: 5px solid #F4C842; }
.comment.cool { border-left: 5px solid #2DBE8F; }
.comment.question { border-left: 5px solid #8B6CF0; }
.comment small { color: var(--muted); }
.lf-list { display: grid; gap: 6px; margin: 6px 0 12px; }
.note { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.note .action { background: #FFF4D2; border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.note ul { margin: 0; padding-left: 20px; }

/* Record */
.st-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.st-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.st-stats b { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--accent); }
.st-mins { max-width: 120px; }
.rec-item { border-top: 1px solid var(--line); padding: 10px 0; }
.rec-item:first-of-type { border-top: 0; }
.rec-item blockquote { margin: 6px 0 0; padding-left: 12px; border-left: 3px solid var(--st-gold); }

@media (max-width: 760px) {
  .st-hero { grid-template-columns: 1fr; padding: 18px; }
  .st-hero-art { order: -1; }
  .st-head { grid-template-columns: 90px 1fr; }
  .st-head img { width: 90px; }
  .host-code { justify-items: start; }
}
@media print {
  .st-tabs, header.top, #recForm, #printRecord, .st-head img { display: none !important; }
  .st-view { display: none !important; }
  .st-view.on { display: block !important; }
}
.studio .field input, .studio .field select, .studio .field textarea { width: 100%; }
@media (max-width: 760px) {
  .st-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .st-tile { padding: 10px 10px 14px; border-radius: 18px; }
  .st-tile b { font-size: 1.02rem; }
  .st-tile span { font-size: .88rem; }
}

/* Wins */
.st-win { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; margin: 0 0 18px; text-decoration: none; color: var(--st-ink); background: linear-gradient(135deg, #FFF3D9, #FFF8EC); border: 1px solid #F1E2BD; border-radius: 20px; padding: 14px 18px; }
.st-win .trophy { grid-row: span 2; font-size: 2rem; }
.st-win b { font-family: var(--font-display); font-size: 1.1rem; }
.st-win span { color: var(--st-muted); }
.win-card { display: grid; gap: 6px; background: #FFFFFF; color: var(--st-ink); border: 1px solid #F1E2BD; border-radius: 18px; padding: 16px; border-top: 5px solid var(--st-gold); }
.win-card b { font-family: var(--font-display); font-size: 1.1rem; }
.win-card p { margin: 0; }
.win-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cheer { border-radius: 999px; padding: 6px 12px; background: #FFF8EC; border: 1px solid #F1E2BD; }
.cheer[aria-pressed="true"] { background: #FDF0C4; border-color: #E8A90E; font-weight: 700; }

/* Wellbeing: questions on the left, a warm companion note on the right. */
.well-form { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.well-side {
  position: sticky; top: 16px; display: grid; gap: 10px; padding: 22px; border-radius: 22px;
  background: linear-gradient(160deg, var(--st-cream), #FFF1EA 55%, var(--st-sage)); border: 1px solid #F1E2D3; color: var(--st-ink);
}
.well-sun { font-size: 2.2rem; line-height: 1; }
.well-kicker { margin: 0; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #8A5A2B; }
.well-side h3 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; }
.well-side > p { margin: 0; color: var(--st-muted); font-size: 1.02rem; line-height: 1.5; }
.well-steps { list-style: none; display: flex; gap: 8px; margin: 4px 0; padding: 0; }
.well-steps li { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #FFFFFF; border: 2px dashed #E3D6C6; font-weight: 700; color: var(--st-muted); font-size: .9rem; transition: transform .15s ease; }
.well-steps li.done { border-style: solid; font-size: 1.3rem; transform: scale(1.05); }
.well-steps li.low { border-color: var(--st-coral); }
.well-steps li.mid { border-color: var(--st-gold); }
.well-steps li.high { border-color: #3FBF8F; }
.well-quote { margin: 6px 0 0; padding: 12px 14px; border-left: 4px solid var(--st-gold); background: rgb(255 255 255 / .7); border-radius: 0 12px 12px 0; font-family: var(--font-display); font-size: 1.08rem; }
.well-quote small { display: block; margin-top: 6px; font-family: var(--font-body, inherit); font-size: .82rem; color: var(--st-muted); }
.well-support { margin: 0; background: #FFFFFF; border-radius: 12px; padding: 10px 12px; font-size: .92rem; }
.well-support[hidden] { display: none; }
@media (max-width: 900px) { .well-form { grid-template-columns: 1fr; } .well-side { position: static; } }

/* Forms: room above the buttons, and actions in one tidy row. */
.studio .field { margin: 0 0 14px; }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 4px; }
.st-actions .cta { margin-left: auto; }
.st-grid > .st-empty { grid-column: 1 / -1; }
