:root {
  --bg: #dfe7e2;
  --phone: #f7f7f4;
  --text: #1c2420;
  --muted: #69756e;
  --line: rgba(28, 36, 32, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --chat: #edf0eb;
  --left: #ffffff;
  --right: #a9ea7c;
  --brand: #16a06d;
  --brand-dark: #0a7d55;
  --gold: #d49b2f;
  --danger: #d84d4d;
  --shadow: 0 24px 70px rgba(36, 55, 44, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.8), transparent 24rem),
    linear-gradient(135deg, #cfddd5 0%, #eef1ec 46%, #cfded8 100%);
}

body.dark {
  --bg: #101612;
  --phone: #171d19;
  --text: #eef6ef;
  --muted: #aab5ad;
  --line: rgba(238, 246, 239, 0.12);
  --panel: rgba(31, 39, 34, 0.9);
  --chat: #111812;
  --left: #273029;
  --right: #276341;
  --brand: #53d58e;
  --brand-dark: #35b775;
  --gold: #f2bd57;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  background:
    radial-gradient(circle at 18% 10%, rgba(83, 213, 142, 0.12), transparent 22rem),
    linear-gradient(135deg, #07100b 0%, #182019 52%, #0c1510 100%);
}

button {
  font: inherit;
  touch-action: manipulation;
}

button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(22, 160, 109, 0.42);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.phone {
  width: min(1120px, 100%);
  min-height: min(860px, calc(100dvh - 56px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(247, 247, 244, 0.86);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

.phone.chat-shell {
  width: min(430px, 100%);
  height: min(880px, calc(100vh - 44px));
  height: min(880px, calc(100dvh - 44px));
  min-height: 650px;
  overflow: hidden;
  background: var(--phone);
  border: 10px solid #111915;
  border-radius: 34px;
}

.phone:not(.chat-shell) .status-bar {
  display: none;
}

.status-bar {
  height: 34px;
  padding: 8px 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.status-icons {
  display: flex;
  gap: 9px;
  align-items: center;
}

.mobile-data,
.wifi-icon,
.battery {
  display: inline-block;
}

.mobile-data {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.mobile-data i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
}

.mobile-data i:nth-child(1) { height: 4px; opacity: 0.55; }
.mobile-data i:nth-child(2) { height: 7px; opacity: 0.72; }
.mobile-data i:nth-child(3) { height: 10px; opacity: 0.9; }
.mobile-data i:nth-child(4) { height: 13px; }

.wifi-icon {
  position: relative;
  width: 18px;
  height: 14px;
}

.wifi-icon i {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: block;
  border: 2px solid currentColor;
  border-top: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  transform: translateX(-50%) rotate(180deg);
}

.wifi-icon i:nth-child(1) {
  width: 18px;
  height: 12px;
  border-radius: 0 0 18px 18px;
  opacity: 0.45;
}

.wifi-icon i:nth-child(2) {
  width: 12px;
  height: 8px;
  border-radius: 0 0 12px 12px;
  opacity: 0.72;
}

.wifi-icon i:nth-child(3) {
  width: 4px;
  height: 4px;
  border: 0;
  border-radius: 50%;
  background: currentColor;
}

.battery {
  width: 22px;
  height: 11px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 0 2px 2px 0;
}

.battery::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 0;
  height: 5px;
  border-radius: 1px;
}

.battery i {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 5px;
  background: currentColor;
  border-radius: 1px;
}

.topbar {
  height: auto;
  min-height: 72px;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 40px 1fr 84px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.phone.chat-shell .topbar {
  min-height: 64px;
  padding: 7px 16px 10px;
}

.topbar h1 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.audio-btn.active {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
}

.icon-btn:hover,
.primary-btn:hover,
.ghost-btn:hover,
.option-btn:hover {
  transform: translateY(-1px);
}

.icon-btn:active,
.primary-btn:active,
.ghost-btn:active,
.option-btn:active {
  transform: translateY(1px) scale(0.99);
}

.progress-wrap {
  padding: 10px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  background: rgba(127, 145, 134, 0.22);
  border-radius: 999px;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.screen {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.screen.active {
  display: block;
  animation: fadeIn 0.22s ease both;
}

.chat-screen.active {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--chat);
}

.phone:not(.chat-shell) .screen.active:not(.chat-screen) {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.hero,
.case-card,
.decision-card,
.result-card,
.investigation-board {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.hero {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background:
    linear-gradient(155deg, rgba(22, 160, 109, 0.15), transparent 42%),
    var(--panel);
}

.dossier-desk {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(13, 24, 19, 0.72), rgba(28, 52, 41, 0.58)),
    url("assets/dossier-desk.png") center / cover,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #2b3f33;
  color: #f4f2e8;
}

.desk-scene {
  position: relative;
  width: min(330px, 90%);
  height: 180px;
  margin: 0 auto 12px;
}

.desk-folder,
.desk-phone,
.desk-note,
.desk-recorder {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
}

.desk-folder {
  inset: 20px 58px 12px 20px;
  background: linear-gradient(135deg, #d7b66f, #a87634);
  transform: rotate(-7deg);
}

.desk-folder::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 18px;
  width: 84px;
  height: 24px;
  border-radius: 8px 8px 0 0;
  background: #e1c17a;
}

.desk-phone {
  right: 18px;
  top: 24px;
  width: 82px;
  height: 138px;
  background: linear-gradient(180deg, #101715, #26352d);
  border: 5px solid #070b09;
  transform: rotate(8deg);
}

.desk-phone::after {
  content: "";
  position: absolute;
  inset: 18px 8px 12px;
  border-radius: 7px;
  background:
    linear-gradient(#9fe7ba 0 16%, transparent 16% 23%, #f4f7f2 23% 40%, transparent 40% 48%, #9fe7ba 48% 66%, transparent 66%),
    #edf2eb;
}

.desk-note {
  left: 34px;
  bottom: 0;
  width: 92px;
  height: 58px;
  background: #f2d778;
  transform: rotate(8deg);
}

.desk-recorder {
  right: 100px;
  bottom: 8px;
  width: 80px;
  height: 30px;
  background: #18231d;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
}

.dossier-desk .subtitle,
.dossier-desk .hero-tag {
  color: rgba(244, 242, 232, 0.78);
}

.dossier-desk .hero-docket span,
.dossier-desk .home-stats div {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.dossier-desk .home-stats strong {
  color: #f4f2e8;
}

.dossier-desk .home-stats span {
  color: rgba(244, 242, 232, 0.65);
}

.dossier-desk .case-count-picker button {
  color: #f4f2e8;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.dossier-desk .case-count-picker button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: var(--brand);
  color: #fff;
}

.dossier-desk .mode-actions .mode-btn {
  color: rgba(244, 242, 232, 0.65);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.dossier-desk .mode-actions .mode-btn.active {
  color: #f4f2e8;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.dossier-desk .hero h2 {
  color: #f4f2e8;
}

.court-badge {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 22px;
  background: #111915;
  color: #f5d37e;
  font-size: 35px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.hero-tag,
.section-kicker {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-weight: 800;
  letter-spacing: 0;
}

.hero h2,
.case-card h2,
.decision-card h2,
.result-card h2,
.verdict-paper h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.subtitle {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.hero-docket {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.hero-docket span {
  padding: 9px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  font-size: 12px;
  font-weight: 700;
}

.home-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}

.home-stats div {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
}

.home-stats strong,
.home-stats span {
  display: block;
}

.home-stats strong {
  font-size: 20px;
  line-height: 1;
}

.home-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.case-count-picker {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0 0 16px;
}

.case-count-picker button {
  min-height: 36px;
  padding: 7px 4px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: transform 0.18s ease, background 0.18s ease, border 0.18s ease;
}

.case-count-picker button:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 160, 109, 0.4);
}

.case-count-picker button.active {
  color: white;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.mode-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.mode-btn {
  min-height: 42px;
  padding: 8px 7px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  transition: transform 0.18s ease, border 0.18s ease, background 0.18s ease;
}

.mode-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 160, 109, 0.4);
}

.mode-btn.active {
  color: white;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.docket-panel {
  margin-top: 16px;
}

.judge-profile {
  display: grid;
  gap: 12px;
}

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

.profile-head h3 {
  margin: 0;
  font-size: 20px;
}

.profile-head span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.judge-profile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.ability-radar {
  display: grid;
  gap: 9px;
}

.ability-line {
  display: grid;
  grid-template-columns: 88px 1fr 34px;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 850;
}

.ability-line i,
.system-meter i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127, 145, 134, 0.2);
}

.ability-line b,
.system-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.today-docket {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.docket-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
}

.docket-item span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  grid-row: span 2;
  color: white;
  background: var(--brand);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.docket-item strong {
  font-size: 13px;
  line-height: 1.35;
}

.docket-item small {
  color: var(--muted);
  font-size: 11px;
}

.primary-btn,
.ghost-btn,
.option-btn {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(12, 132, 86, 0.25);
}

.ghost-btn {
  padding: 12px 14px;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--panel);
  font-weight: 750;
}

.ghost-btn.danger {
  width: 100%;
  margin-top: 14px;
  color: var(--danger);
}

.danger-primary {
  background: linear-gradient(135deg, #df5a5a, #a62f2f);
  box-shadow: 0 12px 24px rgba(216, 77, 77, 0.22);
}

.panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.panel-head,
.case-number,
.total-score,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel h3 {
  margin: 0;
  font-size: 16px;
}

.panel-head span,
.case-number {
  color: var(--muted);
  font-size: 13px;
}

.favorite-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.favorite-item {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.legal-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.case-card {
  display: grid;
  gap: 14px;
}

.case-system-panel {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1.25fr;
  gap: 9px;
}

.system-chip,
.system-meter {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.26);
}

.system-chip span,
.system-meter span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.system-chip strong,
.system-meter strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.system-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 6px 8px;
}

.system-meter i {
  grid-column: 1 / -1;
}

.system-meter.danger b {
  background: linear-gradient(90deg, var(--gold), var(--danger));
}

.case-scene {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  min-height: 178px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(22, 160, 109, 0.16), rgba(212, 155, 47, 0.08)),
    rgba(255, 255, 255, 0.3);
}

.scene-visual {
  position: relative;
  min-height: 150px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(20, 31, 26, 0.12), rgba(20, 31, 26, 0.46)),
    var(--scene-image, url("assets/scene-dossier.png")) center / cover,
    linear-gradient(150deg, #21352b, #d4b568);
}

.scene-visual i {
  position: absolute;
  display: block;
}

.scene-device {
  right: 24px;
  top: 18px;
  width: 70px;
  height: 112px;
  border: 5px solid #101513;
  border-radius: 14px;
  background: #eef3ed;
  transform: rotate(7deg);
}

.scene-paper {
  left: 22px;
  bottom: 16px;
  width: 106px;
  height: 78px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  transform: rotate(-7deg);
}

.scene-note {
  left: 44px;
  top: 18px;
  width: 66px;
  height: 48px;
  border-radius: 6px;
  background: #f4d869;
  transform: rotate(9deg);
}

.scene-thread {
  right: 12px;
  bottom: 18px;
  width: 116px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  transform: rotate(-14deg);
}

.scene-kind-ledger .scene-visual,
.scene-kind-family .scene-visual,
.scene-kind-social .scene-visual,
.scene-kind-phone .scene-visual {
  background:
    linear-gradient(150deg, rgba(15, 23, 19, 0.08), rgba(15, 23, 19, 0.52)),
    var(--scene-image, url("assets/scene-dossier.png")) center / cover;
}

.scene-caption {
  display: grid;
  align-content: center;
  gap: 8px;
}

.scene-caption strong {
  color: var(--brand-dark);
  font-size: 13px;
}

.scene-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.scene-caption div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scene-caption span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(22, 160, 109, 0.12);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 9px;
  color: var(--brand-dark);
  background: rgba(22, 160, 109, 0.12);
  border: 1px solid rgba(22, 160, 109, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.background {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.testimony-grid {
  display: grid;
  gap: 10px;
}

.testimony {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
}

.testimony span {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.testimony p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.investigation-board {
  display: grid;
  gap: 14px;
}

.investigation-hero {
  padding-bottom: 2px;
}

.investigation-hero h2 {
  margin: 0 0 8px;
  font-size: 27px;
}

.investigation-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.budget-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(212, 155, 47, 0.34);
  border-radius: 12px;
  background: rgba(212, 155, 47, 0.12);
}

.budget-panel span {
  color: var(--muted);
  font-weight: 750;
}

.budget-panel strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--gold);
  border-radius: 50%;
  font-size: 22px;
}

.evidence-list,
.discovered-evidence {
  display: grid;
  gap: 10px;
}

.evidence-desk {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(20, 46, 36, 0.08), rgba(212, 155, 47, 0.1)),
    rgba(255, 255, 255, 0.24);
}

.relation-timeline {
  padding: 13px;
  border: 1px solid rgba(22, 160, 109, 0.22);
  border-radius: 16px;
  background: rgba(22, 160, 109, 0.07);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-head strong {
  color: var(--text);
  font-size: 14px;
}

.timeline-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.timeline-node {
  min-height: 92px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
}

.timeline-node.active {
  border-style: solid;
  border-color: rgba(22, 160, 109, 0.42);
  background: rgba(22, 160, 109, 0.12);
}

.timeline-node span,
.timeline-node small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.timeline-node strong {
  display: block;
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.35;
}

.evidence-card {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.36);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border 0.18s ease, background 0.18s ease;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
}

.evidence-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  font-weight: 950;
}

.evidence-card:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 160, 109, 0.45);
}

.evidence-card:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.evidence-card.used {
  border-color: rgba(22, 160, 109, 0.45);
  background: rgba(22, 160, 109, 0.11);
  opacity: 1;
}

.evidence-card span,
.evidence-note span {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.evidence-card strong {
  display: block;
  margin-bottom: 6px;
}

.evidence-card p,
.evidence-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.discovered-panel {
  padding: 14px;
  border: 1px dashed rgba(22, 160, 109, 0.36);
  border-radius: 14px;
  background: rgba(22, 160, 109, 0.07);
}

.evidence-note {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.evidence-note:first-child {
  border-top: 0;
}

.chat-notice {
  margin: 12px auto 4px;
  padding: 6px 10px;
  width: fit-content;
  max-width: calc(100% - 30px);
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  font-size: 12px;
}

.chat-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 13px 16px;
  scroll-behavior: smooth;
}

.message-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  align-items: flex-start;
  animation: bubbleIn 0.24s ease both;
}

.message-row.right {
  flex-direction: row-reverse;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff8fa3, #b34dd8);
}

.right .avatar {
  background: linear-gradient(135deg, #2a88ff, #23b36d);
}

.bubble-wrap {
  max-width: 75%;
}

.name {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
}

.right .name {
  text-align: right;
}

.bubble {
  position: relative;
  padding: 10px 12px;
  border-radius: 6px 16px 16px 16px;
  background: var(--left);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  line-height: 1.55;
  word-break: break-word;
}

.evidence-bubble {
  display: block;
  width: 100%;
  color: inherit;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.right .bubble {
  border-radius: 16px 6px 16px 16px;
  background: var(--right);
  color: #102015;
}

.mark-tools {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.mark-tools.open,
.mark-tools.marked {
  display: flex;
}

.mark-tools button {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-size: 11px;
  cursor: pointer;
}

.mark-tools button.active {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
}

.jury-box,
.system-note {
  margin: 8px auto 12px;
  width: min(92%, 340px);
  padding: 10px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.jury-box {
  display: grid;
  gap: 6px;
}

.system-note {
  text-align: center;
  color: var(--brand-dark);
  font-weight: 800;
}

body.dark .right .bubble {
  color: #eef6ef;
}

.typing {
  width: 58px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 0.9s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.chat-actions {
  padding: 8px 16px;
}

.fake-input {
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px 13px;
  border-top: 1px solid var(--line);
  background: var(--phone);
}

.fake-input span {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: var(--panel);
  border-radius: 8px;
  font-size: 12px;
}

.fake-input button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.hidden {
  display: none;
}

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

.decision-compact {
  display: grid;
  gap: 14px;
  padding: 20px;
}

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

.decision-head h2 {
  font-size: 26px;
}

#selectedSummary {
  max-width: 46%;
  padding: 7px 9px;
  color: var(--brand-dark);
  background: rgba(22, 160, 109, 0.1);
  border: 1px solid rgba(22, 160, 109, 0.18);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: right;
}

.decision-step {
  margin-top: 0;
}

.decision-step > span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.compact-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.option-btn {
  min-height: 64px;
  padding: 12px 10px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: center;
  font-weight: 800;
  line-height: 1.3;
}

.option-btn:hover {
  border-color: rgba(22, 160, 109, 0.5);
  box-shadow: 0 10px 22px rgba(22, 160, 109, 0.13);
}

.option-btn.active,
.chip-btn.active {
  color: white;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.chip-btn {
  padding: 8px 10px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.chip-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.verdict-builder {
  padding: 13px;
  border: 1px solid rgba(212, 155, 47, 0.32);
  border-radius: 14px;
  background: rgba(212, 155, 47, 0.09);
}

.verdict-builder > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.verdict-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.verdict-evidence-card {
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
}

.verdict-evidence-card span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 7px;
  border-radius: 9px;
  color: white;
  background: var(--brand);
  font-size: 12px;
  font-weight: 950;
}

.verdict-evidence-card strong,
.verdict-evidence-card small {
  display: block;
}

.verdict-evidence-card strong {
  font-size: 12px;
  line-height: 1.35;
}

.verdict-evidence-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-gate {
  padding: 10px 12px;
  border: 1px solid rgba(216, 77, 77, 0.25);
  border-radius: 10px;
  color: var(--danger);
  background: rgba(216, 77, 77, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.evidence-gate.ready {
  color: var(--brand-dark);
  border-color: rgba(22, 160, 109, 0.28);
  background: rgba(22, 160, 109, 0.1);
}

.verdict-paper {
  position: relative;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(134, 99, 39, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(0deg, rgba(212, 155, 47, 0.08), rgba(212, 155, 47, 0.08) 1px, transparent 1px, transparent 26px);
  box-shadow: 0 14px 32px rgba(92, 70, 36, 0.13);
}

body.dark .verdict-paper {
  background:
    linear-gradient(rgba(31, 39, 34, 0.92), rgba(31, 39, 34, 0.92)),
    repeating-linear-gradient(0deg, rgba(242, 189, 87, 0.08), rgba(242, 189, 87, 0.08) 1px, transparent 1px, transparent 26px);
}

.paper-stamp {
  position: absolute;
  top: 16px;
  right: -18px;
  padding: 8px 22px;
  color: var(--danger);
  border: 2px solid currentColor;
  transform: rotate(18deg);
  font-weight: 900;
  opacity: 0.48;
}

.verdict-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.verdict-hero h2 {
  font-size: 24px;
}

.quick-take {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(22, 160, 109, 0.22);
  border-radius: 12px;
  background: rgba(22, 160, 109, 0.09);
}

.quick-take p {
  margin: 6px 0 0;
  color: var(--text);
  font-weight: 750;
  line-height: 1.45;
  font-size: 14px;
}

.quick-take small {
  display: none;
}

.score-breakdown {
  margin: 0 0 10px;
  padding: 13px;
  border: 1px solid rgba(22, 160, 109, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
}

.score-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.score-head strong {
  font-size: 15px;
}

.score-head span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.score-grid div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.28);
}

.score-grid div.penalty {
  border-color: rgba(216, 77, 77, 0.28);
  background: rgba(216, 77, 77, 0.08);
}

.score-grid span,
.score-grid strong {
  display: block;
}

.score-grid span {
  color: var(--muted);
  font-size: 11px;
}

.score-grid strong {
  margin-top: 4px;
  font-size: 16px;
}

.score-breakdown p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 12px;
}

.replay-summary {
  display: grid;
  gap: 8px;
  margin: 0;
}

.replay-step {
  display: grid;
  grid-template-columns: 58px 1fr;
  column-gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
}

.replay-step span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-size: 12px;
  font-weight: 950;
}

.replay-step strong {
  font-size: 14px;
}

.replay-step p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.result-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.result-grid strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.metric {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.metric strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.quick-pill {
  display: inline-flex;
  padding: 5px 9px;
  color: white;
  background: var(--brand);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.quick-pill.warn {
  background: var(--gold);
}

.verdict-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.vs-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
}

.vs-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.vs-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.verdict-summary span,
.verdict-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.verdict-summary strong,
.verdict-grid strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.score-pop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 72px;
  margin: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), #ef7f42);
  border-radius: 50%;
  font-size: 26px;
  font-weight: 950;
  animation: scorePop 0.65s ease both;
  box-shadow: 0 6px 18px rgba(212, 155, 47, 0.35);
}

.deep-verdict {
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid rgba(212, 155, 47, 0.32);
  border-radius: 10px;
  background: rgba(212, 155, 47, 0.1);
}

.deep-verdict strong {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
}

.deep-verdict p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.deep-verdict .reaction {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 750;
}

.twist-panel,
.review-box,
.persona-box {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
}

.verdict-detail {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.verdict-detail summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  list-style: none;
  user-select: none;
}

.vd-icon { font-size: 16px; }

.vd-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.verdict-detail[open] .vd-chevron {
  transform: rotate(90deg);
}

.verdict-detail summary::-webkit-details-marker {
  display: none;
}

.verdict-detail > :not(summary) {
  margin: 0 12px 12px;
}

/* advice card */
.advice-card {
  margin: 10px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--brand);
  background: rgba(22, 160, 109, 0.08);
  border-radius: 0 8px 8px 0;
}

.advice-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.advice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.twist-panel {
  border-color: rgba(216, 77, 77, 0.35);
  background: rgba(216, 77, 77, 0.08);
}

.twist-panel strong,
.review-box h3,
.persona-box h3 {
  display: block;
  margin: 0 0 8px;
  font-size: 15px;
}

.twist-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.twist-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.twist-actions .primary-btn,
.twist-actions .ghost-btn {
  width: 100%;
}

.review-score {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  color: white;
  background: var(--brand);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.review-list {
  display: grid;
  gap: 8px;
}

.review-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
}

.review-item.ok {
  border-color: rgba(22, 160, 109, 0.34);
}

.review-item.miss {
  border-color: rgba(216, 77, 77, 0.28);
}

.review-item span {
  display: block;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.review-item p {
  margin: 5px 0;
  line-height: 1.55;
}

.review-item small,
.review-item em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.persona-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 160, 109, 0.08);
}

.persona-chip span {
  color: var(--muted);
  font-size: 12px;
}

.persona-chip strong {
  color: var(--brand-dark);
}

.analysis-text,
.advice-box p,
blockquote {
  color: var(--muted);
  line-height: 1.75;
}

.advice-box {
  padding: 14px;
  border-left: 4px solid var(--brand);
  background: rgba(22, 160, 109, 0.1);
  border-radius: 8px;
}

.advice-box h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

blockquote {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: rgba(212, 155, 47, 0.1);
  border-radius: 8px;
  font-weight: 700;
}

.action-row {
  flex-wrap: wrap;
  margin-top: 16px;
}

.action-row .primary-btn,
.action-row .ghost-btn {
  width: auto;
  flex: 1 1 120px;
}

.result-card {
  text-align: center;
}

.achievement-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  text-align: left;
}

.achievement-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
}

.achievement-item span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--gold);
  font-weight: 950;
}

.achievement-item strong,
.achievement-item small {
  display: block;
}

.achievement-item strong {
  font-size: 13px;
}

.achievement-item small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.ability-panel,
.ending-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.26);
  text-align: left;
}

.ending-card {
  padding: 16px;
  border: 1px solid rgba(212, 155, 47, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(212, 155, 47, 0.13), rgba(22, 160, 109, 0.08)),
    rgba(255, 255, 255, 0.2);
}

.ending-card span,
.ending-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ending-card h3 {
  margin: 7px 0;
  font-size: 20px;
}

.ending-card p {
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.65;
}

.share-card {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(212, 155, 47, 0.35);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(13, 24, 19, 0.56), rgba(22, 160, 109, 0.24)),
    url("assets/result-share.png") center / cover,
    rgba(255, 255, 255, 0.32);
  text-align: left;
  color: #f4f2e8;
}

.share-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.share-card strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.share-card p {
  margin: 7px 0 0;
  color: rgba(244, 242, 232, 0.78);
  line-height: 1.55;
  font-size: 13px;
}

.trophy {
  font-size: 58px;
  filter: drop-shadow(0 10px 16px rgba(212, 155, 47, 0.35));
}

.final-score {
  margin: 16px auto 6px;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: conic-gradient(var(--gold), var(--brand), var(--gold));
  font-size: 38px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(22, 160, 109, 0.22);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 13, 9, 0.48);
  backdrop-filter: blur(8px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(360px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--phone);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0;
  font-size: 24px;
}

.modal-card p:not(.section-kicker) {
  color: var(--muted);
  line-height: 1.7;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

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

@keyframes typing {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@keyframes scorePop {
  0% { transform: scale(0.65); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@media (max-width: 520px) {
  :root {
    --mobile-pad: 14px;
    --mobile-gap: 10px;
    --app-height: 100dvh;
  }

  @supports not (height: 100dvh) {
    :root {
      --app-height: 100vh;
    }
  }

  .app-shell {
    padding: 0;
    position: fixed;
    inset: 0;
  }

  body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }

  .phone {
    width: 100%;
    height: 100%;
    height: var(--app-height);
    min-height: 100%;
    min-height: var(--app-height);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--phone);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .phone.chat-shell {
    width: 100%;
    height: 100%;
    height: var(--app-height);
    min-height: 100%;
    min-height: var(--app-height);
    border: 6px solid #111915;
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    min-height: 58px;
    padding: calc(8px + env(safe-area-inset-top)) var(--mobile-pad) 8px;
    background: var(--phone);
    background: color-mix(in srgb, var(--phone) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .phone.chat-shell .topbar {
    position: relative;
    min-height: 56px;
    padding: 6px 14px 9px;
    background: var(--phone);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .progress-wrap {
    padding: 9px var(--mobile-pad) 10px;
    background: var(--phone);
  }

  .screen {
    padding: var(--mobile-pad);
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  .hero,
  .case-card,
  .decision-card,
  .result-card,
  .investigation-board,
  .verdict-paper,
  .panel {
    border-radius: 14px;
  }

  .hero {
    min-height: auto;
    padding: 18px 16px;
    justify-content: flex-start;
  }

  .court-badge {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 28px;
    margin-bottom: 10px;
  }

  .hero-docket,
  .home-stats,
  .case-count-picker {
    gap: var(--mobile-gap);
    margin-bottom: 12px;
  }

  .mode-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-actions .mode-btn:first-child {
    grid-column: 1 / -1;
  }

  .mode-btn,
  .case-count-picker button,
  .primary-btn,
  .ghost-btn,
  .option-btn {
    min-height: 44px;
  }

  .case-card,
  .investigation-board,
  .decision-card,
  .result-card {
    padding: 16px;
  }

  .dossier-desk {
    min-height: auto;
  }

  .desk-scene {
    height: 138px;
    margin-bottom: 8px;
  }

  .case-scene {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 12px;
  }

  .case-system-panel {
    grid-template-columns: 1fr;
  }

  .ability-line {
    grid-template-columns: 76px 1fr 30px;
  }

  .scene-visual {
    min-height: 132px;
  }

  .timeline-track,
  .verdict-evidence {
    grid-template-columns: 1fr;
  }

  .score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-node {
    min-height: auto;
  }

  .evidence-card {
    grid-template-columns: 38px 1fr;
    padding: 11px;
  }

  .evidence-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .decision-head {
    display: grid;
    gap: 8px;
  }

  #selectedSummary {
    max-width: none;
    width: 100%;
    text-align: left;
  }

  .compact-options {
    grid-template-columns: 1fr;
  }

  .verdict-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verdict-hero .score-pop {
    min-width: 60px;
    height: 60px;
    font-size: 22px;
  }

  .result-grid,
  .persona-grid,
  .home-stats {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .metric {
    padding: 8px;
  }

  .metric span { font-size: 10px; }
  .metric strong { font-size: 13px; }

  .advice-card {
    margin: 8px 0;
    padding: 10px 12px;
  }

  .chat-area {
    padding: 10px 11px calc(14px + env(safe-area-inset-bottom));
  }

  .bubble-wrap {
    max-width: 82%;
  }

  .fake-input {
    height: auto;
    padding: 9px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-action {
    position: sticky;
    bottom: 0;
    z-index: 7;
    margin-left: calc(var(--mobile-pad) * -1);
    margin-right: calc(var(--mobile-pad) * -1);
    padding: 10px var(--mobile-pad) calc(10px + env(safe-area-inset-bottom));
    background: var(--phone);
    background: color-mix(in srgb, var(--phone) 94%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .screen,
  .fake-input,
  .modal {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .hero h2,
  .case-card h2,
  .decision-card h2,
  .result-card h2,
  .verdict-paper h2 {
    font-size: 26px;
  }

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

  .decision-columns,
  .twist-actions,
  .modal-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
