
/* Each app brings its own setting to the studio. */
.studio-scene-stage:has(#sample-tab-everyday[aria-selected=true]){
  --world-art:url("/img/japanese-everyday-learning-v2-1200.webp");
  --world-tint:#1a2e25;--world-veil:#1a2e25d9;--world-highlight:#d9edb4;
}
.studio-scene-stage:has(#sample-tab-solve[aria-selected=true]){
  --world-art:url("/img/daily-solve-learning-v2-1200.webp");
  --world-tint:#16233c;--world-veil:#182b49d9;--world-highlight:#cfdeff;
}
.studio-scene-stage:has(#sample-tab-lantern[aria-selected=true]){
  --world-art:url("/img/lantern-alley-learning-v2-1200.webp");
  --world-tint:#2e1f22;--world-veil:#332822dd;--world-highlight:#ffe1a5;
}
.studio-scene-stage:has(.samples-tabs button[aria-selected=true]:not(#sample-tab-depths)){
  color:#fff8e8;
  background:linear-gradient(115deg,var(--world-veil),transparent 160%),var(--world-art) center 54%/cover no-repeat,var(--world-tint);
}
.studio-scene-stage:has(.samples-tabs button[aria-selected=true]:not(#sample-tab-depths)) .demo-stage{
  background:none;box-shadow:none;padding:0;
}
.studio-home .studio-scene-stage:has(.samples-tabs button[aria-selected=true]:not(#sample-tab-depths)) .samples-heading h1 em{color:var(--world-highlight)}
.studio-scene-stage:has(.samples-tabs button[aria-selected=true]:not(#sample-tab-depths)) .samples-heading p,
.studio-scene-stage:has(.samples-tabs button[aria-selected=true]:not(#sample-tab-depths)) .samples-heading a{color:inherit}
.studio-scene-stage:has(.samples-tabs button[aria-selected=true]:not(#sample-tab-depths)) .samples-tabs button:not([aria-selected=true]){background:var(--world-veil)}
#sample-everyday{background:#fefff4ee}
#sample-solve{background:#edf3faed}
#sample-lantern{background:#141b2cee;border-color:#e4c994a6}

/* The same settings become browsable covers below the demos. */
.studio-home .app-compare{padding-block:clamp(24px,4.5vw,58px)}
.studio-home .app-compare ul{grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(9px,2vw,20px);padding-top:12px}
.studio-home .compare-app{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto 1fr;gap:8px 12px;align-items:start;min-height:100%;padding:0 12px 12px;border-radius:12px;overflow:hidden}
.studio-home .compare-image{grid-area:1/1/2/-1;aspect-ratio:2.55;margin-inline:-12px;border-radius:0}
.studio-home .compare-image img{object-fit:cover;object-position:center 49%;transition:transform .35s ease}
.studio-home .compare-app:hover .compare-image img{transform:scale(1.045)}
.studio-home .compare-name{grid-column:1}
.studio-home .compare-description{grid-column:1/-1;font-size:14px}
.studio-home .compare-destination{grid-area:2/2;align-self:start}
.studio-home .compare-app:focus-visible{outline-offset:3px}
.studio-home .app-compare li[data-demo-active] .compare-app{box-shadow:inset 0 -3px var(--accent)}

.studio-closing-scene .studio-feedback{background:#ffe1a5;color:#24312b}
.studio-home .site-footer{border-top:0}

/* App information pages use the same settings, with their own readable content. */
.product-scene{
  --product-tint:#202d31;--product-ink:#fff4e4;--product-highlight:#ffe1a5;
  color:var(--product-ink);
  background:linear-gradient(95deg,var(--product-veil) 16%,var(--product-mid) 68%,var(--product-edge)),var(--product-art) center 52%/cover no-repeat,var(--product-tint);
}
.product-scene-kotoba-depths{
  --product-art:url("https://kotoba-depths.pages.dev/assets/festival/images-lite/level1/shrine-path/fight-bg-haunted.webp");--product-veil:#102428f5;--product-mid:#122a30de;--product-edge:#192b2e5e;
}
.product-scene-japanese-everyday{
  --product-art:url("/img/japanese-everyday-learning-v2-1200.webp");--product-veil:#182d24f2;--product-mid:#253d2adb;--product-edge:#334a288c;--product-highlight:#dceebc;
}
.product-scene-daily-solve{
  --product-art:url("/img/daily-solve-learning-v2-1200.webp");--product-veil:#18243df5;--product-mid:#182b49db;--product-edge:#162e56a6;--product-highlight:#d6e1ff;
}
.product-scene .product-hero h1 em{color:var(--product-highlight)}
.product-scene .product-hero .eyebrow,.product-scene .product-hero .lead,.product-scene .product-hero .hero-footnote,.product-scene .product-hero .quiet-link,.product-scene .hero-game figcaption{color:var(--product-ink)}
.product-scene .hero-game figcaption strong{color:var(--product-ink)}
.product-scene .product-hero .button{background:var(--product-highlight);color:#17282c}
.product-scene .product-illustration,.product-scene .hero-game>a{box-shadow:0 13px 34px #0b182c61;border-color:#d9c7a28c}
.product-scene :focus-visible{outline-color:#ffe1a5}
@media(max-width:540px){
  .studio-home .app-compare ul{grid-template-columns:1fr}
  .studio-home .compare-image{aspect-ratio:2.85}
  .product-scene{background-position:center 50%}
}
@media(prefers-reduced-motion:reduce){.studio-home .compare-image img{transition:none}}

/* Compact app index above the playable scene. */
:root{--studio-japanese:"Noto Sans JP","Hiragino Sans","Yu Gothic","Meiryo",sans-serif}
:lang(ja),.studio-example figcaption strong,.sample-layout [lang="ja"]{font-family:var(--studio-japanese);letter-spacing:normal}
.studio-home .app-compare{padding-block:clamp(13px,2.6vw,32px) clamp(15px,2.5vw,28px)}
.studio-home .app-compare h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(35px,5.5vw,70px);font-weight:500;line-height:1}
.studio-home .app-compare h1 em{color:#315b47}
.studio-pitch{font-size:clamp(14px,1.8vw,17px);line-height:1.4;color:var(--soft);margin:6px 0 12px}
.studio-home .app-compare ul{grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(7px,1.4vw,14px);border-top:0;padding-top:0}
.studio-home .compare-app{position:relative;grid-template-rows:auto auto 1fr;gap:5px 6px;padding:0 8px 8px;border-color:var(--line);background:#fffcf4;box-shadow:none}
.studio-home .app-compare li[data-demo-active] .compare-app{border-color:var(--line);background:#fffcf4;box-shadow:none}
.studio-home .app-compare li .compare-app:hover{border-color:var(--accent);background:var(--panel)}
.studio-home .compare-image{margin-inline:-8px;aspect-ratio:2.55}
.studio-home .compare-name strong{font-size:clamp(13px,1.8vw,18px)}
.studio-home .compare-name small{font-size:clamp(10px,1.35vw,12px)}
.studio-home .compare-description{font-size:clamp(12px,1.45vw,14px);line-height:1.35}
.studio-home .compare-active{position:absolute;top:5px;left:5px;background:#fffcf4;color:#273e31;padding:1px 5px;border-radius:4px;font-size:10px}
.studio-home .compare-arrow{font-size:15px}
.studio-home .samples-heading{margin-bottom:9px}
.studio-home .samples-heading h2{font-size:clamp(23px,3.55vw,36px)}
.studio-home .studio-scene-stage .studio-samples{padding-block:12px 19px}
.studio-home .studio-scene-stage:has(#sample-tab-depths[aria-selected=true])::after{
  background:linear-gradient(180deg,#102429f2,#142b2ed1 60%,#142b2eb3);
  opacity:calc(1 - var(--battle-restored,0) * .25);
}
.studio-home .studio-scene-stage:has(#sample-depths.is-solved:not([hidden]))::after{background:linear-gradient(180deg,#242c25ed,#333a2da3)}
.studio-home .studio-scene-stage:has(.samples-tabs button[aria-selected=true]:not(#sample-tab-depths)){
  background:linear-gradient(115deg,var(--world-veil),var(--world-veil)),var(--world-art) center 54%/cover no-repeat,var(--world-tint);
}
.studio-home .samples-tabs button{min-height:49px}
.studio-home .tab-art{flex-basis:clamp(28px,4vw,40px)}
#sample-depths .boss-sprite{max-height:clamp(170px,27vw,280px)}
#sample-depths .boss-question .sample-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
#sample-depths .boss-question .sample-options button{font-size:clamp(13px,1.7vw,17px);padding-inline:4px;line-height:1.25;overflow-wrap:anywhere}
.studio-home .studio-closing-scene{background:transparent;color:var(--ink);padding-block:18px 6px}
.studio-home .studio-closing-scene .studio-story{padding:clamp(14px,2.8vw,30px);border:1px solid var(--line);border-radius:12px;background:#f1e8d6;color:var(--ink)}
.studio-home .studio-closing-scene .studio-story-copy p{color:var(--ink)}
.studio-home .studio-closing-scene .studio-story-copy .studio-preview{font-size:14px;line-height:1.45;color:#34453f}
.studio-home .studio-closing-scene .studio-contact p{color:var(--soft)}
.studio-home .studio-scene{aspect-ratio:328/143}
.studio-home .studio-scene img{top:-192.3%}
.studio-home .studio-closing-scene .studio-contact{border:0;margin-top:0}
.studio-home .studio-closing-scene :focus-visible{outline-color:#315b47}
.studio-home .site-footer,.site-footer{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,2vw,26px);padding-block:16px 24px}
.site-footer>div{gap:1px}
.site-footer .footer-brand{align-self:start}
.site-footer a{min-height:36px;overflow-wrap:anywhere}
@media(max-width:650px){
  .studio-home .app-compare ul{grid-template-columns:repeat(2,minmax(0,1fr))}
  .studio-home .compare-image{aspect-ratio:2.75}
  .studio-home .compare-description{font-size:12px}
  .studio-home .compare-destination{grid-area:2/2}
  #sample-depths .boss-sprite{max-height:112px}
}
@media(max-width:420px){
  .studio-home .site-footer,.site-footer{grid-template-columns:minmax(0,.8fr) minmax(0,1fr) minmax(0,1.1fr);gap:6px}
  .site-footer a,.site-footer .copyright{font-size:11px}
  .site-footer .footer-brand span{font-size:10px}
  .site-footer>div{font-size:11px}
}

.studio-home .compare-demo{grid-area:4/1;justify-self:start;display:inline-flex;align-items:center;gap:4px;min-height:36px;margin-top:3px;padding-inline:8px;border-radius:5px;background:var(--accent);color:white;font-size:12px;font-weight:750;text-decoration:none}
.compare-demo:focus-visible{outline-offset:2px}
.studio-home .compare-more{position:relative;z-index:2;grid-column:1/-1;justify-self:start;display:inline-flex;align-items:center;gap:4px;min-height:32px;padding-inline:4px;border-radius:4px;color:var(--accent);font-size:12px;font-weight:750}
.compare-more:hover{background:var(--scene)}

#sample-depths.is-solved .sample-continuation{
  padding:14px;border:1px solid #ffd791;background:linear-gradient(140deg,#fff4d7,#f8d28e);color:#26352d;
  box-shadow:0 6px 24px #f6bb6459;animation:victory-continue-in .4s ease-out both;
}
#sample-depths.is-solved .sample-continuation p{font-weight:650;margin-bottom:8px}
#sample-depths.is-solved .sample-continue-link{
  display:flex;justify-content:space-between;min-height:48px;background:#223d35;color:#fff7e4;font-size:clamp(14px,2vw,18px);
}
#sample-depths.is-solved .sample-continue-link:focus-visible{outline-color:#53361b}
@keyframes victory-continue-in{from{opacity:.65;transform:translateY(6px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){#sample-depths.is-solved .sample-continuation{animation:none}}

.studio-home .compare-app{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto 1fr auto}
.studio-home .compare-name{grid-column:1/-1}
.studio-home .compare-name .compare-tags{display:flex;flex-wrap:wrap;gap:3px 5px;margin-top:6px;line-height:1.3}
.compare-tags span{border-radius:4px;background:var(--panel);padding:2px 4px;color:var(--accent);font-weight:700}
.compare-description>strong,.compare-description>span{display:block}
.compare-description>strong{color:var(--ink);margin-bottom:2px;font-size:1.04em}
.studio-home .compare-more{grid-area:4/2;align-self:end;min-height:36px}
@media(max-width:350px){
  .studio-home .compare-demo,.studio-home .compare-more{font-size:11px;padding-inline:4px}
}

.studio-home .app-paths{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(12px,2vw,24px)}
.studio-home .app-path h3{font-family:inherit;font-size:clamp(16px,2vw,20px);font-weight:750;letter-spacing:0;margin:0 0 6px}
.studio-home .app-path ul{grid-template-columns:1fr;gap:6px}
.studio-home .app-path .compare-app{
  grid-template-columns:minmax(0,1fr) auto clamp(56px,8vw,95px);
  grid-template-rows:auto 1fr auto;gap:2px 7px;padding:7px 8px;
}
.studio-home .app-path .compare-name{grid-area:1/1/2/3}
.studio-home .app-path .compare-name strong{font-size:clamp(15px,1.8vw,19px)}
.studio-home .app-path .compare-name small{font-size:12px;margin-top:1px}
.studio-home .app-path .compare-image{grid-area:1/3/4/4;align-self:stretch;aspect-ratio:auto;margin:0;border-radius:5px}
.studio-home .app-path .compare-description{grid-area:2/1/3/3;font-size:13px}
.studio-home .app-path .compare-demo{grid-area:3/1;min-height:33px;margin-top:2px}
.studio-home .app-path .compare-more{grid-area:3/2;min-height:33px;justify-self:end}
.studio-home .app-path .compare-destination{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
@media(max-width:650px){.studio-home .app-paths{grid-template-columns:1fr}}

/* The studio masthead and festival artwork establish the homepage identity. */
.studio-masthead{background:#17312f;color:#fff3d9}
.studio-home .studio-masthead .site-header{min-height:75px;padding-block:8px;border-bottom:1px solid #bba16c64}
.studio-masthead .brand{gap:10px;align-items:center;color:#fff4dc}
.studio-brand-mark{display:grid;place-items:center;width:46px;height:46px;padding:3px;border:1px solid #f1cb86;border-radius:12px;background:#203a34;box-shadow:0 0 18px #f5b74730;flex:none}
.studio-masthead .studio-brand-mark img{width:100%;height:100%;border-radius:8px;object-fit:cover}
.studio-wordmark{font-family:Georgia,"Times New Roman",serif;font-size:35px;font-weight:700;line-height:.9;letter-spacing:-.055em}
.studio-masthead .brand-small{color:#f2cf8e;font-family:inherit;font-size:11px;letter-spacing:.2em;margin-top:5px;text-transform:uppercase}
.studio-masthead nav a{color:#fff3d9}
.studio-masthead nav a:hover{color:#ffd694}
.studio-masthead :focus-visible,.studio-intro-band :focus-visible{outline-color:#ffd694}
.studio-intro-band{color:#fff3d9;background:
  linear-gradient(90deg,#142e2cf5 0%,#142d2be8 39%,#172d2a8c 64%,#202e254d 100%),
  url("https://kotoba-depths.pages.dev/assets/festival/images-lite/level1/shrine-path/fight-bg-restored.webp") center 51%/cover no-repeat,#17312f;
  border-bottom:3px solid #ae8855;
}
.studio-intro{padding-block:clamp(25px,4vw,56px)}
.studio-intro h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(43px,7.5vw,98px);font-weight:500;letter-spacing:-.055em;line-height:.95;text-wrap:balance;text-wrap:pretty}
.studio-intro h1 em{color:#ffd394}
.studio-intro p{max-width:37ch;font-size:clamp(15px,2vw,19px);line-height:1.45;margin-block:10px 8px}
.studio-intro a{display:inline-flex;gap:7px;align-items:center;min-height:44px;color:#ffe1a7;font-size:14px;font-weight:750;text-underline-offset:4px}
.studio-home .app-compare>#compare-title{font-family:inherit;font-size:clamp(20px,2.8vw,31px);font-weight:750;letter-spacing:-.025em;margin:0 0 9px}
@media(max-width:650px){
  .studio-home .studio-masthead .site-header{min-height:0;gap:8px}
  .studio-intro-band{background-position:center,58% center;background-image:linear-gradient(90deg,#142e2cf5,#142d2bbe),url("https://kotoba-depths.pages.dev/assets/festival/images-lite/level1/shrine-path/fight-bg-restored.webp")}
  .studio-intro h1{font-size:clamp(39px,10vw,58px)}
  .studio-brand-mark{width:39px;height:39px}
  .studio-wordmark{font-size:30px}
}

.studio-home .compare-actions{grid-area:3/1/4/3;display:flex;align-items:center;flex-wrap:wrap;gap:4px 7px;margin-top:3px}
.studio-home .compare-actions a{position:static;display:inline-flex;align-items:center;gap:4px;min-height:36px;margin:0;padding:3px 6px;border-radius:5px;font-size:12px;font-weight:750}
.studio-home .compare-open{background:var(--accent);color:#fff;text-decoration:none}
.studio-home .compare-actions .compare-demo{border:1px solid var(--accent);background:transparent;color:var(--accent)}
.studio-home .compare-actions .compare-open:hover,.studio-home .compare-actions .compare-demo:hover{text-decoration:underline}
.studio-home .compare-actions .compare-more{padding-inline:3px}
@media(max-width:380px){.studio-home .compare-actions{column-gap:4px}.studio-home .compare-actions a{font-size:11px;padding-inline:4px}}
