/* A stage for a family celebration. The Three.js world remains the main image. */
:root{color-scheme:dark;--fg-ink:#102d3d;--fg-night:#102733;--fg-teal:#78b4aa;--fg-cream:#fff0d3;--fg-soft:#c9d5ca;--fg-coral:#efa28a;--fg-amber:#f0c078;--fg-serif:Georgia,Cambria,"Times New Roman",serif;--fg-sans:"Segoe UI",Arial,sans-serif}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#102936;font-family:var(--fg-sans);color:var(--fg-cream)}
body>canvas,#world{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:0;touch-action:none}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--fg-amber);outline-offset:5px}
[hidden]{display:none!important}
.family-ui{position:fixed;inset:0;z-index:80;pointer-events:none;font-family:var(--fg-sans);color:var(--fg-cream);isolation:isolate}
.family-ui button{color:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.family-ui .fg-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:0 0 22px}
.fg-icon svg{width:100%;height:100%}
.fg-header{height:76px;position:absolute;inset:0 0 auto;display:flex;align-items:center;gap:24px;padding:12px 30px;background:linear-gradient(#0c2435d9,#0c243588 74%,transparent);pointer-events:none;z-index:4}
.fg-brand{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:4px;flex:1;min-width:126px;min-height:44px;text-shadow:0 2px 10px #061824;border:0;padding:0;background:transparent;text-align:left;pointer-events:auto}
.fg-brand__name{font-size:19px;font-weight:650;letter-spacing:.13em}
.fg-progress{font-size:11px;color:var(--fg-soft);letter-spacing:.04em}
.fg-nav{display:flex;align-items:center;gap:7px;pointer-events:auto}
.fg-nav__button,.fg-icon-button{border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#133d4b88;border-radius:99px;min-height:44px;padding:0 16px;backdrop-filter:blur(10px);font-size:12px;transition:background .18s,transform .18s}
.fg-nav__button:hover,.fg-icon-button:hover{background:#28616ddb;border-color:#cbe1d633}
.fg-nav__button:active,.fg-icon-button:active{transform:translateY(1px)}
.fg-nav__button .fg-icon{width:19px;height:19px;flex-basis:19px}
.fg-utilities{display:flex;align-items:center;gap:7px;pointer-events:auto;margin-left:auto}
.fg-language{display:flex;padding:3px;background:#102b3bad;border:1px solid #bfd3cc30;border-radius:99px}
.fg-language__button{border:0;border-radius:99px;background:transparent;min-height:36px;min-width:39px;padding:0 7px;font-size:11px;letter-spacing:.06em;color:#c1d5d0!important}
.fg-language__button[aria-pressed=true]{background:var(--fg-cream);color:var(--fg-ink)!important;font-weight:700}
.fg-icon-button{width:44px;height:44px;min-width:44px;padding:0}
.fg-icon-button>span:last-child:not(.fg-icon){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.fg-sound[aria-pressed=true]{background:#d4b173;color:#183b47!important;border-color:#f4dba5}
.fg-screen{position:absolute;inset:76px 0 0;pointer-events:none;overflow:hidden}
.fg-title-block{position:relative}
.fg-eyebrow{font-size:11px;line-height:1.6;text-transform:uppercase;letter-spacing:.19em;color:var(--fg-amber);margin:0 0 18px;font-weight:600}
.fg-title{font-family:var(--fg-serif);font-weight:400;font-size:clamp(36px,4.5vw,68px);line-height:1.07;letter-spacing:-.045em;margin:0 0 23px;white-space:pre-line;text-wrap:balance}
.fg-description{font-size:16px;line-height:1.7;color:var(--fg-soft);margin:0;max-width:490px;white-space:pre-line;text-wrap:pretty}
.fg-primary{display:inline-flex;align-items:center;justify-content:center;gap:20px;min-height:58px;padding:15px 26px;border:1px solid #ffc6a6;background:var(--fg-coral);color:#223a42!important;box-shadow:0 8px 35px #06243035;border-radius:9px;font-size:16px;font-weight:650;transition:transform .18s,background .18s;pointer-events:auto}
.fg-primary .fg-icon{order:2;width:21px;height:21px;flex-basis:21px}
.fg-primary:hover{background:#ffc1a8;transform:translateY(-2px)}
.fg-primary:active{transform:translateY(0)}
.fg-signature{font-family:var(--fg-serif);font-style:italic;font-size:16px;line-height:1.5;color:#e7cfb1;margin:20px 0 0}
.fg-welcome{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:clamp(60px,9vw,160px);padding:42px 6vw 85px;overflow-y:auto;background:linear-gradient(90deg,#0a253ba8,transparent 80%);pointer-events:auto}
.family-ui[data-screen=welcome] .fg-screen{inset:76px 0 0}
.family-ui[data-screen=welcome] .fg-header{background:transparent;pointer-events:none}
.family-ui[data-screen=welcome] .fg-nav{display:none}
.fg-welcome>.fg-title-block{flex:0 1 545px;pointer-events:auto;text-shadow:0 2px 30px #072533aa}
.fg-welcome .fg-title{font-size:clamp(53px,6.3vw,93px);margin-bottom:25px;line-height:1.035}
.fg-welcome .fg-description{max-width:440px;font-size:17px;color:#e1ded0}
.fg-open-gift{margin-top:30px}
.fg-welcome-photo{position:relative;flex:0 0 min(28vw,330px);margin:20px 0 0;padding:13px 13px 17px;background:#efdfbf;color:#213d43;box-shadow:0 20px 60px #04192666;transform:rotate(5deg);pointer-events:none}
.fg-welcome-portrait{width:100%;aspect-ratio:4/5;display:block;overflow:hidden;background:#bdbead}
.fg-welcome-portrait .fg-portrait__photo{width:100%;height:100%;object-fit:cover;object-position:center 30%;display:block}
.fg-photo-caption{font-family:var(--fg-serif);font-size:24px;text-align:center;padding:14px 0 1px}
.fg-birthday-seal{position:absolute;right:-25px;bottom:-28px;width:90px;height:90px;background:#ba604f;color:#ffe7b7;display:grid;place-items:center;font-family:var(--fg-serif);font-size:48px;transform:rotate(-12deg);border:3px double #f4c08d;border-radius:50%;box-shadow:0 8px 20px #04202e55}
.fg-menu-surface{position:absolute;pointer-events:auto;background:linear-gradient(0deg,#102d3ef0,#163847de 65%,#183c47d1);border:1px solid #cee6d326;box-shadow:0 20px 70px #051c3647;backdrop-filter:blur(14px)}
.fg-choose{width:min(840px,calc(100% - 48px));max-height:calc(100% - 50px);left:50%;top:50%;transform:translate(-50%,-50%);padding:27px 36px 23px;border-radius:22px;overflow-y:auto;text-align:center}
.fg-choose .fg-title{font-size:43px;margin-bottom:11px}
.fg-choose .fg-eyebrow{margin-bottom:11px;font-size:10px}
.fg-choose .fg-description{margin:auto;font-size:14px}
.fg-player-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:26px 0 20px}
.fg-player-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;border:1px solid #d4ded12e;border-radius:15px;padding:14px 9px 16px;background:#24465377;min-height:203px;transition:border .18s,background .18s,transform .18s}
.fg-player-card:hover{transform:translateY(-3px);background:#365c6777}
.fg-player-card[aria-pressed=true]{border-color:var(--fg-amber);background:#e4ba721b;box-shadow:inset 0 0 0 1px #e4ba72}
.fg-player-card .fg-portrait{width:93px;height:105px;margin-bottom:6px;border-radius:24px;overflow:hidden;display:block}
.fg-portrait-svg{display:block;width:100%;height:100%;object-fit:contain}
.fg-portrait__photo{display:block;width:100%;height:100%;object-fit:cover;object-position:center 28%}
.fg-player-card__name{font-family:var(--fg-serif);font-size:24px;font-weight:400}
.fg-player-card__role{font-size:11px;line-height:1.45;color:var(--fg-soft)}
.fg-player-card__check{position:absolute;top:8px;right:8px;width:21px;height:21px;border-radius:50%;background:var(--fg-amber);color:var(--fg-ink);padding:3px;opacity:0}
.fg-player-card[aria-pressed=true] .fg-player-card__check{opacity:1}
.fg-choice-footer{display:flex;align-items:center;justify-content:center;gap:27px}
.fg-current-player{font-size:13px;color:var(--fg-soft);margin:0}
.fg-current-player strong{color:var(--fg-cream);font-weight:650}
.fg-choice-footer .fg-primary{min-height:51px;font-size:14px;padding:12px 23px}
.fg-small-note{font-size:10px;line-height:1.4;color:#b1c7c1;margin:16px 0 0}
.fg-lights{position:absolute;left:6vw;bottom:10vh;max-width:460px;padding:30px 34px;background:linear-gradient(115deg,#0b293bef,#143a46d6);border-left:2px solid var(--fg-amber);box-shadow:0 10px 80px #08273655;border-radius:0 20px 20px 0;pointer-events:auto}
.fg-lights .fg-title{font-size:44px;margin-bottom:18px}
.fg-lights .fg-description{font-size:15px}
.fg-light-switch{display:flex;align-items:center;gap:18px;width:100%;margin-top:26px;min-height:83px;padding:12px 17px;border:1px solid #f5c77d9c;border-radius:12px;background:#2a4b50;color:var(--fg-cream);text-align:left;box-shadow:0 4px 25px #040f1c33;transition:background .2s}
.fg-light-switch:hover{background:#39625d}
.fg-light-switch__art{width:40px;height:57px;padding:5px;background:#d5bd95;border:2px solid #f2dbb9;border-radius:7px;box-shadow:inset 0 2px 5px #64574788;display:flex;align-items:flex-end;flex-shrink:0}
.fg-light-switch__lever{height:34px;width:100%;background:linear-gradient(#f3d8b1,#cdb38d);border-radius:3px;border-top:4px solid #fff1cf;box-shadow:0 3px 3px #4f493866}
.fg-light-switch__label{flex:1;font-size:18px;font-weight:600}
.fg-chapters{left:50%;bottom:32px;transform:translateX(-50%);width:min(1110px,calc(100% - 56px));padding:23px 25px 25px;border-radius:21px;max-height:calc(100% - 32px);overflow-y:auto}
.fg-chapters>.fg-title-block{display:flex;align-items:baseline;gap:25px;margin-bottom:20px}
.fg-hub-heading{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:20px}
.fg-hub-heading .fg-title-block{display:flex;align-items:baseline;gap:24px}
.fg-explore-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 13px;border:1px solid #a9c7bd6e;border-radius:10px;background:#163c49cc;white-space:nowrap;font-size:12px;flex-shrink:0}
.fg-explore-button:hover,.fg-open-stories:hover{background:#32636a;border-color:#efd7a3}
.fg-explore-button .fg-icon{width:18px;height:18px;flex-basis:18px}
.fg-chapters .fg-title{font-size:33px;margin:0;flex-shrink:0}
.fg-chapters .fg-description{font-size:13px;line-height:1.5;max-width:430px}
.fg-chapter-deck{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.fg-chapter-card{display:grid;grid-template-columns:100px minmax(0,1fr);gap:9px 10px;text-align:left;padding:18px 17px 14px;border:1px solid #eff2d342;border-radius:13px;background:#224b57b5;min-height:170px;transition:background .2s,border-color .2s,transform .2s}
.fg-chapter-card:hover{background:#365f66;border-color:#efd7a3;transform:translateY(-4px)}
.fg-chapter-art{display:block;align-self:center;color:var(--fg-amber);width:100%;min-width:0}
.fg-chapter-art svg{width:100%;height:auto;display:block}
.fg-chapter-copy{display:flex;flex-direction:column;justify-content:center;gap:9px;min-width:0}
.fg-chapter-title{font-family:var(--fg-serif);font-weight:400;font-size:24px;line-height:1.15;text-wrap:balance}
.fg-chapter-hint{color:#c0d4cb;font-size:11px;line-height:1.45}
.fg-chapter-status{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e7d4b32d;padding-top:11px;margin-top:2px;color:#f0cf98;font-size:11px;gap:8px}
.fg-chapter-status .fg-icon{width:17px;height:17px;flex-basis:17px}
.fg-chapter-card[data-complete=true] .fg-chapter-status{color:#a4d3b4}
.fg-hub-footer{display:flex;justify-content:flex-end;margin-top:15px}
.fg-congratulate{min-height:48px;padding:11px 23px;font-size:14px;gap:13px}
.fg-congratulate .fg-icon{order:0;width:19px;height:19px;flex-basis:19px}
.fg-active-chapter:empty{display:none}
.fg-explore-bar{position:absolute;left:50%;bottom:21px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:10px 12px 12px;background:#123745db;border:1px solid #c8d6be42;border-radius:15px;box-shadow:0 7px 28px #041e2e55;backdrop-filter:blur(10px);pointer-events:auto}
.fg-explore-hint{text-align:center;font-size:11px;line-height:1.4;color:#d0dbcd;margin:0 0 8px}
.fg-explore-actions{display:flex;align-items:stretch;gap:10px}
.fg-open-stories{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:48px;padding:11px 19px;border:1px solid #c1d6c575;border-radius:9px;background:#214c58;color:var(--fg-cream);font-size:14px;transition:background .18s}
.fg-open-stories .fg-icon{order:2;width:18px;height:18px;flex-basis:18px}
.fg-explore-bar .fg-congratulate{width:auto;max-width:340px}
.fg-active-chapter{position:absolute;top:12px;left:30px;pointer-events:auto}
.fg-back-button{display:flex;align-items:center;gap:9px;min-height:44px;padding:8px 16px;border:1px solid #b5d4c633;border-radius:99px;background:#153d4be8;box-shadow:0 4px 20px #06263833;font-size:12px}
.fg-back-button .fg-icon{width:17px;height:17px;flex-basis:17px}
.fg-ending{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px 25px 65px;background:radial-gradient(ellipse at center,#183b46dc,transparent 75%);overflow-y:auto;pointer-events:auto}
.fg-ending>.fg-title-block{max-width:660px}
.fg-ending-star{width:47px;height:47px;color:var(--fg-amber);margin-bottom:24px;display:block;transform:rotate(15deg)}
.fg-ending-star svg{width:100%;height:100%}
.fg-ending .fg-title{font-size:clamp(46px,5.8vw,80px);margin-bottom:27px}
.fg-ending .fg-eyebrow{margin-bottom:17px}
.fg-ending-message{font-family:var(--fg-serif);font-size:23px;line-height:1.5;margin:0 auto 12px;max-width:570px;color:#ffe8c5}
.fg-ending-message--second{font-family:var(--fg-sans);font-size:15px;line-height:1.7;max-width:450px;color:#d2ded3}
.fg-ending .fg-primary{margin-top:20px}
.fg-ending .fg-signature{font-size:14px}
.fg-dialog{position:fixed;max-width:calc(100vw - 32px);max-height:calc(100dvh - 44px);overflow:auto;border:1px solid #d6dec65e;border-radius:22px;background:#143644;color:var(--fg-cream);padding:27px 30px 31px;box-shadow:0 30px 100px #00131a99;pointer-events:auto;margin:auto;width:620px;font-family:var(--fg-sans)}
.fg-dialog::backdrop{background:#071d32bd;backdrop-filter:blur(7px)}
.fg-dialog-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:13px}
.fg-dialog-title{font-family:var(--fg-serif);font-size:39px;line-height:1.15;font-weight:400;letter-spacing:-.035em;margin:0;text-wrap:balance}
.fg-dialog-close{flex:0 0 44px;background:#42606a4d}
.fg-dialog-intro{font-size:14px;color:var(--fg-soft);line-height:1.6;margin:0 0 21px}
.fg-family-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.fg-family-card{display:flex;flex-direction:column;align-items:center;gap:7px;padding:13px 8px 15px;background:#214c5977;border:1px solid #c1d3c629;border-radius:13px}
.fg-family-card:hover{border-color:var(--fg-amber);background:#325e6377}
.fg-family-card .fg-portrait{display:block;width:88px;height:98px;border-radius:22px;overflow:hidden;margin-bottom:4px}
.fg-family-card strong{font-family:var(--fg-serif);font-size:22px;font-weight:400}
.fg-family-card>span:last-child{font-size:11px;line-height:1.4;color:var(--fg-soft);text-align:center}
.fg-person-dialog{width:610px;display:grid;grid-template-columns:140px 1fr;gap:17px 24px}
.fg-person-dialog:not([open]){display:none}
.fg-person-dialog .fg-dialog-top{grid-column:1/-1;margin-bottom:3px}
.fg-person-visual .fg-portrait{display:block;width:140px;height:157px;border-radius:26px;overflow:hidden;box-shadow:0 7px 23px #061e3155}
.fg-person-role{font-size:11px;letter-spacing:.11em;text-transform:uppercase;color:var(--fg-amber);margin:1px 0 15px;line-height:1.5}
.fg-person-bio{font-size:15px;line-height:1.75;margin:0 0 15px;color:#e0e5d9;white-space:pre-line}
.fg-person-bio:last-child{margin-bottom:0}
.fg-toast{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);width:max-content;max-width:min(550px,calc(100% - 32px));padding:14px 21px;border:1px solid #dcc79866;border-radius:12px;background:#0b2c3af5;color:#f6e6c8;font-size:14px;line-height:1.5;text-align:center;box-shadow:0 8px 35px #04172566;z-index:8}
.fg-travel{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;width:min(340px,calc(100% - 40px));padding:20px 30px 30px;background:#133745ef;backdrop-filter:blur(12px);border:1px solid #dec69980;border-radius:25px;box-shadow:0 25px 100px #06222d77;text-align:center;z-index:7}
.fg-travel__art{display:block;width:140px;height:105px;color:var(--fg-amber);margin-bottom:7px;animation:fg-train-sway 1.5s ease-in-out infinite}
.fg-travel__art svg{display:block;width:100%;height:100%}
.fg-travel .fg-eyebrow{margin:0 0 8px;font-size:10px}
.fg-travel__label{font-family:var(--fg-serif);font-size:33px;line-height:1.2;font-weight:400}
@keyframes fg-train-sway{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-3px) rotate(1deg)}}
@media(min-width:1400px){.fg-welcome-photo{flex-basis:340px}.fg-lights{bottom:13vh}.fg-chapters{bottom:40px}}
@media(max-width:1050px){.fg-header{padding:12px 20px;gap:13px}.fg-nav__button{padding:0 12px;font-size:11px}.fg-utilities{gap:4px}.fg-chapters{width:calc(100% - 36px);padding:21px}.fg-chapters>.fg-title-block{display:block;margin-bottom:18px}.fg-chapters .fg-title{font-size:30px;margin-bottom:8px}.fg-chapter-card{grid-template-columns:78px minmax(0,1fr);padding:15px 12px}.fg-chapter-title{font-size:21px}.fg-chapter-hint{font-size:10px}.fg-welcome{gap:8vw;padding-left:7vw;padding-right:7vw}.fg-welcome-photo{flex-basis:29vw}.fg-welcome .fg-title{font-size:7vw}}
@media(max-width:700px){
 .fg-header{height:96px;display:grid;grid-template-columns:1fr auto;grid-template-rows:44px 44px;padding:4px 12px;gap:0 8px;background:linear-gradient(#0b2438e8,#0c283dc9 77%,transparent)}
 .fg-brand{flex-direction:row;align-items:baseline;gap:10px;min-width:0}.fg-brand__name{font-size:15px;letter-spacing:.075em;white-space:nowrap}.fg-progress{font-size:9px;white-space:nowrap;letter-spacing:0}
 .fg-utilities{grid-column:2;grid-row:1;gap:2px}.fg-language{padding:0;border:0}.fg-language__button{min-width:44px;min-height:44px;font-size:10px}.fg-icon-button{width:44px;height:44px;min-width:44px}.fg-icon-button .fg-icon{width:18px;height:18px;flex-basis:18px}
 .fg-nav{grid-column:1/-1;grid-row:2;justify-content:center;gap:5px}.fg-nav__button{min-height:44px;padding:0 13px;font-size:11px;gap:6px}.fg-nav__button .fg-icon{width:17px;height:17px;flex-basis:17px}
 .fg-screen{inset:96px 0 0}.fg-title{font-size:35px}.fg-description{font-size:14px}.fg-eyebrow{font-size:9px;letter-spacing:.15em;margin-bottom:12px}
 .fg-welcome{flex-direction:column-reverse;justify-content:center;align-items:center;gap:22px;padding:24px 26px 28px;background:linear-gradient(0deg,#0d293dbf,#102f4c33);min-height:0}
 .fg-welcome>.fg-title-block{flex:0 0 auto;text-align:center;max-width:390px}.fg-welcome .fg-title{font-size:clamp(40px,10.4vw,59px);margin-bottom:16px;line-height:1.02}.fg-welcome .fg-description{font-size:13px;line-height:1.55;max-width:335px;margin:0 auto}.fg-welcome .fg-eyebrow{margin-bottom:10px}
 .fg-welcome-photo{flex:0 0 auto;width:146px;padding:6px 6px 8px;margin:0;transform:rotate(5deg)}.fg-welcome-portrait{aspect-ratio:1.05}.fg-photo-caption{font-size:16px;padding-top:7px}.fg-birthday-seal{right:-20px;bottom:-14px;width:56px;height:56px;font-size:31px;border-width:3px}.fg-open-gift{margin-top:21px;min-height:53px;padding:12px 25px;font-size:15px}.fg-welcome .fg-signature{margin-top:13px;font-size:13px}
 .fg-choose{width:calc(100% - 24px);max-height:calc(100% - 18px);padding:22px 18px 17px;border-radius:18px}.fg-choose .fg-title{font-size:31px;margin-bottom:10px}.fg-choose .fg-description{font-size:12px}.fg-choose .fg-eyebrow{font-size:9px;margin-bottom:8px}.fg-player-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:19px 0 16px}.fg-player-card{min-height:139px;padding:10px 8px 11px;gap:3px}.fg-player-card .fg-portrait{width:65px;height:73px;margin-bottom:3px;border-radius:17px}.fg-player-card__name{font-size:21px}.fg-player-card__role{font-size:10px}.fg-choice-footer{gap:11px;flex-direction:column}.fg-current-player{font-size:11px}.fg-choice-footer .fg-primary{min-height:47px;width:100%;font-size:14px}.fg-small-note{font-size:9px;margin-top:12px}
 .fg-lights{left:17px;right:17px;bottom:23px;max-width:430px;padding:22px 23px;border-radius:0 17px 17px 0}.fg-lights .fg-title{font-size:36px;margin-bottom:12px;max-width:300px}.fg-lights .fg-description{font-size:13px;line-height:1.6}.fg-light-switch{margin-top:19px;min-height:73px;padding:10px 14px;gap:14px}.fg-light-switch__art{width:35px;height:50px;padding:4px}.fg-light-switch__lever{height:30px}.fg-light-switch__label{font-size:16px}
 .fg-chapters{width:calc(100% - 24px);bottom:13px;padding:19px 16px 16px;border-radius:18px;max-height:calc(100% - 18px)}.fg-chapters>.fg-title-block{margin-bottom:15px}.fg-chapters .fg-title{font-size:28px;margin-bottom:8px}.fg-chapters .fg-description{font-size:12px;line-height:1.45}.fg-chapter-deck{grid-template-columns:1fr;gap:10px}.fg-chapter-card{grid-template-columns:73px minmax(0,1fr) 18px;min-height:102px;padding:12px 13px;gap:5px 12px}.fg-chapter-copy{gap:6px}.fg-chapter-title{font-size:23px;line-height:1.1;text-wrap:initial}.fg-chapter-hint{font-size:11px;line-height:1.35}.fg-chapter-status{grid-column:auto;margin:0;padding:0;border:0;align-self:center;font-size:0}.fg-chapter-status .fg-icon{width:19px;height:19px}.fg-chapter-card[data-complete=true]{border-color:#8abb9273}.fg-active-chapter{top:8px;left:12px}.fg-back-button{min-height:44px;font-size:11px;padding:7px 12px}
 .fg-ending{justify-content:center;padding:25px 25px 40px;background:radial-gradient(ellipse at center,#143845ed,transparent 100%)}.fg-ending .fg-title{font-size:43px;margin-bottom:23px}.fg-ending .fg-eyebrow{font-size:9px;margin-bottom:14px}.fg-ending-star{width:36px;height:36px;margin-bottom:20px}.fg-ending-message{font-size:20px}.fg-ending-message--second{font-size:13px;line-height:1.7;max-width:310px}.fg-ending .fg-primary{font-size:13px;min-height:52px;padding:13px 19px;gap:15px;margin-top:19px}.fg-ending .fg-signature{font-size:13px;margin-top:15px}
 .fg-dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:20px 20px 23px;border-radius:18px}.fg-dialog-title{font-size:32px}.fg-dialog-top{gap:10px}.fg-dialog-intro{font-size:13px}.fg-family-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.fg-family-card .fg-portrait{width:76px;height:85px;border-radius:19px}.fg-family-card strong{font-size:22px}.fg-family-card{padding:12px 7px 13px;gap:5px}.fg-family-card>span:last-child{font-size:10px}.fg-person-dialog{grid-template-columns:88px 1fr;gap:16px}.fg-person-visual .fg-portrait{width:88px;height:99px;border-radius:19px}.fg-person-role{font-size:10px;margin-bottom:12px}.fg-person-bio{font-size:13px;line-height:1.7}.fg-person-text{min-width:0}.fg-toast{bottom:16px;padding:12px 16px;font-size:12px}
}
@media(max-width:380px){.fg-brand{gap:6px}.fg-brand__name{font-size:14px}.fg-progress{font-size:8px}.fg-reset{display:none}.fg-welcome{padding-left:22px;padding-right:22px;gap:18px}.fg-welcome .fg-title{font-size:39px}.fg-welcome-photo{width:125px}.fg-choose{padding:17px 15px}.fg-choose .fg-title{font-size:27px}.fg-chapter-title{font-size:21px}.fg-lights .fg-title{font-size:33px}}
@media(max-width:700px){.fg-hub-footer{margin-top:13px}.fg-congratulate{width:100%;font-size:13px;line-height:1.4;padding:11px 14px;gap:10px;min-height:48px}}
@media(max-width:1050px){.fg-hub-heading{align-items:flex-start;gap:16px;margin-bottom:17px}.fg-hub-heading .fg-title-block{display:block}.fg-explore-button{font-size:11px;padding:9px 12px}}
@media(max-width:700px){.fg-hub-heading{display:block;margin-bottom:15px}.fg-hub-heading .fg-title-block{display:block}.fg-explore-button{margin-top:12px;min-height:44px;width:100%;font-size:12px}.fg-explore-bar{bottom:13px;width:calc(100% - 24px);max-width:430px;padding:9px 10px 10px;border-radius:13px}.fg-explore-hint{font-size:10px;margin-bottom:7px}.fg-explore-actions{gap:8px}.fg-open-stories{flex:1;min-width:0;font-size:12px;line-height:1.35;padding:9px 10px;gap:7px}.fg-explore-bar .fg-congratulate{flex:1;min-width:0;max-width:none;font-size:12px;padding:9px 10px;gap:7px}.fg-explore-actions .fg-icon{width:16px;height:16px;flex-basis:16px}}
@media(max-height:680px) and (min-width:701px){.fg-welcome{padding-top:20px;padding-bottom:38px}.fg-welcome-photo{flex-basis:230px}.fg-welcome .fg-title{font-size:63px}.fg-welcome .fg-description{font-size:14px}.fg-welcome .fg-eyebrow{margin-bottom:12px}.fg-open-gift{margin-top:20px;min-height:50px}.fg-choose{padding:19px 28px;max-height:calc(100% - 24px)}.fg-choose .fg-title{font-size:35px}.fg-player-choices{margin:17px 0}.fg-player-card{min-height:169px;padding:10px}.fg-player-card .fg-portrait{width:73px;height:82px}.fg-player-card__name{font-size:22px}.fg-chapters{bottom:17px}.fg-ending .fg-title{font-size:58px;margin-bottom:20px}.fg-ending-star{width:30px;height:30px;margin-bottom:15px}.fg-ending-message{font-size:20px}.fg-ending-message--second{font-size:13px}.fg-ending .fg-primary{min-height:50px;margin-top:12px}}
@media(max-height:660px) and (max-width:700px){.fg-welcome{justify-content:flex-start;gap:13px;padding-top:15px}.fg-welcome-photo{width:108px}.fg-photo-caption{font-size:13px;padding-top:5px}.fg-birthday-seal{width:43px;height:43px;font-size:25px;right:-15px;bottom:-9px}.fg-welcome .fg-title{font-size:38px;margin-bottom:11px}.fg-welcome .fg-description{font-size:12px}.fg-welcome .fg-eyebrow{font-size:8px;margin-bottom:7px}.fg-open-gift{min-height:47px;margin-top:15px}.fg-welcome .fg-signature{font-size:12px;margin-top:10px}.fg-choose{top:9px;transform:translateX(-50%)}.fg-chapters{top:9px;bottom:auto}.fg-ending{justify-content:flex-start;padding-top:20px}.fg-ending-star{width:27px;height:27px;margin-bottom:15px}.fg-ending .fg-title{font-size:37px;margin-bottom:17px}.fg-ending-message{font-size:18px}.fg-ending-message--second{font-size:12px}.fg-ending .fg-primary{min-height:48px;margin-top:14px}}
@media(prefers-reduced-motion:reduce){.family-ui *,.family-ui *::before,.family-ui *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.fg-nav[inert]{opacity:.45}.fg-toast{top:88px;bottom:auto;pointer-events:none}@media(max-width:700px){.fg-toast{top:108px;bottom:auto}}

/* Home is independent of chapter navigation, so travel never disables this exit. */
.fg-home-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 16px;border:1px solid #f2d9a996;border-radius:11px;background:#e8c78d;color:#173945!important;box-shadow:0 3px 17px #05202b33;font-size:14px;font-weight:650;white-space:nowrap;pointer-events:auto;flex-shrink:0;transition:background .18s,transform .18s}
.fg-home-button:hover{background:#ffe1a8}.fg-home-button:active{transform:translateY(1px)}
.fg-home-button .fg-icon{width:20px;height:20px;flex-basis:20px}
.fg-restart-choice{margin-top:14px;max-width:370px}
.fg-restart-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 16px;border:1px solid #bfd3c76b;border-radius:9px;background:#153d4b99;font-size:14px;pointer-events:auto}
.fg-restart-button:hover{background:#345c62}.fg-restart-button .fg-icon{width:17px;height:17px;flex-basis:17px}
.fg-reset-note{font-size:11px;line-height:1.45;color:#c7d1c4;margin:7px 0 0}
.fg-dialog-actions{display:flex;align-items:center;gap:9px;flex-shrink:0}
.fg-dialog-home{min-height:44px;padding:9px 12px;font-size:12px;gap:7px}
.fg-dialog-home .fg-icon{width:18px;height:18px;flex-basis:18px}
.fg-welcome--enter>.fg-title-block{animation:fg-home-copy-in .42s ease-out both}
.fg-welcome--enter>.fg-welcome-photo{animation:fg-home-photo-in .48s ease-out both}
@keyframes fg-home-copy-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes fg-home-photo-in{from{opacity:0;transform:translateY(8px) rotate(3deg)}to{opacity:1;transform:translateY(0) rotate(5deg)}}
@media(min-width:701px) and (max-width:1050px){.fg-header{gap:10px;padding:12px 16px}.fg-brand{min-width:82px}.fg-brand__name{font-size:15px;letter-spacing:.05em}.fg-home-button{font-size:12px;gap:6px;padding:10px 11px}.fg-nav{gap:4px}.fg-nav__button{padding:0 8px;gap:6px;font-size:11px}.fg-nav__button .fg-icon{width:17px;height:17px;flex-basis:17px}}
@media(max-width:700px){
 .fg-header{grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:44px 44px;gap:0 8px;height:96px;padding:4px 12px}
 .fg-header>.fg-home-button{grid-column:1;grid-row:1;min-height:44px;padding:9px 11px;font-size:12px;gap:6px;border-radius:9px}
 .fg-header>.fg-home-button .fg-icon{width:18px;height:18px;flex-basis:18px}
 .fg-brand{grid-column:2;grid-row:1;min-width:0;flex-direction:column;align-items:flex-start;gap:2px}
 .fg-brand__name{font-size:13px;letter-spacing:.025em}.fg-progress{font-size:8px;line-height:1.25}
 .fg-utilities{grid-column:3;grid-row:1}.fg-nav{grid-column:1/-1;grid-row:2}
 .family-ui[data-screen=welcome] .fg-screen{inset:96px 0 0}
 .fg-welcome{justify-content:safe center;padding-top:16px;padding-bottom:24px;gap:18px}
 .fg-restart-choice{margin:11px auto 0}.fg-restart-button{min-height:44px;font-size:13px;padding:9px 15px}.fg-reset-note{font-size:10px;max-width:285px;margin:5px auto 0}
 .fg-dialog-top{flex-wrap:wrap;gap:14px}.fg-dialog-top>.fg-dialog-title{flex:1 1 100%;order:2}.fg-dialog-actions{order:1;width:100%;justify-content:space-between;gap:12px}
 .fg-dialog-home{width:auto;min-height:44px;font-size:12px}
}
@media(max-width:350px){.fg-header{grid-template-columns:auto 1fr}.fg-header>.fg-brand{display:none}.fg-utilities{grid-column:2;justify-self:end}}
@media(prefers-reduced-motion:reduce){.fg-welcome--enter>.fg-title-block,.fg-welcome--enter>.fg-welcome-photo{animation:none!important}.fg-home-button{transition:none}}
