/* Peach Relay website.
   Frames, plates and buttons are the game's own art, applied with border-image.
   No external fonts, scripts or trackers. */

:root {
  --wood: #6e4328;
  --wood-dark: #4a2a17;
  --gold: #d8ad50;
  --gold-light: #fbe6a2;
  --gold-deep: #a8772a;
  --cream: #fff7e5;
  --cream-deep: #f3e2bf;
  --ink: #3b2414;
  --peach: #f39ba7;
  --peach-deep: #d9536f;
  --jade: #37735a;
  --plum: #3a2235;
  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; font-family: var(--round); color: var(--ink); background: #fbeed6;
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--peach-deep); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--cream); padding: 8px 12px; }

/* ── Game-art frames ───────────────────────────── */
.frame-cream {
  border: 34px solid transparent;
  border-image: url(img/ui_cream_card.webp) 64 fill / 34px stretch;
}
.frame-wood {
  border-style: solid; border-color: transparent;
  border-width: 52px 34px 34px;
  border-image: url(img/ui_basket_panel.webp) 104 70 70 fill / 52px 34px 34px stretch;
}
.frame-wood.on { border-image-source: url(img/ui_basket_panel_on.webp); }
.frame-cell {
  border: 26px solid transparent;
  border-image: url(img/ui_reel_cell.webp) 70 fill / 26px stretch;
}
.plate {
  display: inline-flex; align-items: center; justify-content: center; height: 46px;
  color: var(--gold-light); font-weight: 900; letter-spacing: .6px; padding: 0 4px;
  border-style: solid; border-color: transparent; border-width: 0 40px;
  border-image: url(img/ui_wood_plate.webp) 0 90 fill / 0 40px stretch;
  text-shadow: 0 2px 0 rgba(0,0,0,.35); white-space: nowrap;
}
.bar {
  display: inline-flex; align-items: center; justify-content: center; height: 38px;
  font-weight: 800; color: var(--wood-dark); padding: 0 4px; white-space: nowrap;
  border-style: solid; border-color: transparent; border-width: 0 32px;
  border-image: url(img/ui_info_bar.webp) 0 70 fill / 0 32px stretch;
}
.bar.dark { border-image-source: url(img/ui_info_bar_dark.webp); border-image-slice: 0 100 fill; color: var(--gold-light); height: 42px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 900 17px var(--round); letter-spacing: .8px; text-decoration: none; cursor: pointer;
  height: 58px; padding: 0 6px; color: #fff; text-shadow: 0 2px 0 rgba(140,30,60,.55);
  border-style: solid; border-color: transparent; border-width: 0 46px;
  border-image: url(img/btn_pill_peach.webp) 0 130 fill / 0 46px stretch;
  background: none; transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.cream { border-image-source: url(img/btn_pill_cream.webp); color: var(--wood-dark); text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.btn.keep { filter: hue-rotate(185deg) saturate(1.2); }
.btn.keep:hover { filter: hue-rotate(185deg) saturate(1.2) brightness(1.05); }
.btn[disabled] { filter: grayscale(1) opacity(.55); cursor: not-allowed; transform: none; }
.btn.small { font-size: 14px; height: 46px; border-width: 0 36px; border-image-width: 0 36px; }

.gold-title {
  font-weight: 900; line-height: 1.08; margin: 0;
  background: linear-gradient(#fff6cf, #ffd86a 45%, #d48d22 80%, #b06a12);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.2px #5a2e14;
  filter: drop-shadow(0 3px 0 #4a2a17) drop-shadow(0 8px 14px rgba(60,20,10,.3));
}

/* ── Navigation ───────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(rgba(58,34,53,.94), rgba(58,34,53,.86));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(216,173,80,.65);
}
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 0 0 2px var(--gold), 0 4px 10px rgba(0,0,0,.35); }
.brand b { font-size: 20px; font-weight: 900; color: var(--gold-light); letter-spacing: .3px; }
.topbar nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.topbar nav a {
  display: inline-flex; align-items: center; height: 40px;
  color: var(--cream); text-decoration: none; font-weight: 800; font-size: 14.5px; letter-spacing: .3px;
  padding: 0 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.topbar nav a:hover { color: var(--gold-light); background: rgba(251,230,162,.12); }
.topbar nav a[aria-current="page"] {
  color: var(--wood-dark); background: none; padding: 0 2px;
  border-style: solid; border-color: transparent; border-width: 0 26px;
  border-image: url(img/btn_pill_cream.webp) 0 100 fill / 0 26px stretch;
}
.menu-btn {
  display: none; margin-left: auto; background: none; border: 2px solid var(--gold); color: var(--gold-light);
  border-radius: 12px; width: 44px; height: 40px; font-size: 20px; line-height: 1; cursor: pointer;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100vh, 880px);
  background: url(img/bg_c3.webp) center 42% / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 28% 45%, rgba(255,240,215,.5), transparent 55%),
    linear-gradient(180deg, rgba(90,40,80,.12), transparent 40%, transparent 82%, #fbeed6); }
.hero-tree {
  position: absolute; z-index: 1; top: -3%; right: -5%; width: min(800px, 62vw);
  transform: scaleX(-1); pointer-events: none;
  filter: drop-shadow(0 18px 20px rgba(60,20,10,.25));
  animation: rustle 7s ease-in-out infinite;
}
@keyframes rustle { 0%,100% { transform: scaleX(-1) rotate(0); } 50% { transform: scaleX(-1) rotate(-.8deg); } }
.hero-foot { position: absolute; z-index: 3; bottom: -14px; width: min(440px, 40vw); pointer-events: none; }
.hero-foot.l { left: -70px; }
.hero-foot.r { right: -70px; transform: scaleX(-1); }
.hero-in {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; min-height: inherit;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 30px; padding: 30px 28px 80px;
}
.hero-copy { text-align: center; }
.hero-logo { width: min(540px, 88vw); margin: 0 auto; filter: drop-shadow(0 16px 22px rgba(74,42,23,.35)); animation: bob 6s ease-in-out infinite; }
.hero-tag { margin-top: 10px; height: 54px; font-size: clamp(16px, 1.6vw, 19px); }
.hero-sub { max-width: 470px; margin: 18px auto 0; font-size: 17px; font-weight: 700; color: var(--wood-dark); text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-stage { position: relative; height: 640px; }
.device {
  position: absolute; left: 50%; top: 10px; width: 290px; margin-left: -110px;
  border-radius: 42px; padding: 9px; background: linear-gradient(145deg, #4a2c3e, #1d0f18);
  box-shadow: 0 0 0 2px rgba(216,173,80,.85), 0 30px 60px rgba(60,20,30,.45);
  transform: rotate(4deg);
}
.device img { border-radius: 34px; }
.device.back { margin-left: -250px; top: 64px; width: 245px; transform: rotate(-7deg); }
.hero-gods { position: absolute; z-index: 3; left: 50%; bottom: -6px; width: 360px; margin-left: -240px; filter: drop-shadow(0 14px 16px rgba(60,20,10,.45)); }
@keyframes bob { 50% { transform: translateY(-8px); } }

.petals { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.petals img { position: absolute; top: -40px; width: 26px; opacity: .9; animation: fall linear infinite; }
@keyframes fall { 0% { transform: translate(0,-40px) rotate(0); } 100% { transform: translate(140px,110vh) rotate(560deg); } }

/* ── Sections ──────────────────────────────────── */
.sec { max-width: 1200px; margin: 0 auto; padding: 90px 24px; }
.sec-head { text-align: center; margin-bottom: 50px; }
.sec-head .gold-title { font-size: clamp(30px, 4.2vw, 50px); }
.sec-head p { max-width: 640px; margin: 14px auto 0; font-size: 18px; font-weight: 600; color: var(--wood); }
.eyebrow { margin-bottom: 16px; font-size: 14px; }

/* Steps */
.steps-wrap {
  background:
    url(img/fx_petal.webp) 7% 16% / 34px no-repeat,
    url(img/fx_petal.webp) 93% 28% / 26px no-repeat,
    url(img/fx_leaf.webp) 12% 84% / 34px no-repeat,
    url(img/fx_petal.webp) 88% 88% / 30px no-repeat,
    linear-gradient(#fbeed6, #f8e2c9);
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; align-items: stretch; }
.step { position: relative; text-align: center; }
.step .frame-wood { height: 100%; padding: 0 6px 6px; }
.step h3 { margin: -40px 0 22px; font-size: 18px; font-weight: 900; color: var(--gold-light); letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.step .icon { height: 120px; display: grid; place-items: center; }
.step .icon img { max-height: 112px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.step p { margin: 12px 0 0; font-size: 15.5px; font-weight: 600; color: #fbe8cf; }
.step .no {
  position: absolute; z-index: 2; top: -46px; left: 50%; margin-left: -22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 19px; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff9db0, var(--peach-deep)); box-shadow: 0 0 0 3px var(--gold), 0 6px 10px rgba(0,0,0,.3);
}

/* Basket clock */
.clock-wrap { position: relative; isolation: isolate; background: url(img/bg_c1.webp) center 60% / cover no-repeat; }
.clock-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(#f8e2c9, rgba(248,226,201,.5) 22%, rgba(248,226,201,.5) 78%, #fbeed6); }
.clock { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.clock-copy .gold-title { font-size: clamp(30px, 3.6vw, 44px); }
.clock-copy p { font-size: 17px; font-weight: 700; color: var(--wood-dark); }
.legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 22px; padding: 14px 8px; border-radius: 20px; background: rgba(255,247,229,.75); box-shadow: 0 0 0 2px rgba(216,173,80,.7); }
.legend figure { margin: 0; text-align: center; }
.legend img { width: 56px; margin: 0 auto; filter: drop-shadow(0 4px 5px rgba(0,0,0,.2)); }
.legend figcaption { margin-top: 4px; font-size: 11.5px; font-weight: 900; letter-spacing: .6px; color: var(--wood); }
.toy { padding: 4px 6px 8px; }
.toy-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.toy-top .hint { font-weight: 800; color: var(--wood); font-size: 15px; }
.toy-top .bar { font-size: 14px; }
.baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 10px; }
.basket { cursor: pointer; text-align: center; transition: transform .2s; outline: none; }
.basket:focus-visible { filter: drop-shadow(0 0 6px var(--peach-deep)); }
.basket .frame-wood { padding: 0 0 4px; }
.basket .lbl { display: block; margin: -40px 0 16px; color: var(--gold-light); font-weight: 900; font-size: 14px; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.basket img.b { width: 150px; margin: 0 auto; filter: drop-shadow(0 8px 8px rgba(0,0,0,.35)); }
.basket .badges { display: flex; justify-content: center; gap: 8px; min-height: 50px; margin-top: 6px; }
.basket .badges img { width: 48px; }
.basket .badges img.pop { animation: pop .45s ease; }
.basket[aria-pressed="true"] { transform: translateY(-4px); }
.basket.kept .badges { filter: drop-shadow(0 0 8px rgba(93,155,230,.9)); }
@keyframes pop { 40% { transform: scale(1.3); } }
.toy-actions { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.toy-note { min-height: 48px; margin: 12px 0 0; text-align: center; font-weight: 800; color: var(--wood); }

/* Keepers */
.keepers-wrap { background: linear-gradient(#fbeed6, #f6d6cf 50%, #eec5c6); }
.keepers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.keeper { text-align: center; }
.keeper .stage { height: 330px; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.keeper .stage::before { content: ""; position: absolute; bottom: 4px; left: 18%; right: 18%; height: 36px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(74,42,23,.35), transparent 70%); }
.keeper .stage img { position: relative; max-height: 320px; width: auto; transition: transform .35s; }
.keeper:hover .stage img { transform: translateY(-10px) rotate(-1.5deg); }
.keeper .plate { margin-top: -8px; min-width: 150px; position: relative; z-index: 2; font-size: 20px; }
.keeper .frame-cream { margin-top: -16px; padding: 18px 4px 2px; }
.keeper .role { display: block; font-size: 12px; font-weight: 900; letter-spacing: 2px; color: var(--peach-deep); }
.keeper p { margin: 6px 0 0; font-size: 15.5px; font-weight: 600; }

/* Chapters */
.chapters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.chapter { text-align: center; transition: transform .25s; }
.chapter:hover { transform: translateY(-6px); }
.chapter .frame-cell { padding: 0; }
.chapter .pic { aspect-ratio: 3 / 4; border-radius: 12px; background: center 45% / cover no-repeat; box-shadow: inset 0 -50px 50px -20px rgba(40,10,20,.3); }
.chapter .n { display: block; margin-top: 10px; font-size: 12px; font-weight: 900; letter-spacing: 2px; color: var(--peach-deep); }
.chapter h3 { margin: 2px 0 0; font-size: 19px; font-weight: 900; color: var(--wood-dark); }
.chapter p { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--wood); }
.medals { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 50px; }
.medal { display: flex; align-items: center; gap: 6px; }
.medal img { width: 54px; filter: drop-shadow(0 5px 6px rgba(0,0,0,.25)); }
.medal .bar { font-size: 14.5px; }
.medal .bar b { color: #fff3c4; }

/* Gallery */
.gallery-wrap { position: relative; isolation: isolate; color: var(--cream);
  background: radial-gradient(ellipse at 50% 0%, #6d3d5f, var(--plum) 60%, #24131f); }
.gallery-wrap .sec-head p { color: rgba(255,247,229,.8); }
.shots { display: flex; gap: 26px; overflow-x: auto; padding: 16px 8px 30px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--gold-deep) transparent; }
.shot { flex: 0 0 auto; width: 250px; margin: 0; scroll-snap-align: center; text-align: center; }
.shot .frame { padding: 8px; border-radius: 34px; background: linear-gradient(#ffe7a3, #c9922f 50%, #8a5a1c); box-shadow: 0 18px 34px rgba(0,0,0,.45); transition: transform .3s; }
.shot:hover .frame { transform: translateY(-8px); }
.shot img { border-radius: 27px; }
.shot figcaption { margin-top: 14px; }
.shot figcaption .bar { font-size: 14px; }
.beam {
  height: 34px; border-style: solid; border-color: transparent; border-width: 0 30px;
  border-image: url(img/ui_reel_beam.webp) 0 260 fill / 0 30px stretch;
}

/* Footer */
footer { background: #24131f; color: rgba(255,247,229,.75); text-align: center; padding: 30px 20px 50px; font-size: 14.5px; font-weight: 600; }
footer .links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
footer a { color: var(--gold-light); text-decoration: none; font-weight: 800; }
footer a:hover { text-decoration: underline; }
footer .logo { width: 170px; margin: 0 auto 16px; }

/* ── Inner pages ───────────────────────────────── */
.page-head { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: 64px 20px 120px;
  background: url(img/bg_c2.webp) center 55% / cover no-repeat; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(255,240,215,.1), rgba(251,238,214,.55) 60%, #fbeed6); }
.page-head .gold-title { font-size: clamp(34px, 5vw, 56px); }
.page-head .bar { margin-top: 16px; font-size: 15px; }
.page-head .tree { position: absolute; z-index: -1; top: -30px; left: -90px; width: min(460px, 50vw); }
.doc { max-width: 1100px; margin: -80px auto 80px; padding: 0 20px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; align-items: start; }
.toc { position: sticky; top: 84px; }
.toc .frame-wood { padding: 0 2px 2px; }
.toc .ttl { display: block; margin: -40px 0 18px; text-align: center; color: var(--gold-light); font-weight: 900; letter-spacing: 1px; font-size: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: #fbe8cf; text-decoration: none; font-weight: 700; font-size: 14px; }
.toc a:hover { background: rgba(251,230,162,.16); color: var(--gold-light); }
.paper { padding: 10px clamp(6px, 2vw, 22px) 14px; }
.paper h2 { margin: 30px 0 8px; font-size: 22px; font-weight: 900; color: var(--wood-dark); display: flex; align-items: center; gap: 10px; }
.paper h2::before { content: ""; flex: 0 0 30px; height: 30px; background: url(img/sym_blossom.webp) center / contain no-repeat; }
.paper h2:first-of-type { margin-top: 10px; }
.paper p, .paper li { font-size: 16px; font-weight: 500; }
.paper .meta { font-size: 13.5px; }
.paper table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 12px 0; font-size: 15px; border-radius: 12px; overflow: hidden; }
.paper th, .paper td { text-align: left; padding: 9px 12px; vertical-align: top; }
.paper th { background: var(--wood); color: var(--gold-light); }
.paper td { background: rgba(243,226,191,.55); border-bottom: 1px solid #ead7ad; }
.figs { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; padding: 12px; border-radius: 16px; background: rgba(243,226,191,.6); }
.figs figure { margin: 0; flex: 1; min-width: 62px; text-align: center; }
.figs img { width: 52px; margin: 0 auto; }
.figs figcaption { font-size: 11.5px; font-weight: 900; color: var(--wood); letter-spacing: .4px; }
.side-shot { float: right; width: 190px; margin: 4px 0 14px 22px; padding: 6px; border-radius: 26px; background: linear-gradient(#ffe7a3, #c9922f 50%, #8a5a1c); box-shadow: 0 10px 22px rgba(0,0,0,.25); }
.side-shot img { border-radius: 21px; }
.qa { margin: 16px 0; }
.qa b { display: block; color: var(--wood-dark); }
.mail-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mail-card img { width: 96px; }
.mail-card a.mail { font-size: 19px; font-weight: 900; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 1020px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); padding-top: 30px; }
  .hero-stage { height: 560px; }
  .hero-tree { width: 90vw; right: -20%; }
  .clock { grid-template-columns: minmax(0, 1fr); }
  .chapters { grid-template-columns: repeat(3, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .topbar nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px 16px 18px; background: rgba(58,34,53,.97); border-bottom: 2px solid var(--gold); }
  .topbar nav.open { display: flex; }
  .topbar nav a { justify-content: center; }
  .steps, .keepers { grid-template-columns: minmax(0, 1fr); gap: 50px; }
  .chapters { grid-template-columns: repeat(2, 1fr); }
  .hero-stage { height: 470px; }
  .device { width: 220px; margin-left: -80px; }
  .device.back { width: 190px; margin-left: -190px; top: 50px; }
  .hero-gods { width: 270px; margin-left: -165px; }
  .hero-foot { width: 250px; }
  .legend img { width: 44px; }
  .side-shot { float: none; margin: 10px auto; }
  .basket img.b { width: 110px; }
  .basket .badges img { width: 38px; }
  .btn { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .petals { display: none; }
}
.page-head .bar, .medal .bar { white-space: normal; height: auto; min-height: 40px; padding: 6px 4px; text-align: center; }
