:root {
  --ink: #171614;
  --muted: #6b6258;
  --paper: #f8f3ea;
  --panel: #fffaf1;
  --line: #ded2c2;
  --coal: #242321;
  --amber: #e6a93c;
  --amber-dark: #8c5a0f;
  --mint: #5fb7a0;
  --red: #bd4e45;
  --green: #4f8e65;
  --shadow: 0 18px 50px rgba(31, 24, 16, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(230, 169, 60, 0.18), transparent 30%),
    linear-gradient(135deg, #f4eee5 0%, #e9e0d2 52%, #d6ded9 100%);
  color: var(--ink);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

body.intro-active {
  overflow: hidden;
  background: #070706;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

body.sheet-open {
  overflow: hidden;
}

body.result-reveal-active {
  overflow: hidden;
  background: #050504;
}

.case-intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  color: #fff8ea;
  background: #070706;
  opacity: 1;
  transition: opacity 360ms ease, transform 360ms ease;
}

.case-intro[hidden] {
  display: none;
}

.case-intro::before,
.case-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.case-intro::before {
  background-image: url("./assets/ax/cover.jpg");
  background-position: center;
  background-size: cover;
  filter: saturate(0.88) contrast(1.08) brightness(0.72);
  transform: scale(1.02);
  transition: filter 380ms ease, transform 5200ms ease;
}

.case-intro::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 7, 6, 0.94) 0%, rgba(7, 7, 6, 0.72) 42%, rgba(7, 7, 6, 0.14) 100%),
    linear-gradient(0deg, rgba(7, 7, 6, 0.94) 0%, rgba(7, 7, 6, 0.46) 42%, rgba(7, 7, 6, 0.18) 100%);
}

body.intro-blackout .case-intro::before {
  filter: saturate(0.62) contrast(1.2) brightness(0.08);
  transform: scale(1.06);
}

body.intro-blackout .case-intro::after {
  background: rgba(0, 0, 0, 0.9);
}

body.intro-exiting .case-intro {
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
}

body.intro-active .app-shell,
body.intro-active .radio-dock {
  opacity: 0;
  pointer-events: none;
}

.intro-copy {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100vw - 44px));
  padding: 0 0 9vh 7vw;
  transition: opacity 260ms ease, transform 320ms ease;
}

body.intro-blackout .intro-copy {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

.intro-code {
  margin: 0 0 18px;
  color: #f1c76e;
  font-size: 0.86rem;
  font-weight: 900;
}

.intro-copy h1 {
  max-width: 10em;
  color: #fffaf0;
  font-size: 4.1rem;
  line-height: 1.04;
  word-break: keep-all;
  overflow-wrap: normal;
  text-shadow: 0 16px 48px rgba(0, 0, 0, 0.58);
}

.intro-brief {
  display: grid;
  gap: 8px;
  margin: 26px 0 22px;
  color: rgba(255, 248, 234, 0.9);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.58;
}

.intro-brief p {
  margin: 0;
}

.intro-status {
  min-height: 24px;
  margin: 0 0 14px;
  color: rgba(255, 248, 234, 0.64);
  font-size: 0.86rem;
  font-weight: 900;
}

.intro-start {
  min-width: 154px;
  min-height: 52px;
  border: 1px solid rgba(255, 248, 234, 0.26);
  border-radius: 8px;
  background: #fff8ea;
  color: #171614;
  padding: 0 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  font-weight: 900;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.intro-start:hover {
  transform: translateY(-1px);
  background: #f1c76e;
}

.intro-start:disabled {
  cursor: default;
  transform: none;
  background: rgba(255, 248, 234, 0.14);
  color: rgba(255, 248, 234, 0.78);
}

.intro-radio-briefing {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  z-index: 3;
  width: min(440px, calc(100vw - 44px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #050505;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.68);
  color: #f5f5f5;
  opacity: 0;
  transform: translate(-50%, 26px) scale(0.98);
  transition: opacity 420ms ease, transform 540ms cubic-bezier(0.2, 0.82, 0.2, 1);
  overflow: hidden;
  pointer-events: none;
}

.intro-radio-briefing::before {
  content: "";
  display: none;
}

body.intro-radio-link .intro-radio-briefing {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.intro-radio-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #050505;
  color: rgba(245, 245, 245, 0.58);
  font-size: 0.75rem;
  font-weight: 800;
}

.signal-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #a55f31;
  box-shadow: 0 0 0 rgba(241, 199, 110, 0);
}

body.intro-radio-link .signal-dot {
  animation: signalPulse 900ms ease-in-out infinite;
}

body.intro-connected .signal-dot,
body.intro-ready .signal-dot {
  background: #5fb7a0;
  box-shadow: 0 0 18px rgba(95, 183, 160, 0.62);
  animation: none;
}

.intro-radio-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #050505;
}

.intro-radio-head img {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  object-fit: cover;
}

.intro-radio-head p {
  margin: 0 0 4px;
  color: rgba(245, 245, 245, 0.52);
  font-size: 0.76rem;
  font-weight: 800;
}

.intro-radio-head h2 {
  color: #f5f5f5;
  font-size: 1.24rem;
}

.intro-radio-head span {
  color: rgba(245, 245, 245, 0.5);
  font-size: 0.8rem;
  font-weight: 700;
}

.intro-transcript {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
  max-height: min(42vh, 360px);
  padding: 18px 14px;
  overflow-y: auto;
  background: #050505;
}

.intro-line {
  width: fit-content;
  max-width: 86%;
  margin: 0;
  border: 0;
  border-radius: 20px 20px 20px 5px;
  background: #262626;
  color: #f5f5f5;
  padding: 10px 13px;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.48;
  opacity: 0;
  transform: translateY(6px);
  animation: radioLineIn 220ms ease forwards;
  overflow-wrap: anywhere;
}

.intro-line.command {
  background: #262626;
  color: #f5f5f5;
}

.intro-line.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.08em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: rgba(245, 245, 245, 0.92);
  animation: caretBlink 760ms steps(2, start) infinite;
}

.intro-typing {
  width: fit-content;
  max-width: 86%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 0;
  border-radius: 20px 20px 20px 5px;
  background: #262626;
  color: rgba(245, 245, 245, 0.52);
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  animation: radioLineIn 220ms ease forwards;
  overflow-wrap: anywhere;
}

.typing-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  width: auto;
}

.typing-bars span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(245, 245, 245, 0.58);
  animation: typingDot 1.15s ease-in-out infinite;
}

.typing-bars span:nth-child(2) {
  animation-delay: 120ms;
}

.typing-bars span:nth-child(3) {
  animation-delay: 240ms;
}

.typing-label {
  color: rgba(245, 245, 245, 0.45);
}

.intro-radio-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 14px;
  background: #050505;
}

.intro-enter {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #3797f0;
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  animation: radioLineIn 260ms ease forwards;
}

.intro-enter:hover {
  background: #4aa3f2;
}

.intro-enter[hidden] {
  display: none;
}

@keyframes radioLineIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

@keyframes typingDot {
  0%,
  80%,
  100% {
    opacity: 0.34;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes signalPulse {
  0%,
  100% {
    opacity: 0.45;
    box-shadow: 0 0 0 rgba(241, 199, 110, 0);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(241, 199, 110, 0.62);
  }
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
    filter: brightness(0.78);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes scanPass {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.result-reveal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
  background: #020202;
  color: #fff8ea;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 420ms ease;
}

.result-reveal::before,
.result-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.result-reveal::before {
  background-image: var(--result-reveal-image);
  background-position: center;
  background-size: cover;
  filter: saturate(0.7) contrast(1.08) brightness(0.22) blur(2px);
  opacity: 0.34;
  transform: scale(1.07);
}

.result-reveal::after {
  background:
    radial-gradient(circle at 50% 42%, rgba(241, 199, 110, 0.1), transparent 22%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.72) 44%, rgba(0, 0, 0, 0.95));
}

.result-reveal.is-active {
  opacity: 1;
}

.result-reveal.is-dismissing {
  opacity: 0;
}

.result-reveal-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 36px));
  padding: 32px;
  border: 1px solid rgba(255, 248, 234, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 17, 15, 0.9), rgba(6, 6, 5, 0.94)),
    radial-gradient(circle at 20% 0%, rgba(241, 199, 110, 0.12), transparent 40%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
  text-align: center;
  transform: translateY(14px);
  transition: transform 420ms ease, opacity 420ms ease;
}

.result-reveal.is-active .result-reveal-card {
  transform: translateY(0);
}

.result-reveal.is-verdict .result-reveal-card {
  opacity: 1;
}

.result-reveal-code {
  margin: 0 0 14px;
  color: #f1c76e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-reveal-card h2 {
  margin: 0;
  color: #fffaf0;
  font-size: clamp(2.05rem, 5vw, 4.8rem);
  line-height: 1.04;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.72);
}

.result-reveal-scan {
  display: none;
}

.result-reveal-scan::after {
  display: none;
}

.result-reveal-grid {
  display: none;
}

.result-reveal-grid span {
  display: none;
}

.result-reveal-target {
  min-height: 26px;
  max-width: 560px;
  margin: 20px auto 0;
  color: rgba(255, 248, 234, 0.78);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.6;
}

.result-reveal-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 520px;
  margin: 22px auto 0;
}

.result-reveal-steps span {
  border: 1px solid rgba(255, 248, 234, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.06);
  color: rgba(255, 248, 234, 0.44);
  padding: 10px 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.result-reveal-steps span.is-active {
  border-color: rgba(241, 199, 110, 0.44);
  background: rgba(241, 199, 110, 0.16);
  color: #f1c76e;
}

.app-shell {
  width: min(1180px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.topbar {
  padding: 8px 0 14px;
}

.mini-status {
  margin: 0 0 5px;
  color: var(--amber-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--amber-dark);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.28rem, 2vw, 1.85rem);
  line-height: 1.18;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.25;
}

.workspace {
  display: block;
}

.workspace.document-image-workspace {
  grid-template-columns: 1fr;
}

.case-panel,
.ai-panel {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.case-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 620px;
  background: transparent;
}

body.page-transition-in .case-panel {
  animation: pageEnter 320ms cubic-bezier(0.2, 0.82, 0.2, 1);
}

.case-panel.document-image {
  grid-template-columns: minmax(520px, 1.05fr) minmax(420px, 0.95fr);
  min-height: 620px;
}

.media-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  background: #151412;
  overflow: hidden;
}

.media-frame::before {
  content: attr(data-evidence-label);
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  border: 1px solid rgba(255, 248, 234, 0.2);
  border-radius: 999px;
  background: rgba(12, 11, 10, 0.78);
  color: #f1c76e;
  padding: 7px 11px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 34%, rgba(0, 0, 0, 0.18)),
    radial-gradient(circle at 18% 12%, rgba(241, 199, 110, 0.16), transparent 24%);
}

.media-frame img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  display: block;
  filter: none;
}

.media-frame img.contain {
  object-fit: contain;
  background: #151412;
  padding: 10px;
}

.case-panel[data-media-type="wide"] .media-frame {
  min-height: 100%;
  aspect-ratio: auto;
}

.case-panel[data-media-type="portrait"] .media-frame {
  min-height: 620px;
  height: 620px;
  background: #171614;
}

.case-panel[data-media-type="portrait"] .media-frame img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 0;
}

.case-panel[data-media-type="document"] .media-frame img,
.case-panel[data-media-type="wide"] .media-frame img {
  width: 100%;
  height: auto;
  max-height: 100%;
}

.suspect-lineup {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 620px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 22px;
  background: #10100f;
}

.suspect-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 234, 0.18);
  border-radius: 8px;
  background: #171614;
}

.suspect-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
  padding: 0;
  filter: saturate(0.92) contrast(1.04);
}

.suspect-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.82) 100%);
}

.suspect-card-info {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  gap: 4px;
  color: #fff8ea;
}

.suspect-badge {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 234, 0.28);
  border-radius: 999px;
  background: rgba(15, 14, 13, 0.82);
  color: #f1c76e;
  font-size: 0.86rem;
  font-weight: 900;
}

.suspect-card-info strong {
  font-size: 1.12rem;
  font-weight: 900;
}

.suspect-card-info span:not(.suspect-badge) {
  color: rgba(255, 248, 234, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}

.suspect-card-info p {
  margin: 5px 0 0;
  color: rgba(255, 248, 234, 0.92);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.36;
}

.suspect-marker-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  pointer-events: none;
}

.suspect-marker-layer::before,
.suspect-marker-layer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background:
    linear-gradient(180deg, transparent, rgba(255, 248, 234, 0.56) 18%, rgba(255, 248, 234, 0.16) 78%, transparent),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.48), transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.suspect-marker-layer::before {
  left: 33.333%;
}

.suspect-marker-layer::after {
  left: 66.666%;
}

.suspect-marker {
  align-self: end;
  min-width: 0;
  margin: 0 16px 16px;
  border: 1px solid rgba(255, 248, 234, 0.24);
  border-radius: 8px;
  background: rgba(10, 9, 8, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  color: #fff8ea;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
}

.suspect-marker span {
  display: inline-block;
  margin-bottom: 4px;
  color: #f1c76e;
  font-size: 0.76rem;
  font-weight: 900;
}

.suspect-marker strong {
  display: block;
  color: #fffaf0;
  font-size: clamp(0.86rem, 1.2vw, 1.04rem);
  line-height: 1.25;
}

.suspect-marker small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 248, 234, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.case-panel[data-step-id="culprit"] .suspect-marker small {
  display: none;
}

.case-panel.document-image .media-frame {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 620px;
  aspect-ratio: auto;
  background: #fff;
}

.case-panel.document-image .media-frame img {
  width: 100%;
  max-width: 1280px;
  height: auto;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  padding: 0;
  background: #fff;
  filter: none;
}

.case-panel.document-image .media-frame::after {
  display: none;
}

.case-panel.document-image .content-panel {
  padding: 22px 26px 26px;
}

.case-panel[data-step-id="suspects"],
.case-panel[data-step-id="culprit"] {
  grid-template-columns: 1fr;
  min-height: auto;
  border-color: rgba(36, 35, 33, 0.08);
  background: transparent;
  box-shadow: 0 18px 48px rgba(47, 37, 24, 0.12);
}

.case-panel[data-step-id="suspects"] .media-frame,
.case-panel[data-step-id="culprit"] .media-frame {
  min-height: 620px;
  aspect-ratio: auto;
  background: #10100f;
}

.case-panel[data-step-id="suspects"] .media-frame img,
.case-panel[data-step-id="culprit"] .media-frame img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  padding: 0;
  background: transparent;
}

.case-panel[data-step-id="suspects"] .media-frame::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.24)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 52%, rgba(0, 0, 0, 0.42));
}

.case-panel[data-step-id="culprit"] .media-frame::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 42%, rgba(0, 0, 0, 0.12));
}

.case-panel[data-step-id="suspects"] .content-panel,
.case-panel[data-step-id="culprit"] .content-panel {
  min-height: auto;
}

.case-panel[data-step-kind="result"] {
  display: block;
  width: min(720px, 100%);
  margin: 0 auto;
  min-height: auto;
  background: transparent;
  box-shadow: none;
}

.case-panel[data-step-kind="result"] .media-frame {
  min-height: 420px;
  height: min(52vh, 560px);
  aspect-ratio: auto;
  padding: 0;
  border-radius: 16px 16px 0 0;
  background: #151412;
}

.case-panel[data-step-kind="result"] .media-frame::before {
  content: "수사 결과";
  border-color: rgba(255, 248, 234, 0.28);
  background: rgba(12, 11, 10, 0.72);
}

.case-panel[data-step-kind="result"] .media-frame::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 34%, rgba(0, 0, 0, 0.58)),
    radial-gradient(circle at 50% 22%, rgba(241, 199, 110, 0.08), transparent 30%);
}

.case-panel[data-step-kind="result"] .media-frame img {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: cover;
  object-position: center 24%;
  padding: 0;
  filter: saturate(0.8) contrast(1.05) brightness(0.82) blur(1.2px);
  transform: scale(1.035);
}

.case-panel[data-step-kind="result"] .content-panel {
  position: relative;
  width: min(640px, calc(100% - 32px));
  min-height: auto;
  margin: -142px auto 0;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 28px 80px rgba(31, 24, 16, 0.2);
  color: var(--ink);
  padding: 30px 30px 26px;
}

.case-panel[data-step-kind="result"] .content-panel::before {
  display: none;
}

.case-panel[data-step-kind="result"] .content-panel > .scene-kicker,
.case-panel[data-step-kind="result"] .content-panel > h2 {
  display: none;
}

.case-panel[data-step-kind="result"] .scene-body {
  display: block;
  max-width: none;
  margin: 0;
  color: #302b25;
  font-size: 1rem;
}

.case-memo {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  border: 1px solid rgba(36, 35, 33, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  padding: 12px;
}

.case-memo-title {
  color: #8c5a0f;
  font-size: 0.78rem;
  font-weight: 900;
}

.case-memo-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-top: 1px solid rgba(36, 35, 33, 0.08);
  padding-top: 8px;
}

.case-memo-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.case-memo-row span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #24211e;
  color: #fff8ea;
  font-size: 0.8rem;
  font-weight: 900;
}

.case-memo-row p {
  margin: 0;
  color: #302b25;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.48;
}

.learning-takeaways {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid rgba(140, 90, 15, 0.16);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.62);
  padding: 14px 16px;
}

.learning-takeaways-title {
  color: #8c5a0f;
  font-size: 0.82rem;
  font-weight: 900;
}

.learning-takeaways ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.learning-takeaways li {
  color: #302b25;
  line-height: 1.55;
}

.result-summary {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.result-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(36, 35, 33, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  padding: 12px 14px;
}

.result-summary-row span {
  color: #8c5a0f;
  font-size: 0.78rem;
  font-weight: 900;
}

.result-summary-row strong {
  color: var(--ink);
  text-align: right;
}

.final-result-card {
  display: grid;
  gap: 18px;
}

.final-result-eyebrow,
.final-result-selected {
  margin: 0;
  text-align: center;
  font-weight: 900;
}

.final-result-eyebrow {
  color: #8c5a0f;
  font-size: 0.9rem;
}

.final-result-selected {
  color: #6b6258;
  font-size: 1.05rem;
}

.final-result-card h3 {
  margin: -4px 0 0;
  color: var(--ink);
  font-size: clamp(1.62rem, 3.4vw, 2.4rem);
  line-height: 1.18;
  text-align: center;
  word-break: keep-all;
}

.final-result-divider {
  width: 34px;
  height: 4px;
  justify-self: center;
  border-radius: 999px;
  background: rgba(36, 35, 33, 0.16);
}

.final-result-tone {
  margin: 0;
  color: #bd4e45;
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.62;
  text-align: center;
  word-break: keep-all;
}

.final-result-card[data-correct="true"] .final-result-tone {
  color: #8c5a0f;
}

.final-result-section,
.final-result-evidence {
  display: grid;
  gap: 9px;
}

.final-result-section strong,
.final-result-evidence strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.final-result-section p {
  margin: 0;
  color: #302b25;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.72;
}

.final-result-evidence {
  border: 1px solid rgba(140, 90, 15, 0.15);
  border-radius: 12px;
  background: rgba(244, 234, 220, 0.54);
  padding: 14px 16px;
}

.final-result-evidence ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.final-result-evidence li {
  color: #302b25;
  line-height: 1.55;
}

.result-report {
  display: grid;
  gap: 18px;
  max-width: 920px;
}

.result-report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(36, 35, 33, 0.14);
  padding-bottom: 14px;
}

.result-report-meta {
  display: grid;
  gap: 4px;
}

.result-report-meta span,
.result-report-row span,
.result-report-findings > strong {
  color: #8c5a0f;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.result-report-meta strong {
  color: #51483f;
  font-size: 0.9rem;
  font-weight: 900;
}

.result-report-verdict {
  flex: 0 0 auto;
  border: 1px solid rgba(36, 35, 33, 0.12);
  border-radius: 999px;
  background: #24211e;
  color: #fff8ea;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.result-report h3 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.3vw, 2.4rem);
  line-height: 1.18;
  word-break: keep-all;
}

.result-report-lead,
.result-report-closing {
  max-width: 840px;
  margin: 0;
  color: #302b25;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.7;
}

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

.result-report-row {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 94px;
  border: 1px solid rgba(36, 35, 33, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  padding: 13px 14px;
}

.result-report-row strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.45;
}

.result-report-findings {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(36, 35, 33, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.64);
  padding: 15px 16px;
}

.result-report-findings ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.result-report-findings li {
  color: #302b25;
  line-height: 1.58;
}

.result-report-closing {
  border-left: 4px solid rgba(140, 90, 15, 0.42);
  background: rgba(255, 255, 255, 0.42);
  padding: 12px 14px;
}

.case-panel[data-step-kind="result"] .action-row {
  margin-top: 22px;
}

.case-panel[data-step-kind="result"] .primary-button {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  background: #24211e;
  color: #fff8ea;
}

.content-panel {
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-width: 0;
  background:
    linear-gradient(180deg, #fffaf1, #f4eadc),
    radial-gradient(circle at 100% 0%, rgba(189, 78, 69, 0.08), transparent 28%);
}

.scene-kicker {
  margin: 0 0 8px;
  color: #8c5a0f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scene-body {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
  color: #302b25;
  font-size: 1rem;
  line-height: 1.72;
}

.scene-body p {
  margin: 0;
}

.formula-grid {
  display: grid;
  gap: 8px;
  margin: 4px 0;
}

.formula-line {
  border: 1px solid rgba(230, 169, 60, 0.28);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: rgba(230, 169, 60, 0.11);
  padding: 10px 12px;
  font-weight: 800;
}

.option-list {
  display: grid;
  gap: 11px;
  margin-top: auto;
}

.option-button {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(36, 35, 33, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(250, 243, 231, 0.96));
  color: var(--ink);
  padding: 13px 14px;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.option-button:hover {
  transform: translateY(-1px);
  border-color: rgba(140, 90, 15, 0.52);
  background: #fff8ea;
  box-shadow: 0 12px 28px rgba(31, 24, 16, 0.11);
}

.option-button:disabled {
  cursor: default;
}

.option-button:disabled:not(.is-correct):not(.is-wrong) {
  opacity: 0.54;
}

.option-button.is-correct {
  border-color: rgba(79, 142, 101, 0.58);
  background:
    linear-gradient(180deg, rgba(238, 250, 239, 0.98), rgba(224, 242, 227, 0.98));
  box-shadow: 0 12px 30px rgba(35, 80, 50, 0.12);
}

.option-button.is-correct .option-index {
  background: #245133;
  color: #f5fff4;
}

.option-index {
  min-width: 88px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(36, 35, 33, 0.12);
  border-radius: 8px;
  background: #2d2a27;
  color: #fff7e6;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.option-text {
  min-width: 0;
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
  line-height: 1.52;
  font-weight: 760;
}

.option-formula {
  display: none;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.35;
}

.option-detail {
  color: #51483f;
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.48;
}

.feedback {
  margin-top: 16px;
  border-radius: 8px;
  border: 1px solid rgba(189, 78, 69, 0.34);
  background:
    linear-gradient(180deg, rgba(189, 78, 69, 0.1), rgba(189, 78, 69, 0.05));
  color: #682821;
  padding: 12px 14px;
  line-height: 1.55;
  font-weight: 760;
}

.feedback[data-good="true"] {
  border-color: rgba(36, 35, 33, 0.22);
  background:
    linear-gradient(180deg, rgba(79, 142, 101, 0.13), rgba(79, 142, 101, 0.07));
  color: #245133;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.send-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 900;
}

.primary-button,
.send-button {
  background: var(--coal);
  color: #fff9ed;
}

.secondary-button {
  background: #efe3d2;
  color: var(--ink);
}

.ai-panel {
  position: fixed;
  top: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: min(420px, calc(100vw - 44px));
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fffaf1;
  transform: translateX(calc(100% + 34px));
  transition: transform 220ms ease;
}

body.sheet-open .ai-panel {
  transform: translateX(0);
}

.ai-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.commander-profile {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.commander-avatar {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(36, 35, 33, 0.16);
  border-radius: 50%;
  background: #efe3d2;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(23, 22, 20, 0.16);
}

.commander-profile .eyebrow {
  margin-bottom: 3px;
}

.commander-profile h2 {
  font-size: 1.24rem;
}

.commander-role {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.ai-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.ai-sheet-handle,
.sheet-close {
  display: none;
}

.sheet-close {
  display: inline-grid;
  place-items: center;
}

.radio-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 35;
  min-width: 178px;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(36, 35, 33, 0.16);
  border-radius: 14px;
  background: rgba(36, 35, 33, 0.96);
  color: #fff9ed;
  box-shadow: 0 16px 45px rgba(23, 22, 20, 0.26);
  padding: 8px 13px;
  text-align: left;
}

.radio-dock::after {
  content: "열기";
  justify-self: end;
  border-radius: 999px;
  background: rgba(255, 249, 237, 0.12);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

body.sheet-open .radio-dock {
  opacity: 0;
  pointer-events: none;
}

body.result-screen .radio-dock {
  opacity: 0;
  pointer-events: none;
}

.radio-dock-kicker,
.radio-dock-main {
  grid-column: 1;
}

.radio-dock-kicker {
  color: #e6c889;
  font-size: 0.72rem;
  font-weight: 900;
}

.radio-dock-main {
  font-size: 0.95rem;
  font-weight: 900;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: block;
  border: 0;
  background: rgba(23, 22, 20, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

body.sheet-open .sheet-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(36, 35, 33, 0.16);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.message {
  width: min(92%, 330px);
  border-radius: 8px;
  padding: 11px 12px;
  line-height: 1.52;
  font-size: 0.94rem;
  white-space: pre-wrap;
}

.message.assistant {
  align-self: flex-start;
  background: #efe3d2;
  color: #2d271f;
}

.message.user {
  align-self: flex-end;
  background: #242321;
  color: #fff9ed;
}

.radio-next-button {
  width: calc(100% - 32px);
  min-height: 46px;
  margin: 0 16px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--coal);
  color: #fff9ed;
  font-weight: 900;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
}

.chat-form textarea {
  width: 100%;
  resize: none;
  border: 1px solid rgba(36, 35, 33, 0.18);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  padding: 10px 11px;
  line-height: 1.45;
}

.chat-form textarea:focus,
.option-button:focus,
.primary-button:focus,
.secondary-button:focus,
.send-button:focus,
.radio-next-button:focus,
.icon-button:focus {
  outline: 3px solid rgba(230, 169, 60, 0.38);
  outline-offset: 2px;
}

.intro-start:focus {
  outline: 3px solid rgba(241, 199, 110, 0.5);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .app-shell {
    width: min(100vw - 32px, 1040px);
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .case-panel {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .case-panel.document-image {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .media-frame {
    height: auto;
    min-height: 0;
  }

  .media-frame img {
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    background: #151412;
    padding: 10px;
  }

  .case-panel[data-media-type="wide"] .media-frame {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .suspect-lineup {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    padding: 12px;
    gap: 8px;
  }

  .suspect-card-info {
    left: 9px;
    right: 9px;
    bottom: 9px;
  }

  .suspect-badge {
    width: 28px;
    height: 28px;
    font-size: 0.76rem;
  }

  .suspect-card-info strong {
    font-size: 0.96rem;
  }

  .suspect-card-info span:not(.suspect-badge),
  .suspect-card-info p {
    font-size: 0.7rem;
  }

  .case-panel[data-media-type="portrait"] .media-frame {
    min-height: 520px;
    height: min(72vh, 620px);
  }

  .case-panel[data-media-type="portrait"] .media-frame img {
    width: auto;
    height: 100%;
    max-height: 100%;
    padding: 0;
  }

  .case-panel.document-image .media-frame {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .case-panel.document-image .media-frame img {
    width: 100%;
    max-width: 1280px;
    height: auto;
    min-height: 0;
    padding: 0;
  }

  .case-panel[data-step-id="suspects"],
  .case-panel[data-step-id="culprit"],
  .case-panel[data-step-kind="result"] {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .case-panel[data-step-id="suspects"] .media-frame,
  .case-panel[data-step-id="culprit"] .media-frame {
    min-height: 0;
    aspect-ratio: auto;
  }

  .case-panel[data-step-id="suspects"] .media-frame img,
  .case-panel[data-step-id="culprit"] .media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
  }

  .case-panel[data-step-id="suspects"] .content-panel,
  .case-panel[data-step-id="culprit"] .content-panel {
    min-height: auto;
  }

  .case-panel[data-step-kind="result"] .media-frame {
    min-height: 390px;
    height: min(52vh, 520px);
    aspect-ratio: auto;
    padding: 0;
  }

  .case-panel[data-step-kind="result"] .media-frame img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    padding: 0;
  }

  .case-panel[data-step-kind="result"] .content-panel {
    border-left: 0;
    border-top: 0;
  }

}

@media (max-width: 760px) {
  .case-intro {
    align-items: end;
  }

  .case-intro::before {
    background-position: center top;
  }

  .case-intro::after {
    background:
      linear-gradient(0deg, rgba(7, 7, 6, 0.97) 0%, rgba(7, 7, 6, 0.74) 52%, rgba(7, 7, 6, 0.18) 100%);
  }

  .intro-copy {
    width: min(100vw - 32px, 520px);
    padding: 0 0 7vh;
    margin: 0 auto;
  }

  .intro-code {
    margin-bottom: 14px;
    font-size: 0.78rem;
  }

  .intro-copy h1 {
    max-width: 10em;
    font-size: clamp(2.18rem, 9.2vw, 2.55rem);
    line-height: 1.08;
  }

  .intro-brief {
    margin: 20px 0 18px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .intro-start {
    width: 100%;
  }

  .intro-radio-briefing {
    bottom: 16px;
    width: min(366px, calc(100vw - 24px));
  }

  .intro-radio-top {
    padding: 0 14px;
  }

  .intro-radio-head {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .intro-radio-head img {
    width: 50px;
    height: 50px;
  }

  .intro-radio-head h2 {
    font-size: 1.24rem;
  }

  .intro-transcript {
    min-height: 292px;
    max-height: min(43vh, 372px);
    padding: 14px;
  }

  .intro-line {
    max-width: 100%;
    font-size: 0.96rem;
  }

  .intro-typing {
    max-width: 100%;
  }

  .intro-radio-actions {
    padding: 0 14px 14px;
  }

  .intro-enter {
    width: 100%;
  }

  .media-frame::before {
    left: 12px;
    top: 12px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }

  .option-button {
    grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
    gap: 10px;
    min-height: 68px;
    padding: 11px;
  }

  .option-index {
    min-width: 78px;
    min-height: 38px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .option-text {
    font-size: 0.94rem;
  }

  .scene-body {
    gap: 10px;
    margin: 14px 0 16px;
    font-size: 0.95rem;
    line-height: 1.62;
  }

  .app-shell {
    width: min(100vw - 20px, 680px);
    padding-top: 10px;
  }

  .case-panel,
  .ai-panel {
    border-radius: 8px;
  }

  .case-panel[data-media-type="wide"] .media-frame,
  .case-panel.document-image .media-frame {
    aspect-ratio: 16 / 9;
  }

  .case-panel[data-step-id="suspects"] .media-frame,
  .case-panel[data-step-id="culprit"] .media-frame {
    min-height: 0;
    aspect-ratio: auto;
  }

  .result-reveal-card {
    padding: 22px;
  }

  .result-reveal-grid {
    grid-template-columns: 1fr;
  }

  .result-reveal-grid span {
    padding: 8px 10px;
    text-align: left;
  }

  .suspect-marker {
    margin: 0 6px 10px;
    padding: 8px;
  }

  .suspect-marker span {
    font-size: 0.66rem;
  }

  .suspect-marker strong {
    font-size: 0.78rem;
  }

  .suspect-marker small {
    display: none;
  }

  .suspect-lineup {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    padding: 10px;
  }

  .suspect-card {
    min-height: 150px;
  }

  .suspect-card img {
    height: 150px;
    object-position: center 28%;
  }

  .suspect-card-info {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
  }

  .suspect-card-info strong,
  .suspect-card-info span:not(.suspect-badge),
  .suspect-card-info p {
    grid-column: 2;
  }

  .suspect-badge {
    grid-row: 1 / span 3;
  }

  .case-panel[data-media-type="portrait"] .media-frame {
    min-height: 420px;
    height: min(74vh, 560px);
  }

  .case-panel[data-media-type="portrait"] .media-frame img {
    width: auto;
    height: 100%;
    max-height: 100%;
  }

  .case-panel[data-step-kind="result"] .media-frame {
    min-height: 360px;
    height: min(50vh, 440px);
    aspect-ratio: auto;
    padding: 0;
  }

  .case-panel[data-step-kind="result"] .media-frame img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    padding: 0;
  }

  .media-frame img {
    min-height: 0;
    max-height: none;
    padding: 8px;
  }

  .case-panel.document-image .media-frame img {
    padding: 0;
  }

  .content-panel {
    padding: 18px;
  }

  .case-panel[data-step-kind="result"] .content-panel {
    width: min(100% - 20px, 620px);
    margin-top: -92px;
    padding: 24px 18px 20px;
    border-radius: 16px;
  }

  .case-panel[data-step-kind="result"] .content-panel::before {
    display: none;
  }

  .result-summary-row {
    display: grid;
    gap: 4px;
  }

  .result-summary-row strong {
    text-align: left;
  }

  .result-report-header {
    display: grid;
    gap: 12px;
  }

  .result-report-verdict {
    justify-self: start;
  }

  .result-report-grid {
    grid-template-columns: 1fr;
  }

  .result-report-row {
    min-height: auto;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .send-button {
    width: 100%;
  }

  .app-shell {
    padding-bottom: 96px;
  }

  .workspace {
    display: block;
  }

  .ai-panel {
    position: fixed;
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 40;
    width: auto;
    height: min(74vh, 620px);
    min-height: 0;
    border-radius: 14px;
    background: #fffaf1;
    transform: translateY(calc(100% + 22px));
    transition: transform 220ms ease;
    box-shadow: 0 24px 70px rgba(23, 22, 20, 0.34);
  }

  body.sheet-open .ai-panel {
    transform: translateY(0);
  }

  .ai-sheet-handle {
    display: block;
    width: 42px;
    height: 4px;
    margin: 9px auto 0;
    border-radius: 999px;
    background: rgba(36, 35, 33, 0.24);
  }

  .sheet-close {
    display: inline-grid;
    place-items: center;
  }

  .ai-head {
    padding: 12px 14px 10px;
    background: #fffdf8;
  }

  .commander-profile {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .commander-avatar {
    width: 52px;
    height: 52px;
  }

  .commander-profile h2 {
    font-size: 1.12rem;
  }

  .commander-role {
    font-size: 0.74rem;
  }

  .chat-log {
    padding: 14px;
  }

  .chat-form {
    padding: 12px 14px 14px;
    background: #fffdf8;
  }

  .radio-dock {
    position: fixed;
    left: auto;
    right: 14px;
    bottom: 14px;
    z-index: 35;
    width: 58px;
    min-width: 58px;
    height: 58px;
    min-height: 58px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 248, 234, 0.7);
    border-radius: 999px;
    background: rgba(36, 35, 33, 0.96);
    color: #fff9ed;
    box-shadow: 0 16px 45px rgba(23, 22, 20, 0.26);
    padding: 0;
    text-align: center;
  }

  .radio-dock::before {
    content: "";
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16)),
      url("./assets/ax/team-lead-avatar.png") center / cover;
  }

  .radio-dock::after {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 11px;
    height: 11px;
    border: 2px solid #24211e;
    border-radius: 999px;
    background: #f1c76e;
  }

  body.sheet-open .radio-dock {
    opacity: 0;
    pointer-events: none;
  }

  .radio-dock-kicker,
  .radio-dock-main {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .radio-dock-kicker {
    font-size: 0;
  }

  .radio-dock-main {
    font-size: 0;
  }

  .sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    border: 0;
    background: rgba(23, 22, 20, 0.58);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.sheet-open .sheet-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

body.radio-verdict .sheet-backdrop {
  background: rgba(23, 22, 20, 0.24);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.radio-verdict .ai-panel {
  top: auto;
  right: 22px;
  bottom: 22px;
  width: min(390px, calc(100vw - 44px));
  height: auto;
  max-height: min(54vh, 500px);
  border-radius: 14px;
  box-shadow: 0 20px 54px rgba(23, 22, 20, 0.26);
}

body.radio-verdict .ai-head {
  padding: 12px 14px 10px;
}

body.radio-verdict .commander-profile {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
}

body.radio-verdict .commander-avatar {
  width: 48px;
  height: 48px;
}

body.radio-verdict .commander-profile h2 {
  font-size: 1.08rem;
}

body.radio-verdict .commander-role {
  font-size: 0.73rem;
}

body.radio-verdict #clear-chat,
body.radio-verdict .chat-form {
  display: none;
}

body.radio-verdict .chat-log {
  flex: 0 1 auto;
  gap: 8px;
  max-height: min(26vh, 220px);
  padding: 14px 16px 10px;
}

body.radio-verdict .message {
  width: fit-content;
  max-width: min(88%, 320px);
  border-radius: 18px 18px 18px 6px;
  padding: 10px 13px;
  font-size: 0.92rem;
  line-height: 1.48;
}

body.radio-verdict .message.assistant {
  background: #efe7db;
}

.message.typing {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: rgba(45, 39, 31, 0.54);
}

.message.typing .typing-bars span {
  background: rgba(45, 39, 31, 0.42);
}

.message.typing .typing-label {
  color: rgba(45, 39, 31, 0.5);
}

.radio-next-button[hidden] {
  display: none;
}

.radio-next-button:disabled {
  cursor: default;
  opacity: 0.48;
}

body.radio-verdict .radio-next-button {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
}

@media (max-width: 760px) {
  body.radio-verdict .ai-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    height: auto;
    max-height: min(46vh, 420px);
    transform: translateY(calc(100% + 22px));
  }

  body.radio-verdict.sheet-open .ai-panel {
    transform: translateY(0);
  }

  body.radio-verdict .chat-log {
    max-height: min(23vh, 190px);
    padding: 12px 14px 8px;
  }

  body.radio-verdict .message {
    max-width: 92%;
    font-size: 0.9rem;
  }
}
