:root {
  --red: #ff3e36; --orange: #f4993a; --yellow: #ebe43d;
  --dark: #595959; --grey: #a8a8a8; --light: #ededed; --ink: #2b2b2b; --bg: #f7f5f2;
  --grad: linear-gradient(90deg, #ff3e36 0%, #f4993a 55%, #ebe43d 100%);
  --head: 'adineue PRO KZ', 'Montserrat', 'Segoe UI', sans-serif;
  --body: 'Opinion Pro', 'Open Sans', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); }
h1, h2, h3 { font-family: var(--head); margin: 0 0 12px; }
.muted { color: var(--dark); } .error { color: #c62828; font-weight: 600; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: #fff; border-bottom: 4px solid transparent; border-image: var(--grad) 1; position: sticky; top: 0; z-index: 5; gap: 12px; }
.brand { font-family: var(--head); font-size: 22px; color: var(--dark); white-space: nowrap; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.btn { font-family: var(--head); font-weight: 700; font-size: 16px; border: 0; border-radius: 14px; padding: 12px 22px; cursor: pointer; color: #fff; background: linear-gradient(90deg, #ff3e36, #f4993a); box-shadow: 0 4px 14px rgba(255, 62, 54, .25); transition: transform .1s, opacity .2s; }
.btn:hover { transform: translateY(-1px); } .btn:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.btn.big { font-size: 20px; padding: 16px 34px; margin-top: 18px; }
.btn.ghost { background: #fff; color: var(--dark); border: 2px solid var(--light); box-shadow: none; }
.btn.small { font-size: 13px; padding: 6px 12px; }
.btn.secondary { background: var(--dark); box-shadow: none; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 2px solid var(--light); border-radius: 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }

/* Ученик */
.stage { max-width: 920px; margin: 0 auto; padding: 28px 16px 60px; }
.card { background: #fff; border-radius: 24px; padding: 32px; box-shadow: 0 10px 40px rgba(0, 0, 0, .06); }
.center { text-align: center; } .narrow { max-width: 620px; margin: 30px auto; }
.hero-mark { font-size: 64px; line-height: 1; margin-bottom: 12px; }
.start { max-width: 460px; margin: 12vh auto 0; text-align: center; position: relative; z-index: 1; }
.slogan { font-family: var(--head); font-size: 14px; font-weight: 800; letter-spacing: 1.5px; white-space: nowrap; text-transform: uppercase; margin: 0 0 18px; background: linear-gradient(90deg, #ff3e36, #f4993a); /* без жёлтого — он плохо читается на светлом фоне */ -webkit-background-clip: text; background-clip: text; color: transparent; }
.start-title { font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 22px; }
.start-title span { color: var(--grey); font-weight: 600; }
.start-title i { font-style: normal; }
.start .code-input { margin-top: 0; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .06); border-color: transparent; }
.start .code-input:focus { border-color: var(--orange); }
.start .btn.big { width: 100%; max-width: 320px; }
.page-wave { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 160px; opacity: .45; pointer-events: none; }
@media (max-width: 640px) {
  .page-wave { height: 110px; } .start { margin-top: 8vh; }
  .start-title { font-size: 22px; } .slogan { white-space: normal; font-size: 13px; } .start-title span { display: block; font-size: 18px; margin-top: 4px; } .start-title i { display: none; }
}
html, body { overflow-x: hidden; }
.lead { font-size: 18px; line-height: 1.55; color: #444; }
.kicker { font-family: var(--head); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--red); font-weight: 700; }
.code-input { font-family: var(--head); font-size: 40px; text-align: center; letter-spacing: 10px; max-width: 320px; margin: 18px auto 0; display: block; text-transform: uppercase; }
.section-list { display: inline-flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 10px; font-size: 17px; }
.section-list .num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-family: var(--head); margin-right: 10px; font-size: 14px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.step { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--light); color: var(--grey); font-weight: 800; font-family: var(--head); font-size: 13px; }
.step.now { background: var(--grad); color: #fff; } .step.done { background: #2b9a66; color: #fff; }
.progress { height: 8px; background: var(--light); border-radius: 4px; overflow: hidden; margin-bottom: 18px; }
.progress div { height: 100%; background: var(--grad); transition: width .3s; }
.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.prompt { font-size: 24px; line-height: 1.35; margin: 6px 0 22px; font-weight: 700; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.opts.likert { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.opts.svg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt { font: 600 18px var(--body); padding: 18px 14px; border: 3px solid var(--light); background: #fff; border-radius: 16px; cursor: pointer; color: var(--ink); transition: border-color .15s, transform .1s; min-height: 64px; }
.opt:hover { border-color: #f9c79a; transform: translateY(-1px); }
.opt.sel { border-color: var(--orange); background: #fff6ec; box-shadow: 0 0 0 3px rgba(244, 153, 58, .2); }
.opt-wide { grid-column: 1 / -1; text-align: left; }
.opt-svg { padding: 8px; display: grid; place-items: center; } .opt-svg svg { width: 100%; max-width: 110px; height: auto; }
.sequence { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 0 0 22px; flex-wrap: wrap; }
.sequence svg { width: 90px; height: 90px; }
.sequence .emo { width: 90px; height: 90px; border-radius: 12px; border: 2px solid #d6d6d6; display: grid; place-items: center; font-size: 46px; background: #fff; }
.qmark { width: 90px; height: 90px; border-radius: 12px; border: 3px dashed var(--orange); display: grid; place-items: center; font: 900 40px var(--head); color: var(--orange); }
.sample { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; gap: 4px; font-weight: 700; color: var(--dark); }
.audio-btn { display: block; margin: 0 auto 22px; width: 96px; height: 96px; border-radius: 50%; border: 0; font-size: 44px; cursor: pointer; background: linear-gradient(135deg, #ff3e36, #f4993a); box-shadow: 0 6px 20px rgba(255, 62, 54, .3); }
.opts.pic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opts.pic-grid .opt { font-size: 44px; min-height: 110px; line-height: 1.1; }
@media (max-width: 640px) { .opts.pic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.open { min-height: 200px; font-size: 17px; line-height: 1.5; }
.actions { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }
.confetti { background: linear-gradient(160deg, #fff4ea, #fffbe0); }
@media (max-width: 640px) {
  .card { padding: 20px; border-radius: 18px; } .prompt { font-size: 20px; }
  .opts.svg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sequence svg, .qmark { width: 62px; height: 62px; }
  .topbar { padding: 10px 16px; } .brand { font-size: 18px; }
}

/* Админка */
.admin .wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
.admin .card { padding: 24px; margin-bottom: 20px; border-radius: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--dark); }
label.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 14px 0; }
label.chk input { width: auto; margin-top: 3px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; color: var(--grey); text-transform: uppercase; letter-spacing: .5px; padding: 8px; border-bottom: 2px solid var(--light); }
table.list td { padding: 10px 8px; border-bottom: 1px solid var(--light); vertical-align: middle; }
table.list tr:hover td { background: #fffaf4; cursor: pointer; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.pill.new { background: #eef2ff; color: #3f51b5; } .pill.in_progress { background: #fff4e5; color: #e67e00; } .pill.finished { background: #e7f6ee; color: #2b9a66; }
.code-big { font-family: var(--head); font-size: 34px; letter-spacing: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .spacer { flex: 1; }
.obs-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--light); }
.seg { display: inline-flex; border: 2px solid var(--light); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 10px; font: 600 12px var(--body); cursor: pointer; color: var(--dark); }
.seg button.on { background: var(--orange); color: #fff; }
.open-ans { background: #fafafa; border-radius: 10px; padding: 12px; white-space: pre-wrap; margin: 8px 0; font-size: 14px; }
.stat { display: inline-flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; background: #fafafa; margin: 0 8px 8px 0; }
.stat b { font: 900 22px var(--head); } .stat span { font-size: 12px; color: var(--dark); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 50; }
.hidden { display: none !important; }
