/* Directory layouts from the approved room/library/practice mocks.
   The shared studio.css and native nav.js drawer remain the sole shell. */
.studio-shell[data-studio-directory] .page{padding-top:36px}
.studio-shell[data-studio-directory] :is(button,input,select){font-family:var(--sans)}
.studio-shell[data-studio-directory] .btn{border:0;cursor:pointer;text-decoration:none}
.studio-shell[data-studio-directory] .drawer .ml-zone-music details{display:block}
.studio-shell[data-studio-directory] .drawer .ml-music-options{position:static;width:100%;box-shadow:none;margin-top:8px}
.studio-shell[data-studio-directory] .drawer .music-control{flex-wrap:wrap;justify-content:flex-end}
.studio-shell[data-studio-directory] .drawer .studio-music{align-items:flex-start}
.studio-shell[data-studio-directory] .drawer .ml-zone-music summary{height:40px;min-height:40px;border-color:var(--gold-line)}
.studio-shell[data-studio-directory] :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
/* Room: two questions, one current stop, then the unchanged interactive route. */
.studio-room .sh{display:grid;grid-template-columns:500px minmax(0,1fr);gap:40px;align-items:start;margin-top:22px}
.studio-room .sh-left{min-width:0}
.studio-room .sh-ask{display:grid;gap:14px}
.studio-room .sh-q{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.studio-room .sh-q .lab{font-size:15px;color:var(--soft);min-width:96px}
.studio-room .sh-chip{height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--gold-line);display:inline-flex;align-items:center;font-size:15px;color:var(--text);background:transparent;cursor:pointer}
.studio-room .sh-chip[aria-pressed=true]{background:var(--gold);color:var(--night);font-weight:600;border-color:var(--gold)}
.studio-room .sh-now{margin-top:22px;padding:22px 24px}
.studio-room .sh-now .kick{font-size:12px;letter-spacing:.16em;color:var(--gold);font-weight:700}
.studio-room .sh-now h2{font-size:24px;line-height:1.6;font-weight:600;color:var(--star);margin-top:4px}
.studio-room .sh-now p{font-size:15px;color:var(--soft);margin-top:4px}
.studio-room .sh-acts{margin-top:16px;display:flex;align-items:center;flex-wrap:wrap;gap:12px 18px}
.studio-room .sh-act{color:var(--gold);font-size:15px;font-weight:600;border:0;border-bottom:1px solid var(--gold-line);padding-bottom:1px;background:transparent;text-decoration:none;cursor:pointer}
.studio-room .sh-act.main{display:inline-flex;align-items:center;justify-content:center;height:48px;padding:0 26px;border-radius:999px;font:600 16px var(--sans);background:var(--gold);color:var(--night);box-shadow:0 6px 22px rgba(217,196,142,.25);border:0}
.studio-room .sh-next{font-size:14px;color:var(--soft);margin-top:16px}
.studio-room .sh-pick{display:none}
.studio-room .sh-map{position:relative;height:var(--map-h,400px);margin-top:-30px;min-width:0}
.studio-room .sh-extras{margin-top:40px;padding-top:20px;border-top:1px solid var(--gold-faint);display:grid;gap:18px}
.studio-room .sh-any h3{font-size:15px;color:var(--soft);font-weight:400;margin-bottom:6px}
.studio-room .sh-any div{display:flex;flex-wrap:wrap;gap:12px 18px}
.studio-room .sh-any a,.studio-room .sh-trial a{font-size:15px;color:var(--gold);text-decoration:underline;text-underline-offset:4px}
.studio-room .sh-foot{display:grid;gap:12px;font-size:15px;color:var(--soft)}
.studio-room .sh-sub summary{cursor:pointer;color:var(--gold)}
.studio-room .sh-st .nm{font-size:14px}.studio-room .sh-st .stt{font-size:12px}
/* Library: existing books and cards stay in the same app, under one directory heading. */
.studio-library #library-sections{margin-top:22px;display:flex;gap:0;border-bottom:1px solid var(--gold-faint);padding:0;max-width:none;flex-wrap:nowrap}
.studio-library #library-sections a{min-height:0;padding:12px 20px;font:600 16px var(--sans);color:var(--soft);border:0;border-bottom:2px solid transparent;margin-bottom:-1px;border-radius:0;background:transparent;flex:none}
.studio-library #library-sections a[aria-current]{color:var(--star);border-bottom-color:var(--gold)}
.studio-library .library-tools{display:flex;align-items:center;gap:16px;margin:18px 0 14px}
.studio-library #library-note{font-size:15px;color:var(--soft)}
.studio-library .library-furi{margin-left:auto;flex-shrink:0}
.studio-library .furi{border:0;padding:0;background:transparent;display:flex;gap:10px;align-items:center;font:400 14px var(--sans);color:var(--soft)}
.studio-library .furi-switch{display:block;width:42px;height:24px;border-radius:12px;background:var(--night-3);border:1px solid var(--gold-line);position:relative}
.studio-library .furi-switch::after{content:"";position:absolute;left:3px;top:2px;width:18px;height:18px;border-radius:50%;background:var(--soft)}
.studio-library .furi.on .furi-switch{background:var(--gold);border-color:var(--gold)}
.studio-library .furi.on .furi-switch::after{left:auto;right:3px;background:var(--night)}
.studio-library #app{--ink:#ece8f5;min-width:0}
.studio-library #app>.shelf~h2{margin-top:28px}
.studio-library #app:has(>.shelf)>:is(h1,p.lead,h2:first-of-type,p.sub:first-of-type),.studio-library .word-directory>:is(h1,p.lead),.studio-library .grammar-library:has(>.shelf)>:is(h1,p.lead){display:none}
.studio-library .shelf,.studio-library #word-library .word-shelf{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;padding:0;background:none;border:0;border-radius:0;box-shadow:none;margin:0}
.studio-library .book,.studio-library #word-library .word-book{background:var(--paper);border-radius:12px;border:1.5px solid var(--ink-line);padding:14px 12px 12px;text-align:center;color:var(--ink-line);box-shadow:none;min-height:0;display:block}
.studio-library .book .m{--s:96px;margin:0 auto}
.studio-library .book .nm{font-size:16px;font-weight:600;line-height:1.5;margin-top:6px}
.studio-library .book .ct{font-size:13px;color:var(--ink-soft)}
.studio-library .book .studio-book-kana{display:block;font-size:16px;font-weight:600;color:var(--ink-line);margin-top:6px}
.studio-library .book .studio-book-role{display:inline;font-size:13px;font-weight:400;color:var(--ink-soft)}
.studio-library .book .ct{display:inline}
.studio-library .word-book::before,.studio-library .word-cover::before,.studio-library .word-cover::after{display:none}
.studio-library .word-cover{background:none;border:0;border-radius:0;box-shadow:none;min-height:0;padding:0;color:var(--ink-line)}
.studio-library .word-cover-series{display:none}.studio-library .word-cover-title{color:var(--ink-line);font:600 16px/1.5 var(--sans);min-height:48px}
.studio-library .word-cover-rule{background:var(--ink-soft);margin:6px auto}
.studio-library .word-cover-art{grid-template-columns:repeat(2,64px);min-height:132px;gap:2px;margin:6px 0}
.studio-library .word-cover-art canvas{width:64px;height:64px}
.studio-library .word-cover-label{font-size:13px;color:var(--ink-soft)}
.studio-library .grammar-book .word-cover{min-height:140px;gap:6px}
.studio-library .grammar-book .word-cover-title{font-size:20px}
.studio-listen-entry{position:relative;z-index:1;max-width:1120px;padding:0 24px 48px;margin:0 auto;color:var(--text)}
.studio-listen-entry a{color:var(--gold);font-size:15px;border-bottom:1px solid var(--gold-line)}
/* Practice code gate is the approved centred 520px column, without a panel. */
.studio-shell[data-studio-directory=practice] .pr{max-width:1120px;padding:36px 24px 64px}
.studio-shell[data-studio-directory=practice] .pr:has(#gate:not([hidden])){max-width:520px;padding:72px 24px}
.studio-shell[data-studio-directory=practice] .pr-title{font:600 32px/1.25 var(--sans);margin:0}
.studio-shell[data-studio-directory=practice] .pr-heading{display:none}
.studio-shell[data-studio-directory=practice] .pr:has(#known:not([hidden])) .pr-heading{display:block;margin-bottom:22px}
.studio-shell[data-studio-directory=practice] .pr-who{color:var(--soft)}
.studio-shell[data-studio-directory=practice] .pr-sec h2{font-family:var(--sans)}
.studio-shell[data-studio-directory=practice] .pr-card{border:1px solid var(--gold-line);border-radius:var(--r);background:rgba(255,255,255,.03);color:var(--star)}
.studio-shell[data-studio-directory=practice] .pr-ic{background:transparent;font-family:var(--sans)}
.studio-shell[data-studio-directory=practice] .gate{max-width:none;margin:0;padding:0;background:none;border:0;border-radius:0}
.studio-shell[data-studio-directory=practice] .gate .eb{font-size:15px;line-height:1.6;letter-spacing:.2em;color:var(--gold);font-weight:600;margin:0}
.studio-shell[data-studio-directory=practice] .gate .leadline{margin-top:14px;font-size:26px;color:var(--star);font-weight:500;line-height:1.6}
.studio-shell[data-studio-directory=practice] .gate .do{margin-top:14px;font-size:18px;font-weight:700;color:var(--star)}
.studio-shell[data-studio-directory=practice] .gate form{margin-top:24px;display:flex;gap:12px}
.studio-shell[data-studio-directory=practice] .gate input{flex:1;min-width:0;height:56px;min-height:56px;border:1px solid var(--gold-line);border-radius:12px;background:rgba(255,255,255,.04);padding:0 18px;font-size:20px;letter-spacing:.2em;color:var(--text);font-weight:400}
.studio-shell[data-studio-directory=practice] .gate input::placeholder{color:var(--soft);letter-spacing:.2em}
.studio-shell[data-studio-directory=practice] .gate button{height:56px;min-height:56px;font:600 16px var(--sans);border-radius:999px}
.studio-shell[data-studio-directory=practice] .gate-err:empty{display:none}
.studio-shell[data-studio-directory=practice] .gate .gate-visitor{margin-top:28px;padding-top:20px;border-top:1px solid var(--gold-faint);font-size:15px;color:var(--soft)}
.studio-shell[data-studio-directory=practice] .gate .gate-visitor a{color:var(--gold)}
@media(max-width:1000px) and (min-width:601px){.studio-room .sh{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}}
@media(max-width:600px){
 .studio-room .sh{grid-template-columns:1fr;gap:4px;margin-top:16px}
 .studio-room .sh-ask{display:none}
 .studio-room .sh-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
 .studio-room .sh-pick label{min-width:0;border:1px solid var(--gold-line);border-radius:12px;padding:6px 12px}
 .studio-room .sh-pick small{display:block;font-size:12px;color:var(--soft)}
 .studio-room .sh-pick select{width:100%;border:0;background:transparent;color:var(--star);font-size:15px;font-weight:700;min-height:26px;padding:0;cursor:pointer}
 .studio-room .sh-pick option{color:var(--star);background:var(--night-2)}
 .studio-room .sh-now{margin-top:14px;padding:18px}
 .studio-room .sh-map{height:200px;margin-top:8px;margin-bottom:26px}
 .studio-room .sh-extras{margin-top:30px}
 .studio-library .shelf,.studio-library #word-library .word-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .studio-library #library-sections a{padding:10px 12px;font-size:15px}
 .studio-library .library-tools{flex-wrap:wrap}.studio-library .library-furi{margin-left:0}
 .studio-listen-entry{padding:0 16px 36px}
 .studio-shell[data-studio-directory=practice] .pr:has(#gate:not([hidden])){padding:40px 18px}
 .studio-shell[data-studio-directory=practice] .gate .leadline{font-size:22px}
 .studio-shell[data-studio-directory=practice] .gate form{flex-direction:column}
 .studio-shell[data-studio-directory=practice] .gate .do{font-size:17px}
 .studio-shell[data-studio-directory=practice] .pr-title{font-size:26px}
}
  .sh-map svg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
  .sh-map .seg{ fill:none; stroke-linecap:round; }
  .sh-map .seg.lit{ stroke:var(--pale-gold); stroke-width:2.5; }
  .sh-map .seg.dark{ stroke:rgba(216,211,230,.45); stroke-width:1.6; stroke-dasharray:3 9; }
  .sh-st{ position:absolute; transform:translate(-50%,-50%); background:none; border:0; padding:0; font:inherit; color:inherit; line-height:0; }
  .sh-st .dot{ display:block; width:16px; height:16px; border-radius:50%; border:1.6px solid rgba(216,211,230,.55); background:rgba(12,14,34,.9); box-sizing:border-box; }
  .sh-st.dark{ pointer-events:none; }
  .sh-st.lit{ cursor:pointer; }
  .sh-st.lit .dot{ width:22px; height:22px; border:0; background:var(--pale-gold); box-shadow:0 0 0 10px rgba(217,196,142,.12),0 0 36px 10px rgba(217,196,142,.28); }
  .sh-st.cur .dot{ width:30px; height:30px; }
  /* 站名：当前那站一直显示；其他亮灯的站平常隐藏，指到／键盘／手机点一下才淡入，移开约 0.6 秒淡出 */
  .sh-st .lb{ position:absolute; left:50%; top:calc(100% + 10px); transform:translateX(calc(-50% + var(--dx,0px))); display:flex; flex-direction:column; align-items:center; line-height:1.3; white-space:nowrap; pointer-events:none; opacity:0; transition:opacity .6s ease; }
  .sh-st.cur .lb, .sh-st.more .lb{ opacity:1; }
  .sh-st.lit:hover .lb, .sh-st.lit:focus-visible .lb, .sh-st.lit.show .lb{ opacity:1; transition:opacity .2s ease; }
  .sh-st .nm{ color:var(--warm-white); font-weight:600; font-size:19px; }
  .sh-st .stt{ color:var(--pale-gold); font-size:13.5px; margin-top:2px; }
  .sh-st.done .nm::after{ content:" ✓"; color:var(--pale-gold); }
  .sh-st.more{ line-height:1.3; }
  .sh-st.more .lb{ position:static; transform:none; }
  .sh-st.more .nm{ color:var(--muted-faint); font-size:15px; font-weight:400; }
  .sh-st.more .stt{ color:var(--muted-faint); }
  .sh-st.lit:focus-visible{ outline:2px solid var(--pale-gold); outline-offset:6px; border-radius:50%; }
  .sh-dango{ position:absolute; width:72px; height:72px; image-rendering:pixelated; transform:translate(-115%,-95%); pointer-events:none; }
  /* 星点（11-01 Mint 看实机后）：亮灯＝小金星点，3–4 秒慢慢变亮再变暗、每颗起始错开（--tw 由程式给）；当前那站稍亮；暗灯＝很淡的小点，不闪。 */
  .sh-st.lit{ width:44px; height:44px; display:grid; place-items:center; border-radius:50%; }
  .sh-st.lit .lb{ top:calc(50% + 16px); }
  .sh-st.lit .dot, .sh-st.cur .dot{ width:11px; height:11px; border:0; background:#f1e2b4; box-shadow:0 0 6px 2px rgba(217,196,142,.45),0 0 16px 6px rgba(217,196,142,.16); animation:shTwinkle 3.6s ease-in-out var(--tw,0s) infinite; }
  .sh-st.cur .dot{ width:13px; height:13px; background:#fbf1d2; box-shadow:0 0 8px 3px rgba(217,196,142,.6),0 0 22px 9px rgba(217,196,142,.22); animation-name:shTwinkleCur; }
  .sh-st.dark .dot{ width:6px; height:6px; border:0; background:rgba(216,211,230,.28); }
  @keyframes shTwinkle{ 0%,100%{ opacity:.6; box-shadow:0 0 4px 1px rgba(217,196,142,.3),0 0 10px 3px rgba(217,196,142,.08); } 50%{ opacity:1; box-shadow:0 0 8px 3px rgba(217,196,142,.6),0 0 22px 8px rgba(217,196,142,.22); } }
  @keyframes shTwinkleCur{ 0%,100%{ opacity:.78; box-shadow:0 0 6px 2px rgba(217,196,142,.42),0 0 14px 5px rgba(217,196,142,.12); } 50%{ opacity:1; box-shadow:0 0 10px 4px rgba(217,196,142,.7),0 0 28px 11px rgba(217,196,142,.28); } }
  /* 背景小星星：这页更慢、更淡，不抢亮灯 */
  body[data-ml-page="experience"] .stars span{ animation:shSky 9s ease-in-out infinite; }
  @keyframes shSky{ 0%,100%{ opacity:.12; } 50%{ opacity:.38; } }
  @media (prefers-reduced-motion: reduce){
    .sh-st.lit .dot, .sh-st.cur .dot{ animation:none; }
    body[data-ml-page="experience"] .stars span{ animation:none; opacity:.25; }
  }

.studio-library #app:has(>.shelf)>h2:first-of-type+p.sub{display:none}
.studio-room .sh-map .seg{border:0;border-radius:0;display:inline;overflow:visible}
.studio-shell[data-studio-directory=practice] .pr:has(#gate:not([hidden])){min-height:calc(100svh - 64px)}
@media(max-width:899px){.studio-shell[data-studio-directory=practice] .pr:has(#gate:not([hidden])){min-height:calc(100svh - 56px)}}

@media(min-width:1001px){.studio-room #shLevel .sh-chip:nth-of-type(4){margin-left:108px}}

/* Mint 11-06 review: all shelves first; existing books/cards keep their renderers. */
.library-home #library-sections,.library-home #library-toolbar{display:none}
#library-all{display:inline-block;color:var(--gold);margin:12px 0 8px;font-size:15px}
#library-all[hidden],#library-toolbar[hidden]{display:none}
.library-shelves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:28px}
.library-shelf{display:block;border:1px solid var(--gold-line);border-radius:14px;background:var(--night);padding:26px;color:var(--star);text-decoration:none}
.library-shelf h2{font:600 24px var(--sans);margin:0 0 10px}
.library-shelf p{font:15px/1.6 var(--sans);color:var(--soft);margin:0}
.studio-room .sh-aquarius{pointer-events:none;--aquarius-opacity:.15;opacity:var(--aquarius-opacity);animation:shAquarius 2s ease-out both;fill:none;stroke:var(--pale-gold);stroke-width:1}
.studio-room .sh-aquarius circle{fill:var(--pale-gold);stroke:none;filter:none}
@keyframes shAquarius{from{opacity:0}to{opacity:var(--aquarius-opacity)}}
@media(prefers-reduced-motion:reduce){.studio-room .sh-aquarius{animation:none}}
@media(max-width:600px){.library-shelves{gap:12px}.library-shelf{padding:18px}.library-shelf h2{font-size:20px}.library-shelf p{font-size:14px}}

/* #501 round 2: a quiet backing and actual SVG cutouts protect label ink. */
@media(max-width:600px){
 .studio-room .sh-aquarius{--aquarius-opacity:.28;stroke-width:1.2}
 .studio-room .sh-st :is(.nm,.stt){background:rgba(12,14,34,.94);box-shadow:0 0 0 2px rgba(12,14,34,.94);border-radius:2px}
}

.studio-room .sh-st:not(.more) .lb{transform:translateX(calc(-50% + var(--dx,0px))) translateY(var(--label-dy,0px))}
.studio-room .sh-st.cur{z-index:2}
.studio-room .sh-st:is(:hover,:focus-visible,.show){z-index:3}
