/* The same ending is read in the game, a shared link, and the offline export. */
.epilogue {
  --ep-ink: #243b37;
  --ep-muted: #536761;
  --ep-line: #bdc5b4;
  --ep-paper: #f8f3e3;
  --ep-reading: "PingFang SC","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  background: #cad1c2;
  color: var(--ep-ink);
  font-family: var(--ep-reading);
}
.epilogue > .world, .epilogue > .pixel-world {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  width: 100%;
  height: max(100vh, 32rem);
  max-width: none;
  object-fit: cover;
  object-position: 40% center;
  image-rendering: pixelated;
}
.epilogue-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,36rem);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: clamp(2.25rem,7vh,5.5rem) clamp(2rem,5vw,5rem);
  min-height: 100vh;
  min-height: 100svh;
  max-width: 91rem;
  margin: 0 auto;
  padding: max(1.25rem,env(safe-area-inset-top)) max(4vw,env(safe-area-inset-right)) max(3rem,env(safe-area-inset-bottom)) max(4vw,env(safe-area-inset-left));
}
.epilogue-hud {
  display: flex;
  grid-column: 1/-1;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  color: #fff4d7;
}
.epilogue-day, .epilogue-credit, .epilogue-hud .cartridge-small {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  max-width: 64%;
  min-width: 0;
  padding: .45rem .7rem;
  border: 1px solid #a0b4a9;
  outline: 2px solid #233b40;
  box-shadow: 2px 3px 0 #233b40;
  background: #263e43;
  color: #fff2d2;
  font: 650 .85rem/1.45 var(--ep-reading);
  text-align: start;
  overflow-wrap: anywhere;
}
.epilogue-day::before {
  content: "";
  width: .5rem;
  height: .5rem;
  flex: none;
  background: #edc681;
  box-shadow: 1px 1px #9a7442;
}
.epilogue-hud .cartridge-small {min-height:44px; max-width:none; white-space:nowrap;}
.epilogue-sheet {
  position: relative;
  grid-column: 2;
  align-self: center;
  min-width: 0;
  width: 100%;
  padding: clamp(1.75rem,3.5vw,3.25rem);
  border: 1px solid #acae94;
  border-top: .3rem solid #34554b;
  background: var(--ep-paper);
  box-shadow: 0 .25rem 0 #33463834, 0 1rem 2.8rem #293b3729;
}
.epilogue-heading { margin: 0 0 clamp(1.1rem,2.3vw,1.65rem); }
.life-charts {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));
  gap:1rem 1.25rem;
  align-items:start;
  margin:0 0 1.3rem;
  padding:.85rem 0 1rem;
  border-block:1px solid #b9bcaa;
}
.life-chart {
  display:grid;
  align-content:start;
  min-width:0;
  margin:0;
  color:#294a40;
  font-family:var(--ep-reading);
}
.life-chart figcaption {color:inherit;font-size:.92rem;font-weight:750;line-height:1.4}
.life-chart svg {display:block;width:100%;height:auto;overflow:visible}
.life-radar {max-width:20rem;justify-self:center;margin-block-start:.45rem}
.life-chart .chart-grid {fill:none;stroke:#c2c6b5;stroke-width:1}
.status-chart {--ep-reading:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;container-type:inline-size}
.status-page .status-chart {margin:.65rem 0;padding:.4rem;background:#f8f3e3}
.status-page .status-chart .chart-title {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.status-page .status-chart figcaption {justify-content:flex-end}
.status-chart figcaption {display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;flex-wrap:wrap}
.radar-keys {display:inline-flex;gap:.7rem;font-size:.75rem;font-weight:550}
.radar-keys span::before {content:"";display:inline-block;width:1rem;border-top:2px solid #196559;vertical-align:middle;margin-inline-end:.25rem}
.radar-keys span:first-child::before {border-top:2px dashed #86551f}
.life-radar .chart-grid {stroke:#9aab9b}
.life-radar .radar-area {fill:#348b78;fill-opacity:.33;stroke:#196559;stroke-width:2.5;stroke-linejoin:round}
.life-radar .radar-area.incomplete {fill:none}
.life-radar .radar-start {fill:none;stroke:#86551f;stroke-width:1.8;stroke-dasharray:4 3;stroke-linejoin:round}
.life-radar .radar-dots {fill:#12534a;stroke:#fff9e8;stroke-width:1.3}
.life-radar .radar-start-dots {fill:#fff9e8;stroke:#86551f;stroke-width:1.4}
.life-radar text {font:600 12.5px var(--ep-reading);fill:#384e45;stroke:none;letter-spacing:normal}
.life-radar .radar-number {font-weight:800;fill:#203c33}
.cash-chart figcaption {display:flex;align-items:baseline;justify-content:space-between;gap:.35rem;flex-wrap:wrap}
.cash-chart figcaption strong {color:#79511e;font-variant-numeric:tabular-nums}
.cash-plot {margin:.75rem 0 .6rem}
.cash-zero {fill:#506258;font:9px var(--ep-reading)}
.money-page .cash-chart {--ep-reading:system-ui,sans-serif}
.worth-fill {fill:#c69750;fill-opacity:.24}
.worth-line {fill:none;stroke:#855622;stroke-width:2.5;stroke-linejoin:round}
.worth-dot {fill:#7e4b1c}
.chart-zero {fill:none;stroke:#697766;stroke-width:1.2;stroke-dasharray:3 3}
.worth-ends {display:flex;justify-content:space-between;align-items:start;gap:.55rem;margin:0}
.worth-ends div {min-width:0;max-width:100%}
.worth-ends div + div {text-align:end}
.worth-ends dt {color:#58675b;font-size:.76rem;line-height:1.4}
.worth-ends dd {margin:0;color:#30463a;font-size:.86rem;font-weight:750;font-variant-numeric:tabular-nums;line-height:1.4;overflow-wrap:anywhere}
@media screen and (max-width:32rem) {
  .epilogue-sheet:has(.life-charts) {margin-top:clamp(3rem,10svh,6rem)}
}
.epilogue-heading .epilogue-status {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .45rem;
  color: #496052;
  font: 700 .81rem/1.6 var(--ep-reading);
}
.epilogue-status::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 1.5rem;
  height: .15rem;
  background: #ab8547;
}
.epilogue .epilogue-heading h1 {
  margin: 0;
  color: #223f36;
  font: 700 clamp(2.15rem,4.4vw,3.55rem)/1.23 "Songti SC","STSong","SimSun",Georgia,serif;
  letter-spacing: .02em;
  text-align: start;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: none;
}
.epilogue .epilogue-prose {
  margin: 0;
  max-width: 34em;
  color: var(--ep-ink);
  font: 400 clamp(1rem,.94rem + .28vw,1.15rem)/1.88 var(--ep-reading);
  letter-spacing: .01em;
  text-align: start;
  line-break: strict;
  word-break: normal;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  white-space: pre-line;
  orphans: 2;
  widows: 2;
}
.epilogue .epilogue-prose p {margin:0; font:inherit; color:inherit; letter-spacing:inherit;}
.epilogue .epilogue-prose p + p {margin-block-start:.85em;}
.epilogue:lang(ja), .epilogue-missing:lang(ja) {
  --ep-reading: "Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif;
  font-family: var(--ep-reading);
}
.epilogue .epilogue-heading h1:lang(ja) {font-family:"Hiragino Mincho ProN","Yu Mincho",serif;}
.epilogue .epilogue-prose:lang(en) {
  font-family: "Segoe UI",system-ui,sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
  line-break: auto;
  hyphens:auto;
  max-width: 58ch;
}
.epilogue .epilogue-heading h1:lang(en) {font-family: Georgia,"Times New Roman",serif;letter-spacing:-.035em;}
.epilogue .last-actions {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: .55rem;
  margin-top: clamp(1.25rem,3vw,2rem);
  padding-top: 1rem;
  border-top: 1px solid var(--ep-line);
}
.epilogue .cover-start {
  justify-content: flex-start;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: .6rem 1.12rem;
  border: 1px solid #27473c;
  box-shadow: 2px 2px 0 #d3be8e;
  color: #fff8df;
  background: #2e5143;
  font: 700 .98rem/1.45 var(--ep-reading);
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
.epilogue .cover-start i { color: #e9c987; flex: none; }
.epilogue .last-share {max-width: 100%; min-width: 0;}
.epilogue .last-share > summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .65rem;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: .45rem .05rem;
  border: none;
  color: #395b4e;
  background: transparent;
  font: 650 .91rem/1.55 var(--ep-reading);
  list-style: none;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
.epilogue .last-share > summary::after {
  content: "";display: block;flex: none;width: .48rem;height: .48rem;margin-top: -.17rem;
  border: solid currentColor;border-width: 0 1.7px 1.7px 0;transform:rotate(45deg);
}
.epilogue .last-share > summary::-webkit-details-marker {display:none;}
.epilogue .last-share[open] > summary::after {margin-top: .3rem;transform:rotate(225deg);}
.epilogue .last-share-options {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11.5rem),1fr));gap: .4rem .65rem;
  padding: .25rem 0 .15rem;
}
.epilogue .last-share-options > * {
  display:flex;align-items:center;min-width:0;min-height:44px;justify-content:flex-start;padding:.6rem .8rem;
  border: 1px solid var(--ep-line);border-radius:2px;background:#f0efdf;color:var(--ep-ink);
  font: 550 .9rem/1.45 var(--ep-reading);text-align:start;text-decoration:none;cursor:pointer;white-space:normal;overflow-wrap:anywhere;
}
.epilogue .share-manual:not([hidden]) {display:grid;gap:.5rem;margin-top:.8rem;color:var(--ep-muted);font-size:.9rem;}
.epilogue .share-manual textarea {width:100%;min-height:48px;padding:.66rem;border:1px solid #879886;color:var(--ep-ink);background:#fffdf3;font: 400 1rem/1.6 var(--ep-reading);}
.epilogue :is(button,summary,a,textarea):focus-visible {outline: 3px solid #a86323;outline-offset: 3px;}
@media (hover:hover) {
  .epilogue .last-share-options > :hover {background:#e4ead8;}
  .epilogue .last-share > summary:hover {color:#173c30;}
}
@media screen and (max-width:52rem) {
  .epilogue > .world,.epilogue > .pixel-world {
    height: clamp(16rem,40svh,24rem);
    object-position: 50% 60%;
  }
  .epilogue-layout {
    display:flex;flex-direction:column;gap:0;align-items:stretch;justify-content:flex-start;
    max-width:42rem;padding:max(.95rem,env(safe-area-inset-top)) max(3.5vw,env(safe-area-inset-right)) max(1.5rem,env(safe-area-inset-bottom)) max(3.5vw,env(safe-area-inset-left));
  }
  .epilogue-hud {min-height:44px;}
  .epilogue-sheet {
    margin-top:clamp(8.5rem,23svh,14rem);
    padding:clamp(1.25rem,5.6vw,2.4rem) clamp(12px,5.6vw,2.4rem);
  }
}
@media screen and (max-height:31rem) and (orientation:landscape) {
  .epilogue > .world,.epilogue > .pixel-world {height:max(100svh,20rem);}
  .epilogue-layout {display:grid;max-width:78rem;min-height:100svh;grid-template-columns:minmax(0,1fr) minmax(0, min(58%,35rem));grid-template-rows:auto 1fr;gap:1rem;padding: .85rem 2.5vw 1.5rem;}
  .epilogue-sheet {grid-column:2;align-self:start;margin:0;padding:1.3rem 1.55rem;}
  .epilogue .epilogue-heading h1 {font-size:2.15rem;}
}
@media screen and (max-width:42rem) and (max-height:31rem) and (orientation:landscape) {
  .epilogue-layout {display:flex; flex-direction:column; gap:1rem;}
  .epilogue-sheet {margin:0; padding-inline:clamp(14px,4vw,1.55rem);}
}
.epilogue-missing {
  box-sizing:border-box;
  min-height:100vh;min-height:100svh;
  display:grid;grid-template-columns:minmax(0,1fr);align-content:center;justify-items:center;
  padding:clamp(12px,5vw,3.75rem);background:#d8ded0;
  color:#253e34;font-family:"PingFang SC","Microsoft YaHei UI",system-ui,sans-serif;
}
.epilogue-missing .missing {
  margin:0;min-inline-size:0;width:min(100%,33rem);padding:clamp(14px,5vw,3rem);
  border:1px solid #a6af9e;border-top:.3rem solid #37584a;background:#f8f3e3;
}
.epilogue-missing .missing header {font-weight:700;color:#586b58;font-size:.85rem;}
.epilogue-missing h1 {margin:.7rem 0 1rem;font-size:clamp(1.6rem,5vw,2.2rem);line-height:1.25;overflow-wrap:anywhere;}
.epilogue-missing p {font-size:1rem;line-height:1.7;overflow-wrap:anywhere;}
.epilogue-missing a {display:inline-block;min-height:44px;padding:.6rem 0;color:#214e3a;font-weight:650;}
