/* Geckosha — the gecko's attic.
   Palette: washi paper, sumi ink, shu vermilion, sakura, lantern gold. */
:root {
  --paper: #f3eadb;
  --paper-2: #eadcc4;
  --paper-3: #fbf6ec;
  --ink: #1e1712;
  --ink-2: #4a3d33;
  --ink-3: #7a6a5c;
  --shu: #c63f2a;
  --shu-2: #a8321f;
  --sakura: #e8a79c;
  --gold: #e7b765;
  --attic: #140e0a;
  --attic-2: #22180f;
  --line: rgba(30, 23, 18, .14);
  --radius: 18px;
  --pad: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --top-h: 64px;
  --ff-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --ff-body: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-brush: "Yuji Syuku", "Shippori Mincho B1", serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top-h) + 12px);
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--ff-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
html.locked, html.locked body { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--ff-display); font-weight: 800; line-height: 1.08; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* washi paper: warm base + fibre noise (static SVG turbulence) */
.paper {
  position: relative;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .27  0 0 0 0 .2  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(1200px 600px at 80% 0%, rgba(255, 255, 255, .45), transparent 60%);
}
.paper--deep { background-color: var(--paper-2); }

.kicker {
  font: 700 12px/1.2 var(--ff-body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.kicker--ink { color: var(--shu); }
.h2 { font-size: clamp(32px, 5.2vw, 64px); margin-bottom: 18px; text-wrap: balance; }
.ink-red { color: var(--shu); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 0;
  background: var(--ink); color: var(--paper);
  font: 700 15px/1 var(--ff-body); letter-spacing: .02em; text-decoration: none;
  transition: transform .35s var(--ease-spring), background .25s, box-shadow .25s;
  box-shadow: 0 10px 24px -12px rgba(30, 23, 18, .6);
}
.btn:hover { transform: translateY(-2px); background: var(--shu); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--gold); color: var(--ink); }
.btn--shu { background: var(--shu); color: #fff; }
.btn--shu:hover { background: var(--shu-2); }

/* ───────── header ───────── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--pad), env(safe-area-inset-right)) 0 max(var(--pad), env(safe-area-inset-left));
  display: flex; align-items: center; gap: 24px;
  color: var(--paper);
  transition: background .4s, color .4s, box-shadow .4s, backdrop-filter .4s;
}
.top.is-solid {
  background: rgba(243, 234, 219, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(231, 183, 101, .7); }
.brand__name { font: 800 21px/1 var(--ff-display); letter-spacing: .01em; }
.brand__jp { font: 400 13px/1 var(--ff-brush); color: var(--shu); opacity: .9; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .85; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--shu); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }
.top__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; background: transparent; display: grid; place-items: center; opacity: .8; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[aria-pressed="false"] .wave { opacity: 0; }
.icon-btn[aria-pressed="false"]::after { content: ""; position: absolute; width: 22px; height: 2px; background: currentColor; transform: rotate(-45deg); }
.icon-btn { position: relative; }
.pill { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--shu); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; transition: background .25s, transform .3s var(--ease-spring); }
.pill:hover { background: var(--shu-2); transform: translateY(-1px); }

/* ───────── 1. the attic ───────── */
.attic {
  --x: 50%; --y: 45%; --r: 180px; --lit: 0;
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-items: center;
  overflow: hidden;
  background: var(--attic);
  color: var(--paper);
  touch-action: pan-y;
}
.attic__beams {
  position: absolute; inset: 0; z-index: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 11vw, rgba(0, 0, 0, .35) 11vw calc(11vw + 18px), transparent calc(11vw + 18px) 22vw),
    linear-gradient(170deg, #3a2819 0%, #20150d 45%, #150e09 100%);
}
.attic__beams::before, .attic__beams::after { /* two roof rafters */
  content: ""; position: absolute; left: -10%; right: -10%; height: 34px;
  background: linear-gradient(#4b3321, #2a1c11); box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.attic__beams::before { top: 16%; transform: rotate(-9deg); }
.attic__beams::after { top: 16%; transform: rotate(9deg); }
.attic__finds { position: absolute; inset: 0; z-index: 1; }
.find {
  position: absolute; margin: 0;
  width: var(--w, 170px);
  padding: 8px 8px 30px; background: #efe5d3; border-radius: 3px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  transform: rotate(var(--rot, 0deg));
  filter: sepia(.25) saturate(.9);
}
.find img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #ddd; }
.find figcaption { position: absolute; left: 10px; right: 10px; bottom: 7px; font: 400 13px/1.2 var(--ff-brush); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.find::before { /* a pin of tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 56px; height: 20px; margin-left: -28px;
  background: rgba(232, 167, 156, .75); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.attic__dust { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.attic__dark {
  position: absolute; inset: -2px; z-index: 3; pointer-events: none;
  background:
    radial-gradient(circle var(--r) at var(--x) var(--y), rgba(255, 190, 110, .10) 0%, rgba(20, 14, 10, 0) 55%, rgba(12, 8, 6, .55) 78%, rgba(10, 7, 5, .96) 100%);
  transition: background .1s linear;
}
.attic__dark::after { /* warm halo */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle calc(var(--r) * .9) at var(--x) var(--y), rgba(255, 196, 120, .16), transparent 70%);
  mix-blend-mode: screen;
}
.attic__web { position: absolute; z-index: 3; width: 220px; height: 220px; opacity: .22; pointer-events: none;
  background:
    repeating-radial-gradient(circle at 0 0, transparent 0 22px, rgba(255, 255, 255, .7) 22px 23px),
    repeating-conic-gradient(from 0deg at 0 0, transparent 0 8deg, rgba(255, 255, 255, .6) 8deg 8.6deg);
  -webkit-mask: radial-gradient(circle at 0 0, #000 40%, transparent 72%);
  mask: radial-gradient(circle at 0 0, #000 40%, transparent 72%);
}
.attic__web--l { top: 0; left: 0; }
.attic__web--r { top: 0; right: 0; transform: scaleX(-1); }

.attic__copy {
  position: relative; z-index: 5;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: calc(var(--top-h) + 40px) var(--pad) 90px;
  pointer-events: none;
}
.attic__copy a, .attic__copy button { pointer-events: auto; }
.attic__copy::before { /* тёмная подложка: луч фонаря не просвечивает фото сквозь текст */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; top: 10%; bottom: 0; width: min(100%, 900px);
  background: radial-gradient(ellipse 70% 60% at 30% 55%, rgba(12, 8, 6, .82), rgba(12, 8, 6, .5) 55%, transparent 80%);
}
.attic__title {
  font-size: clamp(54px, 11vw, 150px);
  line-height: .95; letter-spacing: -.02em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .7);
  margin-bottom: 26px;
}
/* строки выезжают из-под маски overflow:hidden — даём маске запас под хвосты g, y, p,
   а отрицательным margin возвращаем прежний шаг строк */
.attic__title .line { display: block; overflow: hidden; padding: 0 .06em .26em; margin: 0 -.06em -.26em; }
.attic__title .line:last-child { margin-bottom: 0; }
.attic__title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease-out) forwards; }
.attic__title .line:nth-child(2) > span { animation-delay: .12s; }
.attic__title .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }
.attic__lead { max-width: 30ch; font-size: clamp(17px, 1.6vw, 21px); color: rgba(243, 234, 219, .86); text-shadow: 0 2px 20px rgba(0, 0, 0, .8); opacity: 0; animation: fade 1s .5s forwards; }
.attic__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; opacity: 0; animation: fade 1s .7s forwards; }
@keyframes fade { to { opacity: 1; } }
.hint { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(243, 234, 219, .7); }
.hint__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(231, 183, 101, .6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(231, 183, 101, 0); } 100% { box-shadow: 0 0 0 0 rgba(231, 183, 101, 0); } }
.attic__vertical {
  position: absolute; z-index: 5; right: max(var(--pad), 24px); top: 50%; transform: translateY(-40%);
  writing-mode: vertical-rl; font: 400 clamp(22px, 2.6vw, 34px)/1 var(--ff-brush); letter-spacing: .3em;
  color: rgba(231, 183, 101, .75); margin: 0;
}
.scroll-cue { position: absolute; z-index: 5; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(243, 234, 219, .5); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: cue 1.6s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ───────── 2. story ───────── */
.story { padding: clamp(80px, 12vw, 150px) 0 clamp(60px, 8vw, 100px); overflow: hidden; }
.story__kanji {
  position: absolute; right: -4vw; top: 2vw; margin: 0;
  font: 400 clamp(220px, 34vw, 480px)/1 var(--ff-brush); color: rgba(198, 63, 42, .07);
  pointer-events: none; user-select: none;
}
@supports (animation-timeline: view()) {
  .story__kanji { animation: drift linear both; animation-timeline: view(); animation-range: cover; }
  @keyframes drift { from { transform: translateY(-12%) rotate(-4deg); } to { transform: translateY(18%) rotate(6deg); } }
}
.story__grid { display: grid; grid-template-columns: minmax(260px, 5fr) 7fr; gap: clamp(32px, 6vw, 90px); align-items: center; position: relative; }
.story__portrait { position: relative; justify-self: center; width: min(100%, 420px); }
.gecko-btn {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none;
  border-radius: 50%; touch-action: manipulation;
}
.gecko-btn img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 10px var(--paper-3), 0 0 0 11px var(--line), 0 40px 80px -30px rgba(74, 45, 20, .55);
  transition: transform .5s var(--ease-spring);
}
.gecko-btn:hover img { transform: rotate(-3deg) scale(1.02); }
.gecko-btn.is-calling img { animation: croak .45s var(--ease-spring); }
@keyframes croak { 30% { transform: scale(1.06, .95); } 60% { transform: scale(.97, 1.03); } }
.gecko-btn__call {
  position: absolute; left: 62%; top: 4%; pointer-events: none;
  font: 800 clamp(22px, 3vw, 30px)/1 var(--ff-display); color: var(--shu); white-space: nowrap;
  opacity: 0; transform: translateY(8px) rotate(-8deg);
}
.gecko-btn__call.pop { animation: callpop 1s var(--ease-out); }
@keyframes callpop { 0% { opacity: 0; transform: translateY(10px) scale(.6) rotate(-8deg); } 25% { opacity: 1; transform: translateY(0) scale(1.1) rotate(-8deg); } 100% { opacity: 0; transform: translateY(-30px) scale(1) rotate(-8deg); } }
.stamp {
  position: absolute; right: 2%; bottom: 6%; margin: 0;
  width: 84px; height: 84px; display: grid; place-items: center;
  background: var(--shu); color: #fff5ea; border-radius: 10px; transform: rotate(8deg);
  font: 400 18px/1 var(--ff-brush); writing-mode: vertical-rl; letter-spacing: .05em;
  box-shadow: inset 0 0 0 3px #fff5ea, inset 0 0 0 5px var(--shu), 0 8px 20px -8px rgba(166, 50, 31, .8);
}
.tap-note { text-align: center; margin: 22px 0 0; font: 400 16px/1 var(--ff-brush); color: var(--ink-3); }
.story__text { position: relative; font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); max-width: 60ch; }
.story__text .h2 { color: var(--ink); }
.names { font-size: clamp(19px, 1.8vw, 23px); color: var(--ink); }
.names__rot {
  display: inline-block; min-width: 4.4em; padding: 0 .25em; border-radius: 6px;
  background: rgba(231, 183, 101, .35); font-family: var(--ff-display); font-weight: 800; color: var(--shu-2);
  transition: opacity .25s, transform .25s;
}
.names__rot.out { opacity: 0; transform: translateY(-6px); }
.sign { font: 400 22px/1.2 var(--ff-brush); color: var(--ink); margin-top: 26px; }
.sign em { font-style: normal; color: var(--shu); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(56px, 8vw, 100px) 0 0; border-top: 1px solid var(--line); }
.stats > div { padding: 26px 18px 0 0; }
.stats > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.stats dt { font: 800 clamp(36px, 5vw, 64px)/1 var(--ff-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stats .star { color: var(--gold); font-size: .7em; margin-left: .08em; }
.stats dd { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); letter-spacing: .02em; }

/* ───────── 3. trove ───────── */
.trove { padding: clamp(80px, 10vw, 130px) 0; }
.section-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 40px); align-items: start; margin-bottom: 34px; }
.section-head--center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.section-head__jp { margin: 0; writing-mode: vertical-rl; font: 400 clamp(40px, 5vw, 64px)/1 var(--ff-brush); color: var(--shu); letter-spacing: .1em; }
.section-head__sub { color: var(--ink-3); font-size: 17px; max-width: 52ch; margin: 0; }
.chips {
  display: flex; gap: 10px; margin: 0 calc(var(--pad) * -1) 34px; padding: 4px var(--pad) 8px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; scroll-snap-align: start;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper-3);
  font-weight: 500; font-size: 15px; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease-spring);
}
.chips button span { font-family: var(--ff-brush); color: var(--shu); margin-left: 4px; font-size: 14px; }
.chips button:hover { transform: translateY(-1px); border-color: var(--ink-3); }
.chips button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips button[aria-selected="true"] span { color: var(--gold); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(16px, 2.4vw, 30px); }
.card { position: relative; opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.card.in { opacity: 1; transform: none; }
.card.is-hidden { display: none; }
.card__btn {
  display: block; width: 100%; padding: 0; border: 0; text-align: left; background: none;
  border-radius: var(--radius);
}
.card__frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 20px 40px -26px rgba(74, 45, 20, .45);
  transition: box-shadow .4s, transform .5s var(--ease-out);
}
.card__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s, transform 1.2s var(--ease-out); }
.card__frame img.alt { opacity: 0; }
@media (hover: hover) {
  .card__btn:hover .card__frame { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 30px 50px -26px rgba(74, 45, 20, .6); }
  .card__btn:hover .card__frame img { transform: scale(1.05); }
  .card__btn:hover .card__frame img.alt { opacity: 1; }
}
.card__era {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 8px 3px; border: 2px solid var(--shu); border-radius: 6px; background: rgba(251, 246, 236, .92);
  font: 700 12px/1 var(--ff-body); letter-spacing: .08em; color: var(--shu); transform: rotate(-4deg);
}
.card__meta { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 14px 4px 0; }
.card__title { font: 700 18px/1.25 var(--ff-display); color: var(--ink); margin: 0; }
.card__sub { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; }
.card__price { font: 800 20px/1 var(--ff-display); color: var(--shu); white-space: nowrap; }
.card--wide { grid-column: span 2; }
.card--wide .card__frame { aspect-ratio: 8 / 5; }
.trove__more { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; justify-content: center; text-align: center; }
.trove__more p { margin: 0; font-size: 18px; color: var(--ink-2); }

/* ───────── 4. bells ───────── */
.bells {
  position: relative; overflow: hidden; color: var(--paper);
  background: radial-gradient(900px 500px at 50% 0%, #3a1a12, transparent 70%), linear-gradient(#1f120c, #2b150e 60%, #1b100b);
  padding: 0 0 clamp(70px, 9vw, 110px);
}
.bells__rafter { height: 30px; background: linear-gradient(#4b3321, #2a1c11); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); position: relative; z-index: 1; }
.bells__row { display: flex; justify-content: center; gap: clamp(18px, 6vw, 90px); padding: 0 var(--pad); margin-bottom: 30px; }
.bell { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; }
.bell__string { width: 2px; height: var(--len, 90px); background: linear-gradient(#c9a26a, #8e6b3e); }
.bell__knot { width: 16px; height: 16px; margin-top: -2px; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 3px rgba(198, 63, 42, .3); }
.bell__btn {
  margin-top: -4px; padding: 0; border: 0; background: none; border-radius: 50%;
  width: clamp(104px, 20vw, 190px); aspect-ratio: 1; touch-action: manipulation;
}
.bell__btn img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 5px #3a2415, 0 0 0 6px rgba(231, 183, 101, .5), 0 30px 50px -18px rgba(0, 0, 0, .8);
}
.bell.ring { animation: swing 1.6s var(--ease-out); }
@keyframes swing { 0% { transform: rotate(0); } 12% { transform: rotate(14deg); } 30% { transform: rotate(-10deg); } 48% { transform: rotate(6deg); } 66% { transform: rotate(-3deg); } 84% { transform: rotate(1deg); } 100% { transform: rotate(0); } }
.bell__ripple { position: absolute; pointer-events: none; border-radius: 50%; border: 2px solid var(--gold); animation: ripple 1.2s var(--ease-out) forwards; }
@keyframes ripple { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }
.bell__link { margin-top: 16px; font-size: 14px; color: rgba(243, 234, 219, .8); text-decoration: none; border-bottom: 1px solid rgba(243, 234, 219, .3); padding-bottom: 2px; background: none; border-top: 0; border-left: 0; border-right: 0; min-height: 32px; }
.bell__link:hover { color: var(--gold); border-color: var(--gold); }
.bells__copy { text-align: center; max-width: 720px; }
.bells__copy p:not(.kicker) { color: rgba(243, 234, 219, .8); font-size: 18px; }

/* ───────── 5. letters ───────── */
.letters { padding: clamp(80px, 10vw, 130px) 0; overflow: hidden; }
.big-star { color: var(--shu); }
.marquee { position: relative; margin-top: 18px; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 22px; width: max-content; padding: 10px 0 20px; animation: marquee 60s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 11px)); } }
.letter {
  flex: none; width: min(78vw, 380px); margin: 0;
  padding: 26px 26px 22px; border-radius: var(--radius);
  background: var(--paper-3); box-shadow: 0 20px 40px -30px rgba(74, 45, 20, .5), 0 0 0 1px var(--line);
  transform: rotate(var(--tilt, 0deg));
}
.letter__stars { color: var(--gold); letter-spacing: .15em; font-size: 15px; }
.letter blockquote { margin: 10px 0 16px; font: 500 18px/1.45 var(--ff-display); color: var(--ink); }
.letter figcaption { font-size: 13px; color: var(--ink-3); }
.letter figcaption strong { color: var(--ink); font-weight: 700; }

/* ───────── 6. care ───────── */
.care { padding: clamp(80px, 10vw, 130px) 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; padding: 28px 22px 26px; border-radius: var(--radius); background: var(--paper-3); box-shadow: 0 0 0 1px var(--line); transition: transform .4s var(--ease-spring), box-shadow .4s; }
.steps li:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line), 0 24px 40px -28px rgba(74, 45, 20, .5); }
.steps__n { font: 400 30px/1 var(--ff-brush); color: var(--shu); }
.steps h3 { font-size: 21px; margin: 14px 0 10px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ───────── footer ───────── */
.foot { background: var(--attic); color: var(--paper); padding: clamp(70px, 9vw, 110px) 0 calc(40px + env(safe-area-inset-bottom)); overflow: hidden; position: relative; }
.foot__jp { position: absolute; right: var(--pad); top: 40px; margin: 0; writing-mode: vertical-rl; font: 400 28px/1 var(--ff-brush); letter-spacing: .3em; color: var(--shu); }
.foot__word { font: 800 clamp(64px, 16vw, 230px)/.9 var(--ff-display); letter-spacing: -.03em; margin: 0 0 40px; color: transparent; -webkit-text-stroke: 1.5px rgba(231, 183, 101, .75); }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
.foot__lead { font-size: 20px; max-width: 34ch; color: rgba(243, 234, 219, .85); }
.foot__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; justify-items: start; }
.foot__links a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; font-size: 18px; border-bottom: 1px solid rgba(243, 234, 219, .2); }
.foot__links a:hover { color: var(--gold); border-color: var(--gold); }
.foot__fine { margin: 56px 0 0; font-size: 13px; color: rgba(243, 234, 219, .5); }

/* ───────── climbing gecko (scroll progress) ───────── */
.climber {
  position: fixed; z-index: 30; right: max(6px, env(safe-area-inset-right)); top: 0;
  width: 30px; height: 62px; pointer-events: none;
  transform: translate3d(0, var(--cy, 80px), 0);
  will-change: transform;
}
.climber__svg { width: 100%; height: 100%; overflow: visible; transform: rotate(180deg); transition: transform .5s var(--ease-out); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.climber.up .climber__svg { transform: rotate(0deg); }
.climber .body, .climber .tail { fill: #d8a86a; }
.climber .leg path { fill: none; stroke: #d8a86a; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.climber .leg circle { fill: #e7bf86; }
.climber .spot { fill: #a4683a; }
.climber .eye { fill: #1e1712; }
.climber .glint { fill: #fff; }
.climber .leg { transform-box: fill-box; }
.climber .leg--fl, .climber .leg--br { transform-origin: 100% 50%; }
.climber .leg--fr, .climber .leg--bl { transform-origin: 0 50%; }
.climber .leg--fl { transform-origin: 90% 80%; }
.climber .leg--fr { transform-origin: 10% 80%; }
.climber .leg--bl { transform-origin: 90% 20%; }
.climber .leg--br { transform-origin: 10% 20%; }
.climber.walking .leg--fl, .climber.walking .leg--br { animation: step .32s ease-in-out infinite alternate; }
.climber.walking .leg--fr, .climber.walking .leg--bl { animation: step .32s ease-in-out infinite alternate-reverse; }
.climber.walking .tail { animation: wag .32s ease-in-out infinite alternate; transform-origin: 50% 0; transform-box: fill-box; }
@keyframes step { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes wag { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* footprints trailing the pointer (fine pointers only) */
.print { position: fixed; z-index: 29; width: 14px; height: 14px; pointer-events: none; opacity: .5; animation: printfade 1.6s forwards; }
.print svg { width: 100%; height: 100%; fill: var(--shu); }
@keyframes printfade { to { opacity: 0; } }

/* ───────── product sheet ───────── */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(20, 14, 10, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.sheet.open .sheet__backdrop { opacity: 1; }
.sheet__panel {
  position: relative; width: min(1120px, calc(100vw - 48px)); max-height: min(860px, calc(100dvh - 48px));
  background: var(--paper); border-radius: 26px; overflow: hidden;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .7);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(30px) scale(.97);
  transition: opacity .4s var(--ease-out), transform .5s var(--ease-out);
}
.sheet.open .sheet__panel { opacity: 1; transform: none; }
.sheet__grab { display: none; }
.sheet__close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(251, 246, 236, .92); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.sheet__close svg { width: 20px; height: 20px; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pd { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100%; }
.pd__gallery { position: relative; background: #fff; min-width: 0; }
.pd__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; height: 100%; }
.pd__track::-webkit-scrollbar { display: none; }
.pd__slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; aspect-ratio: 1; }
.pd__slide img { width: 100%; height: 100%; object-fit: contain; }
.pd__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 7px; pointer-events: none; }
.pd__dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(30, 23, 18, .25); transition: background .25s, width .25s; }
.pd__dots span.on { background: var(--shu); width: 20px; border-radius: 4px; }
.pd__arrow { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0; background: rgba(251, 246, 236, .9); box-shadow: 0 4px 14px rgba(0, 0, 0, .15); font-size: 20px; display: grid; place-items: center; }
.pd__arrow--prev { left: 14px; }
.pd__arrow--next { right: 14px; }
.pd__info { padding: clamp(26px, 3.4vw, 46px); display: flex; flex-direction: column; min-width: 0; }
.pd__cat { font: 700 12px/1 var(--ff-body); letter-spacing: .2em; text-transform: uppercase; color: var(--shu); margin-bottom: 14px; }
.pd__title { font-size: clamp(28px, 3vw, 40px); margin-bottom: 8px; padding-right: 44px; }
.pd__sub { color: var(--ink-3); margin-bottom: 20px; }
.pd__price { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.pd__price strong { font: 800 36px/1 var(--ff-display); color: var(--ink); }
.pd__price span { font-size: 13px; color: var(--ink-3); }
.pd__facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
.pd__facts dt { color: var(--ink-3); }
.pd__facts dd { margin: 0; color: var(--ink); font-weight: 500; }
.pd__note { position: relative; margin: 0 0 22px; padding: 16px 18px 16px 50px; border-radius: 14px; background: rgba(231, 183, 101, .22); font-size: 15px; color: var(--ink-2); }
.pd__note::before { content: "🦎"; position: absolute; left: 16px; top: 14px; font-size: 20px; }
.pd__note b { display: block; font: 400 16px/1.2 var(--ff-brush); color: var(--shu-2); margin-bottom: 4px; }
.pd__story { font-size: 15px; color: var(--ink-2); white-space: pre-line; }
.pd__story.clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pd__more { align-self: flex-start; background: none; border: 0; padding: 6px 0; min-height: 40px; color: var(--shu); font-weight: 700; font-size: 14px; }
.pd__actions { position: sticky; bottom: 0; margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; background: linear-gradient(transparent, var(--paper) 30%); }
.pd__actions .btn { flex: 1 1 auto; justify-content: center; }
.pd__lucky { margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--shu); color: #fff; font-weight: 700; font-size: 14px; }

/* petals + toast */
.petals { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -20px; width: 14px; height: 11px; background: var(--sakura); border-radius: 12px 0 12px 0; opacity: .9; animation: fall var(--d, 3s) linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx, 40px), 110vh, 0) rotate(var(--rr, 540deg)); opacity: .6; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 80; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: opacity .3s, transform .4s var(--ease-spring); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───────── responsive ───────── */
@media (max-width: 980px) {
  .nav { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pd { grid-template-columns: 1fr; }
  .pd__slide { aspect-ratio: 1 / 1; }
}
@media (max-width: 760px) {
  :root { --top-h: 58px; }
  body { font-size: 16px; }
  .brand__jp { display: none; }
  .pill { padding: 0 14px; font-size: 13px; }
  .attic__copy { padding-bottom: 110px; }
  .attic__vertical { display: none; }
  /* правая треть экрана — колонка для найденных фото */
  .attic__lead, .hint { max-width: 60vw; }
  .top { gap: 12px; }
  .attic__copy::before { top: 0; width: 100%; background: linear-gradient(90deg, rgba(12, 8, 6, .8) 0%, rgba(12, 8, 6, .55) 55%, transparent 70%); }
  .attic__web { width: 140px; height: 140px; }
  .story__grid { grid-template-columns: 1fr; }
  .story__portrait { width: min(78vw, 340px); }
  .stamp { width: 66px; height: 66px; font-size: 15px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div { padding: 22px 12px 18px 0; }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-head { grid-template-columns: 1fr; }
  .section-head__jp { writing-mode: horizontal-tb; font-size: 34px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card--wide { grid-column: span 2; }
  .card__meta { flex-direction: column; gap: 6px; padding-top: 10px; }
  .card__title { font-size: 15px; }
  .card__sub { display: none; }
  .card__price { font-size: 17px; }
  .card__era { top: 8px; left: 8px; font-size: 10px; }
  .steps { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; }
  .foot__jp { font-size: 20px; }
  .bells__row { gap: 12px; }

  /* the product sheet becomes a bottom sheet you can swipe down */
  .sheet { place-items: end stretch; }
  .sheet__panel {
    width: 100%; max-height: calc(100dvh - 28px - env(safe-area-inset-top)); height: calc(100dvh - 28px - env(safe-area-inset-top));
    border-radius: 22px 22px 0 0; transform: translateY(100%); opacity: 1;
    transition: transform .5s var(--ease-out);
  }
  .sheet.open .sheet__panel { transform: translateY(var(--drag, 0px)); }
  .sheet.dragging .sheet__panel { transition: none; }
  .sheet__grab { display: block; position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: 30px; touch-action: none; }
  .sheet__grab span { position: absolute; left: 50%; top: 9px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(30, 23, 18, .25); }
  .sheet__close { top: 12px; right: 12px; }
  .pd__arrow { display: none; }
  .pd__info { padding: 22px 18px 0; }
  .pd__actions { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .grid { gap: 10px; }
  .brand__name { font-size: 19px; }
  .pill span { display: none; }
}

/* ───────── reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
}

.yamori { position: relative; margin-top: 26px; padding: 16px 18px 16px 64px; border-radius: 14px; background: rgba(255, 255, 255, .45); box-shadow: 0 0 0 1px var(--line); font-size: 15px; color: var(--ink-2); }
.yamori span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; font: 400 22px/1 var(--ff-brush); color: var(--shu); }
.yamori em { font-style: italic; color: var(--ink); }
.stamp span { font-size: 13px; letter-spacing: 0; }
.grid { grid-auto-flow: dense; }
.marquee--swipe { -webkit-mask: none; mask: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding: 0 var(--pad); scroll-padding: 0 var(--pad); }
.marquee--swipe::-webkit-scrollbar { display: none; }
.marquee--swipe .marquee__track { animation: none; }
.marquee--swipe .letter { scroll-snap-align: start; }
.sheet.no-anim .sheet__panel, .sheet.no-anim .sheet__backdrop { transition: none; }
::view-transition-group(pd-img) { animation-duration: .42s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(pd-img), ::view-transition-new(pd-img) { object-fit: cover; }
::view-transition-group(*) { animation-duration: .38s; }
@media (max-width: 760px) {
  .pd__actions { flex-wrap: nowrap; background: var(--paper); box-shadow: 0 -14px 18px -6px var(--paper); margin: 18px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .pd__actions .btn { min-height: 52px; padding: 0 18px; }
  .pd__actions .btn--shu { flex: 1 1 auto; }
  .pd__actions .btn--light { flex: 0 0 auto; box-shadow: 0 0 0 1px var(--line); }
  .pd__actions .lg { display: none; }
  .pd__story { margin-bottom: 0; }
}

/* sold ("adopted") treasures stay on the shelf as a story */
.card__sold { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 5px 10px 4px; border-radius: 6px; background: var(--shu); color: #fff; font: 700 12px/1 var(--ff-body); letter-spacing: .08em; text-transform: uppercase; transform: rotate(4deg); }
.card--sold .card__frame img { filter: grayscale(.55) sepia(.2); }
.card--sold .card__price { color: var(--ink-3); text-decoration: line-through; }
.pd__was { color: var(--ink-3) !important; text-decoration: line-through; }
.pd__adopted { padding: 6px 10px; border-radius: 8px; background: var(--shu); color: #fff !important; font-weight: 700; }

@media (max-width: 359px) {
  #soundBtn { display: none; }
}
