/* Улун №7 — тушь и рисовая бумага. Своя шкала: Playfair Display + Golos Text. Горизонтальные свитки. */

:root {
  --paper: #efe9dd;
  --paper-2: #e5ddcd;
  --paper-3: #d9d0be;
  --ink: #20242a;
  --ink-86: rgba(32, 36, 42, .86);
  --ink-62: rgba(32, 36, 42, .62);
  --ink-40: rgba(32, 36, 42, .4);
  --ink-14: rgba(32, 36, 42, .14);
  --ink-07: rgba(32, 36, 42, .07);
  --cel: #7f9a8e;
  --cel-deep: #4f6b60;
  --ochre: #b8895a;
  --ochre-deep: #8d6234;
  --mist: #f6f2e9;
  --ease: cubic-bezier(.4, .02, .12, 1);
  --ease-slow: cubic-bezier(.22, .61, .24, 1);
  --f-disp: 'Playfair Display', Georgia, serif;
  --f-body: 'Golos Text', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(184, 137, 90, .07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(32, 36, 42, .014) 0 1px, transparent 1px 5px),
    var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(.98rem, .3vw + .93rem, 1.05rem);
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* если файла ещё нет — не показываем alt-текст поверх палитры */
.plate-frame img { color: transparent; font-size: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--ochre-deep); outline-offset: 3px; }

.filterdefs { position: absolute; }

.wrap, .hero-grid, .hero-strip, .brew-grid, .lib-head, .ritual-head, .ritual-list, .ritual-plate, .house-grid, .guest-grid, .visit-grid, .foot-row {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 56px);
}

/* ─── шапка-печать: три поля, липкая ─── */
.masthead {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  padding: 12px clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, var(--mist), rgba(239, 233, 221, .5));
  border-bottom: 1px solid var(--ink-14);
}
.seal { display: inline-flex; align-items: center; gap: 10px; color: var(--ochre-deep); }
.seal svg { transition: transform .7s var(--ease); }
.seal:hover svg { transform: rotate(-8deg) scale(1.06); }
.seal-word { font-family: var(--f-disp); font-size: 1.1rem; letter-spacing: .04em; }
.mast-center { text-align: center; }
.mast-brand { margin: 0; font-family: var(--f-disp); font-weight: 500; font-size: 1.24rem; letter-spacing: .1em; line-height: 1.2; }
.mast-sub { margin: 2px 0 0; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-40); }
.mast-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mast-status {
  margin: 0;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cel-deep);
  font-variant-numeric: tabular-nums;
}
.mast-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--cel);
  animation: pulse-open 4.5s var(--ease-slow) infinite;
}
@keyframes pulse-open { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
.mast-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px clamp(10px, 1.4vw, 22px); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.mast-nav a { color: var(--ink-62); padding: 2px 0; border-bottom: 1px solid transparent; transition: color .35s, border-color .35s; }
.mast-nav a:hover { color: var(--ink); border-color: var(--ochre); }

/* ─── герой с горами ─── */
.hero { position: relative; padding: clamp(40px, 7vh, 88px) 0 clamp(30px, 5vh, 60px); overflow: hidden; }
.mountains { position: absolute; left: 0; right: 0; bottom: 0; height: 62vh; pointer-events: none; }
.mountains svg { width: 100%; height: 100%; display: block; }
.mtn { fill: var(--ink); }
.mtn-1 { opacity: .07; filter: url(#ink-blur); }
.mtn-2 { opacity: .1; }
.mtn-3 { opacity: .06; }

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: 68vh;
}
.kicker {
  margin: 0 0 14px;
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ochre-deep);
}
.kicker--cel { color: var(--cel); }
.hero-title { margin: 0; font-family: var(--f-disp); font-weight: 500; line-height: .86; }
.t-line { display: block; font-size: clamp(3.4rem, 9.4vw, 8.4rem); letter-spacing: -.015em; }
.t-num { display: block; font-size: clamp(3.6rem, 10vw, 9rem); color: var(--ink-40); letter-spacing: -.02em; }
.t-num em {
  font-style: normal;
  color: var(--ochre-deep);
  text-shadow: 0 0 0 var(--ochre-deep);
}
.hero-lede { margin: 22px 0 0; max-width: 46ch; color: var(--ink-86); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .5s var(--ease), background .4s, color .4s, box-shadow .5s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(32, 36, 42, .8); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink-40); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(32, 36, 42, .05); }
.btn--cel { background: var(--cel-deep); border-color: var(--cel-deep); color: var(--mist); }
.btn--cel:hover { background: var(--ochre-deep); border-color: var(--ochre-deep); }

.hero-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin-top: clamp(26px, 5vh, 56px);
  border-top: 1px solid var(--ink-14);
}
.hero-strip p { margin: 0; padding: 16px 18px 16px 0; border-right: 1px solid var(--ink-07); }
.hero-strip p:last-child { border-right: 0; }
.hero-strip b { display: block; font-family: var(--f-disp); font-weight: 500; font-size: clamp(1.3rem, 2.3vw, 1.9rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-strip span { display: block; margin-top: 2px; font-size: .76rem; color: var(--ink-40); }

/* ─── свиток-пластина: медленное разворачивание ─── */
.scroll-plate { margin: 0; position: relative; }
.plate-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(70% 60% at 30% 30%, rgba(127, 154, 142, .38), transparent 66%),
    radial-gradient(60% 60% at 75% 75%, rgba(184, 137, 90, .32), transparent 68%),
    linear-gradient(160deg, var(--paper-2), var(--paper-3));
  border: 1px solid var(--ink-14);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.6s var(--ease-slow);
}
.plate-frame--square { aspect-ratio: 1 / 1; }
.scroll-plate.is-open .plate-frame { clip-path: inset(0 0 0 0); }
.plate-rod {
  position: absolute;
  left: -6px;
  right: -6px;
  top: 0;
  z-index: 3;
  height: 8px;
  display: flex;
  justify-content: space-between;
  transform: translateY(0);
  opacity: 0;
  transition: transform 1.6s var(--ease-slow), opacity .5s ease 1.3s;
  pointer-events: none;
}
.plate-rod i { width: 8px; height: 20px; border-radius: 4px; background: linear-gradient(180deg, var(--ochre), var(--ochre-deep)); }
.scroll-plate.is-open .plate-rod { transform: translateY(calc(100% + 0px)); opacity: 0; }
.scroll-plate.is-open .plate-rod { transition-delay: 0s, 1.4s; }
.scroll-plate::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--ochre-deep), var(--ochre));
  opacity: .85;
}
.plate-cap {
  margin-top: 12px;
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-40);
}

/* ─── чернильный переход между секциями ─── */
.ink-divider { position: relative; height: 130px; overflow: hidden; background: transparent; color: var(--ink); }
.ink-divider svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: url(#ink-bleed);
  transform: scaleY(.04);
  transform-origin: top;
  transition: transform 1.6s var(--ease-slow);
}
.ink-divider.is-open svg { transform: scaleY(1); }
.ink-divider--wash { color: var(--paper-3); }

/* ─── тёмная полоса заваривания ─── */
.brew {
  position: relative;
  margin-top: -1px;
  padding: clamp(56px, 9vh, 110px) 0 clamp(64px, 10vh, 120px);
  background:
    radial-gradient(80% 60% at 82% 8%, rgba(127, 154, 142, .22), transparent 60%),
    radial-gradient(60% 50% at 12% 92%, rgba(184, 137, 90, .16), transparent 62%),
    var(--ink);
  color: var(--mist);
}
.brew .h2, .brew .kicker { color: var(--mist); }
.brew .kicker--cel { color: var(--cel); }
.brew .body { color: rgba(246, 242, 233, .72); }
.brew-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4.4vw, 72px);
  align-items: start;
}
.h2 {
  margin: 0 0 clamp(16px, 2.6vh, 28px);
  font-family: var(--f-disp);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}
.h2--wide { max-width: 24ch; }
.body { margin: 0 0 1.05rem; max-width: 48ch; color: var(--ink-86); }
.body--small { font-size: .9rem; color: var(--ink-62); }
.brew-facts { margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(246, 242, 233, .18); }
.brew-facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(246, 242, 233, .12);
  font-size: .84rem;
}
.brew-facts span { letter-spacing: .1em; text-transform: uppercase; font-size: .7rem; color: rgba(246, 242, 233, .5); }
.brew-facts b { font-weight: 400; color: var(--cel); }

/* ─── циферблат заваривания ─── */
.dial-box {
  border: 1px solid rgba(246, 242, 233, .18);
  background: rgba(246, 242, 233, .04);
  padding: clamp(16px, 2.4vw, 26px);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid rgba(246, 242, 233, .26);
  background: transparent;
  color: rgba(246, 242, 233, .68);
  cursor: pointer;
  padding: 8px 14px;
  font-size: .74rem;
  letter-spacing: .06em;
  transition: color .35s, border-color .35s, background .35s, transform .35s var(--ease);
}
.chip:hover { color: var(--mist); border-color: var(--cel); transform: translateY(-2px); }
.chip.is-on { background: var(--cel-deep); border-color: var(--cel-deep); color: var(--mist); }

.dial-stage {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 30px);
  align-items: center;
  margin-top: clamp(14px, 2.4vh, 26px);
}
.dial { width: 100%; height: auto; color: var(--mist); }
.d-ring, .d-ring2 { fill: none; stroke: rgba(246, 242, 233, .18); }
.d-ring { stroke-width: 1; }
.d-ring2 { stroke-width: 1; stroke-dasharray: 2 6; }
.d-ticks line { stroke: rgba(246, 242, 233, .34); stroke-width: 1.4; }
.d-ticks line.major { stroke: var(--ochre); stroke-width: 2; }
.d-progress { fill: none; stroke: var(--cel); stroke-width: 4; stroke-linecap: round; opacity: .9; }
.d-hand { transform-origin: 130px 130px; transition: transform 1.1s var(--ease-slow); }
.d-hand line { stroke: var(--mist); }
.d-hand circle { fill: var(--ochre); }
.d-hub { fill: var(--mist); }
.d-time { fill: var(--mist); font-family: var(--f-disp); font-size: 30px; font-weight: 500; }
.d-temp { fill: var(--cel); font-family: var(--f-body); font-size: 12px; letter-spacing: 2px; }
.dial.is-running .d-hand { transition: transform .2s linear; }

.dial-side { min-width: 0; }
.dial-name { margin: 0 0 8px; font-family: var(--f-disp); font-size: 1.5rem; font-weight: 500; }
.dial-note { margin: 0 0 18px; font-size: .86rem; line-height: 1.7; color: rgba(246, 242, 233, .66); }
.steep-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.steep-label { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(246, 242, 233, .5); }
.steep-btns { display: flex; gap: 4px; }
.steep {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(246, 242, 233, .24);
  background: transparent;
  color: rgba(246, 242, 233, .7);
  cursor: pointer;
  font-family: var(--f-disp);
  font-size: .95rem;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.steep:hover { transform: translateY(-2px); border-color: var(--ochre); color: var(--mist); }
.steep.is-on { background: var(--ochre-deep); border-color: var(--ochre-deep); color: var(--mist); }
.dial-status { margin: 14px 0 0; min-height: 2.6em; font-size: .82rem; color: var(--cel); }
.dial-status.is-done { color: var(--ochre); }

/* ─── библиотека: горизонтальный перехват скролла ─── */
.library { position: relative; background: linear-gradient(180deg, var(--paper), var(--paper-2) 55%, var(--paper)); }
.lib-head { max-width: none; margin: 0; padding: 0 0 clamp(10px, 2vh, 26px); }
.lib-hint { margin: 0 0 clamp(18px, 3vh, 34px); font-size: .84rem; color: var(--ink-40); }
.lib-pin { position: relative; height: auto; width: 100%; padding-inline: clamp(18px, 4vw, 56px); }
.lib-track {
  display: flex;
  gap: clamp(14px, 1.6vw, 24px);
  padding-block: clamp(26px, 4vh, 48px) clamp(40px, 6vh, 70px);
  will-change: transform;
}
.tea {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: clamp(272px, 25vw, 350px);
  padding: 24px 22px 22px;
  background: var(--mist);
  border: 1px solid var(--ink-14);
  box-shadow: 0 24px 48px -44px rgba(32, 36, 42, .9);
  transition: transform .6s var(--ease), border-color .5s, box-shadow .6s;
}
.tea:hover { transform: translateY(-8px); border-color: var(--cel); box-shadow: 0 34px 54px -40px rgba(32, 36, 42, .9); }
.tea-cat { margin: 0 0 8px; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ochre-deep); }
.tea h3 { margin: 0 0 10px; font-family: var(--f-disp); font-weight: 500; font-size: 1.42rem; line-height: 1.2; }
.tea-desc { margin: 0 0 16px; font-size: .86rem; line-height: 1.66; color: var(--ink-62); }
.tea-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; padding: 12px 0; border-top: 1px solid var(--ink-07); border-bottom: 1px solid var(--ink-07); }
.tea-spec div { min-width: 0; }
.tea-spec dt { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-40); }
.tea-spec dd { margin: 2px 0 0; font-family: var(--f-disp); font-size: 1.06rem; font-variant-numeric: tabular-nums; }
.tea-price { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: 16px; }
.tea-price b { font-family: var(--f-disp); font-weight: 500; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.tea-price span { font-size: .74rem; color: var(--ink-40); }
.tea--end { background: var(--ink); border-color: var(--ink); color: var(--mist); }
.tea--end .tea-desc { color: rgba(246, 242, 233, .68); }
.tea--end .tea-cat { color: var(--cel); }
.tea--end .tea-price span { color: rgba(246, 242, 233, .5); }
.tea--end b { color: var(--ochre); }
.lib-progress { position: relative; max-width: 1320px; margin: 0 auto; padding-inline: clamp(18px, 4vw, 56px); height: 2px; background: var(--ink-07); }
.lib-progress i { display: block; height: 2px; width: 6%; background: var(--ochre-deep); }

/* ─── церемонии ─── */
.rituals { padding: clamp(56px, 9vh, 110px) 0 clamp(56px, 9vh, 104px); }
.ritual-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: clamp(18px, 3vw, 50px);
  align-items: end;
}
.sec-note { margin: 0 0 clamp(22px, 3.4vh, 40px); font-size: .88rem; color: var(--ink-62); max-width: 52ch; }
.ritual-list { border-top: 1px solid var(--ink-14); }
.ritual {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) auto;
  gap: clamp(12px, 2vw, 28px);
  align-items: start;
  padding: clamp(18px, 2.6vh, 28px) 0;
  border-bottom: 1px solid var(--ink-07);
  transition: background .5s var(--ease), padding-inline .5s var(--ease);
}
.ritual:hover { background: rgba(246, 242, 233, .8); padding-inline: 14px; }
.r-num { margin: 0; font-family: var(--f-disp); font-size: 1.5rem; color: var(--ink-40); transition: color .4s; }
.ritual:hover .r-num { color: var(--ochre-deep); }
.r-main h3 { margin: 0 0 6px; font-family: var(--f-disp); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.2; }
.r-main p { margin: 0; font-size: .88rem; color: var(--ink-62); max-width: 54ch; }
.r-meta { margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; }
.r-meta span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cel-deep); }
.r-meta b { font-family: var(--f-disp); font-weight: 500; font-size: 1.32rem; font-variant-numeric: tabular-nums; }

.ritual-plate {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(22px, 4vw, 64px);
  align-items: center;
  margin-top: clamp(34px, 6vh, 70px);
}
.hand { margin: 0 0 16px; font-family: var(--f-disp); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.35; color: var(--ochre-deep); }

/* ─── дом и люди ─── */
.house { padding: clamp(48px, 8vh, 96px) 0; border-top: 1px solid var(--ink-07); }
.house-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 40px);
  margin-top: clamp(22px, 3.4vh, 40px);
}
.person { padding-top: 20px; border-top: 2px solid var(--ink); transition: border-color .5s; }
.person:hover { border-color: var(--ochre); }
.p-init { margin: 0; font-family: var(--f-disp); font-weight: 500; font-size: clamp(3rem, 6vw, 5rem); line-height: .8; color: var(--paper-3); transition: color .6s var(--ease), transform .6s var(--ease); }
.person:hover .p-init { color: var(--cel); transform: translateY(-4px); }
.person h3 { margin: 14px 0 4px; font-family: var(--f-disp); font-weight: 500; font-size: 1.36rem; }
.p-role { margin: 0 0 12px; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ochre-deep); }
.p-note { margin: 0; font-size: .88rem; color: var(--ink-62); }

/* ─── гости ─── */
.guests { padding: clamp(48px, 8vh, 96px) 0; background: linear-gradient(180deg, transparent, rgba(246, 242, 233, .7)); }
.guest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 40px); margin-top: clamp(20px, 3vh, 36px); }
.guest {
  margin: 0;
  padding: 22px 22px 18px;
  border: 1px solid var(--ink-14);
  background: var(--mist);
  transition: transform .6s var(--ease), border-color .5s;
}
.guest:hover { transform: translateY(-6px); border-color: var(--cel-deep); }
.guest p { margin: 0 0 16px; font-family: var(--f-disp); font-size: 1.1rem; line-height: 1.5; }
.guest footer { display: grid; gap: 2px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-40); }
.guest cite { font-style: normal; color: var(--ink); }

/* ─── визит ─── */
.visit { padding: clamp(48px, 8vh, 96px) 0 clamp(40px, 6vh, 70px); border-top: 1px solid var(--ink-07); }
.visit-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(24px, 4vw, 64px); }
.hours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(18px, 3vw, 40px); margin: 22px 0 0; }
.hours > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ink-07); }
.hours dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-40); }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; font-size: .92rem; }
.addr { margin: 0 0 14px; font-family: var(--f-disp); font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.4; }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 22px; font-size: .9rem; }
.links a { border-bottom: 1px solid var(--ink-14); transition: border-color .35s, color .35s; }
.links a:hover { color: var(--ochre-deep); border-color: var(--ochre); }
.rules { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink-14); }
.rules li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--ink-07); font-size: .82rem; }
.rules span { color: var(--ink-40); }
.rules b { font-weight: 400; text-align: right; }

/* ─── подвал ─── */
.foot { background: var(--ink); color: var(--mist); padding: clamp(34px, 5vh, 60px) 0; }
.foot-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 30px; }
.foot-brand { margin: 0; font-family: var(--f-disp); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: .06em; }
.foot-note { margin: 0; font-size: .84rem; color: rgba(246, 242, 233, .66); }
.foot-fine { margin: 18px auto 0; max-width: 1320px; padding-inline: clamp(18px, 4vw, 56px); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(246, 242, 233, .38); }

/* ─── появления по скроллу ─── */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ─── пиннинг горизонтальной полки (десктоп) ─── */
@media (min-width: 901px) {
  .library { height: 320vh; }
  .lib-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding-inline: clamp(18px, 4vw, 56px);
  }
  .lib-track { padding-block: 0; }
}

/* ─── адаптив ─── */
@media (max-width: 900px) {
  .masthead { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 6px; }
  .mast-center { text-align: left; }
  .seal svg { width: 36px; height: 36px; }
  .seal-word { display: none; }
  .mast-brand { font-size: 1.08rem; }
  .mast-sub { font-size: .6rem; letter-spacing: .1em; }
  .mast-right { grid-column: 1 / -1; align-items: flex-start; }
  .mast-nav { justify-content: flex-start; }
  .hero-grid, .brew-grid, .ritual-head, .ritual-plate, .visit-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { min-height: 0; }
  .hero-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-strip p:nth-child(2n) { border-right: 0; }
  .dial-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: left; }
  .dial { max-width: 260px; }
  .dial-side { width: 100%; }
  .house-grid, .guest-grid { grid-template-columns: minmax(0, 1fr); }
  .ritual { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .r-meta { grid-column: 2; flex-direction: row; align-items: baseline; justify-content: space-between; }
  .hours { grid-template-columns: minmax(0, 1fr); }
  .lib-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-inline: clamp(18px, 4vw, 56px);
    margin-inline: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .tea { scroll-snap-align: start; width: min(78vw, 320px); }
  .lib-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .plate-frame { clip-path: none; transition: none; }
  .plate-rod { display: none; }
  .ink-divider svg { transform: scaleY(1); transition: none; }
  .mast-status::before { animation: none; }
  .d-hand { transition: none; }
  * { transition-duration: .001s !important; }
}

/* ─── печать «наверх»: всплывает после героя, без текста внутри ─── */
.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 30px);
  bottom: clamp(14px, 2.4vw, 30px);
  z-index: 60;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink-14);
  border-radius: 50%;
  background: rgba(246, 242, 233, .9);
  color: var(--ochre-deep);
  opacity: 0;
  transform: translateY(14px) scale(.9);
  pointer-events: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease), background .4s;
}
.to-top.is-show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--ink); color: var(--mist); }
