.game-screen { background: radial-gradient(circle at 18% 12%, rgba(76, 224, 199, .18), transparent 30%), radial-gradient(circle at 82% 22%, rgba(102, 110, 255, .14), transparent 34%), linear-gradient(150deg, #f5ffff, #f3f7ff 54%, #fff8f7); }
.game-topbar { background: rgba(249, 254, 255, .72); border-bottom-color: rgba(75, 171, 176, .12); }
.game-grid { grid-template-columns: minmax(420px, .95fr) minmax(520px, 1.05fr); gap: 0; width: min(1380px, calc(100% - 44px)); min-height: calc(100vh - 104px); margin-top: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .92); border-radius: 34px; box-shadow: 0 30px 90px rgba(48, 84, 112, .14); }
.scene-panel { position: sticky; top: 88px; min-height: calc(100vh - 108px); padding: 0; border: 0; border-radius: 0; background: #dff8f4; box-shadow: none; }
.scene-heading { position: absolute; z-index: 3; top: 20px; left: 22px; right: 22px; color: #245d69; text-shadow: 0 1px 10px #fff; }
.scene-heading .tiny-button { background: rgba(255, 255, 255, .72); }
.stage-illustration { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.scene-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 50%, rgba(16,59,72,.42)); }
#life-scene { display: none; }
.character-chip { position: absolute; z-index: 3; right: 24px; bottom: 42px; left: 24px; margin: 0; padding: 14px 16px; color: #fff; background: rgba(12, 55, 70, .38); border: 1px solid rgba(255,255,255,.4); border-radius: 24px; backdrop-filter: blur(16px); }
.character-chip small { color: rgba(255,255,255,.76); }
.character-chip em { display: none; }
.stage-track { position: absolute; z-index: 3; right: 26px; bottom: 19px; left: 26px; margin: 0; }
.stage-dot { height: 3px; background: rgba(255,255,255,.34); }
.stage-dot.is-done { background: rgba(255,255,255,.72); }
.stage-dot.is-current { background: #fff; box-shadow: 0 0 14px rgba(255,255,255,.76); }
.event-panel { min-height: calc(100vh - 108px); padding: clamp(28px, 4.2vw, 66px); border: 0; border-radius: 0; background: rgba(255,255,255,.84); box-shadow: none; }
.event-content { max-width: 720px; }
.story-view { position: relative; }
.story-age { display: grid; grid-template-columns: auto auto 1fr; align-items: end; gap: 5px; min-height: 76px; margin-bottom: 26px; color: #152b46; }
.story-age strong { font-size: clamp(64px, 7vw, 96px); line-height: .76; letter-spacing: -.08em; }
.story-age > span { padding-bottom: 3px; color: #178d84; font-size: 19px; font-weight: 800; }
.story-age small { align-self: center; justify-self: end; color: #688192; font-size: 13px; letter-spacing: .18em; }
.story-overline { margin: 30px 0 10px; color: #0c9b8d; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.event-title { max-width: 620px; margin-bottom: 20px; color: #14223d; font-size: clamp(34px, 4.3vw, 56px); }
.event-scene { color: #40586d; font-size: 17px; line-height: 2; }
.life-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.life-controls button { display: grid; gap: 5px; padding: 14px 16px; text-align: left; color: #193450; background: linear-gradient(135deg, rgba(217,250,245,.82), rgba(235,238,255,.82)); border: 1px solid rgba(47,185,171,.18); border-radius: 18px; cursor: pointer; }
.life-controls small { color: #648091; font-size: 10px; }
.life-controls b { font-size: 13px; }
.choice-list { gap: 12px; margin-top: 34px; }
.choice-button { grid-template-columns: 32px 1fr 22px; min-height: 72px; padding: 16px 18px; background: rgba(255,255,255,.8); border-color: rgba(84,126,153,.18); border-radius: 20px; box-shadow: 0 7px 22px rgba(45,82,105,.05); }
.choice-button:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 14px 34px rgba(38,112,119,.12); }
.choice-button b { font-size: 15px; line-height: 1.55; }
.choice-button em { color: #2a9b93; font-size: 19px; font-style: normal; }
.choice-ripple { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(34,181,165,.34); border-radius: 50%; }
.choice-ripple::before, .choice-ripple::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(112,100,244,.2); border-radius: 50%; }
.choice-ripple::after { inset: 9px; background: #35d6c2; border: 0; }
.choice-button.is-locked { background: rgba(236,242,244,.58); }
.result-card { padding: 26px; background: linear-gradient(145deg, rgba(220,252,246,.88), rgba(239,239,255,.78)); border-radius: 24px; }
.result-card h3 { line-height: 1.75; }
.experience-note { margin: 18px 0 0; color: #218e84; font-size: 12px; font-weight: 700; }
.ripple-callout { padding: 12px 14px; color: #6650c9; background: rgba(255,255,255,.62); border-radius: 14px; }
.status-panel { display: none; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.relation-group { margin: 26px 0; }
.relation-group > h3 { margin-bottom: 10px; color: #5b7385; font-size: 12px; letter-spacing: .15em; }
.relationship-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.relationship-card { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 15px; background: rgba(255,255,255,.7); border: 1px solid rgba(73,116,142,.14); border-radius: 20px; }
.relationship-avatar { display: grid; place-items: center; width: 46px; height: 46px; color: #fff; background: linear-gradient(145deg, #3dcfc0, #6d70eb); border-radius: 50%; font-weight: 800; }
.relationship-card b, .relationship-card small { display: block; }
.relationship-card small { margin-top: 3px; color: #78909f; font-size: 10px; }
.relationship-card p { margin: 7px 0 0; color: #356d6c; font-size: 11px; }
.experience-badge { padding: 8px 13px; color: #fff; background: linear-gradient(135deg,#18a99b,#7064e9); border-radius: 999px; }
.life-condition-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 16px; }
.life-condition-grid article { padding: 14px; background: rgba(255,255,255,.68); border-radius: 18px; }
.life-condition-grid span, .life-condition-grid b { display: block; }
.life-condition-grid span { color: #78909f; font-size: 10px; }
.life-condition-grid b { margin-top: 4px; font-size: 14px; }
.pursuit-list, .action-list { display: grid; gap: 9px; margin-top: 18px; }
.pursuit-card, .action-card { position: relative; display: grid; gap: 5px; padding: 15px 17px; text-align: left; background: rgba(246,252,252,.82); border: 1px solid rgba(86,129,151,.16); border-radius: 18px; cursor: pointer; }
.pursuit-card small, .action-card small { color: #6f8594; line-height: 1.6; }
.pursuit-card.is-selected { background: linear-gradient(135deg,#dcfaf4,#eeeeff); border-color: rgba(36,179,165,.36); }
.action-card em { color: #27978e; font-size: 10px; font-style: normal; }
.action-card.is-disabled { opacity: .5; cursor: not-allowed; }
.fate-view { min-width: 0; }
.fate-tree-scroll { overflow: auto; padding: 20px 10px 34px; }
.fate-tree, .fate-tree ul { position: relative; display: flex; justify-content: center; gap: 24px; width: max-content; min-width: 100%; margin: 0; padding: 30px 0 0; list-style: none; }
.fate-tree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 30px; border-left: 2px solid rgba(58,177,166,.28); }
.fate-tree li { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 180px; padding: 30px 8px 0; }
.fate-tree > li { padding-top: 0; }
.fate-tree ul > li::before, .fate-tree ul > li::after { content: ""; position: absolute; top: 0; width: 50%; height: 30px; border-top: 2px solid rgba(58,177,166,.28); }
.fate-tree ul > li::before { right: 50%; }
.fate-tree ul > li::after { left: 50%; border-left: 2px solid rgba(58,177,166,.28); }
.fate-tree ul > li:only-child::before { display: none; }
.fate-tree ul > li:first-child::before, .fate-tree ul > li:last-child::after { border: 0; }
.fate-tree ul > li:last-child::before { border-right: 2px solid rgba(58,177,166,.28); border-radius: 0 16px 0 0; }
.fate-tree ul > li:first-child::after { border-radius: 16px 0 0 0; }
.tree-node { width: 180px; min-height: 112px; padding: 13px; background: #fff; border: 1px solid rgba(82,126,150,.16); border-radius: 18px; box-shadow: 0 9px 24px rgba(45,83,105,.08); }
.tree-node small, .tree-node b { display: block; }
.tree-node small { color: #6b8595; font-size: 9px; }
.tree-node b { margin-top: 5px; font-size: 12px; }
.tree-node p { margin: 6px 0 0; color: #6a7b89; font-size: 9px; line-height: 1.45; }
.tree-node em { display: block; margin-top: 7px; color: #6e55dc; font-size: 9px; font-style: normal; }
.tree-node.is-current-path { border-color: rgba(42,187,171,.48); background: linear-gradient(145deg,#f7fffd,#f5f3ff); }
.tree-node.is-parallel { opacity: .72; }
.tree-root { color: #fff; background: linear-gradient(145deg,#18a99b,#6863e5); border: 0; }
.tree-root small, .tree-root p { color: rgba(255,255,255,.76); }
.fate-replay { margin-top: 18px; }
.fate-replay > div { display: flex; }
.fate-replay button { display: inline-grid; gap: 3px; margin: 5px; padding: 11px 13px; text-align: left; background: rgba(255,255,255,.72); border: 1px solid rgba(83,125,149,.16); border-radius: 15px; cursor: pointer; }
.fate-replay span, .fate-replay small { color: #768d9c; font-size: 9px; }

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; width: min(100% - 20px, 720px); overflow: visible; border-radius: 28px; }
  .scene-panel { position: relative; top: auto; min-height: 38vh; }
  .event-panel { min-height: auto; }
  .stage-illustration { position: absolute; }
  .character-chip { bottom: 30px; }
  .stage-track { bottom: 13px; }
}

@media (max-width: 560px) {
  .game-screen { padding-bottom: 74px; }
  .game-grid { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .scene-panel { min-height: 30vh; border-radius: 0; }
  .scene-heading { top: 12px; left: 14px; right: 14px; }
  .character-chip { right: 14px; bottom: 24px; left: 14px; padding: 10px 12px; border-radius: 18px; }
  .stage-track { right: 16px; bottom: 9px; left: 16px; }
  .event-panel { padding: 24px 18px 38px; border-radius: 0; }
  .story-age { min-height: 60px; margin-bottom: 18px; }
  .story-age strong { font-size: 68px; }
  .story-age small { font-size: 10px; }
  .life-controls { grid-template-columns: 1fr; }
  .event-title { font-size: 34px; }
  .event-scene { font-size: 15px; line-height: 1.85; }
  .choice-button { grid-template-columns: 30px 1fr 18px; min-height: 66px; }
  .relationship-cards, .life-condition-grid { grid-template-columns: 1fr 1fr; }
  .tab-heading { align-items: flex-start; flex-direction: column; }
  .game-topbar .life-position span { display: none; }
}
