/* Heartbeat immersive prototype: relationship path + one continuous story space. */
.motion-toggle[aria-pressed="true"]{border-color:rgba(243,199,215,.38);color:var(--text)}

#contractScreen{padding:12px var(--safe-r)}
#contractScreen .contract-sheet{
  position:relative;
  min-height:0;
  height:100%;
  padding:16px 22px 12px;
  overflow:hidden;
  border:0;
  background:
    radial-gradient(circle at 72% 32%,rgba(230,154,184,.08),transparent 24%),
    linear-gradient(180deg,rgba(255,255,255,.018),transparent 42%),#000;
  box-shadow:none;
}
#contractScreen .contract-head{padding-bottom:7px}
#contractScreen .contract-title{padding:8px 0 5px}
#contractScreen .contract-title h1{margin:2px 0;font-size:clamp(20px,2.45vw,31px)}
#contractScreen .contract-sheet blockquote{position:absolute;right:22px;top:49px;width:min(39%,380px);margin:0;background:transparent}
#contractScreen .contract-choice-head{margin:1px 0 2px}

.relationship-route{position:relative;height:148px;margin:0 0 5px;isolation:isolate}
.relationship-route::before{
  position:absolute;inset:8% 1% 10%;content:"";pointer-events:none;
  background:radial-gradient(ellipse at 48% 55%,rgba(230,154,184,.045),transparent 58%);
}
.relationship-route__line{position:absolute;z-index:-1;inset:5px 0 0;width:100%;height:calc(100% - 5px);overflow:visible}
.relationship-route__line path{fill:none;stroke:rgba(243,199,215,.26);stroke-width:1.2;stroke-dasharray:2 5;vector-effect:non-scaling-stroke}

#contractScreen .boundary-options{position:absolute;inset:0;display:block!important}
#contractScreen .boundary-option{
  --x:0%;--y:50%;
  position:absolute;
  left:var(--x);top:var(--y);
  width:18%;min-width:0;min-height:60px;height:auto;
  padding:0 0 0 37px;
  transform:translate(-50%,-50%);
  overflow:visible;
  border:0;
  background:transparent;
  box-shadow:none;
  text-align:left;
}
#contractScreen .boundary-option:nth-child(1){--x:7%;--y:67%}
#contractScreen .boundary-option:nth-child(2){--x:27%;--y:36%}
#contractScreen .boundary-option:nth-child(3){--x:49%;--y:56%}
#contractScreen .boundary-option:nth-child(4){--x:71%;--y:30%}
#contractScreen .boundary-option:nth-child(5){--x:92%;--y:53%}
#contractScreen .boundary-option>i{
  position:absolute;left:0;top:50%;width:29px;height:29px;margin:0;
  display:grid;place-items:center;transform:translateY(-50%);
  border:1px solid rgba(255,255,255,.27);border-radius:50%;
  background:#050507;color:var(--soft);font-size:9px;
  transition:border-color .18s,background-color .18s,box-shadow .18s;
}
#contractScreen .boundary-option>i::after{position:absolute;inset:-6px;content:"";border:1px solid transparent;border-radius:50%}
#contractScreen .boundary-option .option-copy>em{margin-bottom:2px;color:var(--soft);font-size:8px}
#contractScreen .boundary-option strong{font-size:11px;line-height:1.35}
#contractScreen .boundary-option small{display:none}
#contractScreen .boundary-option .story-choice-arrow{display:none!important}
#contractScreen .boundary-option:hover,#contractScreen .boundary-option:focus-visible,#contractScreen .boundary-option.selected{background:transparent;box-shadow:none}
#contractScreen .boundary-option:hover>i,#contractScreen .boundary-option:focus-visible>i{border-color:var(--gold);color:var(--gold)}
#contractScreen .boundary-option.selected>i{border-color:var(--gold);background:rgba(243,199,215,.1);color:var(--gold);box-shadow:0 0 18px rgba(230,154,184,.2)}
#contractScreen .boundary-option.selected>i::after{border-color:rgba(243,199,215,.3)}
#contractScreen .boundary-option.selected strong{color:var(--gold)}
#contractScreen .boundary-option.completed:not(.selected)>i{border-color:rgba(94,234,212,.62);color:var(--mint)}
#contractScreen .boundary-option.completed>i::before{
  position:absolute;right:-5px;bottom:-5px;width:14px;height:14px;content:"✓";
  display:grid;place-items:center;border:1px solid rgba(94,234,212,.58);border-radius:50%;
  color:var(--mint);background:#050507;font:8px/1 "DM Mono",monospace;
}

.route-preview{min-height:48px;padding:7px 11px;border-left:2px solid var(--gold);background:rgba(255,255,255,.022)}
.route-preview small,.route-preview strong,.route-preview p{display:block;margin:0}
.route-preview small{color:var(--soft);font:8px/1.35 "DM Mono",monospace;letter-spacing:.08em}
.route-preview strong{margin-top:2px;font-size:12px;font-weight:500}
.route-preview p{margin-top:2px;color:var(--soft);font-size:9px}
#contractScreen .contract-foot{padding-top:7px}

.story-path{position:absolute;z-index:54;left:var(--safe-l);top:12px;width:148px;color:var(--faint);pointer-events:none}
.story-path__label{display:block;margin-bottom:7px;color:var(--soft);font:8px/1 "DM Mono",monospace;letter-spacing:.12em}
.story-path ol{display:grid;gap:0;margin:0;padding:0;list-style:none}
.story-path li{position:relative;display:grid;grid-template-columns:14px 1fr;align-items:center;gap:7px;min-height:24px;font-size:9px;letter-spacing:.06em}
.story-path li::before{position:absolute;left:5px;top:-50%;width:1px;height:100%;content:"";background:rgba(255,255,255,.13)}
.story-path li:first-child::before{display:none}
.story-path li i{position:relative;z-index:1;width:11px;height:11px;border:1px solid rgba(255,255,255,.25);border-radius:50%;background:#030304}
.story-path li.complete{color:rgba(117,217,200,.7)}
.story-path li.complete i{border-color:var(--mint);background:var(--mint);box-shadow:inset 0 0 0 3px #030304}
.story-path li.current{color:var(--text)}
.story-path li.current i{border-color:var(--gold);box-shadow:0 0 0 4px rgba(243,199,215,.1)}

.immersive-moment{
  position:absolute;z-index:53;inset:0;width:100%;height:100%;min-height:44px;padding:0;
  display:grid;place-content:center;justify-items:center;gap:8px;
  border:0;border-radius:0;color:var(--text);background:rgba(0,0,0,.38);
  text-align:center;cursor:pointer;isolation:isolate;
}
.immersive-moment[hidden]{display:none}
.immersive-moment::before{position:absolute;inset:0;z-index:-1;content:"";background:radial-gradient(circle at 62% 47%,rgba(243,199,215,.12),transparent 18%)}
.immersive-moment__pulse{position:relative;width:58px;height:58px;display:grid;place-items:center}
.immersive-moment__pulse::before,.immersive-moment__pulse::after,.immersive-moment__pulse i{
  position:absolute;inset:50%;width:12px;height:12px;content:"";transform:translate(-50%,-50%);
  border:1px solid rgba(243,199,215,.58);border-radius:50%;
  animation:turn-pulse 1.8s ease-out infinite;
}
.immersive-moment__pulse::after{animation-delay:.55s}
.immersive-moment__pulse i:nth-child(1){animation-delay:1.1s}
.immersive-moment__pulse i:nth-child(2){width:8px;height:8px;border:0;background:var(--gold);animation:none}
.immersive-moment small{color:var(--gold);font:8px/1 "DM Mono",monospace;letter-spacing:.2em}
.immersive-moment strong{font-size:clamp(18px,2.2vw,27px);font-weight:500}
.immersive-moment em{color:var(--soft);font-size:10px;font-style:normal}
.immersive-moment:focus-visible{outline:2px solid var(--gold);outline-offset:-5px}
.immersive-moment.is-complete{background:rgba(0,0,0,.72)}
.immersive-moment.is-complete .immersive-moment__pulse{transform:scale(.82);opacity:.35}
@keyframes turn-pulse{0%{width:12px;height:12px;opacity:.9}100%{width:58px;height:58px;opacity:0}}

.cinema.continuous-scene{
  background-color:#000;
  background-image:
    linear-gradient(90deg,rgba(0,0,0,.98) 0%,rgba(0,0,0,.74) 33%,rgba(0,0,0,.12) 64%,rgba(0,0,0,.8) 100%),
    radial-gradient(ellipse at var(--scene-focus,62%) 35%,rgba(94,83,91,.34),transparent 24%),
    linear-gradient(105deg,#020203 0 34%,#111015 34% 35%,#060608 35% 57%,#17131a 57% 58%,#030304 58% 100%);
  background-position:var(--scene-pan,0) center;
  transition:background-position .65s cubic-bezier(.2,.75,.2,1),filter .4s ease;
}
.cinema.continuous-scene::before{
  position:absolute;inset:0;content:"";opacity:.62;
  background:
    linear-gradient(115deg,transparent 0 36%,rgba(255,255,255,.035) 36% 36.2%,transparent 36.2% 66%,rgba(255,255,255,.03) 66% 66.2%,transparent 66.2%),
    linear-gradient(180deg,transparent 0 67%,rgba(255,255,255,.025) 67% 67.4%,transparent 67.4%);
  pointer-events:none;
}
.cinema.continuous-scene[data-story-step="1"]{--scene-focus:70%;--scene-pan:-2%}
.cinema.continuous-scene[data-story-step="2"]{--scene-focus:64%;--scene-pan:-1%}
.cinema.continuous-scene[data-story-step="3"]{--scene-focus:59%;--scene-pan:1%}
.cinema.continuous-scene[data-story-step="4"]{--scene-focus:55%;--scene-pan:2%}
.cinema.continuous-scene[data-story-step="5"]{--scene-focus:52%;--scene-pan:3%}

.reduced-motion .screen.active,.reduced-motion .continue-caret{animation:none}
.reduced-motion .cinema.continuous-scene,.reduced-motion .video-progress i,.reduced-motion .boundary-option>i{transition:none}
.reduced-motion .scene-transition>span,.reduced-motion .scene-transition>strong,.reduced-motion .scene-transition>em,.reduced-motion .scene-transition>small{animation:none}
.reduced-motion .immersive-moment__pulse::before,.reduced-motion .immersive-moment__pulse::after,.reduced-motion .immersive-moment__pulse i{animation:none}

@media(max-width:900px),(max-height:500px){
  #contractScreen{padding:7px 18px}
  #contractScreen .contract-sheet{padding:8px 14px}
  #contractScreen .contract-title{padding:3px 0}
  #contractScreen .contract-title h1{font-size:18px}
  #contractScreen .contract-sheet blockquote{top:29px;right:14px;padding:5px 8px;font-size:9px}
  .relationship-route{height:116px}
  #contractScreen .boundary-option{width:19%;padding-left:31px}
  #contractScreen .boundary-option>i{width:25px;height:25px}
  #contractScreen .boundary-option strong{font-size:10px}
  .route-preview{min-height:42px;padding:5px 9px}.route-preview p{display:none}
  #contractScreen .contract-foot{padding-top:4px}
  .story-path{top:7px;width:128px}.story-path li{min-height:21px;font-size:8px}
}

@media(max-width:760px),(max-height:370px){
  #contractScreen .contract-head{padding-bottom:3px}
  #contractScreen .contract-title small,#contractScreen .contract-title p{display:none}
  #contractScreen .contract-title h1{font-size:16px}
  #contractScreen .contract-sheet blockquote{display:none}
  .contract-choice-head{margin:0!important}.contract-choice-head span{font-size:9px}
  .relationship-route{height:105px}
  #contractScreen .boundary-option{width:20%;min-height:48px;padding-left:27px}
  #contractScreen .boundary-option>i{width:22px;height:22px;font-size:8px}
  #contractScreen .boundary-option .option-copy>em{display:none}
  #contractScreen .boundary-option strong{font-size:9px}
  .route-preview{min-height:36px;padding:4px 8px}.route-preview small{font-size:7px}.route-preview strong{font-size:10px}
  #contractScreen .contract-foot>span{display:none}
  #contractScreen .contract-foot .primary-button{min-height:44px}
  .story-path{top:5px;width:110px}.story-path__label{margin-bottom:4px}.story-path li{min-height:18px}.story-path li span{display:none}
}

@media(prefers-reduced-motion:reduce){
  .cinema.continuous-scene,.video-progress i,.relationship-route *{transition:none!important}
  .immersive-moment__pulse::before,.immersive-moment__pulse::after,.immersive-moment__pulse i{animation:none!important}
}

/* V1.130: confirmed heartbeat flow cleanup. */
.topbar{
  padding-right:max(24px,calc(env(safe-area-inset-right) + 10px));
  padding-left:max(24px,calc(env(safe-area-inset-left) + 10px));
}
.brand,.experience-hud{flex:0 0 auto}
.story-quick-actions{
  margin-right:max(10px,env(safe-area-inset-right));
  gap:8px;
  transform:translateY(10px);
}
.story-quick-actions button{
  width:48px;
  height:48px;
  grid-template-rows:20px 12px;
  color:rgba(255,255,255,.5);
  font-size:10px;
}
.story-quick-actions button i{width:20px;height:20px;display:grid;place-items:center}
.story-quick-actions button i svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.story-quick-actions button[aria-pressed="true"]{color:var(--gold)}

/* Episode selection: one readable sequence, one detail area, one action. */
#contractScreen{padding:24px max(32px,calc(env(safe-area-inset-right) + 18px)) 24px max(32px,calc(env(safe-area-inset-left) + 18px))}
#contractScreen .contract-sheet{
  width:min(1480px,100%);
  padding:24px 28px;
  display:grid;
  grid-template-rows:auto auto minmax(180px,1fr) auto auto;
  align-content:stretch;
  background:#000;
}
#contractScreen .contract-head{justify-content:flex-end;padding:0 0 12px}
#contractScreen .contract-head b{font-size:11px;letter-spacing:.12em}
#contractScreen .contract-title{padding:0 0 24px}
#contractScreen .contract-title h1{margin:0;font-size:26px;line-height:1.3;letter-spacing:.08em}
.relationship-route{
  height:auto;
  min-height:180px;
  margin:0;
  display:flex;
  align-items:center;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.relationship-route::before,.relationship-route__line{display:none}
#contractScreen .boundary-options{
  position:static;
  inset:auto;
  width:100%;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  align-items:stretch;
}
#contractScreen .boundary-option,
#contractScreen .boundary-option:nth-child(n){
  position:relative;
  left:auto;
  top:auto;
  width:auto;
  min-height:132px;
  padding:28px 22px 22px;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr);
  align-content:center;
  align-items:center;
  gap:16px;
  transform:none;
  overflow:visible;
  border:0;
  border-right:1px solid var(--line);
  background:transparent;
}
#contractScreen .boundary-option:last-child{border-right:0}
#contractScreen .boundary-option::after{
  position:absolute;
  left:20px;
  right:20px;
  bottom:-1px;
  height:2px;
  content:"";
  background:transparent;
}
#contractScreen .boundary-option>i{
  position:static;
  width:38px;
  height:38px;
  margin:0;
  transform:none;
  font-size:11px;
}
#contractScreen .boundary-option>i::after{inset:-5px}
#contractScreen .boundary-option .option-copy>em{margin-bottom:6px;font-size:9px;letter-spacing:.08em}
#contractScreen .boundary-option strong{font-size:15px;line-height:1.45;letter-spacing:.04em}
#contractScreen .boundary-option:hover,
#contractScreen .boundary-option:focus-visible{background:rgba(255,255,255,.025)}
#contractScreen .boundary-option.selected{background:rgba(243,199,215,.055)}
#contractScreen .boundary-option.selected::after{background:var(--gold)}
.route-preview{
  min-height:76px;
  margin-top:18px;
  padding:14px 18px;
  display:grid;
  grid-template-columns:190px minmax(180px,.7fr) 1fr;
  align-items:center;
  gap:24px;
  border-left:2px solid var(--gold);
  background:rgba(255,255,255,.025);
}
.route-preview small{font-size:9px;letter-spacing:.08em}
.route-preview strong{margin:0;font-size:16px}
.route-preview p{margin:0;font-size:11px;line-height:1.6}
#contractScreen .contract-foot{padding-top:18px}
#contractScreen .contract-foot>span{font-size:11px}
#contractScreen .contract-foot .primary-button{min-width:210px}

/* Chapter cards are passive transitions: the full screen remains the skip target. */
.chapter-screen{row-gap:12px}
.chapter-screen>span{font-size:9px;letter-spacing:7px}
.chapter-screen h1{margin:0;font-size:26px;font-weight:700;line-height:1.35;letter-spacing:8px}
.chapter-screen p{margin:0;font-size:11px;line-height:1.8;letter-spacing:3px}

/* Frameless ADV: local rules intentionally win over the shared compatibility sheet. */
.experience-screen .adv-wrap{
  left:max(48px,15vw)!important;
  right:auto!important;
  bottom:max(56px,calc(env(safe-area-inset-bottom) + 24px))!important;
  width:min(620px,58vw)!important;
  padding:0!important;
}
.experience-screen .adv-box{
  min-height:176px!important;
  padding:24px 0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.experience-screen .adv-box:focus-visible{outline:0}
.experience-screen .speaker-tab{margin:0 0 16px!important;font-size:20px!important}
.experience-screen .adv-wrap.narration .speaker-tab{visibility:hidden!important}
.experience-screen .dialogue,
.experience-screen .adv-wrap.narration .dialogue,
.experience-screen .adv-wrap.system .dialogue{
  font-size:25px!important;
  line-height:1.75!important;
  font-style:normal!important;
}
.experience-screen .continue-caret{
  position:static!important;
  display:inline-block!important;
  margin-left:12px!important;
  border:0!important;
  color:#fff!important;
  font-size:12px!important;
  transform:rotate(-90deg)!important;
}

/* Choices expose only the decision itself. Hidden downstream effects remain in data. */
.choice-panel{
  width:min(760px,calc(100vw - 64px));
  top:max(80px,calc(env(safe-area-inset-top) + 66px));
  bottom:max(32px,calc(env(safe-area-inset-bottom) + 20px));
  padding:0;
}
.choice-head{margin:0 0 16px}
.choice-head span{color:var(--soft);font-size:14px;letter-spacing:.08em}
.choice-list{gap:10px}
.story-choice{
  min-height:68px;
  padding:12px 52px 12px 18px;
  gap:16px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:6px;
  background:rgba(8,8,12,.9);
}
.story-choice>i{width:28px;height:28px;flex-basis:28px;font-size:11px}
.story-choice strong{font-size:16px;line-height:1.5;letter-spacing:.04em}
.story-choice-arrow{right:20px!important;font-size:20px}

/* Result actions use the standard secondary + single solid primary hierarchy. */
.result-heading{align-items:center}
.result-actions{align-items:center;gap:12px}
.result-actions .secondary-button,
.result-actions .primary-button{height:48px;min-height:48px;border-radius:6px;font-size:14px}
.result-actions .secondary-button{min-width:160px;background:transparent}
.result-actions .primary-button{
  min-width:220px;
  border-color:#e7c877;
  background:#e7c877;
  color:#15120b;
  box-shadow:none;
}
.result-actions .primary-button:hover{background:#f1d58e}
.result-actions .primary-button i{color:inherit}
.result-actions .primary-button:disabled{border-color:rgba(231,200,119,.38);background:rgba(231,200,119,.24);color:rgba(255,255,255,.5)}

@media(max-width:1000px),(max-height:560px){
  .topbar{padding-right:max(14px,env(safe-area-inset-right));padding-left:max(14px,env(safe-area-inset-left))}
  .story-quick-actions{gap:4px}
  .story-quick-actions button{width:44px;height:44px}
  #contractScreen{padding:8px max(18px,env(safe-area-inset-right)) 8px max(18px,env(safe-area-inset-left))}
  #contractScreen .contract-sheet{padding:8px 14px;grid-template-rows:auto auto minmax(112px,1fr) auto auto}
  #contractScreen .contract-head{padding-bottom:4px}
  #contractScreen .contract-head b{font-size:10px}
  #contractScreen .contract-title{padding:0 0 7px}
  #contractScreen .contract-title h1{font-size:18px}
  .relationship-route{min-height:112px}
  #contractScreen .boundary-option,
  #contractScreen .boundary-option:nth-child(n){min-height:94px;padding:12px 10px;grid-template-columns:28px minmax(0,1fr);gap:9px}
  #contractScreen .boundary-option>i{width:28px;height:28px;font-size:9px}
  #contractScreen .boundary-option .option-copy>em{font-size:8px;margin-bottom:3px}
  #contractScreen .boundary-option strong{font-size:12px}
  .route-preview{min-height:48px;margin-top:7px;padding:7px 10px;grid-template-columns:130px 170px 1fr;gap:12px}
  .route-preview strong{font-size:13px}.route-preview p{font-size:10px}
  #contractScreen .contract-foot{padding-top:6px}
  #contractScreen .contract-foot .primary-button{min-width:170px}
  .experience-screen .adv-wrap{left:max(24px,calc(env(safe-area-inset-left) + 14px))!important;bottom:max(28px,calc(env(safe-area-inset-bottom) + 18px))!important;width:min(72vw,560px)!important}
  .experience-screen .adv-box{min-height:126px!important;padding:16px 0!important}
  .experience-screen .speaker-tab{margin-bottom:12px!important;font-size:16px!important}
  .experience-screen .dialogue,.experience-screen .adv-wrap.narration .dialogue,.experience-screen .adv-wrap.system .dialogue{font-size:18px!important;line-height:1.65!important}
  .choice-panel{top:max(58px,calc(env(safe-area-inset-top) + 52px));bottom:max(16px,calc(env(safe-area-inset-bottom) + 10px));width:min(620px,84vw)}
  .choice-head{margin-bottom:8px}.choice-head span{font-size:12px}
  .choice-list{gap:7px}.story-choice{min-height:54px;padding:8px 44px 8px 14px}.story-choice strong{font-size:13px}
  .result-actions .secondary-button,.result-actions .primary-button{height:44px;min-height:44px;font-size:13px}
  .result-actions .primary-button{min-width:180px}
  .result-ledger{justify-content:flex-start!important;padding-top:7px!important;padding-bottom:7px!important}
  .result-heading{padding-bottom:6px!important}
  .result-grid{margin-top:5px!important}
  .result-grid article{min-height:70px!important;padding:6px 9px!important}
  .result-grid article.highlight{min-height:58px!important}
  .result-actions{margin-top:5px!important}
}

@media(max-width:760px),(max-height:370px){
  #contractScreen .contract-sheet{grid-template-rows:auto auto minmax(94px,1fr) auto auto}
  #contractScreen .contract-title{padding-bottom:4px}
  #contractScreen .contract-title h1{font-size:16px}
  .relationship-route{min-height:94px}
  #contractScreen .boundary-option,
  #contractScreen .boundary-option:nth-child(n){min-height:82px;padding:8px 7px;grid-template-columns:24px minmax(0,1fr);gap:6px}
  #contractScreen .boundary-option>i{width:24px;height:24px;font-size:8px}
  #contractScreen .boundary-option .option-copy>em{display:block;font-size:7px}
  #contractScreen .boundary-option strong{font-size:10px}
  .route-preview{min-height:42px;margin-top:5px;padding:5px 8px;grid-template-columns:105px 150px 1fr;gap:8px}
  .route-preview small{font-size:8px}.route-preview strong{font-size:11px}.route-preview p{display:block;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #contractScreen .contract-foot{padding-top:4px}
  #contractScreen .contract-foot .primary-button{min-height:44px}
  .experience-screen .adv-wrap{bottom:max(18px,calc(env(safe-area-inset-bottom) + 12px))!important}
  .experience-screen .adv-box{min-height:108px!important;padding:12px 0!important}
  .experience-screen .speaker-tab{margin-bottom:8px!important;font-size:16px!important}
  .experience-screen .dialogue,.experience-screen .adv-wrap.narration .dialogue,.experience-screen .adv-wrap.system .dialogue{font-size:18px!important;line-height:1.55!important}
  .choice-panel{width:min(560px,84vw)}
  .story-choice{min-height:50px}.story-choice strong{font-size:12px}
  .result-heading h2{font-size:14px!important}
  .result-grid article>strong{margin-top:3px!important}
  .result-grid article>p,.trace-summary span{font-size:10px!important;line-height:1.35!important}
}

/* V1.135: annotation pass — distinct archive states and canonical frameless ADV. */
.experience-hud{display:none!important}

#contractScreen .contract-sheet{
  grid-template-rows:auto minmax(180px,1fr) auto auto;
}
#contractScreen .contract-title{padding-top:0}
.relationship-route{
  border-top:0!important;
  border-bottom:0!important;
}
#contractScreen .boundary-option>i::after,
#contractScreen .boundary-option.completed>i::before{
  content:none!important;
  display:none!important;
}
#contractScreen .boundary-option::after{display:none!important}
#contractScreen .boundary-option.selected{
  background:rgba(243,199,215,.055)!important;
  box-shadow:inset 0 0 0 2px var(--gold)!important;
}
#contractScreen .boundary-option.completed:not(.selected)>i{
  border-color:var(--line)!important;
  color:var(--faint)!important;
}
#contractScreen .episode-status{
  position:absolute!important;
  top:10px!important;
  right:10px!important;
  width:auto!important;
  height:auto!important;
  padding:3px 6px!important;
  display:block!important;
  border:1px solid rgba(94,234,212,.5)!important;
  border-radius:4px!important;
  color:var(--mint)!important;
  background:rgba(94,234,212,.045)!important;
  font:500 9px/1.2 "Noto Serif SC","Songti SC",serif!important;
  white-space:nowrap;
}
#contractScreen .contract-foot{justify-content:flex-end}

.experience-screen .adv-wrap.wq-dialogue-fixed-layout{
  left:clamp(82px,22vw,430px)!important;
  right:clamp(74px,13vw,270px)!important;
  bottom:max(56px,calc(env(safe-area-inset-bottom,0px) + 24px))!important;
  width:auto!important;
  max-width:none!important;
  padding:0!important;
}
.experience-screen .adv-wrap.wq-dialogue-readability::before{
  display:block!important;
  position:absolute!important;
  z-index:-1!important;
  left:var(--readability-left,0px)!important;
  right:auto!important;
  top:auto!important;
  bottom:calc(-1 * var(--readability-bottom,56px))!important;
  width:var(--readability-width,100%)!important;
  height:max(144px,calc(var(--readability-height,220px) - 32px))!important;
  border-radius:0!important;
  background:linear-gradient(180deg,transparent 0,rgba(0,0,0,.08) 28%,rgba(0,0,0,.42) 72%,rgba(0,0,0,var(--readability-alpha,.56)) 100%)!important;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 72px,#000 100%)!important;
  mask-image:linear-gradient(180deg,transparent 0,#000 72px,#000 100%)!important;
  pointer-events:none!important;
}
.experience-screen .adv-box{
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.experience-screen .speaker-tab.wq-dialogue-fixed-speaker{
  margin:0 0 12px!important;
  font-size:18px!important;
  line-height:21.6px!important;
}
.experience-screen .speaker-tab.wq-dialogue-fixed-speaker:not([data-wq-empty="true"]){
  visibility:visible!important;
  opacity:1!important;
}
.experience-screen .dialogue.wq-dialogue-fixed-text,
.experience-screen .adv-wrap.narration .dialogue.wq-dialogue-fixed-text,
.experience-screen .adv-wrap.system .dialogue.wq-dialogue-fixed-text{
  display:block!important;
  font-size:20px!important;
  line-height:38px!important;
  font-style:normal!important;
}
.experience-screen .continue-caret{display:none!important;width:0!important;height:0!important;margin:0!important}
.result-heading{padding-bottom:0!important;border-bottom:0!important}

@media(max-width:1000px),(max-height:560px){
  #contractScreen .contract-sheet{grid-template-rows:auto minmax(112px,1fr) auto auto}
  #contractScreen .episode-status{top:6px!important;right:6px!important;padding:2px 4px!important;font-size:8px!important}
  .experience-screen .adv-wrap.wq-dialogue-fixed-layout{
    left:max(64px,calc(env(safe-area-inset-left,0px) + 36px),16vw)!important;
    right:max(24px,calc(env(safe-area-inset-right,0px) + 14px),4vw)!important;
    bottom:max(56px,calc(env(safe-area-inset-bottom,0px) + 24px))!important;
    width:auto!important;
  }
  .experience-screen .speaker-tab.wq-dialogue-fixed-speaker{
    margin-bottom:8px!important;
    font-size:14px!important;
    line-height:16.8px!important;
  }
  .experience-screen .dialogue.wq-dialogue-fixed-text,
  .experience-screen .adv-wrap.narration .dialogue.wq-dialogue-fixed-text,
  .experience-screen .adv-wrap.system .dialogue.wq-dialogue-fixed-text{
    font-size:16px!important;
    line-height:28px!important;
  }
}

@media(max-width:760px),(max-height:370px){
  #contractScreen .contract-sheet{grid-template-rows:auto minmax(94px,1fr) auto auto}
}
