/* ============================================================
   heartofadriana.com
   Shared styles for the landing reel and the links page.
   Palette: warm paper, brown ink, gilt. No grey, no black.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --paper:      #f2e9dd;
  --paper-deep: #e7d9c6;
  --panel:      #fbf6ee;
  --panel-soft: rgba(251, 246, 238, 0.72);

  --ink:        #3c2f26;
  --ink-2:      #6d5949;
  --ink-3:      #a08a76;

  --gold:       #c2963f;
  --gold-soft:  #e6cd93;
  --blush:      #c4948a;
  --night:      #2b3350;

  --line:       rgba(60, 47, 38, 0.14);
  --line-soft:  rgba(60, 47, 38, 0.07);

  --shadow-sm: 0 1px 2px rgba(60,47,38,.06), 0 4px 12px rgba(60,47,38,.06);
  --shadow-md: 0 2px 6px rgba(60,47,38,.08), 0 18px 40px rgba(60,47,38,.12);
  --shadow-lg: 0 8px 20px rgba(60,47,38,.12), 0 40px 90px rgba(60,47,38,.20);

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "EB Garamond", Georgia, "Times New Roman", serif;
  --ui: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 34rem;
  --radius: 18px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 50%; top: 0.5rem;
  transform: translate(-50%, -200%);
  background: var(--panel); color: var(--ink);
  padding: .6rem 1rem; border-radius: 999px;
  z-index: 999; box-shadow: var(--shadow-md);
  font-family: var(--ui); font-size: .85rem;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- warm room: the light, the grain, the dust ---------- */
.room {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.room__wash {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(52% 40% at 22% -6%,  rgba(255,241,214,.95) 0%, rgba(255,241,214,0) 62%),
    radial-gradient(60% 50% at 88% 8%,   rgba(240,214,178,.55) 0%, rgba(240,214,178,0) 60%),
    radial-gradient(90% 70% at 50% 112%, rgba(196,164,128,.34) 0%, rgba(196,164,128,0) 66%);
}
.room__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 45%, rgba(0,0,0,0) 52%, rgba(86,62,40,.16) 100%);
}
/* painted lamplight. Optional file: if it is missing nothing renders and
   the CSS wash underneath carries the whole effect on its own. */
.room__art {
  position: absolute;
  inset: -14%;
  background: url("/images/room-light.jpg") center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .13;
}
.room__grain {
  position: absolute;
  inset: -50%;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='180' height='180' filter='url(%23n)' opacity='.42'/></svg>");
  animation: grainshift 5s steps(6) infinite;
}
@keyframes grainshift {
  0%   { transform: translate(0,0); }
  16%  { transform: translate(-2%, 1%); }
  33%  { transform: translate(1%, -2%); }
  50%  { transform: translate(-1%, -1%); }
  66%  { transform: translate(2%, 1%); }
  83%  { transform: translate(-2%, 2%); }
  100% { transform: translate(0,0); }
}
/* painted paper. Also optional, same deal. */
.room__paper {
  position: absolute;
  inset: 0;
  background: url("/images/paper.jpg") center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .16;
}
.room__motes { position: absolute; inset: 0; }
.mote {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,246,224,.95) 0%, rgba(226,197,146,.35) 45%, rgba(226,197,146,0) 70%);
  animation: drift linear infinite;
  will-change: transform, opacity;
}
@keyframes drift {
  0%   { transform: translate3d(0, 12vh, 0) scale(.6); opacity: 0; }
  12%  { opacity: .85; }
  88%  { opacity: .7; }
  100% { transform: translate3d(6vw, -108vh, 0) scale(1.25); opacity: 0; }
}

/* ============================================================
   LANDING REEL
   ============================================================ */

.reel { position: relative; z-index: 1; }
.reel__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* the perforated edges of the strip */
.perf {
  position: absolute;
  top: -6%;
  height: 112%;
  width: clamp(20px, 3.4vw, 40px);
  background:
    linear-gradient(180deg, rgba(203,178,145,.30), rgba(203,178,145,.18)),
    var(--paper-deep);
  border-inline: 1px solid var(--line-soft);
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.perf--l { left: 0; }
.perf--r { right: 0; }
.perf::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(ellipse 30% 19% at 50% 50%, var(--paper) 0 99%, rgba(242,233,221,0) 100%);
  background-size: 100% 58px;
  background-position: center 0;
  background-repeat: repeat-y;
}
.perf::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 22px rgba(120,92,60,.18);
}

.strip {
  position: relative;
  z-index: 2;
  width: 100%;
  will-change: transform;
  background-color: #e4d4bc;
  background-image:
    linear-gradient(180deg, rgba(230,215,193,.80) 0%, rgba(222,206,181,.84) 100%),
    url("/images/paper.jpg");
  background-size: auto, 110% auto;
  background-repeat: no-repeat, repeat-y;
  background-position: center, center top;
  box-shadow: 0 0 60px rgba(120,92,60,.10) inset;
}

.frame {
  position: relative;
  height: 74vh;
  height: 74svh;
  margin-bottom: 5vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem clamp(2.5rem, 7vw, 5rem);
  text-align: center;
  border-radius: 6px;
  background-color: #fbf5ec;
  background-image:
    linear-gradient(180deg, rgba(252,247,240,.93) 0%, rgba(247,239,227,.95) 100%),
    url("/images/paper.jpg");
  background-size: auto, cover;
  background-position: center, center;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.7),
    0 0 0 1px rgba(120,92,60,.10),
    0 10px 30px rgba(120,92,60,.06);
}
.frame__inner {
  max-width: var(--wrap);
  width: 100%;
}
.frame--name .frame__inner { max-width: min(94%, 62rem); }

/* the line frame sits on a painted bookshop wall, heavily veiled so the
   type keeps its contrast. Falls back to plain paper if the file is gone. */
.frame--line {
  background-image:
    radial-gradient(56% 40% at 50% 50%, rgba(250,244,234,.95) 0%, rgba(250,244,234,.60) 52%, rgba(250,244,234,0) 78%),
    linear-gradient(180deg, rgba(250,244,234,.70) 0%, rgba(245,236,222,.76) 100%),
    url("/images/shelves.jpg"),
    linear-gradient(180deg, #fbf5ec 0%, #f6ede0 100%);
  background-size: auto, auto, cover, auto;
  background-position: center;
  background-repeat: no-repeat;
}

/* painted still life in the closing frame */
.still {
  width: min(72%, 19rem);
  height: auto;
  align-self: center;
  justify-self: center;
  margin: 0 auto -7%;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 44%, rgba(0,0,0,0) 68%);
  mask-image: radial-gradient(circle at 50% 50%, #000 44%, rgba(0,0,0,0) 68%);
}

/* tiny frame number, like a negative */
.frame__no {
  position: absolute;
  left: clamp(2.6rem, 5vw, 3.4rem);
  bottom: clamp(.6rem, 1.6vw, 1.1rem);
  font-family: var(--ui);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: .6;
}

/* ---------- the wordmark (her real hand lettering) ---------- */
.wordmark {
  position: relative;
  margin: 0 auto;
  width: min(100%, 40rem);
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}
.wordmark img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity .25s var(--ease);
}
.wordmark canvas {
  position: absolute;
  left: 0;
  top: -9%;
  width: 100%;
  display: none;
}
.wordmark.is-live img { opacity: 0; }
.wordmark.is-live canvas { display: block; }

.eyebrow {
  margin: clamp(1.2rem, 3.4vw, 2.2rem) 0 0;
  font-family: var(--ui);
  font-size: clamp(.66rem, 1.7vw, .82rem);
  letter-spacing: .42em;
  text-indent: .42em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: default;
  user-select: none;
}
.split__ch {
  display: inline-block;
  will-change: transform;
  transform-origin: 50% 60%;
}
.split__space { display: inline-block; width: .5em; }

.rule {
  width: min(220px, 46%);
  margin: clamp(1.4rem, 4vw, 2.2rem) auto 0;
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--gold);
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(194,150,63,0), rgba(194,150,63,.75), rgba(194,150,63,0));
}
.rule svg { width: 15px; height: 15px; flex: none; }

.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: clamp(1.2rem, 4vh, 2.6rem);
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-family: var(--ui);
  font-size: .6rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.scroll-hint__arrow {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, rgba(160,138,118,0), rgba(160,138,118,.9));
  animation: hintdrop 2.1s var(--ease) infinite;
}
@keyframes hintdrop {
  0%   { transform: scaleY(.2); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1);  transform-origin: top; opacity: 1; }
  70%  { transform: scaleY(1);  transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(.2); transform-origin: bottom; opacity: 0; }
}
.is-scrolled .scroll-hint { opacity: 0; }

/* ---------- the line ---------- */
.line {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 5.6vw, 3.1rem);
  line-height: 1.24;
  color: var(--ink);
}
.line__sub {
  margin: clamp(1.2rem, 3vw, 1.8rem) 0 0;
  font-family: var(--ui);
  font-size: clamp(.72rem, 1.8vw, .84rem);
  letter-spacing: .14em;
  color: var(--ink-2);
}

/* ---------- the book ---------- */
.book-frame .frame__inner { display: grid; justify-items: center; gap: clamp(2.4rem, 5vw, 3.2rem); }

.book {
  display: block;
  position: relative;
  width: clamp(180px, 42vw, 340px);
  aspect-ratio: 1 / 1;
  perspective: 1100px;
  text-decoration: none;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.book__tilt {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
  will-change: transform;
}
.book__cover {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--night);
  box-shadow: var(--shadow-lg);
  transform: translateZ(14px);
}
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,247,225,.42) 0%, rgba(255,247,225,0) 38%);
  opacity: .55;
  transition: opacity .5s var(--ease);
}
.book:hover .book__cover::after,
.book:focus-visible .book__cover::after { opacity: .95; }

/* the block of pages peeking out on the right */
.book__pages {
  position: absolute;
  top: 3%;
  right: -9px;
  width: 12px;
  height: 94%;
  border-radius: 2px 5px 5px 2px;
  transform: translateZ(4px) rotateY(-6deg);
  background: repeating-linear-gradient(90deg,
    #f6efe3 0 1px, #e6d9c4 1px 2px, #fbf6ec 2px 3px);
  box-shadow: 2px 4px 12px rgba(60,47,38,.22);
  transition: transform .5s var(--ease), right .5s var(--ease);
}
.book:hover .book__pages,
.book:focus-visible .book__pages { right: -15px; transform: translateZ(4px) rotateY(-13deg); }

.book__glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,232,175,.55) 0%, rgba(255,232,175,0) 62%);
  opacity: 0;
  transition: opacity .55s var(--ease);
  transform: translateZ(-40px);
  pointer-events: none;
}
.book:hover .book__glow,
.book:focus-visible .book__glow { opacity: 1; }

.book__open {
  position: absolute;
  left: 50%;
  bottom: -1.5rem;
  transform: translate(-50%, 6px);
  font-family: var(--ui);
  font-size: .6rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  white-space: nowrap;
}
.book:hover .book__open,
.book:focus-visible .book__open { opacity: 1; transform: translate(-50%, 0); }

.book-meta { display: grid; gap: .35rem; }
.book-meta h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  line-height: 1.15;
}
.book-meta p {
  margin: 0;
  font-family: var(--ui);
  font-size: clamp(.7rem, 1.8vw, .8rem);
  letter-spacing: .1em;
  color: var(--ink-2);
}

/* ---------- closing frame ---------- */
.closing .frame__inner { display: grid; gap: clamp(1.2rem, 3vw, 1.8rem); justify-items: center; }
.closing h2 {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 4.6vw, 2.4rem);
  line-height: 1.2;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(194,150,63,.5);
  background: linear-gradient(180deg, rgba(255,252,246,.95), rgba(247,238,225,.95));
  box-shadow: var(--shadow-sm);
  font-family: var(--ui);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.btn:active { transform: translateY(0); }

/* ---------- frame counter rail ---------- */
.rail {
  position: fixed;
  right: clamp(.5rem, 2.4vw, 1.4rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: grid;
  gap: .7rem;
  padding: .55rem .4rem;
}
.rail button {
  width: 26px; height: 12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.rail button::before {
  content: "";
  width: 12px; height: 2px;
  border-radius: 2px;
  background: var(--ink-2);
  opacity: .5;
  transition: width .3s var(--ease), opacity .3s var(--ease), background .3s var(--ease);
}
.rail button[aria-current="true"]::before { width: 24px; opacity: 1; background: var(--gold); }

/* ---------- reduced motion / no-js fallback ---------- */
@media (prefers-reduced-motion: reduce) {
  .room__grain, .mote, .scroll-hint__arrow { animation: none; }
  .book__tilt, .book__pages, .book__cover::after { transition: none; }
}

.no-js .reel__stage,
.reel.is-flat .reel__stage { position: static; height: auto; overflow: visible; display: block; }
.no-js .perf, .no-js .rail, .no-js .scroll-hint,
.reel.is-flat .perf, .reel.is-flat .scroll-hint { display: none; }
.no-js .frame,
.reel.is-flat .frame { height: auto; min-height: 60vh; margin-bottom: 0; }
.reel.is-flat ~ .rail, .reel.is-flat .rail { display: none; }

/* cover file missing: draw something warm instead of a broken image */
.book__cover.is-empty,
.card__thumb.is-empty,
.sheet__cover.is-empty {
  background:
    radial-gradient(60% 45% at 50% 30%, rgba(255,236,186,.9) 0%, rgba(255,236,186,0) 62%),
    linear-gradient(180deg, #3a4468 0%, #262d47 100%);
}
.book__cover.is-empty::before,
.sheet__cover.is-empty::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  color: var(--gold-soft);
  opacity: .85;
}
.sheet__cover { position: relative; }

/* ============================================================
   LINKS PAGE
   ============================================================ */

.links-page { min-height: 100vh; min-height: 100svh; }

.links-wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 30rem);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 11vh, 6rem) 0 clamp(2.5rem, 7vh, 4rem);
}

.back-home {
  position: absolute;
  top: clamp(1rem, 3vh, 1.6rem);
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ui);
  font-size: .64rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  opacity: .8;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.back-home:hover { opacity: 1; transform: translateX(-2px); }

.profile { display: grid; justify-items: center; gap: .9rem; text-align: center; margin-bottom: clamp(1.6rem, 5vh, 2.4rem); }

.avatar {
  width: clamp(104px, 26vw, 132px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, #58433a 0%, #3f2f28 62%, #35271f 100%);
  box-shadow: var(--shadow-md), 0 0 0 6px rgba(255,255,255,.42);
  overflow: hidden;
}
.avatar svg { width: 46%; height: auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 6.4vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: .012em;
  width: 100%;
}
.profile__wordmark {
  width: min(100%, 17rem);
  height: auto;
  margin: 0 auto;
}
.profile p {
  margin: 0;
  font-family: var(--ui);
  font-size: .74rem;
  letter-spacing: .28em;
  text-indent: .28em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.socials { display: flex; gap: 1.35rem; margin-top: .3rem; }
.socials a {
  color: var(--ink-2);
  transition: color .25s var(--ease), transform .25s var(--ease);
  display: grid; place-items: center;
}
.socials a:hover { color: var(--gold); transform: translateY(-2px); }
.socials svg { width: 22px; height: 22px; }

/* ---------- cards ---------- */
.cards { display: grid; gap: .8rem; }

.card {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .7rem .95rem .7rem .7rem;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius);
  background: var(--panel-soft);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background .28s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: rgba(253,249,243,.9); }
.card:active { transform: translateY(0) scale(.995); }

.card__thumb {
  width: 58px; height: 58px;
  flex: none;
  border-radius: 11px;
  overflow: hidden;
  background: var(--night);
  box-shadow: 0 2px 8px rgba(60,47,38,.18);
  display: grid; place-items: center;
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__thumb svg { width: 46%; height: auto; color: var(--gold-soft); }

.card__text { flex: 1; min-width: 0; }
.card__title {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.25;
  color: var(--ink);
}
.card__sub {
  display: block;
  font-family: var(--ui);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--ink-2);
  margin-top: .12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__chev { flex: none; color: var(--ink-3); opacity: .55; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.card:hover .card__chev { transform: translateX(3px); opacity: .9; }

.links-foot {
  margin-top: clamp(2rem, 6vh, 3rem);
  text-align: center;
  font-family: var(--ui);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.links-foot a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.links-foot a:hover { color: var(--ink); }

.share-btn {
  position: absolute;
  top: clamp(1rem, 3vh, 1.6rem);
  right: 0;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink-2);
  cursor: pointer;
  transition: transform .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.share-btn:hover { transform: translateY(-2px); color: var(--gold); box-shadow: var(--shadow-sm); }
.share-btn svg { width: 17px; height: 17px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 140%);
  z-index: 90;
  padding: .6rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: .74rem;
  letter-spacing: .08em;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- buy sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(60,44,32,.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  z-index: 81;
  left: 50%;
  bottom: 0;
  width: min(100%, 27rem);
  max-height: 92vh;
  max-height: 92svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translate(-50%, 100%);
  background: var(--panel);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  visibility: hidden;
  pointer-events: none;
  transition: transform .42s var(--ease), visibility .42s var(--ease);
  padding: 1.4rem 1.3rem calc(1.6rem + env(safe-area-inset-bottom, 0px));
}
.sheet.is-open { transform: translate(-50%, 0); visibility: visible; pointer-events: auto; }
@media (min-width: 640px) {
  .sheet {
    top: 50%;
    bottom: auto;
    border-radius: 22px;
    transform: translate(-50%, calc(-50% + 24px));
    opacity: 0;
    transition: transform .38s var(--ease), opacity .28s var(--ease), visibility .38s var(--ease);
  }
  .sheet.is-open { transform: translate(-50%, -50%); opacity: 1; }
}

.sheet__grip {
  width: 42px; height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: -.5rem auto .9rem;
}
@media (min-width: 640px) { .sheet__grip { display: none; } }

.sheet__close {
  position: absolute;
  top: .85rem; right: .9rem;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.sheet__close:hover { color: var(--ink); background: rgba(60,47,38,.05); }

.sheet__head { display: grid; justify-items: center; gap: .9rem; text-align: center; }
.sheet__cover {
  width: clamp(150px, 46vw, 190px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--night);
  box-shadow: var(--shadow-md);
}
.sheet__cover img { width: 100%; height: 100%; object-fit: cover; }
.sheet h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.15;
}
.sheet__by {
  margin: 0;
  font-family: var(--ui);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--ink-2);
}
.sheet__blurb {
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  text-align: center;
}

.formats {
  display: flex;
  gap: .55rem;
  justify-content: center;
  margin: 1.3rem 0 1rem;
}
.chip {
  padding: .5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--ui);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.buy-rows { display: grid; gap: .55rem; }
.buy-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .8rem .95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255,255,255,.5);
  transition: transform .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease);
}
.buy-row:hover { transform: translateY(-1px); border-color: var(--gold); background: #fff; }
.buy-row__mark {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--paper-deep);
  font-family: var(--ui);
  font-weight: 700;
  font-size: .62rem;
  letter-spacing: .01em;
  color: var(--ink);
}
.buy-row__name { flex: 1; font-family: var(--ui); font-size: .88rem; }
.buy-row__price { font-family: var(--ui); font-size: .82rem; color: var(--ink-2); }

.sheet__note {
  margin: 1rem 0 0;
  text-align: center;
  font-family: var(--ui);
  font-size: .64rem;
  letter-spacing: .04em;
  color: var(--ink-3);
}

body.sheet-open { overflow: hidden; }
