:root {
  color-scheme: light;
  --bg: #fff8ef;
  --bg-2: #eefbf5;
  --card: rgba(255, 255, 255, 0.86);
  --card-solid: #ffffff;
  --text: #243047;
  --muted: #738096;
  --line: rgba(58, 46, 31, 0.12);
  --primary: #2aa48f;
  --primary-dark: #177c70;
  --orange: #ff8d5c;
  --yellow: #f7c85d;
  --blue: #6fb5e9;
  --pink: #f7a4ab;
  --danger: #d95f68;
  --shadow: 0 30px 80px rgba(77, 51, 24, 0.13);
  --shadow-soft: 0 16px 40px rgba(77, 51, 24, 0.08);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--yellow) 42%, transparent), transparent 26%),
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 28%),
    radial-gradient(circle at 70% 90%, color-mix(in srgb, var(--orange) 28%, transparent), transparent 30%),
    linear-gradient(145deg, var(--bg), var(--bg-2));
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, color-mix(in srgb, var(--yellow) 34%, transparent) 0 7px, transparent 8px),
    radial-gradient(circle, color-mix(in srgb, var(--blue) 24%, transparent) 0 5px, transparent 6px),
    radial-gradient(circle, color-mix(in srgb, var(--pink) 22%, transparent) 0 6px, transparent 7px);
  background-position: 8% 24%, 84% 34%, 44% 78%;
  background-size: 340px 340px, 260px 260px, 420px 420px;
  opacity: 0.38;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--yellow) 42%, transparent);
}

.auth-active .shell {
  display: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.app-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px;
  background: color-mix(in srgb, var(--card-solid) 78%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--primary), var(--blue) 55%, var(--orange));
  border-radius: 18px 24px 18px 24px;
  box-shadow: 0 16px 28px color-mix(in srgb, var(--primary) 26%, transparent);
  transform: rotate(-4deg);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.nav {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: 7px;
  min-width: 0;
  padding: 6px;
  background: color-mix(in srgb, var(--bg) 55%, var(--card-solid));
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav-item {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.nav-item:hover,
.chip:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.nav-item.active {
  color: var(--text);
  background: var(--card-solid);
  box-shadow: 0 10px 24px rgba(77, 51, 24, 0.08);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item b {
  font-size: 13px;
  font-weight: 850;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chip,
.primary,
.secondary,
.segmented button {
  border: 0;
  border-radius: 999px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.chip {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--card-solid) 82%, var(--bg));
  box-shadow: inset 0 0 0 1px var(--line);
}

.icon-chip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip-label,
.chip span {
  font-size: 12px;
  font-weight: 900;
}

.admin-switch {
  display: none;
}

.is-admin .admin-switch {
  display: inline-flex;
}

.nav .nav-item:nth-child(n+8) {
  display: none;
}

.main {
  padding: 12px 4px 48px;
}

.eyebrow,
.step-kicker,
.question-label,
.survey-count,
.stat span,
.muted {
  color: var(--muted);
}

.eyebrow,
.step-kicker,
.question-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeUp 0.26s var(--ease) both;
}

.home-layout,
.ai-layout,
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 20px;
  margin-top: 22px;
}

.side-stack {
  display: grid;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0 18px;
}

.section-head h2,
.panel h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.panel,
.stat,
.chart-panel,
.exercise-card,
.note-card,
.norm-card,
.mini-banner {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.panel {
  padding: clamp(22px, 3vw, 34px);
}

.soon-panel {
  max-width: 680px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 18px;
  margin-top: 8px;
}

.soon-panel .panel-icon {
  grid-row: 1 / span 2;
}

.soon-panel h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.soon-panel p {
  margin: 0;
  line-height: 1.5;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-head.compact {
  align-items: flex-start;
}

.panel-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: linear-gradient(145deg, color-mix(in srgb, var(--yellow) 58%, var(--card-solid)), color-mix(in srgb, var(--orange) 20%, var(--card-solid)));
  border-radius: 18px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.mini-banner {
  padding: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--card-solid)), color-mix(in srgb, var(--yellow) 24%, var(--card-solid)));
}

.mini-banner strong,
.mini-banner span {
  display: block;
}

.mini-banner strong {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.mini-banner span {
  color: var(--muted);
  line-height: 1.5;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form.single {
  grid-template-columns: 1fr;
}

.wide {
  grid-column: 1 / -1;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input,
select,
textarea,
.select {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  color: var(--text);
  background: color-mix(in srgb, var(--card-solid) 70%, var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  background: var(--card-solid);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

input[type="file"] {
  padding: 11px 14px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  color: var(--text);
  background: var(--card-solid);
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.primary,
.secondary {
  min-height: 54px;
  padding: 0 22px;
  font-weight: 950;
}

.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 32px color-mix(in srgb, var(--primary) 24%, transparent);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px color-mix(in srgb, var(--primary) 28%, transparent);
}

.secondary {
  color: var(--text);
  background: color-mix(in srgb, var(--card-solid) 76%, var(--blue));
  box-shadow: inset 0 0 0 1px var(--line);
}

.hidden {
  display: none !important;
}

.norms,
.notes-list,
.exercise-list,
.material-grid {
  display: grid;
  gap: 16px;
}

.norm-card {
  padding: 18px;
}

.norm-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 950;
}

.norm-card span {
  color: var(--muted);
  line-height: 1.45;
}

.exercise-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.exercise-card {
  overflow: hidden;
  min-height: 410px;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.exercise-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.exercise-card:focus-visible {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent), var(--shadow);
}

.exercise-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #151a22;
}

.exercise-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef4f0;
}

.video-cover {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
}

.video-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 22, 27, 0.16), rgba(16, 22, 27, 0.48));
}

.video-cover-image,
.video-cover-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-cover-image {
  filter: blur(1.5px) saturate(0.9);
  transform: scale(1.025);
}

.video-cover-backdrop {
  background:
    radial-gradient(circle at 74% 26%, rgba(255, 255, 255, 0.19), transparent 28%),
    linear-gradient(145deg, var(--primary), var(--primary-dark));
}

.play-button {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: transform 0.16s var(--ease), background 0.16s var(--ease);
}

.play-button svg {
  width: 29px;
  height: 29px;
  fill: white;
}

.exercise-card:hover .play-button {
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.06);
}

.exercise-body {
  flex: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 20px;
}

.exercise-body h3,
.note-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.22;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.exercise-body h3 {
  min-height: 0;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.exercise-body .muted {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.paid-placeholder {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  font-size: 44px;
}

.video-back {
  margin: 28px 0 18px;
}

.video-page {
  display: grid;
  gap: 22px;
}

.video-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: min(72vh, 720px);
  background: #101418;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.video-stage > img,
.video-stage > .video-placeholder,
.video-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-stage > img {
  object-fit: cover;
}

.video-placeholder {
  display: grid !important;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  font-size: clamp(56px, 10vw, 96px);
}

.video-stage-action {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: rgba(16, 20, 24, 0.3);
}

.video-stage-action small {
  padding: 8px 12px;
  color: white;
  background: rgba(16, 20, 24, 0.56);
  border-radius: 999px;
  font-weight: 750;
}

.video-start {
  display: grid;
  place-items: center;
  width: clamp(70px, 9vw, 84px);
  height: clamp(70px, 9vw, 84px);
  padding: 0;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.16s var(--ease);
}

.video-start:hover {
  background: var(--primary);
  transform: scale(1.06);
}

.video-start svg {
  width: clamp(32px, 4vw, 38px);
  height: clamp(32px, 4vw, 38px);
  fill: currentColor;
}

.video-paywall-label {
  padding: 7px 13px;
  color: white;
  background: rgba(16, 20, 24, 0.62);
  border-radius: 999px;
  font-size: 14px;
}

.video-meta {
  max-width: 760px;
}

.video-meta h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.video-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.video-stage.fullscreen-player {
  position: fixed;
  inset: 0;
  z-index: 2000;
  width: 100vw;
  height: 100vh;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  background: #000;
}

.video-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 48px;
  height: 48px;
  color: white;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

body.player-active {
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: color-mix(in srgb, var(--text) 74%, var(--orange));
  background: color-mix(in srgb, var(--yellow) 24%, var(--card-solid));
  border: 1px solid color-mix(in srgb, var(--yellow) 34%, var(--line));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.age-norm-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.note-card {
  padding: 22px;
}

.material-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.material-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.material-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.material-choice-grid button {
  min-height: 180px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--text);
  background: linear-gradient(145deg, color-mix(in srgb, var(--yellow) 18%, var(--card-solid)), color-mix(in srgb, var(--primary) 12%, var(--card-solid)));
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.material-choice-grid button.active {
  outline: 3px solid color-mix(in srgb, var(--primary) 26%, transparent);
}

.material-choice-grid strong {
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
}

.material-choice-grid small {
  color: var(--muted);
  font-weight: 850;
}

.recommended-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  background: color-mix(in srgb, var(--yellow) 16%, var(--card-solid));
  border: 1px solid color-mix(in srgb, var(--yellow) 38%, var(--line));
  border-radius: 30px;
}

.recommended-strip > strong {
  grid-column: 1 / -1;
  font-size: 18px;
  font-weight: 950;
}

.material-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.material-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.material-card a.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.locked iframe {
  opacity: 0.22;
}

.locked .badge,
.material-card.locked .badge {
  background: color-mix(in srgb, var(--orange) 24%, var(--card-solid));
}

.subscription-card {
  display: grid;
  gap: 14px;
  margin: 20px 0;
  padding: 20px;
  background: color-mix(in srgb, var(--yellow) 18%, var(--card-solid));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.subscription-card p {
  margin: 0;
}

.subscription-card strong {
  font-size: 20px;
}

.subscription-card img {
  width: min(220px, 100%);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.admin-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-tabs,
.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.admin-tabs {
  margin: 30px 0 18px;
}

.resource-tabs {
  margin-bottom: 22px;
}

.material-access-tabs {
  margin: 22px 0;
}

.admin-tabs button,
.resource-tabs button {
  min-height: 48px;
  padding: 0 20px;
  color: var(--muted);
  background: var(--card-solid);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 900;
}

.admin-tabs button.active,
.resource-tabs button.active {
  color: white;
  background: var(--primary);
  box-shadow: none;
}

.upload-progress {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(15, 23, 36, 0.05);
  border-radius: 14px;
}
.upload-progress.active { display: block; }
.upload-progress-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 36, 0.1);
  overflow: hidden;
}
.upload-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2aa48f, #4cc9b0);
  transition: width 0.15s ease-out;
}
.upload-progress.failed .upload-progress-fill {
  background: linear-gradient(90deg, #e36b6b, #ff8a8a);
}
.upload-progress.indeterminate .upload-progress-fill {
  width: 35%;
  animation: upload-progress-slide 1.2s linear infinite;
}
@keyframes upload-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(380%); }
}
.upload-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font: 600 12px/1.2 system-ui, sans-serif;
  color: #4f5b6b;
}
.upload-progress-value { font-variant-numeric: tabular-nums; }

.admin-panels {
  max-width: 900px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
  animation: fadeUp 0.22s var(--ease) both;
}

.wide-admin {
  grid-column: 1 / -1;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-actions button {
  min-height: 42px;
}

.admin-video-help {
  margin: 18px 0 0;
  padding: 14px 16px;
  color: var(--muted);
  background: color-mix(in srgb, var(--blue) 12%, var(--card-solid));
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.admin-video-help code {
  color: var(--primary-dark);
  font-weight: 950;
}

.admin-library-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.admin-library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--card-solid) 82%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 16px;
}

.admin-library-item > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.admin-library-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger {
  min-height: 42px;
  padding: 0 15px;
  color: #b63e39;
  background: #fff0ec;
  border: 1px solid #f1cbc2;
  font-weight: 850;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 22px;
  margin-top: 28px;
  align-items: start;
}

.profile-summary {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: clamp(22px, 3vw, 32px);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border-radius: 50%;
  font: 950 26px/1 "Segoe UI", Arial, sans-serif;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--primary) 22%, transparent);
}

.profile-hero h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.profile-hero .muted {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.profile-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-summary-list div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--card-solid) 76%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 18px;
}

.profile-summary-list .full {
  grid-column: 1 / -1;
}

.profile-summary-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-summary-list strong {
  font-size: 16px;
  word-break: break-word;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--primary) 14%, var(--card-solid));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  color: var(--primary-dark);
}

.profile-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.profile-status.inactive {
  color: #b63e39;
  background: #fff0ec;
}

.profile-status.inactive::before {
  background: #d95f68;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-actions button {
  flex: 1 1 auto;
}

.admin-code-card {
  margin-top: 22px;
}

.admin-code-card .panel-head .panel-icon {
  background: linear-gradient(145deg, color-mix(in srgb, var(--orange) 50%, var(--card-solid)), color-mix(in srgb, var(--pink) 30%, var(--card-solid)));
}

.admin-code-card.hidden { display: none; }

.ai-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--card-solid)), color-mix(in srgb, var(--blue) 14%, var(--card-solid)));
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.ai-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ai-card-body strong {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
}
.ai-card-body .muted {
  font-size: 13px;
  font-weight: 800;
}
.ai-card-arrow {
  font-size: 20px;
  font-weight: 950;
  color: var(--primary-dark);
}

.edit-modal-card {
  display: block;
  width: min(720px, 100%);
  max-height: calc(100svh - 32px);
  height: auto;
  padding: clamp(20px, 3vw, 32px);
  overflow: auto;
  background: var(--card-solid);
}
.edit-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.edit-modal-head h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.05em;
}
.admin-library-item .admin-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-library-item .secondary {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.bunny-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: color-mix(in srgb, var(--card-solid) 86%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 22px;
}

.bunny-picker-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: color-mix(in srgb, var(--bg) 60%, var(--card-solid));
  border: 1px solid var(--line);
  border-radius: 999px;
}

.bunny-picker-tabs button {
  flex: 1;
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.bunny-picker-tabs button.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 24%, transparent);
}

.bunny-picker-pane.hidden { display: none; }

.bunny-picker-toolbar {
  display: flex;
  gap: 8px;
}

.bunny-picker-toolbar .bunny-search {
  flex: 1 1 auto;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 14px;
}

.bunny-picker-toolbar .secondary {
  min-height: 42px;
  padding: 0 14px;
  font-size: 13px;
}

.bunny-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
}

.bunny-grid::-webkit-scrollbar { width: 6px; }
.bunny-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

.bunny-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--card-solid);
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bunny-card:hover { transform: translateY(-2px); }

.bunny-card.selected {
  border-color: var(--primary);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 22%, transparent);
}

.bunny-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 24%, var(--card-solid)), color-mix(in srgb, var(--blue) 22%, var(--card-solid)));
  background-size: cover;
  background-position: center;
}

.bunny-card-body {
  display: grid;
  gap: 4px;
  padding: 8px 10px 10px;
}

.bunny-card-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bunny-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bunny-card-status {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(8, 11, 14, 0.7);
  color: white;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.bunny-card.used {
  opacity: 0.55;
}

.bunny-card.used::after {
  content: attr(data-used-label);
  position: absolute;
  inset: auto 8px 8px;
  padding: 4px 8px;
  background: var(--orange);
  color: white;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.bunny-loading {
  display: grid;
  place-items: center;
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bunny-selected {
  margin: 0;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--primary) 12%, var(--card-solid));
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  border-radius: 12px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.bunny-dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 18px;
  text-align: center;
  background: color-mix(in srgb, var(--card-solid) 78%, var(--bg));
  border: 2px dashed color-mix(in srgb, var(--primary) 38%, var(--line));
  border-radius: 22px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bunny-dropzone:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--card-solid));
}

.bunny-dropzone.dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, var(--card-solid));
}

.bunny-dropzone strong {
  font-size: 15px;
  font-weight: 900;
}

.bunny-dropzone .muted {
  font-size: 12px;
  font-weight: 700;
}

.bunny-dropzone-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 14%, var(--card-solid));
  font-size: 22px;
}

.bunny-dropzone-name {
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
}

.bunny-dropzone.has-file {
  border-style: solid;
  background: color-mix(in srgb, var(--primary) 10%, var(--card-solid));
}

.preview-dropzone {
  padding: 22px 16px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 28px;
}

.certificate-card {
  margin: 0;
  padding: 18px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--yellow) 18%, var(--card-solid)), color-mix(in srgb, var(--blue) 14%, var(--card-solid)));
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 34px;
  box-shadow: var(--shadow-soft);
}

.certificate-card img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: white;
  border-radius: 24px;
  box-shadow: 0 12px 26px rgba(77, 51, 24, 0.12);
}

.certificate-card figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.about-card {
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--yellow) 26%, transparent), transparent 26%),
    radial-gradient(circle at 88% 86%, color-mix(in srgb, var(--pink) 24%, transparent), transparent 28%),
    var(--card);
}

.about-card h2 {
  font-size: clamp(42px, 6vw, 76px);
}

.about-card p:not(.eyebrow) {
  margin: 16px 0 0;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.about-badges span,
.contact-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.about-badges span {
  color: color-mix(in srgb, var(--text) 82%, var(--primary));
  background: color-mix(in srgb, var(--yellow) 26%, var(--card-solid));
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-grid a {
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  box-shadow: 0 14px 26px color-mix(in srgb, var(--primary) 18%, transparent);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.analytics-card {
  min-height: 116px;
  padding: 18px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--card-solid) 82%, var(--yellow)), color-mix(in srgb, var(--card-solid) 90%, var(--primary)));
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 24px;
}

.analytics-card.wide {
  grid-column: span 2;
}

.analytics-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.analytics-card strong {
  display: block;
  margin-top: 8px;
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
  color: var(--primary-dark);
}

.analytics-card p {
  margin: 10px 0 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.45;
}

.brand-mark,
.panel-icon,
.material-card,
.about-card,
.certificate-card {
  animation: softPop 0.45s var(--ease) both;
}

@keyframes softPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: color-mix(in srgb, var(--card-solid) 66%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 999px;
}

.segmented button {
  min-height: 38px;
  padding: 0 18px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.segmented button.active {
  color: var(--text);
  background: var(--card-solid);
  box-shadow: 0 9px 20px rgba(77, 51, 24, 0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  padding: 24px;
}

.stat::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  border-radius: 34px;
  background: color-mix(in srgb, var(--yellow) 26%, transparent);
  transform: rotate(18deg);
}

.stat strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  font-size: 48px;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -0.06em;
  color: var(--primary-dark);
}

.chart-panel {
  padding: 22px;
}

canvas {
  display: block;
  width: 100%;
  max-width: 100%;
}

.upload-box {
  display: grid;
  gap: 14px;
}

.ai-result {
  display: grid;
  align-content: start;
  min-height: 100%;
}

.ai-score {
  margin: 16px 0 10px;
  font-size: 72px;
  line-height: 0.92;
  font-weight: 950;
  letter-spacing: -0.07em;
  color: var(--primary-dark);
}

.ai-checker {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  min-height: 300px;
  text-align: center;
}

.ai-checker strong {
  font-size: 46px;
  line-height: 1;
  font-weight: 950;
}

.ai-orbit {
  width: 114px;
  height: 114px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--yellow) 34%, transparent), color-mix(in srgb, var(--primary) 14%, transparent) 64%, transparent);
}

.ai-orbit::before {
  content: "";
  width: 62px;
  height: 62px;
  border: 1px solid color-mix(in srgb, var(--orange) 46%, var(--line));
  border-radius: 50%;
}

.ai-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  transform-origin: 57px 57px;
  animation: orbit 1.7s linear infinite;
}

.ai-orbit span:nth-child(2) {
  animation-delay: -0.55s;
  opacity: 0.72;
}

.ai-orbit span:nth-child(3) {
  animation-delay: -1.1s;
  opacity: 0.44;
}

.ai-progress {
  width: min(340px, 100%);
  height: 11px;
  overflow: hidden;
  background: color-mix(in srgb, var(--card-solid) 62%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 999px;
}

.ai-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--yellow), var(--orange));
  border-radius: inherit;
  transition: width 0.7s var(--ease);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 16% 10%, color-mix(in srgb, var(--yellow) 36%, transparent), transparent 34%),
    radial-gradient(circle at 90% 84%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 32%),
    rgba(36, 48, 71, 0.16);
  backdrop-filter: blur(16px);
}

.modal.active {
  display: grid;
}

.modal-card {
  width: min(1120px, 100%);
  height: min(720px, calc(100svh - 44px));
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  overflow: hidden;
  background: var(--card-solid);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 42px;
  box-shadow: var(--shadow);
  animation: modalIn 0.34s var(--ease) both;
}

.onboarding-aside {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--yellow) 36%, var(--card-solid)), color-mix(in srgb, var(--primary) 24%, var(--card-solid)) 62%, color-mix(in srgb, var(--orange) 16%, var(--card-solid)));
}

.onboarding-promise span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 950;
}

.onboarding-promise strong {
  display: block;
  max-width: 360px;
  margin: 18px 0 12px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.075em;
}

.onboarding-promise p {
  max-width: 320px;
  margin: 0;
  color: color-mix(in srgb, var(--text) 70%, var(--muted));
  line-height: 1.55;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.progress-steps span {
  height: 8px;
  background: rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  transition: background 0.2s var(--ease);
}

.progress-steps span.active {
  background: var(--primary-dark);
}

.onboarding-main {
  position: relative;
  overflow: auto;
  padding: 34px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 26px;
}

.step {
  display: none;
  max-width: 680px;
  margin: 0 auto;
}

.step.active {
  display: block;
  animation: fadeUp 0.28s var(--ease) both;
}

.step h2 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.step p {
  color: var(--muted);
  line-height: 1.55;
}

.step .form,
.survey-form {
  margin-top: 26px;
}

.step .form > .primary,
.step .form > .secondary,
.survey-actions .primary,
.survey-actions .secondary {
  width: 100%;
}

.step .form > .primary,
.step .form > .secondary {
  grid-column: 1 / -1;
}

.cards {
  margin: 20px 0 4px;
  padding: 16px 18px;
  color: var(--muted);
  background: color-mix(in srgb, var(--blue) 20%, var(--card-solid));
  border: 1px solid var(--line);
  border-radius: 22px;
  font-weight: 850;
}

.age-wheel {
  position: relative;
  max-width: 280px;
  height: 180px;
  margin: 8px auto 0;
  padding: 68px 0;
  overflow-y: auto;
  background: color-mix(in srgb, var(--primary) 12%, var(--card-solid));
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
  scroll-snap-type: y mandatory;
  scroll-padding: 68px 0;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.age-wheel::-webkit-scrollbar {
  display: none;
}

.age-wheel::before,
.age-wheel::after {
  content: "";
  position: sticky;
  left: 0;
  right: 0;
  z-index: 1;
  display: block;
  height: 38px;
  pointer-events: none;
}

.age-wheel::before {
  top: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 12%, var(--card-solid)), transparent);
}

.age-wheel::after {
  bottom: 0;
  background: linear-gradient(0deg, color-mix(in srgb, var(--primary) 12%, var(--card-solid)), transparent);
}

.age-wheel-item {
  width: 100%;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 24px;
  font-weight: 950;
  opacity: 0.45;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition: transform 0.18s var(--ease), color 0.18s var(--ease), opacity 0.18s var(--ease);
}

.age-wheel-item.near {
  opacity: 0.72;
  transform: scale(0.95);
}

.age-wheel-item.selected {
  color: var(--primary-dark);
  opacity: 1;
  transform: scale(1.2);
}

.survey-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--yellow) 24%, var(--card-solid));
  border: 1px solid color-mix(in srgb, var(--yellow) 34%, var(--line));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.survey-track {
  min-height: 350px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.survey-slide {
  display: none;
}

.survey-slide.active {
  display: grid;
  gap: 20px;
  animation: fadeUp 0.28s var(--ease) both;
}

.survey-slide h3 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(30px, 4.1vw, 50px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.choice-grid.two-options,
.choice-grid.speech-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid label {
  position: relative;
  display: block;
}

.choice-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-grid span {
  min-height: 98px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--text);
  background: color-mix(in srgb, var(--card-solid) 76%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.choice-grid input:checked + span {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--card-solid)), color-mix(in srgb, var(--yellow) 20%, var(--card-solid)));
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  box-shadow: 0 16px 30px color-mix(in srgb, var(--primary) 12%, transparent);
  transform: translateY(-2px);
}

.number-picker {
  display: grid;
  grid-template-columns: 78px minmax(150px, 270px) 78px;
  gap: 12px;
  align-items: center;
}

.number-picker button {
  min-height: 62px;
  color: var(--text);
  background: color-mix(in srgb, var(--orange) 14%, var(--card-solid));
  border: 1px solid var(--line);
  border-radius: 22px;
  font-size: 20px;
  font-weight: 950;
}

.number-picker input {
  min-height: 88px;
  text-align: center;
  font-size: 44px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.large-input {
  min-height: 76px;
  font-size: 22px;
  line-height: 1.28;
}

textarea.large-input {
  min-height: 170px;
  padding: 18px;
}

.survey-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}

.survey-actions button {
  min-width: 128px;
}

.error {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  color: white;
  background: var(--danger);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(57px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(57px) rotate(-360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1180px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
    order: 3;
  }

  .exercise-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    padding-bottom: 96px;
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  }

  body::before {
    display: none;
  }

  .brand-mark,
  .panel-icon,
  .material-card,
  .about-card,
  .certificate-card,
  .view.active,
  .step.active,
  .survey-slide.active,
  .admin-panel.active {
    animation: none !important;
  }

  .shell {
    padding: 12px;
  }

  .app-header {
    position: static;
    grid-template-columns: 1fr auto;
    border-radius: 24px;
    backdrop-filter: none;
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .top-actions .chip {
    min-height: 40px;
    padding: 0 12px;
  }

  .brand small {
    display: none;
  }

  .nav {
    position: fixed;
    left: 6px;
    right: 6px;
    bottom: max(6px, env(safe-area-inset-bottom));
    z-index: 1000;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 6px 4px;
    background: var(--card-solid);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 22px;
    box-shadow: 0 6px 18px rgba(77, 51, 24, 0.1);
    backdrop-filter: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding: 0 4px;
  }

  .nav::-webkit-scrollbar { display: none; }

  .nav-item {
    flex: 0 0 auto;
    min-width: 60px;
    min-height: 54px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 4px 6px;
    border: 0;
    border-radius: 16px;
    transition: none;
    scroll-snap-align: start;
  }

  .nav-item:first-child {
    margin-left: 2px;
  }

  .nav-item:last-child {
    margin-right: 2px;
  }

  .nav .nav-item:nth-child(n+9) {
    display: none;
  }

  .nav-item b {
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
  }

  .nav-item.active {
    box-shadow: none;
    background: color-mix(in srgb, var(--primary) 14%, transparent);
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  .main {
    padding-bottom: 72px;
  }

  .panel,
  .stat,
  .chart-panel,
  .exercise-card,
  .note-card,
  .norm-card,
  .mini-banner,
  .modal-card {
    backdrop-filter: none;
    box-shadow: 0 10px 26px rgba(77, 51, 24, 0.08);
  }

  .modal {
    padding: 8px;
    backdrop-filter: none;
  }

  .stat::after {
    display: none;
  }

  .exercise-card:hover,
  .primary:hover,
  .nav-item:hover,
  .chip:hover,
  .secondary:hover {
    transform: none;
  }

  .home-layout,
  .ai-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .form,
  .choice-grid,
  .choice-grid.two-options,
  .choice-grid.speech-options,
  .number-picker {
    grid-template-columns: 1fr;
  }

  .exercise-list {
    grid-template-columns: 1fr;
  }

  .exercise-card {
    min-height: 0;
  }

  .material-grid,
  .admin-layout,
  .about-layout,
  .profile-layout,
  .contact-grid,
  .material-choice-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-card.wide {
    grid-column: auto;
  }

  .certificate-card img {
    max-height: 520px;
  }

  .about-card {
    order: 1;
  }

  .certificate-card {
    order: 2;
  }

  .recommended-strip {
    grid-template-columns: 1fr;
  }

  .age-norm-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .age-norm-strip .norm-card {
    min-width: 230px;
    scroll-snap-align: start;
  }

  .video-stage {
    max-height: min(56vh, 420px);
    border-radius: 22px;
  }

  .video-meta h2 {
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.1;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .video-meta p {
    font-size: 15px;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .video-meta {
    max-width: 100%;
  }

  .video-back {
    margin: 8px 0 14px;
    width: 100%;
  }

  #videoDetails {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .subscription-card {
    padding: 16px;
    border-radius: 20px;
  }

  .subscription-card strong {
    font-size: 16px;
    word-break: break-word;
  }

  .subscription-card img {
    width: min(180px, 60%);
    margin: 0 auto;
  }

  .step[data-step="subscription"] h2 {
    font-size: 28px;
    word-break: break-word;
  }

  .step[data-step="subscription"] .form {
    gap: 10px;
  }

  .ai-card {
    padding: 14px;
    border-radius: 22px;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-card {
    grid-template-columns: 1fr;
    height: calc(100svh - 16px);
    max-height: none;
    overflow: auto;
    border-radius: 30px;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 14px 40px rgba(77, 51, 24, 0.16);
  }

  .onboarding-aside {
    min-height: 0;
    padding: 18px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .onboarding-promise {
    display: none;
  }

  .onboarding-main {
    overflow: visible;
    padding: 22px 18px 28px;
    scrollbar-gutter: auto;
  }

  .onboarding-actions {
    margin-bottom: 18px;
  }

  .step {
    max-width: none;
  }

  .step h2 {
    font-size: 36px;
  }

  .step .form,
  .survey-form {
    margin-top: 18px;
  }

  .age-wheel {
    height: 150px;
    padding: 52px 0;
    margin-top: 4px;
  }

  .survey-track {
    min-height: 0;
    overflow: visible;
  }

  .survey-actions {
    position: static;
    padding: 10px 0 0;
    background: var(--card-solid);
  }
}

@media (max-width: 560px) {
  .top-actions .chip {
    min-width: 44px;
    padding: 0 11px;
  }

  .top-actions .chip svg {
    display: none;
  }

  .panel,
  .stat,
  .chart-panel,
  .note-card,
  .mini-banner {
    border-radius: 26px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .step h2 {
    font-size: 34px;
  }

  .survey-slide h3 {
    font-size: 30px;
  }

  .choice-grid span {
    min-height: 82px;
    font-size: 16px;
  }
}
