:root {
  --life-viewport-height: 100dvh;
  --life-night: #0c0b0f;
  --life-panel: #151219;
  --life-panel-soft: #1a161e;
  --life-paper: #f1e9dc;
  --life-muted: #9d9398;
  --life-red: #e23c43;
  --life-gold: #d8ae5c;
  --life-green: #77c98b;
  --life-violet: #b89aef;
  --life-line: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

html { background: var(--life-night); }

body.life-page {
  min-width: 320px;
  margin: 0;
  color: var(--life-paper);
  background:
    radial-gradient(circle at 74% 18%, rgba(226, 60, 67, 0.09), transparent 30%),
    var(--life-night);
  font-family: "DM Sans", sans-serif;
}

.life-page [hidden] { display: none !important; }

button { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--life-gold); outline-offset: 3px; }

.life-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.life-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 3vw, 46px);
  border-bottom: 1px solid var(--life-line);
  background: rgba(12, 11, 15, 0.88);
  backdrop-filter: blur(18px);
}

.life-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--life-paper);
  text-decoration: none;
}

.life-brand .brand-mark { width: 42px; height: 42px; }
.life-brand .brand-mark img { width: 100%; height: 100%; display: block; }
.life-brand strong, .life-brand small { display: block; }
.life-brand strong { font-family: "Manrope", sans-serif; font-size: 0.92rem; letter-spacing: 0.12em; }
.life-brand small { margin-top: 2px; color: var(--life-muted); font: 500 0.52rem/1.2 "IBM Plex Mono", monospace; letter-spacing: 0.14em; }

.life-header-actions { display: flex; align-items: center; gap: 12px; }
.save-state { display: inline-flex; align-items: center; gap: 8px; color: var(--life-muted); font: 500 0.69rem "IBM Plex Mono", monospace; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--life-green); box-shadow: 0 0 0 4px rgba(119, 201, 139, 0.1); }
.save-state.is-saving i { background: var(--life-gold); }

.version-button, .quiet-button, .modal-close {
  border: 1px solid var(--life-line);
  color: var(--life-paper);
  background: transparent;
  cursor: pointer;
}
.version-button { padding: 8px 12px; border-radius: 999px; color: var(--life-gold); font: 600 0.68rem "IBM Plex Mono", monospace; }
.mobile-game-menu-button { display: none; }

.game-layout {
  min-height: calc(100svh - 142px);
  display: grid;
  grid-template-columns: minmax(230px, 0.28fr) minmax(430px, 0.82fr) minmax(280px, 0.36fr);
  gap: 1px;
  background: var(--life-line);
}

.panel { min-width: 0; background: rgba(15, 13, 18, 0.97); }
.identity-panel, .action-panel { padding: clamp(24px, 2.5vw, 38px); }
.identity-panel { background: #100e13; }

.portrait-code {
  width: 76px; height: 76px; display: grid; place-items: center;
  margin-bottom: 30px; border: 1px solid rgba(216, 174, 92, 0.28);
  border-radius: 50%; color: var(--life-gold);
  background: radial-gradient(circle, rgba(216,174,92,0.12), transparent 65%);
  font: 600 1.3rem "IBM Plex Mono", monospace;
}
.panel-label { margin: 0 0 10px; color: var(--life-red); font: 600 0.65rem "IBM Plex Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; }
.identity-panel h1, .timeline-head h2, .action-panel h2, .life-modal h2 {
  margin: 0; font-family: "Manrope", sans-serif; letter-spacing: -0.04em;
}
.identity-panel h1 { font-size: clamp(1.7rem, 2.5vw, 2.45rem); line-height: 1; overflow-wrap: anywhere; }
.person-meta { margin: 12px 0 32px; color: var(--life-muted); font: 0.78rem "IBM Plex Mono", monospace; }
.person-meta.is-alert { color: #ff8f94; }

.stat-list { display: grid; gap: 17px; }
.stat-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.stat-row span, .identity-facts span { color: var(--life-muted); font-size: 0.69rem; }
.stat-row strong { font: 500 0.72rem "IBM Plex Mono", monospace; }
.stat-track { height: 3px; grid-column: 1 / -1; background: rgba(255,255,255,0.08); overflow: hidden; }
.stat-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--life-red), var(--life-gold)); transition: width 300ms ease; }
.stat-row.is-pressure .stat-track i { background: var(--life-green); }
.stat-row.pressure-elevated .stat-track i { background: var(--life-gold); }
.stat-row.pressure-high .stat-track i { background: #ff8f66; }
.stat-row.pressure-danger .stat-track i { background: #ff5964; }
.stat-row.pressure-high strong,
.stat-row.pressure-danger strong { color: #ff8f94; }
.identity-facts { display: grid; gap: 16px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--life-line); }
.identity-facts div { display: flex; justify-content: space-between; gap: 16px; }
.identity-facts strong { max-width: 58%; font: 500 0.72rem "IBM Plex Mono", monospace; text-align: right; }
.identity-facts strong[data-status="UNEMPLOYED"] { color: #ff8f94; }
.identity-facts strong[data-status="UNEMPLOYED"]::after {
  display: block; width: max-content; margin: 5px 0 0 auto; padding: 3px 6px;
  border: 1px solid rgba(226,60,67,0.42); border-radius: 999px;
  color: #ff8f94; background: rgba(226,60,67,0.08);
  content: attr(data-status); font: 600 0.48rem "IBM Plex Mono", monospace; letter-spacing: 0.08em;
}

.timeline-panel { position: relative; display: grid; grid-template-rows: auto minmax(260px, 1fr) auto; min-height: 0; }
.timeline-head { display: flex; justify-content: space-between; gap: 24px; align-items: start; padding: 28px clamp(22px, 3vw, 42px) 22px; border-bottom: 1px solid var(--life-line); }
.timeline-head h2 { font-size: clamp(1.45rem, 2.4vw, 2.1rem); }
.quiet-button { padding: 9px 13px; border-radius: 8px; font-size: 0.75rem; white-space: nowrap; }
.quiet-button:hover { border-color: rgba(216,174,92,0.48); color: var(--life-gold); }

.timeline {
  min-height: 0; max-height: calc(100svh - 300px); overflow: auto;
  padding: 12px clamp(22px, 3vw, 42px) 30px;
  scrollbar-color: rgba(216,174,92,0.35) transparent;
}
.empty-life { min-height: 390px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-life > span { color: var(--life-gold); font-size: 3rem; }
.empty-life h3 { margin: 18px 0 6px; font-family: "Manrope", sans-serif; font-size: 1.4rem; }
.empty-life p { margin: 0 0 24px; color: var(--life-muted); }

.timeline-year { position: relative; display: grid; grid-template-columns: 66px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--life-line); }
.timeline-year:last-child { border-bottom: 0; }
.timeline-year-entries { min-width: 0; }
.timeline-entry { --signal: var(--life-muted); padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.055); }
.timeline-entry.tone-positive { --signal: var(--life-green); }
.timeline-entry.tone-negative { --signal: #ff666d; }
.timeline-entry.tone-opportunity { --signal: var(--life-violet); }
.timeline-entry:first-child { padding-top: 0; border-top: 0; }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-entry.severity-major, .timeline-entry.severity-critical {
  margin: 4px 0; padding: 15px;
  border: 1px solid color-mix(in srgb, var(--signal) 30%, transparent); border-radius: 10px;
  background: color-mix(in srgb, var(--signal) 5%, transparent);
}
.timeline-entry.severity-critical { border-left: 3px solid var(--signal); }
.entry-age { margin: 0; color: var(--life-gold); font: 600 0.72rem "IBM Plex Mono", monospace; }
.entry-copy p { margin: 0; color: #d0c6c7; line-height: 1.55; }
.entry-copy strong { color: var(--life-paper); }
.entry-signal { display: flex; gap: 10px; align-items: center; margin-bottom: 11px; }
.entry-signal > span {
  width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--signal) 48%, transparent); border-radius: 50%; color: var(--signal);
  font: 700 0.78rem "IBM Plex Mono", monospace;
}
.entry-signal small, .entry-signal strong { display: block; }
.entry-signal small { margin-bottom: 1px; color: var(--signal); font: 600 0.5rem "IBM Plex Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.entry-signal strong { font: 700 0.78rem "Manrope", sans-serif; }
.timeline-entry-detail > summary {
  position: relative; padding-right: 28px; cursor: pointer; list-style: none;
}
.timeline-entry-detail > summary::-webkit-details-marker { display: none; }
.timeline-entry-detail > summary:focus-visible {
  border-radius: 5px; outline: 2px solid var(--signal); outline-offset: 5px;
}
.timeline-entry-detail[open] > summary .entry-signal { margin-bottom: 0; }
.entry-summary-note {
  display: -webkit-box; overflow: hidden; color: #d0c6c7;
  font-size: 0.76rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
.entry-summary-highlights { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 8px; }
.entry-summary-highlights span { display: inline-flex; min-width: 0; gap: 6px; align-items: baseline; }
.entry-summary-highlights b {
  color: var(--life-muted); font: 500 0.52rem "IBM Plex Mono", monospace;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.entry-summary-highlights strong {
  overflow: hidden; color: var(--signal); font: 600 0.62rem "IBM Plex Mono", monospace;
  text-overflow: ellipsis; white-space: nowrap;
}
.entry-disclosure {
  position: absolute; top: 6px; right: 1px; width: 20px; height: 20px;
  display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--signal) 34%, transparent);
  border-radius: 50%; color: var(--signal); font: 600 0.72rem "IBM Plex Mono", monospace;
}
.entry-disclosure::before { content: "+"; }
.timeline-entry-detail[open] .entry-disclosure::before { content: "−"; }
.timeline-entry-detail[open] .entry-summary-note,
.timeline-entry-detail[open] .entry-summary-highlights { display: none; }
.entry-detail-body {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--signal) 18%, transparent);
  animation: entry-expands 220ms ease-out both;
}
.entry-copy .entry-echo { margin-top: 9px; padding-left: 11px; border-left: 2px solid rgba(216,174,92,0.42); color: rgba(245,239,226,0.58); font-size: 0.76rem; }
.entry-tag { display: inline-block; margin-top: 10px; padding: 4px 7px; border: 1px solid color-mix(in srgb, var(--signal) 34%, transparent); border-radius: 999px; color: var(--signal); font: 500 0.57rem "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.timeline-year.is-milestone::before { position: absolute; top: 29px; left: -18px; width: 5px; height: 5px; border-radius: 50%; background: var(--life-red); content: ""; box-shadow: 0 0 0 5px rgba(226,60,67,0.1); }
.change-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.change-chip {
  display: inline-flex; gap: 6px; align-items: center; padding: 5px 8px;
  border: 1px solid var(--life-line); border-radius: 999px; color: #c8bdc0; background: rgba(255,255,255,0.025);
  font: 500 0.56rem "IBM Plex Mono", monospace;
}
.change-chip b { color: var(--life-muted); font: inherit; }
.change-chip i { color: var(--life-muted); font-style: normal; }
.change-chip.tone-positive { border-color: rgba(119,201,139,0.28); color: var(--life-green); }
.change-chip.tone-negative { border-color: rgba(255,102,109,0.3); color: #ff8f94; }
@keyframes entry-expands {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.choice-dock { margin: 8px 0 22px; padding: 22px; border: 1px solid rgba(216,174,92,0.34); border-radius: 14px; background: #1a161d; box-shadow: 0 18px 50px rgba(0,0,0,0.22); }
.choice-dock h3 { margin: 0 0 16px; font-family: "Manrope", sans-serif; font-size: 1.1rem; }
.choice-why { margin: -4px 0 16px; padding-left: 12px; border-left: 2px solid rgba(216,174,92,0.58); color: rgba(245,239,226,0.68); font-size: 0.78rem; line-height: 1.55; }
.choice-list { display: grid; gap: 8px; }
.choice-button {
  width: 100%; border: 1px solid var(--life-line); border-radius: 10px;
  color: var(--life-paper); background: rgba(255,255,255,0.025); cursor: pointer; text-align: left;
}
.choice-button { padding: 12px 14px; }
.choice-button:hover { border-color: rgba(216,174,92,0.55); background: rgba(216,174,92,0.05); }

.age-dock { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(22px, 3vw, 42px); border-top: 1px solid var(--life-line); background: #100e13; }
.age-dock p { margin: 0; color: var(--life-muted); font-size: 0.75rem; }
.primary-button, .age-button, .danger-button {
  border: 0; border-radius: 9px; color: #100e13; background: var(--life-gold); font-weight: 700; cursor: pointer;
}
.primary-button { padding: 12px 17px; }
.age-button { min-width: 132px; padding: 13px 18px; }
.age-button:hover, .primary-button:hover { background: #edc875; }
.age-button:disabled { opacity: 0.38; cursor: not-allowed; }

.action-panel { background: #121015; }
.action-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: -8px 0 32px; border-bottom: 1px solid var(--life-line); }
.action-tabs button { padding: 14px 6px; border: 0; border-bottom: 2px solid transparent; color: var(--life-muted); background: transparent; cursor: pointer; font: 600 0.66rem "IBM Plex Mono", monospace; text-transform: uppercase; }
.action-tabs button.is-active { border-bottom-color: var(--life-red); color: var(--life-paper); }
.action-panel h2 { max-width: 280px; font-size: clamp(1.45rem, 2.3vw, 2rem); line-height: 1.04; }
.goal-persistence { margin: 8px 0 0; color: var(--life-muted); font-size: 0.68rem; line-height: 1.45; }
.goal-list, .people-list, .path-list { display: grid; gap: 10px; margin-top: 26px; }
.goal-persistence + .goal-list { margin-top: 18px; }
.goal-card { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 15px 13px; border: 1px solid var(--life-line); border-radius: 10px; color: var(--life-paper); background: rgba(255,255,255,0.02); cursor: pointer; text-align: left; }
.goal-card:hover { border-color: rgba(216,174,92,0.48); background: rgba(216,174,92,0.04); }
.goal-card.is-primary { border-color: rgba(216,174,92,0.62); background: rgba(216,174,92,0.055); }
.goal-card.is-secondary { border-color: rgba(226,60,67,0.48); background: rgba(226,60,67,0.04); }
.goal-card:disabled { opacity: 0.28; cursor: not-allowed; }
.goal-card.is-primary:disabled, .goal-card.is-secondary:disabled { opacity: 1; }
.goal-number { color: var(--life-gold); font: 500 0.7rem "IBM Plex Mono", monospace; }
.goal-copy strong, .goal-copy small { display: block; }
.goal-copy strong { font-size: 0.8rem; }
.goal-copy small { margin-top: 3px; color: var(--life-muted); font: 0.56rem "IBM Plex Mono", monospace; }
.goal-rank, .goal-select { justify-self: end; font: 600 0.54rem "IBM Plex Mono", monospace; text-transform: uppercase; }
.goal-rank { padding: 5px 7px; border: 1px solid currentColor; border-radius: 999px; color: var(--life-gold); font-style: normal; }
.goal-card.is-secondary .goal-rank { color: var(--life-red); }
.goal-select { color: #766d72; }
.action-note { margin: 20px 0 0; color: var(--life-muted); font-size: 0.7rem; line-height: 1.5; }

.person-card, .path-card { padding: 14px; border: 1px solid var(--life-line); border-radius: 10px; background: rgba(255,255,255,0.02); }
.person-card { width: 100%; color: var(--life-paper); cursor: pointer; text-align: left; }
.person-card:hover { border-color: rgba(216,174,92,0.45); background: rgba(216,174,92,0.04); }
.person-card div { display: flex; justify-content: space-between; gap: 12px; }
.person-card strong, .path-card strong { font-size: 0.8rem; }
.person-card span, .path-card span { color: var(--life-muted); font: 0.63rem "IBM Plex Mono", monospace; }
.person-card p { margin: 7px 0 0; color: var(--life-muted); font: 0.62rem/1.4 "IBM Plex Mono", monospace; text-transform: capitalize; }
.person-card small { display: block; margin-top: 8px; color: #766d72; font: 0.56rem "IBM Plex Mono", monospace; }
.bond-track { height: 3px; margin-top: 11px; background: rgba(255,255,255,0.07); }
.bond-track i { display: block; height: 100%; background: var(--life-red); }
.bond-track.trust i { background: var(--life-gold); }
.person-back { justify-self: start; padding: 0; border: 0; color: var(--life-gold); background: transparent; cursor: pointer; font: 600 0.65rem "IBM Plex Mono", monospace; }
.person-detail { padding: 16px; border: 1px solid var(--life-line); border-radius: 12px; background: rgba(255,255,255,0.02); }
.person-detail-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.person-detail-head strong, .person-detail-head span { display: block; }
.person-detail-head strong { font-family: "Manrope", sans-serif; font-size: 1rem; }
.person-detail-head span, .person-detail-head em { margin-top: 4px; color: var(--life-muted); font: 0.59rem "IBM Plex Mono", monospace; text-transform: capitalize; }
.person-detail-head em { flex: 0 0 auto; margin: 0; padding: 5px 7px; border: 1px solid rgba(216,174,92,0.24); border-radius: 999px; color: var(--life-gold); font-style: normal; }
.personality { margin: 14px 0 18px; color: var(--life-muted); font-size: 0.67rem; }
.person-quota { margin: -8px 0 18px; color: #766d72; font: 0.56rem/1.45 "IBM Plex Mono", monospace; }
.relationship-meter + .relationship-meter { margin-top: 12px; }
.relationship-meter > span { display: flex; justify-content: space-between; color: var(--life-muted); font: 0.59rem "IBM Plex Mono", monospace; }
.relationship-meter b { color: var(--life-paper); font-weight: 500; }
.relationship-actions { display: grid; gap: 7px; margin-top: 22px; }
.relationship-actions button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--life-line); border-radius: 8px; color: var(--life-paper); background: transparent; cursor: pointer; text-align: left; }
.relationship-actions button:hover { border-color: rgba(216,174,92,0.45); }
.relationship-actions button:disabled { opacity: 0.32; cursor: not-allowed; }
.relationship-actions strong { font-size: 0.7rem; }
.relationship-actions small { color: var(--life-muted); font: 0.52rem "IBM Plex Mono", monospace; text-align: right; }
.person-history { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--life-line); }
.person-history > span { color: var(--life-red); font: 600 0.58rem "IBM Plex Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.person-history p { display: grid; grid-template-columns: 48px 1fr; gap: 7px; margin: 12px 0 0; color: var(--life-muted); font-size: 0.63rem; line-height: 1.4; }
.person-history b { color: var(--life-gold); font: 500 0.56rem "IBM Plex Mono", monospace; }
.path-card p { margin: 8px 0 0; color: var(--life-muted); font-size: 0.72rem; line-height: 1.45; }
.path-summary {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 16px 42px 16px 16px;
  border: 1px solid var(--life-line);
  border-radius: 11px;
  color: var(--life-paper);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  text-align: left;
}
.path-summary:hover { border-color: rgba(216,174,92,0.48); background: rgba(216,174,92,0.04); }
.path-summary > span { color: var(--life-red); font: 600 0.57rem "IBM Plex Mono", monospace; letter-spacing: 0.11em; }
.path-summary strong { overflow-wrap: anywhere; font: 700 0.82rem/1.35 "Manrope", sans-serif; }
.path-summary small { overflow-wrap: anywhere; color: var(--life-muted); font: 0.59rem/1.45 "IBM Plex Mono", monospace; }
.path-summary i { position: absolute; top: 50%; right: 16px; color: var(--life-gold); font-style: normal; transform: translateY(-50%); }
.wealth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wealth-grid .path-card { min-width: 0; }
.wealth-grid .path-card p { overflow-wrap: anywhere; color: var(--life-paper); font: 500 0.66rem "IBM Plex Mono", monospace; }
.cash-flow { padding: 14px; border: 1px solid rgba(216,174,92,0.22); border-radius: 10px; background: rgba(216,174,92,0.035); }
.cash-flow div { display: flex; justify-content: space-between; gap: 12px; }
.cash-flow span { color: var(--life-gold); font: 600 0.57rem "IBM Plex Mono", monospace; }
.cash-flow strong { font: 600 0.68rem "IBM Plex Mono", monospace; }
.cash-flow p { margin: 9px 0 0; color: var(--life-muted); font-size: 0.59rem; line-height: 1.5; }
.finance-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.finance-actions button { min-height: 36px; padding: 7px; border: 1px solid var(--life-line); border-radius: 7px; color: var(--life-paper); background: transparent; cursor: pointer; font: 600 0.52rem "IBM Plex Mono", monospace; }
.finance-actions button:hover { border-color: rgba(216,174,92,0.5); }
.finance-actions button:disabled { opacity: 0.3; cursor: not-allowed; }
.asset-options { display: grid; gap: 7px; }
.asset-options button { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; width: 100%; padding: 11px 12px; border: 1px solid var(--life-line); border-radius: 9px; color: var(--life-paper); background: rgba(255,255,255,0.015); cursor: pointer; text-align: left; }
.asset-options button:hover { border-color: rgba(216,174,92,0.5); }
.asset-options button:disabled { opacity: 0.3; cursor: not-allowed; }
.asset-options button.is-current { border-color: rgba(216,174,92,0.58); border-left: 2px solid var(--life-gold); background: rgba(216,174,92,0.09); opacity: 1; cursor: default; }
.asset-options strong { font-size: 0.7rem; }
.asset-options span { color: var(--life-gold); font: 0.55rem "IBM Plex Mono", monospace; }
.asset-options .current-badge { grid-column: 1 / -1; color: var(--life-red); font: 600 0.52rem "IBM Plex Mono", monospace; letter-spacing: 0.1em; }
.asset-options small { grid-column: 1 / -1; color: var(--life-muted); font-size: 0.59rem; line-height: 1.35; }
.habit-list { display: grid; gap: 6px; }
.habit-list div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--life-line); border-radius: 8px; color: #766d72; font-size: 0.63rem; }
.habit-list div.is-active { border-color: rgba(216,174,92,0.4); color: var(--life-paper); background: rgba(216,174,92,0.04); }
.habit-list strong { color: var(--life-gold); font: 600 0.56rem "IBM Plex Mono", monospace; }

.mobile-tabs { display: none; }
.life-footer { min-height: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 12px clamp(18px, 3vw, 46px); border-top: 1px solid var(--life-line); color: #776d73; font: 500 0.59rem "IBM Plex Mono", monospace; letter-spacing: 0.08em; }
.life-footer span:nth-child(2) { text-align: center; }
.life-footer span:last-child { text-align: right; }

.life-modal { width: min(620px, calc(100% - 28px)); max-height: calc(100svh - 40px); padding: 28px; overflow: auto; border: 1px solid rgba(216,174,92,0.25); border-radius: 18px; color: var(--life-paper); background: #17141a; box-shadow: 0 30px 100px rgba(0,0,0,0.7); }
.path-modal { width: min(720px, calc(100% - 28px)); }
.action-panel, .life-modal {
  scrollbar-color: rgba(216,174,92,0.72) rgba(255,255,255,0.035);
  scrollbar-width: thin;
}
.action-panel::-webkit-scrollbar, .life-modal::-webkit-scrollbar { width: 9px; }
.action-panel::-webkit-scrollbar-track, .life-modal::-webkit-scrollbar-track { background: rgba(255,255,255,0.035); }
.action-panel::-webkit-scrollbar-thumb, .life-modal::-webkit-scrollbar-thumb { border: 2px solid #17141a; border-radius: 999px; background: rgba(216,174,92,0.72); }
.life-modal::backdrop { background: rgba(5,4,7,0.78); backdrop-filter: blur(5px); }
.modal-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.modal-close { width: 34px; height: 34px; border-radius: 50%; font-size: 1.2rem; }
.life-modal > p, .confirm-modal p { color: var(--life-muted); line-height: 1.6; }
.modal-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 26px 0 20px; border-bottom: 1px solid var(--life-line); }
.modal-tabs button { min-width: 0; padding: 12px 6px; border: 0; border-bottom: 2px solid transparent; color: var(--life-muted); background: transparent; cursor: pointer; font: 600 0.59rem "IBM Plex Mono", monospace; text-transform: uppercase; }
.modal-tabs button.is-active { border-bottom-color: var(--life-red); color: var(--life-paper); }
.modal-tab-panel { min-width: 0; }
.detail-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.detail-summary div { min-width: 0; padding: 14px; border: 1px solid var(--life-line); border-radius: 10px; background: rgba(255,255,255,0.02); }
.detail-summary span, .interest-note span { display: block; color: var(--life-muted); font: 0.56rem "IBM Plex Mono", monospace; letter-spacing: 0.08em; }
.detail-summary strong { display: block; margin-top: 7px; overflow-wrap: anywhere; font-size: 0.76rem; text-transform: capitalize; }
.detail-note, .empty-detail { color: var(--life-muted); font-size: 0.68rem; line-height: 1.55; }
.modal-wealth { margin-top: 4px; }
.interest-note { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 10px; padding: 14px; border: 1px solid rgba(216,174,92,0.22); border-radius: 10px; background: rgba(216,174,92,0.035); }
.interest-note span { color: var(--life-gold); }
.interest-note strong { font: 600 0.66rem "IBM Plex Mono", monospace; text-align: right; }
.money-actions { display: grid; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--life-line); }
.money-action { display: grid; grid-template-columns: minmax(130px, 0.75fr) minmax(220px, 1.25fr); align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--life-line); border-radius: 10px; background: rgba(255,255,255,0.02); }
.money-action > div:first-child strong, .money-action > div:first-child span { display: block; }
.money-action > div:first-child strong { font: 700 0.72rem "Manrope", sans-serif; }
.money-action > div:first-child span { margin-top: 4px; color: var(--life-muted); font: 0.53rem "IBM Plex Mono", monospace; }
.transfer-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.transfer-presets button { min-height: 34px; border: 1px solid var(--life-line); border-radius: 7px; color: var(--life-gold); background: transparent; cursor: pointer; font: 600 0.58rem "IBM Plex Mono", monospace; }
.transfer-presets button:hover { border-color: rgba(216,174,92,0.5); }
.transfer-presets button:disabled { opacity: 0.3; cursor: not-allowed; }
.primary-button:disabled { opacity: 0.35; cursor: not-allowed; }
.ledger-year { margin-top: 10px; border: 1px solid var(--life-line); border-radius: 10px; overflow: hidden; }
.ledger-year summary { display: flex; justify-content: space-between; gap: 14px; padding: 14px; cursor: pointer; list-style: none; }
.ledger-year summary::-webkit-details-marker { display: none; }
.ledger-year summary span { color: var(--life-gold); font: 600 0.6rem "IBM Plex Mono", monospace; }
.ledger-year summary strong { font: 600 0.65rem "IBM Plex Mono", monospace; }
.ledger-balances { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--life-line); border-bottom: 1px solid var(--life-line); color: var(--life-muted); font: 0.55rem "IBM Plex Mono", monospace; }
.ledger-rows { padding: 7px 14px 12px; }
.ledger-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; color: var(--life-muted); font-size: 0.65rem; }
.ledger-rows strong { flex: 0 0 auto; color: var(--life-paper); font: 500 0.6rem "IBM Plex Mono", monospace; }
.ledger-rows strong.is-positive { color: var(--life-green); }
.ledger-rows strong.is-negative { color: #d78287; }
.ledger-rows .ledger-total { margin-top: 4px; padding-top: 11px; border-top: 1px solid var(--life-line); color: var(--life-paper); font-weight: 700; }
.ledger-year > .career-heading { padding-inline: 14px; }
.ledger-rows.is-transfers { padding-top: 0; }
.release-card { margin-top: 24px; padding: 20px; border: 1px solid var(--life-line); border-radius: 12px; }
.release-card > div { display: flex; justify-content: space-between; color: var(--life-red); font: 600 0.67rem "IBM Plex Mono", monospace; }
.release-card h3 { margin: 16px 0 8px; font-family: "Manrope", sans-serif; }
.release-card ul { margin-bottom: 0; padding-left: 20px; color: var(--life-muted); }
.release-card li + li { margin-top: 6px; }
.privacy-note { font-size: 0.72rem; }
.confirm-modal { width: min(460px, calc(100% - 28px)); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.danger-button { padding: 10px 14px; color: white; background: var(--life-red); }

.game-menu-modal { display: none; }
.game-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.game-menu-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--life-paper); text-decoration: none; }
.game-menu-brand .brand-mark { width: 38px; height: 38px; }
.game-menu-brand strong, .game-menu-brand small { display: block; }
.game-menu-brand strong { font: 700 0.86rem "Manrope", sans-serif; letter-spacing: 0.12em; }
.game-menu-brand small { margin-top: 2px; color: var(--life-muted); font: 500 0.5rem "IBM Plex Mono", monospace; letter-spacing: 0.12em; }
.game-menu-meta { display: flex; justify-content: space-between; margin: 24px 0 0; padding: 13px 0; border-block: 1px solid var(--life-line); color: var(--life-muted); font: 600 0.61rem "IBM Plex Mono", monospace; letter-spacing: 0.1em; }
.game-menu-meta strong { color: var(--life-gold); }
.game-menu-save { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.game-menu-save-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--life-green); box-shadow: 0 0 0 5px rgba(119, 201, 139, 0.1); }
.game-menu-save strong, .game-menu-save small, .game-menu-list strong, .game-menu-list small { display: block; }
.game-menu-save strong, .game-menu-list strong { font-size: 0.82rem; }
.game-menu-save small, .game-menu-list small { margin-top: 3px; color: var(--life-muted); font-size: 0.68rem; }
.game-menu-list { border-top: 1px solid var(--life-line); }
.game-menu-list > button, .game-menu-coming { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--life-line); color: var(--life-paper); background: transparent; text-align: left; }
.game-menu-list > button { cursor: pointer; }
.game-menu-list > button > span:last-child { color: var(--life-gold); font-size: 1rem; }
.game-menu-coming { color: rgba(245,239,226,0.55); }
.game-menu-coming em { color: var(--life-muted); font: normal 600 0.52rem "IBM Plex Mono", monospace; letter-spacing: 0.08em; white-space: nowrap; }
.game-menu-new-life { width: 100%; min-height: 46px; margin-top: 22px; border: 1px solid rgba(213,58,69,0.5); border-radius: 10px; color: #ff8f94; background: rgba(213,58,69,0.08); cursor: pointer; font: 600 0.7rem "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: 0.06em; }

.setup-modal { width: min(660px, calc(100% - 28px)); }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.setup-grid label:first-child { grid-column: 1 / -1; }
.setup-grid label > span { display: block; margin-bottom: 7px; color: var(--life-muted); font: 500 0.65rem "IBM Plex Mono", monospace; text-transform: uppercase; }
.setup-grid label em { color: #6f666b; font-style: normal; }
.setup-grid input,
.setup-grid select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--life-line);
  border-radius: 9px;
  color: var(--life-paper);
  background: #100e13;
  font: 500 0.8rem "IBM Plex Mono", monospace;
}
.setup-grid input:focus,
.setup-grid select:focus { border-color: var(--life-gold); outline: 0; }
.setup-actions { align-items: center; }

.career-list { display: grid; gap: 9px; margin-top: 12px; }
.career-family-card { overflow: hidden; border: 1px solid var(--life-line); border-radius: 10px; background: rgba(255,255,255,0.015); }
.career-family-card .career-button { border: 0; border-radius: 0; }
.career-family-card details { border-top: 1px solid var(--life-line); }
.career-family-card summary { display: flex; justify-content: space-between; gap: 14px; padding: 10px 12px; color: var(--life-muted); cursor: pointer; font: 500 0.56rem "IBM Plex Mono", monospace; list-style: none; }
.career-family-card summary::-webkit-details-marker { display: none; }
.career-family-card summary span { color: var(--life-gold); }
.career-family-card ol { display: grid; gap: 0; margin: 0; padding: 0 12px 12px; list-style: none; }
.career-family-card li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,0.055); }
.career-family-card li > span { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--life-line); border-radius: 50%; color: var(--life-muted); font: 600 0.52rem "IBM Plex Mono", monospace; }
.career-family-card li strong, .career-family-card li small { display: block; }
.career-family-card li strong { font-size: 0.66rem; }
.career-family-card li small { margin-top: 3px; color: var(--life-muted); font-size: 0.56rem; line-height: 1.4; }
.career-family-card li.is-current > span { border-color: var(--life-gold); color: var(--life-gold); }
.career-family-card li.is-current strong { color: var(--life-gold); }
.career-button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px;
  border: 1px solid var(--life-line);
  border-radius: 9px;
  color: var(--life-paper);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  text-align: left;
}
.career-button:hover { border-color: rgba(216,174,92,0.5); }
.career-button strong { font-size: 0.78rem; }
.career-button span { color: var(--life-gold); font: 500 0.62rem "IBM Plex Mono", monospace; }
.career-button small { grid-column: 1 / -1; color: var(--life-muted); font-size: 0.64rem; line-height: 1.4; }
.career-button:disabled { opacity: 0.35; cursor: not-allowed; }
.career-heading { margin: 22px 0 0; color: var(--life-red); font: 600 0.61rem "IBM Plex Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.legacy-save-note { padding: 12px 14px; border: 1px solid rgba(216,174,92,0.32); border-radius: 9px; color: var(--life-paper) !important; background: rgba(216,174,92,0.07); font-size: 0.7rem; }
.current-path-card { margin-top: 14px; padding: 16px; border: 1px solid rgba(216,174,92,0.3); border-radius: 11px; background: rgba(216,174,92,0.045); }
.current-path-card > span { color: var(--life-gold); font: 600 0.56rem "IBM Plex Mono", monospace; letter-spacing: 0.09em; }
.current-path-card > strong { display: block; margin-top: 8px; font: 700 0.92rem "Manrope", sans-serif; }
.current-path-card > p { margin: 7px 0 0; color: var(--life-muted); font-size: 0.67rem; line-height: 1.5; }
.path-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.path-actions button, .field-grid button { min-height: 34px; padding: 7px 10px; border: 1px solid var(--life-line); border-radius: 7px; color: var(--life-paper); background: rgba(255,255,255,0.025); cursor: pointer; font: 600 0.56rem "IBM Plex Mono", monospace; }
.path-actions button:hover, .field-grid button:hover { border-color: rgba(216,174,92,0.5); }
.path-actions button:disabled, .field-grid button:disabled { opacity: 0.3; cursor: not-allowed; }
.education-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.education-wide { height: 100%; margin: 0; }
.education-group { grid-column: 1 / -1; padding: 14px; border: 1px solid var(--life-line); border-radius: 10px; background: rgba(255,255,255,0.018); }
.education-group > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.education-group > div:first-child strong { font-size: 0.73rem; }
.education-group > div:first-child span { color: var(--life-gold); font: 500 0.57rem "IBM Plex Mono", monospace; }
.education-group > p { margin: 7px 0 11px; color: var(--life-muted); font-size: 0.63rem; line-height: 1.45; }
.field-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.field-grid button { min-width: 0; overflow-wrap: anywhere; }
.advanced-field-grid { grid-template-columns: 1fr; }
.advanced-study-choice { display: grid; grid-template-columns: minmax(130px, 1fr) auto auto; align-items: center; gap: 7px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,0.055); }
.advanced-study-choice:first-child { border-top: 0; }
.advanced-study-choice > strong { font-size: 0.64rem; }
.path-decision-modal { width: min(700px, calc(100% - 28px)); }
.decision-route-list, .decision-field-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.decision-route-list button, .decision-field-list button { display: grid; gap: 7px; min-height: 124px; padding: 16px; border: 1px solid var(--life-line); border-radius: 10px; color: var(--life-paper); background: rgba(255,255,255,0.02); cursor: pointer; text-align: left; }
.decision-route-list button:hover, .decision-field-list button:hover { border-color: rgba(216,174,92,0.55); background: rgba(216,174,92,0.045); }
.decision-route-list strong, .decision-field-list strong { font: 700 0.8rem "Manrope", sans-serif; }
.decision-route-list span { color: var(--life-gold); font: 600 0.56rem "IBM Plex Mono", monospace; text-transform: uppercase; }
.decision-route-list small, .decision-field-list small { color: var(--life-muted); font-size: 0.64rem; line-height: 1.45; }
.decision-back { margin-top: 20px; padding: 0; border: 0; color: var(--life-gold); background: transparent; cursor: pointer; font: 600 0.59rem "IBM Plex Mono", monospace; }
.decision-heading { margin-top: 18px; }
.decision-heading span { color: var(--life-red); font: 600 0.57rem "IBM Plex Mono", monospace; letter-spacing: 0.08em; }
.decision-heading h3 { margin: 8px 0 0; font-family: "Manrope", sans-serif; }
.decision-heading p { margin: 7px 0 0; color: var(--life-muted); font-size: 0.67rem; line-height: 1.5; }
.history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.path-history { display: grid; gap: 7px; margin-top: 10px; }
.path-history article { padding: 10px 11px; border-left: 2px solid rgba(216,174,92,0.36); background: rgba(255,255,255,0.018); }
.path-history strong, .path-history span { display: block; }
.path-history strong { font-size: 0.66rem; }
.path-history span { margin-top: 4px; color: var(--life-muted); font: 0.53rem "IBM Plex Mono", monospace; line-height: 1.4; }

.life-review { padding: 26px 0 10px; }
.life-review h3 { margin: 0; color: var(--life-gold); font: 600 0.75rem "IBM Plex Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.life-review blockquote { margin: 18px 0; color: var(--life-paper); font-family: "Manrope", sans-serif; font-size: clamp(1.35rem, 2.7vw, 2.2rem); line-height: 1.25; letter-spacing: -0.03em; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.review-grid section, .review-choices, .review-unfinished { padding: 16px; border: 1px solid rgba(216,174,92,0.16); background: rgba(255,255,255,0.025); }
.review-grid span, .review-choices > span, .review-unfinished > span { display: block; margin-bottom: 8px; color: var(--life-gold); font: 600 0.59rem "IBM Plex Mono", monospace; letter-spacing: 0.1em; }
.review-grid strong { color: var(--life-paper); font-family: "Manrope", sans-serif; font-size: 1rem; }
.review-grid p, .review-choices p { margin: 6px 0 0; color: rgba(245,239,226,0.66); font-size: 0.78rem; line-height: 1.5; }
.review-choices { margin: 10px 0; }
.review-choices article { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 10px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.review-choices article:first-of-type { border-top: 0; }
.review-choices article b { grid-row: 1 / 3; color: var(--life-red); font: 500 0.62rem "IBM Plex Mono", monospace; }
.review-choices article strong { color: var(--life-paper); font-size: 0.82rem; }
.review-choices article p { grid-column: 2; }
.review-unfinished { margin: 10px 0 18px; }
.review-unfinished ul { margin: 0; padding-left: 18px; color: rgba(245,239,226,0.68); font-size: 0.78rem; line-height: 1.55; }
.achievement-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.achievement-list li { padding: 7px 10px; border: 1px solid rgba(216,174,92,0.28); border-radius: 999px; color: var(--life-gold); font: 500 0.62rem "IBM Plex Mono", monospace; }

@media (min-width: 1051px) {
  .game-layout {
    height: calc(100svh - 142px);
    overflow: hidden;
  }

  .timeline {
    max-height: none;
  }

  .identity-panel,
  .action-panel {
    overflow: auto;
  }
}

@media (max-width: 1050px) {
  .game-layout { grid-template-columns: minmax(210px, 0.32fr) minmax(440px, 0.68fr); }
  .action-panel { grid-column: 1 / -1; display: none; }
  .action-panel.is-mobile-open { display: block; }
  .mobile-tabs { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--life-line); background: rgba(12,11,15,0.96); backdrop-filter: blur(16px); }
  .mobile-tabs button { min-height: 54px; border: 0; color: var(--life-muted); background: transparent; font: 600 0.65rem "IBM Plex Mono", monospace; text-transform: uppercase; }
  .mobile-tabs button.is-active { color: var(--life-gold); }
  .life-footer { display: none; }
}

@media (max-width: 700px) {
  body.life-page {
    height: var(--life-viewport-height);
    overflow: hidden;
  }

  .life-shell {
    height: var(--life-viewport-height);
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .life-header { display: none; }
  .game-layout {
    position: relative;
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    background: transparent;
  }
  .identity-panel { display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px; column-gap: 11px; padding: 11px 14px 10px; border-bottom: 1px solid var(--life-line); }
  .portrait-code { width: 44px; height: 44px; grid-row: 1 / 4; margin: 0; font-size: 0.82rem; }
  .identity-panel .panel-label { display: none; }
  .identity-panel h1 { grid-column: 2; align-self: end; min-width: 0; font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-game-menu-button { grid-column: 3; grid-row: 1 / 3; align-self: center; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--life-line); border-radius: 10px; color: var(--life-gold); background: rgba(216,174,92,0.05); cursor: pointer; }
  .mobile-game-menu-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .person-meta { grid-column: 2; align-self: start; min-width: 0; margin: 2px 0 0; font-size: 0.59rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat-list { grid-column: 1 / -1; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
  .stat-row { display: block; }
  .stat-row span { display: block; overflow: hidden; text-overflow: ellipsis; }
  .stat-row span { font-size: 0.57rem; }
  .stat-row strong { display: block; margin: 1px 0 3px; font-size: 0.61rem; }
  .stat-track { height: 2px; }
  .identity-facts { display: none; }
  .timeline-panel {
    min-height: 0;
    height: 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
  }
  .timeline-head { display: none; }
  .timeline {
    max-height: none;
    min-height: 0;
    padding: 4px 14px 18px;
    overflow: auto;
    overscroll-behavior: contain;
  }
  .empty-life { min-height: 100%; }
  .timeline-entry.severity-major, .timeline-entry.severity-critical { padding: 12px; }
  .entry-summary-highlights { display: grid; gap: 4px; }
  .entry-summary-highlights strong { max-width: 175px; }
  .change-chip { max-width: 100%; white-space: normal; }
  .timeline-year { grid-template-columns: 50px 1fr; gap: 10px; }
  .timeline-entry { padding: 12px 0; }
  .choice-dock { max-height: none; margin: 8px 0 14px; padding: 16px 14px; overflow: visible; border-color: rgba(216,174,92,0.42); }
  .choice-dock .panel-label { margin-bottom: 7px; }
  .choice-dock h3 { margin-bottom: 12px; font-size: 0.98rem; line-height: 1.35; }
  .choice-why { margin: -2px 0 12px; font-size: 0.7rem; }
  .choice-button { min-height: 44px; padding: 11px 12px; font-size: 0.82rem; }
  .review-grid { grid-template-columns: 1fr; }
  .age-dock { position: static; padding: 12px 18px; }
  .age-dock p { max-width: 48%; }
  .action-panel {
    position: absolute;
    inset: 0;
    z-index: 6;
    padding: 24px 18px 90px;
    overflow: auto;
  }
  .action-tabs { display: none; }
  .life-footer { display: none; }
  .game-menu-modal[open] {
    width: 100%;
    max-width: none;
    max-height: calc(var(--life-viewport-height) - 20px);
    display: block;
    inset: auto 0 0;
    margin: auto 0 0;
    padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
  }
  .modal-actions { flex-direction: column; }
  .modal-actions button { width: 100%; }
  .setup-grid { grid-template-columns: 1fr; }
  .setup-grid label:first-child { grid-column: auto; }
  .path-modal { width: calc(100% - 20px); max-height: calc(100svh - 20px); padding: 22px 18px; border-radius: 14px; }
  .path-decision-modal { width: calc(100% - 20px); max-height: calc(100svh - 20px); padding: 22px 18px; border-radius: 14px; }
  .modal-tabs { margin-top: 22px; overflow-x: auto; }
  .modal-tabs button { white-space: nowrap; }
  .detail-summary { grid-template-columns: 1fr; }
  .education-actions, .history-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-grid.advanced-field-grid { grid-template-columns: 1fr; }
  .advanced-study-choice { grid-template-columns: 1fr 1fr; }
  .advanced-study-choice > strong { grid-column: 1 / -1; }
  .decision-route-list, .decision-field-list { grid-template-columns: 1fr; }
  .decision-route-list button, .decision-field-list button { min-height: 108px; }
  .money-action { grid-template-columns: 1fr; gap: 10px; }
  .ledger-balances { flex-direction: column; }

  .has-pending-choice .identity-panel {
    grid-template-columns: 36px minmax(0, 1fr) 40px;
    padding-block: 7px;
  }
  .has-pending-choice .portrait-code { width: 36px; height: 36px; }
  .has-pending-choice .stat-list { display: none; }
}

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