:root {
  --ink: #2f3a4a;
  --paper: #ffffff;
  --sky: #dff1fb;
  --page: #eef3f8;
  --gold: #f4a93a;
  --gold-light: #ffd79a;
  --green: #4fb260;
  --blue: #29b6f6;
  --shadow: rgba(58, 82, 105, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; min-width: 320px; overflow-x: hidden; color: var(--ink); background-color: var(--sky); background-image: url("assets/background.png"); background-size: cover; background-position: center; background-attachment: fixed; font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; letter-spacing: 0; }
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 4px solid #2f9ddb; outline-offset: 3px; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { overflow-wrap: anywhere; }

.topbar {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 50%;
  width: min(1180px, calc(100% - 28px));
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 9px 0 14px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, .94);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 6px 0 rgba(47, 58, 74, .14);
  backdrop-filter: blur(10px);
}
.brand-button { display: flex; align-items: center; gap: 8px; padding: 0; background: none; border: 0; font-weight: 900; cursor: pointer; }
.brand-button img { width: 34px; height: 34px; object-fit: contain; }
.discovery-state { display: grid; justify-items: center; gap: 1px; }
.discovery-count { margin: 0; color: #47758e; font-size: 13px; font-weight: 900; }
.discovery-state > span { color: #6d8796; font-size: 10px; font-weight: 800; transition: color .3s ease; }
.top-actions { display: flex; align-items: center; gap: 7px; }
.top-actions a { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; background: var(--gold); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--ink); text-decoration: none; font-size: 13px; font-weight: 900; }
.wishlist-short { display: none; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; font-size: 22px; font-weight: 900; cursor: pointer; }

.world-memory {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}
.memory-aura {
  position: absolute;
  left: 50%;
  bottom: -32vh;
  width: min(1100px, 86vw);
  aspect-ratio: 1.9;
  opacity: 0;
  transform: translateX(-50%) scale(.6);
  background: radial-gradient(ellipse at center, rgba(255, 210, 106, .35) 0 13%, rgba(117, 204, 154, .2) 32%, rgba(76, 177, 230, .08) 58%, transparent 73%);
  filter: blur(12px);
  transition: opacity 1.2s ease, transform 1.6s cubic-bezier(.18, .82, .28, 1);
}
.world-memory.has-memory .memory-aura { opacity: 1; transform: translateX(-50%) scale(1); }
.memory-object {
  --memory-transform: translateY(0) scale(1) rotate(0deg);
  position: absolute;
  opacity: 0;
  transform: translateY(34px) scale(.62) rotate(-8deg);
  transform-origin: center;
  filter: saturate(.78);
  transition: opacity .8s ease, transform 1s cubic-bezier(.18, 1.32, .38, 1), filter .6s ease;
}
.memory-object.is-grown {
  opacity: .58;
  transform: var(--memory-transform);
  animation: memory-awaken .9s cubic-bezier(.18, 1.35, .38, 1);
}
.memory-mini-card {
  position: absolute;
  width: 72px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(255, 255, 255, .9);
  border: 2px solid rgba(47, 58, 74, .82);
  border-radius: 12px;
  box-shadow: 5px 6px 0 rgba(58, 82, 105, .13);
}
.memory-mini-card::after {
  content: "";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 13px;
  height: 13px;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.memory-mini-card img { width: 45px; height: 45px; object-fit: contain; }
.memory-mini-card strong { font-size: 10px; }

.memory-life {
  --memory-transform: translateY(0) scale(1) rotate(-5deg);
  left: max(18px, calc(50% - 700px));
  top: 18%;
  width: 112px;
  height: 122px;
}
.memory-life .memory-mini-card { left: 20px; top: 14px; animation: memory-breathe 3.8s ease-in-out infinite; }
.memory-orbit {
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(54, 146, 183, .38);
  border-radius: 50%;
  animation: memory-orbit 18s linear infinite;
}
.memory-pulse {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 50%;
  animation: memory-pulse 2.8s ease-out infinite;
}
.pulse-one { left: 2px; top: 56px; }
.pulse-two { right: 4px; top: 28px; animation-delay: -1.35s; }

.memory-nature {
  --memory-transform: translateY(0) scale(1) rotate(4deg);
  right: max(18px, calc(50% - 705px));
  top: 29%;
  width: 172px;
  height: 220px;
}
.memory-tree-card { left: 2px; top: 6px; transform: rotate(-6deg); }
.memory-fire-card { right: 2px; bottom: 9px; transform: rotate(5deg); }
.memory-leaf-card, .memory-smoke-card { width: 50px; height: 62px; }
.memory-leaf-card img, .memory-smoke-card img { width: 31px; height: 31px; }
.memory-leaf-card strong, .memory-smoke-card strong { font-size: 8px; }
.memory-leaf-card { left: 30px; top: 10px; opacity: 0; animation: memory-leaf 7s ease-in-out infinite; }
.memory-smoke-card { right: 15px; bottom: 18px; opacity: 0; animation: memory-smoke 7.5s ease-in-out .9s infinite; }

.memory-civilization {
  --memory-transform: translateY(0) scale(1) rotate(-2deg);
  left: max(18px, calc(50% - 705px));
  bottom: 14%;
  width: 205px;
  height: 145px;
}
.memory-village-card { left: 0; bottom: 0; transform: rotate(-5deg); }
.memory-warehouse-card { right: 0; top: 0; transform: rotate(5deg); }
.memory-road {
  position: absolute;
  left: 49px;
  top: 70px;
  width: 112px;
  height: 32px;
  border-top: 3px dashed rgba(47, 58, 74, .35);
  border-radius: 50%;
  transform: rotate(-16deg);
}
.memory-walker {
  position: absolute;
  z-index: 3;
  left: 67px;
  top: 48px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .86);
  border: 2px solid var(--ink);
  border-radius: 50%;
  animation: memory-walk 4.8s ease-in-out infinite;
}
.memory-walker img { width: 24px; height: 24px; object-fit: contain; }

.memory-machine {
  --memory-transform: translateY(0) scale(1) rotate(2deg);
  right: max(20px, calc(50% - 700px));
  bottom: 13%;
  width: 210px;
  height: 150px;
}
.memory-factory-card { right: 5px; top: 4px; transform: rotate(4deg); }
.memory-belt {
  position: absolute;
  left: 2px;
  right: 48px;
  bottom: 24px;
  height: 26px;
  overflow: hidden;
  border-block: 3px solid rgba(47, 58, 74, .72);
}
.memory-belt i {
  position: absolute;
  top: 5px;
  width: 13px;
  height: 13px;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 3px;
  animation: memory-cargo 4.2s linear infinite;
}
.memory-belt i:nth-child(2) { animation-delay: -1.4s; }
.memory-belt i:nth-child(3) { animation-delay: -2.8s; }
.memory-gear {
  position: absolute;
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(3px 4px 0 rgba(58, 82, 105, .15));
  animation: memory-gear 8s linear infinite;
}
.memory-gear-one { left: 20px; top: 15px; }
.memory-gear-two { left: 63px; top: 45px; width: 39px; height: 39px; animation-direction: reverse; }

.finale-constellation {
  position: absolute;
  inset: 78px 2.5% auto;
  height: 430px;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .65s ease, transform 1.1s cubic-bezier(.18, 1, .3, 1);
}
.world-memory.is-finale .memory-object { opacity: .12; filter: saturate(.35) blur(.4px); }
.world-memory.is-finale .finale-constellation { opacity: .68; transform: scale(1); }
.finale-constellation svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.constellation-path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1500; stroke-dashoffset: 1500; }
.constellation-path-shadow { stroke: rgba(47, 58, 74, .18); stroke-width: 12; }
.constellation-path-gold { stroke: rgba(244, 169, 58, .82); stroke-width: 5; }
.world-memory.is-finale .constellation-path { animation: constellation-draw 1.9s cubic-bezier(.25, .8, .28, 1) .22s forwards; }
.constellation-node {
  position: absolute;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.2) rotate(-18deg);
  background: rgba(255, 255, 255, .94);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 6px 0 rgba(58, 82, 105, .16);
}
.constellation-node img { width: 36px; height: 36px; object-fit: contain; }
.node-water { left: .4%; top: 72%; }
.node-life { left: 18%; top: 50%; }
.node-tree { left: 32%; top: 40%; }
.node-village { left: 49%; top: 17%; }
.node-factory { left: 64%; top: 34%; }
.node-stars { right: .2%; top: 8%; width: 66px; height: 66px; border-color: var(--gold); }
.node-stars img { width: 46px; height: 46px; }
.world-memory.is-finale .constellation-node { animation: constellation-node-in .62s cubic-bezier(.16, 1.48, .34, 1) forwards; }
.world-memory.is-finale .node-water { animation-delay: .25s; }
.world-memory.is-finale .node-life { animation-delay: .52s; }
.world-memory.is-finale .node-tree { animation-delay: .79s; }
.world-memory.is-finale .node-village { animation-delay: 1.06s; }
.world-memory.is-finale .node-factory { animation-delay: 1.33s; }
.world-memory.is-finale .node-stars { animation-delay: 1.65s; }
.constellation-caption {
  position: absolute;
  right: 5%;
  bottom: 6%;
  padding: 8px 12px;
  opacity: 0;
  background: rgba(255, 255, 255, .9);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 4px 5px 0 rgba(58, 82, 105, .14);
  font-size: 12px;
  font-weight: 900;
}
.world-memory.is-finale .constellation-caption { animation: memory-caption-in .55s ease 2s forwards; }
.world-memory.night-memory { filter: hue-rotate(6deg) brightness(.82) saturate(.78); }

.page-deck { position: relative; z-index: 1; min-height: 100svh; }
.site-page { position: relative; min-height: 100svh; padding: 96px 24px 145px; overflow: hidden; }
.site-page[hidden] { display: none; }
.site-page.leaving { pointer-events: none; }
.page-content { position: relative; z-index: 2; width: min(1050px, 100%); margin: 0 auto; text-align: center; }
.site-page > .page-content { transform-origin: 50% 14%; animation: page-spring-in .68s both; }
.site-page.leaving > .page-content { animation: page-spring-out .3s both; }
.wide-content { width: min(1180px, 100%); }
.chapter-label { margin: 0 0 10px; color: #33738e; font-size: 14px; font-weight: 900; }
.page-heading { width: min(820px, 100%); margin: 0 auto 38px; text-align: center; }
.left-heading { margin-left: 0; text-align: left; }
.page-heading h2, .final-heading h2 { margin: 0 0 14px; font-size: 48px; line-height: 1.2; }
.page-heading p:last-child, .final-heading p { margin: 0; font-size: 17px; line-height: 1.8; }

.page-origin, .page-life, .page-living, .page-civilization, .page-machine, .page-stars { background: transparent; }

.title-board { width: min(900px, 100%); margin: 0 auto; padding: 20px 26px 17px; background: var(--paper); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 9px 10px 0 rgba(47, 58, 74, .15); }
h1 { margin: 0; font-size: 58px; line-height: 1.12; }
h1 span { display: inline; }
.title-board p { margin: 8px 0 0; font-size: 14px; font-weight: 900; }
.page-lead { margin: 22px auto 0; font-size: 18px; font-weight: 800; }

.game-card {
  position: absolute;
  width: 112px;
  height: 138px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 8px 9px 0 var(--shadow);
}
.game-card i { position: absolute; top: -9px; right: -9px; width: 23px; height: 23px; background: var(--gold); border: 3px solid var(--ink); border-radius: 50%; }
.game-card i::after { content: ""; position: absolute; inset: 5px; background: var(--paper); border-radius: 50%; }
.game-card img { width: 68px; height: 68px; object-fit: contain; pointer-events: none; }
.game-card strong { font-size: 16px; }

.origin-cluster { position: relative; z-index: 2; width: min(760px, 100%); height: 300px; margin: 0 auto; }
.source-water { left: 7%; bottom: 20px; transform: rotate(-7deg); }
.source-wind { left: 33%; top: 40px; transform: rotate(4deg); }
.source-earth { right: 27%; bottom: 3px; transform: rotate(-3deg); }
.source-stone { right: 4%; top: 20px; transform: rotate(8deg); }

.synthesis-zone { position: relative; z-index: 5; touch-action: none; }
.page-synthesis { width: min(760px, 100%); height: 330px; margin: 5px auto 0; }
.synthesis-title { position: absolute; top: 0; left: 0; width: 100%; margin: 0; color: #456e84; font-size: 14px; font-weight: 900; }
.synthesis-card {
  position: absolute;
  z-index: 4;
  top: 60px;
  width: 100px;
  height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 7px 8px 0 var(--shadow);
  cursor: grab;
  user-select: none;
}
.synthesis-card strong, .synthesis-card b { font-size: 44px; line-height: 1; }
.synthesis-card span { font-size: 14px; font-weight: 900; }
.number-piece { left: 29%; border-color: var(--gold); }
.page-piece { right: 29%; }
.page-piece b { width: 54px; height: 60px; display: grid; place-items: center; background: #f5f7fa; border: 2px solid var(--ink); border-radius: 4px 4px 12px 4px; font-size: 27px; }
.plus-mark { position: absolute; top: 102px; left: 50%; transform: translateX(-50%); font-size: 38px; font-weight: 900; }
.synthesis-hint { position: absolute; left: 0; bottom: 24px; width: 100%; margin: 0; font-size: 13px; font-weight: 800; }
.synthesis-card.selected { box-shadow: 0 0 0 5px #5eb7e7, 7px 8px 0 var(--shadow); }
.synthesis-card.dragging, .alchemy-card.dragging { z-index: 20; cursor: grabbing; transform: rotate(4deg) scale(1.04); }
.synthesis-card.consumed, .alchemy-card.consumed { opacity: 0; transform: scale(.68); pointer-events: none; transition: opacity .28s ease, transform .28s ease; }
.page-result { left: 50%; opacity: 0; pointer-events: none; transform: translateX(-50%) scale(.2) rotate(-8deg); border-color: var(--green); cursor: default; }
.page-result.visible { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); transition: opacity .25s ease, transform .55s cubic-bezier(.2, 1.5, .5, 1); }
.page-synthesis.completed .plus-mark { opacity: 0; }
.gated:not(.ready) { height: 85px; }
.gated:not(.ready) > :not(.locked-message) { display: none; }
.gated.ready .locked-message { color: #267c39; }

.alchemy-stage { width: min(900px, 100%); height: 480px; margin: 0 auto; }
.alchemy-card { z-index: 6; border-color: var(--gold); cursor: grab; user-select: none; }
.alchemy-water { left: 25%; top: 125px; }
.alchemy-earth { right: 25%; top: 65px; }
.alchemy-result { left: 50%; top: 135px; z-index: 8; opacity: 0; pointer-events: none; transform: translateX(-50%) scale(.2) rotate(-8deg); border-color: var(--green); }
.alchemy-result.visible { opacity: 1; transform: translateX(-50%) scale(1); transition: opacity .25s ease, transform .55s cubic-bezier(.2, 1.5, .5, 1); }
.found-label { position: absolute; top: -18px; left: 50%; padding: 3px 9px; transform: translateX(-50%); background: #fff49c; border: 2px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 900; }
.stage-decoration { position: absolute; z-index: 1; width: 110px; height: 110px; object-fit: contain; opacity: .2; filter: saturate(.65); }
.tree-decoration { right: 5%; top: 25px; transform: rotate(8deg); }
.night-decoration { left: 4%; bottom: 48px; transform: rotate(-9deg); }
.recipe-line { position: absolute; left: 50%; bottom: 78px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; transform: translateX(-50%) translateY(10px); background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; opacity: 0; font-size: 13px; white-space: nowrap; }
.recipe-line.visible { opacity: 1; transform: translateX(-50%) translateY(0); transition: .3s ease .2s; }
.recipe-line strong { color: #267c39; }
.alchemy-stage .synthesis-hint { bottom: 35px; }
.stage-reset { position: absolute; right: 14%; bottom: 68px; width: 42px; height: 42px; display: grid; place-items: center; opacity: 0; pointer-events: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 3px 4px 0 var(--ink); font-size: 24px; font-weight: 900; cursor: pointer; }
.stage-reset.visible { opacity: 1; pointer-events: auto; }
.particle { position: absolute; z-index: 15; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; animation: burst .68s ease-out forwards; }

.living-scene { position: relative; min-height: 380px; margin: 10px 0 25px; }
.living-event { position: absolute; width: 42%; min-height: 260px; }
.tree-event { left: 2%; top: 40px; }
.fire-event { right: 4%; top: 10px; }
.living-event .source-event-card { z-index: 7; left: 18%; top: 0; }
.fire-event .source-event-card, .fire-event .event-card { top: 116px; }
.living-event p { position: absolute; left: 49%; top: 70px; width: 51%; margin: 0; text-align: left; }
.living-event p strong, .living-event p span { display: block; }
.living-event p strong { margin-bottom: 7px; font-size: 17px; }
.living-event p span { color: #556575; font-size: 13px; line-height: 1.65; }
.event-card { z-index: 6; left: 18%; top: 0; opacity: 0; pointer-events: none; }
.leaf-card { animation: falling-leaf-card 8s ease-in-out infinite; }
.smoke-card { animation: rising-smoke-card 8s ease-in-out .6s infinite; }
.day-night-control { position: absolute; left: 50%; bottom: 5px; width: 170px; height: 74px; display: flex; align-items: center; justify-content: center; gap: 8px; transform: translateX(-50%); background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 4px 5px 0 var(--ink); cursor: pointer; }
.day-night-control img { width: 48px; height: 48px; object-fit: contain; }
.day-night-control .night-icon { display: none; }
.day-night-control span { width: 55px; font-size: 12px; font-weight: 900; }
.day-night-control.night-mode .day-icon { display: none; }
.day-night-control.night-mode .night-icon { display: block; }
.game-window { position: relative; width: min(850px, 100%); margin: 0 auto 25px; }
.page-living { position: relative; isolation: isolate; }
.page-living::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: 0; pointer-events: none; background: rgba(41, 76, 111, .24); transition: opacity .45s ease; }
.page-living.night-theme::before { opacity: 1; }
.game-window img { width: 100%; border: 3px solid var(--ink); border-radius: 8px; box-shadow: 10px 12px 0 var(--shadow); }
.game-window figcaption, .collection-window figcaption { position: absolute; right: 12px; bottom: 10px; padding: 5px 9px; background: var(--paper); border: 2px solid var(--ink); border-radius: 5px; font-size: 12px; font-weight: 900; }

.civilization-flow { position: relative; width: min(980px, 100%); height: 440px; margin: 5px auto 10px; }
.civilization-flow .game-card { z-index: 4; }
.civ-human { left: 2%; top: 30px; transform: rotate(-7deg); }
.civ-farm { left: 24%; top: 205px; transform: rotate(5deg); }
.civ-workbench { left: 45%; top: 35px; transform: rotate(-3deg); }
.civ-village { right: 20%; top: 210px; transform: rotate(5deg); }
.civ-warehouse { right: 1%; top: 35px; transform: rotate(7deg); }
.flow-line { position: absolute; z-index: 1; height: 5px; background: var(--gold); box-shadow: 0 4px 0 rgba(47, 58, 74, .12); transform-origin: left; }
.line-one { left: 12%; top: 145px; width: 24%; transform: rotate(29deg); }
.line-two { left: 34%; top: 246px; width: 25%; transform: rotate(-27deg); }
.line-three { left: 56%; top: 155px; width: 30%; transform: rotate(25deg); }
.flow-note { position: absolute; margin: 0; color: #5d6d78; font-size: 12px; font-weight: 900; }
.note-food { left: 15%; bottom: 40px; }.note-craft { left: 45%; bottom: 58px; }.note-home { right: 8%; bottom: 38px; }
.civilization-copy { width: min(900px, 100%); margin: 0 auto 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; text-align: left; }
.civilization-copy p { margin: 0; padding-top: 18px; border-top: 2px solid rgba(47, 58, 74, .18); line-height: 1.75; }

.machine-line { position: relative; min-height: 370px; margin: 25px 0 10px; }
.conveyor { position: absolute; left: 12%; right: 11%; top: 190px; height: 8px; background: var(--ink); border-radius: 999px; }
.conveyor::after { content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 28px; border-block: 3px solid var(--ink); }
.machine-workbench { left: 8%; top: 95px; transform: rotate(-5deg); }
.machine-factory { left: 45%; top: 68px; width: 136px; height: 166px; transform: translateX(-50%); }
.machine-factory img { width: 86px; height: 86px; }
.machine-computer { right: 7%; top: 98px; transform: rotate(6deg); }
.machine-icon { position: absolute; z-index: 4; width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(6px 7px 0 var(--shadow)); animation: spin 9s linear infinite; }
.gear-one { left: 28%; top: 245px; }.gear-two { right: 26%; top: 238px; animation-direction: reverse; }
.cargo { position: absolute; z-index: 3; top: 178px; width: 24px; height: 24px; background: var(--gold); border: 3px solid var(--ink); border-radius: 5px; animation: cargo-move 6s linear infinite; }
.cargo-two { animation-delay: -2s; }.cargo-three { animation-delay: -4s; }
.machine-facts { width: min(920px, 100%); margin: 0 auto 25px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ink); border: 2px solid var(--ink); }
.machine-facts p { min-height: 120px; margin: 0; padding: 22px; background: var(--paper); text-align: left; }
.machine-facts strong, .machine-facts span { display: block; }.machine-facts strong { margin-bottom: 8px; color: #167eae; }.machine-facts span { font-size: 13px; line-height: 1.65; }

.page-stars { position: relative; }
.stars-content { position: relative; z-index: 3; }
.stars-scene { position: relative; height: 360px; }
.star-rocket { left: 8%; bottom: 28px; transform: rotate(-7deg); }
.star-galaxy { left: 46%; top: 35px; transform: translateX(-50%) rotate(4deg); }
.star-destination { right: 7%; bottom: 32px; width: 142px; height: 176px; transform: rotate(7deg); border-color: var(--gold); }
.star-destination img { width: 92px; height: 92px; }
.final-heading { width: min(900px, 100%); margin: 0 auto 34px; }
.content-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 auto 40px; background: var(--ink); border: 2px solid var(--ink); }
.content-facts p { min-height: 96px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--paper); }
.content-facts strong { color: #1486b9; font-size: 32px; }.content-facts span { font-size: 13px; font-weight: 900; }
.collection-window { position: relative; width: min(900px, 100%); margin: 0 auto 34px; }
.collection-window img { width: 100%; border: 3px solid var(--ink); border-radius: 8px; box-shadow: 10px 12px 0 var(--shadow); }
.final-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.final-actions a { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 22px; border: 2px solid var(--ink); border-radius: 7px; box-shadow: 4px 5px 0 var(--ink); text-decoration: none; font-weight: 900; }
.primary-action { background: var(--gold); }.secondary-action { background: var(--paper); }
.final-note { margin-top: 24px; color: #4d697b; font-size: 13px; font-weight: 800; }
.star-specks span { position: absolute; width: 10px; height: 10px; background: var(--gold); border: 2px solid var(--ink); transform: rotate(45deg); }
.star-specks span:nth-child(1) { left: 8%; top: 15%; }.star-specks span:nth-child(2) { left: 21%; top: 43%; width: 7px; height: 7px; }.star-specks span:nth-child(3) { right: 13%; top: 21%; }.star-specks span:nth-child(4) { right: 32%; top: 48%; width: 7px; height: 7px; }.star-specks span:nth-child(5) { left: 14%; bottom: 20%; }.star-specks span:nth-child(6) { right: 7%; bottom: 28%; width: 7px; height: 7px; }

.bookmark-dock { position: fixed; z-index: 90; left: 50%; bottom: 12px; min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; transform: translateX(-50%); background: rgba(255, 255, 255, .95); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 5px 6px 0 rgba(47, 58, 74, .17); backdrop-filter: blur(10px); }
.dock-label { padding: 0 7px; color: #567386; font-size: 11px; font-weight: 900; }
.bookmark { width: 64px; height: 50px; display: none; grid-template-columns: 20px 1fr; align-items: center; padding: 5px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; cursor: pointer; }
.bookmark.unlocked { display: grid; animation: bookmark-in .45s cubic-bezier(.2, 1.4, .5, 1); }
.bookmark b { font-size: 18px; }.bookmark span { font-size: 11px; font-weight: 900; }
.bookmark.active { background: var(--gold-light); box-shadow: inset 0 -4px 0 var(--gold); animation: active-bookmark-pop .46s cubic-bezier(.2, 1.45, .4, 1) both; }

.toast { position: fixed; z-index: 120; left: 50%; top: 82px; padding: 9px 14px; transform: translateX(-50%) translateY(-10px); opacity: 0; pointer-events: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 4px 5px 0 var(--ink); font-size: 13px; font-weight: 900; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); transition: .25s ease; }

@keyframes page-spring-in {
  0% { opacity: 0; transform: translateY(15px) scale(.965); }
  54% { opacity: 1; transform: translateY(-5px) scale(1.014); }
  74% { transform: translateY(2px) scale(.996); }
  88% { transform: translateY(-1px) scale(1.003); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes page-spring-out {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  34% { opacity: 1; transform: translateY(-3px) scale(1.006); }
  100% { opacity: 0; transform: translateY(12px) scale(.97); }
}
@keyframes active-bookmark-pop {
  0% { transform: translateY(5px) scale(.88); }
  62% { transform: translateY(-3px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes burst { from { opacity: 1; transform: translate(0, 0) scale(.3); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); } }
@keyframes bookmark-in { from { opacity: 0; transform: translateY(16px) scale(.7); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes falling-leaf-card {
  0%, 8% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.82); }
  10% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.82); }
  14%, 78% { opacity: 1; transform: translate(36px, 116px) rotate(7deg) scale(.78); }
  100% { opacity: 0; transform: translate(72px, 132px) rotate(18deg) scale(.78); }
}
@keyframes rising-smoke-card {
  0%, 8% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.82); }
  10% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.82); }
  14%, 78% { opacity: 1; transform: translate(36px, -112px) rotate(-6deg) scale(.78); }
  100% { opacity: 0; transform: translate(62px, -196px) rotate(4deg) scale(.78); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cargo-move { from { left: 13%; } to { left: 84%; } }
@keyframes memory-awaken {
  0% { opacity: 0; transform: translateY(34px) scale(.55) rotate(-9deg); }
  68% { opacity: .72; transform: var(--memory-transform) scale(1.06); }
  100% { opacity: .58; transform: var(--memory-transform); }
}
@keyframes memory-awaken-mobile {
  0% { opacity: 0; transform: translateY(24px) scale(.48) rotate(-7deg); }
  68% { opacity: .28; transform: var(--memory-transform) scale(1.04); }
  100% { opacity: .22; transform: var(--memory-transform); }
}
@keyframes memory-breathe {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}
@keyframes memory-orbit { to { transform: rotate(360deg); } }
@keyframes memory-pulse {
  0% { opacity: 0; transform: scale(.2); }
  30% { opacity: .7; }
  100% { opacity: 0; transform: translateY(-20px) scale(1.2); }
}
@keyframes memory-leaf {
  0%, 20% { opacity: 0; transform: translate(2px, 8px) rotate(-8deg) scale(.6); }
  30% { opacity: 1; }
  70% { opacity: .9; }
  100% { opacity: 0; transform: translate(42px, 128px) rotate(28deg) scale(.82); }
}
@keyframes memory-smoke {
  0%, 20% { opacity: 0; transform: translate(-2px, 0) rotate(5deg) scale(.62); }
  31% { opacity: 1; }
  75% { opacity: .82; }
  100% { opacity: 0; transform: translate(-38px, -128px) rotate(-7deg) scale(.78); }
}
@keyframes memory-walk {
  0%, 100% { transform: translate(0, 12px) rotate(-4deg); }
  50% { transform: translate(54px, -9px) rotate(4deg); }
}
@keyframes memory-cargo {
  from { left: -18px; transform: rotate(-3deg); }
  to { left: calc(100% + 6px); transform: rotate(3deg); }
}
@keyframes memory-gear { to { transform: rotate(360deg); } }
@keyframes constellation-draw { to { stroke-dashoffset: 0; } }
@keyframes constellation-node-in {
  0% { opacity: 0; transform: scale(.2) rotate(-18deg); }
  72% { opacity: 1; transform: scale(1.12) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes memory-caption-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  html, body { width: 100dvw; max-width: 100dvw; overflow-x: hidden; }
  .topbar { top: 8px; left: 8px; width: calc(100dvw - 16px); max-width: calc(100dvw - 16px); height: 54px; transform: none; }
  .brand-button span { display: none; }
  .discovery-state { flex: 1; min-width: 0; justify-items: center; }
  .discovery-count { font-size: 10px; white-space: nowrap; }
  .discovery-state > span { display: none; }
  .top-actions { gap: 5px; }
  .top-actions a { min-width: 58px; padding: 8px 7px; font-size: 11px; }
  .wishlist-full { display: none; }
  .wishlist-short { display: inline; }
  .icon-button { width: 34px; height: 34px; }
  .site-page { padding: 82px 14px 130px; }
  .chapter-label { font-size: 12px; }
  .title-board { padding: 15px 10px 13px; border-width: 3px; border-radius: 16px; }
  h1 { font-size: clamp(27px, 8.5vw, 34px); }
  h1 span { display: block; white-space: nowrap; }
  .title-board p { font-size: 9px; }
  .page-lead { font-size: 14px; line-height: 1.55; }
  .page-heading { margin-bottom: 24px; }
  .page-heading h2, .final-heading h2 { font-size: 34px; }
  .page-heading p:last-child, .final-heading p { font-size: 14px; }
  .left-heading { text-align: center; }
  .game-card { width: 88px; height: 110px; border-radius: 14px; }
  .game-card img { width: 53px; height: 53px; }
  .game-card strong { font-size: 13px; }
  .origin-cluster { height: 290px; }
  .source-water { left: 1%; bottom: 25px; }.source-wind { left: 28%; top: 65px; }.source-earth { right: 24%; bottom: 10px; }.source-stone { right: 3%; top: 34px; }
  .page-synthesis { height: 300px; }
  .synthesis-card { top: 58px; width: 86px; height: 106px; }
  .synthesis-card strong, .synthesis-card b { font-size: 35px; }
  .number-piece { left: 20%; }.page-piece { right: 20%; }.plus-mark { top: 94px; }
  .synthesis-hint { bottom: 30px; font-size: 11px; }
  .alchemy-stage { height: 430px; }
  .alchemy-water { left: 12%; top: 110px; }.alchemy-earth { right: 12%; top: 65px; }.alchemy-result { top: 125px; }
  .stage-decoration { width: 78px; height: 78px; }.stage-reset { right: 5%; bottom: 70px; }
  .living-scene { min-height: 590px; }
  .living-event { width: 100%; min-height: 225px; }
  .tree-event { left: 0; top: 15px; }.fire-event { right: 0; top: 250px; }
  .living-event .source-event-card, .living-event .event-card { left: 8%; }.living-event p { left: 42%; width: 55%; top: 35px; }
  .day-night-control { bottom: 0; }
  .game-window figcaption, .collection-window figcaption { position: static; margin-top: -2px; border-radius: 0 0 5px 5px; }
  .civilization-flow { height: 570px; }
  .civ-human { left: 0; top: 15px; }.civ-farm { left: 35%; top: 150px; }.civ-workbench { right: 0; left: auto; top: 22px; }.civ-village { left: 7%; right: auto; top: 340px; }.civ-warehouse { right: 7%; top: 345px; }
  .line-one { left: 13%; top: 120px; width: 34%; transform: rotate(29deg); }.line-two { left: 47%; top: 255px; width: 33%; transform: rotate(-35deg); }.line-three { left: 45%; top: 277px; width: 38%; transform: rotate(42deg); }
  .flow-note { display: none; }
  .civilization-copy { grid-template-columns: 1fr; gap: 18px; }
  .machine-line { min-height: 500px; }
  .conveyor { left: 10%; right: 10%; top: 246px; transform: rotate(90deg); }
  .machine-workbench { left: 4%; top: 45px; }.machine-factory { left: 50%; top: 190px; }.machine-computer { right: 4%; top: 350px; }
  .gear-one { left: 4%; top: 285px; }.gear-two { right: 3%; top: 150px; }
  .cargo { display: none; }
  .machine-facts { grid-template-columns: 1fr; }
  .machine-facts p { min-height: 92px; }
  .stars-scene { height: 310px; }
  .star-rocket { left: 0; }.star-galaxy { left: 45%; }.star-destination { right: 3%; width: 106px; height: 132px; }
  .star-destination img { width: 65px; height: 65px; }
  .content-facts { grid-template-columns: repeat(2, 1fr); }
  .content-facts p { min-height: 84px; flex-direction: column; gap: 0; }
  .bookmark-dock { left: 8px; right: auto; bottom: 8px; width: calc(100dvw - 16px); max-width: calc(100dvw - 16px); min-width: 0; min-height: 64px; box-sizing: border-box; justify-content: flex-start; overflow-x: auto; transform: none; }
  .dock-label { position: sticky; left: 0; z-index: 2; background: var(--paper); }
  .bookmark { min-width: 54px; width: 54px; grid-template-columns: 1fr; justify-items: center; }
  .bookmark span { font-size: 9px; }
  .toast { top: auto; bottom: 84px; }
  .memory-object.is-grown { opacity: .22; animation-name: memory-awaken-mobile; }
  .memory-life { left: -28px; top: 17%; transform-origin: left center; }
  .memory-nature { right: -58px; top: 31%; transform-origin: right center; }
  .memory-civilization { left: -70px; bottom: 19%; transform-origin: left center; }
  .memory-machine { right: -72px; bottom: 14%; transform-origin: right center; }
  .memory-object {
    --memory-transform: scale(.68);
    filter: saturate(.62);
  }
  .world-memory.is-finale .memory-object { opacity: .05; }
  .finale-constellation { inset: 74px 0 auto; height: 340px; }
  .world-memory.is-finale .finale-constellation { opacity: .42; }
  .constellation-node { width: 38px; height: 38px; border-width: 2px; }
  .constellation-node img { width: 26px; height: 26px; }
  .node-stars { width: 46px; height: 46px; }
  .node-stars img { width: 32px; height: 32px; }
  .constellation-caption { display: none; }
}

@media (max-width: 560px) {
  .origin-cluster {
    width: min(292px, 100%);
    height: 310px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    justify-items: center;
    gap: 22px 46px;
  }
  .origin-cluster .game-card { position: relative; inset: auto; }
  .source-water { transform: translateY(9px) rotate(-6deg); }
  .source-wind { transform: translateY(-8px) rotate(4deg); }
  .source-earth { transform: translateY(5px) rotate(-3deg); }
  .source-stone { transform: translateY(-5px) rotate(6deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
