/* Rulno: compact controls, an uninterrupted lesson and a 3D-first start. */
:root { --control-height: 48px; }
body { font-size: 15px; }
button, a { -webkit-tap-highlight-color: transparent; }
:is(.primary-button,.small-button,.next-button,.text-button,.counter-button) { align-items: center; justify-content: center; gap: 8px; line-height: 1.25; }
:is(.primary-button,.small-button,.next-button,.text-button) { display: inline-flex; white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.primary-button,.next-button { min-height: var(--control-height); font-size: 15px; padding: 13px 19px; margin: 0; }
.small-button { min-height: 44px; font-size: 14px; padding: 11px 16px; margin: 0; }
.text-button { font-size: 14px; min-height: 40px; padding: 8px 0; text-decoration: none; }
:is(.primary-button,.small-button,.text-button) .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
.panel-heading { gap: 16px; align-items: center; }
.panel-heading > div { min-width: 0; }
.panel-heading h2 { font-size: 19px; margin: 0; }
.intro h1 { font-size: clamp(26px,3vw,34px); line-height: 1.2; letter-spacing: -.025em; }
.intro p { margin-top: 8px; }
.learning-entry { padding: 20px; gap: 20px; align-items: center; }
.learning-entry-copy { flex: 1 1 240px; }
.learning-entry-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.learning-entry .primary-button,.learning-entry .small-button { width: auto; }
.home-intro { width: 100%; max-width: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 8px 0 22px; }
.home-intro h1 { margin: 0; font-size: clamp(25px,3vw,34px); line-height: 1.2; letter-spacing: -.025em; }
.home-intro p { margin: 8px 0 0; color: #52695d; font-size: 14px; }
.home-feature-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 22px; margin-bottom: 30px; }
.home-showcase { background: #e8eee4; padding: 20px; border-radius: 20px; overflow: hidden; }
.home-showcase-copy h2 { margin: 0 0 7px; font-size: 23px; }
.home-showcase-copy p { margin: 0 0 16px; color: #4d6557; font-size: 14px; }
.home-showcase .home-scene { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; aspect-ratio: auto; height: 290px; margin: 0 0 16px; border-radius: 14px; overflow: hidden; }
.home-showcase .primary-button { width: 100%; }
.home-next { display: grid; gap: 16px; align-content: start; }
.home-check,.home-resume,.dashboard-summary { padding: 20px; border-radius: 16px; background: #fffefa; box-shadow: 0 3px 0 #dce3d7,0 9px 24px #173e3405; }
.home-check h2,.home-resume h2 { font-size: 20px; margin: 8px 0; }
.home-check p,.home-resume p { color: #52695d; font-size: 14px; margin: 0 0 16px; }
.home-check .primary-button { width: 100%; }
.feature-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; color: #285e4e; }
.home-resume { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.home-resume h2 { font-size: 16px; margin-top: 0; }
.home-resume p { margin: 0; font-size: 13px; }
.home-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 20px; gap: 12px; }
.home-metrics > :is(div,button) { display: flex; flex-direction: column; align-items: flex-start; padding: 0; background: none; border: 0; color: #173e34; }
.home-metrics b { font-size: 27px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.home-metrics span { color: #52695d; font-size: 12px; margin-top: 5px; }
.home-tickets { margin-top: 26px; }
.home-tickets .panel-heading { margin-bottom: 16px; }
.ticket-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); width: 100%; min-width: 0; gap: 12px; }
.ticket { min-width: 0; min-height: 112px; padding: 13px 9px; border-radius: 14px; }
.ticket > span:first-child { font-size: 10px; text-transform: none; }
.ticket > b { font-size: 28px; line-height: 1.25; }
.ticket > small { font-size: 11px; }
.home-learning-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 26px; }
.home-learning-tools .action-row { margin: 0; min-width: 0; }
.home-learning-tools .action-row > span:first-child { color: #406c58; }
.home-pro { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #e9efdf; padding: 20px; border-radius: 16px; margin-top: 26px; }
.home-pro h2 { font-size: 20px; margin: 0 0 8px; }
.home-pro p { color: #4d6557; margin: 0; font-size: 14px; }
.sign-card b { font-size: 14px; line-height: 1.4; hyphens: auto; }
.reset-progress-button { margin-top: 24px; border: 1px solid #dac8bf; color: #994b39; background: #fff9f4; }
.answer,.exam-question .answer { min-height: 50px; padding: 13px 15px; font-size: 15px; line-height: 1.4; }
.answer > span:last-child { min-width: 0; }
body.immersive .header,body.immersive .navigation,body.web-shell.immersive .header,body.web-shell.immersive .navigation { display: none !important; }
body.immersive #main { padding-top: 10px; }
.lesson-header { min-height: 46px; padding-top: 0; margin-bottom: 12px; }
.lesson-heading h1 { font-size: 18px; line-height: 1.25; }
.lesson-heading small { font-size: 12px; }
.lesson-toolbar { margin-bottom: 18px; }
.question-panel h2 { font-size: clamp(20px,2vw,26px); line-height: 1.35; letter-spacing: -.02em; }
.onboarding-open { overflow: hidden; }
#onboarding { inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; padding: max(16px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); background: #f7f6f0; box-shadow: none; }
#onboarding[open] { display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
#onboarding::backdrop { background: #f7f6f0; }
#onboarding .onboarding-top { width: 100%; max-width: 1240px; margin: 0 auto; gap: 16px; }
#onboarding .tour-wordmark { display: inline-flex; align-items: center; gap: 14px; font-size: 21px; letter-spacing: -.02em; }
.tour-wordmark small { font-size: 12px; color: #607468; font-weight: 600; letter-spacing: 0; }
.tour-tools { display: flex; align-items: center; gap: 14px; }
.tour-sound { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 7px; background: transparent; padding: 8px; border: 0; color: #315e4c; font-size: 13px; }
.tour-sound .ui-icon { width: 21px; height: 21px; flex-basis: 21px; }
.tour-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; width: 100%; max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; }
.tour-welcome { width: 100%; max-width: 620px; margin: auto; text-align: center; padding: 16px 0; }
.tour-brand-mark { margin: 0 auto 24px; }
.tour-brand-mark img { border-radius: 20px; }
#onboarding .tour-welcome h1 { font-size: clamp(29px,4vw,46px); line-height: 1.15; letter-spacing: -.035em; margin: 0 0 20px; }
.tour-welcome p { max-width: 40ch; margin: 0 auto; color: #4c6557; font-size: 16px; line-height: 1.65; }
.tour-features { display: flex; justify-content: center; gap: 24px; margin-top: 28px; }
.tour-features span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #486552; white-space: nowrap; }
.tour-features .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
#onboarding .onboarding-bottom { flex: 0 0 auto; width: 100%; max-width: 560px; margin: 0 auto; padding: 0; }
#onboarding .onboarding-actions { gap: 12px; flex-wrap: wrap; }
#onboarding .onboarding-actions > button { flex: 1 1 auto; margin: 0; width: auto; }
#onboarding .tour-silent { flex: 1 1 100%; }
#tour-voice-status { display: block; text-align: center; color: #99523a; font-size: 12px; }
#tour-voice-status:empty { display: none; }
.tour-experience { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); align-items: center; gap: 30px; margin: auto 0; }
.tour-scene-wrap { position: relative; height: min(62dvh,580px); min-height: 300px; background: #e0e7d9; border-radius: 18px; overflow: hidden; }
#tour-scene { width: 100%; height: 100%; }
#tour-scene > img { width: 100%; height: 100%; object-fit: contain; }
.tour-scene-label { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; background: #fffef7eb; border-radius: 12px; font-size: 12px; font-weight: 700; }
.tour-scene-label .ui-icon { width: 17px; height: 17px; flex-basis: 17px; }
.tour-transport { position: absolute; inset: auto 12px 12px; display: flex; align-items: center; gap: 12px; }
.tour-transport .icon-button { background: #fffdf8ed; }
#tour-timeline { flex: 1; min-width: 0; accent-color: #f5693c; }
#onboarding .tour-task h1 { margin: 0 0 18px; font-size: clamp(20px,2.3vw,29px); line-height: 1.35; letter-spacing: -.02em; }
.tour-task .answers { margin: 0; gap: 9px; }
.tour-task .answer { min-height: 48px; font-size: 15px; }
.tour-task-hint,.tour-scene-caption { color: #52695d; font-size: 13px; line-height: 1.5; margin: 14px 0 0; }
.tour-answer-result { display: grid; gap: 5px; margin-top: 18px; color: #824a36; font-size: 14px; }
.tour-answer-result.is-correct { color: #2d6551; }
.tour-answer-result span { font-size: 13px; }
.tour-comparison { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tour-comparison button { min-height: 40px; padding: 9px 12px; border: 1px solid #cedace; background: #f7f9f1; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.tour-comparison button[aria-pressed="true"] { color: #fff; background: #254e3f; border-color: #254e3f; }
.tour-ready > img { margin-bottom: 20px; }
.tour-ready .tour-pro-note { margin-top: 20px; font-size: 13px; }
@media (min-width:900px) {
  body.web-shell #app { display: block; max-width: 1280px; padding: 0 28px 40px; }
  body.web-shell .header { position: sticky; top: 0; z-index: 20; height: 74px; gap: 24px; background: #f7f6f0f5; backdrop-filter: blur(14px); }
  body.web-shell .header .brand-logo { width: 42px; height: 42px; border-radius: 12px; }
  body.web-shell .header .brand { flex: 0 0 auto; font-size: 25px; }
  body.web-shell .header .edition-badge { font-size: 8px; padding: 3px 5px; }
  body.web-shell .header .navigation { position: static; transform: none; width: auto; max-width: none; flex: 1 1 auto; justify-content: center; margin: 0; padding: 0; gap: 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
  body.web-shell .navigation > button { flex: 0 1 auto; min-height: 42px; padding: 10px 13px; font-size: 13px; gap: 7px; border-radius: 10px; white-space: nowrap; }
  body.web-shell .navigation .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
  body.web-shell .header-actions { flex: 0 0 auto; }
  body.web-shell #main { padding-top: 24px; }
  body.web-shell[data-page="home"] #main { display: block; }
  body.web-shell.immersive #app { max-width: 1320px; padding: 0 24px 30px; }
  body.web-shell.immersive #main { padding-top: 12px; }
  .question-layout { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 26px; }
  .question-layout .scene-panel { height: clamp(300px,49dvh,520px); }
}
@media (max-width:899px) {
  .home-feature-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .home-next { gap: 16px; }
  .home-showcase .home-scene { height: 250px; }
  .ticket-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
  .ticket { min-height: 86px; padding: 9px 5px; }
  .ticket > b { font-size: 23px; }
  .home-learning-tools { grid-template-columns: minmax(0,1fr); }
  .home-intro { align-items: flex-start; flex-wrap: wrap; }
  .home-intro > .small-button { min-height: 40px; font-size: 13px; }
  .home-pro { flex-direction: column; align-items: stretch; }
  .home-pro .small-button { width: 100%; }
  .learning-entry { padding: 18px; gap: 16px; }
  .learning-entry-actions { width: 100%; display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .learning-entry-actions .primary-button,.learning-entry-actions .small-button { width: 100%; min-width: 0; font-size: 13px; padding: 12px 10px; }
  .tour-experience { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin: 0; }
  .tour-scene-wrap { height: clamp(220px,34dvh,330px); min-height: 220px; flex: 0 0 auto; }
  #onboarding { padding: max(12px,env(safe-area-inset-top)) 16px max(12px,env(safe-area-inset-bottom)); }
  #onboarding[open] { gap: 12px; }
  #onboarding .tour-task h1 { font-size: 20px; margin-bottom: 13px; }
  #onboarding .onboarding-actions { gap: 10px; }
  .tour-features { gap: 14px; flex-wrap: wrap; }
  .tour-comparison { gap: 7px; }
  .tour-comparison button { font-size: 11px; padding: 8px 9px; }
  .tour-task .answer { min-height: 46px; padding: 11px 12px; font-size: 14px; }
}
@media (max-width:359px) {
  .primary-button { font-size: 14px; padding-inline: 14px; }
  .panel-heading h2 { font-size: 17px; }
  .home-resume { flex-direction: column; align-items: stretch; }
  .home-intro h1 { font-size: 25px; }
  .ticket-grid { gap: 7px; }
  #onboarding .tour-wordmark { font-size: 19px; }
}
@media (prefers-reduced-motion:reduce) { #onboarding[open] { animation: none; } }

.program-topics { display: grid; gap: 8px; margin-top: 22px; }
.program-topic { display: flex; gap: 14px; align-items: center; padding: 14px 0; text-align: left; border: 0; border-bottom: 1px solid #e3e8dc; background: none; color: #193e34; }
.program-index { font-size: 12px; color: #708577; font-variant-numeric: tabular-nums; flex: 0 0 24px; }
.program-topic > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 4px; }
.program-topic b { font-size: 15px; line-height: 1.4; }
.program-topic small { font-size: 12px; color: #60786a; }
.program-voice { margin-top: 28px; padding: 20px; border-radius: 14px; background: #edf2e6; }
.program-voice h3 { font-size: 18px; margin: 0 0 10px; }
.program-voice p,.program-family p { font-size: 14px; color: #52695d; }
.program-family { margin-top: 24px; font-size: 14px; }
.program-family summary { cursor: pointer; }

input:not([type="checkbox"]):not([type="range"]),select,textarea { font-size: 16px; }

.learning-entry-actions .primary-button,.learning-entry-actions .small-button,#onboarding .onboarding-actions > .small-button { min-height: 48px; }
