:root {
  color-scheme: light;
  --bg: #e7fbf8;
  --paper: #fff8ea;
  --ink: #17242a;
  --muted: #4e6d75;
  --line: rgba(23, 35, 31, 0.14);
  --green: #173941;
  --green-soft: #d6f4ef;
  --blue: #2e9fb0;
  --morandi-blue: #b9edf0;
  --morandi-blue-soft: #e4fbf8;
  --sea-ink: #285f6b;
  --clay: #ba7257;
  --honey: #d9a85f;
  --shadow: 0 24px 80px rgba(30, 50, 43, 0.16);
  --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --time-font: "Kaiti SC", "STKaiti", "Songti SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #c9fbf4;
  color: var(--ink);
  font-family:
    Avenir Next, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
textarea,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 18px 18px;
}

.screen {
  min-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

.home-screen {
  justify-content: flex-start;
  gap: 10px;
  overflow: hidden;
}

.home-screen.opened {
  gap: 12px;
}

.ocean-scene {
  position: fixed;
  inset: -2%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(213, 255, 249, 0.16), rgba(132, 241, 238, 0.18) 55%, rgba(255, 255, 255, 0.22)),
    url("../assets/ocean-loop.webp") center / cover no-repeat,
    url("../assets/twilight-shore.png") center / cover no-repeat;
  transform-origin: 50% 38%;
  filter: saturate(1.75) brightness(1.18) contrast(1.03) hue-rotate(12deg);
  animation:
    oceanPlateDrift 11s ease-in-out infinite,
    jellySea 9s ease-in-out infinite;
  will-change: transform;
}

.screen > :not(.ocean-scene) {
  position: relative;
  z-index: 1;
}

.soft-sea-screen {
  isolation: isolate;
  overflow: hidden;
  color: #162a31;
  background: #a9f6ef;
}

.soft-sea-screen::before {
  content: "";
  position: absolute;
  inset: -24% -38%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, 0.52), transparent 34%),
    radial-gradient(ellipse at 12% 76%, rgba(255, 255, 255, 0.3), transparent 34%),
    repeating-linear-gradient(
      170deg,
      transparent 0 34px,
      rgba(247, 255, 253, 0.3) 35px 37px,
      transparent 38px 76px
    );
  mix-blend-mode: screen;
  filter: blur(1.2px);
  opacity: 0.72;
  animation: waterlineFlow 12s ease-in-out infinite;
}

.night-ocean {
  animation:
    nightOceanPlateDrift 13s ease-in-out infinite,
    jellySea 9s ease-in-out infinite;
}

.night-ocean::before {
  opacity: 0.46;
}

.night-ocean::after {
  background:
    radial-gradient(ellipse at 44% 30%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(180deg, rgba(104, 224, 231, 0.18), rgba(113, 248, 241, 0.18) 46%, rgba(255, 255, 255, 0.26)),
    linear-gradient(0deg, rgba(255, 255, 255, 0.3), transparent 42%);
  animation:
    tideLight 9s ease-in-out infinite,
    shoreWaveWash 5.8s ease-in-out infinite;
}

.soft-sea-screen .sun-glow {
  opacity: 0.18;
  background: rgba(255, 255, 255, 0.28);
}

.soft-sea-screen .topbar,
.soft-sea-screen .hero,
.soft-sea-screen .stack,
.soft-sea-screen .footer-note {
  position: relative;
  z-index: 1;
}

.soft-sea-screen .icon-button {
  color: rgba(20, 52, 61, 0.92);
  background: rgba(247, 251, 250, 0.44);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 12px 28px rgba(9, 31, 38, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(10px);
}

.soft-sea-screen .box-button {
  background: rgba(247, 251, 250, 0.48);
}

.sea-title {
  max-width: 330px;
  color: rgba(12, 37, 45, 0.94);
  font-size: clamp(27px, 7.4vw, 34px);
  line-height: 1.16;
  text-shadow:
    0 1px 12px rgba(255, 255, 255, 0.52),
    0 14px 38px rgba(7, 29, 36, 0.12);
}

.page-art-title {
  font-family: var(--display-font);
  font-size: clamp(31px, 8.8vw, 42px);
  font-weight: 460;
  line-height: 1.12;
  color: rgba(10, 45, 55, 0.78);
  letter-spacing: 0;
  -webkit-text-stroke: 0.42px rgba(252, 255, 254, 0.58);
  paint-order: stroke fill;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.44),
    0 0 18px rgba(214, 255, 250, 0.38),
    0 16px 34px rgba(7, 29, 36, 0.1);
}

.sea-kicker {
  width: max-content;
  max-width: 88%;
  margin: 0 auto;
  padding: 4px 10px 5px;
  border-radius: 999px;
  color: rgba(28, 66, 74, 0.78);
  background: rgba(252, 255, 254, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 10px 28px rgba(7, 29, 36, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(5px);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: 0;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.56);
}

.lock-title,
.done-title,
.box-title {
  transform: translateY(0);
  animation: seaKickerFloat 5.8s ease-in-out infinite;
}

.lock-hero,
.done-hero {
  padding-top: 28px;
  margin-bottom: 10px;
}

.box-hero {
  margin-bottom: 10px;
}

.done-drift {
  position: relative;
  width: 124px;
  height: 92px;
  margin: 18px auto 6px;
  display: grid;
  place-items: center;
  opacity: 0.86;
  transform-origin: 50% 58%;
  animation: doneBottleFloat 6.6s ease-in-out infinite;
}

.done-drift .mini-bottle-svg {
  width: 78px;
  height: 78px;
  filter:
    drop-shadow(0 14px 22px rgba(9, 52, 62, 0.2))
    drop-shadow(0 0 18px rgba(255, 247, 214, 0.34));
}

.done-ripple {
  position: absolute;
  left: 50%;
  top: 66%;
  width: 74px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  filter: blur(0.3px);
  opacity: 0;
  animation: doneRipple 2.7s ease-out infinite;
}

.soft-sea-screen .eyebrow {
  color: rgba(239, 255, 253, 0.88);
  text-shadow: 0 1px 12px rgba(6, 44, 50, 0.24);
}

.soft-lead {
  max-width: 320px;
  padding: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  line-height: 1.8;
}

.line-highlight-row {
  display: block;
}

.line-highlight-row + .line-highlight-row {
  margin-top: 5px;
}

.line-highlight {
  display: inline;
  color: rgba(12, 43, 50, 0.9);
  background: rgba(251, 255, 254, 0.58);
  border-radius: 9px;
  padding: 0.06em 0.36em 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow:
    0 7px 18px rgba(8, 29, 36, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.34);
}

.ocean-scene::before {
  content: "";
  position: absolute;
  inset: -10% -40% 22%;
  background:
    radial-gradient(ellipse at 24% 26%, rgba(255, 255, 255, 0.36), transparent 22%),
    radial-gradient(ellipse at 72% 62%, rgba(255, 255, 255, 0.26), transparent 24%),
    repeating-linear-gradient(
      128deg,
      rgba(255, 255, 255, 0.14) 0 1px,
      transparent 6px 74px
    );
  background-size: 100% 100%, 100% 100%, 360px 260px;
  opacity: 0.38;
  filter: blur(1.8px);
  mix-blend-mode: screen;
  transform: rotate(-2deg);
  animation: causticDrift 12s linear infinite;
}

.ocean-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 48% 80%, rgba(255, 255, 255, 0.34), transparent 18%),
    linear-gradient(180deg, rgba(115, 244, 239, 0.16), rgba(255, 255, 255, 0) 34%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.25), transparent 34%);
  animation:
    tideLight 9s ease-in-out infinite,
    shoreWaveWash 5.8s ease-in-out infinite;
}

.sun-glow {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 232, 170, 0.42);
  filter: blur(28px);
  transform: translateX(-50%);
  animation: floatingPaper 8s ease-in-out infinite;
}

.current-layer {
  position: absolute;
  left: -24%;
  width: 148%;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(5px);
}

.current-far {
  top: -8%;
  height: 34%;
  background:
    radial-gradient(ellipse at 46% 58%, rgba(255, 255, 255, 0.22), transparent 34%),
    repeating-linear-gradient(
      178deg,
      transparent 0 22px,
      rgba(240, 252, 255, 0.16) 24px 27px,
      transparent 30px 58px
    );
  opacity: 0.34;
  animation: seaCurrentPush 6.6s ease-in-out infinite;
}

.current-mid {
  top: 20%;
  height: 40%;
  background:
    radial-gradient(ellipse at 38% 48%, rgba(255, 255, 255, 0.2), transparent 32%),
    repeating-linear-gradient(
      184deg,
      transparent 0 28px,
      rgba(255, 255, 255, 0.14) 31px 34px,
      transparent 36px 68px
    );
  opacity: 0.42;
  animation: seaCurrentPush 7.8s ease-in-out -1.4s infinite;
}

.current-near {
  top: 48%;
  height: 54%;
  background:
    radial-gradient(ellipse at 54% 56%, rgba(255, 255, 255, 0.24), transparent 28%),
    repeating-linear-gradient(
      190deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.16) 20px 23px,
      transparent 26px 52px
    );
  opacity: 0.48;
  filter: blur(7px);
  animation: nearWaveCarry 5.4s ease-in-out infinite;
}

.sea-band,
.foam {
  position: absolute;
  left: -22%;
  width: 144%;
  border-radius: 50%;
  pointer-events: none;
}

.sea-band {
  height: 18%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(14px);
  animation: waveDrift 9s ease-in-out infinite;
}

.sea-band-one {
  top: 36%;
}

.sea-band-two {
  top: 52%;
  opacity: 0.72;
  animation-duration: 12s;
  animation-direction: reverse;
}

.sea-band-three {
  top: 70%;
  opacity: 0.52;
  animation-duration: 15s;
}

.foam {
  height: 68px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 13px,
      rgba(255, 255, 255, 0.18) 14px 16px,
      transparent 17px 31px
    );
  opacity: 0.28;
  animation: waveDrift 8s ease-in-out infinite;
}

.foam-one {
  bottom: 18%;
  transform: rotate(-3deg);
}

.foam-two {
  bottom: 2%;
  opacity: 0.2;
  transform: rotate(3deg);
  animation-duration: 13s;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 680;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(23, 57, 65, 0.9);
  color: var(--paper);
  box-shadow: 0 10px 28px rgba(23, 54, 47, 0.24);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 248, 234, 0.5);
  color: var(--green);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}

.box-button {
  width: auto;
  min-width: 42px;
  padding: 0 12px;
  gap: 7px;
  color: rgba(23, 57, 65, 0.92);
  background: rgba(255, 248, 234, 0.58);
  backdrop-filter: blur(8px);
}

.box-button span {
  font-size: 12px;
  font-weight: 690;
}

.hero {
  padding-top: 18px;
}

.home-hero {
  padding-top: 0;
  text-align: center;
  position: relative;
}

.hero-visual {
  width: min(96vw, 440px);
  margin: 18px auto -18px;
  position: relative;
  aspect-ratio: 1 / 0.68;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  animation: tideFrame 8s ease-in-out infinite;
}

.bottle-open-button {
  appearance: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  background: transparent;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.bottle-open-button:focus-visible {
  outline: 2px solid rgba(255, 248, 215, 0.92);
  outline-offset: 6px;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(247, 241, 230, 0) 52%, rgba(38, 94, 103, 0.12) 86%),
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), transparent 46%);
  pointer-events: none;
}

.drift-bottle {
  position: absolute;
  width: 90%;
  left: 4%;
  top: -2%;
  display: block;
  filter: drop-shadow(0 26px 24px rgba(16, 20, 18, 0.34)) saturate(0.78) sepia(0.08) brightness(0.92);
  transform-origin: 52% 52%;
  animation: shoreBottleIdle 6.2s ease-in-out infinite;
  will-change: transform;
}

.home-screen.opening .drift-bottle {
  animation: bottleUncork 0.72s cubic-bezier(0.22, 0.88, 0.24, 1) both;
}

.home-screen.opened .drift-bottle {
  animation:
    bottleUncork 0.72s cubic-bezier(0.22, 0.88, 0.24, 1) both,
    oceanDrift 6.8s ease-in-out 0.72s infinite;
}

.ribbon-release,
.cork-pop-visual {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}

.ribbon-release {
  width: 96px;
  height: 12px;
  left: 25%;
  top: 16%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.58));
  transform-origin: 20% 50%;
}

.cork-pop-visual {
  width: 34px;
  height: 22px;
  left: 28%;
  top: 9%;
  border-radius: 44% 56% 50% 50%;
  background: linear-gradient(135deg, rgba(181, 125, 78, 0.92), rgba(112, 75, 47, 0.78));
  box-shadow: 0 8px 16px rgba(20, 22, 18, 0.18);
}

.home-screen.opening .ribbon-release {
  animation: ribbonUntie 0.58s cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.home-screen.opening .cork-pop-visual {
  animation: corkLift 0.5s cubic-bezier(0.22, 0.9, 0.28, 1) 0.08s both;
}

.seashell,
.star-spark {
  position: absolute;
  pointer-events: none;
}

.seashell {
  width: 16px;
  height: 12px;
  border-radius: 80% 80% 45% 45%;
  background: linear-gradient(135deg, #ffe0c1, #c58d66);
  box-shadow: 0 8px 18px rgba(6, 95, 124, 0.18);
  opacity: 0.7;
  animation: oceanDrift 8s ease-in-out infinite;
}

.seashell-a {
  left: 10%;
  bottom: 12%;
  transform: rotate(-18deg);
}

.seashell-b {
  right: 13%;
  bottom: 26%;
  width: 12px;
  height: 10px;
  opacity: 0.55;
  animation-duration: 10s;
}

.star-spark {
  width: 6px;
  height: 6px;
  background: rgba(255, 248, 215, 0.86);
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%);
  filter: drop-shadow(0 0 6px rgba(255, 255, 220, 0.58));
  animation: twinkle 2.8s ease-in-out infinite;
}

.star-a {
  right: 22%;
  top: 22%;
}

.star-b {
  left: 18%;
  top: 42%;
  width: 7px;
  height: 7px;
  animation-delay: 0.9s;
}

.water-sheen {
  position: absolute;
  left: -18%;
  right: -18%;
  height: 34%;
  border-radius: 50%;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 16px,
      rgba(255, 255, 255, 0.22) 17px 19px,
      transparent 20px 38px
    );
  opacity: 0.32;
  filter: blur(0.4px);
  pointer-events: none;
  transform: rotate(-4deg);
  animation: waveDrift 7.5s ease-in-out infinite;
}

.sheen-one {
  bottom: 18%;
}

.sheen-two {
  bottom: 8%;
  opacity: 0.2;
  transform: rotate(3deg);
  animation-duration: 10s;
  animation-direction: reverse;
}

.bottle-art {
  width: 100%;
  display: block;
  overflow: visible;
}

.sea-aura {
  opacity: 0.82;
}

.mist-field {
  opacity: 0.88;
}

.ornament,
.flower-line {
  fill: none;
  stroke: #b99373;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.32;
}

.ornament.right {
  opacity: 0.28;
}

.flower-line {
  stroke-width: 2;
  opacity: 0.24;
}

.bottle-group {
  transform-origin: 174px 230px;
  animation: bottleFloat 5.8s ease-in-out infinite;
}

.wave-line,
.bottle-shine,
.paper-line,
.gold-thread {
  fill: none;
  stroke: #173941;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wave-line {
  stroke-width: 5;
  opacity: 0.22;
}

.wave-line.second {
  stroke-width: 4;
  opacity: 0.14;
}

.bottle-glass {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 4;
}

.bottle-shine {
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 5;
  opacity: 0.78;
}

.cork {
  fill: #b87b4e;
  stroke: #173941;
  stroke-width: 4;
}

.paper-line {
  stroke-width: 4;
  opacity: 0.35;
}

.gold-thread {
  stroke: var(--honey);
  stroke-width: 4;
}

@keyframes bottleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-10px) rotate(-2deg);
  }
}

@keyframes bottleArrive {
  0% {
    opacity: 0;
    transform: translate3d(120px, 38px, 0) rotate(18deg) scale(0.88);
  }
  62% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
  }
}

@keyframes shoreBottleIdle {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-10deg) scale(1);
    filter: drop-shadow(0 26px 24px rgba(16, 20, 18, 0.34)) saturate(0.78) sepia(0.08) brightness(0.92);
  }
  35% {
    transform: translate3d(4px, -7px, 0) rotate(-12deg) scale(1.01);
    filter: drop-shadow(0 30px 26px rgba(16, 20, 18, 0.3)) saturate(0.82) sepia(0.06) brightness(0.96);
  }
  70% {
    transform: translate3d(-3px, 4px, 0) rotate(-8deg) scale(1.004);
  }
}

@keyframes ribbonUntie {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-18deg) scaleX(0.32);
  }
  38% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(52px, -34px, 0) rotate(28deg) scaleX(1.08);
  }
}

@keyframes corkLift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-14deg) scale(0.72);
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(-28px, -42px, 0) rotate(-48deg) scale(1.05);
  }
}

@keyframes shoreBottleRoll {
  0% {
    opacity: 0;
    transform: translate3d(0, -148px, 0) rotate(18deg) scale(0.32);
    filter: drop-shadow(0 10px 14px rgba(12, 20, 18, 0.08)) saturate(0.54) sepia(0.16) brightness(0.76) blur(1.4px);
  }
  36% {
    opacity: 0.84;
    transform: translate3d(18px, -78px, 0) rotate(-30deg) scale(0.56);
  }
  62% {
    opacity: 1;
    transform: translate3d(-16px, -18px, 0) rotate(-54deg) scale(0.82);
  }
  82% {
    transform: translate3d(10px, 12px, 0) rotate(-3deg) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-10deg) scale(1);
    filter: drop-shadow(0 26px 24px rgba(16, 20, 18, 0.34)) saturate(0.78) sepia(0.08) brightness(0.92);
  }
}

@keyframes seaCarriedBottle {
  0% {
    opacity: 0;
    transform: translate3d(-16px, -218px, 0) rotate(-18deg) scale(0.16);
    filter: drop-shadow(0 8px 12px rgba(12, 20, 18, 0.06)) saturate(0.46) sepia(0.18) brightness(0.64) blur(2.4px);
  }
  14% {
    opacity: 0.38;
    transform: translate3d(18px, -190px, 0) rotate(-25deg) scale(0.22);
  }
  30% {
    opacity: 0.65;
    transform: translate3d(-22px, -146px, 0) rotate(-7deg) scale(0.35);
  }
  47% {
    opacity: 0.86;
    transform: translate3d(22px, -102px, 0) rotate(-22deg) scale(0.52);
    filter: drop-shadow(0 12px 16px rgba(12, 20, 18, 0.12)) saturate(0.56) sepia(0.14) brightness(0.74) blur(1px);
  }
  63% {
    opacity: 0.98;
    transform: translate3d(-12px, -58px, 0) rotate(-13deg) scale(0.72);
  }
  78% {
    opacity: 1;
    transform: translate3d(16px, -24px, 0) rotate(-3deg) scale(0.91);
  }
  90% {
    transform: translate3d(-7px, 8px, 0) rotate(-14deg) scale(1.035);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-10deg) scale(1);
    filter: drop-shadow(0 26px 24px rgba(16, 20, 18, 0.34)) saturate(0.78) sepia(0.08) brightness(0.92);
  }
}

@keyframes distantSeaBottleRoll {
  0% {
    opacity: 0;
    transform: translate3d(0, -148px, 0) rotate(18deg) scale(0.32);
    filter: drop-shadow(0 10px 14px rgba(12, 20, 18, 0.08)) saturate(0.54) sepia(0.16) brightness(0.76) blur(1.4px);
  }
  36% {
    opacity: 0.84;
    transform: translate3d(18px, -78px, 0) rotate(-30deg) scale(0.56);
  }
  62% {
    opacity: 1;
    transform: translate3d(-16px, -18px, 0) rotate(-54deg) scale(0.82);
  }
  82% {
    transform: translate3d(10px, 12px, 0) rotate(-3deg) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-10deg) scale(1);
    filter: drop-shadow(0 26px 24px rgba(16, 20, 18, 0.34)) saturate(0.78) sepia(0.08) brightness(0.92);
  }
}

@keyframes bottleOnWater {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-10deg) scale(1);
  }
  45% {
    transform: translate3d(3px, -5px, 0) rotate(-12deg) scale(1.008);
  }
  72% {
    transform: translate3d(-2px, 4px, 0) rotate(-9deg) scale(1.004);
  }
}

@keyframes bottleUncork {
  0% {
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
  }
  38% {
    transform: translate3d(3px, -8px, 0) rotate(-14deg) scale(1.035);
  }
  68% {
    transform: translate3d(-2px, 4px, 0) rotate(-2deg) scale(1.018);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
  }
}

@keyframes seaCurrentPush {
  0%,
  100% {
    transform: translate3d(0, -18px, 0) scaleY(0.96);
    opacity: 0.28;
  }
  42% {
    transform: translate3d(0, 28px, 0) scaleY(1.08);
    opacity: 0.48;
  }
  70% {
    transform: translate3d(0, 14px, 0) scaleY(1);
    opacity: 0.34;
  }
}

@keyframes oceanPlateDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1.018);
    filter: saturate(1) brightness(1);
  }
  35% {
    transform: translate3d(-8px, 10px, 0) scale(1.026);
    filter: saturate(1.06) brightness(1.03);
  }
  68% {
    transform: translate3d(7px, -6px, 0) scale(1.021);
    filter: saturate(1.03) brightness(0.98);
  }
}

@keyframes nightOceanPlateDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1.018);
    filter: saturate(1.08) contrast(1.08) brightness(0.76) hue-rotate(-5deg);
  }
  35% {
    transform: translate3d(-8px, 10px, 0) scale(1.026);
    filter: saturate(1.12) contrast(1.1) brightness(0.8) hue-rotate(-4deg);
  }
  68% {
    transform: translate3d(7px, -6px, 0) scale(1.021);
    filter: saturate(1.1) contrast(1.12) brightness(0.72) hue-rotate(-6deg);
  }
}

@keyframes waterlineFlow {
  0%,
  100% {
    transform: translate3d(-12px, -8px, 0) rotate(-1deg);
    opacity: 0.58;
  }
  52% {
    transform: translate3d(16px, 10px, 0) rotate(1deg);
    opacity: 0.84;
  }
}

@keyframes nearWaveCarry {
  0%,
  100% {
    transform: translate3d(0, -12px, 0) scaleX(1) scaleY(0.96);
    opacity: 0.34;
  }
  48% {
    transform: translate3d(0, 22px, 0) scaleX(1.04) scaleY(1.08);
    opacity: 0.58;
  }
  76% {
    transform: translate3d(0, 8px, 0) scaleX(0.99) scaleY(1);
    opacity: 0.4;
  }
}

@keyframes promptAfterArrival {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hintArrow {
  0%,
  100% {
    opacity: 0.36;
    transform: rotate(45deg) translate(-2px, -2px);
  }
  50% {
    opacity: 0.74;
    transform: rotate(45deg) translate(2px, 2px);
  }
}

@keyframes oceanDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate3d(9px, -7px, 0) rotate(-5deg) scale(1.012);
  }
  66% {
    transform: translate3d(-7px, 6px, 0) rotate(-11deg) scale(1.006);
  }
}

@keyframes tideFrame {
  0%,
  100% {
    border-radius: 44% 56% 50% 50% / 36% 42% 58% 64%;
    transform: translateY(0);
  }
  50% {
    border-radius: 50% 48% 55% 45% / 42% 35% 64% 56%;
    transform: translateY(-4px);
  }
}

@keyframes causticDrift {
  0% {
    transform: translate3d(-60px, -20px, 0) rotate(-2deg);
  }
  100% {
    transform: translate3d(60px, 20px, 0) rotate(-2deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.82) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.18) rotate(22deg);
  }
}

@keyframes waveDrift {
  0%,
  100% {
    transform: translateX(-18px) rotate(-4deg);
  }
  50% {
    transform: translateX(22px) rotate(-2deg);
  }
}

@keyframes tideLight {
  0%,
  100% {
    opacity: 0.82;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-10px);
  }
}

@keyframes shoreWaveWash {
  0%,
  100% {
    background-position:
      center,
      center,
      center;
    transform: translate3d(0, 0, 0) scale(1);
  }
  46% {
    background-position:
      center 10px,
      center,
      center;
    transform: translate3d(0, -10px, 0) scale(1.018);
  }
  70% {
    transform: translate3d(0, 5px, 0) scale(0.996);
  }
}

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

@keyframes paperOpen {
  0% {
    opacity: 0;
    transform: translateY(-22px) scaleY(0.18) scaleX(0.86);
    filter: blur(3px);
  }
  58% {
    opacity: 1;
    transform: translateY(4px) scaleY(1.04) scaleX(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes paperEdgeWrinkle {
  0%,
  100% {
    opacity: 0.46;
    transform: translate3d(0, 0, 0) scale(1);
  }
  45% {
    opacity: 0.62;
    transform: translate3d(0, -2px, 0) scale(1.004);
  }
  72% {
    opacity: 0.52;
    transform: translate3d(1px, 1px, 0) scale(0.998);
  }
}

@keyframes bottleCardFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }
  48% {
    transform: translateY(-5px) rotate(0.5deg);
  }
}

@keyframes bottleIconFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  50% {
    transform: translate3d(0, -3px, 0) rotate(1.5deg);
  }
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
}

.lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 12px auto 0;
  max-width: 290px;
}

.lead.soft-lead {
  max-width: 320px;
  line-height: 1.8;
}

.lead.soft-lead .line-highlight {
  line-height: 1.8;
}

.title-panel {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  text-shadow: 0 1px 18px rgba(255, 255, 255, 0.42);
}

.home-screen.intro .title-panel {
  margin-top: 12px;
}

.home-screen.intro .lead {
  color: rgba(14, 46, 54, 0.84);
}

.tap-arrow {
  position: relative;
  width: 34px;
  height: 34px;
  margin: 4px auto -4px;
  opacity: 0.62;
  filter:
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.62))
    drop-shadow(0 8px 18px rgba(26, 156, 170, 0.2));
  animation: arrowFloat 1.8s ease-in-out infinite;
}

.tap-arrow::before,
.tap-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  transform-origin: center;
}

.tap-arrow::before {
  transform: translateX(-88%) rotate(38deg);
}

.tap-arrow::after {
  transform: translateX(-12%) rotate(-38deg);
}

.bottle-caption {
  width: max-content;
  margin: 8px auto 0;
  padding: 4px 9px;
  border-radius: 999px;
  color: rgba(12, 48, 56, 0.78);
  background: rgba(252, 255, 254, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 650;
  backdrop-filter: blur(6px);
  animation: floatingPaper 5.2s ease-in-out infinite;
}

.shore-invite {
  width: max-content;
  max-width: 230px;
  margin: 10px auto 0;
  min-height: 0;
  padding: 4px 8px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: rgba(18, 31, 35, 0.84);
  background: transparent;
  border: 0;
  box-shadow: none;
  animation:
    promptAfterArrival 0.52s ease 0.22s both,
    floatingPaper 4.8s ease-in-out 0.9s infinite;
}

.shore-invite::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(23, 57, 65, 0.72);
  border-bottom: 2px solid rgba(23, 57, 65, 0.72);
  transform: rotate(45deg);
  animation: hintArrow 1.35s ease-in-out infinite;
}

.open-hint {
  font-size: 12px;
  font-weight: 720;
  color: rgba(23, 57, 65, 0.72);
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.62);
}

.home-screen.intro .shore-invite .tiny {
  display: none;
}

.composer {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(249, 239, 220, 0.9));
  border: 1px solid rgba(185, 147, 115, 0.32);
  border-radius: 28px;
  box-shadow:
    0 28px 80px rgba(53, 86, 91, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 14px;
  backdrop-filter: blur(18px);
  margin-top: 8px;
  animation:
    paperOpen 0.74s cubic-bezier(0.18, 0.82, 0.22, 1) both,
    floatingPaper 6.8s ease-in-out 0.74s infinite;
}

.paper-write-page {
  width: min(100%, 390px);
  min-height: calc(100vh - 116px);
  margin: 10px auto 0;
  padding: 22px 18px 16px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 249, 226, 0.32), transparent 22%),
    radial-gradient(ellipse at 88% 92%, rgba(142, 92, 44, 0.13), transparent 32%),
    linear-gradient(180deg, rgba(255, 241, 204, 0.16), rgba(255, 241, 204, 0.06));
  border: 1px solid rgba(255, 238, 190, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -18px 42px rgba(115, 75, 39, 0.08);
  backdrop-filter: blur(1.4px) saturate(1.04);
}

.paper-heading {
  text-align: center;
  margin-bottom: 10px;
}

.paper-heading .lead {
  color: rgba(26, 54, 58, 0.82);
}

.paper-heading .eyebrow {
  color: rgba(45, 95, 104, 0.72);
}

.writing-field {
  position: relative;
  flex: 1;
  min-height: 320px;
  isolation: isolate;
}

.writing-guide {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  color: rgba(18, 45, 49, 0.76);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 560;
  text-shadow:
    0 1px 10px rgba(255, 255, 255, 0.82),
    0 0 2px rgba(255, 255, 255, 0.9);
}

.writing-guide span {
  width: max-content;
  max-width: 100%;
  padding: 0.08em 0.34em 0.14em;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow:
    0 6px 18px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.writing-guide[hidden] {
  display: none;
}

.text-highlight,
.paper-write-page textarea {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  font-size: 16px;
  line-height: 1.55;
  padding: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.text-highlight {
  z-index: 0;
  overflow: hidden;
  color: transparent;
  pointer-events: none;
}

.text-highlight span {
  display: inline;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.34),
    0 5px 16px rgba(255, 255, 255, 0.12);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.paper-write-page textarea {
  flex: 1;
  z-index: 1;
  resize: none;
  overflow: auto;
  color: rgba(20, 34, 36, 0.95);
  text-shadow: 0 1px 2px rgba(255, 247, 226, 0.62);
}

.paper-write-page textarea::placeholder {
  color: rgba(31, 52, 54, 0.72);
}

.voice-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 12px;
}

.voice-button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(45, 39, 31, 0.86);
  background: rgba(255, 249, 226, 0.34);
  border: 1px solid rgba(93, 70, 48, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.voice-button.recording {
  color: #fff8ea;
  background: rgba(142, 75, 65, 0.78);
}

.voice-status {
  color: rgba(47, 61, 57, 0.78);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.voice-clips {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.voice-clip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  color: rgba(52, 39, 28, 0.72);
  font-size: 12px;
}

.voice-clip audio {
  grid-column: 1 / -1;
  width: 100%;
  height: 34px;
  opacity: 0.82;
}

.voice-remove {
  min-height: 32px;
  padding: 0 8px;
}

.parchment {
  position: relative;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 255, 255, 0.26), transparent 24%),
    radial-gradient(ellipse at 82% 88%, rgba(183, 130, 73, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 246, 221, 0.18), rgba(236, 210, 171, 0.08));
  border-color: rgba(143, 100, 58, 0.14);
  border-radius: 34px 24px 38px 28px / 26px 38px 28px 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -18px 36px rgba(143, 100, 58, 0.06);
  transform-origin: 50% 40%;
}

.parchment::before,
.parchment::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  height: 18px;
  border-radius: 50%;
  background: rgba(139, 98, 59, 0.08);
  filter: blur(9px);
  pointer-events: none;
}

.parchment::before {
  top: -7px;
}

.parchment::after {
  bottom: -7px;
}

.paper-write-page.parchment {
  overflow: hidden;
  background:
    radial-gradient(circle at 9% 6%, rgba(255, 246, 221, 0.28), transparent 16%),
    radial-gradient(circle at 92% 9%, rgba(255, 246, 221, 0.18), transparent 15%),
    radial-gradient(circle at 8% 94%, rgba(166, 104, 54, 0.12), transparent 18%),
    radial-gradient(circle at 91% 92%, rgba(166, 104, 54, 0.13), transparent 19%),
    linear-gradient(180deg, rgba(255, 241, 204, 0.04), rgba(255, 241, 204, 0));
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(104, 78, 50, 0.025);
  backdrop-filter: none;
}

.paper-write-page.parchment > * {
  position: relative;
  z-index: 1;
}

.paper-write-page.parchment::before,
.paper-write-page.parchment::after {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  left: 0;
  right: 0;
  border-radius: inherit;
  pointer-events: none;
  filter: none;
}

.paper-write-page.parchment::before {
  background:
    linear-gradient(90deg, rgba(128, 87, 45, 0.16), transparent 11%, transparent 88%, rgba(128, 87, 45, 0.15)),
    linear-gradient(180deg, rgba(255, 246, 221, 0.23), transparent 12%, transparent 88%, rgba(128, 87, 45, 0.1)),
    radial-gradient(circle at 0 0, rgba(111, 75, 39, 0.19), transparent 16%),
    radial-gradient(circle at 100% 0, rgba(255, 247, 224, 0.22), transparent 16%),
    radial-gradient(circle at 0 100%, rgba(255, 247, 224, 0.2), transparent 15%),
    radial-gradient(circle at 100% 100%, rgba(111, 75, 39, 0.16), transparent 16%);
  mix-blend-mode: multiply;
  opacity: 0.6;
  animation: paperEdgeWrinkle 8.4s ease-in-out infinite;
}

.paper-write-page.parchment::after {
  background:
    repeating-linear-gradient(
      92deg,
      transparent 0 18px,
      rgba(105, 78, 50, 0.035) 19px 20px,
      transparent 21px 42px
    ),
    radial-gradient(ellipse at 50% 0, rgba(255, 248, 229, 0.16), transparent 24%);
  opacity: 0.46;
  mix-blend-mode: soft-light;
  animation: paperEdgeWrinkle 11s ease-in-out -1.8s infinite;
}

textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

textarea::placeholder {
  color: #9a9187;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tiny {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  max-width: 185px;
}

.primary,
.secondary,
.quiet {
  min-height: 50px;
  border-radius: 18px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 690;
  white-space: nowrap;
}

.primary {
  background: linear-gradient(135deg, #224852, #557f8a);
  color: var(--paper);
  box-shadow: 0 16px 34px rgba(49, 88, 96, 0.24);
  min-width: 118px;
  flex-shrink: 0;
}

.primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary {
  background: rgba(255, 248, 234, 0.76);
  color: var(--green);
  border: 1px solid var(--line);
}

.floating-action {
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(247, 251, 250, 0.78), rgba(232, 241, 240, 0.5));
  color: #29454e;
  border: 1px solid rgba(247, 251, 250, 0.6);
  box-shadow:
    0 18px 42px rgba(62, 92, 100, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.primary.floating-action {
  color: #f8fbfa;
  background:
    linear-gradient(135deg, rgba(92, 127, 136, 0.9), rgba(134, 163, 166, 0.78));
}

.quiet {
  min-height: 44px;
  background: transparent;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 12px;
}

.choice {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 72px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(252, 255, 254, 0.82);
  border: 1px solid rgba(185, 147, 115, 0.24);
  color: var(--ink);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.flow-choice {
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 22px 18px 23px 19px / 19px 23px 18px 22px;
  color: rgba(8, 39, 48, 0.95);
  background:
    linear-gradient(135deg, rgba(251, 255, 254, 0.52), rgba(217, 255, 251, 0.3)),
    radial-gradient(ellipse at 16% 8%, rgba(255, 255, 255, 0.48), transparent 30%);
  border: 1px solid rgba(252, 255, 254, 0.5);
  box-shadow:
    0 10px 24px rgba(7, 29, 36, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.flow-choice::before {
  content: "";
  position: absolute;
  inset: -40% -18%;
  background:
    repeating-linear-gradient(
      174deg,
      transparent 0 26px,
      rgba(247, 251, 250, 0.12) 27px 29px,
      transparent 30px 62px
    );
  opacity: 0.56;
  animation: waterlineFlow 8.8s ease-in-out infinite;
}

.flow-choice > * {
  position: relative;
  z-index: 1;
}

.flow-choice svg {
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.flow-choice:hover,
.flow-choice:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 14px 30px rgba(7, 29, 36, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.choice strong {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
  color: rgba(9, 43, 52, 0.96);
}

.choice span {
  display: block;
  color: rgba(36, 75, 83, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

.flow-choice .lock-choice-title {
  font-family: var(--time-font);
  font-size: clamp(16px, 4.2vw, 19px);
  font-weight: 430;
  line-height: 1.2;
  margin-bottom: 0;
  color: rgba(8, 48, 58, 0.9);
  letter-spacing: 0;
  text-shadow:
    0 1px 12px rgba(255, 255, 255, 0.72),
    0 8px 18px rgba(7, 29, 36, 0.06);
}

.card-list,
.bottle-memo-list {
  display: grid;
  gap: 12px;
}

.bottle-memo-list {
  grid-template-columns: 1fr;
}

.entry-card {
  border-radius: 24px;
  background: rgba(255, 248, 234, 0.86);
  border: 1px solid rgba(185, 147, 115, 0.24);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.bottle-memo {
  min-height: 138px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 10%, hsla(var(--bottle-hue), 72%, 92%, 0.62), transparent 24%),
    linear-gradient(145deg, rgba(252, 255, 254, 0.78), rgba(220, 255, 252, 0.58));
  border-color: rgba(252, 255, 254, 0.64);
  box-shadow:
    0 18px 42px rgba(15, 36, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(10px);
  animation: bottleCardFloat 6.8s ease-in-out infinite;
}

.bottle-memo.locked {
  opacity: 0.86;
}

.empty-sea {
  grid-column: 1 / -1;
  background: rgba(255, 248, 234, 0.62);
  backdrop-filter: blur(7px);
}

.mini-bottle {
  width: 58px;
  height: 62px;
  border-radius: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: transparent;
  box-shadow: none;
  animation: bottleIconFloat 5.8s ease-in-out infinite;
}

.mini-bottle-svg {
  width: 58px;
  height: 58px;
  overflow: visible;
  filter:
    drop-shadow(0 8px 14px hsla(var(--bottle-hue), 44%, 28%, 0.22))
    drop-shadow(0 0 10px rgba(255, 247, 214, 0.28));
}

.tiny-bottle-halo {
  fill: hsla(var(--bottle-hue), 62%, 62%, 0.22);
  filter: blur(5px);
}

.tiny-bottle-tilt {
  transform-origin: 32px 34px;
  transform: rotate(-18deg);
}

.tiny-bottle-cork {
  fill: rgba(157, 108, 76, 0.92);
  stroke: rgba(255, 239, 214, 0.72);
  stroke-width: 0.8;
}

.tiny-bottle-glass {
  fill: rgba(240, 253, 255, 0.33);
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 1.8;
}

.tiny-bottle-neck,
.tiny-bottle-shine,
.tiny-ribbon {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tiny-bottle-neck {
  stroke: rgba(255, 255, 255, 0.74);
  stroke-width: 1.3;
}

.tiny-bottle-shine {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.6;
}

.tiny-ribbon {
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.48));
}

.tiny-star,
.tiny-spark {
  fill: rgba(255, 250, 218, 0.96);
  filter: drop-shadow(0 0 5px rgba(255, 250, 218, 0.82));
}

.tiny-star-b {
  opacity: 0.78;
}

.tiny-spark {
  opacity: 0.84;
}

.memo-preview {
  margin: -4px 0 0;
  color: rgba(28, 62, 70, 0.82);
  line-height: 1.55;
  font-size: 13px;
}

.entry-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.status {
  width: max-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 720;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.actions .primary,
.actions .secondary,
.actions .quiet {
  width: 100%;
}

.content-box,
.reflection-box {
  white-space: pre-wrap;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  padding: 14px;
  color: var(--ink);
  line-height: 1.6;
}

.view-screen .content-box,
.view-screen .voice-clips {
  position: relative;
  z-index: 1;
}

.view-screen .content-box {
  background:
    linear-gradient(135deg, rgba(252, 255, 254, 0.58), rgba(218, 255, 252, 0.28)),
    radial-gradient(ellipse at 18% 10%, rgba(255, 255, 255, 0.5), transparent 36%);
  border-color: rgba(252, 255, 254, 0.52);
  box-shadow:
    0 16px 38px rgba(7, 29, 36, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
}

.reflect-form {
  position: relative;
  z-index: 1;
}

.reflect-screen .prompt-card {
  background:
    linear-gradient(135deg, rgba(252, 255, 254, 0.56), rgba(218, 255, 252, 0.28)),
    radial-gradient(ellipse at 16% 12%, rgba(255, 255, 255, 0.56), transparent 32%);
  border: 1px solid rgba(252, 255, 254, 0.52);
  box-shadow:
    0 16px 38px rgba(7, 29, 36, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
}

.reflect-screen .prompt-card label {
  color: rgba(9, 36, 45, 0.96);
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.32);
}

.reflect-screen .prompt-card input {
  color: rgba(7, 29, 36, 0.96);
  background: rgba(252, 255, 254, 0.54);
  border-color: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.prompt-card {
  background: var(--paper);
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: var(--shadow);
}

.prompt-card label {
  display: block;
  font-weight: 720;
  margin-bottom: 10px;
}

.prompt-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 48px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.sea-toast {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 88%;
  margin: -2px auto 2px;
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(22, 45, 53, 0.86);
  background: rgba(247, 251, 250, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 12px 28px rgba(7, 29, 36, 0.13);
  backdrop-filter: blur(10px);
  animation: seaToastFloat 1.8s ease forwards;
}

.bottle-memo.is-drifting-away {
  pointer-events: none;
  animation: cardDriftAway 0.56s ease-in forwards;
}

.ritual-scene {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(95, 230, 235, 0.2), rgba(203, 255, 249, 0.32)),
    url("../assets/ocean-loop.webp") center / cover no-repeat;
  color: var(--paper);
  z-index: 10;
  filter: saturate(1.75) brightness(1.18) contrast(1.03) hue-rotate(12deg);
  backdrop-filter: blur(14px);
}

.ritual-scene .ocean-scene {
  position: absolute;
  z-index: 0;
}

.ritual-scene[hidden] {
  display: none;
}

.ritual-bottle {
  position: relative;
  z-index: 1;
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  animation: bottleIntoSea 0.98s cubic-bezier(0.22, 0.84, 0.28, 1) forwards;
}

.ritual-bottle .mini-bottle-svg {
  width: 116px;
  height: 116px;
  filter:
    drop-shadow(0 18px 24px rgba(5, 20, 26, 0.28))
    drop-shadow(0 0 22px rgba(255, 248, 218, 0.38));
}

.ritual-bottle-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 248, 218, 0.2);
  filter: blur(22px);
}

.ritual-ripple {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 78px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(247, 251, 250, 0.42);
  transform: translate(-50%, -50%);
  animation: ritualRipple 0.9s ease-out forwards;
}

.ritual-ripple-two {
  animation-delay: 0.12s;
}

.ritual-object {
  width: 210px;
  min-height: 150px;
  border-radius: 18px;
  background: rgba(251, 250, 245, 0.92);
  color: var(--green);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  animation: sink 1.1s ease forwards;
}

.ritual-object.seal {
  animation-name: seal;
}

.ritual-object.release {
  animation-name: release;
}

@keyframes sink {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(110px) scale(0.92);
  }
}

@keyframes seal {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(0.96);
    box-shadow: inset 0 0 0 999px rgba(178, 110, 86, 0.16);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes release {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px);
  }
}

@keyframes bottleIntoSea {
  0% {
    opacity: 0;
    transform: translate3d(0, -22px, 0) scale(0.72) rotate(-10deg);
  }
  24% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(-5deg);
  }
  68% {
    opacity: 0.9;
    transform: translate3d(18px, 42px, 0) scale(0.82) rotate(12deg);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(42px, 104px, 0) scale(0.52) rotate(22deg);
    filter: blur(2px);
  }
}

@keyframes ritualRipple {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.48);
  }
  28% {
    opacity: 0.62;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.4);
  }
}

@keyframes cardDriftAway {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(16px, 42px, 0) scale(0.92);
    filter: blur(1.8px);
  }
}

@keyframes jellySea {
  0%,
  100% {
    filter: saturate(1.75) brightness(1.18) contrast(1.03) hue-rotate(12deg);
  }
  50% {
    filter: saturate(1.95) brightness(1.26) contrast(1.06) hue-rotate(18deg);
  }
}

@keyframes arrowFloat {
  0%,
  100% {
    opacity: 0.38;
    transform: translateY(-2px);
  }
  50% {
    opacity: 0.72;
    transform: translateY(8px);
  }
}

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

@keyframes doneBottleFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  48% {
    transform: translate3d(8px, -7px, 0) rotate(2.5deg);
  }
}

@keyframes doneRipple {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.52);
  }
  34% {
    opacity: 0.58;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.76);
  }
}

@keyframes seaToastFloat {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  18%,
  78% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.footer-note {
  margin-top: auto;
  padding: 14px 0 4px;
}

@media (max-width: 380px) {
  .shell {
    padding: 14px;
  }

  h1 {
    font-size: 34px;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}
