/* Reviewed story/catalog styles, scoped away from the running demo and dialogs. */
body.showcase-view #main{max-width:none;padding:0}
#gallery{font:15px/1.6 Manrope,system-ui,sans-serif;--green:#dce8c4;--blue:#cdddea;--gold:#f0e0bb}
.playroom-paths{display:flex;gap:24px}
.playroom-paths a{padding:10px 0;font-weight:700;text-decoration:none;font-size:14px;border-bottom:2px solid transparent}
.playroom-paths a[aria-current=page]{border-color:var(--red);color:var(--red)}
body.showcase-view .site-header{height:78px;padding:0 36px}
body.showcase-view .wordmark{font-size:23px;gap:9px;white-space:nowrap}
body.showcase-view .site-footer{padding:18px 36px;border-top:1px solid var(--line)}
#gallery *{box-sizing:border-box}
#gallery a{color:inherit;text-underline-offset:4px}
#gallery button{font:inherit;color:inherit;cursor:pointer}
#gallery button,#gallery a{touch-action:manipulation}
#gallery button:focus-visible,#gallery a:focus-visible,#gallery summary:focus-visible{outline:3px solid #155ca4;outline-offset:4px}
#gallery button:disabled{cursor:default}
#gallery h1,#gallery h2,#gallery h3,#gallery p{margin-top:0}
#gallery h1,#gallery h2,#gallery h3{text-wrap:balance}
#gallery p{max-width:65ch;text-wrap:pretty}
#gallery nav{display:flex;gap:24px}
#gallery nav a{padding:10px 0;font-weight:700;text-decoration:none;font-size:14px;border-bottom:2px solid transparent}
#gallery nav a[aria-current=page]{border-color:var(--red);color:var(--red)}
#gallery{max-width:1360px;margin:auto;padding:30px 36px 20px;min-height:calc(100dvh - 143px)}
#gallery .eyebrow{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:12px}
#gallery .hero{display:grid;grid-template-columns:1fr 1fr;gap:58px;align-items:center;padding:15px 0 34px}
#gallery .hero h1{font-size:clamp(38px,4.4vw,62px);line-height:1.08;letter-spacing:-.065em;margin-bottom:24px;max-width:590px}
#gallery em{font-family:Literata,Georgia,serif;font-weight:900;color:var(--red)}
#gallery .hero-copy>p{color:var(--muted);max-width:500px}
#gallery .actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
#gallery .button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:11px 19px;border-radius:9px;border:1px solid var(--ink);background:var(--ink);color:var(--paper);font-weight:750;text-decoration:none;font-size:13px;gap:20px;transition:transform .16s,background .16s}
#gallery .button:hover{background:#3f5748;transform:translateY(-1px)}
#gallery .button.secondary{background:transparent;color:var(--ink);border-color:#aeb8a7}
#gallery .text-link{font-size:13px;font-weight:700}
#gallery .fine{font-size:12px;color:var(--muted)}
#gallery .hero .fine{margin:16px 0 0}
#gallery .sample{background:#e7eccf;border-radius:18px;overflow:hidden;transform:rotate(1deg);box-shadow:0 7px 0 #d5dcc5}
#gallery .concept-label{margin:0;background:#ede9df;border-bottom:1px dashed #a8ac9c;padding:9px 17px;font-size:11px;font-weight:700;letter-spacing:0;line-height:1.5}
#gallery .sample-content{padding:25px 30px 29px}
#gallery .course-label{display:flex;justify-content:space-between;gap:15px;font-size:12px;align-items:center;margin-bottom:16px}
#gallery .course-label strong{font-size:17px;letter-spacing:-.04em}
#gallery .sample h2{font-size:35px;letter-spacing:-.055em;line-height:1.12;margin-bottom:20px}
#gallery .word-pair{display:flex;align-items:center;gap:16px;background:#f9f8ef;border:1px dashed #a2ad8c;border-radius:12px;padding:18px 20px;margin-bottom:11px}
#gallery .word-pair .japanese{font-size:32px;font-family:system-ui,sans-serif}
#gallery .word-pair strong{font-size:17px}
#gallery .word-pair small{display:block;color:var(--muted);font-size:12px}
#gallery .sample-note{margin:14px 0 0;font-size:12px;color:#48573e}
#gallery .subhead{font-size:17px;margin:0 0 14px;letter-spacing:-.03em}
#gallery .promise-row{border-top:1px solid var(--line);display:grid;grid-template-columns:1.2fr 1fr;gap:60px;padding:23px 0 10px}
#gallery .promise-row p{font-size:13px;margin-bottom:10px;color:var(--muted)}
#gallery .sequence{display:flex;list-style:none;padding:0;margin:0;flex-wrap:wrap;gap:8px}
#gallery .sequence li{font-size:12px;font-weight:750}
#gallery .sequence li:not(:last-child)::after{content:'→';padding-left:8px;color:var(--red)}
#gallery .route-head{display:flex;justify-content:space-between;align-items:start;gap:20px;margin-bottom:18px}
#gallery .route-head h1{font-size:34px;letter-spacing:-.05em;line-height:1.1;margin-bottom:8px}
#gallery .route-head p{font-size:13px;color:var(--muted);margin:0}
#gallery .back{font-size:12px;font-weight:750;display:inline-block;margin-bottom:15px}
#gallery .steps{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:0 0 18px}
#gallery .steps a{text-decoration:none;border-bottom:3px solid var(--line);padding:8px 10px;font-size:12px;font-weight:750;display:flex;gap:10px}
#gallery .steps a[aria-current=step]{border-color:var(--red);color:var(--red)}
#gallery .steps span{opacity:.7}
#gallery .walk-frame{border:1px dashed #a2ad8c;border-radius:14px;overflow:hidden;background:#faf9f3}
#gallery .walk-body{padding:27px 32px;display:grid;grid-template-columns:1fr .74fr;gap:40px;min-height:265px}
#gallery .walk-body h2{font-size:36px;letter-spacing:-.055em;line-height:1.15;margin-bottom:16px}
#gallery .walk-body p{font-size:14px}
#gallery .walk-body .eyebrow{font-size:11px;color:var(--red)}
#gallery .mini-panel{background:#e6ecd5;padding:20px 24px;border-radius:10px}
#gallery .mini-panel h3{font-size:17px;letter-spacing:-.03em;margin-bottom:13px}
#gallery .mini-panel p{font-size:12px;margin-bottom:10px}
#gallery .word-list{display:grid;gap:8px}
#gallery .word-list p{margin:0;padding:9px 12px;border-bottom:1px solid #cad4b8;font-size:14px}
#gallery .word-list strong{font-family:system-ui,sans-serif;font-size:20px;margin-right:16px}
#gallery .feedback{font-size:12px;color:var(--muted);min-height:22px;margin:12px 0 0}
#gallery .choice-row{display:flex;gap:9px;flex-wrap:wrap}
#gallery .choice{background:#fffdf8;border:1px solid #9aa68d;border-radius:9px;padding:10px 15px;min-height:45px;font-size:14px}
#gallery .choice:hover,#gallery .choice[aria-pressed=true]{background:#dce8c4}
#gallery .proof-slip{border-top:1px solid var(--line);padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:#f1f1e5}
#gallery .proof-slip p{font-size:12px;margin:0}
#gallery .proof-slip a{font-size:12px;font-weight:750;white-space:nowrap}
#gallery .walk-controls{display:flex;justify-content:space-between;gap:20px;margin-top:18px;align-items:center}
#gallery .walk-controls .fine{margin:0}
#gallery .metric-example{font-size:32px!important;font-weight:800;margin-bottom:2px!important;letter-spacing:-.05em}
#gallery .evidence-note{border-left:3px solid #b93e26;padding-left:14px;margin-top:18px;font-size:12px!important}
#gallery .teacher-fields{display:grid;gap:9px}
#gallery .teacher-fields p{margin:0;border-bottom:1px solid #ced6bb;padding:8px 0;font-size:12px}
#gallery .teacher-fields b{display:block;font-size:11px;color:var(--muted);margin-bottom:3px}
#gallery .catalog-intro{display:grid;grid-template-columns:1.1fr 1fr;gap:50px;margin-bottom:24px}
#gallery .catalog-intro h1{font-size:43px;letter-spacing:-.06em;line-height:1.1;margin-bottom:12px}
#gallery .catalog-intro p{font-size:13px}
#gallery .scope{border-left:2px solid #b6c2a5;padding-left:20px;font-size:12px}
#gallery .scope p{margin-bottom:8px;font-size:12px}
#gallery .catalog{display:grid;grid-template-columns:1fr 1fr;gap:14px}
#gallery .product{padding:22px;background:var(--card,#e4ecdc);border-radius:13px}
#gallery .product h2{font-size:22px;letter-spacing:-.04em;margin-bottom:4px}
#gallery .product p{font-size:12px;margin-bottom:10px}
#gallery .product .meta{font-size:10px;font-weight:800;letter-spacing:.02em}
#gallery .product .actions{gap:12px;margin-top:15px}
#gallery .product .button{min-height:42px;font-size:12px;padding:8px 14px}
#gallery .product details{font-size:12px;margin-top:12px}
#gallery .product summary{cursor:pointer;padding:8px 0;font-weight:750;min-height:40px}
#gallery .product ul{padding-left:18px;margin:6px 0 0}
#gallery .game-links{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
#gallery .game-links a{font-size:12px;min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #637c8940;padding:8px 0}
#gallery .game-links small{font-size:10px}
#gallery .copy{border:0;background:transparent;text-decoration:underline;font-size:12px;padding:10px 0}
#gallery .unavailable{padding:24px 0 0}
#gallery .unavailable h2{font-size:17px}
#gallery .unavailable p{font-size:12px;color:var(--muted)}
@media(max-width:1000px){
#gallery .hero{gap:28px}
#gallery .hero h1{font-size:46px}
#gallery .walk-body{gap:24px}
#gallery .steps a{font-size:11px;padding:8px 4px;gap:5px}
}
@media(max-width:700px){
#gallery nav{gap:20px;width:100%}
#gallery nav a{font-size:13px;padding:5px 0}
#gallery{padding:23px 20px;min-height:calc(100dvh - 160px)}
#gallery .hero{grid-template-columns:1fr;padding-top:0;gap:26px}
#gallery .hero h1{font-size:43px}
#gallery .hero-copy>p{font-size:14px}
#gallery .sample{transform:none}
#gallery .sample h2{font-size:29px}
#gallery .sample-content{padding:20px}
#gallery .promise-row,#gallery .catalog-intro{grid-template-columns:1fr;gap:16px}
#gallery .route-head{display:block}
#gallery .route-head .text-link{display:inline-block;margin-top:10px}
#gallery .route-head h1{font-size:28px}
#gallery .steps{gap:3px}
#gallery .steps a{display:block;font-size:10px;padding:6px 2px}
#gallery .steps span{display:block}
#gallery .walk-body{grid-template-columns:1fr;padding:21px;gap:16px;min-height:0}
#gallery .walk-body h2{font-size:29px}
#gallery .walk-controls{flex-wrap:wrap}
#gallery .walk-controls .fine{width:100%;order:3}
#gallery .proof-slip{display:block}
#gallery .proof-slip a{display:inline-block;margin-top:10px;white-space:normal}
#gallery .catalog{grid-template-columns:1fr}
#gallery .catalog-intro h1{font-size:35px}
#gallery .concept-label{font-size:10px;padding:9px 13px}
}
@media(prefers-reduced-motion:reduce){
#gallery *,#gallery *::before,#gallery *::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}
#gallery:focus{outline:none}
#gallery .concept-label{max-width:none;width:100%}
#gallery .aside-copy{font-size:12px;line-height:1.6}
#gallery .aside-copy>p:first-child{margin-top:12px}
@media(min-width:1000px) and (max-height:900px){
body.walk-view #gallery{padding-top:16px;padding-bottom:14px;min-height:calc(100dvh - 78px)}
body.walk-view #gallery .back{display:none}
body.walk-view #gallery .route-head{margin-bottom:10px;align-items:center}
body.walk-view #gallery .route-head h1{font-size:26px;margin-bottom:0}
body.walk-view #gallery .route-head .eyebrow{font-size:10px;margin-bottom:4px}
body.walk-view #gallery .steps{margin-bottom:12px}
body.walk-view #gallery .steps a{padding:5px 8px}
body.walk-view #gallery .walk-body{padding:19px 24px;gap:30px;min-height:0}
body.walk-view #gallery .walk-body h2{font-size:28px;line-height:1.1;margin-bottom:12px}
body.walk-view #gallery .walk-body p{font-size:13px;line-height:1.5;margin-bottom:11px}
body.walk-view #gallery .walk-body .eyebrow{font-size:10px;margin-bottom:10px}
body.walk-view #gallery .mini-panel{padding:16px 20px}
body.walk-view #gallery .teacher-fields p{font-size:12px;padding:6px 0;margin-bottom:0}
body.walk-view #gallery .teacher-fields b{font-size:10px;margin-bottom:2px}
body.walk-view #gallery .proof-slip{padding:10px 16px}
body.walk-view #gallery .walk-controls{margin-top:12px}
body.walk-view #gallery .walk-controls .button{min-height:42px;padding:9px 17px}
body.walk-view #gallery .metric-example{font-size:30px!important}
}
#gallery .catalog-intro{grid-template-columns:1fr auto;align-items:center;gap:30px;margin-bottom:12px}
#gallery .catalog-intro h1{font-size:35px;margin-bottom:10px}
#gallery .catalog-intro .eyebrow{margin-bottom:8px}
#gallery .catalog-intro p{margin-bottom:0}
#gallery .baseline{font-size:11px!important;line-height:1.7;max-width:270px}
#gallery .catalog-contract{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0;margin-bottom:16px;display:flex;justify-content:space-between;align-items:start;gap:20px;font-size:12px}
#gallery .catalog-contract p{margin:0;max-width:85ch}
#gallery .catalog-contract summary{cursor:pointer;font-weight:750;min-height:30px}
#gallery .catalog-contract details[open]{max-width:450px}
#gallery .copy-actions{display:flex;gap:20px}
#gallery .catalog{grid-template-columns:repeat(3,minmax(0,1fr))}
#gallery .product{padding:16px 18px}
#gallery .product .meta{font-size:10px;margin-bottom:5px}
#gallery .product h2{font-size:21px}
#gallery .product p{font-size:12px;line-height:1.5;margin-bottom:8px}
#gallery .product .actions{margin-top:10px;gap:8px}
#gallery .product .button{padding:8px 11px;min-height:40px}
#gallery .product details{margin-top:6px}
#gallery .product summary{min-height:32px;padding:5px 0}
#gallery .unavailable{padding-top:18px}
#gallery .unavailable h2{margin-bottom:6px}
#gallery .unavailable p{max-width:none;margin-bottom:5px}
body.walk-view #gallery .word-list p{margin-bottom:0}
body.walk-view #gallery .word-list{gap:6px}
@media(max-width:1000px){
#gallery .catalog{grid-template-columns:repeat(2,minmax(0,1fr))}
#gallery .catalog-intro{grid-template-columns:1fr}
#gallery .baseline{max-width:none}
}
@media(max-width:700px){
#gallery .catalog{grid-template-columns:1fr}
#gallery .catalog-contract{display:block}
#gallery .catalog-contract details{margin-top:8px}
#gallery .catalog-intro h1{font-size:32px}
#gallery .product{padding:20px}
#gallery .product .button{min-height:44px}
#gallery .product summary{min-height:44px}
#gallery .product .copy{min-height:44px}
#gallery .hero .actions{gap:12px}
}
body.catalog-view #gallery{padding-top:20px}
body.catalog-view #gallery .catalog-intro{margin-bottom:8px}
body.catalog-view #gallery .catalog-intro h1{margin-bottom:7px}
body.catalog-view #gallery .catalog-contract{padding:6px 0;margin-bottom:12px}
body.catalog-view #gallery .product{padding:14px 16px;transition:transform .2s ease,box-shadow .2s ease}
#gallery .product-intro{display:grid;grid-template-columns:minmax(0,1fr) 110px;align-items:center;gap:8px;min-height:78px;margin-bottom:6px}
#gallery .product-copy{min-width:0}
#gallery .product-copy h2{font-size:22px;line-height:1.2;margin-bottom:6px;text-wrap:balance}
#gallery .product-copy p{margin-bottom:0;line-height:1.5}
#gallery .product-art{display:flex;align-items:center;justify-content:center;pointer-events:none}
#gallery .product-art img{display:block;width:120px;max-width:100%;height:78px;object-fit:contain;transform-origin:50% 65%;transition:transform .3s ease}
#gallery .product .product-limit{min-height:3em;margin-bottom:6px}
body.catalog-view #gallery .product .actions{margin-top:8px}
body.catalog-view #gallery .product details{margin-top:4px}
#gallery .product:focus-within{transform:translateY(-3px);box-shadow:0 7px 0 #293c2511}
#gallery .product:focus-within .product-art img{transform:rotate(-3deg) scale(1.035)}
@media(hover:hover) and (pointer:fine){
#gallery .product:hover{transform:translateY(-3px);box-shadow:0 7px 0 #293c2511}
#gallery .product:hover .product-art img{transform:rotate(-3deg) scale(1.035)}
}
@media(max-width:700px){
body.catalog-view #gallery{padding-top:23px}
body.catalog-view #gallery .product{padding:18px 20px}
#gallery .product-intro{grid-template-columns:minmax(0,1fr) 112px;min-height:92px}
#gallery .product-art img{height:90px}
#gallery .product .product-limit{min-height:0}
#gallery .product-copy h2{font-size:23px}
}
@media(max-width:370px){
#gallery .product-intro{grid-template-columns:minmax(0,1fr) 88px;gap:6px}
#gallery .product-art img{height:78px}
#gallery .product-copy h2{font-size:21px}
}
@media(prefers-reduced-motion:reduce){
body.catalog-view #gallery .product,body.catalog-view #gallery .product-art img{transition:none!important;animation:none!important;transform:none!important}
}
@media(min-width:1200px){
#gallery .product-intro{grid-template-columns:minmax(0,1fr) 146px;min-height:90px}
#gallery .product-art img{width:146px;height:90px}
}
@media(min-width:1000px) and (max-height:900px){
body.catalog-view #gallery{padding-top:14px}
body.catalog-view #gallery .catalog-intro>.eyebrow,body.catalog-view #gallery .catalog-intro>div>.eyebrow{display:none}
body.catalog-view #gallery .catalog-intro{margin-bottom:6px}
body.catalog-view #gallery .catalog-contract{margin-bottom:10px}
}
#gallery .product-copy{align-self:start}
#gallery #demo-class-pet .product-art img,#gallery #demo-questgen .product-art img{scale:1.15}
#gallery .hero .eyebrow{font-size:11px;letter-spacing:.08em;text-transform:uppercase;margin-bottom:12px}
#gallery .hero h1{font-weight:800}
@media(min-width:1000px) and (max-height:900px){body.walk-view .site-footer{display:none}body.walk-view #gallery{padding-bottom:0}.walk-view #gallery .walk-body{padding-top:16px;padding-bottom:16px}}
@media(max-width:740px){.site-header{flex-wrap:wrap}.playroom-paths{order:3;width:100%;gap:20px}.playroom-paths a{font-size:13px;padding:5px 0}body.showcase-view .site-header{height:auto;min-height:95px;padding:15px 20px;gap:9px}body.showcase-view .wordmark{font-size:21px}.header-actions{gap:12px}.header-actions .text-button{font-size:11px}.question-mark{display:none}}
body:not(.showcase-view) .playroom-paths{display:none}

/* Route headings receive programmatic focus; interactive focus stays visible. */
#gallery #hero-title:focus{outline:none}
#studio-title:focus{outline:none}
#gallery .steps a[aria-current=step] span{opacity:1}
