/* Comic storytelling and the connected service layer. Scene geometry stays in
   newap-story.js; screen-space text never inherits the camera's scale. */
:root{--orange:#e34b2e;--ink:#173c50;--line:#173c5026}
.story-header{min-height:80px;padding:12px max(3.5%,env(safe-area-inset-left));gap:22px;border:0}
.story-header nav{gap:24px}
.story-header nav button{padding:0;border:0;background:none;color:var(--ink);font-size:14px;min-height:44px;font-weight:600}
.story-header nav button:hover,.story-header nav a:hover{color:var(--orange)}
.header-cta{border:1px solid var(--ink);background:transparent;color:var(--ink);gap:14px;white-space:nowrap}
.services-menu{display:none;align-items:center;gap:10px;min-height:44px;padding:8px 12px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:99px;font-size:14px}
.stage-art{inset:88px 20px 20px;border:1px solid #173c5030;border-radius:22px}
.story-vignette{inset:88px 20px 20px;border-radius:22px;background:linear-gradient(90deg,#fffaf0fa 0%,#fffaf0eb 25%,#fffaf070 42%,transparent 59%)}
.narrative{left:6.5%;width:39%;top:46%;transform:translateY(-43%);max-width:580px}
.eyebrow{font-size:13px;letter-spacing:.045em;line-height:1.8;margin-bottom:16px;font-weight:700}
.scene-copy h1,.scene-copy h2{font-size:clamp(36px,3.85vw,66px);line-height:1.4;font-weight:750;letter-spacing:-.035em}
.scene-copy h2 span:last-child{color:var(--orange)}
.scene-copy>p{font-size:16px;line-height:1.85;margin:18px 0 22px}
.primary-button{border:1px solid #bd371d;border-radius:9px;min-height:52px;font-size:16px;padding:13px 22px;box-shadow:0 4px 0 #bb341d}
.primary-button:hover{background:#d34024;transform:translateY(-1px)}
.primary-button:active{transform:translateY(2px);box-shadow:0 1px 0 #bb341d}
.text-button{font-size:14px;line-height:1.6}
.scene-copy .scene-hint{font-size:13px;line-height:1.7;margin:20px 0 0;color:#52636c;max-width:370px;display:flex;gap:9px}
.scene-hint:before{content:'✳';color:var(--orange);font-size:20px;line-height:1.15;flex-shrink:0}
.scene-copy .data-note{font-size:12px!important;line-height:1.7!important;max-width:430px}
.comic-bubble{position:absolute;z-index:18;right:8%;top:29%;width:220px;max-width:33%;padding:18px 22px;border:2px solid var(--ink);border-radius:48% 46% 46% 15%;background:var(--paper);box-shadow:4px 5px 0 #173c5022;transform:rotate(2deg);pointer-events:none}
.comic-bubble:after{content:'';position:absolute;left:24px;bottom:-13px;width:20px;height:20px;transform:skew(-25deg) rotate(45deg);background:var(--paper);border-right:2px solid var(--ink);border-bottom:2px solid var(--ink)}
.comic-bubble>span{font-size:12px;font-weight:600;color:#536975}
.comic-bubble p{font-size:17px;font-weight:650;line-height:1.65;margin:5px 0 3px}
.chapter-stamp{position:absolute;z-index:18;right:4%;top:90px;width:86px;height:86px;display:grid;align-content:center;text-align:center;border-radius:50%;background:#ffe078;border:1.5px solid var(--ink);outline:1px dashed var(--ink);outline-offset:-7px;transform:rotate(12deg);font-size:12px;line-height:1.45}
.chapter-stamp strong{font-size:17px}
.story-stage:not([data-scene="0"]) .chapter-stamp{display:none}
.motion-toggle{right:44px;top:104px;min-height:44px;font-size:13px;border-color:#fff9;box-shadow:0 2px 12px #173c5010}
.art-label{right:24px;bottom:88px;font-size:12px}
.time-label{top:24px;left:45%;font-size:14px}
.stage-bottom{left:6.5%;right:5%;bottom:50px}
.scene-counter{margin-left:auto}
.scroll-invitation{font-size:12px}
.chapter-nav{left:50%;bottom:45px;transform:translateX(-50%);background:var(--ink);padding:6px 12px;border-radius:40px;gap:3px;box-shadow:0 4px 14px #173c5020}
.chapter-nav button{color:#fffaf0;min-height:44px;width:38px;font-size:12px;border-radius:50%;font-weight:600}
.chapter-nav button:after{display:none}
.chapter-nav button[aria-current=step]{background:#ffe078;color:var(--ink)}
.chapter-nav button:hover{background:#ffffff25}
.chapter-nav button[aria-current=step]:hover{background:#ffe078;color:var(--ink)}
.chapter-nav button:hover:before{left:50%;transform:translateX(-50%);bottom:54px}
.story-progress{left:40px;right:40px;bottom:20px;border-radius:3px;overflow:hidden}
.explore-links button,.day-tabs button{font-size:14px;min-height:44px}
.hotspots{z-index:20}.hotspot{font-size:28px;border-width:2px;box-shadow:0 0 0 6px #fffaf055,0 4px 14px #173c5040}.hotspot span{font-size:13px;line-height:1.6;padding:5px 9px}
.explore-links button:hover,.day-tabs button:hover{border-color:var(--orange)}
.flow-dialogue,.flow-visual,.mobile-services{display:none}
.scene-copy[data-scene="6"] h2,.scene-copy[data-scene="7"] h2{font-size:clamp(34px,3.6vw,58px)}
.scene-copy[data-scene="6"] .copy-actions{flex-direction:column;align-items:flex-start;gap:12px}
.end-chip{font-size:13px;line-height:1.7;border-radius:12px;padding:8px 12px}
.service-dialog{width:min(760px,calc(100% - 32px));padding:40px;max-height:calc(100svh - 32px);overscroll-behavior:contain}
.service-dialog h2{font-size:clamp(25px,3vw,34px);padding-right:20px}
.service-dialog h3{font-size:18px;line-height:1.6;margin:0 0 6px}
.service-dialog p{font-size:16px;line-height:1.8;margin:8px 0 16px}
.service-dialog .service-notice{background:#e8f1f5;border:1px solid #bed6e1;border-radius:12px;padding:14px 16px;font-size:14px;line-height:1.8;margin:0 0 18px;color:#244f62}
.service-notice.is-error{background:#fff0e8;border-color:#e6b49e;color:#873d22}
.service-card{padding:20px 0;border-bottom:1px solid var(--line)}
.service-card:first-of-type{padding-top:5px}
.service-card>p{color:#566a75}
.service-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 17px;margin:2px 8px 2px 0;border:1px solid var(--ink);border-radius:9px;background:var(--paper);color:var(--ink);font-size:14px;line-height:1.6;font-weight:600;text-align:center}
.service-button:hover{background:var(--ink);color:var(--paper)}
.service-footer{display:flex;gap:24px;justify-content:space-between;flex-wrap:wrap;margin-top:22px;padding-top:12px}
.service-room-image{margin:0 0 24px;border-radius:12px;overflow:hidden;background:#d3e4eb}
.service-room-image img{display:block;width:100%;height:auto;max-height:300px;object-fit:cover}
.service-room-image figcaption{font-size:12px;padding:9px 14px;color:#3e6070}
.service-facts{display:grid;grid-template-columns:repeat(3,1fr);border-block:1px solid var(--line);margin:20px 0}
.service-facts>div{padding:15px 10px}.service-facts dt{font-size:13px;color:#566a75}.service-facts dd{margin:6px 0 0;font-size:16px}
.booking-steps{padding-left:30px;counter-reset:step}.booking-steps li{padding:4px 0 16px 8px}.booking-steps li::marker{color:var(--orange);font-weight:700;font-size:20px}
.service-room-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0}
.real-room{border:1px solid var(--line);border-radius:12px;padding:18px;background:#fffdf7;overflow-wrap:anywhere}
.real-room .room-status{font-size:12px;color:#5e746f}.real-room h3{margin:12px 0 4px}
.real-room p{font-size:14px;margin:5px 0}.real-room .room-price{font-size:18px;font-weight:650;margin:16px 0}
.real-room .service-button{width:100%;margin:0}
dialog:focus-visible{outline:3px solid var(--orange)}
body.motion-reduced .primary-button:hover,body.motion-reduced .primary-button:active{transform:none}
@media(min-width:1001px) and (min-height:760px){.scene-copy.is-active{animation:copy-in .35s ease-out}@keyframes copy-in{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}body.motion-reduced .scene-copy.is-active{animation:none}}
@media(max-width:1000px){.story-header{gap:15px}.story-header nav{gap:15px}.narrative{width:43%;left:5.5%}.scene-copy h1,.scene-copy h2{font-size:40px}.comic-bubble{right:4%;width:185px;padding:14px 17px}.comic-bubble p{font-size:16px}.chapter-nav{bottom:42px}.stage-bottom .scroll-invitation{display:none}.chapter-stamp{top:90px;right:4%}}
@media(max-width:800px){.story-header nav{display:none}.header-cta{margin-left:auto}.services-menu{display:flex}.stage-art,.story-vignette{left:12px;right:12px}.chapter-nav{padding:3px 8px}.chapter-nav button{width:33px}}
@media(max-width:700px){
  .story-header{min-height:72px;padding:10px max(16px,env(safe-area-inset-left));gap:12px}.wordmark{font-size:27px}.header-cta{display:none}.services-menu{margin-left:auto}.motion-toggle{top:88px;right:24px;font-size:12px;min-height:40px;padding:7px 10px}
  .story-stage{min-height:0}.stage-art{inset:80px 12px 51%;border-radius:17px}.story-vignette{inset:43% 0 0;border-radius:0;background:linear-gradient(transparent,var(--paper) 48px,var(--paper))}
  .narrative{top:49%;left:6%;right:6%;width:auto;max-width:none;transform:none}
  .eyebrow{font-size:12px;margin-bottom:6px}.scene-copy h1,.scene-copy h2{font-size:clamp(28px,7.2vw,38px);line-height:1.35;letter-spacing:-.02em}
  .scene-copy h1 span:first-child{font-size:.75em;margin-bottom:5px}.scene-copy h1 span:nth-child(2),.scene-copy h1 span:last-child{display:inline}
  .scene-copy>p{font-size:16px;line-height:1.65;margin:10px 0 16px}.scene-copy .scene-hint{font-size:12px;line-height:1.7;margin-top:12px;max-width:none}
  .primary-button{font-size:14px;min-height:46px;padding:10px 18px;box-shadow:0 3px 0 #bb341d}.text-button{font-size:14px}.copy-actions{gap:8px 16px}
  .scene-copy[data-scene="6"]{margin-top:0}.scene-copy[data-scene="6"] h2,.scene-copy[data-scene="7"] h2{font-size:30px}.scene-copy[data-scene="6"]>p{font-size:14px;margin:7px 0}
  .scene-copy[data-scene="6"] .copy-actions{gap:5px}.scene-copy[data-scene="6"] .primary-button{font-size:14px}.scene-copy[data-scene="6"] .text-button{font-size:14px}
  .scene-copy[data-scene="6"] .scene-hint,.scene-copy[data-scene="7"] .scene-hint{display:none}
  .scene-copy[data-scene="7"] .copy-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.scene-copy[data-scene="7"] .copy-actions button{padding:8px 10px;justify-content:center;text-align:center;line-height:1.55}
  .scene-copy .data-note{font-size:12px!important;margin:7px 0 10px!important}.end-chip{margin:8px 0;font-size:12px}
  .comic-bubble{left:18px;right:auto;top:22px;width:154px;max-width:43%;padding:12px 15px;transform:rotate(-3deg)}.comic-bubble>span{font-size:12px}.comic-bubble p{font-size:14px;line-height:1.65;margin:4px 0}.comic-bubble:after{left:auto;right:18px;bottom:-10px;width:15px;height:15px}
  .chapter-stamp{display:none}.art-label{bottom:10px;right:12px;font-size:12px;max-width:90%;padding:4px 8px}.time-label{left:20px;top:24px;font-size:14px}.story-stage[data-scene="5"] .comic-bubble{top:78px}
  .story-stage[data-scene="5"] .comic-bubble{display:none}.story-stage[data-scene="6"] .comic-bubble,.story-stage[data-scene="7"] .comic-bubble{left:auto;right:16px;top:20px;width:144px}
  .stage-bottom{display:none}.chapter-nav{left:6%;right:6%;bottom:81px;transform:none;justify-content:space-between;gap:0;padding:0 6px}.chapter-nav button{flex:1;width:auto;min-height:42px;font-size:12px}.chapter-nav button[aria-current=step]{border-radius:24px}
  .story-progress{left:20px;right:20px;bottom:74px}.prototype-note{padding-bottom:calc(90px + env(safe-area-inset-bottom));font-size:12px}
  .mobile-services{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;z-index:45;bottom:0;left:0;right:0;padding:5px max(10px,env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom));background:#fffaf0f5;border-top:1px solid var(--line);backdrop-filter:blur(12px)}
  .mobile-services>a,.mobile-services>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:55px;font-size:14px;background:none;border:0;color:var(--ink);padding:2px;line-height:1.4}.mobile-services span{font-size:21px;line-height:1.2}.mobile-services>button[data-service="booking"]{color:#bc351e;font-weight:650}
  .explore-links{gap:6px}.explore-links button{font-size:14px;min-height:42px;padding:6px 10px}.day-tabs button{font-size:14px}.thought{font-size:15px;line-height:1.7;padding:10px 15px}
  .service-dialog{padding:40px 22px 24px;width:calc(100% - 20px);max-height:calc(100svh - 20px)}.service-room-list{grid-template-columns:1fr}.service-facts{grid-template-columns:1fr}.service-facts>div{display:flex;justify-content:space-between;padding:10px 0}.service-facts dd{margin:0}.service-footer{gap:12px}.service-dialog .primary-button{font-size:16px}
}
@media(max-width:700px) and (min-height:721px) and (max-height:800px){.narrative{top:46%}.stage-art{bottom:54%}.scene-copy>p{margin:8px 0 12px}.scene-copy .scene-hint{display:none}.scene-copy h1,.scene-copy h2{font-size:28px}.scene-copy[data-scene="6"] h2,.scene-copy[data-scene="7"] h2{font-size:28px}.scene-copy[data-scene="7"]{margin-top:0}.scene-copy[data-scene="7"]>p{font-size:14px}.scene-copy[data-scene="7"] .copy-actions{gap:4px}}
/* A short viewport or enlarged page becomes a comic you can read normally.
   Every chapter and control remains reachable without nested scrolling. */
@media(max-height:600px),(max-width:350px),(max-width:700px) and (max-height:720px){
  .story-header{position:relative;min-height:72px;flex-wrap:wrap}.story-header nav{display:none}.services-menu{display:flex;margin-left:auto}.header-cta{display:none}.motion-toggle{position:static;margin-left:0;order:3;font-size:13px}
  #story-track{height:auto!important}.story-stage{position:relative;height:auto;min-height:0;overflow:visible}.stage-art,.story-vignette,.stage-bottom,.chapter-nav,#chapter-anchors,.story-progress{display:none}
  .narrative{position:relative;top:auto;left:auto;right:auto;transform:none;width:auto;max-width:1100px;margin:auto;padding:15px 5% 40px;background:var(--paper)}
  .scene-copy{display:block!important;margin:0 0 44px!important;scroll-margin-top:18px;padding-bottom:30px;border-bottom:1px solid var(--line)}
  .flow-illustration{display:block;width:100%;height:auto;max-height:60vh;object-fit:contain;background:#d5e8ec;border:1px solid var(--line);border-radius:16px;margin:0 0 14px}
  .flow-visual{display:block;position:relative;width:min(100%,900px);margin:0 0 18px;overflow:hidden;border-radius:16px}.flow-visual .flow-illustration{max-height:none;margin:0}
  .flow-actor{position:absolute;left:57%;bottom:6%;width:18%;aspect-ratio:295/506;background-image:url('/assets/newap-story/sprites.webp');background-size:520.678% auto;background-position:4.1096% 91.5058%;background-repeat:no-repeat;filter:drop-shadow(2px 4px 2px #173c5026)}
  .flow-dialogue{display:block;position:relative;width:fit-content;max-width:90%;margin:0 0 24px 5%;padding:14px 20px;border:2px solid var(--ink);border-radius:20px 20px 20px 3px;background:#fffdf6;box-shadow:4px 4px 0 #173c5015}
  .flow-dialogue b{font-size:12px;color:#536975}.flow-dialogue p{font-size:16px;line-height:1.7;margin:4px 0}
  .scene-copy h1,.scene-copy h2,.scene-copy[data-scene="6"] h2,.scene-copy[data-scene="7"] h2{font-size:32px}.scene-copy h1 span{display:block!important}.scene-copy h1 span:first-child{font-size:inherit}.scene-copy>p,.scene-copy[data-scene="6"]>p{font-size:16px}.scene-copy .scene-hint{display:flex!important;font-size:13px}
  .scene-copy .eyebrow{font-size:13px}.scene-copy[data-scene="6"] .copy-actions{gap:12px}.scene-copy[data-scene="7"]{margin-bottom:0!important}.prototype-note{padding-bottom:100px}
}
@media(prefers-reduced-motion:reduce){.scene-copy.is-active{animation:none}.primary-button:hover,.primary-button:active{transform:none}}

/* Configured dorm contacts may contain long email addresses or names. */
.service-dialog{overflow-wrap:anywhere}.service-card,.service-button{min-width:0;max-width:100%;overflow-wrap:anywhere}
@media (pointer:coarse) {
  .story-header .wordmark,.motion-toggle,.explore-links button { min-height:44px; }
  .chapter-nav { overflow-x:auto; scrollbar-width:thin; scroll-padding-inline:6px; }
  .chapter-nav button { flex:0 0 44px; min-width:44px; min-height:44px; }
  dialog,.service-dialog { inset-block:env(safe-area-inset-top) env(safe-area-inset-bottom); max-width:calc(100vw - max(16px,env(safe-area-inset-left)) - max(16px,env(safe-area-inset-right))); max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom))); }
}
@media (pointer:coarse) and (max-width:700px) {
  .chapter-nav { bottom:calc(81px + env(safe-area-inset-bottom)); }
  .story-progress { bottom:calc(74px + env(safe-area-inset-bottom)); }
}
