/* Bloom: Sleep Garden — product site. Styled after the app: cream panels with
   brown crayon outlines, chunky game buttons, night and day skies, Nunito. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Variable.ttf?v=bb55a5ca5c") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --night: #211b46;
  --night-2: #33296b;
  --lavender: #7b67d6;
  --lavender-soft: #ece6ff;
  --paper: #fdf4e7;
  --paper-2: #f7e6cf;
  --card: #fbeedd;
  --ink: #4a2e1c;
  --ink-soft: #7a5a45;
  --outline: #6b4423;
  --leaf: #a3d987;
  --leaf-dark: #3e7a2c;
  --sky: #a9e1f7;
  --peach: #f6c7a5;
  --gold: #f6c544;
  --white: #fffaf2;
  --radius: 28px;
  --shadow: 0 18px 40px rgba(46, 26, 12, 0.14);
  --phone-shadow: 0 30px 60px rgba(18, 10, 46, 0.42);
  --page: min(1120px, calc(100% - 32px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--leaf-dark); font-weight: 800; text-underline-offset: 3px; }

h1, h2, h3 {
  margin: 0 0 14px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(42px, 7vw, 76px); }
h2 { font-size: clamp(32px, 4.6vw, 52px); }
h3 { font-size: 24px; }

p { margin: 0 0 16px; }

.wrap { width: var(--page); margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--white);
  z-index: 10;
}
.skip:focus { left: 8px; }

/* Buttons: the game's chunky green and cream buttons. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 26px;
  border: 3px solid var(--leaf-dark);
  border-radius: 18px;
  background: var(--leaf);
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--leaf-dark);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--leaf-dark); }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--leaf-dark); }
.button.secondary {
  background: var(--card);
  border-color: var(--outline);
  box-shadow: 0 5px 0 var(--outline);
}
.button.secondary:hover { box-shadow: 0 6px 0 var(--outline); }
.button.secondary:active { box-shadow: 0 1px 0 var(--outline); }
.button img { width: 26px; height: 26px; }

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding: 18px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
}
.brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: rgba(255, 250, 242, 0.88); text-decoration: none; font-weight: 800; font-size: 16px; }
.site-nav a:hover { color: var(--white); }
.site-nav .button { min-height: 44px; padding: 8px 18px; font-size: 16px; color: var(--ink); }
@media (max-width: 760px) {
  .site-nav a:not(.button) { display: none; }
}

/* Hero: the garden's night sky. */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 90px;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(25, 18, 60, 0.35), rgba(25, 18, 60, 0.15) 60%, rgba(25, 18, 60, 0.6)),
    url("img/sky-night.webp?v=4d86daa5d4") center / cover no-repeat,
    var(--night);
}
.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}
.hero .eyebrow { color: #d9cffd; }
.hero h1 { color: var(--white); text-shadow: 0 4px 24px rgba(10, 6, 30, 0.35); }
.hero .lead { max-width: 560px; font-size: 21px; color: #ece6ff; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.hero .fine { font-size: 15px; font-weight: 800; color: #cfc4f6; }
.hero .sparkle { position: absolute; z-index: 1; animation: twinkle 3.2s ease-in-out infinite; }
.hero .sparkle.one { top: 150px; left: 8%; width: 30px; }
.hero .sparkle.two { top: 64%; left: 44%; width: 24px; animation-delay: 1.1s; }
.hero .sparkle.three { top: 22%; left: 52%; width: 20px; animation-delay: 2s; }
.hero .cloud { position: absolute; z-index: 1; opacity: 0.55; animation: drift 46s linear infinite; }
.hero .cloud.one { bottom: 40px; left: -10%; width: 380px; }
.hero .cloud.two { top: 38%; right: -6%; width: 300px; animation-duration: 60s; animation-direction: reverse; }

.hero-phones { position: relative; display: flex; justify-content: center; }
.hero-phones .island {
  position: absolute;
  left: -24px;
  bottom: -20px;
  width: 170px;
  z-index: 3;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 18px 24px rgba(10, 6, 30, 0.35));
}

@keyframes twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(40vw); } }

@media (max-width: 900px) {
  .hero { padding-top: 104px; text-align: center; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .lead { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .hero-phones .island { width: 120px; left: 4%; }
}

/* Phones: the screenshots in a dark bezel. The bezel wraps the image, which
   keeps its own shape (from its width and height), so no edge is cropped. */
.phone {
  width: min(310px, 72vw);
  padding: 9px;
  border-radius: 46px;
  background: #18132f;
  box-shadow: var(--phone-shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.09);
  flex: none;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 37px; }
.phone.small { width: min(250px, 60vw); border-radius: 38px; padding: 8px; }
.phone.small img { border-radius: 31px; }
.phone.tilt-left { transform: rotate(-4deg); }
.phone.tilt-right { transform: rotate(4deg); }

/* Sections */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 20px; color: var(--ink-soft); }

.paper { background: var(--paper); }
.paper-2 { background: var(--paper-2); }
.sky-band {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0)),
    url("img/sky-day.webp?v=7ff3480317") center / cover no-repeat,
    var(--sky);
}

/* Game-style cards */
.card {
  position: relative;
  padding: 28px;
  border: 4px solid var(--outline);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 6px rgba(255, 255, 255, 0.35);
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps .card { text-align: center; }
.steps .art { height: 150px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 18px; }
.steps .art img { max-height: 150px; width: auto; }
.steps .art .pair img { max-height: 108px; }
.steps .number {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--gold);
  font-weight: 900;
}
.steps p { color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}
.feature + .feature { margin-top: 110px; }
.feature.reverse .feature-text { order: 2; }
.feature-text p { font-size: 20px; color: var(--ink-soft); }
.feature-text ul { padding: 0; margin: 18px 0 0; list-style: none; }
.feature-text li {
  position: relative;
  padding-left: 34px;
  margin: 10px 0;
  font-weight: 700;
}
.feature-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  background: url("img/petal.png?v=2950a02151") center / contain no-repeat;
}
.feature-text .badge { width: 72px; margin-bottom: 14px; }
.feature-media { display: flex; justify-content: center; align-items: center; gap: 18px; }
.feature-media .phone + .phone { margin-top: 70px; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .feature.reverse .feature-text { order: 0; }
  .feature-text ul { display: inline-block; text-align: left; }
  .feature-media .phone + .phone { margin-top: 40px; }
}
@media (max-width: 560px) {
  .feature-media { gap: 10px; }
  .feature-media .phone.small { width: 44vw; border-radius: 28px; padding: 6px; }
  .feature-media .phone.small img { border-radius: 23px; }
}

/* Floating flowers along the edges of a section */
.decor { position: relative; }
.decor .flower { position: absolute; width: 64px; opacity: 0.95; pointer-events: none; }

/* Privacy band: back to the night sky. */
.night-band {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(25, 18, 60, 0.5), rgba(25, 18, 60, 0.25)),
    url("img/sky-night.webp?v=4d86daa5d4") center 30% / cover no-repeat,
    var(--night);
}
.night-band .eyebrow { color: #d9cffd; }
.night-band p { color: #e3dcff; }
.privacy-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.privacy-points { display: grid; gap: 16px; }
.privacy-point {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}
.privacy-point img { width: 52px; height: 52px; object-fit: contain; }
.privacy-point h3 { font-size: 20px; margin-bottom: 4px; }
.privacy-point p { margin: 0; font-size: 17px; }
.night-band a { color: var(--leaf); }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; text-align: center; } .privacy-point { text-align: left; } }

/* Gallery: every screen in a row. */
.gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 10px max(16px, calc((100% - 1120px) / 2)) 30px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: center; text-align: center; }
.gallery figcaption { margin-top: 14px; font-weight: 800; color: var(--ink-soft); font-size: 16px; }
.gallery .phone { width: 230px; border-radius: 36px; padding: 7px; }
.gallery .phone img { border-radius: 30px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq details {
  padding: 4px 24px;
  border: 3px solid var(--outline);
  border-radius: 22px;
  background: var(--card);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-size: 20px;
  font-weight: 900;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 26px; line-height: 1; color: var(--leaf-dark); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); }

/* Beta call to action */
.beta { text-align: center; }
.beta .card { max-width: 760px; margin: 0 auto; padding: 44px 32px; }
.beta .island { width: 210px; margin: -120px auto 10px; filter: drop-shadow(0 14px 18px rgba(46, 26, 12, 0.25)); animation: float 6s ease-in-out infinite; }
.beta p { font-size: 20px; color: var(--ink-soft); }
.beta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 24px; }

/* Footer */
.site-footer { padding: 46px 0 60px; background: var(--night); color: #d6cdf7; font-size: 16px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .brand { font-size: 20px; }
.site-footer .brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: #ece6ff; font-weight: 800; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { width: 100%; margin: 6px 0 0; color: #a99fd3; font-size: 14px; }

/* Simple pages (support, 404) */
.page-hero { padding: 120px 0 60px; color: var(--white); background: linear-gradient(180deg, rgba(25, 18, 60, 0.4), rgba(25, 18, 60, 0.2)), url("img/sky-night.webp?v=4d86daa5d4") center / cover, var(--night); }
.page-hero p { color: #e3dcff; font-size: 20px; max-width: 640px; }
.page-hero .eyebrow { color: #d9cffd; }
.page-body { padding: 64px 0 96px; }
.page-body .card + .card { margin-top: 22px; }
.page-body h2 { font-size: 30px; }
.page-body ol, .page-body ul { padding-left: 24px; }
.page-body li { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.card h3 { font-size: 20px; margin: 20px 0 4px; }

/* Garden demo (#try, assets/demo.js): a little island to plant, water and
   sleep on, animated as the game animates its garden. Each patch's pictures
   are cut to the same box, so a patch's grass, soil and plant stack at one spot.
   --tw is a patch's width; a neighbour sits half a patch across and 0.2852 of
   a patch down, and the grass's top face starts 0.2706 down, 0.5705 tall. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-band { position: relative; overflow: hidden; background-position: center top, center top, 0 0; }
/* The night sky cross-fades in over 3 s, as the game's sky changes. */
.demo-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/sky-night.webp?v=4d86daa5d4") center top / cover no-repeat, var(--night);
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.demo-band[data-phase="night"]::before { opacity: 1; }
.demo-band > .wrap { position: relative; z-index: 1; }
.demo-band .section-head h2, .demo-band .section-head p, .demo-band .eyebrow, .demo-status { transition: color 1.5s ease-in-out; }
.demo-band[data-phase="night"] .section-head h2 { color: var(--white); }
.demo-band[data-phase="night"] .section-head p,
.demo-band[data-phase="night"] .eyebrow,
.demo-band[data-phase="night"] .demo-status { color: #e3dcff; }
.demo-clouds { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.demo-clouds img { position: absolute; left: 0; top: 0; width: auto; max-width: none; will-change: transform; }
.demo { position: relative; max-width: 760px; margin: 0 auto; text-align: center; }
/* The HUD: the game's counter pills, the icon over the pill's left end. */
.demo-hud { display: flex; justify-content: center; gap: 22px; margin-bottom: 4px; }
.demo-count {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 122px;
  height: 52px;
  padding: 0 18px 0 46px;
  background: url("img/demo/counter.webp?v=a856d75b0c") center / 100% 100% no-repeat;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}
.demo-count img { position: absolute; left: -14px; top: 50%; width: 58px; height: 58px; transform: translateY(-50%); }
.demo-stage { position: relative; padding: 52px 0 12px; }
.demo-chip { position: absolute; z-index: 5; left: 50%; top: 0; width: 210px; transform: translateX(-50%); opacity: 0; pointer-events: none; }
.demo-island {
  --tw: clamp(88px, 25vw, 136px);
  position: relative;
  z-index: 1;
  width: calc(var(--tw) * 3);
  height: calc(var(--tw) * 2.2761);
  margin: 0 auto;
  transition: filter 1.2s ease-in-out;
}
/* The game tints the garden (0.8, 0.84, 1.0) at night, over 2.5 s. */
.demo-band[data-phase="night"] .demo-island { filter: brightness(0.86) saturate(0.9); }
.demo-cell, .demo-pour, .demo-mark {
  position: absolute;
  left: calc(var(--x) * var(--tw) / 2);
  top: calc(var(--y) * var(--tw) * 0.2852);
  width: var(--tw);
  height: calc(var(--tw) * 1.1353);
}
.demo-cell { z-index: calc(var(--y) * 10 + 1); pointer-events: none; }
.demo-cell img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* A plant grows from its foot: the patch's bottom corner. */
.demo-cell .plant { transform-origin: 50% 74.08%; }
.demo-cell button {
  position: absolute;
  left: 0;
  top: calc(var(--tw) * 0.2706);
  width: 100%;
  height: calc(var(--tw) * 0.5705);
  padding: 0;
  border: 0;
  background: transparent;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  cursor: pointer;
  pointer-events: auto;
}
.demo-cell button:focus { outline: none; }
/* The game's tile highlights: yellow for the patch you tapped, blue under the
   watering can. Drawn over the plants, as the game draws its hover. */
.demo-mark { z-index: 70; pointer-events: none; }
.demo-mark svg { position: absolute; left: 0; top: calc(var(--tw) * 0.2706); width: 100%; height: calc(var(--tw) * 0.5705); overflow: visible; }
.demo-mark polygon { fill: rgba(255, 237, 140, 0.26); stroke: rgba(255, 219, 82, 0.95); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.demo-mark.water polygon { fill: rgba(74, 158, 255, 0.2); stroke: rgba(140, 219, 255, 0.95); stroke-width: 2px; }
/* The pouring can: the game's 4 frames at 10 fps, 2 s, then a 1 s fade. */
.demo-pour {
  z-index: 80;
  top: calc(var(--y) * var(--tw) * 0.2852 - var(--tw) * 0.3078);
  height: calc(var(--tw) * 1.443);
  background: url("img/demo/pour.webp?v=97fc595217") 0 0 / 400% 100% no-repeat;
  pointer-events: none;
  animation: demo-pour-frames 0.4s steps(4) infinite, demo-pour-fade 3s linear forwards;
}
.demo-drop, .demo-burst, .demo-bee { position: absolute; pointer-events: none; }
/* "Needs water" drops over thirsty plants, as on a friend's garden: 0.28 of a
   patch wide, bobbing 0.12 of their size every 1.96 s. */
.demo-drop { z-index: 60; width: calc(var(--tw) * 0.28); height: calc(var(--tw) * 0.28); animation: demo-bob 1.96s ease-in-out infinite; }
.demo-burst { z-index: 85; }
.demo-burst img { width: 100%; height: 100%; }
.demo-bee { z-index: 75; width: calc(var(--tw) * 0.52); height: auto; left: 0; top: 0; }
.demo-morning {
  position: absolute;
  z-index: 90;
  left: 50%;
  top: 50%;
  width: min(360px, calc(100% - 16px));
  transform: translate(-50%, -50%);
  padding: 22px 22px 24px;
  text-align: center;
  animation: demo-card-in 0.25s ease-out;
}
.demo-morning[hidden] { display: none; }
.demo-morning.leaving { animation: demo-card-out 0.2s ease-in forwards; }
.demo-morning h3 { margin: 0 0 6px; font-size: 26px; }
.demo-morning p { margin: 0 0 10px; color: var(--ink-soft); font-size: 17px; }
.demo-morning .demo-night { color: var(--ink); font-weight: 800; }
.demo-rewards { display: flex; justify-content: center; gap: 18px; font-weight: 800; }
.demo-rewards span { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.demo-rewards img { width: 32px; height: 32px; }
.demo-morning .button { margin-top: 6px; min-height: 48px; }
.demo-fly { position: fixed; z-index: 1000; left: 0; top: 0; pointer-events: none; }
.demo-fly img { display: block; width: 100%; height: 100%; }
.demo-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.demo-tool {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 84px;
  padding: 8px 4px 6px;
  border: 3px solid var(--outline);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 4px 0 var(--outline);
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.12s ease;
}
.demo-tool img { width: auto; height: 52px; }
.demo-tool:active { transform: scale(1.08, 0.92); }
.demo-tool:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.demo-tool[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf-dark); box-shadow: 0 1px 0 var(--leaf-dark); transform: translateY(3px); }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
/* The game's Sleep clock, saying Goodnight with the night-sky moon, laid out
   as the game lays it out: on the clock's cream screen (17% in from each side,
   33% from the top, 26% from the bottom), the moon 62% of that screen's height
   with 18% of it as the gap, and the word at the size that fits beside it
   (38 on a 420-wide clock). In clock widths (cqw), so it scales with the clock. */
.demo-clock { position: relative; width: 220px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform 0.06s ease; container-type: inline-size; }
.demo-clock > img { width: 100%; height: auto; }
.demo-clock span {
  position: absolute;
  left: 17%;
  right: 17%;
  top: 33%;
  bottom: 26%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.62cqw;
  color: var(--ink);
  font-size: 9.05cqw;
  font-weight: 900;
  line-height: 1;
}
.demo-clock span img { width: 14.52cqw; height: auto; }
.demo-clock:active { transform: scale(1.08, 0.92); }
.demo-clock:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 24px; }
.demo-actions button:disabled { opacity: 0.55; cursor: default; transform: none; }
.demo-tool:disabled { opacity: 0.55; cursor: default; transform: none; }
.demo-status { min-height: 3.2em; margin: 16px auto 0; max-width: 560px; color: var(--ink); font-weight: 800; }
.demo-status a { white-space: nowrap; }
.demo-band[data-phase="night"] .demo-status a { color: var(--leaf); }
/* Goodnight's veil, as in the game: dark blue at 45% over 2.5 s, then "See
   you in the morning" fading in from 0.8 s over 1.2 s. A tap wakes you. */
.demo-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 13, 41, 0.45);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
}
.demo-veil.on { visibility: visible; opacity: 1; animation: demo-veil-in 1.2s ease-in-out both; }
.demo-veil.off { visibility: visible; animation: demo-veil-out 1s linear forwards; }
.demo-veil-text { max-width: 820px; text-align: center; color: #fff5e0; opacity: 0; }
.demo-veil.on .demo-veil-text { opacity: 1; animation: demo-veil-in 0.7s ease-in-out 0.4s both; }
.demo-veil.off .demo-veil-text { opacity: 1; }
.demo-veil-title { margin: 0 0 18px; font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.1; }
.demo-veil-line { margin: 0; font-size: clamp(20px, 3vw, 32px); font-weight: 700; }
.demo-still { margin: 0 auto; max-width: 520px; }
@keyframes demo-pour-frames { to { background-position-x: 133.333%; } }
@keyframes demo-pour-fade { 0%, 66.667% { opacity: 0.95; } 100% { opacity: 0; } }
@keyframes demo-bob { 0%, 100% { transform: translateY(calc(var(--tw) * -0.0336)); } 50% { transform: translateY(calc(var(--tw) * 0.0336)); } }
@keyframes demo-card-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes demo-card-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes demo-veil-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes demo-veil-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 560px) {
  .demo-tools { gap: 4px; }
  .demo-tool { width: 64px; padding: 6px 1px 4px; border-radius: 14px; font-size: 10.5px; }
  .demo-tool img { height: 40px; }
  .demo-clock { width: 184px; }
}
