/* Home B: keep the inner application screens on their established stylesheet. */
html { scroll-padding-top: 24px; }
.top { max-width: 1180px; width: 100%; padding: 22px 32px 0; gap: 28px; }
.brand { display: flex; align-items: center; padding: 0; flex: none; }
.brand img { display: block; width: 192px; height: auto; max-height: 54px; object-fit: contain; }
.home-nav { display: flex; align-items: center; gap: clamp(12px, 2.1vw, 28px); margin-right: auto; }
.home-nav a { color: var(--muted); text-decoration: none; font-size: .875rem; white-space: nowrap; }
.home-nav a:hover, #catalog-open:hover { color: var(--violet); text-decoration: underline; text-underline-offset: 4px; }
.top-actions { flex: none; }
#auth-register { white-space: nowrap; }
.top #auth-login { min-width: 44px; font-weight: 500; color: var(--ink); background: transparent; }
.top #auth-register { position: relative; font-weight: 500; background: transparent !important; color: var(--violet-deep) !important; }
.top #auth-register::before { content: ''; position: absolute; inset: 4px 0; border: 1px solid #b9afe8; border-radius: var(--r-pill); pointer-events: none; }
.top #auth-register:hover::before { border-color: var(--violet); }
.auth-register-full { display: none; }
.auth-register-short { display: inline; }
.view-home { width: 100%; max-width: none; padding: 0; }
.home-hero, .home-library, .home-levels, .home-questions, .home-wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: 32px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: center; padding-block: 50px 70px; }
.view-home .title { max-width: 12ch; margin: 0; text-align: left; font-size: clamp(2.625rem, 5.5vw, 4.625rem); font-weight: 650; line-height: 1.1; letter-spacing: -.035em; }
.home-lead { max-width: 490px; margin: 24px 0 0; color: var(--muted); font-size: 1.1875rem; line-height: 1.6; }
.view-home .url { max-width: none; margin: 32px 0 0; }
.view-home .url-field { min-height: 64px; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px rgba(29,24,56,.035); }
.view-home .url-icon { display: none; }
.view-home .url-field input { height: 48px; padding-inline: 12px; font-size: .9375rem; }
.view-home .url-go { min-height: 48px; height: 48px; padding-inline: 20px; border-radius: 12px; font-size: .9375rem; }
.home-source-note { margin: 12px 0 0; max-width: 490px; color: var(--muted); font-size: .8125rem; line-height: 1.55; }
.home-source-note a { color: var(--violet); text-underline-offset: 3px; }
.home-demo-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 16px; padding: 0; border: 0; background: transparent; color: var(--violet); font-size: .875rem; font-weight: 600; cursor: pointer; }
.home-demo-link span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; font-size: .75rem; }
.home-screen { overflow: hidden; border: 7px solid white; border-radius: 28px; background: #141827; box-shadow: 0 24px 60px rgba(29,24,56,.1); }
.home-screen img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: contain; }
.home-screen-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; color: white; font-size: .75rem; }
.home-screen-controls button { flex: none; min-height: 40px; padding: 7px 16px; border: 0; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: .8125rem; font-weight: 600; cursor: pointer; }
.home-feature > p { margin: 16px 0 0; color: var(--muted); font-size: .8125rem; text-align: center; }
.home-library { padding-block: 12px 76px; }
.home-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.view-home h2 { margin: 0; font-size: clamp(1.875rem, 3.2vw, 2.625rem); font-weight: 600; line-height: 1.1; letter-spacing: -.035em; }
.view-home .or { text-align: left; color: var(--ink); }
#catalog-open { flex: none; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--violet); font-size: .875rem; font-weight: 600; cursor: pointer; }
.view-home .shelf { gap: 22px; }
@media (min-width: 1001px) {
  .view-home .shelf:has(> li[data-category="movie-trailers"]:not([hidden])) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 621px) and (max-width: 1000px) {
  .view-home .shelf:has(> li[data-category="movie-trailers"]:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.view-home .story-media, .view-home .story img { border-radius: 22px; }
.view-home .story img { aspect-ratio: 4 / 4.5; }
.view-home .story-text { padding-top: 15px; }
.view-home .story-title { font-size: 1.25rem; }
.home-explain { background: white; padding-block: 78px; }
.home-how { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; }
.view-home p { color: var(--muted); }
.home-how > div:first-child p { max-width: 360px; margin: 22px 0 0; }
.home-step { display: grid; grid-template-columns: 35px 1fr; gap: 14px; padding: 22px 0; border-bottom: 1px solid #e7e3f1; }
.home-step:last-child { border-bottom: 0; }
.home-step > span { padding-top: 4px; color: var(--violet); font-size: .875rem; }
.view-home h3 { margin: 0; font-size: 1.3125rem; line-height: 1.2; font-weight: 550; letter-spacing: -.02em; }
.home-step p { margin: 7px 0 0; font-size: .9375rem; }
.home-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding-block: 76px; }
.home-levels > div > p { max-width: 390px; margin: 18px 0 0; }
.home-level-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; }
.home-level-tabs button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 22px; background: transparent; font-size: .875rem; cursor: pointer; }
.home-level-tabs button[aria-pressed="true"] { border-color: var(--violet); background: var(--violet); color: white; }
.home-phrase { padding: 45px; border-radius: 24px; background: var(--violet-soft); }
.home-phrase span { color: var(--muted); font-size: .8125rem; }
.home-phrase strong { display: block; margin: 20px 0 12px; font-size: clamp(1.875rem, 3vw, 2.1875rem); line-height: 1.2; letter-spacing: -.03em; font-weight: 550; }
.home-phrase p { margin: 0; }
.home-reading { padding-block: 70px 80px; background: white; }
.home-articles { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; margin-top: 28px; }
.home-articles article { display: flex; flex-direction: column; align-items: start; padding: 22px 0; border-top: 2px solid var(--ink); }
.home-articles span { margin-bottom: 20px; color: var(--muted); font-size: .75rem; }
.home-articles h3 { line-height: 1.3; font-size: 1.5rem; }
.home-articles h3 a { color: inherit; text-decoration: none; }
.home-articles h3 a:hover { color: var(--violet); text-decoration: underline; text-underline-offset: 4px; }
.home-articles p { margin: 18px 0 0; font-size: .9375rem; }
.home-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding-block: 72px; }
.home-questions details { padding: 20px 0; border-bottom: 1px solid var(--line); }
.home-questions details:first-child { padding-top: 0; }
.home-questions summary { display: flex; justify-content: space-between; gap: 20px; font-weight: 500; cursor: pointer; }
.home-questions summary::after { content: '+'; color: var(--violet); font-size: 1.375rem; }
.home-questions details[open] summary::after { content: '−'; }
.home-questions details p { margin: 15px 0 0; font-size: .9375rem; }
.home-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; width: min(1180px, 100%); margin-inline: auto; padding: 28px 32px 40px; border-top: 1px solid var(--line); }
.home-footer img { display: block; width: 174px; height: auto; }
.home-footer p { margin: 0; color: var(--muted); font-size: .75rem; text-align: right; }
.ready-dialog { width: min(750px, calc(100% - 32px)); max-width: 750px; max-height: 92dvh; overflow: auto; padding: 32px; border: 0; border-radius: 26px; background: white; color: var(--ink); box-shadow: 0 30px 90px #0003; }
.ready-dialog::backdrop { background: rgba(22,17,46,.67); }
body:has(#ready-dialog[open]) { overflow: hidden; }
#view-ready { text-align: center; }
#view-ready .bar { margin: 0 0 8px; justify-content: flex-end; }
#view-ready .result-video { width: 100%; max-height: min(65dvh, 600px); object-fit: contain; }
.ready-actions { margin-top: 24px; }
@media (max-width: 1000px) { .top { flex-wrap: wrap; } .home-nav { order: 3; width: 100%; justify-content: center; margin: 0; } .top-actions { margin-left: auto; } .home-hero { gap: 28px; } .home-how { gap: 35px; } .home-levels { gap: 30px; } }
@media (max-width: 620px) {
  .top { padding: 12px 16px 0; gap: 6px; align-items: center; }
  .brand img { width: clamp(132px, 40vw, 160px); }
  .top #auth-login { min-width: 44px; padding-inline: 4px; font-size: .75rem; font-weight: 500; color: var(--ink); background: transparent; }
  .top #auth-register { position: relative; margin-left: 8px; padding-inline: 10px; font-size: .75rem; font-weight: 500; background: transparent !important; color: var(--violet-deep) !important; }
  .top #auth-register::before { content: ''; position: absolute; inset: 6px 0; border: 1px solid #b9afe8; border-radius: var(--r-pill); pointer-events: none; }
  .top #auth-register:hover::before { border-color: var(--violet); }
  .auth-register-full { display: none; }
  .auth-register-short { display: inline; }
  .home-nav { gap: 12px; justify-content: space-between; padding: 7px 0 0; }
  .home-nav a { font-size: .72rem; white-space: normal; text-align: center; }
  .top:has(#account-email:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto; }
  .top:has(#account-email:not([hidden])) .home-nav { grid-column: 1 / -1; grid-row: 2; }
  .top-actions:has(#account-email:not([hidden])) { grid-column: 2; grid-row: 1; }
  .top-actions #auth-account { white-space: nowrap; }
  .top-actions { gap: 0; }
  .top-actions button { padding-inline: 8px; font-size: .75rem; }
  .home-hero, .home-library, .home-levels, .home-questions, .home-wrap { padding-inline: 20px; }
  .home-hero { grid-template-columns: 1fr; gap: 32px; padding-block: 24px 45px; }
  .view-home .title { font-size: clamp(2.375rem, 9.6vw, 2.75rem); }
  .home-lead { margin-top: 20px; font-size: 1.0625rem; }
  .view-home .url { margin-top: 25px; }
  .view-home .url-field { flex-wrap: nowrap; border-radius: 18px; }
  .view-home .url-go { width: auto; padding-inline: 12px; }
  .view-home .url-field input { font-size: .8125rem; padding-inline: 7px; }
  .home-screen { border-width: 5px; border-radius: 21px; }
  .home-screen-controls { padding: 10px 14px; }
  .home-screen-controls span { min-width: 0; }
  .home-library { padding-block: 12px 48px; }
  .home-section-head { align-items: center; margin-bottom: 23px; }
  .view-home h2 { font-size: 1.8125rem; }
  #catalog-open { max-width: 110px; font-size: .75rem; text-align: right; line-height: 1.25; }
  .view-home .shelf { gap: 25px 16px; }
  .games .game[data-game="movie-trailers"]:not([hidden]) { grid-column: 1 / -1; }
  .view-home .story-title { font-size: 1.0625rem; }
  .home-explain, .home-reading { padding-block: 48px; }
  .home-how, .home-levels, .home-questions { grid-template-columns: 1fr; gap: 26px; }
  .home-levels, .home-questions { padding-block: 48px; }
  .home-phrase { padding: 28px; }
  .home-articles { grid-template-columns: 1fr; gap: 0; }
  .home-articles article { border-top-width: 1px; }
  .home-footer { padding-inline: 20px; }
  .home-footer img { width: 130px; }
  .view-auth .view-title { font-size: clamp(1.5rem, 6.5vw, 2rem); overflow-wrap: anywhere; }
  .ready-dialog { padding: 20px; }
}
@media (max-width: 360px) { .top-actions button { padding-inline: 5px; font-size: .7rem; } .home-nav a { font-size: .68rem; } .view-home .url-go { padding-inline: 10px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
