/* V6.3 presentation layer. Game systems and financial rules are unchanged. */
:root { --game-width: 720px; --game-gutter: 20px; --game-nav-height: 72px; }
html { scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
body { background: #101414; }
button, summary, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { transition: background-color .16s, opacity .16s; }
button:active:not(:disabled) { filter: brightness(1.13); }
button:focus-visible, summary:focus-visible { outline: 2px solid #e4c68b; outline-offset: 3px; }
button, input, summary { font-size: 14px; }
.icon-button { min-width: 44px; min-height: 44px; }
svg { flex-shrink: 0; }
.app-shell.game-shell { width: min(100%, var(--game-width)); max-width: var(--game-width); padding: 0; min-height: 100svh; margin: 0 auto; background: #151b1b; }
.game-shell .life-dashboard { padding: 0 0 calc(112px + env(safe-area-inset-bottom, 0px)); }
.game-shell .life-layout { display: block; padding: 0; }
.game-shell .life-main { display: block; width: 100%; min-width: 0; }
.living-scene-image { animation: scene-arrive .35s ease-out both; }
@keyframes scene-arrive { from { opacity: .4; } to { opacity: 1; } }
.game-hud { display: grid; grid-template-columns: 44px minmax(90px, 1fr) auto auto; align-items: center; gap: 9px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: #151b1b; border-bottom: 1px solid #34413e; font-variant-numeric: tabular-nums; }
.game-hud .hud-person { border: 1px solid #4a5953; border-radius: 50%; color: #cee0d5; background: #293932; }
.hud-time { display: grid; gap: 5px; }
.hud-time strong { font-size: 16px; color: #f3f1e7; }
.hud-time strong small { font-size: 11px; font-weight: 400; color: #a4b0a9; }
.hud-time > span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #b7c7c0; }
.hud-time svg { width: 14px; height: 14px; }
.hud-cash { background: transparent; display: grid; justify-items: end; gap: 4px; color: #ead09a; padding: 4px 0; min-height: 48px; }
.hud-cash small { display: flex; align-items: center; gap: 3px; color: #a8b8ae; font-size: 11px; }
.hud-cash svg { width: 12px; height: 12px; }
.hud-cash strong { font-size: 23px; font-weight: 600; }
.hud-energy { display: flex; align-items: center; gap: 3px; padding-left: 8px; border-left: 1px solid #3b4640; color: #ddc182; }
.hud-energy svg { width: 15px; height: 15px; }
.hud-energy strong { font-size: 19px; }
.hud-energy small { font-size: 11px; color: #a8b8ae; font-weight: 400; }
.quick-vitals { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 0 18px; min-height: 44px; font-size: 12px; }
.quick-vitals > span, .quick-vitals button { display: flex; align-items: center; gap: 5px; color: #b9c8bf; }
.quick-vitals svg { width: 14px; height: 14px; color: #88b8a4; }
.quick-vitals b { font-weight: 500; color: #e0e8df; }
.quick-vitals button { min-height: 44px; padding: 0; background: none; font-size: 12px; }
.living-scene { position: relative; isolation: isolate; width: 100%; height: clamp(270px, 40svh, 430px); overflow: hidden; background: #314843; }
.living-scene-image { position: absolute; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; transition: filter .6s; }
.living-scene::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #07171145, transparent 25%, transparent 55%, #061211de); pointer-events: none; }
.scene-afternoon .living-scene-image { filter: sepia(.16) saturate(.92); object-position: 50% 75%; }
.scene-evening .living-scene-image { object-position: 50% 71%; }
.scene-identity { position: absolute; left: 20px; top: 18px; display: grid; gap: 4px; color: #fff; text-shadow: 0 1px 6px #000; }
.scene-identity span { font-size: 17px; font-weight: 600; }
.scene-identity small { font-size: 12px; }
.scene-phone { position: absolute; right: 18px; top: 16px; border: 1px solid #ffffff70; background: #142621c9; border-radius: 50%; color: #e7eddf; }
.living-scene-caption { position: absolute; left: 20px; right: 20px; bottom: 20px; color: #f2f3e9; }
.living-scene-caption > span { display: flex; gap: 4px; align-items: center; font-size: 12px; color: #ccdccd; }
.living-scene-caption svg { width: 13px; height: 13px; }
.living-scene-caption h1 { font-size: 25px; line-height: 1.4; margin: 9px 0 4px; font-weight: 550; letter-spacing: 0; }
.living-scene-caption p { font-size: 12px; margin: 0; color: #c0d0c5; line-height: 1.5; }
.living-scene-caption p span { margin: 0 6px; }
.game-shell .phone-notifications { margin: 0; padding: 12px var(--game-gutter); border: 0; background: #1b2421; }
.game-shell .phone-notifications header { display: none; }
.game-shell .notification-list { gap: 8px; }
.game-shell .phone-notification { padding: 12px; background: #26382f; min-height: 74px; border-radius: 6px; }
.game-shell .notification-copy > strong { font-size: 15px; line-height: 1.5; }
.game-shell .notification-copy > span { font-size: 12px; line-height: 1.5; }
.game-shell .notification-copy > small { font-size: 11px; flex-wrap: wrap; }
.game-shell .notifications-quiet { padding: 5px 0; font-size: 13px; min-height: 32px; }
.life-controls { padding: 16px var(--game-gutter) 0; }
.arrange-button { display: flex; width: 100%; justify-content: center; gap: 8px; min-height: 52px; font-size: 16px; background: #dec48d; color: #18221a; }
.arrange-button > span { margin-left: auto; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.arrange-button > span svg { width: 14px; height: 14px; }
.game-shell .day-footer { padding: 8px 0 0; margin: 0; border: 0; }
.game-shell .end-day-button { min-height: 48px; background: transparent; border: 1px solid #56655b; color: #dae4d8; margin: 0; font-size: 14px; padding: 12px; }
.game-shell .end-day-button small { font-size: 11px; }
.game-shell .early-finish-button { min-height: 44px; font-size: 13px; margin-top: 8px; }
.game-shell .evening-risk-note { margin: 8px 0 12px; font-size: 12px; }
.mobile-life-nav { position: fixed; z-index: 20; left: 50%; right: auto; transform: translateX(-50%); bottom: 0; width: min(100%, var(--game-width)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 12px max(10px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid #48534d; background: #17221ff5; backdrop-filter: blur(14px); }
.mobile-life-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 48px; position: relative; background: transparent; color: #94aca1; font-size: 12px; }
.mobile-life-nav button.active { color: #f0d89f; }
.mobile-life-nav svg { width: 22px; height: 22px; }
.mobile-life-nav b { position: absolute; top: 0; left: calc(50% + 7px); min-width: 16px; height: 16px; border-radius: 50%; background: #b7c6a8; color: #13271e; font-size: 10px; display: grid; place-items: center; }
html:has(dialog[open]) { overflow: hidden; }
.life-dialog { max-height: calc(100svh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 0; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-top: 56px; scroll-padding-bottom: 24px; }
.dialog-toolbar { position: sticky; top: 0; height: 52px; z-index: 2; background: #191e1b; display: flex; justify-content: flex-end; align-items: center; padding: 4px 8px; }
.dialog-body { padding: 0 22px calc(24px + env(safe-area-inset-bottom, 0px)); }
.life-dialog .dialog-close { position: static; width: 44px; height: 44px; background: #26332c; border-radius: 50%; z-index: 2; }
.life-dialog p { font-size: 14px; line-height: 1.7; }
.life-dialog .primary-button { min-height: 48px; font-size: 14px; }
.action-sheet { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(100%, var(--game-width)); max-width: var(--game-width); max-height: calc(92svh - env(safe-area-inset-top, 0px)); padding: 0; border-radius: 8px 8px 0 0; }
.action-sheet .action-panel { margin: 0; padding: 0; }
.action-sheet .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.action-sheet .section-title h2 { font-size: 20px; }
.action-sheet .life-action { height: auto; min-height: 192px; padding: 14px; text-align: left; }
.action-sheet .life-action strong { font-size: 16px; }
.action-sheet .action-preview, .action-sheet .action-detail, .action-sheet .decision-hint small, .action-sheet .action-risk { font-size: 12px; line-height: 1.6; }
.action-sheet .decision-hint { padding-top: 7px; }
.action-sheet .life-action .effect-chip { font-size: 11px; }
.action-sheet .daily-record { margin-top: 20px; }
.character-dialog .character-card { display: block; width: 100%; position: static; border: 0; background: transparent; }
.character-dialog .character-scene, .character-dialog .character-footnote { display: none; }
.character-dialog .attribute-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 12px 0; }
.character-dialog .character-details { display: block; }
.character-dialog .identity-row { padding: 0; }
.character-dialog .character-state { margin: 12px 0; }
.character-dialog .character-details p { font-size: 13px; }
.character-dialog .motion-setting { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; }
.character-dialog .motion-setting input { width: 20px; height: 20px; accent-color: #dcc18c; margin: 0; }
.game-shell .phone-column { display: block; width: 100%; max-width: none; position: static; }
.game-shell .phone-device { border: 0; border-radius: 0; box-shadow: none; max-width: none; width: 100%; padding: 12px var(--game-gutter) 24px; background: transparent; overflow: visible; }
.game-shell .phone-status { height: auto; font-size: 11px; color: #90ab9d; }
.game-shell .phone-speaker, .game-shell .phone-status > span:last-child, .game-shell .phone-home-line { display: none; }
.game-shell .phone-heading { padding: 10px 0 14px; }
.game-shell .phone-heading .section-kicker { display: none; }
.game-shell .phone-heading h2 { font-size: 24px; }
.game-shell .phone-heading .unread-total { font-size: 12px; }
.game-shell .phone-apps { padding-bottom: 12px; gap: 5px; }
.game-shell .phone-app { min-height: 66px; }
.game-shell .phone-app > span { width: 40px; height: 40px; border-radius: 8px; }
.game-shell .phone-app small { font-size: 12px; }
.game-shell .phone-category-nav { gap: 4px; padding: 8px 0; }
.game-shell .phone-category-nav button { min-height: 44px; font-size: 13px; }
.game-shell .phone-content { height: auto; max-height: none; overflow: visible; overscroll-behavior: auto; }
.game-shell .inbox-label { margin-top: 8px; }
.game-shell .inbox-label button { min-height: 44px; font-size: 12px; }
.game-shell .message-row { padding: 16px 6px; min-height: 88px; }
.game-shell .message-summary > span strong { font-size: 15px; }
.game-shell .message-summary > b { font-size: 14px; }
.game-shell .message-summary > p { font-size: 13px; line-height: 1.65; white-space: normal; }
.game-shell .message-summary > span { flex-wrap: wrap; gap: 5px; }
.game-shell .message-summary > span small { font-size: 11px; }
.game-shell .message-bubbles p { font-size: 15px; line-height: 1.8; padding: 12px 14px; max-width: 95%; }
.game-shell .thread-heading { padding: 12px 0; }
.game-shell .thread-heading .sender-avatar { width: 34px; height: 34px; flex-shrink: 0; }
.game-shell .thread-heading { flex-wrap: wrap; gap: 8px; }
.game-shell .thread-heading small { margin-left: auto; font-size: 11px; }
.game-shell .sender-avatar { color: var(--tone, #b3d1bd); }
.game-shell .thread-heading strong { font-size: 16px; }
.game-shell .thread-subject { font-size: 13px; }
.game-shell .phone-person-link { min-height: 44px; font-size: 14px; }
.game-shell .relationship-panel, .game-shell .route-map, .game-shell .asset-panel { padding: 24px var(--game-gutter) 0; }
.game-shell .relationship-panel { padding-bottom: 32px; }
.game-shell .growth-heading { padding-bottom: 20px; }
.game-shell .growth-heading h1 { font-size: 24px; }
.game-shell .growth-heading p { font-size: 13px; }
.game-shell .relationship-grid { grid-template-columns: 1fr; gap: 12px; }
.game-shell .relationship-person { padding: 18px; }
.game-shell .relationship-person h2 { font-size: 18px; }
.game-shell .relationship-person .person-status { min-height: 0; font-size: 14px; line-height: 1.8; margin: 14px 0; }
.game-shell .relationship-person footer { flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.game-shell .relationship-person footer button { min-height: 44px; font-size: 13px; margin-left: auto; }
.game-shell .person-influence { min-height: 30px; }
.growth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 20px 0; gap: 8px; }
.growth-tabs button { display: flex; gap: 8px; justify-content: center; align-items: center; min-height: 46px; border-bottom: 2px solid #42514b; background: transparent; color: #a1b7aa; font-size: 15px; }
.growth-tabs button[aria-pressed="true"] { border-color: #dec58e; color: #f1d499; }
.game-shell .asset-grid { grid-template-columns: 1fr; }
.game-shell .asset-filters { gap: 6px; flex-wrap: wrap; }
.game-shell .asset-filters button, .game-shell .asset-records summary { min-height: 44px; font-size: 13px; }
.game-shell .asset-description, .game-shell .route-description { font-size: 14px; line-height: 1.8; }
.game-shell .route-node-status { font-size: 11px; }
.game-shell .route-node strong { font-size: 13px; }
.game-shell .asset-records p { font-size: 13px; }
.game-shell .asset-records p small { font-size: 11px; }
.game-shell .route-node { min-height: 100px; }
.app-shell.action-feedback-shell { max-width: var(--game-width); width: 100%; padding: 0; background: #18201e; min-height: 100svh; }
.action-experience { padding: 0 20px calc(120px + env(safe-area-inset-bottom, 0px)); }
.action-experience-top { min-height: 60px; gap: 8px; flex-wrap: nowrap; font-size: 12px; }
.action-experience-top > span:last-child { font-size: 12px; }
.action-experience .action-scene { min-height: 0; margin: 0 -20px; padding: 20px; background: #263b34; }
.action-experience .action-scene.with-scene-image { background-image: linear-gradient(90deg,#172e29ed,#172e29c4),url('./assets/hero-office.png'); background-size: cover; background-position: center 65%; }
.action-experience .scene-stamp { margin-bottom: 16px; }
.action-experience .scene-stamp time { font-size: 18px; }
.action-experience .scene-stamp > span { font-size: 12px; }
.action-experience .scene-copy { padding: 0; }
.action-experience .scene-copy h1 { font-size: 22px; margin: 0 0 10px; line-height: 1.5; }
.action-experience .scene-copy p, .action-experience .action-process p { font-size: 14px; line-height: 1.75; margin: 4px 0; }
.action-experience .action-process { padding: 16px 0; gap: 8px; animation-delay: .12s; }
.action-experience .action-process h2 { display: none; }
.action-experience .action-growth { margin: 0; }
.action-experience .growth-result-heading { padding: 16px 0 8px; }
.action-experience .growth-result-heading h2 { font-size: 15px; }
.action-experience .growth-result-heading > span { font-size: 11px; }
.action-experience .growth-numbers { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 16px; }
.action-experience .growth-numbers > div { padding: 8px 0; }
.action-experience .growth-numbers > div > span { font-size: 12px; }
.action-experience .growth-numbers strong { font-size: 24px; }
.action-experience .relationship-feedback { margin-top: 14px; padding-top: 12px; }
.action-experience .relationship-feedback > div { padding: 7px 0; }
.action-experience .relationship-feedback h3 { font-size: 12px; }
.action-experience .relationship-feedback strong { font-size: 22px; }
.feedback-sources { margin-top: 16px; border-top: 1px solid #3c4b43; }
.feedback-sources > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; font-size: 13px; color: #b7cdbb; cursor: pointer; }
.feedback-sources > summary svg:last-child { margin-left: auto; }
.source-note { font-size: 12px; color: #94a79b; }
.feedback-base-effects h3 { font-size: 13px; margin: 12px 0; }
.feedback-other-effects { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.feedback-sources .decision-records { margin-top: 12px; }
.feedback-sources .decision-record p { font-size: 13px; }
.feedback-footer { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, var(--game-width)); padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #46584c; background: #17231fee; backdrop-filter: blur(12px); display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.feedback-footer > span { font-size: 12px; text-align: left; }
.feedback-footer [data-action="feedback-skip"] { min-height: 44px; font-size: 13px; padding: 0; }
.feedback-footer [data-action="feedback-done"] { min-height: 48px; width: auto; grid-column: 2; grid-row: 1 / 3; }
[data-feedback-stage="complete"] [data-action="feedback-skip"] { display: none; }
.life-feedback { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 32px); pointer-events: none; }
.story-screen, .result-screen { overflow-wrap: anywhere; }
.app-shell.story-game-shell, .app-shell.result-game-shell { width: min(100%, var(--game-width)); max-width: var(--game-width); padding: 0; background: #161e1b; }
.story-game-shell .game-screen, .result-game-shell .page-screen { padding: 20px 20px calc(32px + env(safe-area-inset-bottom, 0px)); }
.story-game-shell .event-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 20px 0; }
.story-game-shell .event-card h2 { font-size: 26px; line-height: 1.5; }
.story-game-shell .story-lines p, .story-game-shell .result-lines p { font-size: 15px; line-height: 1.9; }
.story-game-shell .choice-button { min-height: 64px; font-size: 14px; }
.story-status { padding: 0; border-bottom: 1px solid #415047; }
.story-status summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; color: #e1c88e; }
.story-status summary > span { margin-left: auto; font-size: 12px; color: #adbfae; }
.story-status summary svg { width: 16px; height: 16px; }
.story-status .life-status { padding: 16px 0; }
.story-topbar button, .text-button, .asset-records summary { min-height: 44px; }
@media (min-width: 761px) {
  .game-shell, .action-feedback-shell { border-left: 1px solid #303d36; border-right: 1px solid #303d36; }
  .living-scene { height: 430px; }
  .game-hud { padding: 14px 24px; grid-template-columns: 44px 1fr auto auto; gap: 18px; }
  .hud-cash strong { font-size: 27px; }
  .hud-time strong { font-size: 18px; }
  .living-scene-caption h1 { font-size: 29px; }
  .game-shell .phone-device { padding-left: 32px; padding-right: 32px; }
  .action-sheet .action-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .game-shell .relationship-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .game-shell .relationship-person footer { display: grid; }
  .game-shell .relationship-person footer button { margin: 0; }
  .game-shell .relationship-person .person-status { min-height: 76px; }
}
@media (max-width: 360px) {
  :root { --game-gutter: 14px; }
  .game-hud { gap: 6px; padding-left: 10px; padding-right: 10px; grid-template-columns: 44px 1fr auto auto; }
  .hud-time strong { font-size: 14px; }
  .hud-time > span { font-size: 10px; }
  .hud-cash strong { font-size: 19px; }
  .hud-energy { padding-left: 4px; gap: 1px; }
  .hud-energy strong { font-size: 16px; }
  .quick-vitals { padding: 0 10px; gap: 3px; }
  .quick-vitals > span, .quick-vitals button { gap: 3px; font-size: 11px; }
  .living-scene { height: 250px; }
  .action-sheet .dialog-body { padding-left: 12px; padding-right: 12px; }
  .action-sheet .life-action { padding: 10px; min-height: 214px; }
  .action-sheet .life-action strong { font-size: 14px; }
  .game-shell .relationship-person { padding: 14px; }
  .game-shell .relationship-person footer { display: grid; }
  .game-shell .relationship-person footer button { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 360px) and (max-height: 650px) {
  .living-scene { height: 190px; }
  .game-shell .notification-copy > span { display: none; }
  .living-scene-caption h1 { font-size: 23px; }
}
html[data-reduced-motion="true"] *, html[data-reduced-motion="true"] *::before, html[data-reduced-motion="true"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
