:root {
  --font-comic: "Comic Sans MS", "Comic Sans";
  --font-ocr: "OCR A Std", "OCR A Extended", "OCR-A", "Comic Sans MS", "Comic Sans";
  --iul-blue: #0556A8;
  --iul-deep: #032f65;
  --iul-white: #ffffff;
  --character-color: #9CBAD0;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #000; }
body { color: var(--iul-blue); font-family: var(--font-comic); }
button { font: inherit; appearance: none; -webkit-appearance: none; outline: 0; border-radius: 0; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; text-decoration: none; }
button:hover, button:active, button:focus, button:focus-visible { outline: 0 !important; text-decoration: none; }
button::-moz-focus-inner { border: 0; padding: 0; }
.scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; background: #000; isolation: isolate; }
.tv-screen { position: absolute; z-index: 1; left: 39.8958333%; top: 36.0185185%; width: 20.2083333%; height: 27.5%; overflow: hidden; background: var(--iul-blue); color: #fff; border-radius: 7.2% / 5.5%; isolation: isolate; container-type: inline-size; box-shadow: inset 0 0 15px rgba(0,12,39,.5), inset 0 0 2px rgba(255,255,255,.35); transform: perspective(1000px) rotateX(.22deg) scale(1.008); transform-origin: center; }
.room-art { position: absolute; inset: 0; z-index: 5; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; user-select: none; pointer-events: none; }
.room-art.is-visible { opacity: 1; }
.screen-interface { position: absolute; z-index: 1; inset: 0; overflow: hidden; border-radius: inherit; opacity: 0; transition: opacity .25s ease; container-type: inline-size; font-size: clamp(7px, 2.55cqw, 12px); }
.screen-interface.is-visible { opacity: 1; }
.boot-title { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8%; padding: 7%; background: var(--iul-blue); color: #fff; text-align: center; opacity: 1; transition: opacity .45s ease; }
.boot-title.is-hidden { opacity: 0; pointer-events: none; }
.boot-title h1 { margin: 0; font: 600 clamp(28px, 11.5cqw, 50px)/1.02 var(--font-comic); letter-spacing: -.025em; }
.boot-title p { margin: 0; font: 600 clamp(6px, 1.65cqw, 9px)/1.25 var(--font-ocr); }
.standby-layer { position: absolute; z-index: 3; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity .08s linear; }
.standby-layer.is-visible { opacity: 1; }
.screen-vhs { position: absolute; z-index: 8; inset: 0; pointer-events: none; opacity: .16; border-radius: inherit; background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0,15,45,.42) 3px, transparent 4px), radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.24) 100%); mix-blend-mode: multiply; }
.screen-edge-frame { position: absolute; z-index: 9; inset: 2px; border: 0; border-radius: 7.2% / 5.5%; box-shadow: inset 0 0 10px rgba(0,0,0,.16); pointer-events: none; }
.chooser-screen { position: relative; display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden; background: #fff; color: var(--iul-blue); font-family: var(--font-comic); }
.collection-caption { display: flex; flex: 0 0 15%; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2%; padding: 1% 0 0 7%; transform: translateY(7%); font: 700 clamp(7px, 2.05cqw, 10px)/1.1 var(--font-ocr); letter-spacing: .035em; text-align: left; }
.leon-signature { display: block; width: clamp(28px, 11cqw, 54px); height: auto; max-height: 42%; object-fit: contain; object-position: left center; }
.selection-star { display: flex; flex: 0 0 14%; align-items: center; justify-content: center; transform: translateY(-14%); color: var(--iul-blue); font: 400 clamp(32px, 10.5cqw, 48px)/1 var(--font-comic); text-shadow: 0 1px 0 #fff; user-select: none; pointer-events: none; }
.carousel-window { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; overflow: hidden; }
.portrait-track { position: absolute; inset: 0 auto 0 0; display: flex; width: 600%; height: 100%; align-items: stretch; will-change: transform; transition: transform .42s cubic-bezier(.2,.72,.25,1); }
.portrait-card { position: relative; display: flex; flex: 0 0 calc(100% / 18); align-items: flex-end; justify-content: center; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: visible; background: transparent; box-shadow: none; cursor: pointer; }
.portrait-card img { position: relative; display: block; width: auto; height: 100%; max-width: none; margin-inline: -25%; object-fit: contain; object-position: center bottom; transform: scale(.82); transform-origin: center bottom; opacity: 1; filter: none; pointer-events: none; user-select: none; transition: transform .42s cubic-bezier(.2,.72,.25,1), filter .3s ease; }
.portrait-card.is-center { z-index: 5; }
.portrait-card.is-center img { transform: scale(1.16); filter: drop-shadow(0 0 3px rgba(255,255,255,.98)) drop-shadow(0 0 7px rgba(255,255,255,.68)); }
.portrait-card.is-left { z-index: 4; }
.portrait-card.is-right { z-index: 3; }
.portrait-card.is-hidden-neighbor { z-index: 1; }
.portrait-card.is-left img, .portrait-card.is-right img, .portrait-card.is-hidden-neighbor img { opacity: 1; filter: none; }
.carousel-arrow { position: absolute; z-index: 4; top: 35%; display: grid; width: 11%; height: 34%; place-items: center; padding: 0; border: 0; background: transparent; color: var(--iul-blue); font: 400 clamp(22px, 6.1cqw, 30px)/1 var(--font-comic); cursor: pointer; box-shadow: none; }
.carousel-arrow:hover { color: var(--iul-deep); background: transparent; box-shadow: none; }
.carousel-arrow.previous { left: 0; }
.carousel-arrow.next { right: 0; }
.select-button { position: absolute; z-index: 6; left: 50%; bottom: 3%; min-width: 39%; padding: .52em 1.4em .46em; transform: translateX(-50%); border: 2px solid #034782; border-radius: 0; background: var(--iul-blue); color: #fff; font: 700 clamp(9px, 2.6cqw, 13px)/1.05 var(--font-comic); letter-spacing: .035em; text-align: center; box-shadow: inset -1px -1px 0 rgba(0,0,0,.22), 1px 2px 0 rgba(0,31,71,.26); cursor: pointer; }
.select-button:hover { background: #034782; box-shadow: inset -1px -1px 0 rgba(0,0,0,.22), 1px 2px 0 rgba(0,31,71,.26); }
.select-button:active { border-color: #034782; box-shadow: inset 1px 1px 0 rgba(0,0,0,.2); }
.epg-screen { position: relative; display: flex; width: 100%; height: 100%; min-height: 0; flex-direction: column; gap: 1.25%; overflow: hidden; padding: 4.2% 4.5%; border-radius: 9% / 10%; background: var(--character-color); color: #fff; font-family: var(--font-comic); }
.guide-toolbar { display: flex; flex: 0 0 8.5%; min-height: 0; align-items: center; justify-content: space-between; gap: 2%; padding: .5% 1.5%; background: var(--iul-blue); color: #fff; }
.guide-tool { max-width: 32%; padding: .62em .8em; border: 1px solid #034782; border-radius: 0; background: var(--iul-blue); color: #fff; font: 700 clamp(7px, 1.9cqw, 11px)/1 var(--font-ocr); white-space: nowrap; cursor: pointer; box-shadow: none; }
.guide-tool:hover { border-color: #034782; background: var(--iul-deep); box-shadow: none; }
.guide-brand { margin: 0; color: #fff; font: 700 clamp(9px, 2.3cqw, 13px)/1 var(--font-comic); white-space: nowrap; text-align: center; }
.guide-banner { display: grid; flex: 0 0 24%; min-height: 0; grid-template-columns: 56% 44%; overflow: hidden; border: 0; background: var(--iul-blue); color: #fff; }
.source-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 2%; padding: 3.5% 4%; overflow: hidden; }
.source-kicker { font: 700 clamp(7px, 2.3cqw, 12px)/1.05 var(--font-comic); letter-spacing: .015em; overflow-wrap: anywhere; }
.source-character { margin: 0; font: 700 clamp(12px, 3.9cqw, 20px)/1 var(--font-comic); overflow-wrap: anywhere; }
.source-byline { font: 700 clamp(7px, 2.05cqw, 11px)/1.05 var(--font-comic); }
.source-programme { margin: 1% 0 0; font: 700 clamp(7px, 2cqw, 10px)/1.1 var(--font-comic); overflow-wrap: anywhere; }
.source-detail { margin: 0; font: 600 clamp(6px, 1.55cqw, 9px)/1.1 var(--font-comic); overflow-wrap: anywhere; }
.preview-picture { position: relative; display: block; min-width: 0; overflow: hidden; background: transparent; isolation: isolate; }
.no-signal-image { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: transparent; }
.schedule { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.94); border-radius: 0; background: #071b5a; box-shadow: inset 0 0 8px rgba(0,0,0,.28); }
.schedule.schedule-empty { align-items: stretch; justify-content: stretch; padding: 4% 6%; border: 0; background: var(--character-color); box-shadow: none; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: 22% repeat(7, minmax(0, 1fr)); }
.schedule-head { display: grid; flex: 0 0 18%; min-height: 0; background: #073c92; }
.schedule-head > div { display: flex; min-width: 0; align-items: center; justify-content: center; padding: 1%; border-right: 1px solid #92b9e3; color: #fff; font: 700 clamp(5px, 1.75cqw, 9px)/1.03 var(--font-comic); text-align: center; }
.schedule-head > div:first-child { justify-content: flex-start; padding-left: 3%; white-space: nowrap; letter-spacing: -.06em; }
.schedule-body { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; }
.schedule-row { flex: 1 1 0; min-height: 0; border-top: 1px solid #c4def5; }
.row-label { display: flex; min-width: 0; align-items: center; justify-content: flex-start; padding: 3%; border-right: 1px solid #c4def5; background: #073c92; color: #fff; font: 700 clamp(6px, 1.8cqw, 9px)/1.05 var(--font-comic); overflow-wrap: anywhere; }
.age-cell { position: relative; display: flex; min-width: 0; align-items: center; justify-content: center; padding: 2%; border: 0; border-right: 1px solid #91b5dc; border-radius: 0; background: #081b58; color: #fff; }
.age-cell.memory-entry { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; padding: 4%; border-top: 0; border-bottom: 0; border-left: 0; font: 700 clamp(5px, 1.8cqw, 9px)/1.06 var(--font-comic); text-align: left; overflow-wrap: anywhere; cursor: pointer; box-shadow: none; }
.age-cell.memory-entry span { width: 100%; overflow-wrap: anywhere; }
.age-cell.memory-entry small { color: #b8d9fa; font: 700 clamp(5px, 1.45cqw, 7px)/1 var(--font-comic); }
.age-cell.memory-entry:hover, .age-cell.memory-entry[aria-current="true"] { background: var(--character-color); color: #071b5a; box-shadow: none; }
.age-cell.memory-entry:hover small, .age-cell.memory-entry[aria-current="true"] small { color: #071b5a; }
.empty-grid-message { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; margin: 0; padding: 2.5%; background: #081b58; color: #fff; font: 600 clamp(12px, 3.15cqw, 17px)/1.3 var(--font-comic); text-align: center; overflow-wrap: anywhere; }
.schedule-empty .empty-grid-message { flex: 1; padding: 0; background: transparent; color: var(--iul-deep); font-size: clamp(13px, 3.4cqw, 18px); }
.guide-footer { position: relative; display: flex; flex: 0 0 5%; min-height: 0; align-items: center; justify-content: center; gap: 3px; padding: 0 3%; background: var(--iul-blue); color: #fff; font: 700 clamp(6px, 1.55cqw, 9px)/1 var(--font-comic); text-align: center; }
.guide-footer span:first-child { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-footer span:last-child { position: absolute; right: 1.8%; top: 50%; transform: translateY(-50%); }
.memory-detail { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; justify-content: center; gap: 3%; margin-top: 1.2%; padding: 4%; border: 0; background: #071b5a; color: #fff; overflow: auto; }
.memory-detail .detail-kicker { font: 700 clamp(7px, 2cqw, 12px)/1.1 var(--font-comic); }
.memory-detail h2 { margin: 0; font: 700 clamp(14px, 4cqw, 24px)/1.05 var(--font-comic); overflow-wrap: anywhere; }
.memory-detail p { margin: 0; font: 600 clamp(9px, 2.2cqw, 14px)/1.25 var(--font-comic); }
.detail-action { align-self: flex-start; margin-top: 2%; padding: .5em .8em; border: 1px solid #034782; border-radius: 0; background: var(--iul-blue); color: #fff; font: 700 clamp(8px, 1.9cqw, 11px)/1.05 var(--font-comic); cursor: pointer; box-shadow: none; }
.detail-action:hover { border-color: #034782; background: var(--iul-deep); box-shadow: none; }
.guide-modal { position: fixed; z-index: 50; inset: 0; display: none; align-items: center; justify-content: center; padding: 3vh 3vw; background: rgba(0,0,0,.97); }
.guide-modal.is-open { display: flex; }
.modal-frame { position: relative; display: flex; flex-direction: column; width: min(86vw, 104vh); height: min(64.5vw, 78vh); aspect-ratio: 4 / 3; min-width: 0; min-height: 0; margin: auto; overflow: hidden; border: 0; border-radius: 0; background: #000; container-type: inline-size; box-shadow: none; }
.modal-topbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 6px 10px; border: 0; background: var(--iul-blue); color: #fff; font: 700 12px/1.2 var(--font-comic); }
.modal-actions { display: flex; align-items: center; gap: 5px; }
.modal-topbar > span { font-family: var(--font-comic); }
.modal-control { padding: 7px 10px; border: 1px solid var(--iul-blue); border-radius: 0; background: #fff; color: var(--iul-blue); font: 700 11px/1 var(--font-ocr); cursor: pointer; box-shadow: none; }
.modal-control.primary { background: var(--iul-blue); color: #fff; }
.modal-control:hover { border-color: var(--iul-blue); background: #eaf4ff; color: var(--iul-blue); box-shadow: none; }
.modal-control.primary:hover { background: var(--iul-deep); color: #fff; }
.modal-content { position: relative; display: flex; flex: 1 1 auto; width: 100%; min-height: 0; overflow: hidden; container-type: inline-size; font-size: clamp(13px, 1.7cqw, 22px); border-radius: 5% / 7%; isolation: isolate; box-shadow: none; }
.modal-content::before { position: absolute; z-index: 20; inset: 0; border: 0; border-radius: inherit; content: ""; box-shadow: inset 0 0 35px rgba(0,0,0,.16); pointer-events: none; opacity: .2; background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,16,48,.3) 4px, transparent 5px), radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.3) 100%); mix-blend-mode: multiply; }
.modal-content.is-buffering::after { z-index: 30; }
.modal-content .chooser-screen { font-size: clamp(17px, 2.7cqw, 30px); }
.modal-content .collection-caption { font-size: clamp(12px, 1.8cqw, 20px); }
.modal-content .selection-star { font-size: clamp(54px, 9cqw, 88px); }
.modal-content .select-button { font-size: clamp(15px, 2.4cqw, 25px); }
.modal-content .guide-toolbar { flex-basis: 8.5%; }
.modal-content .guide-tool { font-size: clamp(10px, 1.2cqw, 14px); padding: 7px 10px; }
.modal-content .guide-brand { font-size: clamp(16px, 2cqw, 24px); }
.modal-content .source-kicker { font-size: clamp(12px, 1.8cqw, 21px); }
.modal-content .source-character { font-size: clamp(22px, 3.7cqw, 40px); }
.modal-content .source-byline { font-size: clamp(12px, 1.6cqw, 18px); }
.modal-content .source-programme { font-size: clamp(12px, 1.6cqw, 18px); }
.modal-content .source-detail { font-size: clamp(10px, 1.25cqw, 15px); }
.modal-content .preview-caption { font-size: clamp(10px, 1.35cqw, 16px); }
.modal-content .schedule-head > div { font-size: clamp(9px, 1.25cqw, 15px); }
.modal-content .row-label { font-size: clamp(10px, 1.35cqw, 16px); }
.modal-content .age-cell.memory-entry { font-size: clamp(10px, 1.5cqw, 18px); }
.modal-content .age-cell.memory-entry small { font-size: clamp(9px, 1.1cqw, 13px); }
.modal-content .empty-grid-message { font-size: clamp(18px, 2.6cqw, 29px); line-height: 1.3; }
.modal-content .schedule-empty .empty-grid-message { font-size: clamp(18px, 2.8cqw, 31px); }
.modal-content .guide-footer { font-size: clamp(8px, 1cqw, 12px); }
.modal-frame:fullscreen { position: fixed; inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86vw, 104vh); height: min(64.5vw, 78vh); aspect-ratio: 4 / 3; max-width: 86vw; max-height: 78vh; margin: 0; border: 0; border-radius: 0; background: #000; box-shadow: none; }
.guide-modal:fullscreen { padding: 0; }
.entry-wash { position: fixed; z-index: 100; inset: 0; background: #fff; opacity: 1; pointer-events: none; transition: background .2s ease, opacity .35s ease; }
.entry-wash.is-black { background: #000; }
.entry-wash.is-leaving { opacity: 0; }
.entry-wash.is-navigating { background: #fff; opacity: 1; }
.screen-interface.is-buffering::after, .modal-content.is-buffering::after { position: absolute; z-index: 30; inset: 0; content: ""; background: var(--iul-blue) url("PleaseStandBy.png") center / 100% 100% no-repeat; pointer-events: none; }
@media (max-width: 680px) {
  .modal-topbar { min-height: 36px; gap: 4px; padding: 4px 5px; font-size: 10px; }
  .modal-actions { gap: 3px; }
  .modal-control { padding: 6px 7px; font-size: 9px; }
  .modal-content { font-size: 13px; }
  .modal-frame { width: min(92vw, 104vh); height: min(69vw, 78vh); }
  .modal-frame:fullscreen { width: min(92vw, 104vh); height: min(69vw, 78vh); max-width: 92vw; max-height: 78vh; }
  .modal-content .guide-tool { max-width: 33%; padding: .5em .55em; font-size: clamp(8px, 1.2cqw, 12px); }
  .modal-content .guide-brand { font-size: clamp(12px, 2cqw, 20px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
