/* NOVAIRIUM | Result reply typography / composition microfix v1.1
   Only affects the result scene. Does not modify approved share art, script, or audio. */

/* Use document flow for result content to prevent the reply from crossing the action bar
   when text wraps differently across results and screen widths. */
.theatre.scene-reveal .scene-grid { display:none; }
.theatre.scene-reveal .reveal {
  position:relative;
  inset:auto;
  width:92%;
  height:auto;
  margin:25px auto 0;
  justify-content:flex-start;
  transform:none;
}
.theatre.scene-reveal .reveal-intro {
  position:relative;
  top:auto;
  margin:0 0 16px;
}
.theatre.scene-reveal .reveal-intro strong {
  font-size:clamp(25px,2.7vw,33px);
}
.theatre.scene-reveal .reveal-card {padding-top:0;margin:0;}
.theatre.scene-reveal .control-zone {margin-top:20px;}

/* Turn the response from tiny helper text into a readable dialogue panel. */
.theatre.scene-reveal .result-reaction {
  width:min(82%,685px);
  min-height:96px;
  gap:15px;
  margin-top:14px;
  padding:15px 19px;
  border:1px solid rgba(231,192,128,.79);
  border-left:3px solid #ebbd72;
  border-radius:12px;
  background:linear-gradient(110deg,rgba(24,35,54,.98),rgba(12,22,37,.97));
  box-shadow:0 9px 28px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,235,194,.12);
  align-items:center;
}
.theatre.scene-reveal .result-reaction img {
  width:67px;
  height:65px;
  flex:0 0 67px;
  filter:drop-shadow(0 3px 7px rgba(0,0,0,.55));
}
.theatre.scene-reveal .result-reaction > div {min-width:0;flex:1;}
.theatre.scene-reveal .result-reaction span {
  display:block;
  color:#f1cd92;
  font-size:12px;
  font-weight:850;
  line-height:1.35;
  letter-spacing:.075em;
}
.theatre.scene-reveal .result-reaction p {
  font-size:clamp(19px,1.75vw,21px);
  line-height:1.62;
  font-weight:750;
  letter-spacing:.018em;
  color:#fff8eb;
  margin:6px 0 0;
  overflow-wrap:anywhere;
  word-break:normal;
  text-shadow:0 2px 9px rgba(0,0,0,.35);
}
.theatre.scene-reveal .result-reaction.reply-refresh {
  animation:replyFocus .27s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes replyFocus {
  from {opacity:.5;transform:translateY(4px)}
  to {opacity:1;transform:translateY(0)}
}
@media(max-width:760px) {
  .theatre.scene-reveal .reveal {
    width:calc(100% - 25px);
    margin-top:24px;
  }
  .theatre.scene-reveal .reveal-intro {margin-bottom:14px;}
  .theatre.scene-reveal .reveal-intro strong {font-size:25px;}
  .theatre.scene-reveal .reveal-card {width:100%;padding-top:0;margin:0;}
  .theatre.scene-reveal .result-reaction {
    width:100%;
    min-height:100px;
    gap:10px;
    margin-top:14px;
    padding:12px 13px;
  }
  .theatre.scene-reveal .result-reaction img {
    width:52px;
    height:54px;
    flex-basis:52px;
  }
  .theatre.scene-reveal .result-reaction span {font-size:11px;}
  .theatre.scene-reveal .result-reaction p {
    font-size:18px;
    line-height:1.55;
    letter-spacing:0;
  }
}
@media(max-width:420px) {
  .theatre.scene-reveal .reveal {width:calc(100% - 20px);margin-top:21px;}
  .theatre.scene-reveal .reveal-card {margin:0;padding-top:0;}
  .theatre.scene-reveal .result-reaction {gap:9px;padding:11px 12px;}
}
@media(prefers-reduced-motion:reduce) {
  .theatre.scene-reveal .result-reaction.reply-refresh {animation:none;}
}

@media (max-width: 760px) {
  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin: 0 0 5px;
  }
  .mast-title h1 {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    font-size: clamp(20px, 5.8vw, 30px);
    line-height: 1.3;
    letter-spacing: .02em;
  }
  .mast-title h1 > span { white-space: nowrap; }
  .masthead .kicker, .mast-title p, .masthead .compare { display: none; }
  .masthead .mast-actions { margin: 0; gap: 6px; flex-wrap: wrap; }

  .page:has(.theatre.is-idle) {
    display: grid;
    grid-template: auto minmax(0, 1fr) / minmax(0, 1fr);
    height: 100vh;
    height: 100svh;
    padding: max(6px, env(safe-area-inset-top)) 8px max(16px, env(safe-area-inset-bottom));
  }
  main:has(.theatre.is-idle) { min-height: 0; }
  .game-stage:has(.theatre.is-idle) {
    display: grid;
    height: 100%;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  }

  .theatre.is-idle {
    display: grid;
    grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr);
    min-height: 0;
  }
  .is-idle .topline { margin: 6px 12px 0; }
  .is-idle .scene-grid {
    min-height: 0;
    grid-template: minmax(36px, 1fr) auto / minmax(0, 1fr);
    align-content: stretch;
    padding: 0 12px 4px;
    overflow-y: auto;
  }
  .is-idle .character-zone { align-self: stretch; height: auto; min-height: 0; }
  .is-idle .character-wrap img { height: 100%; max-height: 220px; }
  .is-idle .script-zone { padding: 3px; }
  .is-idle .script-section { margin: 0 0 7px; }
  .is-idle .section-rule { margin: 3px 0; }
  .is-idle .scene-headline { margin: 2px 0; font-size: 18px; line-height: 1.25; }
  .is-idle .scene-headline br { display: none; }
  .is-idle .script-card { min-height: 0; padding: 8px 10px; }
  .is-idle .script-text { min-height: 0; margin-top: 2px; font-size: 16px; line-height: 1.5; }
  .is-idle .control-zone { min-height: 0; margin: 0 10px; padding: 4px 0 10px; }
  .is-idle .progress-note, .is-idle .control-help:empty { display: none; }
  .is-idle .sound-notice { margin: 3px 0 6px; font-size: 14px; }
  .is-idle .buttons { gap: 6px; flex-wrap: nowrap; align-items: stretch; }
  .is-idle .buttons .btn { min-width: 0; min-height: 44px; flex: 1 1 0; padding: 8px 3px; }
}
