/* Native controls for the illustrated life journal. Keep the existing HTML and
   event delegation; this layer supplies consistent states across game modules. */
:root {
  --control-ink: #294a39;
  --control-line: #bbcbbb;
  --control-hover: #e8f0e5;
  --control-focus: #54785d;
  --control-paper: #fffefa;
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

#start-screen :is(button, input, select, textarea, summary),
#game-screen :is(button, input, select, textarea, summary),
#share-editor-v226 :is(button, input, select, textarea, summary) {
  -webkit-tap-highlight-color: rgba(74, 116, 83, .18);
}

#start-screen :is(button, input, select, textarea, summary, a):focus-visible,
#game-screen :is(button, input, select, textarea, summary, a):focus-visible,
#share-editor-v226 :is(button, input, select, textarea, summary, a):focus-visible {
  outline: 3px solid var(--control-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #e3eddf;
}

#start-screen :is(input[type=text], select, textarea),
#game-screen :is(input:not([type]), input[type=text], input[type=number], input[type=email], input[type=search], input[type=date], select, textarea),
#share-editor-v226 :is(input[type=text], select, textarea) {
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background-color: var(--control-paper);
  color: #273c31;
  font-size: max(14px, 1rem);
  line-height: 1.4;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

#start-screen :is(input[type=text], select, textarea):hover:not(:disabled),
#game-screen :is(input:not([type]), input[type=text], input[type=number], input[type=email], input[type=search], input[type=date], select, textarea):hover:not(:disabled),
#share-editor-v226 :is(input[type=text], select, textarea):hover:not(:disabled) {
  border-color: #819f87;
}

#start-screen :is(input[type=text], select, textarea):focus,
#game-screen :is(input:not([type]), input[type=text], input[type=number], input[type=email], input[type=search], input[type=date], select, textarea):focus,
#share-editor-v226 :is(input[type=text], select, textarea):focus {
  border-color: var(--control-focus);
  background-color: #fff;
}

#start-screen :is(input[type=text], textarea)::placeholder,
#game-screen :is(input[type=text], input[type=number], textarea)::placeholder,
#share-editor-v226 :is(input[type=text], textarea)::placeholder { color: #748579; opacity: 1; }

#start-screen :is(input[type=checkbox], input[type=radio]),
#game-screen :is(input[type=checkbox], input[type=radio]),
#share-editor-v226 :is(input[type=checkbox], input[type=radio]) {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-inline: 0;
  accent-color: var(--control-ink);
  cursor: pointer;
}

#start-screen :is(.form-label, .operations-field),
#game-screen :is(.form-label, .operations-field) { color: #3d5747; }

#start-screen .scenario-option {
  min-height: 66px;
  padding: 12px 16px;
  transition: background-color .16s ease, box-shadow .16s ease;
}
#start-screen .scenario-option:hover:not(.selected),
#start-screen .birth-city:hover:not(.selected) { background: #f3f7f0; }
#start-screen .scenario-option.selected {
  background: #e9f0e6;
  box-shadow: inset 4px 0 0 #416e52;
}
#start-screen .scenario-option.selected .scenario-name,
#start-screen .scenario-option.selected .scenario-name small { color: #294e38; }
#start-screen .scenario-name { font-size: 14px; }
#start-screen .scenario-name small { font-size: 12px; line-height: 1.45; }
#start-screen .birth-city { min-height: 46px; border-radius: 7px; font-size: 13px; }
#start-screen .tone-switch button { min-height: 46px; border-radius: 7px; font-size: 13px; }
#start-screen .primary-cta { min-height: 54px; border-radius: 7px; font-size: 15px; }
#start-screen .primary-cta:active:not(:disabled) { transform: translateY(1px); }
#start-screen .start-registration summary,
#start-screen .mortality-method summary { min-height: 38px; padding-block: 8px; }
#start-screen .birth-story-option summary { border-radius: 5px; }
.start-advanced-open { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin: 15px 0 19px; padding: 9px 13px; border: 1px solid #d2dfcf; border-radius: 8px; background: #f8faf5; color: #3d6048; font-size: 13px; font-weight: 700; }
.start-advanced-open span { font-size: 19px; line-height: 1; }
.start-advanced-options { width: min(620px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #d9e2d5; border-radius: 12px; background: #fffdf8; color: #375341; box-shadow: 0 25px 70px #20362950; }
.start-advanced-options::backdrop { background: #1e2d28a8; backdrop-filter: blur(3px); }
.start-advanced-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.start-advanced-shell > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 17px; border-bottom: 1px solid #e1e8dd; background: #f5f7f0; }
.start-advanced-shell > header h3 { font: 25px/1.2 Georgia, serif; }
.start-advanced-shell > header button { min-height: 40px; padding: 8px 12px; border: 1px solid #c0d0c0; border-radius: 7px; background: #fffdf8; color: #3c5e46; font-weight: 700; }
.start-advanced-content { overflow: auto; padding: 12px 17px 20px; }
.start-registration:not([open]) > :not(summary) { display: none !important; }
#start-screen .saved-life-item button,
#start-screen .save-load-error button { min-height: 40px; border-radius: 6px; font-size: 12px; }

#game-screen .nav-item { min-height: 44px; }
#game-screen .nav-item:hover:not(.active) { background: #eff3eb; color: #345b43; }
#game-screen :is(.btn-small, .subtle-button, .mini-actions button, .operation-button-row button, .review-row button, .replay-buttons button) {
  min-height: 44px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
#game-screen :is(.btn-small:not(.primary), .subtle-button, .mini-actions button, .operation-button-row button):hover:not(:disabled) {
  border-color: #8aab90;
  background: var(--control-hover);
}
#game-screen .btn-small.primary:hover:not(:disabled) { background: #264b36; }
#game-screen .choice { min-height: 56px; border-radius: 8px; }
#game-screen .care-hours-list button { min-height: 44px; }
#game-screen :is(.share-inline-button, .v225-motion-setting button, .keepsake-mode, .keepsake-pin, .photo-book-toolbar-actions button, .photo-book-page-tab) { min-height: 44px; }
#game-screen .share-inline-button { padding-inline: 15px; border-radius: 7px; font-family: Georgia, serif; font-size: 14px; }
#game-screen .keepsake-mode { padding-inline: 11px; }
#game-screen .operations-group { border-color: #d5ded1; }
#game-screen .operations-group > summary {
  min-height: 55px;
  color: #31513c;
  transition: background-color .16s ease;
}
#game-screen .operations-group > summary:hover { background: #f2f6ee; }
#game-screen .operations-group[open] > summary { background: #f2f6ee; }
#game-screen .operations-group > summary::after { font-size: 18px; transition: transform .16s ease; }
#game-screen .operations-group[open] > summary::after { transform: rotate(180deg); }
#game-screen .operations-field > :is(input, select) { min-height: 44px; }
#game-screen .text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.decision-reminder { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px max(25px, 4%); border-bottom: 1px solid #d8d0b5; background: #f8f2df; color: #5c513d; font-size: 13px; }
.decision-reminder button, .decision-foot :is(.decision-later, .decision-save) { min-height: 42px; padding: 9px 13px; border: 1px solid #9eaa91; border-radius: 8px; background: #fffdf8; color: #365543; font-weight: 700; }
.decision-reminder button:hover:not(:disabled), .decision-foot :is(.decision-later, .decision-save):hover:not(:disabled) { background: #e9f0e4; border-color: #6d9074; }
.decision-foot .decision-later { margin-left: auto; }
@media (max-width: 580px) { .decision-reminder { align-items: flex-start; flex-direction: column; } .decision-foot .decision-later { margin-left: 0; } }

.action-hub-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 19px 0 23px; }
.action-hub-nav button { display: flex; align-items: center; gap: 9px; min-height: 68px; padding: 11px 13px; border: 1px solid #d4dfd1; border-radius: 10px; background: #f8faf5; color: #365943; font-size: 12px; font-weight: 700; text-align: left; }
.action-hub-nav button:hover { background: #eaf1e7; border-color: #8cae91; }
.action-hub-nav .action-hub-more{grid-column:1/-1;margin-top:2px}
.action-hub-more>summary{cursor:pointer;color:#4f6a57;font-size:13px;font-weight:700;padding:9px 2px}
.action-hub-more>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px}
.action-hub-nav button > span:last-child { margin-left: auto; color: #75917b; }
.action-hub-icon { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border-radius: 9px; background: #e5eee0; color: #3f6b4e; font: 21px/1 Georgia, serif; }

/* The museum title and artwork form a single cover; its actions sit below it. */
.museum-shell .museum-hero { grid-template-columns: minmax(0, 1fr) minmax(170px, 250px); gap: clamp(16px, 3vw, 36px); min-height: 280px; padding: clamp(22px, 3vw, 36px); background: #f7f2e9; border-color: #d9ccba; border-radius: 16px; }
.museum-shell .museum-hero h2 { margin: 12px 0 14px; font-size: clamp(42px, 4.5vw, 64px); letter-spacing: -.045em; }
.museum-shell .museum-hero p { max-width: 36ch; margin: 0; color: #58665b; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; }
.museum-hero-count { display: inline-block; margin-top: 18px; padding-top: 10px; border-top: 1px solid #cdbda7; color: #536a58; font-size: 13px; }
.museum-shell .museum-cover { box-sizing: border-box; width: 100%; height: 220px; min-height: 0; border: 7px solid #e8ddce; border-radius: 3px; background: #e8dcc9; box-shadow: 0 10px 24px #453a2a1b; }
.museum-shell .museum-cover svg { display: block; width: 100%; height: 100%; }
.museum-shell .museum-cover-portrait { padding: 5px; background: #e5d8c4; }
.museum-cover-initial { font: 96px/1 Georgia, serif; color: #526b5b; }
.museum-shell > .action-hub-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 690px; margin: 14px 0 24px; border-bottom: 1px solid #d8d0c1; }
.museum-shell > .action-hub-nav button { min-height: 48px; padding: 8px 12px; border: 0; border-radius: 0; background: transparent; color: #405a49; font-size: 13px; }
.museum-shell > .action-hub-nav button:hover { background: #eef1e8; }
.museum-shell > .action-hub-nav .action-hub-icon { flex-basis: 28px; width: 28px; height: 28px; font-size: 17px; }
.museum-shell > .action-hub-nav button > span:last-child { margin-left: 0; color: inherit; }
@media (max-width: 700px) {
  .museum-shell .museum-hero { grid-template-columns: minmax(0, 1fr) minmax(108px, 32%); min-height: 0; gap: 12px; padding: 18px; }
  .museum-shell .museum-hero h2 { margin: 10px 0; font-size: clamp(36px, 9vw, 50px); }
  .museum-shell .museum-hero p { font-size: 13px; line-height: 1.45; }
  .museum-hero-count { margin-top: 12px; padding-top: 7px; font-size: 11px; }
  .museum-shell .museum-cover { height: 176px; border-width: 4px; }
  .museum-shell > .action-hub-nav { max-width: none; gap: 0; }
  .museum-shell > .action-hub-nav button { flex-direction: column; justify-content: center; gap: 3px; min-height: 62px; padding: 6px 2px; text-align: center; font-size: 11px; }
  .museum-shell > .action-hub-nav .action-hub-icon { flex-basis: 25px; width: 25px; height: 25px; }
}
.action-hub-dialog { width: min(760px, calc(100vw - 28px)); max-width: none; max-height: min(820px, calc(100dvh - 28px)); padding: 0; border: 1px solid #d8dfd2; border-radius: 15px; background: #fffdf8; color: #354c3d; box-shadow: 0 24px 80px #1b322b45; }
.action-hub-dialog::backdrop { background: #1e2d28a8; backdrop-filter: blur(3px); }
.action-dialog-shell { display: flex; flex-direction: column; max-height: min(820px, calc(100dvh - 28px)); }
.action-dialog-shell > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; padding: 16px 20px; border-bottom: 1px solid #e1e5da; background: #f5f5eb; }
.action-dialog-shell > header small { display: block; color: #748476; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.action-dialog-shell > header h2 { margin: 3px 0 0; color: #2b4f3a; font: 25px/1.2 Georgia, serif; }
.action-dialog-shell > header button { flex: 0 0 auto; min-height: 40px; padding: 8px 11px; border: 1px solid #bccdbc; border-radius: 7px; background: #fffdf8; color: #365641; font-size: 12px; font-weight: 700; }
.action-dialog-body { min-height: 0; overflow: auto; padding: 20px; overscroll-behavior: contain; }
.action-dialog-page[hidden], .action-dialog-page .fin-category[hidden] { display: none !important; }
.action-dialog-page > :is(.fin-section, .rights-card, .operations-group, .identity-self-panel, .relationship-preferences, .family-formation-panel) { margin: 0 0 18px; }
.action-dialog-page > :last-child { margin-bottom: 0; }
.health-action-panel h4 { margin: 0 0 10px; color: #325341; font: 22px/1.25 Georgia, serif; }
.health-action-panel > :last-child { margin-bottom: 0; }
.action-category-picker { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.action-category-picker button { min-height: 40px; padding: 8px 11px; border: 1px solid #c5d4c4; border-radius: 7px; background: #f9fbf7; color: #3b5c46; font-size: 11px; font-weight: 700; }
.action-category-picker button[aria-pressed="true"] { border-color: #466c50; background: #466c50; color: white; }
.action-rules-note { margin-top: 19px; padding: 10px 13px; border: 1px solid #e0e4d8; border-radius: 8px; background: #f8f8f1; color: #68776a; }
.action-rules-note summary { cursor: pointer; color: #47634c; font-size: 12px; font-weight: 700; }
.action-rules-note .mini-footnote { margin: 8px 0 0; }
.share-tool-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.share-tool-dialog .share-panel { margin: 0; border: 0; box-shadow: none; padding: 0; }
.share-tool-dialog .share-panel + .share-panel, .share-tool-dialog .share-formats + .share-panel { margin-top: 15px; }
.share-tool-dialog .share-formats { margin: 8px 0; }
.share-tool-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid #d9e2d8; background: #f7f8f2; }
.share-tool-footer p { margin: 0; color: #546b58; font-size: 12px; line-height: 1.4; }
.share-tool-footer button { flex: 0 0 auto; min-height: 44px; padding: 9px 13px; border: 1px solid #315842; border-radius: 8px; background: #315842; color: #fff; font-weight: 700; cursor: pointer; }
@media (max-width: 650px) { .share-tool-footer { align-items: stretch; flex-direction: column; padding: 12px 15px; } }
.passion-time-guide { margin-top: 16px; padding: 14px; border-radius: 9px; background: #eff4eb; color: #355542; }
.passion-time-guide p { margin: 0 0 10px; font: 13px/1.5 Georgia, serif; }
.passion-time-guide button { min-height: 44px; padding: 8px 12px; border: 1px solid #8cab91; border-radius: 7px; background: #fffdf8; color: #315840; font-weight: 700; cursor: pointer; }
.dramatic-performance .stage-caption span { display: none; }
.share-tool-gate { padding: 17px; border: 1px solid #d8e2d3; border-radius: 10px; background: #f4f7ef; }
.share-tool-gate p { margin: 0 0 14px; line-height: 1.55; }
.share-tool-gate button { min-height: 44px; padding: 9px 15px; border: 1px solid #395d45; border-radius: 7px; background: #395d45; color: #fff; font-weight: 700; cursor: pointer; }
.share-tool-gate button:hover { background: #2e4e39; }
.save-menu { margin-top: 10px; }
.save-menu > summary { min-height: 42px; padding: 10px 5px; color: #4b6b53; font-size: 12px; font-weight: 750; cursor: pointer; }
.save-menu > div { display: grid; gap: 1px; padding: 5px 0 0; border-top: 1px solid #e2e9df; }
.focus-select-native, .adult-pace label[for="adult-focus"], .child-progress-card label[for="child-focus"] { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.focus-choice-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0 18px; }
.focus-choice-row button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 11px; border: 1px solid #cbd8cb; border-radius: 8px; background: #f8faf5; color: #47624d; font-size: 12px; font-weight: 700; }
.focus-choice-row button span { color: #64856b; font: 18px/1 Georgia, serif; }
.focus-choice-row button[aria-pressed="true"] { border-color: #557b5b; background: #e4eee1; color: #28513a; }
.life-speed-details { position: relative; flex: 0 0 auto; }
.life-speed-details > summary { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid #b8cdb9; border-radius: 9px; background: #f4f8f0; color: #355d40; font: 23px/1 Georgia, serif; cursor: pointer; list-style: none; }
.life-speed-details > summary::-webkit-details-marker { display: none; }
.life-speed-details .life-speed-switch { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: max-content; max-width: calc(100vw - 24px); padding: 7px; border: 1px solid #d0ddce; border-radius: 10px; background: #fffdf8; box-shadow: 0 12px 30px #24402e2c; }
.life-speed-details:not([open]) > .life-speed-switch { display: none !important; }
.more-actions:not([open]) > .action-grid { display: none !important; }
@media (max-width: 650px) { .action-hub-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .action-hub-nav button { min-height: 62px; padding: 8px; } .action-hub-icon { flex-basis: 30px; width: 30px; height: 30px; font-size: 18px; } .action-dialog-shell > header { padding: 13px 15px; } .action-dialog-body { padding: 15px; } }

#share-editor-v226 :is(.share-formats button, .share-page-nav button, .share-actions button, .share-link-primary, .share-link-text) {
  min-height: 44px;
  border-radius: 7px;
  transition: background-color .16s ease, border-color .16s ease;
}
#share-editor-v226 .share-formats button:hover:not(:disabled):not([aria-pressed=true]),
#share-editor-v226 .share-page-nav button:hover:not(:disabled) { background: #e6eee3; border-color: #688a70; }
#share-editor-v226 .share-actions button:hover:not(:disabled):not(.tertiary),
#share-editor-v226 .share-link-primary:hover:not(:disabled) { background: #355944; }
#share-editor-v226 .share-actions button.secondary:hover:not(:disabled) { color: #fff; }

#start-screen button:disabled,
#game-screen button:disabled,
#share-editor-v226 button:disabled { opacity: .58; cursor: not-allowed; }

@media (max-width: 700px) {
  #start-screen .scenario-option { min-height: 62px; }
  #game-screen .mini-actions button { min-height: 44px; font-size: 12px; }
  #game-screen .operations-group > summary { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #start-screen :is(button, input, select, textarea),
  #game-screen :is(button, input, select, textarea, summary),
  #share-editor-v226 :is(button, input, select, textarea) { transition: none; }
}

/* Keep the life player within reach while the story scrolls. */
#life-auto-bar {
  position: fixed;
  z-index: 24;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: min(720px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  row-gap: 9px;
  padding: 14px 17px 12px;
  border: 1px solid #d6dfd2;
  border-radius: 17px;
  background: rgba(255, 253, 247, .97);
  box-shadow: 0 17px 48px rgba(34, 57, 42, .19), 0 2px 8px rgba(34, 57, 42, .08);
  backdrop-filter: blur(16px);
}
#life-auto-bar .life-auto-identity { grid-column: 1; grid-row: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
#life-auto-bar .life-auto-identity .pace-overline { flex-basis: 100%; font-size: 9px; }
#life-auto-bar .life-auto-identity strong { font-size: 19px; }
#life-auto-bar .life-auto-identity #life-month-label { font-size: 12px; }
#life-auto-bar .life-progress-block { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
#life-auto-bar .life-year-caption { margin-bottom: 5px; }
#life-auto-bar .life-month-marks { margin-top: 2px; }
#life-auto-bar .life-auto-actions { grid-column: 2; grid-row: 1; align-items: center; justify-content: flex-end; }
#life-auto-bar .life-auto-actions #life-auto-toggle { min-height: 44px; min-width: 137px; box-shadow: 0 3px 9px rgba(35, 79, 51, .13); }
#life-auto-bar .life-speed-details > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 11px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
#life-auto-bar .life-speed-details > summary strong { font-size: 14px; color: #274c38; }
#life-auto-bar .life-speed-details > summary span:last-child { color: #6b8b72; font-size: 15px; }
#life-auto-bar .life-speed-details[open] > summary { border-color: #62896b; background: #e7efe4; }
#life-auto-bar .life-speed-details .life-speed-switch { top: auto; bottom: calc(100% + 9px); right: 0; gap: 3px; padding: 6px; border-radius: 12px; background: #fffdf8; box-shadow: 0 10px 30px rgba(35, 62, 43, .18); }
#life-auto-bar .life-speed-details .life-speed-switch button { min-width: 43px; min-height: 40px; }
#life-auto-bar .life-pace-footer { grid-column: 1 / -1; grid-row: 3; min-height: 0; }
#life-auto-bar .pace-safety { display: none; }
#game-screen.has-life-player .game-main { padding-bottom: 235px; }
@media (max-width: 990px) {
  #life-auto-bar { bottom: calc(80px + env(safe-area-inset-bottom)); }
  #game-screen.has-life-player .game-main { padding-bottom: 300px; }
}
@media (max-width: 610px) {
  #life-auto-bar { width: calc(100vw - 24px); padding: 11px 13px 10px; grid-template-columns: minmax(0, 1fr); row-gap: 7px; }
  #life-auto-bar .life-auto-identity { grid-column: 1; grid-row: 1; }
  #life-auto-bar .life-auto-identity .pace-overline { display: none; }
  #life-auto-bar .life-auto-identity strong { font-size: 17px; }
  #life-auto-bar .life-progress-block { grid-column: 1; grid-row: 2; }
  #life-auto-bar .life-auto-actions { grid-column: 1; grid-row: 3; justify-content: stretch; width: 100%; }
  #life-auto-bar .life-auto-actions #life-auto-toggle { flex: 1; }
  #life-auto-bar .life-pace-footer { grid-column: 1; grid-row: 4; }
  #life-auto-bar .life-auto-status { font-size: 10px; }
}

/* A short reader keeps the next month reachable without covering page actions. */
#life-auto-bar {
  width: min(860px, calc(100vw - 32px));
  grid-template-columns: minmax(100px, 130px) minmax(110px, 1fr) auto;
  column-gap: 12px;
  row-gap: 0;
  padding: 9px 13px;
}
#life-auto-bar .life-auto-identity { grid-column: 1; grid-row: 1; }
#life-auto-bar .life-auto-identity .pace-overline { display: none; }
#life-auto-bar .life-progress-block { grid-column: 2; grid-row: 1; }
#life-auto-bar .life-year-caption { display: none; }
#life-auto-bar .life-auto-actions { grid-column: 3; grid-row: 1; gap: 6px; }
#life-auto-bar .life-pace-footer { display: none; }
#life-auto-bar .life-auto-actions #life-next-month {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #315b43;
  border: 1px solid #315b43;
  color: #fffdf8;
  font-size: 12px;
  white-space: nowrap;
}
#life-auto-bar .life-auto-actions #life-next-month:disabled { opacity: .55; cursor: not-allowed; }
#life-auto-bar .life-auto-actions #life-auto-toggle {
  min-width: 94px;
  min-height: 44px;
  background: #e9f0e6;
  color: #315642;
  border: 1px solid #cbdaca;
  box-shadow: none;
}
#life-auto-bar .life-auto-actions #life-auto-toggle[aria-pressed="true"] { background: #f5eadc; color: #6b4938; }
#game-screen.has-life-player .game-main { padding-bottom: 130px; }
@media (max-width: 990px) {
  #game-screen.has-life-player .game-main { padding-bottom: 205px; }
}
@media (max-width: 610px) {
  #life-auto-bar {
    width: calc(100vw - 20px);
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 44px 44px;
    align-items: center;
    gap: 5px 7px;
    padding: 7px 9px;
  }
  #life-auto-bar .life-auto-identity { grid-column: 1; grid-row: 1; display: block; }
  #life-auto-bar .life-auto-identity strong { display: block; font-size: 16px; }
  #life-auto-bar .life-auto-identity #life-month-label { font-size: 11px; }
  #life-auto-bar .life-progress-block { grid-column: 1; grid-row: 2; }
  #life-auto-bar .life-year-caption, #life-auto-bar .life-month-marks { display: none; }
  #life-auto-bar .life-progress-track { height: 9px; }
  #life-auto-bar .life-auto-actions { display: contents; }
  #life-auto-bar .life-auto-actions #life-next-month { grid-column: 2 / 4; grid-row: 1; min-height: 44px; }
  #life-auto-bar .life-auto-actions #life-auto-toggle { grid-column: 2; grid-row: 2; min-width: 92px; padding: 7px 9px; }
  #life-auto-bar .life-auto-actions .life-speed-details { grid-column: 3; grid-row: 2; }
  #life-auto-bar .life-speed-details > summary { min-width: 44px; padding: 0 6px; }
  #life-auto-bar .life-speed-details > summary span:first-child { display: none; }
  #life-auto-bar .life-speed-details .life-speed-switch { right: 0; }
  #game-screen.has-life-player .game-main { padding-bottom: 195px; }
}

/* The time reader has one primary action; longer jumps and speed live together. */
#life-auto-bar .life-speed-details .life-speed-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(45px, 1fr));
  width: 248px;
  max-height: min(70dvh, 440px);
  overflow: auto;
}
#life-auto-bar .life-speed-switch [data-quick-time],
#life-auto-bar .life-menu-label { grid-column: 1 / -1; }
#life-auto-bar .life-speed-switch [data-quick-time] { text-align: left; padding: 9px 11px; }
#life-auto-bar .life-menu-label { padding: 8px 5px 2px; color: #607666; font-size: 11px; font-weight: 700; }
#life-auto-bar .life-menu-auto { display: none; }
#life-auto-bar .life-speed-switch button[hidden] { display: none; }
.decision-more { position: relative; margin-left: auto; }
.decision-more > summary { display: grid; place-items: center; width: 44px; min-height: 44px; border: 1px solid #b5c5b4; border-radius: 9px; background: #f6f8f1; color: #345641; font-size: 22px; cursor: pointer; list-style: none; }
.decision-more > summary::-webkit-details-marker { display: none; }
.decision-more > div { position: absolute; z-index: 3; right: 0; bottom: calc(100% + 8px); display: grid; gap: 3px; width: 230px; padding: 7px; border: 1px solid #d6dfd2; border-radius: 10px; background: #fffdf8; box-shadow: 0 12px 30px #243d302c; }
.decision-more:not([open]) > div { display: none; }
.decision-more button { min-height: 42px; padding: 9px 11px; border: 0; border-radius: 7px; background: transparent; color: #385841; font-size: 12px; text-align: left; cursor: pointer; }
.decision-more button:hover { background: #edf3e9; }
.decision-foot > .decision-later { margin-left: auto; border-color: #beccba; background: #f4f8f0; }
.decision-foot > .decision-later:hover { background: #e6f0e3; }
.decision-foot > .decision-more { margin-left: 0; }
.decision-story-tools { margin-top: 12px; color: #526c56; font-size: 12px; }
.decision-story-tools > summary { cursor: pointer; }
.dramatic-credits > summary { color: #586f5c; font-size: 12px; font-weight: 700; cursor: pointer; }
.dramatic-credits:not([open]) .dramatic-cast, .dramatic-credits:not([open]) .mini-footnote { display: none; }
.passion-unavailable { margin: 7px 0 0; color: #6b715f; font-size: 12px; }
.person-card-quick { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.person-card-quick button { min-height: 44px; padding: 9px 13px; border: 1px solid #b9cdbb; border-radius: 8px; background: #edf4eb; color: #315944; font-size: 12px; font-weight: 700; cursor: pointer; }
.person-card-quick button:hover { background: #e0edde; }
.chapter-tag summary { color: #3d6554; font: 16px/1.35 Georgia, serif; letter-spacing: 0; cursor: pointer; list-style: none; }
.chapter-tag summary::-webkit-details-marker { display: none; }
.chapter-tag > span { margin-top: 9px; color: #6e8170; }
.chapter-tag strong { display: inline; font-size: 16px; }
.mobile-more-time { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid #dce3d8; }
.mobile-more-time > span { color: #587360; font-size: 11px; font-weight: 750; }
.mobile-more-time button[hidden] { display: none; }
.save-export-direct { display: block; width: 100%; min-height: 44px; margin: 0 0 8px; padding: 8px 10px; border: 1px solid #a9c4ad; border-radius: 9px; background: #e9f1e8; color: #315840; font: 700 12px/1.3 Arial, sans-serif; text-align: left; cursor: pointer; }
.save-export-direct:hover { background: #dcebdd; }
.game-topbar { position: sticky; top: 0; z-index: 25; }
.top-export { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 7px 11px; border: 1px solid #c9d6c8; border-radius: 10px; background: #f7f9f3; color: #375d43; font: 700 12px/1.2 Arial, sans-serif; white-space: nowrap; cursor: pointer; }
.top-export span { font: 19px/1 Georgia, serif; }
.top-export:hover { background: #e9f0e6; }
#toast.toast { bottom: 108px; }
@media (min-width: 991px) { .mobile-more-time { display: none; } }
@media (max-width: 990px) {
  #toast.toast { top: calc(90px + env(safe-area-inset-top)); bottom: auto; }
  .top-export { display: none; }
  #life-auto-bar { bottom: calc(56px + env(safe-area-inset-bottom)); }
  #game-screen .mobile-nav { padding: 3px 8px calc(3px + env(safe-area-inset-bottom)); }
  #game-screen .mobile-nav :is(a,button) { min-height: 44px; padding-block: 2px; font-size: 9px; }
  #game-screen .mobile-nav :is(a,button) span { font-size: 18px; line-height: 1.1; }
  #game-screen .mobile-more { bottom: calc(55px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 76px); overflow-y: auto; }
  #game-screen.has-life-player .game-main { padding-bottom: 145px; }
}
@media (max-width: 610px) {
  #life-auto-bar { grid-template-columns: minmax(0, 1fr) minmax(125px, auto) 44px; grid-template-rows: 44px; gap: 6px; padding: 6px 8px; }
  #life-auto-bar .life-auto-identity { grid-column: 1; grid-row: 1; }
  #life-auto-bar .life-auto-identity strong { font-size: 14px; white-space: nowrap; }
  #life-auto-bar .life-auto-identity #life-month-label { font-size: 10px; }
  #life-auto-bar .life-progress-block { display: none; }
  #life-auto-bar .life-auto-actions #life-next-month { grid-column: 2; grid-row: 1; min-width: 0; padding-inline: 7px; font-size: 11px; }
  #life-auto-bar .life-auto-actions #life-auto-toggle { display: none; }
  #life-auto-bar .life-auto-actions .life-speed-details { grid-column: 3; grid-row: 1; }
  #life-auto-bar .life-speed-details > summary { min-width: 44px; min-height: 44px; }
  #life-auto-bar .life-speed-details .life-speed-switch { right: 0; }
  #life-auto-bar .life-menu-auto { display: block; grid-column: 1 / -1; }
}

details.person-card > summary { list-style: none; cursor: pointer; position: relative; padding-right: 52px; }
details.person-card > summary::-webkit-details-marker { display: none; }
details.person-card > summary::after { content: '⌄'; position: absolute; right: 22px; top: 21px; color: #65846b; font-size: 20px; }
details.person-card[open] > summary::after { transform: rotate(180deg); }
details.person-card > summary:focus-visible { outline: 3px solid #6d997c; outline-offset: 3px; border-radius: 5px; }
details.person-card:not([open]) > .person-card-body { display: none; }
@media (max-width: 700px) {
  details.person-card { padding: 13px 15px; }
  details.person-card > summary { margin-bottom: 0; padding-right: 42px; }
  details.person-card > summary::after { right: 16px; top: 15px; }
  details.person-card[open] > summary { margin-bottom: 12px; }
}

.saga-choice-confirm { width: min(430px, calc(100vw - 32px)); border: 1px solid #d7dfd1; border-radius: 15px; padding: 25px; background: #fffdf8; color: #294736; box-shadow: 0 25px 80px #17291f44; }
.saga-choice-confirm::backdrop { background: #19282099; }
.saga-choice-confirm h2 { font: 27px/1.2 Georgia, serif; margin: 0 0 12px; }
.saga-choice-confirm p { font-size: 14px; line-height: 1.6; margin-bottom: 22px; }
.saga-choice-confirm > div { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.saga-choice-confirm button { min-height: 44px; padding: 9px 14px; border-radius: 8px; border: 1px solid #c9d8c8; background: #f4f7f0; color: #315641; font-weight: 700; }
.saga-choice-confirm #saga-choice-accept { background: #315b43; border-color: #315b43; color: #fffdf8; }
.decision-scroll .story-head { display: none; }
.decision-scroll .adult-moment > .mini-footnote { display: none; }
.decision-scroll .premium-object-note small { display: none; }
.decision-scroll .dramatic-credits .mini-footnote { display: none; }
