:root {
  --bg:#080706;
  --ink:#f1ede5;
  --muted:rgba(241,237,229,.62);
  --line:rgba(255,255,255,.18);
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--ink)}
body{
  position:fixed;inset:0;
  font-family:"Yu Mincho","Hiragino Mincho ProN","Hiragino Mincho Pro",serif;
  overscroll-behavior:none;
}
a,button{font:inherit;color:inherit}
a{text-decoration:none}


body.trailer-open{overflow:hidden}
.app{
  position:fixed;inset:0;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 35%, #241d1a 0, #100d0c 43%, #050505 100%);
}
.visual-area{
  position:fixed;
  inset:0 0 118px 0;
  display:grid;
  place-items:center;
  padding:
    calc(12px + env(safe-area-inset-top))
    14px
    8px;
}
.flyer{
  position:relative;
  aspect-ratio:834 / 1112;
  width:min(88vw, calc((100dvh - 190px) * .6666667), 620px);
  max-height:calc(100dvh - 190px);
  overflow:hidden;
  background:#15110f;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 24px 78px rgba(0,0,0,.68);
  isolation:isolate;
}

.flyer img{
    width:100%;
    overflow: hidden;
}

.flyer::after{
  content:"";
  position:absolute;inset:0;z-index:8;pointer-events:none;
  background:linear-gradient(to bottom,rgba(0,0,0,.02) 58%,rgba(0,0,0,.12) 79%,rgba(0,0,0,.32) 100%);
}
.ghost,.piece{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;display:block;
}
.ghost{
  z-index:0;
  opacity:.17;
  filter:blur(10px) brightness(.52) saturate(.72);
  transform:scale(1.03);
}
.piece{
  opacity:0;
  z-index:2;
  transform:scale(1.015);
  filter:blur(7px);
  animation:materialIn .90s cubic-bezier(.2,.72,.22,1) forwards;
  will-change:opacity,filter,transform;
}
.piece.skin{animation-delay:.02s}
.piece.flowers-top{animation-delay:.26s}
.piece.flowers-bottom{animation-delay:.55s}
.piece.eye-inner{animation-delay:.88s;animation-duration:1.05s}
.piece.title{animation-delay:1.28s;animation-duration:.78s;z-index:3}
@keyframes materialIn{
  0%{opacity:0;filter:blur(7px);transform:scale(1.018)}
  35%{opacity:.30}
  100%{opacity:1;filter:blur(0);transform:scale(1)}
}

.brand{
  position: relative; 
  top: auto;
  left: auto;
  z-index:12;
  top:calc(16px + env(safe-area-inset-top));
  left:18px;
  display:flex;align-items:center;gap:9px;
  opacity:0;
  animation:brandIn .48s ease 1.72s forwards;
  filter:drop-shadow(0 2px 8px rgba(0,0,0,.94));
}
.brand img{width:43px;height:45px;object-fit:contain;display:block}
.brand-copy{display:flex;flex-direction:column;color:white;line-height:1;text-shadow:0 2px 10px #000,0 0 3px #000}
.brand-sub{font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;font-size:8px;font-weight:700;letter-spacing:.10em;margin-bottom:4px;white-space:nowrap}
.brand-name{font-size:19px;font-weight:700;letter-spacing:.09em;white-space:nowrap}
@keyframes brandIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}

.hint{
  position:absolute;right:18px;top:calc(18px + env(safe-area-inset-top));z-index:12;
  font:8px/1 Arial,sans-serif;letter-spacing:.18em;color:rgba(255,255,255,.58);
  text-shadow:0 1px 9px #000;
  opacity:0;animation:brandIn .4s ease 1.82s forwards;
}

/* Landing page: flyer and four primary controls stay fixed; trailer opens as a separate dream-layer. */
.trailer-modal{
  position:fixed;
  inset:0;
  z-index:90;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(0,0,0,.84);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .28s ease, visibility .28s ease;
}
.trailer-modal.is-open{opacity:1;pointer-events:auto;visibility:visible}
.trailer-modal::before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 50% 48%,rgba(183,202,209,.10),transparent 42%);
  pointer-events:none;
}
.trailer-modal-inner{
  position:relative;
  width:min(900px,94vw);
  transform:translateY(16px) scale(.985);
  transition:transform .38s cubic-bezier(.16,1,.3,1);
}
.trailer-modal.is-open .trailer-modal-inner{transform:translateY(0) scale(1)}
.trailer-modal-frame{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:#000;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 28px 90px rgba(0,0,0,.72);
  overflow:hidden;
}
.trailer-modal-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.trailer-close{
  position:absolute;
  top:-48px;
  right:0;
  width:40px;
  height:40px;
  border:1px solid rgba(255,255,255,.40);
  border-radius:50%;
  background:rgba(0,0,0,.68);
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  font:24px/1 Arial,sans-serif;
  font-weight:200;
  padding:0 0 2px;
}
.trailer-close:focus-visible{outline:2px solid #fff;outline-offset:3px}
.trailer-caption{
  margin-top:10px;
  text-align:center;
  color:rgba(255,255,255,.55);
  font:9px/1.5 Arial,sans-serif;
  letter-spacing:.16em;
}
@media(max-width:640px){

  .trailer-modal{padding:16px}
  .trailer-modal-inner{width:100%}
  .trailer-close{top:-46px;right:0;width:38px;height:38px;font-size:22px}
  .trailer-caption{margin-top:8px;font-size:8px}
}

.quick{
  position:fixed;
  left:50%;
  bottom:calc(34px + env(safe-area-inset-bottom));
  z-index:15;
  width:min(calc(100vw - 30px),650px);
  display:grid;
  grid-template-columns:1.08fr 1fr 1fr 1.12fr;
  gap:7px;
  opacity:0;
  transform:translate(-50%,72px) scale(.95);
  animation:menuIn .62s cubic-bezier(.16,1.15,.3,1) 2.02s forwards;
}
@keyframes menuIn{
  0%{opacity:0;transform:translate(-50%,72px) scale(.95)}
  68%{opacity:1;transform:translate(-50%,-5px) scale(1.015)}
  100%{opacity:1;transform:translate(-50%,0) scale(1)}
}
.nav-btn{
  min-height:58px;
  border:1px solid rgba(255,255,255,.34);
  background:rgba(7,6,6,.93);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:9px 6px;
  transition:.18s transform,.18s background,.18s border-color;
}
.nav-btn strong{font:10px/1 Arial,sans-serif;letter-spacing:.13em;font-weight:500}
.nav-btn span{margin-top:6px;font-size:11px;letter-spacing:.04em;white-space:nowrap}
.nav-btn.ticket{background:#eee9df;border-color:#eee9df;color:#151311}
.nav-btn.trailer-nav{font-family:inherit;color:inherit;cursor:pointer;appearance:none;-webkit-appearance:none;border-radius:0;min-width:0}
.nav-btn.trailer-nav.is-disabled{opacity:.48;cursor:default;pointer-events:none}
.nav-btn.trailer-nav:not(.is-disabled){border-color:rgba(184,211,220,.62)}
.nav-btn:hover,.nav-btn:focus-visible{transform:translateY(-2px);outline:none}
.nav-btn.ticket:hover,.nav-btn.ticket:focus-visible{background:#fffaf0}

.panel-wrap{
  position:fixed;inset:0;z-index:30;
  display:grid;place-items:center;
  background:rgba(0,0,0,.60);
  backdrop-filter:blur(10px);
  opacity:0;pointer-events:none;
  transition:opacity .2s ease;
  padding:20px;
}
.panel-wrap:target{opacity:1;pointer-events:auto}
.backdrop-close{position:absolute;inset:0;z-index:0}
.panel{
  position:relative;z-index:1;
  width:min(640px,92vw);
  max-height:min(82dvh,820px);
  overflow:auto;overscroll-behavior:contain;
  background:linear-gradient(145deg,rgba(27,22,20,.98),rgba(8,8,8,.99));
  border:1px solid rgba(255,255,255,.20);
  box-shadow:0 25px 90px rgba(0,0,0,.68);
  padding:30px 30px 34px;
}
.close{position:absolute;right:15px;top:13px;border:0;background:transparent;font:19px/1 Arial,sans-serif;padding:6px 8px}
.panel h2{margin:0 44px 23px 0;font-size:clamp(27px,6vw,43px);font-weight:400;line-height:1.4;letter-spacing:.05em}
.panel p{font-size:14px;line-height:2.05;color:rgba(255,255,255,.82);margin:0 0 16px}
.section{padding:19px 0 18px;border-top:1px solid var(--line)}
.section:first-child{border-top:0;padding-top:0}
.section:last-child{padding-bottom:0}
.section-label{margin:0 0 9px;font:9px/1.3 Arial,sans-serif;letter-spacing:.19em;color:var(--muted)}
.section-title{font-size:16px;line-height:1.6;margin:0 0 6px;font-weight:400}
.section-body{font-size:13px;line-height:1.9;color:rgba(255,255,255,.76)}
.schedule{display:grid;grid-template-columns:88px 1fr;gap:13px;padding:8px 0}
.schedule+.schedule{border-top:1px solid rgba(255,255,255,.08)}
.schedule .date{font:10px/1.5 Arial,sans-serif;letter-spacing:.08em;color:rgba(255,255,255,.62)}
.ticket-card{border:1px solid var(--line);padding:17px 16px;margin:0 0 12px}
.price{font-size:20px;margin-bottom:4px}
.subnote{font-size:11px!important;color:rgba(255,255,255,.45)!important;margin-top:10px!important}
.ticket-cta{display:block;width:100%;padding:17px 18px;margin-top:10px;border:1px solid rgba(255,255,255,.42);background:#ece7dd;color:#181512;opacity:1;letter-spacing:.12em;font-weight:600;text-align:center;text-decoration:none}
.ticket-cta.is-disabled{opacity:.45;pointer-events:none}
.cast-list{font-size:15px;line-height:2.15}
.guest{display:inline-block;margin-left:7px;padding:2px 7px;border:1px solid rgba(255,255,255,.22);font:8px/1.4 Arial,sans-serif;letter-spacing:.11em;color:rgba(255,255,255,.65);vertical-align:middle}
.map-link{display:inline-flex;margin-top:12px;padding:10px 13px;border:1px solid rgba(255,255,255,.24);font:10px/1 Arial,sans-serif;letter-spacing:.08em;background:rgba(255,255,255,.04)}
.logo-line{margin-top:24px;padding-top:18px;border-top:1px solid var(--line);font:9px/1.5 Arial,sans-serif;letter-spacing:.17em;color:rgba(255,255,255,.48)}

@media(max-width:640px){
  .visual-area{inset:0 0 120px 0;padding-left:12px;padding-right:12px}
  .flyer{
    width:min(92vw, calc((100dvh - 190px) * .6666667));
    max-height:calc(100dvh - 190px);
  }
  .brand{left:14px;top:calc(12px + env(safe-area-inset-top));gap:8px}
  .brand img{width:39px;height:41px}
  .brand-sub{font-size:7px}
  .brand-name{font-size:17px}
  .hint{right:13px;top:calc(16px + env(safe-area-inset-top));font-size:7px}
  .quick{
    bottom:calc(38px + env(safe-area-inset-bottom));
    width:calc(100vw - 24px);
    gap:5px;
  }
  .nav-btn{min-height:56px;padding:8px 4px}
  .nav-btn strong{font-size:9px;letter-spacing:.10em}
  .nav-btn span{font-size:10px;letter-spacing:.02em}
  .nav-btn.trailer-nav span{font-size:9px;letter-spacing:0}
  .panel-wrap{align-items:end;padding:0}
  .panel{width:100%;max-height:78dvh;border-left:0;border-right:0;border-bottom:0;padding:28px 20px calc(26px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0}
  .panel h2{font-size:29px}
}

@media(prefers-reduced-motion:reduce){
  .piece,.brand,.hint,.quick{animation:none!important;opacity:1!important;transform:none!important;filter:none!important}
  .ghost{opacity:.08}
}

/* v13: after the individual materials appear, lock to the exact flyer image.
   This is a very short finish, not a whole-page fade. */
.final-lock{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;
  z-index:4;opacity:0;pointer-events:none;
  animation:lockPoster .18s linear 1.88s forwards;
}
@keyframes lockPoster{to{opacity:1}}

.visual-area{inset:0 0 132px 0}
.flyer{
  width:min(88vw, calc((100dvh - 212px) * .6666667), 600px);
  max-height:calc(100dvh - 212px);
}
.quick{
  bottom:calc(36px + env(safe-area-inset-bottom));
  animation-delay:2.10s;
}
@media(max-width:640px){
  .visual-area{inset:0 0 136px 0}
  .flyer{
    width:min(92vw, calc((100dvh - 214px) * .6666667));
    max-height:calc(100dvh - 214px);
  }
  .quick{bottom:calc(40px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){
  .final-lock{opacity:1!important;animation:none!important}
}


/* v15 — softer modal swipe dismissal */
.close{display:none!important}
.panel-wrap{
  --drag-progress:0;
  transition:background-color .32s ease, backdrop-filter .32s ease, opacity .32s ease;
}
.panel{
  transition:
    transform .38s cubic-bezier(.18,.82,.24,1),
    opacity .30s ease;
  touch-action:pan-y;
  will-change:transform,opacity;
}
.swipe-handle{
  width:44px;
  height:4px;
  border-radius:999px;
  background:rgba(255,255,255,.24);
  margin:-14px auto 20px;
}
.panel.is-dragging{
  transition:none;
}
.panel.is-closing{
  transition:
    transform .44s cubic-bezier(.16,.80,.20,1),
    opacity .34s ease !important;
  transform:translateY(calc(100dvh + 60px)) !important;
  opacity:.18 !important;
}
.panel.is-returning{
  transition:
    transform .38s cubic-bezier(.20,.82,.28,1),
    opacity .34s ease !important;
}
@media(min-width:641px){
  .swipe-handle{opacity:.48}
}


/* v18 — keep sheet gestures inside the page/preview */
html, body, .app, .panel-wrap{
  overscroll-behavior-y:none !important;
}
.panel-wrap{
  touch-action:none;
}
.panel{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
}
.swipe-handle{
  touch-action:none;
}


/* v19 — full official logo mark, no clipping */
.brand{
  max-width:min(72vw, 290px);
}
.brand img{
  width:58px !important;
  height:58px !important;
  object-fit:contain !important;
  object-position:center center !important;
  display:block;
  flex:0 0 58px !important;
  overflow:visible !important;
}
.brand-copy{
  min-width:0;
}
@media(max-width:640px){
  .brand{
    max-width:min(74vw, 250px);
  }
  .brand img{
    width:52px !important;
    height:52px !important;
    flex-basis:52px !important;
  }
}


/* v20 — precise official symbol crop with the full diagonal line */
.brand img{
  width:62px !important;
  height:62px !important;
  flex:0 0 62px !important;
  object-fit:contain !important;
  object-position:center center !important;
}
@media(max-width:640px){
  .brand img{
    width:56px !important;
    height:56px !important;
    flex-basis:56px !important;
  }
}


/* v21 — reliable custom mobile scrolling + pull-down dismiss */
.panel-wrap{
  overscroll-behavior:none !important;
  touch-action:none !important;
}
.panel{
  overscroll-behavior:none !important;
  touch-action:none !important;
  -webkit-overflow-scrolling:auto !important;
  scroll-behavior:auto !important;
}
.panel.is-touching{
  transition:none !important;
}
.panel.is-inertia{
  scroll-behavior:auto !important;
}


/* v22 — restore native scrolling, keep pull-down dismiss only at top */
.panel-wrap{
  overscroll-behavior-y:none !important;
  touch-action:auto !important;
}
.panel{
  overflow-y:auto !important;
  -webkit-overflow-scrolling:touch !important;
  overscroll-behavior-y:contain !important;
  touch-action:pan-y !important;
}
.panel.is-touching{
  transition:none !important;
}


/* v23 — first-visit full intro, revisit shortcut, manual replay, post-show switch */
.ended-message{
  margin:4px 0 24px;
  padding:24px 18px;
  border:1px solid rgba(255,255,255,.20);
  text-align:center;
  font-size:18px;
  line-height:1.8;
  letter-spacing:.04em;
}
.ended-message span{
  display:inline-block;
  margin-top:6px;
  font-size:13px;
  color:rgba(255,255,255,.62);
}

/* Returning visitor: show the completed flyer almost immediately. */
body.revisit .piece{
  animation-duration:.18s !important;
  animation-delay:.02s !important;
  filter:none !important;
  transform:none !important;
}
body.revisit .final-lock{
  animation-duration:.12s !important;
  animation-delay:.18s !important;
}
body.revisit .brand{
  animation-duration:.18s !important;
  animation-delay:.22s !important;
}
body.revisit .quick{
  animation-duration:.24s !important;
  animation-delay:.26s !important;
}

@media(max-width:640px){
  .replay{
    right:13px;
    top:calc(14px + env(safe-area-inset-top));
    padding:6px 8px;
    font-size:7px;
  }
}


/* v26 — CSS-only flyer replay.
   Works even in previews/webviews where JavaScript click handlers are blocked. */

.css-replay-target{
  position:fixed;
  width:0;
  height:0;
  overflow:hidden;
  pointer-events:none;
}

/* Control container animates only on page entrance; the two links themselves alternate. */
.replay-control{
  position:absolute;
  z-index:50;
  top:calc(18px + env(safe-area-inset-top));
  right:18px;
  opacity:0;
  animation:brandIn .42s ease 2.08s forwards;
}
.replay-choice{
  display:block;
  border:1px solid rgba(255,255,255,.30);
  background:rgba(5,5,5,.38);
  color:rgba(255,255,255,.86);
  padding:7px 9px 6px;
  font:8px/1 Arial,sans-serif;
  letter-spacing:.17em;
  text-decoration:none;
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.replay-choice:active{transform:scale(.96)}
.replay-choice-b{display:none}

/* Alternate A/B so every tap changes :target and restarts a fresh animation. */
#replay-a:target ~ .app .replay-choice-a{display:none}
#replay-a:target ~ .app .replay-choice-b{display:block}
#replay-b:target ~ .app .replay-choice-a{display:block}
#replay-b:target ~ .app .replay-choice-b{display:none}

.css-replay-stage{
  position:absolute;
  inset:0;
  z-index:40;
  overflow:hidden;
  background:#15110f;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.css-replay-ghost,
.css-replay-layer{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.css-replay-ghost{
  opacity:.17;
  filter:blur(10px) brightness(.52) saturate(.72);
  transform:scale(1.03);
}
.css-replay-layer{
  opacity:0;
  filter:blur(7px);
  transform:scale(1.018);
}

/* A and B are identical disposable animation stages.
   The active target brings only one stage to life. */
#replay-a:target ~ .app .css-replay-stage-a,
#replay-b:target ~ .app .css-replay-stage-b{
  visibility:visible;
  animation:cssReplayStageLife 2.38s linear forwards;
}

#replay-a:target ~ .app .css-replay-stage-a .css-r-skin,
#replay-b:target ~ .app .css-replay-stage-b .css-r-skin{
  animation:cssReplayMaterial .90s cubic-bezier(.2,.72,.22,1) .02s forwards;
}
#replay-a:target ~ .app .css-replay-stage-a .css-r-flowers-top,
#replay-b:target ~ .app .css-replay-stage-b .css-r-flowers-top{
  animation:cssReplayMaterial .90s cubic-bezier(.2,.72,.22,1) .26s forwards;
}
#replay-a:target ~ .app .css-replay-stage-a .css-r-flowers-bottom,
#replay-b:target ~ .app .css-replay-stage-b .css-r-flowers-bottom{
  animation:cssReplayMaterial .90s cubic-bezier(.2,.72,.22,1) .55s forwards;
}
#replay-a:target ~ .app .css-replay-stage-a .css-r-eye,
#replay-b:target ~ .app .css-replay-stage-b .css-r-eye{
  animation:cssReplayMaterial 1.05s cubic-bezier(.2,.72,.22,1) .88s forwards;
}
#replay-a:target ~ .app .css-replay-stage-a .css-r-title,
#replay-b:target ~ .app .css-replay-stage-b .css-r-title{
  animation:cssReplayMaterial .78s cubic-bezier(.2,.72,.22,1) 1.28s forwards;
}

@keyframes cssReplayMaterial{
  0%{opacity:0;filter:blur(7px);transform:scale(1.018)}
  35%{opacity:.30}
  100%{opacity:1;filter:blur(0);transform:scale(1)}
}
@keyframes cssReplayStageLife{
  0%{opacity:1}
  91%{opacity:1}
  100%{opacity:0}
}

/* Revisit: keep the shortcut fast, but do not animate the bottom menu during replay. */
body.revisit .replay-control{
  animation-duration:.18s !important;
  animation-delay:.22s !important;
}

@media(max-width:640px){
  .replay-control{
    right:13px;
    top:calc(14px + env(safe-area-inset-top));
  }
  .replay-choice{
    padding:6px 8px;
    font-size:7px;
  }
}

@media(prefers-reduced-motion:reduce){
  /* REPLAY is an explicit request to see the effect, so keep this short but still visible. */
  #replay-a:target ~ .app .css-replay-stage-a,
  #replay-b:target ~ .app .css-replay-stage-b{
    animation-duration:1.55s;
  }
}


/* v29 — full transparent official logo, smaller and less dominant */
.brand.brand-full{
  position:absolute;
  z-index:12;
  top:calc(14px + env(safe-area-inset-top));
  left:14px;
  opacity:0;
  animation:brandIn .48s ease 1.72s forwards;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.88));
  max-width:min(40vw, 132px);
  cursor:pointer;
}
.brand.brand-full img{
  display:block;
  width:100% !important;
  height:auto !important;
  max-width:none !important;
  object-fit:contain !important;
  object-position:left top !important;
  flex:none !important;
  overflow:visible !important;
}
.brand-copy,
.brand-sub,
.brand-name{
  display:none !important;
}
@media(max-width:640px){
  .brand.brand-full{
    top:calc(10px + env(safe-area-inset-top));
    left:10px;
    max-width:min(42vw, 116px);
  }
}


/* v30 — staff section */
.staff-list{
  letter-spacing:.04em;
  color:rgba(255,255,255,.72);
}


/* v31 — remove the empty space above the flyer */
.visual-area{
  place-items:start center;
  padding-top:0;
}
@media(max-width:640px){
  .visual-area{
    padding-top:0;
  }
}


/* Synopsis only: compact, readable type with theatrical pauses. */
#story .panel > p {
  font-size: 13.5px;
  line-height: 1.9;
  letter-spacing: .015em;
  margin: 0 0 15px;
}
#story .panel > p.story-opening {
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: .03em;
  color: var(--ink);
  margin-bottom: 22px;
}
#story .panel > p.story-questions {
  font-size: 14.5px;
  line-height: 2.05;
  letter-spacing: .025em;
  color: var(--ink);
  margin-top: 24px;
  margin-bottom: 24px;
}
#story .panel > p.story-contrasts {
  font-size: 13.5px;
  line-height: 2.15;
  letter-spacing: .045em;
  color: rgba(255,255,255,.88);
  margin-top: 23px;
  margin-bottom: 23px;
}

@media (max-width: 360px) {
  #story .panel > p { font-size: 13px; }
  #story .panel > p.story-opening { font-size: 14.5px; }
  #story .panel > p.story-questions { font-size: 14px; }
  #story .panel > p.story-tagline { font-size: 15px; }
}

/* Synopsis sheet: breathing room after the last line, with safe mobile side gutters. */
#story .panel {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
@media (max-width: 640px) {
  #story .panel {
    padding-left: 26px;
    padding-right: 26px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }
}

/* Synopsis: break at dramatic/semantic pauses, never inside a character name or reading. */
#story .panel > p {
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}
#story .story-keep {
  white-space: nowrap;
}

/* Detail and ticket sheets: keep names, labels, dates and short titles intact. */
#detail .performance-title {
  /* Responsive size ensures the full production title stays on one row on iPhone. */
  font-size: clamp(13px, 4.4vw, 16px);
  letter-spacing: 0;
  white-space: nowrap;
  word-break: keep-all;
}
#detail .detail-keep,
#ticket .detail-keep,
#detail .cast-entry {
  white-space: nowrap;
  word-break: keep-all;
}
#detail .cast-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  vertical-align: middle;
}
#detail .cast-entry .guest { margin-left: 0; }
#detail .schedule .date,
#ticket .schedule .date { white-space: nowrap; }
@media (max-width: 360px) {
  #detail .section-title.detail-keep,
  #ticket .section-title.detail-keep { font-size: 15px; }
}

/* Detail sheet v4: restrained mobile type; equal-size cast names in explicit rows.
   Prevent iOS WebKit's text inflation from scaling the text-only rows differently. */
#detail, #ticket {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
#detail .panel h2,
#ticket .panel h2 {
  font-size: clamp(23px, 5.8vw, 29px);
  line-height: 1.4;
}
#detail .section,
#ticket .section {
  padding-top: 16px;
  padding-bottom: 15px;
}
#detail .section:first-child,
#ticket .section:first-child { padding-top: 0; }
#detail .section:last-child,
#ticket .section:last-child { padding-bottom: 0; }
#detail .section-title,
#ticket .section-title {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .015em;
}
/* Deliberately retain the responsive one-line production title from v3. */
#detail .section-title.performance-title {
  font-size: clamp(12px, 4.2vw, 15px);
  letter-spacing: 0;
  white-space: nowrap;
}
#detail .section-body,
#ticket .section-body {
  font-size: 12.5px;
  line-height: 1.85;
}
#detail .cast-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: .025em;
}
#detail .cast-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}
#detail .cast-name {
  display: inline-block;
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
  white-space: nowrap;
}
#detail .cast-row .guest {
  margin: 0;
  font-size: 9px;
  line-height: 1.3;
  flex: 0 0 auto;
}
#detail .staff-list { font-size: 12.5px; letter-spacing: .02em; }
#detail .staff-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
#detail .staff-row:last-child { border-bottom: 0; }
#detail .staff-role { color: rgba(255,255,255,.55); font-size: 11.5px; white-space: nowrap; }
#detail .staff-person { min-width: 0; overflow-wrap: anywhere; color: rgba(255,255,255,.86); }
@media (max-width: 360px) { #detail .staff-row { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; } }
@media (max-width: 360px) {
  #detail .section-title.detail-keep,
  #ticket .section-title.detail-keep { font-size: 14px; }
}

/* Performance times: keep date, curtain time and door time grouped on narrow phones. */
#ticket .performance-year,
#detail .performance-year { margin-bottom: 7px; }
#ticket .performance-day,
#detail .performance-day { padding: 11px 0 12px; }
#ticket .performance-day + .performance-day,
#detail .performance-day + .performance-day {
  border-top: 1px solid rgba(255,255,255,.13);
}
#ticket .performance-day-head,
#detail .performance-day-head {
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  margin-bottom: 7px;
}
#ticket .performance-day-date,
#detail .performance-day-date {
  color: var(--ink); font-size: 13px; line-height: 1.6; white-space:nowrap;
}
#ticket .performance-day-en,
#detail .performance-day-en {
  color: var(--muted); font: 10px/1.5 Arial,sans-serif;
  letter-spacing:.06em; white-space:nowrap;
}
#ticket .performance-time,
#detail .performance-time {
  display:flex; justify-content:space-between; align-items:baseline;
  gap:10px; padding:5px 0;
  font-variant-numeric:tabular-nums;
}
#ticket .performance-start,
#detail .performance-start {
  font-size:14px; color:var(--ink); line-height:1.5; white-space:nowrap;
}
#ticket .performance-action,
#detail .performance-action {
  font-size:11px; color:rgba(255,255,255,.76);
}
#ticket .performance-door,
#detail .performance-door {
  font-size:12px; color:rgba(255,255,255,.68); white-space:nowrap;
}

.performance-runtime{margin-top:12px!important;}

/* Mobile-first viewport layout: the poster and navigation share one available viewport. */
html,body{height:100%;height:100dvh;min-height:0;overflow:hidden}
body{position:fixed;inset:0;width:100%;height:100%;height:100dvh}
.app{
  position:fixed;inset:0;
  height:100%;height:100dvh;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  gap:clamp(8px,2vh,18px);
  padding:calc(env(safe-area-inset-top) + 8px) 12px calc(env(safe-area-inset-bottom) + 12px);
  overflow:hidden;
}
.visual-area{
  position:relative;inset:auto;
  min-width:0;min-height:0;width:100%;height:100%;
  display:grid;place-items:center;
  padding:0;
}
.flyer{
  width:auto;
  height:min(100%,138vw,900px);
  max-width:100%;max-height:100%;
  aspect-ratio:834 / 1112;
  flex-shrink:1;
}
.quick{
  position:relative;inset:auto;left:auto;bottom:auto;
  width:min(100%,650px);
  margin:0 auto;
  grid-template-columns:1.08fr 1fr 1fr 1.12fr;
  gap:clamp(3px,1.2vw,7px);
  opacity:1;
  transform:none;
  animation:none;
}
.nav-btn{min-width:0;min-height:56px;padding:8px 3px}
.nav-btn strong{font-size:clamp(8px,2.5vw,10px);letter-spacing:.06em}
.nav-btn span{font-size:clamp(9px,2.65vw,11px);letter-spacing:0}
.nav-btn.trailer-nav span{font-size:clamp(8px,2.45vw,10px)}
.panel-wrap{height:100%;height:100dvh}
.panel{max-height:min(82dvh,820px)}
.trailer-modal{height:100%;height:100dvh;padding:calc(env(safe-area-inset-top) + 56px) 16px calc(env(safe-area-inset-bottom) + 18px)}
.trailer-modal-inner{max-height:100%;}
.trailer-modal-frame{max-height:calc(100dvh - 140px)}
@media(max-width:640px){
  .visual-area{position:relative;inset:auto;padding:0;place-items:center}
  .flyer{width:auto;max-width:100%;max-height:100%}
  .quick{position:relative;inset:auto;bottom:auto;width:min(100%,650px);gap:clamp(3px,1.2vw,7px)}
  .nav-btn{min-height:54px;padding:7px 2px}
  .panel{max-height:78dvh}
}
@media(max-height:600px){
  .app{gap:5px;padding-top:calc(env(safe-area-inset-top) + 4px);padding-bottom:calc(env(safe-area-inset-bottom) + 5px)}
  .nav-btn{min-height:44px;padding:5px 2px}
  .nav-btn span{margin-top:3px}
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 834px;
  aspect-ratio: 834 / 1112;
  background-color: #000;
  margin: 0 auto;
  overflow: hidden;
}

.fadeIn-img {
  opacity: 1;
  animation: fadeIn 5s ease-in-out;
}

@keyframes fadeIn {
  0% { 
    opacity: 0;
  }
  100% { 
    opacity: 1;
  }
}
