@property --tide-l {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 63%;
}

@property --tide-r {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 37%;
}

:root {
  --ink: var(--foreground);
  --ink-soft: var(--muted-foreground);
  --coral: var(--primary);
  --line: var(--border);
  --sand: var(--background);
  --ease-tide: cubic-bezier(0.22, 0.72, 0.18, 1);
  --tide-l: 63%;
  --tide-r: 37%;
  color-scheme: light;
}

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

html {
  min-height: 100%;
  background: var(--sand);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--sand);
  font-family: var(--font-sans);
  overflow-x: hidden;
  transition:
    --tide-l 1.2s var(--ease-tide),
    --tide-r 1.2s var(--ease-tide) 0.06s;
}

body.is-content {
  --tide-l: 8%;
  --tide-r: 92%;
}

body.home-page:not(.is-content) {
  height: 100svh;
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

/* Fixed scenic layer. The sand and water use matched source images. */
.tide-stage {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 244, 226, 0.02) 46%,
      rgba(239, 197, 151, 0.08)
    ),
    url("../images/scene/sand-after-tide.webp") center / cover no-repeat,
    var(--sand);
}

.tide-stage::after {
  content: "";
  position: absolute;
  z-index: 20;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 46%,
    transparent 24%,
    rgba(78, 52, 68, 0.07) 145%
  );
  mix-blend-mode: multiply;
}

@keyframes water-breathe {
  from {
    background-position: 49.4% 50%;
    filter: brightness(1);
  }
  to {
    background-position: 50.6% 51%;
    filter: brightness(1.03);
  }
}

/* Water and foam are ported from index-5.html. The right sheet is a
   horizontal mirror of the source image; both masks share animated tide
   coordinates so the foam stays attached to the water edge. */
.tide-lobe {
  position: absolute;
  z-index: 3;
  inset: 0;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
}

.tide-lobe::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/scene/beach-background.webp") center / cover
    no-repeat;
  animation: water-breathe 9s ease-in-out infinite alternate;
}

.tide-left {
  --water-mask:
    radial-gradient(
      13% 22% at calc(var(--tide-l) - 5%) 8%,
      #000 28%,
      transparent 100%
    ),
    radial-gradient(
      15% 24% at calc(var(--tide-l) + 1%) 34%,
      #000 28%,
      transparent 100%
    ),
    radial-gradient(
      12% 21% at calc(var(--tide-l) - 6%) 62%,
      #000 28%,
      transparent 100%
    ),
    radial-gradient(
      14% 23% at calc(var(--tide-l) + 2%) 90%,
      #000 28%,
      transparent 100%
    ),
    linear-gradient(
      90deg,
      #000 calc(var(--tide-l) - 13%),
      transparent var(--tide-l)
    );
  mask-image: var(--water-mask);
  -webkit-mask-image: var(--water-mask);
}

.tide-right {
  --water-mask:
    radial-gradient(
      13% 22% at calc(var(--tide-r) + 5%) 14%,
      #000 28%,
      transparent 100%
    ),
    radial-gradient(
      15% 24% at calc(var(--tide-r) - 1%) 40%,
      #000 28%,
      transparent 100%
    ),
    radial-gradient(
      12% 21% at calc(var(--tide-r) + 6%) 68%,
      #000 28%,
      transparent 100%
    ),
    radial-gradient(
      14% 23% at calc(var(--tide-r) - 2%) 94%,
      #000 28%,
      transparent 100%
    ),
    linear-gradient(
      90deg,
      transparent var(--tide-r),
      #000 calc(var(--tide-r) + 13%)
    );
  mask-image: var(--water-mask);
  -webkit-mask-image: var(--water-mask);
}

.tide-right::before {
  transform: scaleX(-1);
}

.wet-dark,
.wet-shine {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--tide-l);
  width: max(0%, calc(var(--tide-r) - var(--tide-l)));
  opacity: 0;
  transition: opacity 0.9s 0.3s ease;
}

.wet-dark {
  background: linear-gradient(
    90deg,
    rgba(146, 104, 68, 0.32) 0,
    rgba(146, 104, 68, 0.08) 15%,
    transparent 36%,
    transparent 64%,
    rgba(146, 104, 68, 0.08) 85%,
    rgba(146, 104, 68, 0.32) 100%
  );
  mix-blend-mode: multiply;
}

.wet-shine {
  background:
    radial-gradient(
      ellipse 70% 38% at 50% 10%,
      rgba(255, 255, 255, 0.26),
      transparent 74%
    ),
    linear-gradient(
      90deg,
      rgba(198, 236, 232, 0.24),
      transparent 24%,
      transparent 76%,
      rgba(198, 236, 232, 0.24)
    );
  mix-blend-mode: screen;
}

body.is-content .wet-dark {
  opacity: 0.9;
}

body.is-content .wet-shine {
  opacity: 0.8;
}

body.is-closing .wet-dark,
body.is-closing .wet-shine {
  opacity: 0;
  transition-delay: 0s;
}

.foam {
  position: absolute;
  z-index: 4;
  top: -3%;
  width: clamp(170px, 20vw, 340px);
  height: 106%;
  opacity: 0;
  transform: translateX(-50%);
  will-change: left, opacity;
  transition: opacity 0.35s ease;
}

.foam-left {
  left: var(--tide-l);
}

.foam-right {
  left: var(--tide-r);
  transform: translateX(-50%) scaleX(-1);
}

body.is-content:not(.is-closing) .foam {
  opacity: 1;
  transition: opacity 0.5s 0.58s ease;
}

.foam svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.foam path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.surge {
  animation: surge 8.2s ease-in-out infinite alternate;
}

.foam-right .surge {
  animation-duration: 9.6s;
  animation-delay: -3.1s;
}

@keyframes surge {
  from {
    transform: translateX(-1.4px) scaleX(0.97);
  }
  to {
    transform: translateX(2.2px) scaleX(1.04);
  }
}

.f-wet {
  stroke: #8a5f3f;
  stroke-width: 34;
  opacity: 0.2;
  filter: blur(11px);
}

.f-halo {
  stroke: #fff6e8;
  stroke-width: 27;
  opacity: 0.42;
  filter: blur(10px);
}

.f-under {
  stroke: #a9dde3;
  stroke-width: 10;
  opacity: 0.32;
  filter: blur(5px);
}

.f-body {
  stroke: url("#froth");
  stroke-width: 14;
  stroke-dasharray: 112 6 41 4 73 8 156 5;
  opacity: 0.6;
  filter: blur(2.5px);
  animation: churn-a 19s linear infinite;
}

.f-lip {
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 148 7 52 5 96 9;
  opacity: 0.76;
  filter: blur(0.7px);
  animation: churn-b 26s linear infinite;
}

.f-bub1 {
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1 14 1.5 27 1 9 2 21;
  opacity: 0.62;
  animation: churn-c 31s linear infinite;
}

.f-bub2 {
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 1 11 0.5 23 1.5 17;
  opacity: 0.5;
  animation: churn-d 23s linear infinite;
}

.f-bub3 {
  stroke: #fff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 0.5 19 1 31 1.5 13;
  opacity: 0.44;
  animation: churn-e 37s linear infinite;
}

@keyframes churn-a {
  to {
    stroke-dashoffset: -405;
  }
}

@keyframes churn-b {
  to {
    stroke-dashoffset: 317;
  }
}

@keyframes churn-c {
  to {
    stroke-dashoffset: -76;
  }
}

@keyframes churn-d {
  to {
    stroke-dashoffset: 54;
  }
}

@keyframes churn-e {
  to {
    stroke-dashoffset: -66;
  }
}

/* Foreground scene */
.shore {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100svh;
}

.brand {
  position: absolute;
  z-index: 10;
  top: 20%;
  left: 50%;
  width: min(94vw, 860px);
  text-align: center;
  transform: translateX(-50%);
  transition:
    opacity 0.42s ease,
    transform 0.78s var(--ease-tide),
    filter 0.42s ease;
}

.brand-mark {
  display: block;
  width: clamp(72px, 7vw, 104px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 5px 14px rgba(255, 255, 255, 0.38));
}

.brand h1 {
  margin: 4px 0 0;
  font-family: var(--font-sans);
  font-size: clamp(62px, 7.2vw, 112px);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.56);
}

.brand p {
  margin: 24px auto 0;
  font-size: clamp(15px, 1.45vw, 24px);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.92);
}

.brand-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 24px;
  color: rgba(204, 139, 92, 0.78);
}

.brand-ornament::before,
.brand-ornament::after {
  content: "";
  width: 78px;
  height: 1px;
  background: currentColor;
}

.brand-ornament::before {
  transform: rotate(-3deg);
}
.brand-ornament::after {
  transform: rotate(3deg);
}
.brand-ornament span {
  font-size: 20px;
}

body.is-content .brand {
  opacity: 0;
  transform: translateX(-50%) translateY(-32px) scale(0.92);
  filter: blur(7px);
  pointer-events: none;
}

.return-home {
  position: fixed;
  z-index: 24;
  top: clamp(12px, 2.4vh, 28px);
  left: clamp(16px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  cursor: pointer;
  transition:
    opacity 0.45s 0.42s ease,
    transform 0.45s 0.42s ease;
}

.return-home img {
  width: 58px;
  height: auto;
}

.return-home span {
  margin-left: -3px;
  text-align: left;
}

.return-home strong {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 500;
}

.return-home small {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.64;
}

body.is-content .return-home {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.return-home:focus-visible,
.module:focus-visible,
.not-found a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 5px;
  border-radius: var(--radius-sm);
}

/* The same four buttons move continuously between shore and navigation. */
.module-nav {
  position: absolute;
  z-index: 18;
  bottom: clamp(34px, 6.5vh, 70px);
  left: 50%;
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: clamp(20px, 3vw, 52px);
  width: min(74vw, 1120px);
  transform: translateX(-50%);
}

.module {
  --object-size: clamp(112px, 13vw, 172px);
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.is-tiding .module {
  pointer-events: none;
}

.module::before,
.module::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.module::before {
  top: calc(var(--object-size) * 0.72);
  width: calc(var(--object-size) * 0.76);
  height: calc(var(--object-size) * 0.22);
  background: radial-gradient(
    closest-side,
    rgba(111, 76, 59, 0.34),
    rgba(111, 76, 59, 0.09) 58%,
    transparent
  );
  transition:
    opacity 0.32s ease,
    width 0.7s var(--ease-tide),
    height 0.7s var(--ease-tide);
}

.module::after {
  top: calc(var(--object-size) * 0.74);
  width: calc(var(--object-size) * 0.58);
  height: calc(var(--object-size) * 0.16);
  background: radial-gradient(
    closest-side,
    rgba(255, 224, 204, 0.58),
    rgba(255, 224, 204, 0.08) 58%,
    transparent
  );
  mix-blend-mode: screen;
}

.growth::after {
  background: radial-gradient(
    closest-side,
    rgba(255, 199, 163, 0.62),
    rgba(255, 199, 163, 0.08) 58%,
    transparent
  );
}
.ai::after {
  background: radial-gradient(
    closest-side,
    rgba(155, 221, 243, 0.62),
    rgba(155, 221, 243, 0.08) 58%,
    transparent
  );
}
.connect::after {
  background: radial-gradient(
    closest-side,
    rgba(178, 233, 208, 0.62),
    rgba(178, 233, 208, 0.08) 58%,
    transparent
  );
}

.object {
  position: relative;
  display: block;
  width: var(--object-size);
  aspect-ratio: 1;
  margin: 0 auto;
  transform: translateY(0) scale(1);
  transform-origin: center bottom;
  transition:
    transform 0.5s var(--ease-tide),
    filter 0.36s ease,
    width 0.7s var(--ease-tide);
}

.object img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.module-label {
  display: block;
  margin-top: 9px;
  font-size: clamp(14px, 1.22vw, 19px);
  line-height: 1.15;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.96);
  transition:
    margin 0.7s var(--ease-tide),
    font-size 0.7s var(--ease-tide),
    opacity 0.3s ease;
}

.module:hover .object,
.module:focus-visible .object {
  transform: translateY(-7px) scale(1.035);
  filter: brightness(1.06) saturate(1.05);
}

.module:hover::before,
.module:focus-visible::before {
  width: calc(var(--object-size) * 0.82);
  opacity: 0.76;
}

.module.is-pressed .object {
  transform: translateY(4px) scale(0.97);
  filter: brightness(1.08);
}

body.is-content .module-nav {
  position: fixed;
  top: 13px;
  bottom: auto;
  width: min(58vw, 770px);
  gap: clamp(8px, 1.1vw, 18px);
}

body.is-content .module {
  --object-size: clamp(54px, 5.2vw, 74px);
}

body.is-content .module-label {
  margin-top: 3px;
  font-size: var(--text-xs);
}

body.is-content .module.active .object {
  transform: translateY(4px) scale(1.1);
  filter: brightness(1.09) saturate(1.07);
}

body.is-content .module:not(.active) .object {
  filter: saturate(0.9) brightness(0.98);
}

/* Reading surface */
.content {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  width: min(86vw, 1120px);
  margin: 0 auto;
  padding: clamp(145px, 18vh, 190px) 0 78px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(44px);
  filter: blur(8px);
  pointer-events: none;
  transition:
    opacity 0.54s 0.7s ease,
    transform 0.7s 0.62s var(--ease-tide),
    filter 0.54s 0.66s ease;
}

body.is-content .content {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

.content-inner {
  min-height: 68vh;
  padding: 20px clamp(10px, 1.5vw, 24px) 70px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.content h2 {
  max-width: 850px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(48px, 5.2vw, 78px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.content h2:focus {
  outline: none;
}

.content-intro {
  max-width: 790px;
  margin: 26px 0 32px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.72;
}

.placeholder-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.placeholder-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 102px;
  border-bottom: 1px solid var(--line);
  transition:
    padding 0.25s ease,
    background 0.25s ease;
}

.placeholder-row:hover {
  padding-inline: 11px;
  background: rgba(255, 255, 255, 0.1);
}

.placeholder-row .number {
  color: var(--coral);
  font-family: var(--font-sans);
  font-size: 20px;
}

.placeholder-row strong {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 400;
}

.placeholder-row .later {
  color: var(--coral);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

body.is-switching .content {
  opacity: 0.08;
  transform: translateY(7px);
  filter: blur(7px);
  transition:
    opacity 0.16s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

body.is-closing .content {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(6px);
  transition:
    opacity 0.14s ease,
    transform 0.18s ease,
    filter 0.18s ease;
}

.section-ripple {
  position: fixed;
  z-index: 8;
  top: 45%;
  left: 50%;
  width: 42vw;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  pointer-events: none;
}

body.is-switching .section-ripple {
  animation: section-ripple 0.42s ease-out;
}

@keyframes section-ripple {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
  }
  34% {
    opacity: 0.65;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

.shore-hint {
  position: absolute;
  z-index: 14;
  bottom: 9px;
  left: 50%;
  margin: 0;
  color: rgba(81, 68, 98, 0.62);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
}

body.is-content .shore-hint {
  opacity: 0;
}

/* A quiet side path to the standalone astro dice. */
.astro-entry {
  position: fixed;
  z-index: 22;
  right: clamp(14px, 2vw, 30px);
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px 5px 5px;
  border: 1px solid rgba(255, 250, 242, 0.38);
  border-radius: 999px;
  color: rgba(81, 68, 98, 0.72);
  font-family: var(--font-sans);
  background: rgba(255, 244, 226, 0.12);
  box-shadow: 0 6px 24px rgba(92, 65, 75, 0.08);
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.3s ease;
}

.astro-entry-glow {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 211, 0.92) 0 9%, rgba(255, 226, 176, 0.54) 24%, rgba(187, 230, 232, 0.2) 49%, transparent 72%);
  filter: drop-shadow(0 0 8px rgba(255, 233, 183, 0.74));
  animation: astro-entry-pulse 3.6s ease-in-out infinite;
}

.astro-entry-glow::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: rgba(255, 251, 224, 0.84);
  box-shadow: 0 0 15px 6px rgba(255, 226, 174, 0.42);
}

.astro-entry-glow svg {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 25px;
  margin: -5px 0 0 4px;
  fill: rgba(255, 255, 255, 0.1);
  stroke: rgba(91, 76, 101, 0.58);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes astro-entry-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(1px) scale(0.96);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
}

.astro-entry-label {
  max-width: 0;
  overflow: hidden;
  font-size: var(--text-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.35s ease, opacity 0.25s ease;
}

.astro-entry:hover,
.astro-entry:focus-visible {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 242, 217, 0.82), rgba(222, 239, 243, 0.76));
  box-shadow: 0 8px 26px rgba(92, 65, 75, 0.18);
  transform: translateY(-2px);
}

.astro-entry:hover .astro-entry-label,
.astro-entry:focus-visible .astro-entry-label {
  max-width: 110px;
  opacity: 1;
}

body.is-content .astro-entry {
  opacity: 0;
  pointer-events: none;
}

.astro-entry:focus-visible {
  outline: 2px solid rgba(81, 68, 98, 0.72);
  outline-offset: 4px;
}

/* Minimal 404, using the same shore instead of the retired theme. */
.not-found-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(255, 250, 244, 0.2), rgba(255, 236, 213, 0.2)),
    url("../images/scene/sand-after-tide.webp") center / cover no-repeat;
}

.not-found {
  width: min(92vw, 620px);
  padding: 42px;
  text-align: center;
}

.not-found img {
  width: 92px;
  height: auto;
}

.not-found h1 {
  margin: 2px 0 8px;
  font-family: var(--font-sans);
  font-size: clamp(92px, 18vw, 170px);
  font-weight: 400;
  line-height: 0.9;
}

.not-found p:not(.eyebrow) {
  margin: 18px 0 28px;
  font-size: 17px;
}

.not-found a {
  backdrop-filter: blur(7px);
}

@media (max-width: 760px) {
  body.is-content {
    --tide-l: 6%;
    --tide-r: 94%;
  }

  .tide-stage,
  .tide-lobe::before {
    background-position: 49% center;
  }

  .brand {
    top: 9%;
    width: calc(100% - 28px);
  }

  .brand-mark {
    width: 72px;
  }

  .brand h1 {
    margin-top: 0;
    font-size: clamp(51px, 15vw, 72px);
  }

  .brand p {
    width: 88%;
    margin-top: 13px;
    font-size: var(--text-sm);
    line-height: 1.45;
  }

  .brand-ornament {
    margin-top: 15px;
  }

  .brand-ornament::before,
  .brand-ornament::after {
    width: 46px;
  }

  .module-nav {
    bottom: max(26px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 22px;
    width: min(82vw, 410px);
  }

  .module {
    --object-size: clamp(82px, 24vw, 108px);
  }

  .module-label {
    margin-top: 5px;
    font-size: var(--text-sm);
  }

  .return-home {
    top: 7px;
    left: 9px;
  }

  .return-home img {
    width: 49px;
  }

  .return-home span {
    display: none;
  }

  body.is-content .module-nav {
    top: 47px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: calc(100vw - 18px);
  }

  body.is-content .module {
    --object-size: 44px;
  }

  body.is-content .module-label {
    min-height: 24px;
    margin-top: 2px;
    font-size: var(--text-xs);
    line-height: var(--leading-tight);
  }

  .foam {
    width: clamp(120px, 38vw, 210px);
  }

  .f-wet {
    stroke-width: 23;
  }

  .f-halo {
    stroke-width: 18;
  }

  .f-under {
    stroke-width: 7;
  }

  .f-body {
    stroke-width: 9.5;
  }

  .f-lip {
    stroke-width: 3;
  }

  .f-bub1 {
    stroke-width: 3;
  }

  .f-bub2 {
    stroke-width: 2;
  }

  .f-bub3 {
    stroke-width: 2.4;
  }

  .content {
    width: calc(100% - 22px);
    padding: 142px 0 42px;
  }

  .content-inner {
    min-height: 74vh;
    padding: 20px 9px 58px;
  }

  .content h2 {
    font-size: clamp(42px, 12.5vw, 58px);
  }

  .content-intro {
    margin-top: 19px;
    font-size: var(--text-sm);
    line-height: 1.62;
  }

  .placeholder-row {
    grid-template-columns: 34px 1fr;
    gap: 9px;
    min-height: 82px;
  }

  .placeholder-row strong {
    font-size: clamp(18px, 5.2vw, 23px);
  }

  .placeholder-row .later {
    display: none;
  }

  .section-ripple {
    width: 84vw;
  }

  .shore-hint {
    display: none;
  }

  .astro-entry {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 2px;
  }

  .astro-entry-glow {
    width: 32px;
    height: 32px;
  }

  .astro-entry-label {
    display: none;
  }
}

@media (max-width: 760px) and (max-height: 720px) {
  .brand {
    top: 5%;
  }

  .brand-mark {
    display: none;
  }

  .brand h1 {
    font-size: 48px;
  }

  .brand p {
    margin-top: 8px;
  }

  .brand-ornament {
    display: none;
  }

  .module-nav {
    bottom: 13px;
    gap: 8px 18px;
  }

  .module {
    --object-size: clamp(70px, 20vw, 90px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
