* { box-sizing: border-box; margin: 0; padding: 0 }
body { margin: 0; background: #020202 }
.view.active { display: flex; flex-direction: column }
input, button, summary { font-family: inherit }
#view-gate.cinema {
  --ink: #020202;
  --paper: #f4eddf;
  --subtle: #b9b8af;
  --line: #354045;
  --gold: #dec08a;
  --mast-height: 68px;
  --margin: clamp(28px, 5vw, 96px);
  min-height: 100vh;
  min-height: 100svh;
  color-scheme: dark;
  color: var(--paper);
  background: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-break: strict;
}
.cinema *, .cinema *::before, .cinema *::after { box-sizing: border-box }
.cinema :is(h1, h2, p, ul, figure) { margin: 0 }
.cinema a { color: inherit }
.cinema :is(a, summary, button):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px }
.cinema .cinema-mast, .cinema .entry-footer { padding-inline: var(--margin) }
.cinema .cinema-mast {
  --glass: var(--ink);
  --nav-text: #f4eddf;
  --nav-muted: #d0d0c8;
  --nav-rule: #dec08a;
  --nav-hairline: rgb(208 209 201 / .16);
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center;
  color: var(--nav-text); background: var(--glass);
  gap: clamp(26px, 3.5vw, 68px); min-height: var(--mast-height); border-bottom: 1px solid var(--nav-hairline);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cinema .cinema-mast {
    background: color-mix(in srgb, var(--ink) 78%, transparent);
    -webkit-backdrop-filter: saturate(125%) blur(16px);
    backdrop-filter: saturate(125%) blur(16px);
  }
}
.cinema .cinema-home { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none }
.cinema .cinema-wordmark {
  display: grid; width: 132px; aspect-ratio: 1779 / 610; align-items: center;
}
.cinema .wordmark-print { position: relative; display: block; grid-area: 1 / 1 }
.cinema .wordmark-dark { display: block; width: 100%; height: auto }
.cinema :is(.wordmark-dark, .wordmark-cart-print) { filter: grayscale(1) invert(1) sepia(.24) }
/* The 480 × 136 ink impression slopes up toward the lettering. The cart's
   handle and the first character meet at (149, 66), so a vertical crop loses ink. */
.cinema {
  --wordmark-cart-seam: 27.5% 0%, 27.5% 38.9706%, 30.5208% 44.1176%, 31.0833% 48.3088%,
    31.0833% 49.0441%, 29.375% 49.3382%, 26.5625% 51.4706%, 26.5625% 100%;
}
.cinema[data-cart-away] .cinema-home .wordmark-dark {
  clip-path: polygon(100% 0%, var(--wordmark-cart-seam), 100% 100%);
}
.cinema .wordmark-cart-origin {
  position: absolute; left: 1.458333%; top: 2.205882%; width: 30.416667%; height: 97.794118%;
  overflow: hidden; pointer-events: none;
}
.cinema .wordmark-print > .wordmark-cart-origin { visibility: hidden }
.cinema .wordmark-cart-print {
  position: absolute; display: block; left: -4.794521%; top: -2.255639%;
  width: 328.767123%; max-width: none; height: auto;
  clip-path: polygon(0% 0%, var(--wordmark-cart-seam), 0% 100%);
}
.cinema .brand-beta { color: var(--nav-muted) }
.cinema .cinema-nav { position: relative; display: flex; align-self: stretch; gap: clamp(20px, 2.7vw, 48px) }
.cinema .cinema-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; color: var(--nav-muted); text-decoration: none; white-space: nowrap; font-size: 15px;
}
.cinema .construction-mark { font-size: 14px; line-height: 1 }
.cinema .album-digit {
  height: 1.08em;
  width: .43em;
  vertical-align: -.18em;
}
.cinema .scene-caption .album-digit {
  height: .8em;
  width: .32em;
  vertical-align: -.07em;
}
.cinema .cinema-nav a[aria-current] { color: var(--nav-text); font-weight: 600 }
.cinema:not(:has(:is(#album, #dazu):target)) .cinema-nav:not(.has-marker) a[href="#classroom"]::after,
.cinema:has(#album:target) .cinema-nav:not(.has-marker) a[href="#album"]::after,
.cinema:has(#dazu:target) .cinema-nav:not(.has-marker) a[href="#dazu"]::after {
  content: ""; position: absolute; bottom: -1px; inset-inline: 0; height: 2px; background: var(--nav-rule);
}
.cinema .cinema-nav.has-marker::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; pointer-events: none;
  width: var(--marker-width); transform: translateX(var(--marker-x)); background: var(--nav-rule);
}
.cinema .entry-help { position: relative; margin-left: auto }
.cinema .entry-help summary {
  display: inline-flex; align-items: center; min-height: 44px; gap: 9px; cursor: pointer;
  list-style: none; font-size: 14px; color: var(--nav-muted);
}
.cinema .entry-help summary::-webkit-details-marker { display: none }
.cinema .entry-help summary::after {
  content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}
.cinema .entry-help[open] summary::after { transform: translateY(2px) rotate(225deg) }
.cinema .entry-help-sheet {
  position: absolute; z-index: 5; top: calc(100% + 6px); right: 0;
  width: min(320px, calc(100vw - 2 * var(--margin))); max-height: calc(100svh - 72px); overflow: auto;
  padding: 20px 22px; color: var(--paper); background: #1c282d; border: 1px solid #526068; border-radius: 6px;
  box-shadow: 0 10px 32px #0005;
}
.cinema .entry-help-sheet h2 { font-size: 16px; font-weight: 600 }
.cinema .entry-help-sheet p { margin-top: 5px; color: var(--subtle); font-size: 15px; line-height: 1.7 }
.cinema .entry-help-sheet p + h2 { margin-top: 16px }
.cinema .entry-keep { white-space: nowrap }

.cinema .scene {
  min-height: calc(100svh - var(--mast-height)); scroll-margin-top: var(--mast-height);
  position: relative; display: flex; flex-direction: column;
}
.cinema .scene:focus { outline: none }
.cinema .course-spread {
  flex: 1; display: grid; grid-template-columns: minmax(282px, .93fr) minmax(0, 1.87fr);
  align-items: center; gap: clamp(24px, 2.7vw, 52px);
  width: min(100%, 1800px); margin-inline: auto; padding: clamp(28px, 4vh, 64px) var(--margin);
}
.cinema .cinema-entry { width: min(100%, 440px) }
.cinema .course-plate { overflow: hidden }
.cinema .course-plate img { display: block; width: 100%; height: auto }
.cinema .cinema-entry h1 {
  color: var(--paper);
  font: 600 clamp(30px, 3.05vw, 49px)/1.3 "Songti SC", "STSong", "Noto Serif CJK SC", SimSun, serif;
  letter-spacing: -.025em;
}
.cinema #cinema-title > span { display: block; white-space: nowrap }

/* The flow sections own their native fragment stops. Their shared stage is only
   mounted when the viewport has room for both complete compositions. */
.cinema .project-reel { isolation: isolate; background: var(--ink) }
.cinema .project-stage[hidden] { display: none }
.cinema .project-reel.pinned {
  --stage-lead: calc((100svh - var(--mast-height)) * .24);
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--stage-lead) auto auto;
  background: transparent; pointer-events: none;
}
.cinema .project-reel.pinned > #album {
  grid-area: 2/1;
  /* Reading hold, album exit, then extra travel for hanging the portrait frames. */
  box-sizing: content-box;
  padding-block-start: clamp(96px, calc((100svh - var(--mast-height)) * .20), 180px);
  min-height: calc((100svh - var(--mast-height)) * .68);
  padding-block-end: clamp(580px, calc((100svh - var(--mast-height)) * 1.24), 1440px);
}
.cinema .project-reel.pinned > #dazu { grid-area: 3/1 }
.cinema .project-stage {
  position: sticky; top: var(--mast-height); grid-area: 1/1/4/2; align-self: start;
  height: calc(100svh - var(--mast-height)); z-index: 1; isolation: isolate;
  display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); overflow: clip;
  pointer-events: none;
}
.cinema .project-plane { grid-area: 1/1; position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column }
.cinema .project-plane.dazu-scene { pointer-events: none }
.cinema .project-stage #dazu-frame:not([inert]) .dazu-plate { pointer-events: auto }
.cinema .project-frame { flex: 1; display: flex; flex-direction: column }
.cinema .album-spread {
  flex: 1; display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
  grid-template-areas: "photograph caption"; align-items: center;
  gap: clamp(24px, 4vw, 80px); padding: clamp(18px, 3svh, 42px) var(--margin);
  width: min(100%, 1820px); margin-inline: auto;
}
.cinema .album-plate {
  position: relative; grid-area: photograph; justify-self: end;
  width: min(100%, calc((100svh - var(--mast-height) - 8svh) * 1.5));
  mask-image: linear-gradient(to bottom, #000 88%, transparent),
              linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-composite: intersect;
}
.cinema .album-plate img { display: block; width: 100%; height: auto }
.cinema #album-lamp-switch {
  /* Center of the visible bulb glass in the 4456 × 2970 master. */
  position: absolute; left: 40.6122%; top: 39.631%; transform: translate(-50%, -50%);
  z-index: 2; inline-size: clamp(44px, 5.1%, 60px); aspect-ratio: 1;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: transparent; appearance: none; cursor: pointer; pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.cinema #album-lamp-switch[hidden] { display: none }
@media (hover: hover) and (pointer: fine) {
  .cinema #album-lamp-switch:hover::after {
    content: ""; width: 10px; height: 10px; border-radius: 50%;
    border: 1px solid rgb(255 251 235 / .7); box-shadow: 0 0 0 1px rgb(0 0 0 / .27);
  }
}
.cinema #album-lamp-switch:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 1px;
  box-shadow: 0 0 0 1px #151311;
}
.cinema .album-plate :is(.album-lit, .album-ambient-closed, .album-lit-open) { display: none }
.cinema .has-lamp-cue .album-plate { opacity: var(--ambient, 1) }
.cinema .has-lamp-cue :is(.album-ambient-closed, .album-lit, .album-lit-open) {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.cinema .has-lamp-cue :is(.album-lit, .album-lit-open) { z-index: 1; opacity: var(--exposure, 0) }
.cinema .has-lamp-cue:not(.album-eyes-closed) :is(.album-ambient-closed, .album-lit),
.cinema .has-lamp-cue.album-eyes-closed :is(.album-ambient, .album-lit-open) { visibility: hidden }
.cinema .has-lamp-cue .album-scene .scene-caption {
  opacity: var(--ambient, 1);
  color: color-mix(in srgb, #bbb5aa, var(--paper) calc(var(--exposure, 0) * 100%));
}
.cinema .has-lamp-cue .album-scene .project-note {
  color: color-mix(in srgb, #96958d, var(--subtle) calc(var(--exposure, 0) * 100%));
}
.cinema .album-scene .scene-caption { grid-area: caption; position: relative }
.cinema .scene-caption h2 {
  font: 500 clamp(76px, 7.5vw, 132px)/1.15 "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  letter-spacing: -.035em;
}
.cinema #album-title { text-indent: -.44em }
.cinema .project-note {
  margin-top: 18px; color: var(--subtle); font-size: clamp(15px, 1.3vw, 20px); line-height: 1.65;
}
.cinema .project-note [role="img"] { font-size: .88em }

.cinema .project-note .status-tail { white-space: nowrap }

.cinema .project-note .status-dots {
  display: inline-flex;
  gap: .12em;
  margin-inline-start: .1em;
  vertical-align: calc(-.055em - 1px);
}
.cinema .status-dots > span {
  width: .14em; height: .14em; border-radius: 50%; background: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .cinema .status-dots > span { animation: status-dot-glow 1.8s ease-in-out infinite }
  .cinema .status-dots > span:nth-child(2) { animation-delay: .14s }
  .cinema .status-dots > span:nth-child(3) { animation-delay: .28s }
  .cinema .status-dots > span:nth-child(4) { animation-delay: .42s }
  .cinema .status-dots > span:nth-child(5) { animation-delay: .56s }
  .cinema .status-dots > span:nth-child(6) { animation-delay: .70s }
}

@keyframes status-dot-glow {
  0%, 55%, 100% { opacity: .38 }
  25% { opacity: 1 }
}

.cinema .dazu-spread {
  flex: 1; display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  align-items: center; gap: clamp(36px, 6vw, 108px); width: min(100%, 1560px); margin-inline: auto;
  padding: clamp(22px, 4svh, 56px) clamp(28px, 7vw, 134px);
}
.cinema .dazu-plate {
  justify-self: center;
  width: min(100%, calc((100svh - var(--mast-height) - 10svh) * 1.02), 640px);
}

.cinema .entry-form { width: min(100%, 390px); margin-top: clamp(24px, 3.8vh, 38px) }
.cinema .entry-field { display: grid; gap: 6px }
.cinema .entry-field + .entry-field { margin-top: 14px }
.cinema .entry-field label { color: var(--paper); font-size: 14px; font-weight: 500 }
.cinema .entry-field input {
  appearance: none; min-width: 0; width: 100%; height: 46px; padding: 0 14px; border-radius: 5px;
  border: 1px solid #525250; background: #141413; color: var(--paper); font: inherit; font-size: 16px;
}
.cinema .entry-field input::placeholder { opacity: 1; color: #b0b7b6 }
.cinema .entry-field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--ink) }
.cinema .entry-actions { margin-top: 16px }
.cinema .entry-actions button {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: 48px;
  font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1.4;
  padding: 10px 16px; border: 1px solid transparent; border-radius: 5px;
  color: #152025; background: var(--paper); cursor: pointer;
}
.cinema .entry-actions button:disabled { cursor: wait; opacity: .65 }
.cinema .entry-actions [hidden], .cinema .entry-form:has(#retry-session:not([hidden])) #redeem-btn { display: none }
.cinema #auth-status { color: var(--gold); font-size: 15px; line-height: 1.5 }
.cinema #auth-status:empty { margin: 0 }
.cinema #auth-status:not(:empty), .cinema .entry-notice { margin-top: 12px }
.cinema .entry-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 12px;
  min-height: 52px; border-top: 1px solid var(--line); color: #a4aaa8; font-size: 12px;
}
.cinema .entry-footer a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: .24em }
@media (hover: hover) {
  .cinema .entry-actions button:enabled:hover { background: #e2d3b5 }
  .cinema .cinema-nav a:hover, .cinema .entry-help summary:hover { color: var(--nav-text) }
  .cinema .entry-field input:enabled:hover:not(:focus) { border-color: #93a09f }
}
.cinema .entry-actions button:enabled:active { background: #d6c7a9 }
@media (max-width: 820px) {
  #view-gate.cinema { --margin: clamp(16px, 5.5vw, 32px); --mast-height: 89px }
  .cinema .cinema-mast {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand help" "nav nav";
    gap: 0; min-height: 0;
  }
  .cinema .cinema-home { grid-area: brand; justify-self: start }
  .cinema .cinema-wordmark { width: 110px }
  .cinema .entry-help { grid-area: help }
  .cinema .cinema-nav { grid-area: nav; justify-content: space-between; gap: 8px }
  .cinema .cinema-nav a { gap: 4px; font-size: 14px }
  .cinema .course-spread {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 24px; padding: 16px var(--margin) 8px;
  }
  .cinema .course-plate { order: -1; width: min(100%, 560px); height: clamp(150px, 29svh, 300px) }
  .cinema .course-plate img { height: 100%; object-fit: cover; object-position: 50% 54% }
  .cinema .cinema-entry { width: min(100%, 560px) }
  .cinema .cinema-entry h1 { font-size: clamp(27px, 8.4vw, 41px); line-height: 1.27 }
  .cinema .entry-form { width: 100%; margin-top: 20px }
  .cinema .entry-field { gap: 4px }
  .cinema .entry-field + .entry-field { margin-top: 10px }
  .cinema .entry-actions { margin-top: 12px }
  .cinema .entry-footer { min-height: 46px }
  .cinema .scene-caption h2 { font-size: clamp(54px, 11vw, 84px) }
  .cinema .project-note { margin-top: 10px; font-size: 16px }
}
@media (min-width: 600px) and (max-width: 820px) {
  #view-gate.cinema { --mast-height: 60px }
  .cinema .cinema-mast { display: flex; min-height: var(--mast-height); gap: 24px }
  .cinema .cinema-nav { gap: 22px }
  .cinema .album-spread { grid-template-columns: 1.9fr 1fr; gap: 26px; padding-inline: 12px var(--margin) }
  .cinema .dazu-spread { grid-template-columns: .72fr 1.28fr; gap: 24px; padding-inline: var(--margin) }
}
@media (max-width: 599px) {
  .cinema .album-spread, .cinema .dazu-spread {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto;
    grid-template-areas: "photograph" "caption"; align-content: center; align-items: center;
    row-gap: clamp(16px, 3svh, 32px); padding: 20px var(--margin) clamp(24px, 6svh, 56px);
  }
  .cinema :is(.album-scene, .dazu-scene) .scene-caption { grid-area: caption; justify-self: start }
  .cinema .album-plate {
    justify-self: center; width: min(calc(100% + 2 * var(--margin)), max(270px, 75svh));
  }
  .cinema .dazu-plate {
    grid-area: photograph;
    width: min(100%, max(240px, calc((100svh - var(--mast-height) - 164px) * 1.02)), 480px);
  }
}
@media (max-width: 820px) and (max-height: 720px) {
  .cinema .course-spread { padding-block: 10px 6px; gap: 14px }
  .cinema .course-plate { height: clamp(116px, 23svh, 156px) }
  .cinema .entry-field { grid-template-columns: 74px minmax(0, 1fr); align-items: center }
  .cinema .entry-field input { height: 44px }
  .cinema .entry-form { margin-top: 12px }
}
@media (max-width: 360px) and (max-height: 650px) {
  .cinema .course-plate { height: clamp(100px, 22svh, 130px) }
}
@media (prefers-reduced-motion: no-preference) {
  .cinema .project-reel.has-lamp-cue { margin-top: calc((100svh - var(--mast-height)) * .46) }
  /* The album anchor lands at the start of the fully visible spread. */
  .cinema .project-reel.has-lamp-cue.pinned { margin-top: calc(-1 * var(--stage-lead)) }
  html:has(.cinema.active) { scroll-behavior: smooth }
  .cinema .cinema-nav.has-marker::after {
    transition: transform 220ms cubic-bezier(.22,.74,.24,1), width 220ms cubic-bezier(.22,.74,.24,1);
  }
  .cinema :is(.entry-actions button, .entry-field input, .cinema-nav a) { transition: color .15s, background-color .15s, border-color .15s }
  .cinema .cinema-mast { transition: border-color 160ms ease }
  .cinema .course-plate img { animation: course-print-in 1050ms cubic-bezier(.2,.75,.25,1) backwards }
  .cinema #cinema-title > span {
    animation: course-line-in 650ms cubic-bezier(.2,.8,.2,1) 100ms backwards;
  }
  .cinema #cinema-title > span + span { animation-delay: 180ms }
  .cinema .album-eyes-closed .album-scene .print-sheen,
  .cinema:has(.cinema-nav [href="#dazu"][aria-current]) .dazu-scene .print-sheen {
    background-image: linear-gradient(103deg, currentColor 32%, #fff5d3 49%, currentColor 66%);
    background-size: 330% 100%; background-clip: text; -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; animation: print-reflection 5.5s ease-in-out 2;
  }
  .cinema .course-scene :is(.course-plate, .cinema-entry) {
    opacity: var(--opening-alpha, 1);
    transform: translateY(var(--opening-rise, 0px));
  }
  .cinema .project-stage { background: rgb(0 0 0 / var(--black-stage, 0)) }
  .cinema .project-stage .dazu-scene .scene-caption h2 { opacity: var(--wall-heading, 0) }
  .cinema .project-stage .dazu-scene .scene-caption .project-note { opacity: var(--wall-note, 0) }
}
@media (prefers-reduced-motion: no-preference) {
  /* Each frame appears in place. Its photograph retains its own interaction. */
  .cinema .project-stage .portrait-wall > button {
    border-color: #3b3833;
    opacity: clamp(0, calc((var(--portraits-reveal, 0) - var(--portrait-start, 0)) / var(--portrait-fade, .08)), 1);
  }
}

@keyframes course-print-in {
  from { opacity: .4; transform: scale(1.025) }
  to { opacity: 1; transform: none }
}
@keyframes course-line-in {
  from { opacity: 0; transform: translateY(7px) }
  to { opacity: 1; transform: none }
}
@keyframes print-reflection {
  0%, 12% { background-position: 100% 50% }
  70%, 100% { background-position: 0% 50% }
}
@media (forced-colors: active) {
  .cinema .status-dots > span { background: CanvasText }
  .cinema .print-sheen { -webkit-text-fill-color: CanvasText !important }
  .cinema .entry-actions button, .cinema .entry-field input { border: 1px solid ButtonText }
  .cinema .cinema-nav a[aria-current] { text-decoration: underline }
  .cinema .cinema-nav.has-marker::after { background: Highlight }
}

.brand-beta {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  height: 16px; padding: 0 5px; border: 1px solid currentColor; border-radius: 999px;
  border-color: color-mix(in srgb, currentColor 55%, transparent);
  font: 600 9px/1 -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: .07em;
}
#view-gate.cinema {
  --contact-text: var(--subtle);
  --contact-link: var(--gold);
  --contact-panel: #1b272c;
}
#view-gate.paper {
  --contact-text: var(--secondary);
  --contact-link: var(--brick);
  --contact-panel: var(--paper);
}
#view-gate .code-help {
  grid-column: 1 / -1; margin: 0; color: var(--contact-text);
  font-size: 13px; font-weight: 400; line-height: 1.6;
}
#view-gate .wechat-contact { white-space: nowrap }
#view-gate .wechat-id { user-select: all; overflow-wrap: normal }
#view-gate .wechat-copy {
  display: inline-block; padding: 2px 4px; min-height: 26px; color: var(--contact-link);
  font: inherit; font-weight: 500; background: transparent; border: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em;
}
#view-gate .wechat-copy[hidden] { display: none }
#view-gate .entry-footer { position: relative; flex-wrap: wrap }
#view-gate .entry-social {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px;
  font-size: 14px; line-height: 1.5; color: var(--contact-text);
}
#view-gate .entry-social a, #view-gate .entry-social summary {
  display: inline-flex; align-items: center; min-height: 44px; color: inherit;
  text-decoration: none; cursor: pointer;
}
#view-gate .entry-social summary { list-style: none }
#view-gate .entry-social summary::-webkit-details-marker { display: none }
#view-gate .social-wechat, #view-gate .social-official { position: relative }
#view-gate .wechat-card {
  position: absolute; z-index: 4; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  width: 236px; max-width: calc(100vw - 32px); padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--contact-text); background: var(--contact-panel); box-shadow: 0 8px 24px #0002;
}
#view-gate .wechat-card p { margin: 0 }
#view-gate .wechat-heading { font-size: 16px; font-weight: 600 }
#view-gate .wechat-card .wechat-instructions { margin-top: 6px; font-size: 13px; line-height: 1.6 }
#view-gate .wechat-card img { display: block; width: 144px; height: 144px; object-fit: contain; margin: 6px auto }
#view-gate .official-card { display: none; bottom: 100%; text-align: center; font-size: 13px }
@media (hover: hover) {
  #view-gate .entry-social a:hover, #view-gate .entry-social summary:hover { text-decoration: underline; text-underline-offset: .25em }
  #view-gate .social-official:hover .official-card { display: block }
}
#view-gate .social-official:focus-within .official-card { display: block }
@media (max-width: 680px) {
  #view-gate .entry-footer { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; font-size: 12px }
  #view-gate .entry-social { grid-column: 1/-1; grid-row: 1; gap: 0 20px }
  #view-gate .social-wechat, #view-gate .social-official { position: static }
  #view-gate .wechat-card { left: 16px; bottom: 100%; transform: none }
}

.classroom-header {
  --class-header-height: 60px;
  min-height: var(--class-header-height);
  padding-block: 7px;
  overflow: visible;
  background: rgba(239, 227, 203, .82);
  -webkit-backdrop-filter: saturate(120%) blur(14px);
  backdrop-filter: saturate(120%) blur(14px);
}
.classroom-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink-blue);
  text-decoration: none;
}
.classroom-header .brand img {
  width: auto;
  height: 30px;
  mix-blend-mode: normal;
}
.learner-account { position: relative }
.learner-account summary {
  display: flex; align-items: center; gap: 7px;
  min-height: 44px; cursor: pointer;
  color: var(--ink-blue); list-style: none;
}
.learner-account summary::-webkit-details-marker { display: none }
.learner-account summary::after {
  content: ""; width: 6px; height: 6px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.learner-account[open] summary::after { transform: translateY(2px) rotate(225deg) }
.classroom-header .who { color: inherit; font: 500 13px/1.4 var(--sans); white-space: nowrap; font-variant-numeric: tabular-nums }
.account-actions {
  position: absolute; z-index: 1; inset-inline-end: 0; top: calc(100% + 4px);
  min-width: 140px; padding: 4px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--card); box-shadow: 0 4px 12px rgb(26 32 40 / .12);
}
.account-actions button {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 3px; color: var(--ink-blue);
  background: transparent; font: inherit; text-align: start; cursor: pointer;
}
.account-actions button:hover, .account-actions button:focus-visible { background: var(--paper) }
.account-class-link:not([hidden]) {
  display: flex; align-items: center; min-height: 44px; padding-inline: 12px;
  border-radius: 3px; color: var(--ink-blue); text-decoration: none;
}
.account-class-link:hover, .account-class-link:focus-visible { background: var(--paper) }
.classroom-header :focus-visible { outline: 2px solid var(--ink-blue); outline-offset: 2px }

#view-gate:is(.signed-home, .checking-account) .entry-form { display: none }
#home-account { justify-self: end; font-size: 13px }
#home-account .learner-account summary { color: var(--nav-text, var(--ink)); white-space: nowrap }
#home-account .who { font-variant-numeric: tabular-nums }
#home-account .account-actions { color: #293e52; background: #f7eeda }
#home-account .account-actions :is(a, button) { color: inherit }
#home-course { margin-top: clamp(22px, 4vh, 44px) }
#home-course a {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  padding-inline: 18px; border-radius: 5px; text-decoration: none;
  font-weight: 600; color: #152025; background: #f4eddf;
}
.paper #home-course { grid-column: 2; color: var(--paper) }
.paper #home-course a { background: var(--ink); color: #fbf8ee }
.signed-home.paper .paper-mast { gap: 14px }
.signed-home.paper .entry-help { margin-inline-start: auto }

@media (max-width: 820px) {
  .signed-home.cinema .cinema-mast {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand account" "nav help";
    column-gap: 12px;
  }
  .signed-home.cinema #home-account { grid-area: account }
  .signed-home.cinema .cinema-nav { grid-column: 1 / -1; margin-inline-end: 90px }
  .signed-home.cinema .entry-help { justify-self: end }
}
@media (max-width: 590px) {
  .signed-home.paper .paper-mast { flex-wrap: wrap; column-gap: 8px; row-gap: 0 }
  .signed-home.paper .paper-mark { order: 0 }
  .signed-home.paper #home-account { order: 1; margin-inline-start: auto }
  .signed-home.paper .entry-help { order: 2 }
  .paper #home-course { grid-column: 1 / -1 }
}
/* The two desktop reading columns scroll underneath the translucent fixed-height header. */
@media (min-width: 901px) {
  #view-app > .classroom-header { margin-bottom: -60px; flex: 0 0 60px }
  #view-app :is(aside.side, main.app-main) { padding-top: 88px; scroll-padding-top: 60px }
}
@media (max-width: 900px) {
  #view-app #panel-play { scroll-margin-top: 60px }
}
@media (max-width: 360px) {
  .classroom-header .brand { gap: 4px }
  .classroom-header .brand img { height: 24px }
  .signed-home.cinema .cinema-wordmark { width: 82px }
  .learner-account summary { gap: 4px }
}
