:root {
  color-scheme: light;
  --paper: #f2ecd9;
  --ink: #313e32;
  --muted: #505c46;
  --green: #435a41;
  --gold: #b08d4c;
  --wood: #72552c;
  --body: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Baskerville', 'Songti SC', 'STSong', serif;
  --ease: cubic-bezier(.22, .65, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--body); }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: wait; }
a { color: inherit; text-decoration: none; }
button, a { transition: color 180ms, background-color 180ms, transform 180ms var(--ease); }
button:hover, a:hover { color: var(--wood); }
button:active { transform: translateY(2px); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 6px; }
::selection { background: #c6d1ac; color: var(--ink); }
.skip-link { position: fixed; left: 16px; top: -80px; padding: 10px 18px; z-index: 20; background: var(--paper); }
.skip-link:focus { top: 16px; }
.world { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; }
.landscape { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.site-header, .site-footer, .hero { max-width: 1440px; margin-inline: auto; }
.site-header { padding: 30px 5.5%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand > svg { width: 34px; height: 44px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.brand > span { font: 600 28px/1.1 var(--serif); letter-spacing: .06em; }
.brand small { display: block; font: 14px/1.8 var(--serif); letter-spacing: .025em; padding-top: 5px; }
.site-header nav { display: flex; align-items: center; gap: 35px; }
.site-header nav button { padding: 6px 10px; background: #f2ecd9e8; font-size: 15px; border-radius: 2px; }
#sound-toggle { display: flex; align-items: center; gap: 8px; }
#sound-toggle svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.hero { display: grid; grid-template-columns: 44% 56%; align-items: center; padding: 0 5.5%; min-height: calc(100svh - 184px); }
.intro { padding: 0 0 60px 0; z-index: 1; }
h1 { font: 500 clamp(44px, 4.4vw, 65px)/1.26 var(--serif); letter-spacing: .015em; margin: 0; text-wrap: balance; }
.intro-copy { font-size: 18px; line-height: 1.9; margin: 30px 0 31px; }
.start-button { background: var(--green); color: var(--paper); padding: 14px 25px; font: 18px/1.5 var(--serif); border-radius: 2px 6px 3px 5px; }
.start-button span { display: inline-block; margin-left: 17px; }
.start-button:hover { background: #334b33; color: var(--paper); transform: translateY(-2px) rotate(-.5deg); }
.invitation { font: 15px/1.7 var(--serif); margin-top: 18px; }
.collected-note { display: flex; gap: 16px; align-items: center; margin-top: 68px; }
.sprig { width: 40px; height: 44px; fill: none; stroke: var(--green); stroke-width: 1.5; transform: rotate(-25deg); }
.collected-note p { font-size: 14px; line-height: 1.8; margin: 0; padding: 5px 9px; background: #f2ecd9db; border-radius: 3px; }
.collected-note button { padding: 0; background: none; font: inherit; text-decoration: underline; text-underline-offset: 5px; }
.game { position: relative; width: 100%; padding-bottom: 12px; }
.game:focus { outline: none; }
.game:focus-visible { outline: 3px solid #7c8958; outline-offset: 3px; }
.machine { position: relative; width: min(100%, 535px); aspect-ratio: 1120 / 1400; margin: -15px auto 0; user-select: none; }
.machine-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.machine-sign { position: absolute; top: 14.2%; left: 30%; width: 40%; text-align: center; font: 600 clamp(14px, 1.3vw, 20px)/1.7 var(--serif); color: #644c2c; transform: rotate(-1deg); }
.chamber { position: absolute; top: 27.1%; left: 24%; width: 51.7%; height: 35.7%; overflow: hidden; }
.rail-shuttle { position: absolute; top: 0; left: 50%; width: 26px; height: 12px; background: #a08853; border-radius: 3px; transform: translateX(-50%); }
.claw-carriage { position: absolute; top: 0; left: 50%; width: 0; height: 100%; z-index: 3; }
.claw-cable { position: absolute; height: 100%; width: 3px; left: -1.5px; top: 0; background: #76613f; transform-origin: top; transform: scaleY(.13); }
.claw { position: absolute; top: 13%; left: -36px; width: 72px; height: 76px; overflow: visible; }
.prong { transform-box: view-box; transform-origin: 50px 34px; transition: transform 260ms var(--ease); }
.claw.closed .left-prong { transform: rotate(-18deg); }
.claw.closed .right-prong { transform: rotate(18deg); }
.prize { position: absolute; bottom: 0; width: 28%; aspect-ratio: 1; transform: translateX(-50%); z-index: 2; }
.relic { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; }
.relic img { position: absolute; width: 200%; height: 200%; max-width: none; object-fit: contain; pointer-events: none; }
.relic[data-sprite="0"] img { left: 0; top: 0; }
.relic[data-sprite="1"] img { left: -100%; top: 0; }
.relic[data-sprite="2"] img { left: 0; top: -100%; }
.relic[data-sprite="3"] img { left: -100%; top: -100%; }
.prize.caught { opacity: 0; }
.prize.is-target .relic { transform: translateY(-4px); }
.prize .relic { transition: transform 220ms var(--ease); }
.aim-marker { position: absolute; width: 18px; height: 5px; left: 50%; bottom: 0; border-radius: 50%; background: #ebd99b; opacity: .8; transform: translateX(-50%); }
.machine-controls { position: absolute; left: 27%; top: 63.9%; width: 46%; height: 6%; display: flex; justify-content: space-between; align-items: center; }
.move-button { flex: 0 0 44px; height: 44px; background: transparent; padding: 10px; color: #47371f; border-radius: 50%; }
.move-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.move-button:hover { background: #ead7a24d; }
.grab-button { padding: 6px 20px; min-height: 44px; border-radius: 4px 7px 4px 6px; background: #3e583e; color: #f5e7c9; font: 600 18px/1.5 var(--serif); white-space: nowrap; }
.grab-button:hover { background: #2b432d; color: var(--paper); }
.grab-button:disabled { opacity: .75; }
.game-status { text-align: center; min-height: 31px; margin: -4px -20px 0; }
.game-status p { display: inline; background: #f0eedbd9; border-radius: 3px; padding: 4px 10px; font-size: 14px; }
.game-instructions { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 13px; margin: 8px auto 0; width: fit-content; padding: 2px 10px; background: #f2ecd9e8; border-radius: 3px; }
.game-instructions > span { display: flex; align-items: center; gap: 5px; }
.game-instructions button { background: none; padding: 5px 0; font: inherit; text-decoration: underline; text-underline-offset: 4px; }
.key { display: inline-block; background: #efeedbd9; border-radius: 3px; padding: 0 5px; font-family: var(--body); line-height: 1.6; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 5.5%; font: 14px/1.6 var(--serif); }
.site-footer > span, .site-footer > button { background: #efeedae6; padding: 1px 7px; border-radius: 3px; }
.site-footer button { font: inherit; }
.site-footer span:last-child { font-style: italic; }
.motes { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.motes i { position: absolute; left: 44%; top: 60%; width: 4px; height: 4px; border-radius: 50%; background: #fff4ba; animation: drift 9s ease-in-out infinite alternate; }
.motes i:nth-child(2) { left: 81%; top: 80%; animation-delay: -3s; }
.motes i:nth-child(3) { left: 36%; top: 42%; animation-delay: -6s; width: 3px; height: 3px; }
.motes i:nth-child(4) { left: 91%; top: 57%; animation-delay: -5s; }
.motes i:nth-child(5) { left: 49%; top: 77%; animation-delay: -1s; }
.motes i:nth-child(6) { left: 65%; top: 29%; animation-delay: -8s; width: 3px; height: 3px; }
.site-header, .intro h1, .intro-copy, .start-button, .invitation, .collected-note, .game { animation: arrive 1.1s var(--ease) both; }
.intro-copy { animation-delay: .08s; }
.start-button, .invitation { animation-delay: .16s; }
.collected-note { animation-delay: .24s; }
.game { animation-delay: .1s; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { opacity: .2; transform: translate(0, 10px); } 55% { opacity: .85; } to { opacity: .25; transform: translate(24px, -24px); } }
.paper-dialog { max-width: 820px; width: calc(100% - 40px); max-height: calc(100svh - 60px); padding: 54px; border: 0; color: var(--ink); background: var(--paper); box-shadow: 0 20px 100px #20322444; border-radius: 3px 9px 5px 8px; } /* taste-skill-ignore: shadow belongs to a floating native modal. */
.paper-dialog::backdrop { background: #28382a94; }
.paper-dialog[open] { animation: arrive .35s var(--ease) both; }
.close-dialog { background: none; }
button.close-dialog[aria-label] { position: absolute; right: 14px; top: 8px; width: 44px; height: 44px; font: 32px/1 var(--serif); }
.paper-dialog h2 { font: 500 38px/1.2 var(--serif); margin: 0 0 20px; overflow-wrap: anywhere; }
.paper-dialog p { margin: 0 0 18px; }
.project-story { display: grid; grid-template-columns: 31% 1fr; gap: 36px; align-items: start; }
.story-art { padding-top: 42px; }
.story-copy > p:first-child { font-size: 14px; margin-bottom: 8px; }
.story-subtitle { font-family: var(--serif); font-size: 21px; }
.story-copy ul { padding-left: 20px; font-size: 15px; }
.story-copy .object-note { font: 15px/1.7 var(--serif); margin-top: 22px; color: var(--muted); }
.paper-button { background: var(--green); color: var(--paper); font-size: 16px; padding: 10px 22px; border-radius: 3px; margin-top: 10px; }
.paper-button:hover { color: var(--paper); background: #344c34; }
.collection-dialog { max-width: 640px; }
.project-list { display: grid; gap: 4px; margin-top: 25px; }
.project-row { display: flex; align-items: center; gap: 20px; background: transparent; text-align: left; padding: 10px; width: 100%; }
.project-row:hover { background: #e5e3ce; }
.project-row .relic { width: 74px; flex-shrink: 0; }
.project-row strong { font: 500 24px/1.4 var(--serif); display: block; overflow-wrap: anywhere; }
.project-row small { display: block; font-size: 14px; margin-top: 2px; }
.project-row .collected-mark { margin-left: auto; font-size: 13px; white-space: nowrap; }
.text-dialog { max-width: 610px; }
.text-dialog h2 { font-size: 32px; }
.profile-note { font-family: var(--serif); color: var(--muted); }
.no-script { padding: 30px; background: var(--paper); }
@media (min-width: 1600px) { .machine { width: min(100%, 590px); } }
@media (max-width: 1100px) and (min-width: 701px) {
  .hero { grid-template-columns: 40% 60%; padding-inline: 4%; }
  h1 { font-size: 43px; }
  .intro-copy { font-size: 18px; }
  .intro { padding-bottom: 30px; }
  .site-header, .site-footer { padding-inline: 4%; }
  .collected-note { margin-top: 42px; }
  .game-status { margin-inline: -28px; }
  .game-status p { font-size: 13px; }
  .machine-controls { left: 25%; width: 50%; }
  .grab-button { padding: 5px 15px; }
  .site-header nav { gap: 22px; }
}
@media (max-width: 700px) {
  .world { min-height: 100svh; }
  .landscape { object-position: left center; opacity: .78; }
  .site-header { padding: 22px 24px; gap: 12px; align-items: flex-start; }
  .brand { gap: 6px; }
  .brand > svg { width: 25px; height: 33px; }
  .brand > span { font-size: 24px; }
  .brand small { font-size: 13px; letter-spacing: 0; white-space: nowrap; }
  .site-header nav { gap: 8px; align-items: center; padding-top: 2px; }
  .site-header nav button { font-size: 14px; padding: 4px 5px; }
  #sound-toggle { width: 30px; height: 36px; justify-content: center; }
  #sound-toggle span { display: none; }
  #about-link { display: none; }
  .hero { display: block; padding: 0 24px; min-height: auto; }
  .intro { padding: 20px 0 0; }
  h1 { font-size: clamp(35px, 9vw, 46px); line-height: 1.25; }
  .intro-copy { font-size: 18px; line-height: 1.7; margin: 20px 0; }
  .start-button { font-size: 17px; padding: 11px 20px; }
  .invitation { margin: 11px 0 0; font-size: 14px; }
  .collected-note { margin: 22px 0 0; gap: 10px; }
  .collected-note p { font-size: 13px; padding: 3px 0; background: transparent; }
  .collected-note p br { display: none; }
  .collected-note button { margin-left: 12px; }
  .sprig { width: 28px; height: 32px; }
  .game { width: calc(100% + 32px); margin: 12px -16px 0; padding: 0; }
  .machine { margin: 0 auto; width: min(100%, 480px); }
  .machine-sign { font-size: 15px; top: 14.1%; }
  .machine-controls { left: 25%; width: 50%; top: 62.8%; height: 8%; }
  .grab-button { font-size: 17px; padding: 4px 16px; min-height: 44px; }
  .claw { width: 56px; height: 59px; left: -28px; }
  .game-status { margin: 4px 0 0; }
  .game-status p { font-size: 13px; padding: 4px 6px; }
  .game-instructions { gap: 15px; margin-top: 10px; }
  .site-footer { flex-wrap: wrap; padding: 30px 24px 22px; gap: 13px; font-size: 13px; }
  .site-footer span:last-child { width: 100%; background: none; }
  .paper-dialog { padding: 48px 26px 32px; width: calc(100% - 28px); }
  .project-story { display: block; }
  .story-art { padding: 0; width: 120px; margin: 0 auto 16px; }
  .paper-dialog h2 { font-size: 30px; }
  .text-dialog h2 { font-size: 27px; }
  .story-copy > p:first-child { font-size: 14px; }
  .story-subtitle { font-size: 20px; }
  .project-row { gap: 12px; padding: 8px 0; }
  .project-row .relic { width: 54px; }
  .project-row strong { font-size: 22px; }
  .project-row .collected-mark { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
