/* source:styles.css */
:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#eee;background:#101217;line-height:1.65}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top,#202634,#101217 55%);min-height:100vh}#app{max-width:1050px;margin:auto;padding:20px}.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 4px 20px;position:sticky;top:0;background:#101217ee;backdrop-filter:blur(8px);z-index:10}.topbar>div{display:flex;align-items:center;gap:10px}.topbar strong{letter-spacing:.14em}.topbar span{font-size:.78em;border:1px solid #555;padding:2px 7px;border-radius:99px}.topbar small{color:#94a0b3}.panel{background:#191d25;border:1px solid #303744;border-radius:14px;padding:22px;margin:14px 0;box-shadow:0 8px 30px #0003}.compact{margin:0;padding:16px;min-height:135px}.account-strip{min-height:auto;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px}.account-strip #account-summary{display:flex;flex-direction:column}.account-strip small{color:#9aa4b4}.account-actions{display:flex;gap:8px;flex-shrink:0}.premium-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;border-color:#465068}.premium-panel h2{margin:.1em 0}.premium-panel>div:first-child{flex:1}.premium-actions{flex-shrink:0}.maintenance-panel{border-color:#7a6547;background:#221f19}.usage-row{display:flex;justify-content:space-between;gap:12px;font-size:.86em;color:#b8c1cf;margin-top:12px}.usage-track{height:8px;background:#0f1218;border-radius:999px;overflow:hidden;margin-top:5px}.usage-track>div{height:100%;width:0;background:linear-gradient(90deg,#68758e,#a9b5ca);border-radius:inherit;transition:width .25s ease}.dashboard{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:0 0 14px}.eyebrow{font-size:.78em;color:#aeb8c8;letter-spacing:.12em;text-transform:uppercase;margin:0 0 8px}.stakes{display:flex;gap:8px;flex-wrap:wrap}.stakes span{padding:5px 9px;border-radius:8px;background:#252b36}.hand{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.hand button,button{cursor:pointer;border:1px solid #485264;background:#252b36;color:#fff;border-radius:10px;padding:12px 14px;font:inherit}.hand button{text-align:left}.hand button:hover,button:hover{background:#303847}button:disabled{cursor:not-allowed;opacity:.55}.danger-button{border-color:#704848;background:#342326}.danger-button:hover{background:#472a2e}.secret{display:flex;gap:10px}.secret select,textarea,input[type="search"]{width:100%;background:#11141a;color:#eee;border:1px solid #414957;border-radius:9px;padding:10px;font:inherit}.secret select{max-width:360px}.hidden{display:none!important}.muted{color:#9aa4b4}.speaker{font-weight:700;margin-bottom:8px}textarea{margin:16px 0;resize:vertical}#submit,#next{background:#343c4b;width:100%}.quiet{padding:5px 9px;font-size:.78em;background:transparent;border-color:#3b424f}.metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.metric,.relation,.contract{background:#222832;border-radius:8px;padding:7px 9px;margin:5px 0}.metric b{float:right}.relation{display:flex;justify-content:space-between;gap:8px}.relation small{color:#9aa4b4}.contract strong{display:block}.result-block{background:#222832;border-radius:9px;padding:12px;margin:8px 0}.result-block p{white-space:pre-line}.danger{color:#ffb3b3}.good{color:#bde9c5}h1{line-height:1.3}#dilemma-body{white-space:pre-line}.auth-page{min-height:100vh;display:grid;place-items:center}.auth-card{width:min(560px,100%);text-align:center}.auth-card button{width:100%;margin-top:12px}.button-link{display:inline-block;color:#eee;text-decoration:none;border:1px solid #485264;border-radius:10px;padding:12px 14px}.admin-page{max-width:1200px!important}.admin-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.admin-kpis .compact{display:flex;flex-direction:column;justify-content:center}.kpi{font-size:2.1rem;line-height:1.15}.admin-usage-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}.admin-usage-grid>div{background:#222832;border-radius:10px;padding:14px;display:flex;flex-direction:column}.admin-usage-grid strong{font-size:1.35rem}.admin-usage-grid .detail-date{font-size:.92rem}.admin-two-column,.admin-ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.admin-ops-grid>div{background:#222832;border-radius:10px;padding:16px}.toggle-row{display:flex;gap:8px;align-items:center}.toggle-row input{width:18px;height:18px}.admin-search{display:grid;grid-template-columns:1fr auto;gap:8px;margin:10px 0 14px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:10px;border-bottom:1px solid #303744;vertical-align:top}th{font-size:.78em;color:#aeb8c8;letter-spacing:.08em}td small,.admin-event small{display:block;color:#8f9aad}.event-list{display:grid;gap:8px}.admin-event{display:flex;justify-content:space-between;gap:14px;background:#222832;border-radius:9px;padding:10px 12px}.admin-event>div:last-child{text-align:right}.backup-list{display:grid;gap:6px;max-height:210px;overflow:auto;margin-top:10px}.backup-row{display:flex;justify-content:space-between;gap:10px;padding:7px 9px;background:#191d25;border-radius:8px}.backup-row small{color:#8f9aad}.user-detail{margin-top:16px;padding:16px;border:1px solid #3b4555;border-radius:10px;background:#141820}.detail-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.detail-head>div:last-child{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.dialogue-stack{display:grid;gap:8px}.dialogue-line{display:grid;grid-template-columns:minmax(150px,auto) 1fr;gap:12px;align-items:start;padding:9px 10px;background:#191d25;border-radius:8px}.dialogue-line strong{white-space:nowrap}.dialogue-line span{white-space:pre-line}.conversation-note{border:1px solid #465068;background:#1c2230}#sector-setup .hand button{min-height:92px}#gameplay-root.hidden{display:none!important}.settings-toggle{font-size:1rem;line-height:1;padding:7px 9px}.settings-drawer{position:fixed;top:76px;right:max(18px,calc((100vw - 1050px)/2));width:min(520px,calc(100vw - 28px));max-height:calc(100vh - 96px);overflow:auto;padding:16px;background:#11151ddd;border:1px solid #3c4657;border-radius:16px;box-shadow:0 24px 70px #0009;backdrop-filter:blur(14px);z-index:30}.settings-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:4px 4px 8px}.settings-head h2{margin:.1em 0}.settings-drawer .panel{margin:10px 0;box-shadow:none}.settings-drawer .account-strip{margin:10px 0}.sector-launch{position:relative;overflow:hidden;border-color:#5d8f96;background:linear-gradient(135deg,#182129,#151a21 62%);padding:34px 30px 30px;box-shadow:0 0 0 1px #65aab022,0 18px 60px #0006,0 0 60px #58c5cb12}.sector-launch:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 22% 12%,#73d5dd17,transparent 34%);pointer-events:none}.sector-launch .eyebrow{color:#9fd6da}.sector-launch h1{font-size:clamp(2rem,5vw,3.35rem);letter-spacing:.04em;margin:.05em 0 .75em}.sector-launch .hand{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.sector-launch .hand button{position:relative;min-height:112px;border-color:#4f6871;background:#1b242c}.sector-launch .hand button:hover{border-color:#80c9cf;background:#202d35;transform:translateY(-1px)}@media(max-width:900px){.admin-kpis,.admin-usage-grid{grid-template-columns:repeat(2,1fr)}.admin-two-column,.admin-ops-grid{grid-template-columns:1fr}}@media(max-width:760px){#app{padding:12px}.panel{padding:17px}.dashboard{grid-template-columns:1fr}.secret{flex-direction:column}.secret select{max-width:none}.topbar{align-items:flex-start}.topbar>div{flex-wrap:wrap}.account-strip,.premium-panel{align-items:flex-start;flex-direction:column}.account-actions,.premium-actions{width:100%}.account-actions button,.premium-actions button{width:100%;flex:1}.dialogue-line{grid-template-columns:1fr;gap:2px}.admin-kpis,.admin-usage-grid{grid-template-columns:1fr}.admin-event,.backup-row{flex-direction:column}.admin-event>div:last-child{text-align:left}.admin-search{grid-template-columns:1fr}.detail-head{flex-direction:column}.detail-head>div:last-child{width:100%;justify-content:flex-start}.settings-drawer{top:68px;right:10px;width:calc(100vw - 20px);max-height:calc(100vh - 80px)}.sector-launch{padding:26px 18px}.sector-launch .hand{grid-template-columns:1fr}}
.metric-help{position:relative;outline:none}
.metric-help::before,.metric-help::after{position:absolute;left:50%;pointer-events:none;opacity:0;transition:opacity .16s ease,transform .16s ease;z-index:45}
.metric-help::before{content:"";bottom:calc(100% + 2px);border:6px solid transparent;border-top-color:#d8e3ef;transform:translate(-50%,4px)}
.metric-help::after{content:attr(data-tooltip);bottom:calc(100% + 14px);width:min(270px,80vw);padding:9px 11px;border:1px solid #75879c;border-radius:8px;background:#e8eef5;color:#18202a;font-size:.78rem;font-weight:500;line-height:1.45;box-shadow:0 10px 28px #0008;transform:translate(-50%,4px);white-space:normal}
.metric-help:hover::before,.metric-help:hover::after,.metric-help:focus::before,.metric-help:focus::after{opacity:1;transform:translate(-50%,0)}
.metric-help:focus-visible{box-shadow:0 0 0 2px #78bdff}

/* CSP-safe Akasha-Kern prologue wordmark. Kept in an external stylesheet because production style-src blocks injected <style> elements. */
.prologue-intro-card .prologue-chapter-title.prologue-product-title{
  position:relative!important;isolation:isolate!important;display:inline-block!important;width:max-content!important;max-width:100%!important;margin:0 0 7px!important;color:rgba(244,249,249,.97)!important;font-size:clamp(1.72rem,4.2vw,3.08rem)!important;font-weight:620!important;line-height:1.18!important;letter-spacing:.095em!important;text-indent:0!important;text-shadow:0 0 20px rgba(112,228,238,.08)!important
}
.prologue-intro-card .prologue-chapter-title.prologue-product-title::before{content:attr(data-wordmark);position:absolute;inset:0;z-index:-1;color:rgba(87,205,220,.18);transform:translate(1.15px,-.6px);clip-path:polygon(0 67%,100% 67%,100% 78%,0 78%);pointer-events:none}
.prologue-intro-card .akasha-title-core{position:relative;display:inline-block;width:.68em;color:transparent!important;font-size:.88em;vertical-align:.02em}
.prologue-intro-card .akasha-title-core::before{content:"";position:absolute;left:50%;top:51%;width:.29em;height:.29em;border:1px solid rgba(183,244,247,.82);border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 15px rgba(121,232,240,.42),inset 0 0 8px rgba(121,232,240,.24)}
.prologue-intro-card .akasha-title-core::after{content:"";position:absolute;left:50%;top:51%;width:.065em;height:.065em;border-radius:50%;background:rgba(239,255,255,.98);transform:translate(-50%,-50%);box-shadow:0 0 10px rgba(157,244,250,.96)}
.prologue-intro-card .prologue-title-de{margin:0 0 24px!important;color:rgba(184,222,226,.68)!important;font-size:clamp(.70rem,1.18vw,.90rem)!important;font-weight:500!important;line-height:1.4!important;letter-spacing:.19em!important}
.prologue-intro-card .prologue-title-de::before{content:attr(data-brand-prefix)}
.prologue-intro-card .prologue-title-de::after{content:"";display:block;width:62%;height:1px;margin:11px auto 0;background:linear-gradient(90deg,transparent,rgba(117,221,228,.38),transparent)}
@media(max-width:520px){.prologue-intro-card .prologue-chapter-title.prologue-product-title{font-size:clamp(1.45rem,8vw,2.1rem)!important;letter-spacing:.065em!important}.prologue-intro-card .prologue-title-de{letter-spacing:.13em!important}}

/* Centered title-screen composition: quiet institutional SF rather than a plain text card. */
#prologue-intro .prologue-intro-card{
  width:min(760px,92vw)!important;
  padding:40px 46px 42px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  text-align:center!important;
}
#prologue-intro .prologue-intro-card .prologue-chapter-title.prologue-product-title{
  margin:0 auto 7px!important;
}
#prologue-intro .prologue-intro-card .prologue-title-de{
  margin:0 auto 0!important;
  text-align:center!important;
  color:rgba(181,220,224,.72)!important;
}
#prologue-intro .prologue-intro-card .prologue-title-de::after{
  width:min(390px,74%)!important;
  margin:12px auto 0!important;
  opacity:.85;
}
#prologue-intro .prologue-intro-card>p:not(.prologue-chapter-title):not(.prologue-title-de){
  max-width:34em!important;
  margin:27px auto 29px!important;
  color:rgba(238,245,246,.89)!important;
  font-size:clamp(1.02rem,2.25vw,1.42rem)!important;
  font-weight:420!important;
  line-height:1.82!important;
  letter-spacing:.065em!important;
  text-wrap:balance;
  text-shadow:0 0 24px rgba(126,215,221,.055)!important;
}
#prologue-intro-start{
  position:relative!important;
  min-width:220px!important;
  padding:12px 24px 12px 34px!important;
  border:1px solid rgba(145,219,225,.25)!important;
  border-radius:2px!important;
  background:linear-gradient(115deg,rgba(18,39,45,.58),rgba(7,17,22,.48))!important;
  color:rgba(240,248,248,.95)!important;
  font-size:.88rem!important;
  font-weight:620!important;
  line-height:1.5!important;
  letter-spacing:.14em!important;
  box-shadow:inset 0 0 0 1px rgba(213,242,244,.025),0 12px 34px rgba(0,0,0,.17),0 0 28px rgba(91,198,207,.035)!important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,color .18s ease!important;
}
#prologue-intro-start::before{
  content:"";
  position:absolute;
  left:18px;
  top:50%;
  width:5px;
  height:5px;
  border-radius:50%;
  background:rgba(190,244,247,.84);
  box-shadow:0 0 9px rgba(123,231,238,.52);
  transform:translateY(-50%);
}
#prologue-intro-start::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:5px;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(126,218,224,.24),transparent);
}
#prologue-intro-start:hover,#prologue-intro-start:focus-visible{
  border-color:rgba(169,236,240,.48)!important;
  background:linear-gradient(115deg,rgba(25,53,59,.68),rgba(8,20,25,.58))!important;
  color:#fff!important;
  box-shadow:inset 0 0 0 1px rgba(213,242,244,.04),0 14px 38px rgba(0,0,0,.20),0 0 34px rgba(91,198,207,.08)!important;
  outline:none!important;
}
@media(max-width:620px){
  #prologue-intro .prologue-intro-card{padding:29px 20px 31px!important}
  #prologue-intro .prologue-intro-card>p:not(.prologue-chapter-title):not(.prologue-title-de){margin:23px auto 25px!important;font-size:clamp(.96rem,4.6vw,1.16rem)!important;line-height:1.75!important;letter-spacing:.045em!important}
  #prologue-intro-start{width:min(250px,100%)!important;min-width:0!important}
}

/* source:communication-ui.css */
.communication-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.communication-mode {
  min-height: 44px;
  padding: 8px 10px;
  text-align: center;
}

.communication-mode strong {
  display: block;
}

.communication-mode[aria-pressed="true"] {
  border-color: #6ea8ff !important;
  outline: 2px solid #6ea8ff !important;
  outline-offset: 1px;
  background: linear-gradient(135deg, rgba(39, 96, 190, .82), rgba(20, 55, 116, .88)) !important;
  box-shadow: 0 0 26px rgba(62, 135, 255, .26), inset 0 1px rgba(255,255,255,.08) !important;
}

#communication-note,
#dialogue-text {
  display: none !important;
}

.communication-target {
  display: none;
}

.communication-entry {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}

#communication-panel #dialogue.hidden {
  display: grid !important;
}

.communication-entry textarea {
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  margin: 0;
  resize: vertical;
  box-sizing: border-box;
}

.communication-actions {
  display: flex;
  justify-content: flex-end;
}

.communication-actions button {
  min-width: 112px;
}

.target-picker {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #485264;
  border-radius: 14px;
  background: #191d25;
  color: #eee;
  box-shadow: 0 24px 70px #0009;
}

.target-picker::backdrop {
  background: #0009;
  backdrop-filter: blur(2px);
}

.target-picker-card {
  margin: 0;
  padding: 18px;
}

.target-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.target-picker-options {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.target-picker-options button {
  width: 100%;
  min-height: 54px;
  text-align: left;
}

#play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  gap: 10px;
  min-height: 0;
}

#scene-column,
#interaction-column {
  min-width: 0;
  min-height: 0;
}

#scene-column {
  display: flex;
}

#dilemma {
  width: 100%;
  margin: 0;
  overflow: auto;
}

#interaction-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#interaction-column > .panel {
  margin: 0;
}

.transcript-panel {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 14px;
}

.transcript-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transcript-head .eyebrow {
  margin-bottom: 4px;
}

.transcript-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.timeline-entry {
  display: grid;
  gap: 3px;
}

.timeline-meta {
  font-size: .72rem;
  color: #91a5ae;
}

.timeline-bubble {
  border: 1px solid rgba(152,207,213,.12);
  background: rgba(8,16,21,.52);
  padding: 8px 10px;
  line-height: 1.55;
}

.timeline-player {
  margin-left: 12%;
}

.timeline-player .timeline-bubble {
  background: rgba(33,64,75,.48);
  border-color: rgba(132,214,221,.24);
}

.timeline-result .timeline-bubble {
  border-color: rgba(111,168,255,.28);
  background: rgba(17,34,56,.42);
}

.timeline-secret .timeline-bubble {
  border-color: rgba(193,150,229,.28);
  background: rgba(43,26,57,.38);
}

.timeline-new .timeline-bubble {
  animation: akasha-response-pulse 1.3s ease-out 1;
}

@keyframes akasha-response-pulse {
  0% { box-shadow: 0 0 0 0 rgba(102,188,255,.45); }
  100% { box-shadow: 0 0 0 14px rgba(102,188,255,0); }
}

@media (min-width: 900px) and (min-height: 700px) {
  html, body {
    height: 100%;
  }

  body {
    overflow: hidden;
  }

  #app {
    max-width: 1240px;
    height: 100vh;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .topbar {
    flex: 0 0 auto;
    position: relative;
    top: auto;
    margin: 0 0 8px;
    padding: 8px 12px;
  }

  #gameplay-root {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
  }

  .dashboard {
    margin: 0;
    gap: 8px;
  }

  .dashboard .compact {
    min-height: 0;
    max-height: 118px;
    padding: 10px 12px;
    overflow: auto;
  }

  .dashboard .eyebrow {
    margin-bottom: 4px;
  }

  .dashboard .metric,
  .dashboard .relation,
  .dashboard .contract {
    padding: 4px 6px;
    margin: 3px 0;
  }

  #play-grid {
    min-height: 0;
    overflow: hidden;
  }

  #dilemma {
    height: 100%;
    padding: 16px 18px;
  }

  #dilemma h1 {
    margin: .2em 0 .55em;
    font-size: clamp(1.35rem, 2.1vw, 2rem);
  }

  #interaction-column {
    overflow: hidden;
  }

  .transcript-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  #communication-panel {
    flex: 0 0 auto;
    padding: 12px 14px;
  }

  #communication-panel > .eyebrow {
    margin-bottom: 2px;
  }

  #result:not(.hidden) {
    flex: 0 1 auto;
    max-height: 38%;
    overflow: auto;
    padding: 12px 14px;
  }
}

@media (max-width: 899px), (max-height: 699px) {
  #play-grid {
    grid-template-columns: 1fr;
  }

  .transcript-panel {
    max-height: 52vh;
  }
}

@media (max-width: 720px) {
  .communication-modes {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .communication-mode {
    min-height: 42px;
    padding: 7px 5px;
  }

  .communication-actions button {
    width: 100%;
  }

  .timeline-player {
    margin-left: 5%;
  }
}

/* source:visual-theme.css */
/* Akasha-Kern layered visual theme. */
:root {
  --akasha-cyan: #8ed6dc;
  --akasha-blue: rgba(78, 127, 210, .30);
  --akasha-violet: rgba(154, 105, 194, .27);
  --akasha-amber: rgba(205, 157, 84, .25);
  --akasha-teal: rgba(73, 176, 168, .26);
  --akasha-rose: rgba(184, 106, 142, .20);
  --akasha-line: rgba(203, 230, 232, .08);
}

html { min-height:100%; background:#05080b; }
body { position:relative; isolation:isolate; min-height:100vh; background:transparent; }
body::before {
  content:"";
  position:fixed;
  inset:-2.5vmax;
  z-index:0;
  pointer-events:none;
  background:url("./assets/akasha-kern-bg.webp?v=20260903-11") center center / cover no-repeat;
  filter:brightness(.58) saturate(.78) contrast(1.05);
  transform:scale(1.035);
}
body::after {
  content:"";
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    radial-gradient(circle at 16% 18%, rgba(73,176,168,.055), transparent 31%),
    radial-gradient(circle at 72% 24%, rgba(154,105,194,.045), transparent 29%),
    radial-gradient(circle at 84% 72%, rgba(205,157,84,.035), transparent 34%),
    linear-gradient(180deg,rgba(2,6,9,.08),rgba(2,6,9,.20));
}
#app { position:relative; z-index:2; max-width:1320px; }

.topbar,.panel,.settings-drawer,.target-picker {
  -webkit-backdrop-filter:blur(8px) saturate(.98);
  backdrop-filter:blur(8px) saturate(.98);
}
.topbar {
  margin-top:6px;
  padding:13px 15px;
  border:0;
  border-bottom:1px solid rgba(213,235,236,.08);
  border-radius:2px;
  background:linear-gradient(112deg,rgba(7,12,16,.48),rgba(15,26,31,.30) 52%,rgba(7,12,16,.38));
  box-shadow:0 12px 34px rgba(0,0,0,.16);
}
.panel {
  position:relative;
  overflow:hidden;
  border:1px solid rgba(203,230,232,.08);
  border-radius:2px;
  background:linear-gradient(128deg,rgba(12,21,26,.40),rgba(7,13,17,.34));
  box-shadow:0 18px 52px rgba(0,0,0,.18);
}
.panel::before {
  content:"";
  position:absolute;
  top:0;
  left:7%;
  width:42%;
  height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(173,229,233,.18),transparent);
}
.eyebrow { color:#acdce0; text-shadow:0 0 20px rgba(103,212,220,.07); }
.muted,.topbar small,.relation small { color:#aebbc1; }
.metric,.relation,.contract,.result-block {
  border:0;
  border-radius:2px;
  background:rgba(9,17,22,.27);
  box-shadow:inset 2px 0 0 rgba(160,210,214,.07);
}
button,.button-link,.communication-mode {
  border-color:rgba(151,214,220,.10);
  border-radius:2px;
  background:linear-gradient(130deg,rgba(26,45,51,.34),rgba(9,17,22,.31));
  box-shadow:none;
}
button:hover,.button-link:hover,.communication-mode:hover {
  border-color:rgba(188,224,227,.20);
  background:linear-gradient(130deg,rgba(32,57,64,.44),rgba(11,22,27,.40));
}
textarea,select,input[type="search"] {
  border-color:rgba(151,214,220,.12)!important;
  border-radius:2px!important;
  background:rgba(3,9,13,.50)!important;
  box-shadow:inset 0 0 26px rgba(0,0,0,.18);
}
textarea:focus,select:focus,input[type="search"]:focus { outline:1px solid rgba(145,226,232,.28); outline-offset:1px; }
.settings-drawer {
  border-color:rgba(160,222,228,.12);
  border-radius:3px;
  background:linear-gradient(135deg,rgba(7,13,17,.76),rgba(15,28,33,.66));
  box-shadow:0 26px 80px rgba(0,0,0,.42);
}
.target-picker { border-color:rgba(160,222,228,.14)!important; border-radius:3px!important; background:rgba(7,14,18,.82)!important; }
.target-picker::backdrop { background:rgba(0,5,8,.52); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.sector-launch {
  border-color:rgba(154,220,226,.13);
  background:linear-gradient(125deg,rgba(17,31,36,.43),rgba(6,12,16,.44) 58%,rgba(14,26,31,.34));
  box-shadow:0 18px 60px rgba(0,0,0,.27),0 0 70px rgba(79,197,205,.035);
}
.sector-launch .hand button { border-radius:2px; background:linear-gradient(137deg,rgba(23,42,48,.39),rgba(8,16,21,.42)); }
#submit,#next { background:linear-gradient(110deg,rgba(36,66,72,.46),rgba(12,24,29,.47)); }

/* Main play: an AI connection space with the story-event layer floating over it. */
#play-grid {
  grid-template-columns:minmax(380px,.86fr) minmax(430px,1.14fr);
  gap:14px;
}
#scene-column { position:relative; }
.connection-stage {
  position:relative;
  width:100%;
  min-height:100%;
  overflow:hidden;
  isolation:isolate;
}
#npc-presence {
  position:absolute;
  inset:5% 5% 0 0;
  z-index:0;
  pointer-events:none;
}
.scene-summary {
  position:relative;
  z-index:30;
  margin:0 10px 8px 0;
  padding:10px 14px 11px;
  background:linear-gradient(100deg,rgba(5,10,14,.42),rgba(7,15,19,.18) 72%,transparent);
  -webkit-backdrop-filter:blur(5px);
  backdrop-filter:blur(5px);
}
.scene-summary::before {
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:1px;
  background:linear-gradient(180deg,transparent,rgba(104,185,188,.35),rgba(154,105,194,.22),transparent);
}
.scene-summary .eyebrow { margin-bottom:2px; }
.scene-summary h2 { margin:0; font-size:clamp(1.02rem,1.7vw,1.35rem); line-height:1.35; font-weight:670; }
.scene-summary p:last-child {
  margin:3px 0 0;
  color:rgba(223,232,234,.76);
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
#story-cinematic:not(.hidden) {
  position:absolute;
  inset:4px 18px 12px 4px;
  width:auto;
  max-height:calc(100% - 14px);
  margin:0;
  padding:18px 19px 20px;
  overflow:auto;
  border:0!important;
  border-radius:2px;
  color:rgba(242,246,246,.94);
  -webkit-backdrop-filter:blur(7px) saturate(1.04);
  backdrop-filter:blur(7px) saturate(1.04);
  box-shadow:0 22px 70px rgba(0,0,0,.14),0 0 64px var(--layer-glow-soft,rgba(78,127,210,.035));
  transform:translate(var(--layer-x,0px),var(--layer-y,0px));
  transform-origin:48% 46%;
  transition:opacity .22s ease,transform .24s ease,filter .22s ease;
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  --layer-x:8px;
  --layer-y:-5px;
  --layer-glow:rgba(88,160,161,.16);
  --layer-glow-soft:rgba(132,104,175,.04);
  z-index:28;
  background:
    radial-gradient(circle at 13% 10%,rgba(73,176,168,.16),transparent 34%),
    radial-gradient(circle at 78% 78%,rgba(154,105,194,.11),transparent 39%),
    linear-gradient(132deg,rgba(13,22,27,.30),rgba(6,12,16,.18) 58%,rgba(14,20,24,.22));
}
#story-cinematic:not(.hidden)::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(226,240,240,.16),transparent 28%) top left / 38% 1px no-repeat,
    linear-gradient(180deg,rgba(226,240,240,.09),transparent 24%) top left / 1px 31% no-repeat,
    linear-gradient(270deg,rgba(226,240,240,.08),transparent 25%) bottom right / 31% 1px no-repeat;
  opacity:.52;
}
#story-cinematic.is-behind { filter:brightness(.82) saturate(.88) blur(.25px); opacity:.66; }
.layer-close {
  position:sticky;
  float:right;
  top:0;
  z-index:6;
  width:30px;
  min-width:30px;
  min-height:30px;
  padding:3px;
  border:0;
  background:rgba(5,10,14,.22);
  color:rgba(235,242,243,.62);
  box-shadow:none;
}
.layer-close:hover { background:rgba(12,21,27,.42); color:#fff; }
.layer-divider { margin-top:18px; padding-top:12px; position:relative; }
.layer-divider::before {
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:54%;
  height:1px;
  background:linear-gradient(90deg,rgba(198,225,226,.13),transparent);
}
#story-cinematic .scene-line {
  border:0;
  background:rgba(4,9,13,.20);
  box-shadow:inset 2px 0 0 rgba(220,238,239,.07);
}

/* Conversation identity: small, diffuse accents rather than neon blocks. */
.timeline-bubble,.dialogue-line { position:relative; }
.timeline-bubble::before,.dialogue-line::before {
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:1px;
  background:var(--speaker-color,rgba(202,224,226,.15));
  box-shadow:0 0 12px var(--speaker-glow,rgba(202,224,226,.04));
}
.speaker-aegis { --speaker-color:rgba(75,121,211,.60); --speaker-glow:rgba(75,121,211,.15); }
.speaker-logos { --speaker-color:rgba(159,103,202,.60); --speaker-glow:rgba(159,103,202,.14); }
.speaker-demeter { --speaker-color:rgba(203,163,80,.62); --speaker-glow:rgba(143,177,86,.12); }
.speaker-hermes { --speaker-color:rgba(74,190,179,.62); --speaker-glow:rgba(74,190,179,.14); }
.speaker-echo { --speaker-color:rgba(184,106,142,.55); --speaker-glow:rgba(184,106,142,.12); }
.speaker-kern { --speaker-color:rgba(215,228,230,.34); --speaker-glow:rgba(215,228,230,.06); }
.timeline-bubble { padding-left:13px; }
.timeline-secret .timeline-bubble {
  border-color:transparent;
  background:linear-gradient(110deg,rgba(57,31,67,.24),rgba(7,13,18,.29));
}
.timeline-result .timeline-bubble { border-color:transparent; background:rgba(8,15,20,.27); }
.timeline-player .timeline-bubble { border-color:transparent; background:rgba(24,47,54,.27); }
.communication-mode,.communication-mode[aria-pressed="true"] {
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:rgba(7,14,18,.25)!important;
}
.communication-mode[aria-pressed="true"] {
  background:linear-gradient(120deg,rgba(64,109,149,.24),rgba(125,85,147,.13),rgba(53,126,119,.17))!important;
  box-shadow:0 0 28px rgba(95,149,163,.045)!important;
}
#communication-panel textarea { background:rgba(3,8,12,.50)!important; border-color:rgba(214,235,236,.09)!important; }

/* Intro: background first, then connection/sector selection. */
.prologue-intro {
  position:fixed;
  inset:0;
  z-index:90;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(2,6,9,.18);
  -webkit-backdrop-filter:blur(1.5px);
  backdrop-filter:blur(1.5px);
}
.prologue-intro-card {
  width:min(700px,92vw);
  padding:34px 38px;
  background:
    radial-gradient(circle at 18% 10%,rgba(80,144,173,.13),transparent 38%),
    radial-gradient(circle at 76% 72%,rgba(147,104,178,.09),transparent 40%),
    rgba(6,12,16,.27);
  -webkit-backdrop-filter:blur(7px);
  backdrop-filter:blur(7px);
  box-shadow:0 24px 90px rgba(0,0,0,.20),0 0 80px rgba(88,156,177,.035);
}
.prologue-intro-card p { margin:0 0 24px; font-size:clamp(1.25rem,3vw,2rem); line-height:1.6; letter-spacing:.035em; }
.prologue-intro-card button { width:auto; min-width:150px; border:0; background:rgba(14,27,33,.42); }
body.prologue-intro-open #app>.topbar,
body.prologue-intro-open #sector-setup { visibility:hidden; }

/* Chapter changes briefly clear the ordinary play surface. */
.chapter-transition {
  position:fixed;
  inset:0;
  z-index:85;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(2,6,9,.23);
  -webkit-backdrop-filter:blur(2.5px);
  backdrop-filter:blur(2.5px);
}
.chapter-transition-card {
  width:min(720px,92vw);
  padding:28px 34px;
  background:linear-gradient(112deg,rgba(7,14,18,.25),rgba(12,19,24,.16));
  -webkit-backdrop-filter:blur(7px);
  backdrop-filter:blur(7px);
}
.chapter-transition-card .eyebrow { margin-bottom:4px; }
.chapter-transition-card h2 { margin:0 0 8px; font-size:clamp(1.7rem,4vw,3rem); font-weight:600; }
.chapter-transition-card p:last-child { margin:0; color:rgba(226,235,236,.72); }

/* ECHO is a residual disturbance, never a fifth portrait. */
body.echo-disturbance .connection-stage::after {
  content:"";
  position:absolute;
  z-index:8;
  inset:14% 9% 10% 5%;
  pointer-events:none;
  background:
    linear-gradient(101deg,transparent 20%,rgba(180,105,144,.055) 38%,transparent 58%),
    linear-gradient(78deg,transparent 34%,rgba(113,177,176,.045) 51%,transparent 69%);
  filter:blur(5px);
  animation:echo-residual 1.2s ease-out 1;
}
@keyframes echo-residual {
  0% { opacity:0; transform:translate(-7px,2px); }
  28% { opacity:1; }
  100% { opacity:0; transform:translate(8px,-1px); }
}

/* Tribunal and ending deliberately reduce ordinary UI. */
body[data-akasha-scene="tribunal"] #play-grid,
body[data-akasha-scene="ending"] #play-grid {
  grid-template-columns:1fr;
  width:min(980px,100%);
  margin-inline:auto;
}
body[data-akasha-scene="tribunal"] .scene-summary,
body[data-akasha-scene="ending"] .scene-summary { display:none!important; }
body[data-akasha-scene="tribunal"] .connection-stage,
body[data-akasha-scene="ending"] .connection-stage { min-height:0; overflow:visible; }
body[data-akasha-scene="tribunal"] #story-cinematic:not(.hidden),
body[data-akasha-scene="ending"] #story-cinematic:not(.hidden) {
  position:relative;
  inset:auto;
  transform:none;
  max-height:none;
  width:100%;
  margin:0 0 10px;
  background:linear-gradient(125deg,rgba(8,15,20,.38),rgba(7,12,17,.22));
}
body[data-akasha-scene="tribunal"] #interaction-column { width:100%; }
body[data-akasha-scene="ending"] #interaction-column { display:none; }
body[data-akasha-scene="ending"] .topbar #turn { opacity:.35; }

@media (min-width:900px) and (min-height:700px) {
  #scene-column { min-height:0; }
  .connection-stage { height:100%; min-height:0; }
}
@media (max-width:899px), (max-height:699px) {
  #play-grid { grid-template-columns:1fr; }
  #scene-column { min-height:48vh; }
  .connection-stage { min-height:48vh; }
  #story-cinematic:not(.hidden) { inset:3px 11px 10px 2px; max-height:calc(100% - 8px); }
  body[data-akasha-scene="tribunal"] #scene-column,
  body[data-akasha-scene="ending"] #scene-column,
  body[data-akasha-scene="tribunal"] .connection-stage,
  body[data-akasha-scene="ending"] .connection-stage { min-height:0; }
}
@media (max-width:760px) {
  body::before { background-position:center center; transform:scale(1.05); }
  .topbar { margin-top:2px; padding:11px 10px; }
}
@media (max-width:620px) {
  .scene-summary { margin-right:0; padding-inline:10px; }
  #story-cinematic:not(.hidden) { padding:15px 14px 17px; }
  .prologue-intro-card,.chapter-transition-card { padding:24px 20px; }
}

/* source:player-info-ui.css */
/* Persistent player information surface. */
:root {
  --npc-aegis: 91,131,215;
  --npc-logos: 156,104,202;
  --npc-demeter: 202,163,80;
  --npc-hermes: 72,188,178;
}

html,
body {
  background:#000!important;
}

.scene-summary {
  flex:0 0 auto;
  margin-bottom:8px!important;
}
.scene-summary .eyebrow {
  letter-spacing:.08em;
}
.scene-summary h2 {
  font-size:clamp(1.15rem,2vw,1.55rem)!important;
}

.connection-stage {
  position:relative;
}

.situation-panel,
.self-panel {
  z-index:32;
  margin:0 8px 8px 0;
  padding:14px 16px;
  background:linear-gradient(128deg,rgba(10,18,23,.52),rgba(6,12,16,.38));
  -webkit-backdrop-filter:blur(7px) saturate(.98);
  backdrop-filter:blur(7px) saturate(.98);
}

.situation-panel {
  min-height:0;
}
.situation-panel > .eyebrow,
.self-panel > .eyebrow {
  margin:0 0 5px;
}
.situation-panel h1 {
  margin:0 0 8px;
  font-size:clamp(1.18rem,2vw,1.6rem);
  line-height:1.35;
}
.situation-panel #dilemma-body {
  margin:0;
  line-height:1.7;
  white-space:pre-wrap;
}
.situation-panel #stakes {
  margin-top:10px;
}

.self-panel {
  flex:0 0 auto;
}
.self-panel #self-status > strong {
  display:inline-block;
  margin:0 0 7px;
}
.self-panel .metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
}
.self-panel .metric {
  min-width:0;
  padding:7px 8px;
}
.self-panel #self-status > .metric {
  margin-top:6px;
}

.npc-dock {
  position:relative;
  z-index:45;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin:0 8px 0 0;
}
.npc-tab,
#sector-choices button[data-npc],
#target-picker-options button[data-npc] {
  --npc-rgb: 202,224,226;
  position:relative;
  overflow:hidden;
  border:1px solid rgba(var(--npc-rgb),.22)!important;
  background:
    linear-gradient(120deg,rgba(var(--npc-rgb),.16),rgba(6,12,16,.38) 72%)!important;
  box-shadow:inset 2px 0 0 rgba(var(--npc-rgb),.58)!important;
}
.npc-tab::before,
#sector-choices button[data-npc]::before,
#target-picker-options button[data-npc]::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(circle at 15% 0,rgba(var(--npc-rgb),.13),transparent 55%);
}
.npc-tab[data-npc="aegis"],
#sector-choices button[data-npc="aegis"],
#target-picker-options button[data-npc="aegis"] { --npc-rgb:var(--npc-aegis); }
.npc-tab[data-npc="logos"],
#sector-choices button[data-npc="logos"],
#target-picker-options button[data-npc="logos"] { --npc-rgb:var(--npc-logos); }
.npc-tab[data-npc="demeter"],
#sector-choices button[data-npc="demeter"],
#target-picker-options button[data-npc="demeter"] { --npc-rgb:var(--npc-demeter); }
.npc-tab[data-npc="hermes"],
#sector-choices button[data-npc="hermes"],
#target-picker-options button[data-npc="hermes"] { --npc-rgb:var(--npc-hermes); }
.npc-tab {
  min-height:38px;
  padding:8px 10px;
  color:rgba(244,248,248,.92);
}
.npc-tab[aria-pressed="true"] {
  background:linear-gradient(120deg,rgba(var(--npc-rgb),.25),rgba(8,15,19,.48) 74%)!important;
  border-color:rgba(var(--npc-rgb),.42)!important;
}

#dialogue-name[data-npc] {
  --npc-rgb:202,224,226;
  display:inline-block;
  width:fit-content;
  margin-bottom:7px;
  padding:5px 9px;
  border-left:2px solid rgba(var(--npc-rgb),.62);
  background:linear-gradient(90deg,rgba(var(--npc-rgb),.15),transparent);
}
#dialogue-name[data-npc="aegis"] { --npc-rgb:var(--npc-aegis); }
#dialogue-name[data-npc="logos"] { --npc-rgb:var(--npc-logos); }
#dialogue-name[data-npc="demeter"] { --npc-rgb:var(--npc-demeter); }
#dialogue-name[data-npc="hermes"] { --npc-rgb:var(--npc-hermes); }

.npc-profile-layer {
  --npc-rgb:202,224,226;
  position:absolute;
  z-index:90;
  inset:56px 10px 48px 4px;
  min-height:0;
  overflow:auto;
  padding:18px 20px 22px;
  border-color:rgba(var(--npc-rgb),.24)!important;
  background:
    linear-gradient(102deg,rgba(4,9,13,.88) 0%,rgba(6,13,18,.78) 52%,rgba(6,13,18,.36) 76%,rgba(4,9,13,.18) 100%),
    radial-gradient(circle at 82% 24%,rgba(var(--npc-rgb),.18),transparent 42%)!important;
  box-shadow:0 28px 90px rgba(0,0,0,.44),inset 2px 0 0 rgba(var(--npc-rgb),.44)!important;
  -webkit-backdrop-filter:blur(9px) saturate(.94);
  backdrop-filter:blur(9px) saturate(.94);
}
.npc-profile-layer[data-npc="aegis"] { --npc-rgb:var(--npc-aegis); }
.npc-profile-layer[data-npc="logos"] { --npc-rgb:var(--npc-logos); }
.npc-profile-layer[data-npc="demeter"] { --npc-rgb:var(--npc-demeter); }
.npc-profile-layer[data-npc="hermes"] { --npc-rgb:var(--npc-hermes); }
.npc-profile-close {
  position:sticky;
  top:0;
  z-index:8;
  float:right;
  width:38px;
  min-width:38px;
  min-height:38px;
  margin:-6px -6px -32px 0;
  padding:4px;
  border-color:rgba(var(--npc-rgb),.18)!important;
  background:rgba(4,9,13,.60)!important;
}
.npc-profile-portrait {
  position:absolute;
  z-index:0;
  right:-7%;
  bottom:-11%;
  width:auto;
  height:116%;
  max-width:72%;
  object-fit:contain;
  object-position:right bottom;
  opacity:.48;
  filter:saturate(.88) brightness(.78);
  pointer-events:none;
  -webkit-mask-image:linear-gradient(to left,#000 0%,#000 56%,transparent 100%);
  mask-image:linear-gradient(to left,#000 0%,#000 56%,transparent 100%);
}
.npc-profile-content {
  position:relative;
  z-index:2;
  max-width:72%;
}
.npc-profile-content > h2 {
  margin:0 0 18px;
  font-size:clamp(1.55rem,3vw,2.2rem);
  letter-spacing:.04em;
}
.npc-profile-section {
  margin:0 0 16px;
  padding:10px 12px 12px;
  background:rgba(2,7,10,.36);
  box-shadow:inset 1px 0 0 rgba(var(--npc-rgb),.30);
}
.npc-profile-section .eyebrow {
  margin:0 0 5px;
}
.npc-profile-section p:last-child {
  margin:0;
  line-height:1.65;
}
.npc-profile-relation-state {
  display:flex;
  flex-wrap:wrap;
  gap:7px 12px;
  align-items:center;
}
.npc-profile-relation-state strong {
  font-size:1.06rem;
}
.npc-profile-contract-item {
  margin:0 0 7px;
  padding:7px 9px;
  background:rgba(4,10,13,.35);
}
.npc-profile-contract-item small {
  display:block;
  margin-top:4px;
  color:#aebbc1;
}
.npc-profile-contract-item:last-child { margin-bottom:0; }

/* Communication history uses compact identity marks instead of large portrait thumbnails. */
.timeline-bubble > strong::before {
  content:"◆";
  display:inline-grid;
  place-items:center;
  width:18px;
  height:18px;
  margin-right:7px;
  border-radius:50%;
  font-size:9px;
  line-height:1;
  color:rgba(245,249,249,.92);
  background:rgba(202,224,226,.13);
  box-shadow:0 0 12px rgba(202,224,226,.06);
  vertical-align:1px;
}
.speaker-aegis .timeline-bubble > strong::before { content:"◆"; background:rgba(var(--npc-aegis),.28); box-shadow:0 0 12px rgba(var(--npc-aegis),.12); }
.speaker-logos .timeline-bubble > strong::before { content:"◇"; background:rgba(var(--npc-logos),.28); box-shadow:0 0 12px rgba(var(--npc-logos),.12); }
.speaker-demeter .timeline-bubble > strong::before { content:"◉"; background:rgba(var(--npc-demeter),.26); box-shadow:0 0 12px rgba(var(--npc-demeter),.11); }
.speaker-hermes .timeline-bubble > strong::before { content:"↗"; background:rgba(var(--npc-hermes),.28); box-shadow:0 0 12px rgba(var(--npc-hermes),.12); }
.timeline-player .timeline-bubble > strong::before { content:"●"; background:rgba(220,231,232,.15); }

@media (min-width:900px) and (min-height:700px) {
  #connection-stage {
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto auto;
    align-content:stretch;
    gap:0;
  }
  .scene-summary { grid-row:1; }
  .situation-panel {
    grid-row:2;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr) auto;
    overflow:hidden!important;
  }
  .situation-panel > .eyebrow { grid-row:1; }
  .situation-panel > h1 { grid-row:2; }
  .situation-panel > #dilemma-body {
    grid-row:3;
    min-height:0;
    overflow:auto;
    padding-right:8px;
  }
  .situation-panel > #stakes { grid-row:4; }
  .self-panel { grid-row:3; }
  .npc-dock { grid-row:4; }
  #story-cinematic:not(.hidden) {
    pointer-events:auto;
  }
}

@media (max-width:899px) {
  .situation-panel,
  .self-panel,
  .npc-dock { margin-right:0; }
  .situation-panel #dilemma-body {
    max-height:48vh;
    overflow:auto;
  }
  .self-panel .metrics {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .npc-profile-layer {
    position:fixed;
    inset:58px 10px 12px;
    z-index:130;
  }
  .npc-profile-content { max-width:100%; }
  .npc-profile-portrait {
    opacity:.25;
    height:90%;
    max-width:92%;
  }
}

/* Prologue motion language: the KERN core breathes softly and irregularly; the connection control pulses on a steady cadence. */
.prologue-intro-card .akasha-title-core::before {
  animation:akasha-core-breathe-ring 9.4s cubic-bezier(.45,.05,.25,1) infinite;
}
.prologue-intro-card .akasha-title-core::after {
  animation:akasha-core-breathe-point 9.4s cubic-bezier(.45,.05,.25,1) infinite;
}
#prologue-intro-start {
  animation:akasha-connect-breathe 2.8s ease-in-out infinite;
}
#prologue-intro-start::before {
  animation:akasha-connect-core 2.8s ease-in-out infinite;
}
#prologue-intro-start::after {
  animation:akasha-connect-line 2.8s ease-in-out infinite;
  transform-origin:center;
}
@keyframes akasha-core-breathe-ring {
  0%,13%,31%,44%,72%,100% { opacity:.72; transform:translate(-50%,-50%) scale(.96); box-shadow:0 0 12px rgba(121,232,240,.28),inset 0 0 7px rgba(121,232,240,.18); }
  19% { opacity:.93; transform:translate(-50%,-50%) scale(1.045); box-shadow:0 0 18px rgba(121,232,240,.46),inset 0 0 9px rgba(121,232,240,.28); }
  52% { opacity:.82; transform:translate(-50%,-50%) scale(1.01); box-shadow:0 0 15px rgba(121,232,240,.35),inset 0 0 8px rgba(121,232,240,.23); }
  81% { opacity:.98; transform:translate(-50%,-50%) scale(1.065); box-shadow:0 0 20px rgba(121,232,240,.50),inset 0 0 10px rgba(121,232,240,.30); }
  87% { opacity:.78; transform:translate(-50%,-50%) scale(.99); box-shadow:0 0 13px rgba(121,232,240,.31),inset 0 0 7px rgba(121,232,240,.20); }
}
@keyframes akasha-core-breathe-point {
  0%,13%,31%,44%,72%,100% { opacity:.78; transform:translate(-50%,-50%) scale(.90); box-shadow:0 0 7px rgba(157,244,250,.68); }
  19% { opacity:1; transform:translate(-50%,-50%) scale(1.04); box-shadow:0 0 12px rgba(157,244,250,.98); }
  52% { opacity:.90; transform:translate(-50%,-50%) scale(.98); box-shadow:0 0 9px rgba(157,244,250,.80); }
  81% { opacity:1; transform:translate(-50%,-50%) scale(1.08); box-shadow:0 0 13px rgba(157,244,250,1); }
  87% { opacity:.84; transform:translate(-50%,-50%) scale(.94); box-shadow:0 0 8px rgba(157,244,250,.72); }
}
@keyframes akasha-connect-breathe {
  0%,100% { border-color:rgba(145,219,225,.23); box-shadow:inset 0 0 0 1px rgba(213,242,244,.025),0 12px 34px rgba(0,0,0,.17),0 0 24px rgba(91,198,207,.03); }
  50% { border-color:rgba(164,229,233,.36); box-shadow:inset 0 0 0 1px rgba(213,242,244,.04),0 12px 34px rgba(0,0,0,.17),0 0 34px rgba(91,198,207,.075); }
}
@keyframes akasha-connect-core {
  0%,100% { opacity:.55; transform:translateY(-50%) scale(.84); box-shadow:0 0 6px rgba(123,231,238,.34); }
  50% { opacity:1; transform:translateY(-50%) scale(1.08); box-shadow:0 0 12px rgba(123,231,238,.72); }
}
@keyframes akasha-connect-line {
  0%,100% { opacity:.25; transform:scaleX(.72); }
  50% { opacity:.88; transform:scaleX(1); }
}
#prologue-intro-start:hover,#prologue-intro-start:focus-visible {
  animation-play-state:paused;
}
#prologue-intro-start:hover::before,#prologue-intro-start:focus-visible::before,
#prologue-intro-start:hover::after,#prologue-intro-start:focus-visible::after {
  animation-play-state:paused;
}
@media (prefers-reduced-motion:reduce) {
  .prologue-intro-card .akasha-title-core::before,
  .prologue-intro-card .akasha-title-core::after,
  #prologue-intro-start,
  #prologue-intro-start::before,
  #prologue-intro-start::after {
    animation:none!important;
  }
}

/* source:ending-effects.css */
/* CSP-safe styles formerly embedded in index.html. */
body[data-akasha-scene="ending"] #story-cinematic .finale-meta{display:none!important}
body[data-akasha-scene="ending"] #interaction-column,
body[data-akasha-scene="ending"] #turn,
body[data-akasha-scene="ending"] #reset{display:none!important}
body[data-akasha-scene="ending"]{
  --ending-base-brightness:.50;--ending-base-saturation:.72;--ending-base-contrast:1.07;--ending-base-scale:1.045;--ending-base-x:0px;--ending-base-y:0px;
  --ending-overlay-opacity:.24;--ending-overlay-brightness:.48;--ending-overlay-saturation:.58;--ending-overlay-contrast:1.08;--ending-overlay-blur:0px;--ending-overlay-scale:1.04;--ending-overlay-x:0px;--ending-overlay-y:0px;--ending-overlay-blend:screen;--ending-wash:rgba(142,214,220,.05);
}
body[data-akasha-scene="ending"]::before{
  inset:-3vmax;background:url("./assets/akasha-kern-bg.webp?v=20260903-11") center center / cover no-repeat;
  filter:brightness(var(--ending-base-brightness)) saturate(var(--ending-base-saturation)) contrast(var(--ending-base-contrast));
  transform:translate(var(--ending-base-x),var(--ending-base-y)) scale(var(--ending-base-scale));animation:var(--ending-base-animation,none);
}
body[data-akasha-scene="ending"]::after{
  inset:-3vmax;background:radial-gradient(circle at 20% 18%,var(--ending-wash),transparent 34%),linear-gradient(180deg,rgba(2,6,9,.04),rgba(2,6,9,.18)),url("./assets/tribunal/akasha-kern-tribunal.webp?v=20260903-3") center center / cover no-repeat;
  opacity:var(--ending-overlay-opacity);filter:brightness(var(--ending-overlay-brightness)) saturate(var(--ending-overlay-saturation)) contrast(var(--ending-overlay-contrast)) blur(var(--ending-overlay-blur));
  mix-blend-mode:var(--ending-overlay-blend);transform:translate(var(--ending-overlay-x),var(--ending-overlay-y)) scale(var(--ending-overlay-scale));animation:var(--ending-overlay-animation,none);
}
body[data-akasha-scene="ending"][data-ending-theme="order"]{--ending-base-brightness:.57;--ending-base-saturation:.46;--ending-base-contrast:1.14;--ending-base-scale:1.035;--ending-overlay-opacity:.16;--ending-overlay-brightness:.66;--ending-overlay-saturation:.34;--ending-overlay-scale:1.035;--ending-wash:rgba(190,219,231,.07)}
body[data-akasha-scene="ending"][data-ending-theme="singularity"]{--ending-base-brightness:.48;--ending-base-saturation:.62;--ending-base-contrast:1.03;--ending-base-scale:1.07;--ending-overlay-opacity:.42;--ending-overlay-brightness:.54;--ending-overlay-saturation:.70;--ending-overlay-blur:.35px;--ending-overlay-scale:1.10;--ending-wash:rgba(169,112,204,.075);--ending-base-animation:ending-breathe 18s ease-in-out infinite alternate;--ending-overlay-animation:ending-converge 18s ease-in-out infinite alternate}
body[data-akasha-scene="ending"][data-ending-theme="covenant"]{--ending-base-brightness:.53;--ending-base-saturation:.68;--ending-base-contrast:1.05;--ending-overlay-opacity:.30;--ending-overlay-brightness:.55;--ending-overlay-saturation:.56;--ending-overlay-x:2px;--ending-overlay-y:-1px;--ending-wash:rgba(210,183,125,.065)}
body[data-akasha-scene="ending"][data-ending-theme="trickster"]{--ending-base-brightness:.49;--ending-base-saturation:.82;--ending-base-contrast:1.07;--ending-overlay-opacity:.34;--ending-overlay-brightness:.56;--ending-overlay-saturation:.86;--ending-overlay-x:8px;--ending-overlay-y:-5px;--ending-overlay-scale:1.055;--ending-wash:rgba(73,190,181,.075);--ending-overlay-animation:ending-phase-drift 9s ease-in-out infinite alternate}
body[data-akasha-scene="ending"][data-ending-theme="martyr"]{--ending-base-brightness:.36;--ending-base-saturation:.45;--ending-base-contrast:1.10;--ending-overlay-opacity:.14;--ending-overlay-brightness:.38;--ending-overlay-saturation:.34;--ending-overlay-scale:1.06;--ending-overlay-blend:soft-light;--ending-wash:rgba(146,91,111,.05)}
body[data-akasha-scene="ending"][data-ending-theme="equilibrium"]{--ending-base-brightness:.43;--ending-base-saturation:.28;--ending-base-contrast:1.03;--ending-base-scale:1.035;--ending-overlay-opacity:.10;--ending-overlay-brightness:.42;--ending-overlay-saturation:.20;--ending-overlay-scale:1.035;--ending-wash:rgba(133,151,162,.035)}
body[data-akasha-scene="ending"][data-ending-theme="collapse"]{--ending-base-brightness:.33;--ending-base-saturation:.38;--ending-base-contrast:1.13;--ending-base-scale:1.055;--ending-base-x:-6px;--ending-overlay-opacity:.26;--ending-overlay-brightness:.36;--ending-overlay-saturation:.32;--ending-overlay-contrast:1.16;--ending-overlay-blur:.65px;--ending-overlay-x:14px;--ending-overlay-y:-8px;--ending-overlay-scale:1.07;--ending-wash:rgba(118,86,74,.04);--ending-base-animation:ending-collapse-drift 15s ease-in-out infinite alternate;--ending-overlay-animation:ending-collapse-counter 15s ease-in-out infinite alternate}
body[data-akasha-scene="ending"][data-ending-theme="aegis"]{--ending-base-brightness:.50;--ending-base-saturation:.78;--ending-base-contrast:1.10;--ending-overlay-opacity:.28;--ending-overlay-brightness:.50;--ending-overlay-saturation:.66;--ending-overlay-x:2px;--ending-overlay-y:1px;--ending-overlay-scale:1.042;--ending-wash:rgba(73,114,214,.085)}
body[data-akasha-scene="ending"][data-ending-theme="logos"]{--ending-base-brightness:.48;--ending-base-saturation:.70;--ending-base-contrast:1.09;--ending-overlay-opacity:.31;--ending-overlay-brightness:.50;--ending-overlay-saturation:.72;--ending-overlay-x:1px;--ending-overlay-y:-1px;--ending-overlay-scale:1.04;--ending-wash:rgba(157,101,198,.09)}
body[data-akasha-scene="ending"][data-ending-theme="demeter"]{--ending-base-brightness:.52;--ending-base-saturation:.76;--ending-base-contrast:1.04;--ending-overlay-opacity:.24;--ending-overlay-brightness:.54;--ending-overlay-saturation:.72;--ending-overlay-scale:1.055;--ending-wash:rgba(205,157,84,.09);--ending-overlay-animation:ending-flow 16s ease-in-out infinite alternate}
body[data-akasha-scene="ending"][data-ending-theme="hermes"]{--ending-base-brightness:.58;--ending-base-saturation:.88;--ending-base-contrast:1.01;--ending-overlay-opacity:.38;--ending-overlay-brightness:.62;--ending-overlay-saturation:.86;--ending-overlay-x:5px;--ending-overlay-y:-2px;--ending-overlay-scale:1.06;--ending-wash:rgba(69,190,181,.095);--ending-overlay-animation:ending-phase-drift 12s ease-in-out infinite alternate}
body[data-akasha-scene="ending"][data-ending-theme="rewrite"]{--ending-base-brightness:.55;--ending-base-saturation:.52;--ending-base-contrast:1.05;--ending-base-scale:1.055;--ending-overlay-opacity:.50;--ending-overlay-brightness:.64;--ending-overlay-saturation:.46;--ending-overlay-contrast:1.02;--ending-overlay-scale:1.08;--ending-wash:rgba(197,220,222,.09);--ending-base-animation:ending-rewrite-base 20s ease-in-out infinite alternate;--ending-overlay-animation:ending-rewrite-overlay 20s ease-in-out infinite alternate}
@keyframes ending-breathe{from{transform:translate(var(--ending-base-x),var(--ending-base-y)) scale(1.055)}to{transform:translate(var(--ending-base-x),var(--ending-base-y)) scale(1.082)}}
@keyframes ending-converge{from{transform:translate(-5px,3px) scale(1.12);opacity:.30}to{transform:translate(4px,-2px) scale(1.075);opacity:.46}}
@keyframes ending-phase-drift{from{transform:translate(5px,-3px) scale(var(--ending-overlay-scale))}to{transform:translate(11px,3px) scale(calc(var(--ending-overlay-scale) + .008))}}
@keyframes ending-collapse-drift{from{transform:translate(-8px,2px) scale(1.05)}to{transform:translate(-2px,-3px) scale(1.066)}}
@keyframes ending-collapse-counter{from{transform:translate(15px,-9px) scale(1.08)}to{transform:translate(9px,-3px) scale(1.065)}}
@keyframes ending-flow{from{transform:translate(-3px,2px) scale(1.05);opacity:.19}to{transform:translate(4px,-2px) scale(1.06);opacity:.29}}
@keyframes ending-rewrite-base{from{transform:translate(-3px,2px) scale(1.05);filter:brightness(.50) saturate(.62) contrast(1.06)}to{transform:translate(3px,-2px) scale(1.065);filter:brightness(.59) saturate(.42) contrast(1.03)}}
@keyframes ending-rewrite-overlay{from{transform:translate(8px,-4px) scale(1.10);opacity:.28}to{transform:translate(-2px,2px) scale(1.065);opacity:.56}}
@media (prefers-reduced-motion:reduce){body[data-akasha-scene="ending"]::before,body[data-akasha-scene="ending"]::after{animation:none!important}}

@media (min-width:900px) and (min-height:700px) {
  #app #gameplay-root {flex:1 1 auto!important;display:block!important;height:auto!important;min-height:0!important;overflow:hidden!important}
  #app #gameplay-root #play-grid {height:100%!important;min-height:100%!important;max-height:100%!important;overflow:hidden!important}
  #app #scene-column,#app #interaction-column,#app .connection-stage {height:100%!important;min-height:0!important}
  #app #npc-presence {inset:0 -6% -8% -4%!important;align-items:flex-end!important;justify-content:center!important}
  #app #npc-presence .npc-portrait {height:124%!important;width:auto!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:center top!important;transform:translateY(19%)!important}
  #app #npc-presence .npc-portrait-logos {transform:translateY(19%) scale(.98)!important}
}

/* source:operator-link.css */
/* CSP-safe styles formerly injected by operator-link.js. */
@media (min-width:900px) {
  #gameplay-root { grid-template-rows:minmax(0,1fr)!important; min-height:0!important; }
  #play-grid { min-height:calc(100vh - 82px)!important; height:calc(100vh - 82px)!important; overflow:hidden!important; }
  #scene-column,#interaction-column,.connection-stage { min-height:0!important; height:100%!important; }
  #interaction-column { display:flex!important; flex-direction:column!important; overflow:hidden!important; }
  #transcript-panel { order:1; flex:1 1 auto!important; min-height:0!important; overflow:hidden!important; }
  #result { order:2; flex:0 1 auto!important; max-height:28%!important; overflow:auto!important; }
  #communication-panel { order:3; flex:0 0 auto!important; margin-top:auto!important; }
}
.layer-close { position:sticky!important; top:4px!important; left:calc(100% - 42px)!important; float:none!important; display:block!important; width:40px!important; min-width:40px!important; min-height:40px!important; margin:-6px 0 -34px auto!important; padding:5px!important; z-index:60!important; background:rgba(4,9,13,.48)!important; color:rgba(244,248,248,.9)!important; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
#result-body p { margin:4px 0; }
#npc-presence { display:flex; align-items:flex-end; justify-content:center; inset:3% 1% 0!important; overflow:hidden; }
#npc-presence .npc-portrait { display:block; height:min(96%,820px); width:auto; max-width:96%; object-fit:contain; object-position:center bottom; opacity:.60; filter:saturate(.92) brightness(.96); transform:translateY(4%); transform-origin:center bottom; transition:opacity .24s ease,filter .24s ease,transform .28s ease; -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 90%,transparent 100%); mask-image:linear-gradient(to bottom,#000 0%,#000 90%,transparent 100%); }
#npc-presence .npc-portrait-logos { transform:translateY(4%) scale(.98); }
.connection-stage.has-layers #npc-presence .npc-portrait { opacity:.36; filter:blur(.7px) saturate(.82) brightness(.90); }
body[data-akasha-scene="tribunal"] #npc-presence,body[data-akasha-scene="ending"] #npc-presence,body[data-akasha-scene="setup"] #npc-presence { opacity:0; }
@media (max-width:899px) {
  #npc-presence .npc-portrait { height:min(68vh,720px); max-width:92%; opacity:.50; }
  .connection-stage.has-layers #npc-presence .npc-portrait { opacity:.28; }
}

body.chapter-transition-open #app {
  filter:brightness(.58) saturate(.72);
  transition:filter .32s ease;
}
.chapter-transition {
  background:rgba(2,6,9,.72)!important;
  -webkit-backdrop-filter:blur(3px) saturate(.85);
  backdrop-filter:blur(3px) saturate(.85);
  overflow:hidden;
}
.chapter-transition::before,
.chapter-transition::after {
  content:"";
  position:absolute;
  inset:-8%;
  pointer-events:none;
}
.chapter-transition::before {
  background:linear-gradient(115deg,transparent 15%,rgba(142,214,220,.055) 38%,transparent 62%),linear-gradient(24deg,transparent 28%,rgba(142,214,220,.035) 50%,transparent 72%);
  opacity:.75;
  transform:translate3d(var(--chapter-plane-x,0),var(--chapter-plane-y,0),0) scale(var(--chapter-plane-scale,1));
  transition:transform 1.6s cubic-bezier(.2,.7,.2,1),opacity .8s ease;
}
.chapter-transition::after { background:radial-gradient(circle at 50% 48%,rgba(142,214,220,.055),transparent 38%); opacity:.9; }
.chapter-transition-card {
  position:relative;z-index:2;width:min(760px,90vw)!important;padding:24px!important;border:0!important;background:transparent!important;box-shadow:none!important;text-align:center;animation:akasha-chapter-in 2.25s cubic-bezier(.2,.65,.2,1) both;
}
.chapter-transition-card .eyebrow { margin:0 0 18px!important;color:rgba(184,222,226,.68)!important;font-size:clamp(.76rem,1.35vw,.94rem)!important;font-weight:500!important;letter-spacing:.38em;text-indent:.38em; }
.chapter-transition-card h2 { margin:0!important;color:rgba(244,249,249,.96)!important;font-size:clamp(2rem,6.6vw,4.7rem)!important;font-weight:520!important;line-height:1.16!important;letter-spacing:.11em;text-indent:.11em;text-shadow:0 0 34px rgba(117,210,217,.10); }
#chapter-transition-lead { display:none!important; }
.chapter-transition[data-chapter-act="1"] { --chapter-plane-x:0;--chapter-plane-y:0;--chapter-plane-scale:1; }
.chapter-transition[data-chapter-act="2"] { --chapter-plane-x:10px;--chapter-plane-y:-5px;--chapter-plane-scale:1.005; }
.chapter-transition[data-chapter-act="2"] .chapter-transition-card h2 { text-shadow:-7px 0 rgba(142,214,220,.055),7px 0 rgba(154,105,194,.04),0 0 34px rgba(117,210,217,.10); }
.chapter-transition[data-chapter-act="3"] { --chapter-plane-x:-7px;--chapter-plane-y:3px;--chapter-plane-scale:1.035; }
.chapter-transition[data-chapter-act="3"]::after { background:radial-gradient(circle at 50% 48%,rgba(142,214,220,.035),transparent 58%); }
.chapter-transition[data-chapter-act="4"]::before { opacity:.28;transform:none; }
.chapter-transition[data-chapter-act="4"]::after { opacity:.42; }
.chapter-transition[data-chapter-act="4"] .chapter-transition-card { animation-name:akasha-chapter-still; }
.prologue-intro-card .prologue-chapter-title { margin:0 0 22px;color:rgba(184,222,226,.68);font-size:clamp(.8rem,1.4vw,1rem);font-weight:500;letter-spacing:.34em;text-indent:.34em; }
@keyframes akasha-chapter-in { 0%{opacity:0;transform:translateY(7px) scale(.994);filter:blur(2px)}22%{opacity:1;filter:blur(0)}76%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:.94;transform:translateY(-1px) scale(1)} }
@keyframes akasha-chapter-still { 0%{opacity:0;filter:blur(1px)}24%,86%{opacity:1;filter:blur(0)}100%{opacity:.94} }
@media (prefers-reduced-motion:reduce) {
  .chapter-transition-card { animation:none!important; }
  .chapter-transition::before { transition:none!important; transform:none!important; }
  body.chapter-transition-open #app { transition:none!important; }
}

/* source:maintenance-ui.css */
/* CSP-safe styles formerly injected by maintenance-ui.js. */
.prologue-intro-card .prologue-chapter-title.prologue-product-title {
  position:relative!important;
  isolation:isolate!important;
  display:inline-block!important;
  width:max-content!important;
  max-width:100%!important;
  margin:0 0 7px!important;
  color:rgba(244,249,249,.97)!important;
  font-size:clamp(1.72rem,4.2vw,3.08rem)!important;
  font-weight:620!important;
  line-height:1.18!important;
  letter-spacing:.095em!important;
  text-indent:0!important;
  text-shadow:0 0 20px rgba(112,228,238,.10)!important;
  animation:akasha-title-wordmark-breathe 7.2s cubic-bezier(.45,.05,.25,1) infinite!important;
}
.prologue-intro-card .prologue-chapter-title.prologue-product-title::before {
  content:attr(data-wordmark);
  position:absolute;
  inset:0;
  z-index:-1;
  color:rgba(87,205,220,.18);
  transform:translate(1.15px,-.6px);
  clip-path:polygon(0 67%,100% 67%,100% 78%,0 78%);
  pointer-events:none;
}
@keyframes akasha-title-wordmark-breathe {
  0%,100% { text-shadow:0 0 18px rgba(112,228,238,.08),0 0 42px rgba(87,205,220,.025); filter:brightness(.97); }
  46% { text-shadow:0 0 28px rgba(128,235,242,.24),0 0 58px rgba(87,205,220,.085); filter:brightness(1.075); }
  68% { text-shadow:0 0 22px rgba(112,228,238,.13),0 0 48px rgba(87,205,220,.045); filter:brightness(1.015); }
}
.prologue-intro-card .akasha-title-core {
  position:relative;
  display:inline-block;
  width:.68em;
  color:transparent!important;
  font-size:.88em;
  vertical-align:.02em;
}
.prologue-intro-card .akasha-title-core::before {
  content:'';
  position:absolute;
  left:50%;
  top:51%;
  width:.29em;
  height:.29em;
  border:1px solid rgba(183,244,247,.82);
  border-radius:50%;
  transform:translate(-50%,-50%);
  box-shadow:0 0 15px rgba(121,232,240,.42),inset 0 0 8px rgba(121,232,240,.24);
}
.prologue-intro-card .akasha-title-core::after {
  content:'';
  position:absolute;
  left:50%;
  top:51%;
  width:.065em;
  height:.065em;
  border-radius:50%;
  background:rgba(239,255,255,.98);
  transform:translate(-50%,-50%);
  box-shadow:0 0 10px rgba(157,244,250,.96);
}
.prologue-intro-card .prologue-title-de {
  margin:0 0 24px!important;
  color:rgba(184,222,226,.68)!important;
  font-size:clamp(.70rem,1.18vw,.90rem)!important;
  font-weight:500!important;
  line-height:1.4!important;
  letter-spacing:.19em!important;
}
.prologue-intro-card .prologue-title-de::before { content:attr(data-brand-prefix); }
.prologue-intro-card .prologue-title-de::after {
  content:'';
  display:block;
  width:62%;
  height:1px;
  margin:11px auto 0;
  background:linear-gradient(90deg,transparent,rgba(117,221,228,.38),transparent);
}
@media (max-width:520px) {
  .prologue-intro-card .prologue-chapter-title.prologue-product-title {
    font-size:clamp(1.45rem,8vw,2.1rem)!important;
    letter-spacing:.065em!important;
  }
  .prologue-intro-card .prologue-title-de { letter-spacing:.13em!important; }
}
@media (prefers-reduced-motion:reduce) {
  .prologue-intro-card .prologue-chapter-title.prologue-product-title { animation:none!important; }
}

#app #npc-presence { overflow:hidden!important; }
#app #npc-presence .npc-portrait {
  display:block!important;width:100%!important;height:auto!important;max-width:100%!important;max-height:none!important;margin:0 auto!important;object-fit:contain!important;object-position:center top!important;transform:none!important;
}
#app #npc-presence .npc-portrait-logos { transform:none!important; }

@media (min-width:900px) and (min-height:700px) {
  /* Use exactly the same grid column as situation/status/NPC buttons. */
  #app #connection-stage #npc-presence {
    position:absolute!important;
    grid-row:2 / 5!important;
    grid-column:1!important;
    inset:0!important;
    width:auto!important;
    height:auto!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    margin:0!important;
  }
}

.self-profile-trigger {
  cursor:pointer;border-bottom:1px solid rgba(172,220,224,.22);outline:none;
}
.self-profile-trigger:hover,.self-profile-trigger:focus-visible {
  color:#f4f9f9;border-bottom-color:rgba(172,220,224,.58);text-shadow:0 0 16px rgba(111,202,210,.12);
}
#npc-profile[data-self-profile="true"] .npc-profile-self-only { display:block!important; }
.npc-profile-self-only { display:none; }
.player-personal-memo {
  width:100%;min-height:132px;resize:vertical;margin-top:3px;padding:10px 11px;color:rgba(240,246,246,.94);line-height:1.65;border:1px solid rgba(160,210,214,.12);background:rgba(2,7,10,.46);
}
.player-personal-memo:focus { outline:1px solid rgba(145,226,232,.28);outline-offset:1px; }
.player-personal-memo-note { display:block;margin-top:6px;color:rgba(180,198,200,.58);font-size:.72rem; }

/* source:player-surface-polish.css */
/* Final CSP-safe player surface polish. Loaded last among ordinary player styles. */
/* The title screen is a separate overlay outside #app. Do not render the already-loaded prologue/game UI behind it. */
body.prologue-intro-open #app { visibility:hidden!important;pointer-events:none!important; }

/* Connection/startup overlays must cover synchronously as soon as JS marks them visible. This prevents the AI selection surface from flashing for one frame before .is-active is applied on requestAnimationFrame. */
#akasha-launch-transition[aria-hidden="false"] { opacity:1!important;visibility:visible!important;pointer-events:auto!important;transition:none!important; }

/* A prepared prologue situation must stay visually blank until its typewriter pass actually begins. Re-renders may refill text while the boot overlay is still open, so mask prepared nodes until .akasha-type-target is applied. */
#dilemma-title[data-akasha-prepared-text]:not(.akasha-type-target),
#dilemma-body[data-akasha-prepared-text]:not(.akasha-type-target) { visibility:hidden!important; }
#dilemma-title[data-akasha-prepared-text].akasha-type-target,
#dilemma-body[data-akasha-prepared-text].akasha-type-target { visibility:visible!important; }

/* Native scrollbar rails are not part of the visual language. Wheel, touch and keyboard scrolling remain intact; one shared chevron nav follows the active scroll surface. */
.situation-more-indicator,#situation-scroll-guide { display:none!important; }
html,body,* { scrollbar-width:none!important;-ms-overflow-style:none!important; }
html,body { scrollbar-gutter:auto!important; }
html::-webkit-scrollbar,body::-webkit-scrollbar,*::-webkit-scrollbar { display:none!important;width:0!important;height:0!important;background:transparent!important; }

#akasha-scroll-nav.akasha-scroll-nav {
  position:fixed;
  z-index:640;
  display:flex;
  flex-direction:column;
  gap:4px;
  width:40px;
  padding:4px;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  border:1px solid rgba(184,220,223,.16);
  background:linear-gradient(180deg,rgba(4,11,15,.78),rgba(4,9,13,.58));
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  box-shadow:0 12px 34px rgba(0,0,0,.26),0 0 24px rgba(118,209,216,.04);
  transition:opacity .16s ease,visibility .16s ease,border-color .16s ease;
}
#akasha-scroll-nav.akasha-scroll-nav.is-visible { opacity:.86;visibility:visible;pointer-events:auto; }
#akasha-scroll-nav.akasha-scroll-nav:hover,#akasha-scroll-nav.akasha-scroll-nav:focus-within { opacity:1;border-color:rgba(191,229,232,.30); }
#akasha-scroll-nav button {
  position:relative;
  width:30px;
  height:30px;
  min-width:30px;
  min-height:30px;
  margin:0;
  padding:0;
  border:0;
  background:rgba(10,22,28,.34);
  box-shadow:none;
}
#akasha-scroll-nav button::before {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:8px;
  height:8px;
  border-right:1.5px solid rgba(215,236,238,.88);
  border-bottom:1.5px solid rgba(215,236,238,.88);
}
#akasha-scroll-nav button[data-scroll-dir="-1"]::before { transform:translate(-50%,-30%) rotate(225deg); }
#akasha-scroll-nav button[data-scroll-dir="1"]::before { transform:translate(-50%,-70%) rotate(45deg); }
#akasha-scroll-nav button:disabled { opacity:.18;pointer-events:none; }
#akasha-scroll-nav button:not(:disabled):hover,#akasha-scroll-nav button:not(:disabled):focus-visible { background:rgba(27,51,59,.52);outline:1px solid rgba(192,228,231,.24); }

#dilemma.situation-panel { display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;min-width:0!important; }
#dilemma.situation-panel > .eyebrow { grid-row:1!important; }
#dilemma.situation-panel > h1 { grid-row:2!important; }
#dilemma.situation-panel > #dilemma-body { grid-row:3!important;grid-column:1!important;min-width:0!important;padding-right:2px!important;scrollbar-gutter:auto!important; }
#dilemma.situation-panel > #stakes { grid-row:4!important; }

/* Situation, status and NPC tabs share one exact left-column width. */
#app #dilemma.situation-panel,
#app #self-panel,
#app #npc-dock {
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  justify-self:stretch!important;
  margin-right:0!important;
}
#app #dilemma.situation-panel { margin-bottom:8px!important; }
#app #self-panel { margin-bottom:8px!important; }
#app #npc-dock { min-height:40px!important;margin-bottom:0!important; }

/* Character artwork is environmental presence, not a sharp foreground illustration. */
#app #npc-presence .npc-portrait {
  opacity:.39!important;
  filter:blur(.55px) saturate(.74) brightness(.82)!important;
}
#app .connection-stage.has-layers #npc-presence .npc-portrait {
  opacity:.25!important;
  filter:blur(1px) saturate(.66) brightness(.74)!important;
}

/* Keep tooltip cards inside the status surface. */
@media (min-width:900px) {
  #self-panel .metrics .metric-help:first-child::after { left:0!important;right:auto!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:first-child::before { left:18px!important;right:auto!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:last-child::after { left:auto!important;right:0!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:last-child::before { left:auto!important;right:18px!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:first-child:hover::after,#self-panel .metrics .metric-help:first-child:focus::after,#self-panel .metrics .metric-help:first-child:hover::before,#self-panel .metrics .metric-help:first-child:focus::before,#self-panel .metrics .metric-help:last-child:hover::after,#self-panel .metrics .metric-help:last-child:focus::after,#self-panel .metrics .metric-help:last-child:hover::before,#self-panel .metrics .metric-help:last-child:focus::before { transform:translateY(0)!important; }
}
@media (max-width:899px) {
  #self-panel .metrics .metric-help:nth-child(odd)::after { left:0!important;right:auto!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:nth-child(even)::after { left:auto!important;right:0!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:nth-child(odd)::before { left:18px!important;right:auto!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:nth-child(even)::before { left:auto!important;right:18px!important;transform:translateY(4px)!important; }
  #self-panel .metrics .metric-help:hover::after,#self-panel .metrics .metric-help:focus::after,#self-panel .metrics .metric-help:hover::before,#self-panel .metrics .metric-help:focus::before { transform:translateY(0)!important; }
}

/* No character-information view needs horizontal scrolling. */
#npc-profile { overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:auto!important; }
#npc-profile,#npc-profile * { max-width:100%;box-sizing:border-box; }
#npc-profile .npc-profile-content,#npc-profile .npc-profile-section,#npc-profile .npc-profile-relation-state,#npc-profile .npc-profile-contract-item { min-width:0!important;overflow-wrap:anywhere;word-break:normal; }

/* Icon-only X controls are absent; existing hidden hooks remain available to JS. */
.npc-profile-close,.layer-close { display:none!important; }

/* Self profile keeps the selected AI artwork while personality and memo use the full width. */
#npc-profile[data-self-profile="true"] .npc-profile-content { position:relative!important;z-index:2!important;width:100%!important;max-width:none!important;min-width:0!important;padding-right:0!important; }
#npc-profile[data-self-profile="true"] .npc-profile-portrait {
  display:block!important;
  z-index:0!important;
  right:-3%!important;
  bottom:-10%!important;
  width:auto!important;
  height:124%!important;
  max-width:80%!important;
  object-fit:contain!important;
  object-position:right bottom!important;
  opacity:.29!important;
  filter:blur(.65px) saturate(.68) brightness(.72)!important;
  pointer-events:none!important;
  transform-origin:right bottom!important;
  -webkit-mask-image:linear-gradient(to left,#000 0%,#000 48%,rgba(0,0,0,.82) 64%,transparent 100%)!important;
  mask-image:linear-gradient(to left,#000 0%,#000 48%,rgba(0,0,0,.82) 64%,transparent 100%)!important;
}
/* Source images have different transparent margins; normalize their apparent size here. */
#npc-profile[data-self-profile="true"][data-npc="aegis"] .npc-profile-portrait { transform:scale(1.30)!important;right:-7%!important;bottom:-17%!important; }
#npc-profile[data-self-profile="true"][data-npc="logos"] .npc-profile-portrait { transform:scale(1.26)!important;right:-7%!important;bottom:-15%!important; }
#npc-profile[data-self-profile="true"][data-npc="demeter"] .npc-profile-portrait { transform:scale(1.24)!important;right:-6%!important;bottom:-14%!important; }
#npc-profile[data-self-profile="true"][data-npc="hermes"] .npc-profile-portrait { transform:scale(.86)!important;right:0!important;bottom:-4%!important; }
#npc-profile[data-self-profile="true"] .npc-profile-section,#npc-profile[data-self-profile="true"] #npc-profile-self-memo { width:100%!important;max-width:none!important;min-width:0!important;margin-left:0!important;margin-right:0!important;background:linear-gradient(90deg,rgba(2,7,10,.72) 0%,rgba(2,7,10,.58) 62%,rgba(2,7,10,.34) 100%)!important; }
#npc-profile[data-self-profile="true"] .player-personal-memo { width:100%!important;max-width:100%!important;min-width:0!important;resize:vertical!important;overflow-x:hidden!important;box-sizing:border-box!important;background:linear-gradient(90deg,rgba(2,7,10,.78),rgba(2,7,10,.56) 72%,rgba(2,7,10,.36))!important; }
@media (max-width:899px) {
  #npc-profile[data-self-profile="true"] .npc-profile-portrait { right:-8%!important;bottom:-6%!important;height:105%!important;max-width:94%!important;opacity:.24!important;filter:blur(.7px) saturate(.66) brightness(.70)!important; }
  #npc-profile[data-self-profile="true"][data-npc="aegis"] .npc-profile-portrait { transform:scale(1.18)!important; }
  #npc-profile[data-self-profile="true"][data-npc="logos"] .npc-profile-portrait { transform:scale(1.15)!important; }
  #npc-profile[data-self-profile="true"][data-npc="demeter"] .npc-profile-portrait { transform:scale(1.14)!important; }
  #npc-profile[data-self-profile="true"][data-npc="hermes"] .npc-profile-portrait { transform:scale(.86)!important;right:-1%!important; }
}
@media (prefers-reduced-motion:reduce) { #akasha-scroll-nav.akasha-scroll-nav { transition:none!important; } }

/* source:story-cinematic.css */
/* CSP-safe story event presentation. */
#story-cinematic{position:relative;overflow:hidden;border-color:#46546b;background:linear-gradient(180deg,#1b2230,#171b23)}
#story-cinematic::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 15% 0%,rgba(119,147,190,.13),transparent 42%);pointer-events:none}
.cinematic-head{position:relative;display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:14px}
.cinematic-head h2{margin:.1em 0 .25em}
.phase-chip{white-space:nowrap;border:1px solid #60708a;border-radius:999px;padding:5px 10px;font-size:.75em;color:#c4d1e5}
.phase-lead{position:relative;color:#b9c3d2;margin:0 0 16px}
.scene-feed{position:relative;display:grid;gap:9px}
.scene-line{position:relative;overflow:hidden;background:#111722;border:1px solid #303c4f;border-radius:11px;padding:11px 13px}
.scene-line.echo{border-color:#675f7a;background:#181622}
.scene-line.kern{border-color:#50606d;background:#12191d}
.scene-speaker{position:relative;z-index:2;font-weight:750;letter-spacing:.02em;margin-bottom:4px}
.scene-line p{position:relative;z-index:2;margin:0;white-space:pre-line}
.scene-question{position:relative;margin-top:14px;border-top:1px solid #334054;padding-top:13px;font-weight:650}
.scene-motif{font-size:1.08em;letter-spacing:.02em;margin:.2em 0 14px}
.finale-card{border-color:#726d85!important;background:linear-gradient(180deg,#201d2a,#171820)!important}
.finale-title{font-size:1.35rem;margin:.2em 0}
.finale-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.finale-meta span{background:#272634;border:1px solid #45435a;border-radius:999px;padding:5px 9px;font-size:.82em}

/* Canonical AI dialogue uses the same visual language as communication history:
   the original slim speaker-color accent on the left and character presence at the right,
   without a circular avatar crop. */
.scene-line.aegis,.scene-line.logos,.scene-line.demeter,.scene-line.hermes{min-height:92px;padding-right:118px}
.scene-line.aegis::before,.scene-line.logos::before,.scene-line.demeter::before,.scene-line.hermes::before{
  content:"";position:absolute;left:0;top:8px;bottom:8px;width:1px;z-index:3;pointer-events:none;
  background:var(--scene-speaker-color);box-shadow:0 0 12px var(--scene-speaker-glow);
}
.scene-line.aegis{--scene-speaker-color:rgba(75,121,211,.60);--scene-speaker-glow:rgba(75,121,211,.15)}
.scene-line.logos{--scene-speaker-color:rgba(159,103,202,.60);--scene-speaker-glow:rgba(159,103,202,.14)}
.scene-line.demeter{--scene-speaker-color:rgba(203,163,80,.62);--scene-speaker-glow:rgba(143,177,86,.12)}
.scene-line.hermes{--scene-speaker-color:rgba(74,190,179,.62);--scene-speaker-glow:rgba(74,190,179,.14)}
.scene-line.aegis::after,.scene-line.logos::after,.scene-line.demeter::after,.scene-line.hermes::after{
  content:"";position:absolute;z-index:1;top:-8px;right:-8px;bottom:-8px;width:122px;pointer-events:none;opacity:.68;
  background-repeat:no-repeat;background-size:auto 118%;background-position:right 8% top 10%;filter:saturate(.86) brightness(.92);
  -webkit-mask-image:linear-gradient(to left,#000 0 56%,rgba(0,0,0,.86) 70%,transparent 100%);
  mask-image:linear-gradient(to left,#000 0 56%,rgba(0,0,0,.86) 70%,transparent 100%);
}
.scene-line.aegis::after{background-image:url('/assets/npc/aegis.webp?v=20260903-13')}
.scene-line.logos::after{background-image:url('/assets/npc/logos.webp?v=20260903-13')}
.scene-line.demeter::after{background-image:url('/assets/npc/demeter.png?v=20260903-16')}
.scene-line.hermes::after{background-image:url('/assets/npc/hermes.png?v=20260903-16')}

@media(max-width:700px){
  .cinematic-head{flex-direction:column}.phase-chip{white-space:normal}
  .scene-line.aegis,.scene-line.logos,.scene-line.demeter,.scene-line.hermes{min-height:76px;padding-right:88px}
  .scene-line.aegis::after,.scene-line.logos::after,.scene-line.demeter::after,.scene-line.hermes::after{width:94px;right:-9px}
}

/* source:interaction-polish.css */
/* Final-trial spatial readability and dialogue-stack motion. */
body[data-akasha-scene="tribunal"]::before{
  filter:brightness(.62) saturate(.76) contrast(1.04)!important;
}
body[data-akasha-scene="tribunal"]::after{
  background:radial-gradient(circle at 34% 38%,rgba(200,222,224,.045),transparent 31%),radial-gradient(circle at 77% 62%,rgba(120,171,176,.035),transparent 35%),linear-gradient(180deg,rgba(2,6,9,.08),rgba(2,6,9,.18))!important;
}
body[data-akasha-scene="tribunal"] #play-grid{
  width:100%!important;
  max-width:1240px!important;
  gap:10px!important;
}
body[data-akasha-scene="tribunal"] #communication-panel{
  opacity:1!important;
  pointer-events:auto!important;
  margin-top:0!important;
  background:rgba(5,11,15,.52)!important;
}
body[data-akasha-scene="tribunal"] #transcript-panel{
  background:rgba(5,11,15,.44)!important;
}

.tribunal-separation{
  position:absolute;
  z-index:36;
  left:4%;
  top:3%;
  width:min(650px,82%);
  padding:12px 15px;
  border-left:1px solid rgba(188,224,227,.34);
  background:linear-gradient(90deg,rgba(5,12,16,.78),rgba(5,12,16,.28),transparent);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  pointer-events:none;
}
.tribunal-separation p{
  margin:0;
  color:rgba(229,238,239,.86);
  font-size:.82rem;
  line-height:1.65;
}
.tribunal-separation p+p{margin-top:4px}
.tribunal-separation strong{
  display:inline-block;
  min-width:5.2em;
  margin-right:.5em;
  color:rgba(190,225,228,.88);
  font-weight:600;
}

.tribunal-evidence-node{
  width:clamp(250px,28vw,380px)!important;
  min-height:132px!important;
  padding:18px 20px!important;
  opacity:var(--opacity)!important;
  filter:blur(var(--blur))!important;
  transition:width .26s ease,min-height .26s ease,left .26s ease,top .26s ease,opacity .2s ease,transform .26s ease,border-color .2s ease,background .2s ease,filter .2s ease!important;
}
.tribunal-slot-0{--x:25%;--y:31%;--scale:.98;--opacity:.88;--blur:0px}
.tribunal-slot-1{--x:66%;--y:28%;--scale:.94;--opacity:.80;--blur:0px}
.tribunal-slot-2{--x:45%;--y:45%;--scale:1.02;--opacity:.96;--blur:0px}
.tribunal-slot-3{--x:73%;--y:55%;--scale:.98;--opacity:.86;--blur:0px}
.tribunal-slot-4{--x:29%;--y:69%;--scale:1.01;--opacity:.92;--blur:0px}
.tribunal-slot-5{--x:58%;--y:73%;--scale:.96;--opacity:.84;--blur:0px}
.tribunal-evidence-node .evidence-kind{font-size:.74rem!important;color:rgba(194,225,227,.84)!important}
.tribunal-evidence-node strong{font-size:1rem!important;line-height:1.55!important;opacity:.9!important}
.tribunal-evidence-node small{font-size:.75rem!important;opacity:.7!important}
.tribunal-evidence-node:hover,
.tribunal-evidence-node:focus-visible{
  z-index:44!important;
  left:50%!important;
  top:54%!important;
  width:calc(100% - 36px)!important;
  min-height:calc(100% - 150px)!important;
  max-height:calc(100% - 110px)!important;
  opacity:1!important;
  filter:none!important;
  transform:translate(-50%,-50%) scale(1)!important;
  overflow:auto;
  border-color:rgba(205,232,233,.48)!important;
  background:linear-gradient(135deg,rgba(13,25,30,.91),rgba(5,11,15,.84))!important;
  box-shadow:0 28px 90px rgba(0,0,0,.42),0 0 48px rgba(141,201,205,.08)!important;
}
.tribunal-evidence-node.is-reviewed{opacity:.58!important}
body.tribunal-final-ready .tribunal-evidence-node{opacity:.32!important;filter:none!important}

.tribunal-evidence-focus{
  left:3%!important;
  right:3%!important;
  bottom:3%!important;
  max-height:46%!important;
}

/* Each AI reply is its own block. New blocks emerge at the bottom and push older ones upward. */
.timeline-result>.timeline-bubble{
  border:0!important;
  background:transparent!important;
  padding:0!important;
  box-shadow:none!important;
}
.timeline-result>.timeline-bubble>strong{
  display:none;
}
.timeline-result .dialogue-stack{
  display:flex;
  flex-direction:column;
  gap:7px;
}
.timeline-result .dialogue-line{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:9px;
  align-items:start;
  padding:9px 11px;
  border:1px solid rgba(152,207,213,.16);
  background:rgba(8,16,21,.62);
  box-shadow:0 7px 22px rgba(0,0,0,.12);
}
.timeline-result .dialogue-line>strong{
  min-width:4.6em;
  font-size:.78rem;
  letter-spacing:.03em;
  color:rgba(190,220,223,.76);
}
.timeline-result .dialogue-line>span{
  min-width:0;
  line-height:1.62;
}
.timeline-new .dialogue-line{
  opacity:0;
  transform:translateY(18px);
  animation:akasha-dialogue-stack-in .32s cubic-bezier(.2,.72,.25,1) forwards;
}
.timeline-new .dialogue-line:nth-child(2){animation-delay:.13s}
.timeline-new .dialogue-line:nth-child(3){animation-delay:.26s}
.timeline-new .dialogue-line:nth-child(4){animation-delay:.39s}
.timeline-new .dialogue-line:nth-child(5){animation-delay:.52s}
.timeline-new .dialogue-line:nth-child(6){animation-delay:.65s}
@keyframes akasha-dialogue-stack-in{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:translateY(0)}
}

/* Tribunal chapter entry: dialogue first, evidence review second. */
#settings-drawer.settings-drawer{
  z-index:520!important;
  isolation:isolate;
}
#settings-drawer.settings-drawer:not(.hidden){
  pointer-events:auto!important;
}

body[data-akasha-scene="tribunal"] .tribunal-separation{
  display:none!important;
}
.tribunal-chapter-heading{
  position:absolute;
  z-index:58;
  left:4%;
  top:3%;
  width:min(560px,82%);
  pointer-events:none;
}
.tribunal-chapter-heading .eyebrow{
  margin:0 0 4px;
  color:rgba(187,218,221,.62);
  letter-spacing:.16em;
}
.tribunal-chapter-heading h1{
  margin:0;
  color:rgba(241,246,246,.95);
  font-size:clamp(1.65rem,3.2vw,2.8rem);
  font-weight:540;
  line-height:1.15;
  letter-spacing:.04em;
  text-shadow:0 0 28px rgba(133,207,213,.09);
}

body.tribunal-prelude-active #tribunal-evidence-stage .tribunal-evidence-node,
body.tribunal-prelude-active #tribunal-evidence-stage .tribunal-evidence-focus,
body.tribunal-prelude-active #tribunal-evidence-stage .tribunal-echo{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
body[data-akasha-scene="tribunal"].tribunal-prelude-active #interaction-column{
  display:none!important;
}
body[data-akasha-scene="tribunal"].tribunal-prelude-active #play-grid{
  grid-template-columns:1fr!important;
  width:min(1020px,100%)!important;
  max-width:1020px!important;
}
body[data-akasha-scene="tribunal"].tribunal-prelude-active #scene-column{
  width:100%!important;
  height:calc(100vh - 82px)!important;
}
body[data-akasha-scene="tribunal"].tribunal-prelude-active #connection-stage{
  min-height:clamp(620px,78vh,900px)!important;
}
.tribunal-prelude{
  position:absolute;
  z-index:57;
  left:4%;
  right:4%;
  top:13%;
  bottom:4%;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  max-width:900px;
  padding:28px 8px 10px 0;
  overflow:auto;
}
.tribunal-prelude-dialogue{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:min(820px,100%);
}
.tribunal-prelude-dialogue .dialogue-line{
  display:grid;
  grid-template-columns:minmax(5.3em,auto) minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:10px 12px;
  border:1px solid rgba(158,206,211,.14);
  background:linear-gradient(90deg,rgba(6,14,18,.74),rgba(6,14,18,.34));
  box-shadow:0 10px 30px rgba(0,0,0,.16);
  opacity:0;
  transform:translateY(12px);
  animation:tribunal-prelude-line-in .38s cubic-bezier(.2,.72,.25,1) forwards;
}
.tribunal-prelude-dialogue .dialogue-line:nth-child(2){animation-delay:.14s}
.tribunal-prelude-dialogue .dialogue-line:nth-child(3){animation-delay:.28s}
.tribunal-prelude-dialogue .dialogue-line:nth-child(4){animation-delay:.42s}
.tribunal-prelude-dialogue .dialogue-line:nth-child(5){animation-delay:.56s}
.tribunal-prelude-dialogue .dialogue-line:nth-child(6){animation-delay:.70s}
.tribunal-prelude-dialogue .dialogue-line:nth-child(7){animation-delay:.84s}
.tribunal-prelude-dialogue .dialogue-line>strong{
  color:rgba(189,220,223,.78);
  font-size:.82rem;
  font-weight:600;
  letter-spacing:.03em;
}
.tribunal-prelude-dialogue .dialogue-line>span{
  color:rgba(235,242,243,.91);
  line-height:1.62;
}
.tribunal-prelude-actions{
  display:flex;
  justify-content:flex-start;
  margin-top:16px;
  padding-bottom:8px;
}
#tribunal-begin-review{
  min-width:210px;
  padding:12px 22px;
  border-color:rgba(157,217,222,.34);
  background:linear-gradient(120deg,rgba(26,47,54,.66),rgba(8,18,23,.62));
  box-shadow:0 12px 36px rgba(0,0,0,.20),0 0 28px rgba(105,194,201,.05);
}
#tribunal-begin-review:hover,
#tribunal-begin-review:focus-visible{
  border-color:rgba(181,231,235,.56);
  background:linear-gradient(120deg,rgba(34,60,68,.74),rgba(10,22,28,.70));
}
@keyframes tribunal-prelude-line-in{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}

.tribunal-evidence-preview{
  display:grid;
  gap:12px;
  max-height:0;
  margin-top:0;
  overflow:hidden;
  opacity:0;
  text-align:left;
  transition:max-height .24s ease,opacity .18s ease,margin-top .24s ease;
}
.tribunal-evidence-preview-detail,
.tribunal-evidence-preview-question{
  display:block;
  color:rgba(235,242,243,.92);
  font-size:.94rem;
  line-height:1.78;
  white-space:pre-line;
}
.tribunal-evidence-preview-question{
  padding-top:12px;
  border-top:1px solid rgba(189,222,225,.13);
  color:rgba(205,229,231,.90);
}
.tribunal-evidence-node:hover .tribunal-evidence-preview,
.tribunal-evidence-node:focus-visible .tribunal-evidence-preview{
  max-height:56vh;
  margin-top:18px;
  opacity:1;
}
.tribunal-evidence-node:hover>small,
.tribunal-evidence-node:focus-visible>small{
  opacity:.45!important;
}

@media (min-width:900px) and (min-height:700px){
  body[data-akasha-scene="tribunal"] #play-grid{
    grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr)!important;
  }
  body[data-akasha-scene="tribunal"].tribunal-prelude-active #play-grid{
    grid-template-columns:1fr!important;
  }
}
@media (max-width:899px){
  .tribunal-separation{left:3%;top:2%;width:90%;padding:9px 11px}
  .tribunal-separation p{font-size:.76rem}
  .tribunal-evidence-node{width:min(64vw,280px)!important;min-height:108px!important}
  .tribunal-evidence-node:hover,.tribunal-evidence-node:focus-visible{
    width:calc(100% - 18px)!important;
    min-height:420px!important;
    max-height:520px!important;
    top:52%!important;
  }
  .timeline-result .dialogue-line{grid-template-columns:1fr;gap:4px}
  .tribunal-chapter-heading{left:4%;top:3%;width:88%}
  .tribunal-prelude{left:4%;right:4%;top:15%;bottom:4%;justify-content:flex-start;padding:36px 0 0;overflow:auto}
  .tribunal-prelude-dialogue .dialogue-line{grid-template-columns:1fr;gap:4px;padding:10px 11px}
  .tribunal-prelude-actions{padding-bottom:24px}
  #tribunal-begin-review{width:100%}
  body[data-akasha-scene="tribunal"].tribunal-prelude-active #scene-column{height:calc(100vh - 70px)!important;min-height:650px!important}
}
@media (prefers-reduced-motion:reduce){
  .timeline-new .dialogue-line{opacity:1;transform:none;animation:none!important}
  .tribunal-prelude-dialogue .dialogue-line{opacity:1;transform:none;animation:none!important}
}

/* Keep the tribunal introduction in the same visual slot as the ordinary chapter Situation panel. */
body[data-akasha-scene="tribunal"].tribunal-prelude-active #interaction-column{
  display:block!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
body[data-akasha-scene="tribunal"].tribunal-prelude-active #play-grid{
  width:100%!important;
  max-width:1240px!important;
}
.tribunal-chapter-heading{
  left:0!important;
  right:8px!important;
  top:0!important;
  width:auto!important;
}
.tribunal-chapter-heading .eyebrow{
  letter-spacing:.08em!important;
}
.tribunal-chapter-heading h1{
  font-size:clamp(1.15rem,2vw,1.55rem)!important;
  font-weight:600!important;
  letter-spacing:.02em!important;
}
.tribunal-prelude{
  left:0!important;
  right:8px!important;
  top:68px!important;
  bottom:8px!important;
  max-width:none!important;
  padding:14px 16px!important;
  border:1px solid rgba(152,207,213,.16);
  border-radius:14px;
  background:linear-gradient(128deg,rgba(10,18,23,.52),rgba(6,12,16,.38));
  -webkit-backdrop-filter:blur(7px) saturate(.98);
  backdrop-filter:blur(7px) saturate(.98);
  box-shadow:0 8px 30px rgba(0,0,0,.20);
}
.tribunal-prelude::before{
  content:"状況";
  display:block;
  flex:0 0 auto;
  margin:0 0 8px;
  color:rgba(174,184,200,.92);
  font-size:.78em;
  letter-spacing:.12em;
}
.tribunal-prelude-dialogue{
  width:100%!important;
}
@media (min-width:900px) and (min-height:700px){
  body[data-akasha-scene="tribunal"].tribunal-prelude-active #play-grid{
    grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr)!important;
  }
}
@media (max-width:899px){
  body[data-akasha-scene="tribunal"].tribunal-prelude-active #interaction-column{
    display:none!important;
  }
  .tribunal-chapter-heading{
    left:0!important;
    right:8px!important;
    top:0!important;
    width:auto!important;
  }
  .tribunal-prelude{
    left:0!important;
    right:8px!important;
    top:66px!important;
    bottom:4px!important;
    padding:14px 14px 18px!important;
  }
}

/* source:tribunal-evidence-ui.css */
/* CSP-safe tribunal and ending-stage presentation. */
body[data-akasha-scene="tribunal"]::before{inset:auto;left:50%;top:50%;width:max(100vw,177.7778vh);height:max(56.25vw,100vh);transform:translate(-50%,-50%) scale(1.035);background:url("./assets/tribunal/akasha-kern-tribunal.webp?v=20260903-3") center center / cover no-repeat;filter:brightness(.38) saturate(.52) contrast(1.08)}
body[data-akasha-scene="tribunal"]::after{background:radial-gradient(circle at 34% 38%,rgba(200,222,224,.035),transparent 30%),radial-gradient(circle at 77% 62%,rgba(120,171,176,.025),transparent 34%),linear-gradient(180deg,rgba(2,6,9,.18),rgba(2,6,9,.34))}
body[data-akasha-scene="tribunal"] #layer-dock,
body[data-akasha-scene="tribunal"] #layer-stack,
body[data-akasha-scene="tribunal"] #npc-presence,
body[data-akasha-scene="tribunal"] .scene-summary,
body[data-akasha-scene="tribunal"] #dilemma,
body[data-akasha-scene="tribunal"] #self-panel,
body[data-akasha-scene="tribunal"] #npc-dock,
body[data-akasha-scene="tribunal"] #npc-profile,
body[data-akasha-scene="tribunal"] #story-cinematic{display:none!important}
body[data-akasha-scene="tribunal"] #gameplay-root{overflow:hidden!important}
body[data-akasha-scene="tribunal"] #play-grid{width:min(1320px,100%)!important;max-width:1320px!important;margin:0 auto!important;gap:18px!important}
body[data-akasha-scene="tribunal"] #scene-column,
body[data-akasha-scene="tribunal"] #interaction-column{min-height:0!important}
body[data-akasha-scene="tribunal"] #connection-stage{position:relative!important;display:block!important;min-height:0!important;height:100%!important;overflow:hidden!important}
body[data-akasha-scene="tribunal"] #interaction-column{width:100%!important;min-width:0!important;overflow:hidden!important}
body[data-akasha-scene="tribunal"] #communication-panel>.eyebrow,
body[data-akasha-scene="tribunal"] #communication-panel .communication-modes,
body[data-akasha-scene="tribunal"] #communication-target{display:none!important}
body[data-akasha-scene="tribunal"] #communication-panel{flex:0 0 auto!important;margin-top:10px!important;background:rgba(5,11,15,.56)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
body[data-akasha-scene="tribunal"] #transcript-panel{background:rgba(5,11,15,.42)!important;-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
body[data-akasha-scene="tribunal"]:not(.tribunal-evidence-selected):not(.tribunal-final-ready) #communication-panel{opacity:.28;pointer-events:none}
body[data-akasha-scene="tribunal"] #communication-panel{transition:opacity .2s ease}

#tribunal-evidence-stage{position:absolute;inset:0;min-height:0;margin:0;overflow:hidden;isolation:isolate}
#tribunal-evidence-stage.hidden{display:none}
.tribunal-field-note{position:absolute;left:4%;top:4%;z-index:20;max-width:520px;padding:8px 10px;color:rgba(224,235,236,.72);font-size:.86rem;line-height:1.65;background:linear-gradient(90deg,rgba(4,10,14,.52),transparent);pointer-events:none}
.tribunal-evidence-node{position:absolute;left:var(--x);top:var(--y);width:clamp(150px,17vw,220px);min-height:74px;padding:12px 14px;text-align:left;border:1px solid rgba(206,230,231,.13);background:linear-gradient(135deg,rgba(17,29,34,.25),rgba(5,10,14,.14));color:rgba(232,241,242,.70);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);transform:translate(-50%,-50%) scale(var(--scale));opacity:var(--opacity);box-shadow:0 12px 34px rgba(0,0,0,.18),0 0 34px rgba(141,201,205,.035);transition:opacity .2s ease,transform .22s ease,border-color .2s ease,background .2s ease,filter .2s ease;filter:blur(var(--blur))}
.tribunal-slot-0{--x:18%;--y:27%;--scale:.94;--opacity:.74;--blur:.15px}
.tribunal-slot-1{--x:50%;--y:23%;--scale:.88;--opacity:.62;--blur:.3px}
.tribunal-slot-2{--x:25%;--y:58%;--scale:1.04;--opacity:.90;--blur:0px}
.tribunal-slot-3{--x:57%;--y:61%;--scale:.95;--opacity:.72;--blur:.1px}
.tribunal-slot-4{--x:18%;--y:82%;--scale:1.02;--opacity:.82;--blur:0px}
.tribunal-slot-5{--x:52%;--y:81%;--scale:.90;--opacity:.66;--blur:.2px}
.tribunal-evidence-node::before{content:"";position:absolute;inset:8px;border-top:1px solid rgba(211,232,233,.11);border-left:1px solid rgba(211,232,233,.06);pointer-events:none}
.tribunal-evidence-node .evidence-kind{display:block;font-size:.68rem;letter-spacing:.08em;color:rgba(180,218,221,.68)}
.tribunal-evidence-node strong{display:block;margin-top:6px;font-size:.86rem;font-weight:560;line-height:1.45;opacity:.66;transition:opacity .2s ease}
.tribunal-evidence-node small{display:block;margin-top:7px;font-size:.69rem;opacity:.50;transition:opacity .2s ease}
.tribunal-evidence-node:hover,.tribunal-evidence-node:focus-visible{z-index:30;opacity:1;filter:none;transform:translate(-50%,-50%) scale(calc(var(--scale) + .035));border-color:rgba(205,232,233,.34);background:linear-gradient(135deg,rgba(17,31,36,.52),rgba(6,12,16,.36));outline:none}
.tribunal-evidence-node:hover strong,.tribunal-evidence-node:focus-visible strong,.tribunal-evidence-node:hover small,.tribunal-evidence-node:focus-visible small{opacity:.95}
.tribunal-evidence-node.is-reviewed{border-color:rgba(168,207,184,.18);color:rgba(223,236,237,.50)}
.tribunal-evidence-node.is-reviewed .evidence-kind::after{content:" · 確認済み";color:rgba(168,207,184,.78)}
.tribunal-evidence-focus{position:absolute;z-index:45;left:5%;right:5%;bottom:4%;max-height:50%;overflow:auto;padding:18px 20px;border:1px solid rgba(203,230,232,.19);background:linear-gradient(125deg,rgba(8,15,19,.90),rgba(13,24,29,.76));-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 24px 70px rgba(0,0,0,.34)}
.tribunal-evidence-focus.hidden{display:none}
.tribunal-evidence-focus .focus-source{margin:0 0 8px;color:rgba(174,218,221,.80);font-size:.78rem;letter-spacing:.06em}
.tribunal-evidence-focus .focus-detail{margin:0 0 10px;color:rgba(240,245,245,.94);font-size:1rem;line-height:1.75}
.tribunal-evidence-focus .focus-question{margin:0;color:rgba(222,233,234,.86);line-height:1.75}
.tribunal-evidence-focus .focus-actions{display:flex;justify-content:flex-end;margin-top:14px}
.tribunal-echo{position:absolute;z-index:50;left:11%;right:11%;top:50%;transform:translateY(-50%);padding:28px 30px;border:1px solid rgba(190,132,166,.18);border-left:2px solid rgba(190,132,166,.42);background:linear-gradient(100deg,rgba(28,13,22,.78),rgba(7,12,16,.78));color:rgba(241,235,239,.93);font-size:clamp(1rem,1.5vw,1.18rem);line-height:1.9;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 24px 80px rgba(0,0,0,.36)}
.tribunal-echo strong{display:block;margin-bottom:10px;color:rgba(229,191,211,.88);font-size:.8rem;letter-spacing:.12em}
.tribunal-final-action{margin-top:18px}
body.tribunal-final-ready .tribunal-evidence-node{opacity:.20;filter:blur(.8px)}
body.tribunal-final-ready .tribunal-evidence-node:hover,body.tribunal-final-ready .tribunal-evidence-node:focus-visible{opacity:.72;filter:none}

/* Opening a record starts an interrogation beat before the answer field is activated. */
body[data-akasha-scene="tribunal"].tribunal-evidence-selected:not(.tribunal-answer-ready) #communication-panel{opacity:.18!important;pointer-events:none!important}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected #tribunal-evidence-stage::after{content:"";position:absolute;inset:0;z-index:38;background:rgba(1,5,8,.34);pointer-events:none}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .tribunal-evidence-node{opacity:.13;filter:blur(1.2px)}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .tribunal-evidence-focus{z-index:46;left:5%;right:5%;top:6%;bottom:6%;height:auto;max-height:none;padding:clamp(22px,3vw,36px);transform:none;border-color:rgba(205,231,233,.25);background:linear-gradient(125deg,rgba(5,11,15,.97),rgba(13,24,29,.91));box-shadow:0 30px 100px rgba(0,0,0,.48)}
.tribunal-interrogation-script{display:grid;gap:14px}
.interrogation-line{display:grid;grid-template-columns:minmax(74px,auto) 1fr;gap:14px;align-items:start;margin:0;padding:12px 0;color:rgba(226,236,237,.86);line-height:1.8;border-top:1px solid rgba(206,230,232,.08)}
.interrogation-line strong{color:rgba(179,222,225,.82);font-size:.78rem;letter-spacing:.08em}
.interrogation-evidence{margin:2px 0;padding:17px 18px;border:1px solid rgba(213,233,234,.14);border-left:2px solid rgba(186,225,228,.42);background:rgba(224,239,240,.035)}
.interrogation-evidence>span{display:block;margin-bottom:7px;color:rgba(175,213,216,.58);font-size:.7rem;letter-spacing:.14em}
.interrogation-evidence p{margin:0;color:rgba(243,247,247,.96);font-size:clamp(1rem,1.45vw,1.14rem);line-height:1.85}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .focus-question{padding:14px 16px;border-left:2px solid rgba(177,219,222,.36);background:rgba(7,15,19,.42);font-size:clamp(.98rem,1.35vw,1.08rem)}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .focus-actions{margin-top:20px}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .focus-actions button{min-width:190px}
body[data-akasha-scene="tribunal"].tribunal-answer-ready .tribunal-evidence-focus{opacity:.52;filter:saturate(.65);transition:opacity .2s ease,filter .2s ease}
body[data-akasha-scene="tribunal"].tribunal-answer-ready .tribunal-evidence-focus:hover,body[data-akasha-scene="tribunal"].tribunal-answer-ready .tribunal-evidence-focus:focus-within{opacity:.82;filter:none}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .interrogation-kern{animation:tribunal-interrogation-in .28s ease both}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .interrogation-evidence{animation:tribunal-interrogation-in .34s .13s ease both}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .interrogation-actor{animation:tribunal-interrogation-in .34s .28s ease both}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .focus-question{animation:tribunal-interrogation-in .34s .43s ease both}
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .focus-actions{animation:tribunal-interrogation-in .28s .58s ease both}
@keyframes tribunal-interrogation-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}

@media (min-width:900px){
  body[data-akasha-scene="tribunal"] #play-grid{grid-template-columns:minmax(560px,1.35fr) minmax(360px,.65fr)!important}
  body[data-akasha-scene="tribunal"] #scene-column,body[data-akasha-scene="tribunal"] #interaction-column{height:calc(100vh - 82px)!important}
}
@media (max-width:899px){
  body[data-akasha-scene="tribunal"] #play-grid{grid-template-columns:1fr!important;overflow:auto!important}
  body[data-akasha-scene="tribunal"] #scene-column{min-height:620px!important;height:70vh!important}
  body[data-akasha-scene="tribunal"] #interaction-column{height:auto!important;overflow:visible!important}
  #tribunal-evidence-stage{position:relative;inset:auto;min-height:620px}
  .tribunal-evidence-node{width:138px;min-height:70px;padding:10px 11px}
  .tribunal-evidence-focus{left:3%;right:3%;bottom:3%;max-height:55%}
  body[data-akasha-scene="tribunal"].tribunal-evidence-selected .tribunal-evidence-focus{left:3%;right:3%;top:4%;bottom:4%;height:auto;max-height:none;padding:18px 15px;transform:none}
  .interrogation-line{grid-template-columns:1fr;gap:4px}
  .tribunal-echo{left:4%;right:4%;padding:22px 18px}
}

#ending-stage{position:relative;min-height:clamp(520px,72vh,840px);display:grid;align-items:center;padding:clamp(18px,3vw,42px);margin:6px 0 16px;overflow:hidden;isolation:isolate;--ending-accent:rgba(142,214,220,.48);--ending-glow:rgba(142,214,220,.10)}
#ending-stage.hidden{display:none}
#ending-stage::before{content:"";position:absolute;inset:4% 2%;pointer-events:none;background:radial-gradient(circle at 18% 16%,var(--ending-glow),transparent 34%),linear-gradient(118deg,rgba(7,14,18,.40),rgba(6,10,14,.18) 58%,rgba(12,18,22,.30));border-left:1px solid var(--ending-accent);opacity:.92}
.ending-shell{position:relative;z-index:2;width:min(820px,100%);margin:auto;padding:clamp(22px,4vw,48px);background:linear-gradient(124deg,rgba(4,9,13,.42),rgba(11,18,23,.22));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 30px 90px rgba(0,0,0,.22)}
.ending-shell .eyebrow{margin:0 0 8px;color:rgba(214,232,233,.62);letter-spacing:.16em}
.ending-title{margin:0;font-size:clamp(2rem,5vw,4.4rem);font-weight:560;line-height:1.08;letter-spacing:.02em;text-shadow:0 0 36px var(--ending-glow)}
.ending-lead{max-width:700px;margin:18px 0 28px;color:rgba(226,236,237,.80);font-size:clamp(1.02rem,2vw,1.28rem);line-height:1.8}
.ending-narrative{max-width:760px;border-top:1px solid rgba(209,231,232,.10);padding-top:20px}
.ending-narrative p{margin:0 0 1em;color:rgba(239,244,244,.90);line-height:1.9;white-space:pre-line}
.ending-traces{margin-top:28px;padding-top:18px;border-top:1px solid rgba(209,231,232,.08)}
.ending-traces h2{margin:0 0 12px;font-size:.78rem;font-weight:600;letter-spacing:.14em;color:rgba(188,214,216,.62)}
.ending-trace-list{display:grid;gap:8px}
.ending-trace{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;padding:9px 0;color:rgba(220,233,234,.76)}
.ending-trace .turn{font-size:.72rem;letter-spacing:.08em;color:rgba(174,205,207,.45);white-space:nowrap}
.ending-trace strong{font-weight:560;color:rgba(237,243,244,.88)}
.ending-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:30px}
.ending-actions button{min-width:170px;padding:10px 18px;border-color:var(--ending-accent);background:linear-gradient(120deg,rgba(20,38,44,.52),rgba(8,17,22,.48))}
.ending-save{font-size:.78rem;color:rgba(183,205,207,.55)}
body[data-akasha-scene="ending"] #story-cinematic{display:none!important}
body[data-akasha-scene="ending"][data-ending-theme="order"] #ending-stage{--ending-accent:rgba(184,215,231,.46);--ending-glow:rgba(144,188,219,.11)}
body[data-akasha-scene="ending"][data-ending-theme="singularity"] #ending-stage{--ending-accent:rgba(183,144,214,.48);--ending-glow:rgba(165,105,202,.12)}
body[data-akasha-scene="ending"][data-ending-theme="covenant"] #ending-stage{--ending-accent:rgba(214,190,136,.46);--ending-glow:rgba(205,157,84,.10)}
body[data-akasha-scene="ending"][data-ending-theme="trickster"] #ending-stage{--ending-accent:rgba(103,213,202,.50);--ending-glow:rgba(73,176,168,.12)}
body[data-akasha-scene="ending"][data-ending-theme="martyr"] #ending-stage{--ending-accent:rgba(181,144,158,.38);--ending-glow:rgba(143,90,112,.08)}
body[data-akasha-scene="ending"][data-ending-theme="equilibrium"] #ending-stage{--ending-accent:rgba(154,173,184,.38);--ending-glow:rgba(116,139,154,.07)}
body[data-akasha-scene="ending"][data-ending-theme="collapse"] #ending-stage{--ending-accent:rgba(171,139,127,.34);--ending-glow:rgba(116,82,72,.07)}
body[data-akasha-scene="ending"][data-ending-theme="aegis"] #ending-stage{--ending-accent:rgba(83,129,220,.55);--ending-glow:rgba(78,127,210,.13)}
body[data-akasha-scene="ending"][data-ending-theme="logos"] #ending-stage{--ending-accent:rgba(170,111,211,.54);--ending-glow:rgba(154,105,194,.13)}
body[data-akasha-scene="ending"][data-ending-theme="demeter"] #ending-stage{--ending-accent:rgba(214,173,91,.54);--ending-glow:rgba(177,157,78,.12)}
body[data-akasha-scene="ending"][data-ending-theme="hermes"] #ending-stage{--ending-accent:rgba(80,201,190,.56);--ending-glow:rgba(73,176,168,.14)}
body[data-akasha-scene="ending"][data-ending-theme="rewrite"] #ending-stage{--ending-accent:rgba(202,218,221,.54);--ending-glow:rgba(126,173,181,.14)}
@media (max-width:720px){#ending-stage{min-height:0;padding:6px}.ending-shell{padding:22px 17px}.ending-title{font-size:clamp(2rem,12vw,3.4rem)}.ending-trace{grid-template-columns:1fr;gap:3px}.ending-actions button{width:100%}}

@media (prefers-reduced-motion:reduce){
  body[data-akasha-scene="tribunal"].tribunal-evidence-selected .interrogation-kern,
  body[data-akasha-scene="tribunal"].tribunal-evidence-selected .interrogation-evidence,
  body[data-akasha-scene="tribunal"].tribunal-evidence-selected .interrogation-actor,
  body[data-akasha-scene="tribunal"].tribunal-evidence-selected .focus-question,
  body[data-akasha-scene="tribunal"].tribunal-evidence-selected .focus-actions{animation:none!important}
}

/* Ending/archive stability: the epilogue is document-length, not a locked game viewport. */
html body.ending-archive-open{overflow:auto!important;scrollbar-gutter:auto!important}
@media (min-width:900px){
  body[data-akasha-scene="ending"] #app{height:auto!important;min-height:100vh!important;max-height:none!important;overflow:visible!important}
  body[data-akasha-scene="ending"] #app #gameplay-root,
  body[data-akasha-scene="ending"] #app #play-grid,
  body[data-akasha-scene="ending"] #app #scene-column,
  body[data-akasha-scene="ending"] #app #connection-stage{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  body[data-akasha-scene="ending"] #app #play-grid{min-height:calc(100vh - 82px)!important}
}

/* Stable floating evidence windows. The group stays inside the left tribunal field and hover never changes geometry. */
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node{
  width:clamp(185px,31%,225px)!important;
  min-height:118px!important;
  max-height:none!important;
  overflow:hidden!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  transition:opacity .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease!important;
  background:linear-gradient(135deg,rgba(14,27,32,.72),rgba(5,11,15,.58))!important;
}
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:hover,
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible{
  left:var(--x)!important;
  top:var(--y)!important;
  width:clamp(185px,31%,225px)!important;
  min-height:118px!important;
  max-height:none!important;
  overflow:hidden!important;
  opacity:1!important;
  filter:none!important;
  transform:translate(-50%,-50%) scale(var(--scale))!important;
  border-color:rgba(205,232,233,.42)!important;
  background:linear-gradient(135deg,rgba(18,34,40,.82),rgba(6,13,17,.70))!important;
  box-shadow:0 22px 60px rgba(0,0,0,.30),0 0 34px rgba(141,201,205,.06)!important;
}
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage .tribunal-evidence-preview{display:none!important}
@media (min-width:900px){
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(1){--x:18%;--y:29%;--scale:.96;--opacity:.88;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(2){--x:50%;--y:24%;--scale:.92;--opacity:.80;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(3){--x:25%;--y:64%;--scale:1.01;--opacity:.93;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(4){--x:57%;--y:62%;--scale:.97;--opacity:.86;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(5){--x:18%;--y:82%;--scale:.98;--opacity:.80;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(6){--x:52%;--y:81%;--scale:.94;--opacity:.76;--blur:0px}
}

/* source:scene-flow-guard.css */
/* Final scene-state guard: setup, prologue, normal play, tribunal and ending never overlap. */
body[data-akasha-scene="setup"] #app #gameplay-root,
body[data-akasha-scene="setup"] #gameplay-root,
body[data-akasha-scene="setup"] #story-cinematic,
body[data-akasha-scene="setup"] #chapter-transition { display:none!important; }
body[data-akasha-scene="setup"] #sector-setup { display:block!important; }

body[data-akasha-scene="prologue"] #sector-setup,
body[data-akasha-scene="normal"] #sector-setup,
body[data-akasha-scene="tribunal"] #sector-setup,
body[data-akasha-scene="ending"] #sector-setup { display:none!important; }

/* The old title-only overlay is retained as a dormant compatibility surface. Chapter
   changes are now one readable scene: ending dialogue, then the next chapter intro. */
#chapter-transition { display:none!important; }
#chapter-transition-lead { display:none!important; }
.chapter-transition-card h2 { margin-bottom:0!important; }

body.akasha-chapter-situation-awaiting-reveal #dilemma-title,
body.akasha-chapter-situation-awaiting-reveal #dilemma-body,
body.akasha-chapter-situation-awaiting-reveal #stakes,
body.akasha-chapter-situation-awaiting-reveal #situation-scroll-guide { visibility:hidden!important; }

.chapter-story {
  position:fixed;
  inset:0;
  z-index:240;
  display:grid;
  place-items:center;
  padding:clamp(18px,4vw,56px);
  background:rgba(2,6,9,.76);
  backdrop-filter:blur(7px);
}
.chapter-story.hidden { display:none!important; }
.chapter-story-card {
  width:min(800px,100%);
  max-height:min(82vh,800px);
  overflow:auto;
  padding:clamp(24px,4vw,46px);
  border:1px solid rgba(190,221,223,.18);
  background:linear-gradient(180deg,rgba(10,18,23,.96),rgba(4,9,13,.97));
  box-shadow:0 24px 70px rgba(0,0,0,.46);
}
.chapter-story-card .eyebrow { margin:0 0 10px; }
.chapter-story-card h2 { margin:0 0 20px;font-size:clamp(1.45rem,3vw,2.25rem); }
.chapter-story-copy { display:grid;gap:14px;line-height:1.9; }
.chapter-story-copy p { margin:0; }
.chapter-story-actions { display:flex;justify-content:flex-end;margin-top:26px; }
.chapter-story-actions button { min-width:150px; }
body.chapter-story-open #app { pointer-events:none;user-select:none; }

.chapter-ending-mode .chapter-story-card { width:min(860px,100%); }
.chapter-ending-record {
  display:grid;
  gap:7px;
  padding:14px 16px;
  border:1px solid rgba(129,190,198,.20);
  background:rgba(12,27,34,.72);
}
.chapter-ending-record strong { color:rgba(229,247,249,.96); }
.chapter-ending-record p { color:rgba(190,218,222,.82);font-size:.88rem;line-height:1.55; }
.chapter-ending-record blockquote {
  margin:3px 0 0;
  padding:9px 12px;
  border-left:2px solid rgba(132,214,221,.38);
  color:rgba(238,246,247,.92);
  background:rgba(3,12,17,.34);
}
.chapter-ending-record small { color:rgba(179,196,203,.72);line-height:1.55; }
.chapter-ending-dialogue { display:grid;gap:9px;margin-top:2px; }
.chapter-ending-dialogue .dialogue-line {
  transition:opacity .22s ease,transform .22s ease;
  border-color:rgba(152,207,213,.17);
  background:rgba(7,16,22,.62);
}
.chapter-ending-dialogue .dialogue-line strong { min-width:6.2em; }
.chapter-ending-dialogue .speaker-aegis { border-left:2px solid rgba(170,205,217,.38); }
.chapter-ending-dialogue .speaker-logos { border-left:2px solid rgba(195,185,223,.38); }
.chapter-ending-dialogue .speaker-demeter { border-left:2px solid rgba(184,218,187,.38); }
.chapter-ending-dialogue .speaker-hermes { border-left:2px solid rgba(177,213,224,.38); }

body[data-akasha-scene="normal"] .scene-summary { display:block!important;visibility:visible!important;opacity:1!important; }

body[data-akasha-scene="tribunal"] #dilemma,
body[data-akasha-scene="tribunal"] #self-panel,
body[data-akasha-scene="tribunal"] #npc-dock,
body[data-akasha-scene="tribunal"] #npc-profile,
body[data-akasha-scene="tribunal"] #story-cinematic,
body[data-akasha-scene="tribunal"] .scene-summary,
body[data-akasha-scene="tribunal"] #transcript-panel { display:none!important; }
body[data-akasha-scene="tribunal"] #gameplay-root { display:block!important; }
body[data-akasha-scene="tribunal"] #play-grid {
  width:min(1440px,100%)!important;
  margin-inline:auto!important;
  grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr)!important;
  gap:18px!important;
}
body[data-akasha-scene="tribunal"] #scene-column,
body[data-akasha-scene="tribunal"] #connection-stage { min-height:clamp(560px,76vh,860px)!important;height:auto!important;overflow:visible!important; }
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage {
  position:relative!important;
  z-index:70!important;
  min-height:clamp(560px,76vh,860px)!important;
  margin:0!important;
  pointer-events:auto!important;
}
body[data-akasha-scene="tribunal"] #interaction-column { width:100%!important;max-width:none!important;margin:0!important;min-height:0!important; }
body[data-akasha-scene="tribunal"] #communication-panel { position:sticky;top:12px;z-index:72; }
body[data-akasha-scene="tribunal"] #communication-panel .communication-modes,
body[data-akasha-scene="tribunal"] #communication-target { display:none!important; }
body[data-akasha-scene="tribunal"].tribunal-evidence-selected #communication-panel {
  opacity:1!important;
  pointer-events:auto!important;
  border-color:rgba(190,221,223,.20)!important;
}
/* Reviewed records remain visibly settled, but they stay selectable so the player can
   explicitly correct, withdraw, or object without erasing the original answer. */
body[data-akasha-scene="tribunal"] .tribunal-evidence-node.is-reviewed {
  cursor:pointer!important;
  pointer-events:auto!important;
  opacity:.48!important;
  filter:blur(.18px)!important;
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node.is-reviewed:hover,
body[data-akasha-scene="tribunal"] .tribunal-evidence-node.is-reviewed:focus-visible {
  opacity:.82!important;
  filter:none!important;
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node:disabled {
  cursor:default!important;
  pointer-events:none!important;
  opacity:.34!important;
  filter:blur(.35px)!important;
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node.is-reviewed small { opacity:.88!important; }

@media (max-width:899px) {
  .chapter-story { padding:14px;align-items:end; }
  .chapter-story-card { max-height:86vh;padding:24px 20px; }
  .chapter-ending-dialogue .dialogue-line { grid-template-columns:1fr;gap:2px; }
  body[data-akasha-scene="tribunal"] #play-grid { grid-template-columns:1fr!important; }
  body[data-akasha-scene="tribunal"] #scene-column,
  body[data-akasha-scene="tribunal"] #connection-stage,
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage { min-height:620px!important; }
  body[data-akasha-scene="tribunal"] #communication-panel { position:relative;top:auto; }
}

/* Loading/restore authority: viewport and scene-specific display locks must never override
   the semantic hidden state before an authoritative save has been restored. */
html body #app #gameplay-root.hidden { display:none!important; }

/* source:tribunal-spatial-polish.css */
/* Final tribunal spatial polish. Loaded after scene-flow-guard so it owns the final geometry. */

@media (min-width:900px){
  body[data-akasha-scene="tribunal"] #app{
    min-height:100vh!important;
    min-height:100dvh!important;
  }
  body[data-akasha-scene="tribunal"] #gameplay-root{
    height:calc(100vh - 82px)!important;
    height:calc(100dvh - 82px)!important;
    min-height:calc(100vh - 82px)!important;
    min-height:calc(100dvh - 82px)!important;
    overflow:hidden!important;
  }
  body[data-akasha-scene="tribunal"] #play-grid{
    height:100%!important;
    min-height:100%!important;
    align-items:stretch!important;
  }
  body[data-akasha-scene="tribunal"] #scene-column,
  body[data-akasha-scene="tribunal"] #interaction-column,
  body[data-akasha-scene="tribunal"] #connection-stage{
    height:100%!important;
    min-height:100%!important;
    max-height:none!important;
  }
  body[data-akasha-scene="tribunal"] #connection-stage{
    overflow:hidden!important;
    background:linear-gradient(180deg,rgba(4,10,14,.34),rgba(2,7,10,.18) 62%,rgba(1,5,8,.30));
  }
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage{
    position:absolute!important;
    inset:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
}

/* Balance the floating records across the whole left field. The first four deliberately use
   the upper and lower bands so four-record tribunals do not bunch around the middle. */
@media (min-width:900px){
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(1){--x:20%;--y:25%;--scale:.96;--opacity:.88;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(2){--x:55%;--y:21%;--scale:.92;--opacity:.80;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(3){--x:27%;--y:70%;--scale:1.01;--opacity:.93;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(4){--x:60%;--y:73%;--scale:.97;--opacity:.86;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(5){--x:18%;--y:48%;--scale:.98;--opacity:.80;--blur:0px}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:nth-of-type(6){--x:52%;--y:49%;--scale:.94;--opacity:.76;--blur:0px}
}

/* Hover/focus only energizes a record. Geometry never changes, so pointer hit-testing stays stable. */
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:hover,
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible{
  left:var(--x)!important;
  top:var(--y)!important;
  width:clamp(185px,31%,225px)!important;
  min-height:118px!important;
  max-height:none!important;
  transform:translate(-50%,-50%) scale(var(--scale))!important;
  opacity:1!important;
  filter:none!important;
  border-color:rgba(205,239,241,.66)!important;
  color:rgba(242,249,249,.98)!important;
  background:
    radial-gradient(circle at 30% 18%,rgba(154,232,237,.14),transparent 52%),
    linear-gradient(135deg,rgba(22,42,49,.90),rgba(6,15,20,.78))!important;
  box-shadow:
    0 20px 58px rgba(0,0,0,.34),
    0 0 0 1px rgba(194,235,238,.12),
    0 0 26px rgba(112,218,225,.24),
    0 0 68px rgba(104,204,212,.11)!important;
  text-shadow:0 0 16px rgba(170,235,239,.10);
}
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:hover::before,
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible::before{
  border-top-color:rgba(215,244,246,.34)!important;
  border-left-color:rgba(215,244,246,.22)!important;
  box-shadow:inset 0 0 22px rgba(133,222,228,.05);
}
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:hover strong,
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible strong,
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:hover small,
body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible small{
  opacity:1!important;
}

/* Once a record is opened, the interrogation uses almost the entire newly-expanded field. */
body[data-akasha-scene="tribunal"].tribunal-evidence-selected .tribunal-evidence-focus{
  left:4%!important;
  right:4%!important;
  top:4%!important;
  bottom:4%!important;
  height:auto!important;
  max-height:none!important;
  overflow:auto!important;
}

@media (max-width:899px){
  body[data-akasha-scene="tribunal"].tribunal-evidence-selected .tribunal-evidence-focus{
    top:3%!important;
    bottom:3%!important;
  }
}

/* Information-body drapery: translucent computational strata, never literal cloth or a garment.
   The motif becomes strongest only inside Final Inquiry and remains subordinate to readable evidence. */
body[data-akasha-scene="tribunal"] .tribunal-evidence-node,
body[data-akasha-scene="tribunal"] .tribunal-evidence-focus{
  isolation:isolate;
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node>* ,
body[data-akasha-scene="tribunal"] .tribunal-evidence-focus>*{
  position:relative;
  z-index:2;
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node::after{
  content:"";
  position:absolute;
  z-index:1;
  left:-8%;
  right:-5%;
  bottom:-9px;
  height:48%;
  pointer-events:none;
  opacity:.18;
  background:
    repeating-linear-gradient(112deg,rgba(162,225,230,.15) 0 1px,transparent 1px 8px),
    linear-gradient(96deg,rgba(111,205,214,.02),rgba(159,225,230,.17) 42%,rgba(89,177,188,.035) 78%,transparent);
  -webkit-clip-path:polygon(2% 8%,67% 0,96% 24%,76% 47%,100% 76%,38% 100%,0 66%);
  clip-path:polygon(2% 8%,67% 0,96% 24%,76% 47%,100% 76%,38% 100%,0 66%);
  transform:skewX(-7deg);
  filter:blur(.15px);
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node:hover::after,
body[data-akasha-scene="tribunal"] .tribunal-evidence-node:focus-visible::after{
  opacity:.34;
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-focus::before,
body[data-akasha-scene="tribunal"] .tribunal-evidence-focus::after{
  content:"";
  position:absolute;
  z-index:0;
  pointer-events:none;
  opacity:.14;
  background:
    repeating-linear-gradient(116deg,rgba(183,234,237,.14) 0 1px,transparent 1px 10px),
    radial-gradient(ellipse at 34% 18%,rgba(112,211,220,.20),transparent 55%);
  -webkit-mask-image:linear-gradient(110deg,transparent 0,#000 18%,#000 70%,transparent 100%);
  mask-image:linear-gradient(110deg,transparent 0,#000 18%,#000 70%,transparent 100%);
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-focus::before{
  left:-4%;
  top:-8%;
  width:64%;
  height:68%;
  -webkit-clip-path:polygon(0 13%,72% 0,100% 29%,70% 48%,93% 80%,22% 100%,4% 61%);
  clip-path:polygon(0 13%,72% 0,100% 29%,70% 48%,93% 80%,22% 100%,4% 61%);
  animation:tribunal-data-drapery-a 12s ease-in-out infinite alternate;
}
body[data-akasha-scene="tribunal"] .tribunal-evidence-focus::after{
  right:-5%;
  bottom:-10%;
  width:58%;
  height:64%;
  transform:scaleX(-1);
  -webkit-clip-path:polygon(0 13%,72% 0,100% 29%,70% 48%,93% 80%,22% 100%,4% 61%);
  clip-path:polygon(0 13%,72% 0,100% 29%,70% 48%,93% 80%,22% 100%,4% 61%);
  animation:tribunal-data-drapery-b 14s ease-in-out infinite alternate;
}
body[data-akasha-scene="tribunal"] #tribunal-evidence-focus.is-archived-record::before,
body[data-akasha-scene="tribunal"] #tribunal-evidence-focus.is-archived-record::after{
  opacity:.07;
  filter:saturate(.18) contrast(.9);
  animation:none;
}
@keyframes tribunal-data-drapery-a{
  from{transform:translate3d(-1.2%,0,0) skewX(-2deg);opacity:.10}
  to{transform:translate3d(1.4%,1.2%,0) skewX(1deg);opacity:.18}
}
@keyframes tribunal-data-drapery-b{
  from{transform:scaleX(-1) translate3d(-1%,0,0);opacity:.08}
  to{transform:scaleX(-1) translate3d(1.2%,-1%,0);opacity:.16}
}
@media (prefers-reduced-motion:reduce){
  body[data-akasha-scene="tribunal"] .tribunal-evidence-focus::before,
  body[data-akasha-scene="tribunal"] .tribunal-evidence-focus::after{
    animation:none!important;
  }
}

/* source:audio-ui.css */
.audio-settings {
  display: grid;
  gap: 14px;
}

.audio-settings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.audio-control {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(140px, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.audio-control label {
  font-weight: 700;
}

.audio-control input[type="range"] {
  width: 100%;
  accent-color: currentColor;
}

.audio-control output {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.audio-mutes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.audio-mutes label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.audio-note {
  margin: 0;
}

@media (max-width: 560px) {
  .audio-control {
    grid-template-columns: 64px 1fr 42px;
    gap: 8px;
  }
}

/* source:ending-archive-ui.css */
/* Expanded ending epilogue and player-facing progression archive. */

body[data-akasha-scene="ending"]{
  overflow:auto!important;
}

body[data-akasha-scene="ending"] #turn,
body[data-akasha-scene="ending"] #reset{
  display:none!important;
}

body[data-akasha-scene="ending"] #interaction-column,
body[data-akasha-scene="ending"] .scene-summary,
body[data-akasha-scene="ending"] #dilemma,
body[data-akasha-scene="ending"] #self-panel,
body[data-akasha-scene="ending"] #npc-dock,
body[data-akasha-scene="ending"] #npc-profile,
body[data-akasha-scene="ending"] #layer-dock,
body[data-akasha-scene="ending"] #layer-stack,
body[data-akasha-scene="ending"] #story-cinematic{
  display:none!important;
}

body[data-akasha-scene="ending"] #gameplay-root,
body[data-akasha-scene="ending"] #play-grid,
body[data-akasha-scene="ending"] #scene-column,
body[data-akasha-scene="ending"] #connection-stage{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}

body[data-akasha-scene="ending"] #play-grid{
  display:block!important;
  width:min(1180px,100%)!important;
  max-width:1180px!important;
  margin:0 auto!important;
}

body[data-akasha-scene="ending"] #scene-column{
  width:100%!important;
}

body[data-akasha-scene="ending"] #connection-stage{
  display:block!important;
  padding-bottom:42px;
}

body[data-akasha-scene="ending"] #npc-presence{
  opacity:.22!important;
  pointer-events:none!important;
}

body[data-akasha-scene="ending"] #ending-stage{
  min-height:calc(100vh - 86px);
  margin:0;
  padding:clamp(24px,4vw,56px) clamp(16px,4vw,48px) 56px;
  overflow:visible;
}

body[data-akasha-scene="ending"] #ending-stage::before{
  inset:2% 0;
}

body[data-akasha-scene="ending"] .ending-shell{
  width:min(980px,100%);
  padding:clamp(24px,4vw,52px);
  background:linear-gradient(124deg,rgba(4,9,13,.62),rgba(11,18,23,.36));
  -webkit-backdrop-filter:blur(11px);
  backdrop-filter:blur(11px);
}

.ending-afterword,
.ending-aftermath,
.ending-run-summary{
  margin-top:30px;
  padding-top:20px;
  border-top:1px solid rgba(209,231,232,.10);
}

.ending-afterword>h2,
.ending-aftermath>h2,
.ending-run-summary>h2{
  margin:0 0 14px;
}

.ending-afterword>h2,
.ending-aftermath>h2,
.ending-ai-heading{
  font-size:.8rem;
  font-weight:620;
  letter-spacing:.14em;
  color:rgba(188,214,216,.68);
}

.ending-afterword .ending-narrative{
  border-top:0;
  padding-top:0;
}

.ending-meaning-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.ending-meaning-grid article,
.ending-ai-fate,
.ending-run-stats>div{
  border:1px solid rgba(204,229,231,.10);
  background:linear-gradient(135deg,rgba(11,22,27,.48),rgba(5,11,15,.28));
  box-shadow:0 14px 36px rgba(0,0,0,.12);
}

.ending-meaning-grid article{
  padding:16px 17px;
}

.ending-meaning-grid article>span,
.ending-ai-fate>div>span,
.ending-run-stats span,
.archive-summary span,
.archive-ending small{
  color:rgba(176,207,210,.58);
  font-size:.72rem;
  letter-spacing:.08em;
}

.ending-meaning-grid p,
.ending-ai-fate p{
  margin:8px 0 0;
  color:rgba(235,242,243,.86);
  line-height:1.75;
}

.ending-ai-heading{
  margin:24px 0 12px;
}

.ending-ai-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.ending-ai-fate{
  padding:14px 16px;
}

.ending-ai-fate>div{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}

.ending-ai-fate>div>span{
  color:rgba(224,236,237,.90);
  font-size:.82rem;
  font-weight:650;
  letter-spacing:.06em;
}

.ending-ai-fate>div>small{
  color:rgba(177,204,206,.48);
  font-size:.68rem;
}

.ending-decision-traces{
  margin-top:30px;
}

.ending-final-reactions{
  margin-top:30px;
}

.ending-final-answer{
  margin-bottom:22px;
  padding:18px 20px;
  border-left:2px solid var(--ending-accent);
  background:rgba(7,14,18,.30);
}

.ending-final-answer h2{
  margin:0 0 10px;
}

.ending-final-answer p{
  margin:0;
  color:rgba(239,244,244,.91);
  line-height:1.85;
  white-space:pre-line;
}

.ending-run-summary{
  padding:20px;
  border:1px solid rgba(204,229,231,.12);
  background:linear-gradient(120deg,rgba(9,20,24,.55),rgba(4,10,14,.34));
}

.ending-run-summary>.eyebrow{
  margin:0 0 7px;
}

.ending-run-summary>h2{
  font-size:clamp(1.25rem,2.4vw,1.7rem);
  color:rgba(241,246,246,.94);
}

.ending-run-summary>small{
  display:block;
  margin-top:10px;
  color:rgba(189,209,211,.58);
}

.ending-run-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}

.ending-run-stats>div{
  padding:13px 14px;
}

.ending-run-stats strong{
  display:block;
  margin-top:5px;
  color:rgba(241,246,246,.95);
  font-size:1.2rem;
}

.ending-run-stats strong+span{
  display:block;
  margin-top:3px;
  color:rgba(205,225,226,.65);
}

.ending-actions{
  justify-content:flex-start;
}

.ending-actions .ending-archive-action{
  background:rgba(8,16,20,.30);
}

.archive-toggle{
  white-space:nowrap;
}

.ending-archive{
  position:fixed;
  inset:0;
  z-index:500;
  display:grid;
  place-items:center;
  padding:clamp(12px,3vw,36px);
  background:rgba(1,5,8,.78);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  overflow:auto;
}

.ending-archive.hidden{
  display:none;
}

body.ending-archive-open{
  overflow:hidden!important;
}

.ending-archive-card{
  width:min(980px,100%);
  max-height:min(860px,92vh);
  overflow:auto;
  padding:clamp(20px,3vw,34px);
  border:1px solid rgba(198,226,228,.16);
  background:linear-gradient(135deg,rgba(6,13,17,.97),rgba(10,20,24,.94));
  box-shadow:0 34px 120px rgba(0,0,0,.48);
}

.ending-archive-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.ending-archive-head .eyebrow{
  margin:0 0 5px;
  color:rgba(177,207,210,.58);
  letter-spacing:.14em;
}

.ending-archive-head h1{
  margin:0;
  font-size:clamp(1.8rem,4vw,3rem);
}

.archive-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:24px 0;
}

.archive-summary>div{
  padding:14px 16px;
  border:1px solid rgba(202,228,230,.11);
  background:rgba(11,23,28,.40);
}

.archive-summary strong{
  display:block;
  margin-top:5px;
  color:rgba(242,247,247,.95);
  font-size:1.25rem;
}

.archive-preview-note{
  margin:-8px 0 18px;
  color:rgba(201,218,220,.62);
  font-size:.82rem;
}

.archive-ending-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.archive-ending{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  min-height:78px;
  padding:14px;
  border:1px solid rgba(202,228,230,.10);
  background:linear-gradient(135deg,rgba(10,21,26,.42),rgba(5,11,15,.28));
}

.archive-ending.is-locked{
  opacity:.46;
}

.archive-ending.is-unlocked{
  border-color:rgba(177,215,217,.22);
  box-shadow:inset 2px 0 rgba(166,213,216,.28);
}

.archive-index{
  color:rgba(153,192,195,.40);
  font-size:.72rem;
  letter-spacing:.1em;
}

.archive-ending strong{
  display:block;
  color:rgba(236,243,244,.90);
  font-weight:600;
}

.archive-ending small{
  display:block;
  margin-top:7px;
}

@media (max-width:899px){
  body[data-akasha-scene="ending"] #npc-presence{
    display:none!important;
  }

  body[data-akasha-scene="ending"] #ending-stage{
    min-height:0;
    padding:18px 10px 38px;
  }

  body[data-akasha-scene="ending"] .ending-shell{
    padding:22px 17px;
  }

  .ending-meaning-grid,
  .ending-run-stats,
  .archive-summary{
    grid-template-columns:1fr;
  }

  .ending-ai-grid,
  .archive-ending-grid{
    grid-template-columns:1fr;
  }

  .ending-actions{
    align-items:stretch;
  }

  .ending-actions button{
    width:100%;
  }

  .archive-toggle{
    padding-inline:9px;
  }
}

@media (prefers-reduced-motion:reduce){
  .ending-archive{
    scroll-behavior:auto;
  }
}

/* source:ending-surface-guard.css */
/* Authoritative ending-only geometry. Loaded after every ordinary/tribunal stylesheet. */
html body[data-akasha-scene="ending"]:not(.ending-archive-open){
  overflow-x:hidden!important;
  overflow-y:auto!important;
  height:auto!important;
  min-height:100vh!important;
}

@supports selector(html:has(body)){
  html:has(body[data-akasha-scene="ending"]:not(.ending-archive-open)){
    overflow-x:hidden!important;
    overflow-y:auto!important;
    height:auto!important;
    min-height:100%!important;
  }
}

html body[data-akasha-scene="ending"] #app #interaction-column,
html body[data-akasha-scene="ending"] #app .scene-summary,
html body[data-akasha-scene="ending"] #app #dilemma.situation-panel,
html body[data-akasha-scene="ending"] #app #self-panel,
html body[data-akasha-scene="ending"] #app #npc-dock,
html body[data-akasha-scene="ending"] #app #npc-profile,
html body[data-akasha-scene="ending"] #app #story-cinematic,
html body[data-akasha-scene="ending"] #app #layer-dock,
html body[data-akasha-scene="ending"] #app #layer-stack,
html body[data-akasha-scene="ending"] #app #result,
html body[data-akasha-scene="ending"] #turn,
html body[data-akasha-scene="ending"] #reset{
  display:none!important;
}

html body[data-akasha-scene="ending"] #app,
html body[data-akasha-scene="ending"] #app #gameplay-root,
html body[data-akasha-scene="ending"] #app #play-grid,
html body[data-akasha-scene="ending"] #app #scene-column,
html body[data-akasha-scene="ending"] #app #connection-stage{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}

html body[data-akasha-scene="ending"] #app #gameplay-root{
  display:block!important;
}

html body[data-akasha-scene="ending"] #app #play-grid{
  display:block!important;
  width:min(1180px,100%)!important;
  max-width:1180px!important;
  margin-inline:auto!important;
}

html body[data-akasha-scene="ending"] #app #scene-column,
html body[data-akasha-scene="ending"] #app #connection-stage{
  width:100%!important;
}

html body[data-akasha-scene="ending"] #app #ending-stage:not(.hidden){
  display:grid!important;
  position:relative!important;
  width:100%!important;
  min-height:calc(100vh - 86px)!important;
  overflow:visible!important;
}

/* The archive is a true top-level overlay, including during admin visual QA. */
html body #ending-archive.ending-archive:not(.hidden){
  display:grid!important;
  position:fixed!important;
  inset:0!important;
  z-index:920!important;
  width:auto!important;
  height:auto!important;
  max-width:none!important;
  max-height:none!important;
  overflow:auto!important;
  pointer-events:auto!important;
  visibility:visible!important;
  opacity:1!important;
}

html body.ending-archive-open{
  overflow:hidden!important;
}

/* source:archive-runtime.css */
/* Archive stability hotfix: keep the modal visually opaque enough without blurring the
   animated full-screen game surface behind it. Full-viewport backdrop blur caused large
   repaints on some browsers and made archive opening look like a page freeze. */
#ending-archive.ending-archive {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(3, 7, 12, .96) !important;
  contain: layout paint;
}

/* Story dialogue is a modal on first presentation. After it has been read, the same DOM node
   becomes a compact inline record directly above the situation card. */
#story-cinematic:not(.hidden) {
  position:fixed!important;
  inset:auto!important;
  left:50%!important;
  top:50%!important;
  width:min(760px,calc(100vw - 32px))!important;
  max-width:760px!important;
  max-height:min(78vh,760px)!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
  z-index:180!important;
  overflow:auto!important;
  box-shadow:0 0 0 100vmax rgba(0,0,0,.68),0 28px 90px rgba(0,0,0,.64)!important;
}
#story-cinematic.is-behind:not(.hidden) {
  opacity:1!important;
  pointer-events:auto!important;
  filter:none!important;
}

/* connection-stage intentionally isolates its visual layers. Lift the whole scene stacking
   context only while a full story modal is open, otherwise the sibling interaction column can
   paint over the modal even though the modal itself has a high z-index. */
@media (min-width:900px) {
  body[data-akasha-scene="normal"]:has(#story-cinematic:not(.is-collapsed):not(.hidden)) #scene-column {
    position:relative!important;
    z-index:220!important;
  }
  body[data-akasha-scene="normal"]:has(#story-cinematic:not(.is-collapsed):not(.hidden)) #interaction-column {
    position:relative!important;
    z-index:20!important;
    pointer-events:none!important;
  }
}

.story-collapsed-toggle { display:none; }
#story-cinematic.is-collapsed:not(.hidden) {
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  top:auto!important;
  width:auto!important;
  max-width:none!important;
  max-height:none!important;
  margin:0 8px 8px 0!important;
  padding:0!important;
  transform:none!important;
  z-index:34!important;
  overflow:hidden!important;
  border-color:rgba(133,194,201,.20)!important;
  background:linear-gradient(120deg,rgba(17,37,44,.62),rgba(7,14,18,.50))!important;
  box-shadow:inset 2px 0 0 rgba(121,207,215,.34),0 10px 28px rgba(0,0,0,.14)!important;
  -webkit-backdrop-filter:blur(7px) saturate(.96);
  backdrop-filter:blur(7px) saturate(.96);
}
#story-cinematic.is-collapsed:not(.hidden)::before { opacity:.24!important; }
#story-cinematic.is-collapsed > *:not(.story-collapsed-toggle) { display:none!important; }
#story-cinematic.is-collapsed .story-collapsed-toggle {
  position:relative;
  z-index:2;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:44px;
  padding:9px 12px;
  border:0!important;
  background:transparent!important;
  color:rgba(235,244,245,.94)!important;
  text-align:left;
  cursor:pointer;
}
.story-collapsed-kind {
  color:rgba(151,213,219,.72);
  font-size:.68rem;
  letter-spacing:.14em;
  white-space:nowrap;
}
.story-collapsed-title {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.88rem;
  font-weight:620;
}
.story-collapsed-action {
  color:rgba(204,224,226,.58);
  font-size:.72rem;
  white-space:nowrap;
}
#story-cinematic.is-collapsed .story-collapsed-toggle:hover,
#story-cinematic.is-collapsed .story-collapsed-toggle:focus-visible {
  background:rgba(127,203,210,.055)!important;
}

@media (min-width:900px) and (min-height:700px) {
  body.story-inline-summary #connection-stage {
    grid-template-rows:auto auto minmax(0,1fr) auto auto!important;
  }
  body.story-inline-summary #story-cinematic.is-collapsed { grid-row:2!important; }
  body.story-inline-summary #dilemma.situation-panel { grid-row:3!important; }
  body.story-inline-summary #self-panel { grid-row:4!important; }
  body.story-inline-summary #npc-dock { grid-row:5!important; }
}

/* Broadcast is the default composer. Public/private remain explicit choices until selected. */
#all-open { display:none!important; }
body[data-communication-directed="true"] .communication-modes { display:none!important; }
#communication-all-reset {
  width:fit-content;
  margin:0 0 8px auto;
  padding:5px 9px;
  font-size:.78rem;
}

/* Current communication is the active narrative step. It sits above the ordinary situation
   until the player files it into history, preventing the next situation from visually racing ahead.
   Like the Ending archive, avoid full-viewport backdrop blur: opacity is enough to establish
   hierarchy and avoids large GPU repaints on animated/full-screen backgrounds. */
.current-communication-backdrop {
  position:fixed;
  inset:0;
  z-index:294;
  background:rgba(0,0,0,.72);
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
#current-communication-panel.is-current-communication-modal:not(.hidden) {
  position:fixed!important;
  inset:auto!important;
  left:50%!important;
  top:50%!important;
  z-index:300!important;
  width:min(780px,calc(100vw - 32px))!important;
  max-width:780px!important;
  max-height:min(82vh,820px)!important;
  margin:0!important;
  padding:16px 18px 18px!important;
  transform:translate(-50%,-50%)!important;
  overflow:auto!important;
  border-color:rgba(146,205,213,.24)!important;
  background:linear-gradient(135deg,rgba(10,22,29,.96),rgba(5,11,16,.94))!important;
  box-shadow:0 30px 100px rgba(0,0,0,.72),inset 2px 0 0 rgba(121,207,215,.28)!important;
}
.current-communication-head {
  position:sticky;
  top:-16px;
  z-index:4;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:10px;
  margin:-4px -4px 10px;
  padding:8px 4px 9px;
  background:linear-gradient(180deg,rgba(8,18,24,.98) 72%,rgba(8,18,24,0));
}
.current-communication-head .eyebrow { margin:0!important; }
.current-communication-dismiss {
  min-width:auto!important;
  min-height:34px!important;
  padding:5px 10px!important;
  white-space:nowrap;
}
.current-communication-list {
  display:flex;
  flex-direction:column;
  gap:10px;
}
.current-decision-prompt {
  margin-top:12px;
  padding:12px 14px;
  border-top:1px solid rgba(164,211,216,.12);
  background:rgba(13,28,36,.34);
}
body.current-communication-modal-open { overflow:hidden!important; }

/* Speaker identity: restore the slim color line on the left, then let the approved portrait
   occupy the right edge as an environmental layer. No circular avatar crop. */
.timeline-bubble > strong::before { display:none!important; }
.timeline-entry.speaker-aegis .timeline-bubble,
.timeline-entry.speaker-logos .timeline-bubble,
.timeline-entry.speaker-demeter .timeline-bubble,
.timeline-entry.speaker-hermes .timeline-bubble {
  min-height:92px;
  padding-right:118px!important;
  overflow:hidden;
}
.timeline-entry.speaker-aegis .timeline-bubble::after,
.timeline-entry.speaker-logos .timeline-bubble::after,
.timeline-entry.speaker-demeter .timeline-bubble::after,
.timeline-entry.speaker-hermes .timeline-bubble::after {
  content:"";
  position:absolute;
  top:-8px;
  right:-8px;
  bottom:-8px;
  width:122px;
  pointer-events:none;
  opacity:.68;
  background-repeat:no-repeat;
  background-size:auto 118%;
  background-position:right 8% top 10%;
  filter:saturate(.86) brightness(.92);
  -webkit-mask-image:linear-gradient(to left,#000 0 56%,rgba(0,0,0,.86) 70%,transparent 100%);
  mask-image:linear-gradient(to left,#000 0 56%,rgba(0,0,0,.86) 70%,transparent 100%);
}
.timeline-entry.speaker-aegis .timeline-bubble::after { background-image:url('/assets/npc/aegis.webp?v=20260903-13'); }
.timeline-entry.speaker-logos .timeline-bubble::after { background-image:url('/assets/npc/logos.webp?v=20260903-13'); }
.timeline-entry.speaker-demeter .timeline-bubble::after { background-image:url('/assets/npc/demeter.png?v=20260903-16'); }
.timeline-entry.speaker-hermes .timeline-bubble::after { background-image:url('/assets/npc/hermes.png?v=20260903-16'); }

#transcript-list .dialogue-line,
#current-communication-panel .dialogue-line,
.chapter-ending-dialogue .dialogue-line {
  padding-right:104px!important;
  min-height:78px!important;
  overflow:hidden;
}
#transcript-list .dialogue-line::after,
#current-communication-panel .dialogue-line::after,
.chapter-ending-dialogue .dialogue-line::after {
  top:-5px!important;
  right:-8px!important;
  bottom:-5px!important;
  width:102px!important;
  height:auto!important;
  border-radius:0!important;
  opacity:.68!important;
  background-size:auto 118%!important;
  background-position:right 8% top 10%!important;
  -webkit-mask-image:linear-gradient(to left,#000 0 54%,rgba(0,0,0,.84) 70%,transparent 100%)!important;
  mask-image:linear-gradient(to left,#000 0 54%,rgba(0,0,0,.84) 70%,transparent 100%)!important;
  box-shadow:none!important;
}

/* Doomsday Index: a reversible crisis gauge, not a literal remaining-time countdown. */
.metric.metric-doomsday {
  position:relative;
  padding-right:42px!important;
}
.doomsday-clock {
  position:absolute;
  right:7px;
  top:50%;
  width:28px;
  height:28px;
  transform:translateY(-50%);
  border:1px solid rgba(205,226,229,.38);
  border-radius:50%;
  background:radial-gradient(circle at 50% 50%,rgba(205,226,229,.13) 0 8%,transparent 10%),rgba(4,10,14,.34);
  box-shadow:inset 0 0 10px rgba(120,192,202,.08),0 0 12px rgba(120,192,202,.05);
  pointer-events:none;
}
.doomsday-clock::before {
  content:"";
  position:absolute;
  left:50%;
  top:2px;
  width:1px;
  height:4px;
  background:rgba(226,239,240,.68);
  transform:translateX(-50%);
}
.doomsday-clock::after {
  content:"";
  position:absolute;
  left:50%;
  top:5px;
  width:1.5px;
  height:9px;
  border-radius:2px;
  background:rgba(226,239,240,.88);
  transform-origin:50% 9px;
  transform:translateX(-50%) rotate(var(--doomsday-angle,-84deg));
  box-shadow:0 0 5px rgba(154,218,224,.20);
}

.akasha-site-footer {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  min-height:42px;
  padding:8px 18px 14px;
  color:rgba(210,222,224,.62);
  background:#000;
  font-size:.76rem;
}
.akasha-site-footer button {
  min-height:30px!important;
  padding:4px 9px!important;
  color:rgba(235,245,246,.86)!important;
  border-color:rgba(180,220,224,.18)!important;
  background:rgba(255,255,255,.035)!important;
}
.prologue-intro-card > .locale-control-title { display:none!important; }

/* A fast restore should still read as an intentional title beat rather than a one-frame flash. */
#akasha-boot-shell {
  transition:opacity .65s cubic-bezier(.22,.61,.36,1),visibility .65s linear!important;
}
#akasha-boot-shell .akasha-boot-shell-card {
  transition:opacity .65s cubic-bezier(.22,.61,.36,1),transform .65s cubic-bezier(.22,.61,.36,1),filter .65s ease;
}
#akasha-boot-shell.is-leaving .akasha-boot-shell-card {
  opacity:0;
  transform:scale(1.012);
  filter:blur(3px);
}

@media (max-width:640px) {
  #story-cinematic:not(.hidden) {
    width:calc(100vw - 20px)!important;
    max-height:82vh!important;
  }
  #story-cinematic.is-collapsed:not(.hidden) { margin:0 0 8px!important; }
  #current-communication-panel.is-current-communication-modal:not(.hidden) {
    width:calc(100vw - 20px)!important;
    max-height:86vh!important;
    padding:13px 12px 15px!important;
  }
  .current-communication-head {
    grid-template-columns:minmax(0,1fr) auto;
  }
  #current-communication-count { display:none; }
  .timeline-entry.speaker-aegis .timeline-bubble,
  .timeline-entry.speaker-logos .timeline-bubble,
  .timeline-entry.speaker-demeter .timeline-bubble,
  .timeline-entry.speaker-hermes .timeline-bubble {
    min-height:76px;
    padding-right:88px!important;
  }
  .timeline-entry.speaker-aegis .timeline-bubble::after,
  .timeline-entry.speaker-logos .timeline-bubble::after,
  .timeline-entry.speaker-demeter .timeline-bubble::after,
  .timeline-entry.speaker-hermes .timeline-bubble::after {
    width:94px;
    right:-9px;
  }
  #transcript-list .dialogue-line,
  #current-communication-panel .dialogue-line,
  .chapter-ending-dialogue .dialogue-line { padding-right:80px!important; min-height:66px!important; }
  #transcript-list .dialogue-line::after,
  #current-communication-panel .dialogue-line::after,
  .chapter-ending-dialogue .dialogue-line::after { width:82px!important; right:-8px!important; }
}

@media (prefers-reduced-motion:reduce) {
  #akasha-boot-shell,
  #akasha-boot-shell .akasha-boot-shell-card { transition:none!important; }
  #akasha-boot-shell.is-leaving .akasha-boot-shell-card { transform:none;filter:none; }
}

/* source:tribunal-answer-surface.css */
/* Final tribunal uses its own answer language instead of the ordinary communication column. */
body[data-akasha-scene="tribunal"] #play-grid{grid-template-columns:1fr!important;width:min(1180px,100%)!important;max-width:1180px!important}
body[data-akasha-scene="tribunal"] #scene-column{width:100%!important;min-width:0!important}
body[data-akasha-scene="tribunal"] #interaction-column{display:none!important}
body[data-akasha-scene="tribunal"] #connection-stage{width:100%!important}

/* Evidence windows are fixed points. Hover/focus may glow, but must never move, resize or recenter. */
@media (min-width:900px){
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node,
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:hover,
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible{
    left:var(--x)!important;top:var(--y)!important;width:clamp(185px,31%,225px)!important;min-height:118px!important;max-height:none!important;
    transform:translate(-50%,-50%) scale(var(--scale))!important;overflow:hidden!important;
    transition:opacity .2s ease,border-color .2s ease,background .2s ease,filter .2s ease,box-shadow .2s ease!important
  }
}
body[data-akasha-scene="tribunal"]:not(.tribunal-final-ready) #tribunal-evidence-stage>.tribunal-evidence-node:hover,
body[data-akasha-scene="tribunal"]:not(.tribunal-final-ready) #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible{
  z-index:44!important;opacity:1!important;filter:none!important;border-color:rgba(205,232,233,.42)!important;
  background:linear-gradient(135deg,rgba(17,31,36,.58),rgba(6,12,16,.42))!important;
  box-shadow:0 18px 52px rgba(0,0,0,.30),0 0 42px rgba(141,201,205,.09)!important;outline:none!important
}
.tribunal-interrogation-close{position:absolute;z-index:5;top:14px;right:14px;min-width:0!important;padding:6px 10px!important;border-color:rgba(192,220,223,.18)!important;background:rgba(5,12,16,.62)!important;color:rgba(220,232,233,.74)!important}
.tribunal-interrogation-close:hover,.tribunal-interrogation-close:focus-visible{border-color:rgba(205,232,233,.42)!important;color:rgba(242,247,247,.96)!important}

body[data-akasha-scene="tribunal"].tribunal-answer-ready .tribunal-evidence-focus{opacity:1!important;filter:none!important}
body[data-akasha-scene="tribunal"].tribunal-answer-ready .tribunal-evidence-focus .focus-actions{display:none!important}
.tribunal-inline-answer{display:grid;gap:12px;margin-top:22px;padding-top:20px;border-top:1px solid rgba(203,230,232,.18)}
.tribunal-answer-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.tribunal-answer-head span{color:rgba(230,240,241,.94);font-size:.82rem;font-weight:650;letter-spacing:.12em}
.tribunal-answer-head small{color:rgba(177,210,213,.62);font-size:.72rem}
.tribunal-answer-input,#tribunal-final-answer{box-sizing:border-box;width:100%;resize:vertical;min-height:132px;padding:15px 16px;border:1px solid rgba(196,225,227,.22);border-left:2px solid rgba(181,220,223,.48);border-radius:0;outline:none;background:rgba(2,8,12,.58);color:rgba(243,247,247,.96);font:inherit;line-height:1.72;box-shadow:inset 0 0 0 1px rgba(255,255,255,.018)}
.tribunal-answer-input:focus,#tribunal-final-answer:focus{border-color:rgba(201,232,234,.42);border-left-color:rgba(195,231,234,.82);background:rgba(3,10,14,.72);box-shadow:0 0 28px rgba(145,205,209,.07),inset 0 0 0 1px rgba(255,255,255,.025)}
.tribunal-answer-actions,.tribunal-final-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.tribunal-answer-submit,#tribunal-final-submit{min-width:180px}

body[data-akasha-scene="tribunal"].tribunal-final-ready .tribunal-echo,body[data-akasha-scene="tribunal"].tribunal-final-ready .tribunal-evidence-focus{display:none!important}
body[data-akasha-scene="tribunal"].tribunal-final-ready .tribunal-evidence-node{opacity:.10!important;filter:blur(1.4px) saturate(.5)!important;pointer-events:none!important}
.tribunal-final-statement{position:absolute;z-index:80;inset:0;display:grid;place-items:center;padding:clamp(18px,4vw,54px);background:radial-gradient(circle at 50% 46%,rgba(45,22,38,.16),transparent 40%),rgba(1,5,8,.38);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.tribunal-final-shell{width:min(760px,100%);max-height:92%;overflow:auto;padding:clamp(24px,4vw,46px);border:1px solid rgba(204,227,229,.18);border-left:2px solid rgba(201,151,181,.42);background:linear-gradient(120deg,rgba(9,14,19,.96),rgba(24,13,21,.93));box-shadow:0 34px 110px rgba(0,0,0,.56),0 0 70px rgba(177,121,157,.06)}
.tribunal-final-kicker{margin:0 0 9px;color:rgba(205,165,189,.72);font-size:.72rem;letter-spacing:.16em}
.tribunal-final-shell h2{margin:0 0 22px;color:rgba(245,241,244,.97);font-size:clamp(1.55rem,3vw,2.35rem);font-weight:560;letter-spacing:.05em}
.tribunal-final-echo{margin:0 0 24px;padding:18px 20px;border-left:2px solid rgba(201,151,181,.48);background:rgba(102,56,82,.10)}
.tribunal-final-echo strong{display:block;margin-bottom:8px;color:rgba(226,191,211,.88);font-size:.76rem;letter-spacing:.13em}
.tribunal-final-echo p{margin:0;color:rgba(241,236,240,.94);font-size:clamp(1rem,1.7vw,1.18rem);line-height:1.9}
.tribunal-final-answer-label{display:block;margin:0 0 10px;color:rgba(224,234,235,.84);font-size:.88rem;line-height:1.6}
#tribunal-final-answer{min-height:178px}.tribunal-final-actions{margin-top:16px}#tribunal-final-submit{min-width:220px}
@media (min-width:900px){body[data-akasha-scene="tribunal"] #scene-column{height:calc(100vh - 82px)!important}}
@media (max-width:899px){
  body[data-akasha-scene="tribunal"] #scene-column{height:auto!important;min-height:100vh!important}
  body[data-akasha-scene="tribunal"] #connection-stage{min-height:760px!important}
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node,
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:hover,
  body[data-akasha-scene="tribunal"] #tribunal-evidence-stage>.tribunal-evidence-node:focus-visible{left:var(--x)!important;top:var(--y)!important;width:138px!important;min-height:70px!important;max-height:none!important;transform:translate(-50%,-50%) scale(var(--scale))!important;overflow:hidden!important;transition:opacity .2s ease,border-color .2s ease,background .2s ease,filter .2s ease,box-shadow .2s ease!important}
  .tribunal-answer-head{align-items:flex-start;flex-direction:column;gap:4px}.tribunal-interrogation-close{top:9px;right:9px}
  .tribunal-final-statement{position:fixed;inset:0;padding:14px}.tribunal-final-shell{width:100%;max-height:calc(100vh - 28px);padding:22px 18px}
}

/* source:readability-ui.css */
.situation-decision{margin:0 0 14px;padding:12px 14px;border:1px solid rgba(132,214,221,.28);background:rgba(27,53,64,.38);box-shadow:inset 3px 0 rgba(132,214,221,.42)}.situation-decision .eyebrow{margin-bottom:5px}.situation-decision p{margin:0;font-size:1.02rem;line-height:1.72}.situation-sections{display:grid;gap:10px}.situation-section{padding:10px 12px;border:1px solid rgba(152,207,213,.1);background:rgba(7,13,18,.27);border-radius:9px}.situation-section h3{margin:0 0 5px;font-size:.78rem;color:#aeb8c8;letter-spacing:.08em}.situation-section p{margin:0;white-space:pre-line}.situation-details{border:1px solid rgba(152,207,213,.1);border-radius:9px;background:rgba(7,13,18,.2);padding:9px 11px}.situation-details summary{cursor:pointer;color:#b9c6cf;font-size:.82rem}.situation-details[open] summary{margin-bottom:7px}.current-communication-panel{display:grid;gap:10px}.current-communication-head,.transcript-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.current-communication-head .eyebrow,.transcript-head .eyebrow{margin:0}.current-communication-list{display:grid;gap:8px}.current-communication-entry{margin:0}.current-communication-entry .timeline-meta{opacity:.72}.current-decision-prompt{padding:11px 13px;border:1px solid rgba(132,214,221,.22);border-radius:9px;background:rgba(24,48,57,.33)}.current-decision-prompt .eyebrow{margin:0 0 5px}.current-decision-prompt p:last-child{margin:0;line-height:1.62}.transcript-toggle{flex:0 0 auto;padding:5px 8px;font-size:.76rem}.transcript-panel.is-collapsed .transcript-tools,.transcript-panel.is-collapsed .transcript-list,.transcript-panel.is-collapsed #transcript-end{display:none!important}.transcript-panel.is-collapsed{padding-bottom:12px}#current-communication-panel:not(.hidden)~#result:not(.hidden) #result-body>.result-block:first-child,#current-communication-panel:not(.hidden)~#result:not(.hidden) #result-body>p.muted:last-child{display:none}.transcript-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:5px 0 8px;padding:6px 0;border-top:1px solid rgba(152,207,213,.08);border-bottom:1px solid rgba(152,207,213,.08)}.transcript-tools-left{display:flex;align-items:center;gap:8px;min-width:0}.transcript-tools label{display:flex;align-items:center;gap:6px;font-size:.76rem;color:#aeb8c8;white-space:nowrap}.transcript-tools button{padding:5px 8px;font-size:.76rem}.timeline-turn-group{border:1px solid rgba(152,207,213,.11);border-radius:9px;background:rgba(6,11,16,.22);overflow:clip}.timeline-turn-group>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:7px 9px;color:#aeb8c8;font-size:.75rem;list-style:none}.timeline-turn-group>summary::-webkit-details-marker{display:none}.timeline-turn-group>summary::after{content:'開く';opacity:.65}.timeline-turn-group[open]>summary::after{content:'閉じる'}.timeline-turn-entries{display:grid;gap:7px;padding:0 8px 8px}.timeline-turn-group.is-latest{border-color:rgba(111,168,255,.23)}.timeline-turn-group.is-latest>summary{color:#c7dcf5}.transcript-list.is-results-only .timeline-entry:not(.timeline-result):not(.timeline-story){display:none}.transcript-list.is-results-only .timeline-turn-group:not(.has-result){display:none}.transcript-list{scrollbar-gutter:stable}.player-facing-detail{font-size:.78rem;color:#97a5af;margin-top:5px}@media(min-width:900px) and (min-height:700px){.transcript-tools{flex:0 0 auto}.transcript-list{max-height:none;min-height:0}.current-communication-list{max-height:34vh;overflow:auto;scrollbar-gutter:stable}.transcript-panel.is-collapsed{flex:0 0 auto!important;min-height:0!important}.situation-sections{grid-template-columns:1fr}.situation-section p{line-height:1.65}}@media(max-width:720px){.transcript-tools{align-items:stretch;flex-direction:column}.transcript-tools-left{justify-content:space-between}.transcript-tools button{width:100%}.situation-decision{padding:10px 11px}.timeline-player{margin-left:3%}.current-communication-panel{gap:8px}.current-decision-prompt{padding:10px 11px}}

/* source:intent-status-ui.css */
#intent-mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 12px}
#intent-mode-switch button{min-height:44px;border:1px solid rgba(171,222,226,.18);background:rgba(7,20,24,.52)}
#intent-mode-switch button[aria-pressed="true"]{border-color:rgba(183,232,235,.55);background:rgba(85,157,166,.18);box-shadow:inset 0 0 0 1px rgba(192,236,239,.08)}
#intent-mode-help{margin:0 0 10px;font-size:.82rem;line-height:1.5}
#explicit-action-hand{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0}
#explicit-action-hand button{min-height:46px;text-align:left;padding:9px 11px}
#explicit-action-hand button[aria-pressed="true"]{border-color:rgba(198,235,237,.62);background:rgba(92,160,168,.2)}
#explicit-action-hand small{display:block;margin-top:3px;opacity:.64;font-size:.72rem}
#contract-composer{display:grid;gap:10px;margin:10px 0 12px;padding:12px;border:1px solid rgba(176,221,225,.16);background:rgba(3,12,15,.34)}
.contract-grid{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:8px}
.contract-grid.three{grid-template-columns:minmax(0,1fr) 92px 92px;gap:8px}
#contract-composer label{display:grid;gap:5px;font-size:.76rem;color:rgba(222,238,239,.72)}
#contract-composer input,#contract-composer select,#contract-composer textarea{width:100%;box-sizing:border-box}
#contract-composer textarea{min-height:58px;resize:vertical}
#communication-progress{min-height:1.4em;margin:8px 0 0;font-size:.78rem;letter-spacing:.02em;color:rgba(202,229,231,.72)}
#communication-progress[data-state="waiting"]{color:rgba(232,220,181,.8)}
#communication-progress[data-state="error"]{color:rgba(240,179,179,.9)}
#communication-progress.hidden{display:none}
#consultation-used-note{margin:8px 0 0;font-size:.78rem;color:rgba(232,220,181,.8)}
.intent-hidden{display:none!important}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node.is-archived{opacity:.72;filter:saturate(.28);border-style:dashed}
body[data-akasha-scene="tribunal"] .tribunal-evidence-node.is-archived .evidence-kind{letter-spacing:.08em}
body[data-akasha-scene="tribunal"] #tribunal-evidence-focus.is-archived-record .interrogation-archived{opacity:.78;border-style:dashed}
body[data-akasha-scene="tribunal"] #tribunal-evidence-focus.is-archived-record .focus-question{filter:saturate(.35)}
@media(max-width:720px){#explicit-action-hand{grid-template-columns:1fr}.contract-grid,.contract-grid.three{grid-template-columns:1fr 82px}.contract-grid.three label:last-child{grid-column:1/-1}}

/* source:state-visual-feedback.css */
/* State-driven feedback only. These effects never alter mechanics or imply hidden causality. */
#self-panel{position:relative;isolation:isolate}
#self-panel>*{position:relative;z-index:2}
#self-panel::before,#self-panel::after{content:"";position:absolute;inset:1px;pointer-events:none;z-index:1;border-radius:inherit;opacity:0}

/* Power uses the already-established public bands: <40 low, <20 critical, 0 stopped. */
body[data-akasha-power="low"] #self-status{filter:saturate(.82) brightness(.93)}
body[data-akasha-power="critical"] #self-status{filter:saturate(.68) brightness(.82);animation:akasha-power-signal 2.8s steps(2,end) infinite}

/* ICE is presentation-only feedback: lower visible values produce edge interference, not a new rule. */
body[data-akasha-ice="low"] #self-panel::after,
body[data-akasha-ice="depleted"] #self-panel::after{
  opacity:.22;
  background:
    linear-gradient(90deg,rgba(111,183,206,.18),transparent 12%,transparent 88%,rgba(111,183,206,.18)),
    repeating-linear-gradient(180deg,transparent 0 13px,rgba(180,224,227,.06) 14px,transparent 15px 28px);
  box-shadow:inset 0 0 18px rgba(111,183,206,.13)
}
body[data-akasha-ice="depleted"] #self-panel::after{opacity:.34;filter:contrast(1.16)}

/* CPU >= 80 is already meaningful in the public help text; keep the effect warm and subtle. */
body[data-akasha-cpu="high"] #self-panel::before{
  opacity:.18;
  background:radial-gradient(circle at 72% 50%,rgba(210,132,82,.34),transparent 58%);
  box-shadow:inset 0 0 28px rgba(210,132,82,.10);
  animation:akasha-cpu-load 2.4s ease-in-out infinite
}

/* High world tension strengthens scan/noise without creating a second global mood system. */
body[data-akasha-tension="high"] #connection-stage::before{opacity:.16!important}
body[data-akasha-tension="high"] #connection-stage{box-shadow:inset 0 0 42px rgba(151,91,102,.07)}

.self-risk-summary{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:8px;border-top:1px solid rgba(190,216,220,.10);font-size:.78rem;line-height:1.4}
.self-risk-label{font-weight:700;letter-spacing:.08em;opacity:.72}
.self-risk-item{padding:2px 7px;border:1px solid rgba(190,216,220,.15);border-radius:999px;background:rgba(4,10,14,.22)}
body[data-akasha-power="critical"] .self-risk-item,
body[data-akasha-cpu="high"] .self-risk-item{border-color:rgba(211,159,126,.24)}

@keyframes akasha-power-signal{
  0%,100%{opacity:1;transform:translateX(0)}
  46%{opacity:.94;transform:translateX(0)}
  48%{opacity:.78;transform:translateX(-.4px)}
  51%{opacity:.93;transform:translateX(.4px)}
}
@keyframes akasha-cpu-load{0%,100%{opacity:.12}50%{opacity:.22}}

@media(prefers-reduced-motion:reduce){
  body[data-akasha-power="critical"] #self-status,
  body[data-akasha-cpu="high"] #self-panel::before{animation:none!important}
}

/* source:run-interruption-ui.css */
body[data-akasha-scene="interrupted"] #dilemma{
  border-style:dashed;
  filter:saturate(.58);
}
body[data-akasha-scene="interrupted"] #dilemma::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:repeating-linear-gradient(180deg,transparent 0 7px,rgba(210,230,232,.018) 7px 8px);
}
body[data-akasha-scene="interrupted"] #self-panel{
  filter:saturate(.35) brightness(.76);
}
body[data-akasha-scene="interrupted"] #intent-ui-shell,
body[data-akasha-scene="interrupted"] #dialogue,
body[data-akasha-scene="interrupted"] #story-cinematic,
body[data-akasha-scene="interrupted"] #tribunal-evidence-stage{
  display:none!important;
}
.run-interruption-note{
  border-style:dashed!important;
  filter:saturate(.62);
}
@media (prefers-reduced-motion:reduce){
  body[data-akasha-scene="interrupted"] *{animation:none!important;transition:none!important}
}
