:root {
  color-scheme: light;
  --page-width: 420px;
  --text: #5e4651;
  --muted: #836975;
  --card: rgba(255, 250, 246, 0.88);
  --pink: #ff99ae;
  --peach: #ffd8c6;
  --gold: #ffd969;
  --gold-strong: #ffbc43;
  --navy: #2f3d5a;
  --shadow: 0 18px 40px rgba(191, 123, 134, 0.14);
  --dock-height: 74px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 226, 206, 0.82), transparent 34%),
    radial-gradient(circle at 16% 18%, rgba(255, 165, 184, 0.15), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(255, 217, 150, 0.18), transparent 20%),
    linear-gradient(180deg, #fffaf5 0%, #fff4ee 52%, #fff8f4 100%);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.92) 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 38%, rgba(255, 255, 255, 0.82) 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 32% 68%, rgba(255, 255, 255, 0.92) 0 1.1px, transparent 1.6px);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
a {
  font: inherit;
  touch-action: manipulation;
}

.hold-button,
.hold-button *,
.primary-link,
.app-dock__button {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.sky-glow {
  position: fixed;
  width: 36vw;
  height: 36vw;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.38;
  pointer-events: none;
}

.sky-glow--left {
  top: 2vh;
  left: -10vw;
  background: rgba(255, 195, 206, 0.56);
}

.sky-glow--right {
  top: 18vh;
  right: -10vw;
  background: rgba(255, 223, 161, 0.46);
}

.page-shell {
  position: relative;
  width: min(100%, var(--page-width));
  height: calc(100svh - var(--dock-height));
  margin: 0 auto;
  padding:
    max(10px, env(safe-area-inset-top))
    12px
    10px;
}

.page-shell--landing,
.page-shell--gacha {
  display: grid;
  align-content: stretch;
}

.hero-card,
.machine-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card--landing {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 8px;
  padding: 12px 12px 10px;
}

.hero-card__image {
  width: min(20vw, 88px);
  margin: 0 auto;
}

.hero-copy--landing {
  text-align: center;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ca8798;
}

.hero-copy h1,
.page-title,
.paper-note__topic {
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Georgia", "Songti SC", serif;
  font-weight: 700;
}

.hero-copy h1,
.page-title {
  font-size: clamp(1.28rem, 4.4vw, 1.7rem);
  line-height: 1.12;
}

.ritual-list {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.ritual-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 0;
}

.ritual-item + .ritual-item {
  padding-top: 3px;
  border-top: 1px solid rgba(214, 174, 182, 0.18);
}

.ritual-index {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 232, 214, 0.98), rgba(255, 188, 164, 0.92));
  color: #aa6269;
  font-size: 0.64rem;
  font-weight: 700;
}

.ritual-item p,
.hold-hint,
.paper-note__hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.28;
  font-size: 0.86rem;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd599, #ffbfa2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.76),
    0 12px 22px rgba(191, 123, 134, 0.14);
  color: #674b57;
  font-weight: 700;
  text-decoration: none;
}

.machine-card--page {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 6px;
  padding: 10px 10px 8px;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.section-heading--gacha {
  margin-bottom: 0;
}

.section-heading__row {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 4px;
  align-items: start;
}

.section-heading__otter {
  width: 52px;
  justify-self: end;
  margin-top: 2px;
}

.machine-stage {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
}

.gacha-machine {
  position: relative;
  width: 100%;
  min-height: 192px;
  perspective: 1200px;
  filter: drop-shadow(0 18px 26px rgba(171, 119, 163, 0.12));
}

.gacha-machine.is-holding .gacha-machine__globe-frame {
  animation: machineTilt 0.95s ease-in-out infinite;
}

.gacha-machine.is-holding .gacha-machine__stars {
  animation: starCloudDrift 0.95s ease-in-out infinite;
}

.gacha-machine.is-holding .gacha-machine__star {
  animation: starJitter 0.8s ease-in-out infinite;
}

.gacha-machine.is-ready .gacha-machine__globe-frame {
  filter: drop-shadow(0 0 12px rgba(255, 231, 156, 0.42));
}

.gacha-machine__halo {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(255, 235, 170, 0.34), transparent 48%),
    radial-gradient(circle, rgba(174, 223, 255, 0.16), transparent 68%);
  filter: blur(10px);
}

.gacha-machine__cap {
  position: absolute;
  top: 0;
  left: 50%;
  width: 82px;
  height: 12px;
  transform: translateX(-50%) translateZ(20px);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 220, 193, 0.92) 48%, rgba(223, 176, 220, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -2px 4px rgba(194, 151, 209, 0.24),
    0 8px 14px rgba(181, 119, 130, 0.14);
}

.gacha-machine__globe-frame {
  position: relative;
  width: min(48vw, 176px);
  aspect-ratio: 1 / 1.03;
  margin: 6px auto 0;
  padding: 7px;
  border-radius: 50%;
  transform-style: preserve-3d;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 227, 255, 0.82) 48%, rgba(255, 227, 205, 0.7)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    inset 0 -4px 10px rgba(208, 176, 255, 0.16),
    0 18px 28px rgba(191, 123, 134, 0.16);
}

.gacha-machine__globe-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.42);
}

.gacha-machine__globe-frame::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 20%),
    radial-gradient(circle at 78% 82%, rgba(174, 223, 255, 0.12), transparent 24%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.gacha-machine__globe {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 108%, rgba(255, 219, 160, 0.26), transparent 36%),
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95), transparent 14%),
    radial-gradient(circle at 70% 16%, rgba(213, 240, 255, 0.28), transparent 22%),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(245, 225, 255, 0.34) 42%, rgba(255, 215, 196, 0.42) 74%, rgba(255, 222, 198, 0.84));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.88),
    inset 0 12px 18px rgba(255, 255, 255, 0.18),
    inset 0 -12px 18px rgba(234, 176, 144, 0.08);
}

.gacha-machine__globe::before {
  content: "";
  position: absolute;
  inset: 10% 8% 26%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.gacha-machine__shine {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), transparent 82%);
}

.gacha-machine__shine--left {
  top: 10px;
  left: 12px;
  width: 20%;
  height: 36%;
  transform: rotate(-16deg);
  opacity: 0.95;
}

.gacha-machine__shine--right {
  top: 16px;
  right: 13px;
  width: 9%;
  height: 22%;
  transform: rotate(12deg);
  opacity: 0.78;
}

.gacha-machine__shine--rim {
  bottom: 10px;
  left: 50%;
  width: 58%;
  height: 16%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22));
  opacity: 0.74;
}

.gacha-machine__stars {
  position: absolute;
  inset: 16% 14% 15%;
}

.gacha-machine__star {
  position: absolute;
  display: inline-block;
  line-height: 1;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.94),
    0 0 18px rgba(255, 235, 163, 0.55),
    0 6px 12px rgba(255, 192, 111, 0.16);
  transform-origin: center;
}

.gacha-machine__star--1 {
  top: 6%;
  left: 14%;
  font-size: 0.94rem;
  color: #ff87ab;
}

.gacha-machine__star--2 {
  top: 10%;
  left: 42%;
  font-size: 0.6rem;
  color: #ffd966;
}

.gacha-machine__star--3 {
  top: 10%;
  right: 18%;
  font-size: 0.82rem;
  color: #81ccff;
}

.gacha-machine__star--4 {
  top: 24%;
  left: 12%;
  font-size: 0.72rem;
  color: #ffc364;
}

.gacha-machine__star--5 {
  top: 22%;
  left: 34%;
  font-size: 0.58rem;
  color: #ff94b3;
}

.gacha-machine__star--6 {
  top: 24%;
  right: 26%;
  font-size: 0.96rem;
  color: #ffd75b;
}

.gacha-machine__star--7 {
  top: 30%;
  right: 10%;
  font-size: 0.58rem;
  color: #96d4ff;
}

.gacha-machine__star--8 {
  top: 42%;
  left: 16%;
  font-size: 0.84rem;
  color: #ff83a8;
}

.gacha-machine__star--9 {
  top: 40%;
  left: 44%;
  font-size: 0.64rem;
  color: #ffd767;
}

.gacha-machine__star--10 {
  top: 44%;
  right: 16%;
  font-size: 0.84rem;
  color: #7cc9ff;
}

.gacha-machine__star--11 {
  top: 58%;
  left: 14%;
  font-size: 0.58rem;
  color: #ffc96f;
}

.gacha-machine__star--12 {
  top: 58%;
  left: 36%;
  font-size: 0.84rem;
  color: #ff92b2;
}

.gacha-machine__star--13 {
  top: 60%;
  right: 30%;
  font-size: 0.56rem;
  color: #9bd6ff;
}

.gacha-machine__star--14 {
  top: 64%;
  right: 12%;
  font-size: 0.8rem;
  color: #ffd35d;
}

.gacha-machine__star--15 {
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.88rem;
  color: #ff87ac;
}

.gacha-machine__neck {
  width: 66px;
  height: 14px;
  margin: -5px auto 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 223, 201, 0.92) 48%, rgba(219, 182, 220, 0.72)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.76),
    inset 0 -2px 4px rgba(196, 151, 209, 0.24),
    0 8px 14px rgba(186, 120, 132, 0.14);
}

.gacha-machine__body {
  position: relative;
  width: min(40vw, 148px);
  height: 84px;
  margin: -2px auto 0;
  border-radius: 24px 24px 28px 28px;
  background:
    linear-gradient(180deg, rgba(255, 235, 224, 0.98), rgba(247, 188, 197, 0.98) 54%, rgba(211, 169, 228, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.48),
    inset 0 -12px 18px rgba(182, 98, 112, 0.08),
    inset 0 10px 14px rgba(255, 255, 255, 0.12),
    0 18px 30px rgba(186, 120, 132, 0.18);
}

.gacha-machine__body::before {
  content: "";
  position: absolute;
  inset: 7px 10px auto;
  height: 22px;
  border-radius: 14px;
  background: rgba(255, 248, 243, 0.18);
}

.gacha-machine__panel {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 72px;
  height: 24px;
  border-radius: 12px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 225, 222, 0.1));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 10px 10px rgba(255, 255, 255, 0.06);
}

.gacha-machine__slot {
  position: absolute;
  top: 13px;
  left: 50%;
  width: 62px;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(74, 50, 71, 0.96), rgba(121, 72, 93, 0.96));
  transform: translateX(-50%);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.22),
    0 2px 0 rgba(255, 255, 255, 0.08);
}

.gacha-machine__dial {
  position: absolute;
  right: 12px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.94), transparent 32%),
    linear-gradient(180deg, rgba(255, 248, 190, 0.98), rgba(244, 189, 74, 0.98) 56%, rgba(223, 153, 54, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.76),
    inset 0 -3px 5px rgba(156, 92, 26, 0.18),
    0 10px 18px rgba(146, 97, 39, 0.18);
}

.gacha-machine__dial-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 251, 232, 0.86);
}

.gacha-machine__tray {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 62px;
  height: 22px;
  border-radius: 0 0 20px 20px;
  border: 4px solid rgba(255, 245, 237, 0.9);
  border-top: none;
  transform: translateX(-50%);
}

.hold-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(64vw, 228px);
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 239, 205, 0.98), rgba(255, 255, 255, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.88),
    0 12px 22px rgba(191, 123, 134, 0.16);
  color: #8c5e1e;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hold-button.is-holding {
  transform: translateY(1px) scale(0.988);
  background: linear-gradient(180deg, rgba(255, 226, 173, 0.98), rgba(255, 245, 213, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    0 8px 16px rgba(191, 123, 134, 0.18),
    0 0 0 6px rgba(255, 242, 205, 0.22);
}

.hold-button.is-ready {
  background: linear-gradient(90deg, rgba(255, 221, 129, 0.98), rgba(255, 242, 205, 0.98));
}

.hold-button__label {
  position: relative;
  z-index: 1;
  font-family: "Iowan Old Style", "Baskerville", "Georgia", "Songti SC", serif;
  font-size: 0.86rem;
  font-weight: 700;
}

.hold-hint {
  width: min(72vw, 248px);
  text-align: center;
  font-size: 0.76rem;
}

.paper-note {
  width: 100%;
  padding: 10px 10px 8px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 247, 235, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    0 14px 24px rgba(191, 120, 132, 0.14);
}

.paper-note.is-visible {
  animation: noteRise 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.paper-note__pin {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 231, 193, 0.92);
  color: #8d5e1a;
  font-size: 0.66rem;
  font-weight: 700;
}

.paper-note__topic {
  margin-top: 7px;
  font-size: 0.88rem;
  line-height: 1.34;
}

.paper-note__hint {
  margin-top: 5px;
  font-size: 0.72rem;
}

.app-dock {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 7px;
  align-items: center;
  min-height: 62px;
  padding: 7px 9px;
  border-radius: 18px;
  background: rgba(255, 249, 243, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 30px rgba(171, 111, 122, 0.16);
  backdrop-filter: blur(14px);
}

.app-dock__icon {
  width: 40px;
  border-radius: 11px;
  box-shadow: 0 8px 16px rgba(46, 57, 88, 0.12);
}

.app-dock__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-dock__copy strong {
  font-size: 0.76rem;
  line-height: 1.2;
}

.app-dock__copy span {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-dock__button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd599, #ffbfa2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 10px 18px rgba(191, 123, 134, 0.14);
  color: #674b57;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-height: 740px) {
  .page-shell {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .hero-card--landing,
  .machine-card--page {
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .hero-card__image {
    width: min(18vw, 78px);
  }

  .hero-copy h1,
  .page-title {
    font-size: clamp(1.18rem, 4.1vw, 1.52rem);
  }

  .ritual-item p {
    font-size: 0.82rem;
  }

  .bottle-machine {
    min-height: 182px;
  }

  .bottle-machine__jar {
    width: min(40vw, 148px);
    height: 136px;
  }

  .bottle-machine__base {
    width: 104px;
  }

  .gacha-machine {
    min-height: 178px;
  }

  .gacha-machine__globe-frame {
    width: min(44vw, 164px);
  }

  .gacha-machine__body {
    width: min(36vw, 134px);
    height: 78px;
  }

  .paper-note__topic {
    font-size: 0.82rem;
  }

  .app-dock {
    min-height: 58px;
  }
}

@keyframes machineTilt {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  25% {
    transform: rotate(-1.6deg) translateY(1px);
  }
  50% {
    transform: rotate(1.2deg) translateY(-1px);
  }
  75% {
    transform: rotate(-1deg) translateY(1px);
  }
}

@keyframes starCloudDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(-2px, 3px, 10px);
  }
  50% {
    transform: translate3d(2px, -2px, -8px);
  }
  75% {
    transform: translate3d(-1px, 2px, 6px);
  }
}

@keyframes starJitter {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-8deg) scale(1.06);
  }
  50% {
    transform: rotate(6deg) scale(0.97);
  }
  75% {
    transform: rotate(-4deg) scale(1.03);
  }
}

@keyframes noteRise {
  0% {
    transform: translateY(16px) scale(0.97);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.bottle-machine {
  position: relative;
  width: 100%;
  min-height: 198px;
  perspective: 1200px;
  filter: drop-shadow(0 20px 32px rgba(126, 142, 199, 0.14));
}

.bottle-machine.is-holding .bottle-machine__jar,
.bottle-machine.is-holding .bottle-machine__neck,
.bottle-machine.is-holding .bottle-machine__cork {
  animation: bottleRock 0.95s ease-in-out infinite;
}

.bottle-machine.is-holding .bottle-machine__stars {
  animation: bottleStarCloud 0.95s ease-in-out infinite;
}

.bottle-machine.is-holding .bottle-machine__star {
  animation: bottleStarJitter 0.8s ease-in-out infinite;
}

.bottle-machine.is-ready .bottle-machine__jar {
  filter: drop-shadow(0 0 12px rgba(255, 243, 181, 0.4));
}

.bottle-machine__glow {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(255, 233, 173, 0.24), transparent 50%),
    radial-gradient(circle, rgba(167, 233, 255, 0.16), transparent 70%);
  filter: blur(12px);
}

.bottle-machine__cork {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 38px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 10px 10px 8px 8px;
  background: linear-gradient(180deg, rgba(223, 182, 128, 0.98), rgba(183, 123, 87, 0.96));
  box-shadow:
    inset 0 2px 4px rgba(255, 222, 187, 0.28),
    0 8px 12px rgba(128, 87, 62, 0.18);
}

.bottle-machine__neck {
  position: relative;
  width: 54px;
  height: 30px;
  margin: 18px auto 0;
  border-radius: 14px 14px 12px 12px;
  background:
    linear-gradient(180deg, rgba(246, 252, 255, 0.74), rgba(223, 240, 255, 0.3)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.36), transparent);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 10px 18px rgba(164, 146, 192, 0.12);
}

.bottle-machine__neck::before {
  content: "";
  position: absolute;
  inset: 4px 12px auto;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
}

.bottle-machine__jar {
  position: relative;
  width: min(44vw, 160px);
  height: 150px;
  margin: -2px auto 0;
  overflow: hidden;
  border-radius: 34px 34px 42px 42px / 22px 22px 36px 36px;
  background:
    radial-gradient(circle at 50% 110%, rgba(255, 217, 162, 0.22), transparent 34%),
    radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.9), transparent 14%),
    radial-gradient(circle at 74% 12%, rgba(193, 235, 255, 0.3), transparent 18%),
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.26), transparent 38%),
    linear-gradient(180deg, rgba(247, 252, 255, 0.88), rgba(233, 243, 255, 0.22) 36%, rgba(237, 224, 255, 0.22) 64%, rgba(255, 222, 198, 0.48));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 18px 20px rgba(255, 255, 255, 0.12),
    inset 0 -16px 20px rgba(177, 223, 255, 0.06),
    0 20px 30px rgba(139, 131, 193, 0.14);
  transform-origin: bottom center;
}

.bottle-machine__jar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.1));
  pointer-events: none;
}

.bottle-machine__jar::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 217, 0.2), transparent 70%);
  pointer-events: none;
}

.bottle-machine__shine {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), transparent 82%);
}

.bottle-machine__shine--left {
  top: 18px;
  left: 16px;
  width: 14%;
  height: 42%;
  transform: rotate(-16deg);
  opacity: 0.92;
}

.bottle-machine__shine--right {
  top: 22px;
  right: 18px;
  width: 8%;
  height: 26%;
  transform: rotate(12deg);
  opacity: 0.72;
}

.bottle-machine__shine--wave {
  bottom: 18px;
  left: 50%;
  width: 68%;
  height: 20%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18));
  opacity: 0.64;
}

.bottle-machine__stars {
  position: absolute;
  inset: 24% 12% 14%;
}

.bottle-machine__star {
  position: absolute;
  display: inline-block;
  line-height: 1;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.94),
    0 0 18px rgba(255, 235, 163, 0.55),
    0 6px 12px rgba(255, 192, 111, 0.16);
  transform-origin: center;
}

.bottle-machine__star--1 {
  top: 6%;
  left: 14%;
  font-size: 0.94rem;
  color: #ff87ab;
}

.bottle-machine__star--2 {
  top: 8%;
  left: 44%;
  font-size: 0.56rem;
  color: #ffd966;
}

.bottle-machine__star--3 {
  top: 8%;
  right: 18%;
  font-size: 0.82rem;
  color: #81ccff;
}

.bottle-machine__star--4 {
  top: 22%;
  left: 16%;
  font-size: 0.72rem;
  color: #ffc364;
}

.bottle-machine__star--5 {
  top: 22%;
  left: 38%;
  font-size: 0.58rem;
  color: #ff94b3;
}

.bottle-machine__star--6 {
  top: 24%;
  right: 26%;
  font-size: 0.96rem;
  color: #ffd75b;
}

.bottle-machine__star--7 {
  top: 28%;
  right: 12%;
  font-size: 0.58rem;
  color: #96d4ff;
}

.bottle-machine__star--8 {
  top: 42%;
  left: 14%;
  font-size: 0.84rem;
  color: #ff83a8;
}

.bottle-machine__star--9 {
  top: 40%;
  left: 44%;
  font-size: 0.64rem;
  color: #ffd767;
}

.bottle-machine__star--10 {
  top: 44%;
  right: 18%;
  font-size: 0.84rem;
  color: #7cc9ff;
}

.bottle-machine__star--11 {
  top: 58%;
  left: 18%;
  font-size: 0.58rem;
  color: #ffc96f;
}

.bottle-machine__star--12 {
  top: 56%;
  left: 40%;
  font-size: 0.84rem;
  color: #ff92b2;
}

.bottle-machine__star--13 {
  top: 60%;
  right: 30%;
  font-size: 0.56rem;
  color: #9bd6ff;
}

.bottle-machine__star--14 {
  top: 66%;
  right: 16%;
  font-size: 0.8rem;
  color: #ffd35d;
}

.bottle-machine__star--15 {
  bottom: 12%;
  left: 24%;
  font-size: 0.88rem;
  color: #ff87ac;
}

.bottle-machine__star--16 {
  bottom: 18%;
  left: 48%;
  font-size: 0.58rem;
  color: #7cc9ff;
}

.bottle-machine__star--17 {
  bottom: 22%;
  right: 28%;
  font-size: 0.56rem;
  color: #ffd966;
}

.bottle-machine__star--18 {
  bottom: 14%;
  right: 12%;
  font-size: 0.92rem;
  color: #9bd6ff;
}

.bottle-machine__base {
  position: relative;
  width: 114px;
  height: 36px;
  margin: -8px auto 0;
}

.bottle-machine__base-ring {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 48% 48% / 60% 60% 40% 40%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 215, 236, 0.92) 42%, rgba(189, 157, 214, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.62),
    inset 0 -8px 10px rgba(141, 115, 173, 0.22),
    0 14px 20px rgba(157, 129, 194, 0.2);
}

.bottle-machine__base-shadow {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 92px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(130, 141, 177, 0.2), transparent 72%);
}

.paper-note {
  --note-start: rgba(255, 253, 247, 0.98);
  --note-end: rgba(255, 247, 235, 0.98);
  --note-pin-bg: rgba(255, 231, 193, 0.92);
  --note-pin-text: #8d5e1a;
  background: linear-gradient(180deg, var(--note-start), var(--note-end));
}

.paper-note__pin {
  background: var(--note-pin-bg);
  color: var(--note-pin-text);
}

@keyframes bottleRock {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  25% {
    transform: rotate(-1.8deg) translateY(1px);
  }
  50% {
    transform: rotate(1.4deg) translateY(-1px);
  }
  75% {
    transform: rotate(-1.1deg) translateY(1px);
  }
}

@keyframes bottleStarCloud {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(-2px, 3px, 8px);
  }
  50% {
    transform: translate3d(2px, -3px, -6px);
  }
  75% {
    transform: translate3d(-1px, 2px, 6px);
  }
}

@keyframes bottleStarJitter {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-10deg) scale(1.06);
  }
  50% {
    transform: rotate(8deg) scale(0.97);
  }
  75% {
    transform: rotate(-5deg) scale(1.04);
  }
}

/* Reference-style drifting bottle override */
.bottle-machine {
  min-height: 186px;
  filter: none;
}

.bottle-machine__glow {
  top: 18px;
  width: 188px;
  height: 126px;
  background:
    radial-gradient(circle at 30% 40%, rgba(173, 222, 255, 0.18), transparent 40%),
    radial-gradient(circle at 68% 60%, rgba(255, 217, 175, 0.16), transparent 38%),
    radial-gradient(circle, rgba(255, 238, 205, 0.22), transparent 68%);
  filter: blur(14px);
}

.bottle-machine__scene {
  position: relative;
  width: 214px;
  height: 126px;
  margin: 12px auto 0;
  transform: rotate(18deg);
  transform-origin: center;
}

.bottle-machine.is-holding .bottle-machine__scene {
  animation: bottleRefRock 0.95s ease-in-out infinite;
}

.bottle-machine.is-holding .bottle-machine__jar,
.bottle-machine.is-holding .bottle-machine__neck,
.bottle-machine.is-holding .bottle-machine__cork,
.bottle-machine.is-holding .bottle-machine__stars,
.bottle-machine.is-holding .bottle-machine__star {
  animation: none;
}

.bottle-machine__shadow {
  position: absolute;
  left: 26px;
  right: 16px;
  bottom: 4px;
  height: 28px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(187, 219, 255, 0.38), rgba(255, 213, 205, 0.34)),
    radial-gradient(circle, rgba(255, 242, 187, 0.14), transparent 70%);
  filter: blur(10px);
  opacity: 0.8;
}

.bottle-machine__cork {
  top: 28px;
  left: 10px;
  width: 34px;
  height: 24px;
  transform: none;
  border-radius: 9px 10px 8px 9px;
  background:
    linear-gradient(180deg, rgba(228, 184, 128, 0.98), rgba(179, 118, 80, 0.96)),
    linear-gradient(90deg, rgba(255, 235, 206, 0.18), transparent);
  box-shadow:
    inset 0 2px 4px rgba(255, 231, 197, 0.3),
    0 6px 10px rgba(123, 83, 58, 0.16);
}

.bottle-machine__neck {
  position: absolute;
  top: 30px;
  left: 28px;
  width: 42px;
  height: 22px;
  margin: 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(251, 253, 255, 0.78), rgba(217, 236, 255, 0.26)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 6px 12px rgba(163, 145, 196, 0.12);
}

.bottle-machine__neck::before {
  inset: 4px 8px auto;
  height: 7px;
}

.bottle-machine__jar {
  width: 162px;
  height: 96px;
  margin: 0;
  position: absolute;
  left: 48px;
  top: 18px;
  border-radius: 24px 28px 30px 24px / 22px 22px 24px 24px;
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.96), transparent 12%),
    radial-gradient(circle at 74% 22%, rgba(202, 236, 255, 0.26), transparent 20%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.84), rgba(228, 240, 255, 0.22) 40%, rgba(241, 226, 255, 0.18) 62%, rgba(255, 225, 198, 0.34));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.76),
    inset 0 14px 18px rgba(255, 255, 255, 0.12),
    inset 0 -12px 18px rgba(180, 221, 255, 0.06);
}

.bottle-machine__jar::before {
  border-width: 1px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 12%, transparent 84%, rgba(255, 255, 255, 0.12));
}

.bottle-machine__jar::after {
  left: auto;
  right: -6px;
  bottom: 10px;
  width: 28px;
  height: 70px;
  border-radius: 50%;
  background:
    radial-gradient(circle at left center, rgba(255, 255, 255, 0.8), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 80%);
  transform: rotate(-6deg);
}

.bottle-machine__mouth-ring {
  position: absolute;
  left: 42px;
  top: 25px;
  width: 16px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-left-width: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(216, 233, 255, 0.26),
    0 0 10px rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle, rgba(226, 238, 255, 0.16), transparent 72%);
}

.bottle-machine__shine--left {
  top: 10px;
  left: 20px;
  width: 10%;
  height: 46%;
  opacity: 0.9;
}

.bottle-machine__shine--right {
  top: 18px;
  right: 12px;
  width: 7%;
  height: 28%;
}

.bottle-machine__shine--wave {
  bottom: 10px;
  left: 54%;
  width: 58%;
  height: 16%;
  opacity: 0.56;
}

.bottle-machine__stars {
  inset: 18% 9% 14% 14%;
}

.bottle-machine__star {
  width: 19px;
  height: 19px;
  font-size: 0;
  text-shadow: none;
  clip-path: polygon(50% 0%, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0% 50%, 39% 35%);
  box-shadow:
    inset 2px 2px 3px rgba(255, 255, 255, 0.55),
    inset -2px -3px 4px rgba(0, 0, 0, 0.06),
    0 0 8px rgba(255, 255, 255, 0.3);
}

.bottle-machine__star::before {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.46), transparent 58%);
}

.bottle-machine__star--1,
.bottle-machine__star--8,
.bottle-machine__star--15 {
  background: #ffcfda;
}

.bottle-machine__star--2,
.bottle-machine__star--10,
.bottle-machine__star--17 {
  background: #ffe58e;
}

.bottle-machine__star--3,
.bottle-machine__star--9,
.bottle-machine__star--16 {
  background: #a8ddff;
}

.bottle-machine__star--4,
.bottle-machine__star--11 {
  background: #d6f0ba;
}

.bottle-machine__star--5,
.bottle-machine__star--12,
.bottle-machine__star--18 {
  background: #d9c7ff;
}

.bottle-machine__star--6,
.bottle-machine__star--13 {
  background: #ffd0b1;
}

.bottle-machine__star--7,
.bottle-machine__star--14 {
  background: #ffc0c8;
}

.bottle-machine__star--1 {
  top: 6%;
  left: 12%;
}

.bottle-machine__star--2 {
  top: 10%;
  left: 28%;
  width: 17px;
  height: 17px;
}

.bottle-machine__star--3 {
  top: 6%;
  left: 44%;
}

.bottle-machine__star--4 {
  top: 12%;
  right: 28%;
}

.bottle-machine__star--5 {
  top: 8%;
  right: 12%;
}

.bottle-machine__star--6 {
  top: 34%;
  left: 10%;
}

.bottle-machine__star--7 {
  top: 28%;
  left: 26%;
}

.bottle-machine__star--8 {
  top: 32%;
  left: 42%;
}

.bottle-machine__star--9 {
  top: 26%;
  right: 26%;
}

.bottle-machine__star--10 {
  top: 30%;
  right: 10%;
}

.bottle-machine__star--11 {
  bottom: 26%;
  left: 12%;
}

.bottle-machine__star--12 {
  bottom: 22%;
  left: 30%;
}

.bottle-machine__star--13 {
  bottom: 18%;
  left: 46%;
}

.bottle-machine__star--14 {
  bottom: 24%;
  right: 26%;
}

.bottle-machine__star--15 {
  bottom: 18%;
  right: 10%;
}

.bottle-machine__star--16 {
  bottom: 6%;
  left: 20%;
}

.bottle-machine__star--17 {
  bottom: 8%;
  left: 40%;
}

.bottle-machine__star--18 {
  bottom: 8%;
  right: 18%;
}

.bottle-machine__base,
.bottle-machine__base-ring,
.bottle-machine__base-shadow {
  display: none;
}

@keyframes bottleRefRock {
  0%,
  100% {
    transform: rotate(18deg) translateY(0);
  }
  25% {
    transform: rotate(15.8deg) translateY(1px);
  }
  50% {
    transform: rotate(20deg) translateY(-1px);
  }
  75% {
    transform: rotate(16.6deg) translateY(1px);
  }
}

@media (max-width: 360px) {
  .app-dock {
    grid-template-columns: 42px 1fr auto;
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .app-dock__icon {
    width: 42px;
  }

  .app-dock__button {
    padding-left: 12px;
    padding-right: 12px;
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Final watercolor drifting-bottle illustration */
body.gacha-page {
  background:
    radial-gradient(circle at 16% 22%, rgba(210, 229, 250, 0.82), transparent 26%),
    radial-gradient(circle at 82% 24%, rgba(251, 241, 208, 0.66), transparent 22%),
    radial-gradient(circle at 24% 78%, rgba(247, 221, 232, 0.7), transparent 24%),
    radial-gradient(circle at 78% 78%, rgba(235, 228, 250, 0.56), transparent 20%),
    linear-gradient(180deg, #f7fbff 0%, #fffdf9 54%, #fef9fb 100%);
}

body.gacha-page::before {
  opacity: 0.7;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.5px),
    radial-gradient(circle at 76% 18%, rgba(255, 252, 240, 0.82) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 39%, rgba(255, 255, 255, 0.88) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 35% 70%, rgba(255, 252, 240, 0.88) 0 1px, transparent 1.5px);
}

.machine-card--page {
  background: rgba(255, 250, 248, 0.72);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 34px rgba(172, 135, 163, 0.1);
}

.section-heading--gacha .eyebrow {
  color: #a48ca7;
}

.machine-stage {
  gap: 6px;
}

.bottle-machine {
  position: relative;
  width: min(100%, 248px);
  min-height: 216px;
  isolation: isolate;
  filter: drop-shadow(0 12px 18px rgba(179, 160, 205, 0.1));
}

.bottle-machine__svg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.bottle-machine__backdrop {
  opacity: 0.95;
}

.bottle-machine__backdrop path,
.bottle-machine__backdrop rect,
.bottle-machine__glass path,
.bottle-machine__glass ellipse,
.bottle-machine__shadow,
.bottle-machine__cork-wrap rect,
.bottle-machine__cork-wrap path,
.bottle-machine__cork-wrap ellipse,
.bottle-machine__cork-wrap circle {
  vector-effect: non-scaling-stroke;
}

.bottle-machine__float {
  transform-origin: 50% 56%;
}

.bottle-machine__bottle {
  filter: drop-shadow(0 8px 12px rgba(175, 166, 211, 0.16));
  transform-origin: 50% 56%;
  animation: illustrationBottleFloat 6.4s ease-in-out infinite;
}

.bottle-machine.is-holding .bottle-machine__bottle {
  animation: illustrationBottleHold 1.7s ease-in-out infinite;
}

.bottle-machine__glass {
  opacity: 0.98;
}

.bottle-machine__glass path:nth-of-type(1) {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.bottle-machine__glass path:nth-of-type(2) {
  opacity: 0.88;
}

.bottle-machine__glass path:nth-of-type(3) {
  opacity: 0.76;
}

.bottle-machine__glass path:nth-of-type(4) {
  opacity: 0.58;
}

.bottle-machine__glass ellipse {
  opacity: 0.58;
}

.bottle-machine__highlight {
  mix-blend-mode: screen;
  opacity: 0.92;
}

.bottle-machine__highlight--small {
  opacity: 0.68;
}

.bottle-machine__cork-wrap {
  opacity: 0.98;
  filter: drop-shadow(0 3px 4px rgba(186, 155, 125, 0.12));
}

.bottle-machine__cork-wrap rect {
  stroke: rgba(167, 118, 88, 0.18);
  stroke-width: 0.9;
}

.bottle-machine__stars {
  animation: packedStarsFloat 6s ease-in-out infinite;
  transform-origin: 50% 62%;
}

.bottle-machine.is-holding .bottle-machine__stars {
  animation: packedStarsHold 1.7s ease-in-out infinite;
}

.origami-star use {
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 1px 1px rgba(137, 130, 179, 0.12));
  animation: origamiBreath 6.2s ease-in-out infinite;
  opacity: 0.98;
}

.origami-star--1 use,
.origami-star--6 use,
.origami-star--11 use,
.origami-star--16 use,
.origami-star--21 use {
  animation-duration: 5.6s;
  animation-delay: -1.2s;
}

.origami-star--2 use,
.origami-star--7 use,
.origami-star--12 use,
.origami-star--17 use,
.origami-star--22 use {
  animation-duration: 6.9s;
  animation-delay: -2.1s;
}

.origami-star--3 use,
.origami-star--8 use,
.origami-star--13 use,
.origami-star--18 use,
.origami-star--23 use {
  animation-duration: 6.4s;
  animation-delay: -3s;
}

.origami-star--4 use,
.origami-star--9 use,
.origami-star--14 use,
.origami-star--19 use {
  animation-duration: 7.2s;
  animation-delay: -1.7s;
}

.origami-star--5 use,
.origami-star--10 use,
.origami-star--15 use,
.origami-star--20 use {
  animation-duration: 5.9s;
  animation-delay: -2.7s;
}

.bottle-machine.is-holding .origami-star use {
  animation-name: origamiHold;
  animation-duration: 1.45s;
}

.bottle-machine__shadow {
  fill: rgba(192, 188, 233, 0.42);
  filter: blur(6px);
  opacity: 0.8;
  animation: watercolorShadow 6.4s ease-in-out infinite;
}

.bottle-machine.is-holding .bottle-machine__shadow {
  animation: watercolorShadowHold 1.7s ease-in-out infinite;
}

.bottle-machine__dust {
  position: absolute;
  z-index: 1;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 248, 228, 0.84);
  box-shadow: 0 0 6px rgba(255, 248, 233, 0.42);
  filter: blur(0.15px);
  animation: dustSpeckFloat 8.5s ease-in-out infinite;
}

.bottle-machine__dust--1 {
  top: 28px;
  left: 22px;
}

.bottle-machine__dust--2 {
  top: 52px;
  right: 28px;
  width: 3px;
  height: 3px;
  animation-delay: 1.3s;
}

.bottle-machine__dust--3 {
  bottom: 54px;
  left: 28px;
  width: 3px;
  height: 3px;
  animation-delay: 2.4s;
}

.bottle-machine__dust--4 {
  bottom: 80px;
  right: 40px;
  width: 4px;
  height: 4px;
  animation-delay: 3.6s;
}

@keyframes illustrationBottleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes illustrationBottleHold {
  0%,
  100% {
    transform: translateY(-1px) rotate(0.65deg);
  }
  25% {
    transform: translateY(-2px) rotate(-0.85deg);
  }
  50% {
    transform: translateY(-2px) rotate(0.8deg);
  }
  75% {
    transform: translateY(-1px) rotate(-0.72deg);
  }
}

@keyframes packedStarsFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(0, -1px);
  }
}

@keyframes packedStarsHold {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-1px, -1px) rotate(-0.55deg);
  }
  50% {
    transform: translate(1px, 0) rotate(0.5deg);
  }
  75% {
    transform: translate(-1px, 1px) rotate(-0.4deg);
  }
}

@keyframes origamiBreath {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(0, -0.8px) rotate(1deg) scale(1.018);
  }
}

@keyframes origamiHold {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(-0.8px, -0.8px) rotate(-2deg) scale(1.02);
  }
  50% {
    transform: translate(0.8px, -0.6px) rotate(1.8deg) scale(1.02);
  }
  75% {
    transform: translate(-0.6px, 0.5px) rotate(-1.4deg) scale(1.01);
  }
}

@keyframes watercolorShadow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.86;
  }
}

@keyframes watercolorShadowHold {
  0%,
  100% {
    transform: scale(1.02);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes dustSpeckFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.24;
  }
  50% {
    transform: translateY(-5px);
    opacity: 0.62;
  }
}

@media (max-height: 740px) {
  .bottle-machine {
    width: min(100%, 226px);
    min-height: 198px;
  }

  .bottle-machine__svg {
    transform: scale(0.93);
    transform-origin: top center;
  }
}

/* Near-1:1 bottle replica override */
body.gacha-page {
  background:
    linear-gradient(rgba(223, 235, 247, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 235, 247, 0.42) 1px, transparent 1px),
    radial-gradient(circle at 18% 22%, rgba(223, 236, 249, 0.82), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(248, 241, 214, 0.68), transparent 20%),
    radial-gradient(circle at 24% 78%, rgba(246, 223, 231, 0.66), transparent 22%),
    linear-gradient(180deg, #f7fbff 0%, #fffdfc 58%, #fcfafd 100%);
  background-size: 24px 24px, 24px 24px, auto, auto, auto, auto;
  background-position: 0 0, 0 0, center, center, center, center;
}

body.gacha-page::before {
  opacity: 0.54;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.94) 0 1px, transparent 1.5px),
    radial-gradient(circle at 74% 18%, rgba(255, 248, 232, 0.82) 0 1px, transparent 1.5px),
    radial-gradient(circle at 81% 37%, rgba(255, 255, 255, 0.88) 0 1px, transparent 1.5px),
    radial-gradient(circle at 34% 70%, rgba(255, 251, 238, 0.88) 0 1px, transparent 1.5px);
}

.machine-card--page {
  background: rgba(255, 252, 250, 0.64);
  box-shadow: 0 18px 34px rgba(173, 156, 197, 0.1);
}

.machine-stage {
  gap: 8px;
}

.bottle-machine {
  width: min(100%, 222px);
  min-height: 292px;
  filter: none;
}

.bottle-machine__svg {
  width: 100%;
  overflow: visible;
}

.bottle-machine__float {
  transform-origin: 50% 58%;
}

.bottle-machine__bottle {
  transform-origin: 50% 58%;
  animation: bottleReplicaFloat 7.2s ease-in-out infinite;
  filter: drop-shadow(0 10px 12px rgba(172, 165, 210, 0.12));
}

.bottle-machine.is-holding .bottle-machine__bottle {
  animation: bottleReplicaHold 1.55s ease-in-out infinite;
}

.bottle-machine__glass {
  opacity: 0.96;
}

.bottle-machine__rim-outline,
.bottle-machine__outline-soft {
  vector-effect: non-scaling-stroke;
}

.bottle-machine__highlight {
  mix-blend-mode: screen;
  opacity: 0.95;
}

.bottle-machine__highlight--small {
  opacity: 0.7;
}

.bottle-machine__highlight--large {
  opacity: 0.66;
}

.bottle-machine__highlight--tiny {
  opacity: 0.52;
}

.bottle-machine__iridescence {
  opacity: 0.68;
}

.bottle-machine__glass-front {
  pointer-events: none;
}

.bottle-machine__glass-front > path {
  vector-effect: non-scaling-stroke;
}

.bottle-machine__front-highlight {
  mix-blend-mode: screen;
}

.bottle-machine__front-highlight--soft {
  opacity: 0.78;
}

.bottle-machine__cork-wrap {
  filter: drop-shadow(0 4px 4px rgba(183, 152, 124, 0.1));
}

.bottle-machine__stars {
  transform-origin: 50% 68%;
  animation: starPileIdle 7.2s ease-in-out infinite;
  opacity: 1;
}

.bottle-machine__stars-pile {
  transform-box: fill-box;
  transform-origin: center;
}

.bottle-machine.is-holding .bottle-machine__stars {
  animation: starPileHold 1.55s ease-in-out infinite;
}

.origami-star {
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 1.2px 1px rgba(157, 149, 188, 0.18));
  animation-fill-mode: both;
}

.origami-star__body {
  stroke: rgba(144, 136, 172, 0.16);
  stroke-width: 0.95;
  stroke-linejoin: round;
}

.origami-star__facet--top {
  fill: rgba(255, 255, 255, 0.48);
}

.origami-star__facet--right {
  fill: rgba(118, 116, 151, 0.08);
}

.origami-star__crease {
  fill: none;
  stroke: rgba(162, 152, 181, 0.14);
  stroke-width: 0.8;
  stroke-linecap: round;
}

.origami-star--1,
.origami-star--8,
.origami-star--12,
.origami-star--17,
.origami-star--23,
.origami-star--27,
.origami-star--31,
.origami-star--35,
.origami-star--39 {
  color: #f3bac9;
}

.origami-star--3,
.origami-star--10,
.origami-star--14 {
  color: #f7cedb;
}

.origami-star--2,
.origami-star--4,
.origami-star--7,
.origami-star--9,
.origami-star--15,
.origami-star--24,
.origami-star--28,
.origami-star--32,
.origami-star--37,
.origami-star--40 {
  color: #f5df95;
}

.origami-star--5,
.origami-star--13,
.origami-star--19,
.origami-star--22,
.origami-star--29,
.origami-star--30,
.origami-star--33,
.origami-star--38 {
  color: #a9d8ee;
}

.origami-star--6,
.origami-star--16,
.origami-star--21,
.origami-star--26,
.origami-star--34 {
  color: #c9b8ea;
}

.origami-star--11,
.origami-star--18 {
  color: #c4e6da;
}

.origami-star--20,
.origami-star--25,
.origami-star--36 {
  color: #f2cab5;
}

.origami-star--2,
.origami-star--6,
.origami-star--11,
.origami-star--18,
.origami-star--24,
.origami-star--29,
.origami-star--34,
.origami-star--38 {
  opacity: 0.76;
  filter: blur(0.16px) drop-shadow(0 1px 0.9px rgba(157, 149, 188, 0.12));
}

.origami-star--5,
.origami-star--13,
.origami-star--20,
.origami-star--27,
.origami-star--33,
.origami-star--40 {
  opacity: 0.9;
}

.origami-star--1,
.origami-star--6,
.origami-star--11,
.origami-star--16,
.origami-star--21,
.origami-star--26,
.origami-star--31,
.origami-star--36 {
  animation: starTiltA 7s ease-in-out infinite;
}

.origami-star--2,
.origami-star--7,
.origami-star--12,
.origami-star--17,
.origami-star--22,
.origami-star--27,
.origami-star--32,
.origami-star--37 {
  animation: starTiltB 8s ease-in-out infinite;
}

.origami-star--3,
.origami-star--8,
.origami-star--13,
.origami-star--18,
.origami-star--23,
.origami-star--28,
.origami-star--33,
.origami-star--38 {
  animation: starTiltC 7.6s ease-in-out infinite;
}

.origami-star--4,
.origami-star--9,
.origami-star--14,
.origami-star--19,
.origami-star--24,
.origami-star--29,
.origami-star--34,
.origami-star--39 {
  animation: starTiltD 8.4s ease-in-out infinite;
}

.origami-star--5,
.origami-star--10,
.origami-star--15,
.origami-star--20,
.origami-star--25,
.origami-star--30,
.origami-star--35,
.origami-star--40 {
  animation: starTiltE 7.8s ease-in-out infinite;
}

.origami-star--1,
.origami-star--9,
.origami-star--16,
.origami-star--25,
.origami-star--33 {
  animation-delay: -1.2s;
}

.origami-star--4,
.origami-star--12,
.origami-star--21,
.origami-star--28,
.origami-star--37 {
  animation-delay: -2.1s;
}

.origami-star--6,
.origami-star--14,
.origami-star--24,
.origami-star--31,
.origami-star--39 {
  animation-delay: -3.2s;
}

.bottle-machine.is-holding .origami-star {
  animation-name: starHoldTilt !important;
  animation-duration: 1.35s !important;
  animation-timing-function: ease-in-out !important;
  animation-iteration-count: infinite !important;
}

.bottle-machine__shadow {
  animation: bottleShadowFloat 7.2s ease-in-out infinite;
  opacity: 0.86;
}

.bottle-machine__shadow--warm {
  opacity: 0.74;
}

.bottle-machine.is-holding .bottle-machine__shadow {
  animation: bottleShadowHold 1.55s ease-in-out infinite;
}

.bottle-machine.is-holding .bottle-machine__shadow--warm {
  animation: bottleShadowHoldWarm 1.55s ease-in-out infinite;
}

.bottle-machine__dust {
  width: 3px;
  height: 3px;
  background: rgba(255, 248, 228, 0.84);
  box-shadow: 0 0 6px rgba(255, 248, 233, 0.34);
  animation: bottleDustFloat 8s ease-in-out infinite;
}

.bottle-machine__dust--1 {
  top: 52px;
  left: 30px;
}

.bottle-machine__dust--2 {
  top: 90px;
  right: 22px;
}

.bottle-machine__dust--3 {
  bottom: 62px;
  left: 18px;
}

.bottle-machine__dust--4 {
  bottom: 88px;
  right: 34px;
}

.bottle-machine__sparkle {
  position: absolute;
  z-index: 1;
  width: 14px;
  height: 14px;
  opacity: 0.72;
  pointer-events: none;
  animation: bottleSparkleTwinkle 5.6s ease-in-out infinite;
}

.bottle-machine__sparkle::before,
.bottle-machine__sparkle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 231, 255, 0.3));
  transform: translate(-50%, -50%);
}

.bottle-machine__sparkle::before {
  width: 2px;
  height: 100%;
}

.bottle-machine__sparkle::after {
  width: 100%;
  height: 2px;
}

.bottle-machine__sparkle--1 {
  top: 44px;
  left: 26px;
  animation-delay: -0.8s;
}

.bottle-machine__sparkle--2 {
  top: 96px;
  right: 18px;
  width: 12px;
  height: 12px;
  animation-delay: -2.3s;
}

.bottle-machine__sparkle--3 {
  bottom: 74px;
  left: 32px;
  width: 10px;
  height: 10px;
  animation-delay: -3.4s;
}

@keyframes bottleReplicaFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes bottleReplicaHold {
  0%,
  100% {
    transform: translateY(-1px) rotate(0.38deg);
  }
  18% {
    transform: translateY(-2px) rotate(-0.42deg);
  }
  42% {
    transform: translateY(-1px) rotate(0.6deg);
  }
  66% {
    transform: translateY(-2px) rotate(-0.52deg);
  }
  84% {
    transform: translateY(-1px) rotate(0.28deg);
  }
}

@keyframes starPileIdle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.6px);
  }
}

@keyframes starPileHold {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(-0.8px, -0.5px) rotate(-0.34deg);
  }
  45% {
    transform: translate(0.75px, -0.18px) rotate(0.3deg);
  }
  70% {
    transform: translate(-0.55px, 0.36px) rotate(-0.24deg);
  }
  86% {
    transform: translate(0.24px, 0.12px) rotate(0.1deg);
  }
}

@keyframes starTiltA {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  50% {
    translate: 0 -0.55px;
    rotate: 0.9deg;
  }
}

@keyframes starTiltB {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  50% {
    translate: 0 -0.48px;
    rotate: -0.7deg;
  }
}

@keyframes starTiltC {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  50% {
    translate: 0 -0.58px;
    rotate: 0.62deg;
  }
}

@keyframes starTiltD {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  50% {
    translate: 0 -0.42px;
    rotate: -0.56deg;
  }
}

@keyframes starTiltE {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  50% {
    translate: 0 -0.52px;
    rotate: 0.66deg;
  }
}

@keyframes starHoldTilt {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  22% {
    translate: -0.42px -0.36px;
    rotate: -0.86deg;
  }
  47% {
    translate: 0.48px -0.22px;
    rotate: 0.82deg;
  }
  71% {
    translate: -0.36px 0.28px;
    rotate: -0.62deg;
  }
  88% {
    translate: 0.14px 0.08px;
    rotate: 0.18deg;
  }
}

@keyframes bottleSparkleTwinkle {
  0%,
  100% {
    opacity: 0.34;
    scale: 0.82;
  }
  45% {
    opacity: 0.82;
    scale: 1;
  }
  70% {
    opacity: 0.48;
    scale: 0.9;
  }
}

@keyframes bottleShadowFloat {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.9;
  }
}

@keyframes bottleShadowHold {
  0%,
  100% {
    transform: scale(1.02);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes bottleShadowHoldWarm {
  0%,
  100% {
    transform: translateX(0) scale(1.01);
    opacity: 0.7;
  }
  50% {
    transform: translateX(2px) scale(1.05);
    opacity: 0.82;
  }
}

@keyframes bottleDustFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.24;
  }
  50% {
    transform: translateY(-4px);
    opacity: 0.58;
  }
}

@media (max-height: 740px) {
  .page-shell {
    padding:
      max(8px, env(safe-area-inset-top))
      10px
      8px;
  }

  .hero-card--landing,
  .machine-card--page {
    padding: 9px 9px 7px;
  }

  .hero-card__image {
    width: min(17vw, 74px);
  }

  .hero-copy h1,
  .page-title {
    font-size: clamp(1.16rem, 4vw, 1.48rem);
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 0.62rem;
  }

  .ritual-list {
    gap: 2px;
    padding: 7px 8px;
  }

  .ritual-item {
    gap: 7px;
  }

  .ritual-item p {
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .primary-link {
    min-height: 38px;
  }

  .section-heading__row {
    grid-template-columns: 1fr 48px;
  }

  .section-heading__otter {
    width: 46px;
  }

  .machine-stage {
    gap: 6px;
  }

  .bottle-machine {
    width: min(100%, 198px);
    min-height: 252px;
  }

  .hold-button {
    min-height: 37px;
    width: min(62vw, 214px);
  }

  .hold-button__label {
    font-size: 0.8rem;
  }

  .hold-hint {
    width: min(72vw, 232px);
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .paper-note {
    padding: 8px 9px 7px;
  }

  .paper-note__pin {
    padding: 3px 7px;
  }

  .paper-note__topic {
    font-size: 0.82rem;
    line-height: 1.24;
  }

  .app-dock {
    min-height: 56px;
    padding: 6px 8px;
    gap: 6px;
  }

  .app-dock__icon {
    width: 36px;
  }

  .app-dock__copy strong {
    font-size: 0.72rem;
  }

  .app-dock__copy span {
    font-size: 0.6rem;
  }

  .app-dock__button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.68rem;
  }
}

@media (max-height: 680px) {
  .page-shell {
    padding:
      max(6px, env(safe-area-inset-top))
      9px
      6px;
  }

  .hero-card__image {
    width: min(15vw, 64px);
  }

  .hero-copy h1,
  .page-title {
    font-size: clamp(1.08rem, 3.8vw, 1.34rem);
  }

  .ritual-item p {
    font-size: 0.74rem;
  }

  .section-heading__row {
    grid-template-columns: 1fr 42px;
  }

  .section-heading__otter {
    width: 40px;
  }

  .bottle-machine {
    width: min(100%, 182px);
    min-height: 226px;
  }

  .hold-button {
    min-height: 35px;
  }

  .hold-button__label {
    font-size: 0.76rem;
  }

  .hold-hint {
    font-size: 0.68rem;
  }

  .paper-note__topic {
    font-size: 0.76rem;
  }
}

/* Final mobile-first layout tightening */
:root {
  --page-width: 430px;
  --dock-height: 84px;
}

.page-shell {
  width: min(100%, var(--page-width));
  height: auto;
  min-height: calc(100svh - var(--dock-height) - 14px - env(safe-area-inset-bottom));
  padding:
    max(8px, env(safe-area-inset-top))
    10px
    8px;
}

.page-shell--landing,
.page-shell--gacha {
  align-content: center;
  justify-items: center;
}

.hero-card--landing,
.machine-card--page {
  width: 100%;
  height: auto;
  min-height: calc(100svh - var(--dock-height) - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  align-content: center;
}

.hero-stack,
.machine-stack {
  display: grid;
  flex: 1;
  min-height: 0;
}

.hero-card--landing {
  display: flex;
  flex-direction: column;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 14px;
  padding: 20px 18px 16px;
}

.hero-stack {
  gap: 14px;
  align-content: center;
}

.machine-card--page {
  display: flex;
  flex-direction: column;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 18px 16px 14px;
  align-content: stretch;
}

.machine-stack {
  gap: 10px;
  align-content: stretch;
}

.hero-card__image {
  width: min(30vw, 124px);
}

.section-heading__row {
  grid-template-columns: 1fr 74px;
  gap: 10px;
}

.section-heading__otter {
  width: 76px;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.hero-copy h1,
.page-title {
  font-size: clamp(1.84rem, 6vw, 2.22rem);
  line-height: 1.06;
}

.ritual-list {
  gap: 6px;
  padding: 12px 14px;
  align-content: center;
}

.ritual-index {
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
}

.ritual-item p,
.hold-hint,
.paper-note__hint {
  font-size: 1.06rem;
  line-height: 1.36;
}

.primary-link {
  min-height: 50px;
  font-size: 1.08rem;
}

.machine-stage {
  width: 100%;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  align-content: center;
  justify-items: center;
}

.bottle-machine {
  width: min(100%, 246px);
  min-height: 322px;
  align-self: end;
}

.hold-button {
  width: min(78vw, 286px);
  min-height: 48px;
  padding: 0 24px;
}

.hold-button__label {
  font-size: 1.06rem;
}

.hold-hint {
  width: min(84vw, 316px);
  font-size: 0.96rem;
}

.paper-note {
  width: min(100%, 332px);
  min-height: 118px;
  padding: 14px 14px 12px;
  justify-self: stretch;
}

.paper-note[hidden] {
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.paper-note__pin {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.paper-note__topic {
  font-size: 1.12rem;
  line-height: 1.38;
}

.app-dock {
  left: 10px;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  grid-template-columns: 50px 1fr auto;
  gap: 11px;
  min-height: 82px;
  padding: 11px 13px;
  border-radius: 22px;
  background: rgba(255, 249, 243, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    0 18px 34px rgba(171, 111, 122, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.app-dock__icon {
  width: 54px;
  border-radius: 14px;
}

.app-dock__copy strong {
  font-size: 0.98rem;
}

.app-dock__copy span {
  font-size: 0.8rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.app-dock__button {
  min-height: 42px;
  padding: 0 17px;
  font-size: 0.88rem;
}

@media (max-height: 760px) {
  .page-shell {
    padding:
      max(8px, env(safe-area-inset-top))
      10px
      8px;
  }

  .hero-card--landing,
  .machine-card--page {
    padding: 14px 12px 10px;
  }

  .hero-stack,
  .machine-stack {
    gap: 10px;
  }

  .hero-card__image {
    width: min(23vw, 86px);
  }

  .hero-copy h1,
  .page-title {
    font-size: clamp(1.54rem, 5.2vw, 1.9rem);
  }

  .ritual-item p,
  .hold-hint,
  .paper-note__hint {
    font-size: 0.94rem;
  }

  .section-heading__row {
    grid-template-columns: 1fr 56px;
  }

  .section-heading__otter {
    width: 54px;
  }

  .bottle-machine {
    width: min(100%, 218px);
    min-height: 278px;
  }

  .hold-button {
    min-height: 40px;
    width: min(70vw, 230px);
  }

  .hold-button__label {
    font-size: 0.96rem;
  }

  .hold-hint {
    width: min(76vw, 252px);
    font-size: 0.86rem;
  }

  .paper-note__topic {
    font-size: 0.96rem;
  }

  .paper-note {
    min-height: 104px;
  }

  .app-dock {
    grid-template-columns: 42px 1fr auto;
    min-height: 62px;
    padding: 7px 9px;
    gap: 8px;
  }

  .app-dock__icon {
    width: 42px;
  }

  .app-dock__copy strong {
    font-size: 0.84rem;
  }

  .app-dock__copy span {
    font-size: 0.7rem;
  }

  .app-dock__button {
    min-height: 34px;
    font-size: 0.76rem;
  }
}

@media (max-height: 680px) {
  .page-shell {
    padding:
      max(6px, env(safe-area-inset-top))
      9px
      6px;
  }

  .hero-card--landing,
  .machine-card--page {
    padding: 12px 10px 8px;
    gap: 8px;
  }

  .hero-stack,
  .machine-stack {
    gap: 8px;
  }

  .hero-card__image {
    width: min(18vw, 68px);
  }

  .hero-copy h1,
  .page-title {
    font-size: clamp(1.3rem, 4.3vw, 1.58rem);
  }

  .eyebrow {
    font-size: 0.62rem;
    margin-bottom: 4px;
  }

  .ritual-list {
    gap: 2px;
    padding: 7px 8px;
  }

  .ritual-item p,
  .hold-hint,
  .paper-note__hint {
    font-size: 0.82rem;
    line-height: 1.22;
  }

  .section-heading__row {
    grid-template-columns: 1fr 42px;
    gap: 6px;
  }

  .section-heading__otter {
    width: 40px;
  }

  .machine-stage {
    gap: 6px;
  }

  .bottle-machine {
    width: min(100%, 188px);
    min-height: 232px;
  }

  .hold-button {
    min-height: 35px;
    width: min(68vw, 206px);
  }

  .hold-button__label {
    font-size: 0.84rem;
  }

  .hold-hint {
    width: min(70vw, 212px);
    font-size: 0.76rem;
  }

  .paper-note {
    min-height: 92px;
    padding: 8px 9px 7px;
  }

  .paper-note__topic {
    font-size: 0.84rem;
    line-height: 1.2;
  }

  .app-dock {
    min-height: 56px;
    grid-template-columns: 36px 1fr auto;
    gap: 6px;
    padding: 6px 8px;
  }

  .app-dock__icon {
    width: 36px;
  }

  .app-dock__copy strong {
    font-size: 0.76rem;
  }

  .app-dock__copy span {
    font-size: 0.64rem;
  }

  .app-dock__button {
    min-height: 31px;
    padding: 0 10px;
    font-size: 0.7rem;
  }
}
