/*
  You Clay UK shared styles
  Replace colours, spacing, or typography here if the brand direction changes.
*/

:root {
  --cream: #fff8ea;
  --paper: #fffdf7;
  --ink: #44372f;
  --muted: #6d5c50;
  --line: #e3d7c5;
  --coral: #ffb7a1;
  --sun: #ffe26d;
  --mint: #8ed8c7;
  --sky: #77c6ff;
  --lilac: #b7a8ff;
  --rose: #f6a6c8;
  --leaf: #c8e77b;
  --deep: #26324a;
  --shadow: 0 18px 36px rgba(68, 55, 47, 0.13);
  --soft-shadow: 0 10px 20px rgba(68, 55, 47, 0.09);
  --radius: 8px;
  --max-width: 1180px;
  --section: clamp(3.5rem, 7vw, 6.5rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 226, 109, 0.18), transparent 25rem),
    linear-gradient(180deg, #fff8ea 0%, #fffdf7 38%, #fff8ea 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 4px solid rgba(119, 198, 255, 0.9);
  outline-offset: 4px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  transform: translateY(-150%);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0.65rem 0.9rem;
  font-weight: 800;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 2px solid rgba(68, 55, 47, 0.12);
  background: rgba(255, 248, 234, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-link img {
  width: 132px;
}

.brand-name {
  font-weight: 900;
  line-height: 1;
}

.brand-name span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-toggle {
  display: none;
  min-width: 46px;
  min-height: 46px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 21px;
  height: 3px;
  margin-inline: auto;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.nav-toggle-lines::before {
  transform: translateY(-7px);
}

.nav-toggle-lines::after {
  transform: translateY(4px);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: var(--radius);
  padding: 0.58rem 0.78rem;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(142, 216, 199, 0.45);
}

main {
  min-width: 0;
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6.75rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.home-hero {
  min-height: auto;
  display: flex;
  align-items: center;
  padding-block: clamp(2rem, 4.5vw, 3.5rem);
}

.home-hero::after,
.page-hero::after {
  position: absolute;
  right: -7rem;
  bottom: -6rem;
  width: 19rem;
  height: 19rem;
  border: 3px solid rgba(68, 55, 47, 0.16);
  border-radius: 50%;
  background: rgba(255, 183, 161, 0.22);
  content: "";
}

.hero-grid,
.split-grid,
.maker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero-copy,
.page-hero .container {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: #71552f;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.6rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 1rem 0 0 var(--mint), 2rem 0 0 var(--sun);
  content: "";
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
.hero-title {
  max-width: 10.5em;
  margin-bottom: 1rem;
  font-size: clamp(2.55rem, 6.2vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.page-hero h1 {
  max-width: 11em;
  font-size: clamp(2.35rem, 5.5vw, 4.45rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.32rem);
}

.copy-block p,
.card p,
.clay-card p,
.resource-card p,
.faq p {
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: var(--paper);
  box-shadow: 5px 5px 0 rgba(68, 55, 47, 0.17);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(68, 55, 47, 0.16);
}

.button.primary {
  background: var(--mint);
}

.button.secondary {
  background: var(--sun);
}

.button.soft {
  background: #f9edf5;
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.image-frame {
  position: relative;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.image-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-frame.tall img {
  aspect-ratio: 4 / 5;
}

.floating-note {
  position: absolute;
  right: -0.8rem;
  bottom: 1.1rem;
  max-width: 13rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sun);
  padding: 0.8rem;
  box-shadow: 5px 5px 0 rgba(68, 55, 47, 0.18);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.section {
  padding: var(--section) 0;
}

.section.alt {
  background: #f3fbf7;
}

.section.sunny {
  background: #fff1c9;
}

.section.rose {
  background: #fff0f5;
}

.section-header {
  max-width: 720px;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
}

.centered {
  margin-inline: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: 1rem;
}

.three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.clay-card,
.resource-card,
.experiment-card,
.faq details,
.note-box {
  border: 3px solid rgba(68, 55, 47, 0.92);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.card,
.note-box {
  padding: 1.2rem;
}

.card.feature {
  display: grid;
  min-height: 250px;
  align-content: space-between;
}

.card-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font-size: 1.55rem;
  font-weight: 900;
}

.card.mint .card-icon,
.resource-card.mint {
  background: #edf9f5;
}

.card.lilac .card-icon,
.resource-card.lilac {
  background: #f4f0ff;
}

.card.coral .card-icon,
.resource-card.coral {
  background: #fff0ea;
}

.card.sky .card-icon,
.resource-card.sky {
  background: #eef8ff;
}

.mini-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--muted);
}

.mini-list li::before {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.difference-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.texture-panel {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff0ea;
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: var(--shadow);
}

.texture-panel img {
  width: min(220px, 65%);
  margin: 1rem auto 0;
}

.social-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border-block: 3px solid var(--ink);
  background: var(--deep);
  padding: 1.2rem;
  color: #fff8ea;
}

.social-strip span {
  margin-right: 0.5rem;
  font-weight: 900;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid rgba(255, 248, 234, 0.78);
  border-radius: var(--radius);
  padding: 0.5rem 0.82rem;
  color: #fff8ea;
  font-weight: 900;
  text-decoration: none;
}

.social-link:hover {
  background: rgba(255, 248, 234, 0.12);
}

.cta-band {
  position: relative;
  overflow: hidden;
  border-block: 3px solid var(--ink);
  background: linear-gradient(90deg, #ffefe8 0%, #eff9f6 48%, #fff2bd 100%);
  padding: clamp(2.2rem, 5vw, 4rem) 0;
}

.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band p {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
}

.clay-card {
  overflow: hidden;
}

.clay-card img,
.resource-card img,
.experiment-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 3px solid var(--ink);
}

.clay-card-content,
.resource-content,
.experiment-card {
  padding: 1rem;
}

.meta-pill {
  display: inline-flex;
  margin: 0.15rem 0.25rem 0.15rem 0;
  border: 2px solid rgba(68, 55, 47, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: #fff8ea;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.care-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.care-list li {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1rem;
  box-shadow: var(--soft-shadow);
}

.explore-intro {
  background: linear-gradient(180deg, #fff8ea 0%, #f3fbf7 100%);
}

.scroll-effect {
  --scene-progress: 0;
  --scene-eased: 0;
  --scene-before-scale: 1;
  --scene-after-scale: 1.025;
  position: relative;
  min-height: 165vh;
  background: var(--section-start, #fff8ea);
  transition: background-color 120ms linear;
}

.scroll-pin {
  position: sticky;
  top: 78px;
  display: grid;
  min-height: calc(100vh - 78px);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.scroll-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.2rem);
}

.scroll-copy {
  color: var(--ink);
}

.scroll-copy p {
  color: var(--muted);
}

.scroll-effect.is-dark .scroll-copy,
.scroll-effect.is-dark .scroll-copy p {
  color: #fff8ea;
}

.scroll-effect.is-dark .eyebrow {
  color: #fff8ea;
}

.scroll-effect.is-dark .eyebrow::before {
  border-color: rgba(255, 248, 234, 0.8);
}

.image-stack {
  position: relative;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}

.image-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 100ms linear, filter 100ms linear, transform 100ms linear;
}

.image-stack .image-after {
  opacity: 1;
  transform: scale(var(--scene-after-scale));
}

.image-stack .image-before {
  opacity: var(--scene-before-opacity, 1);
  filter: saturate(var(--scene-before-saturation, 1)) brightness(var(--scene-before-brightness, 1));
  transform: scale(var(--scene-before-scale));
}

.scene-tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: var(--scene-eased);
  transition: opacity 100ms linear;
}

[data-scene="glow"] .scene-tint {
  background: radial-gradient(circle at 50% 48%, transparent 24%, rgba(10, 19, 49, 0.48) 100%);
}

[data-scene="uv"] .scene-tint {
  background: linear-gradient(115deg, rgba(255, 226, 109, 0.12), transparent 42%, rgba(255, 248, 234, 0.3));
}

[data-scene="thermo"] .scene-tint {
  background: radial-gradient(circle at 55% 45%, rgba(255, 232, 178, 0.1), rgba(255, 124, 104, 0.3));
}

.scene-label {
  position: absolute;
  bottom: 0.85rem;
  z-index: 4;
  border: 2px solid rgba(68, 55, 47, 0.82);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  padding: 0.25rem 0.65rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  transition: opacity 100ms linear, transform 100ms linear;
}

.scene-label-start {
  left: 0.85rem;
  opacity: var(--scene-before-opacity, 1);
  transform: translateY(var(--scene-label-start-offset, 0));
}

.scene-label-end {
  right: 0.85rem;
  opacity: var(--scene-eased);
  transform: translateY(var(--scene-label-end-offset, 0.45rem));
}

.effect-sparkles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: var(--scene-eased);
  transition: opacity 120ms linear;
}

.effect-sparkles::before,
.effect-sparkles::after {
  position: absolute;
  width: 4rem;
  height: 4rem;
  background: url("../assets/decorative-sparkles.svg") center / contain no-repeat;
  content: "";
}

.effect-sparkles::before {
  left: 6%;
  top: 8%;
}

.effect-sparkles::after {
  right: 7%;
  bottom: 9%;
  transform: rotate(18deg);
}

.sunbeam {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(115deg, rgba(255, 226, 109, 0.62) 0%, transparent 38%, rgba(255, 248, 234, 0.2) 72%);
  mix-blend-mode: screen;
  opacity: var(--scene-overlay-opacity, 0);
}

.temperature-meter {
  overflow: hidden;
  height: 1rem;
  margin: 1.2rem 0 0.55rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #dff5ff;
}

.temperature-fill {
  width: var(--scene-eased-percent, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--coral), var(--sun));
}

.heat-rings,
.heat-rings::before,
.heat-rings::after {
  position: absolute;
  z-index: 3;
  border: 2px solid rgba(255, 248, 234, 0.84);
  border-radius: 50%;
  content: "";
  opacity: var(--scene-heat-opacity, 0);
  transition: opacity 100ms linear, transform 100ms linear;
}

.heat-rings {
  right: 12%;
  top: 13%;
  width: 2.7rem;
  height: 2.7rem;
  transform: scale(var(--scene-heat-scale, 0.68));
}

.heat-rings::before {
  inset: 0.55rem;
}

.heat-rings::after {
  inset: -0.6rem;
}

.temperature-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.swatch-card {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1rem;
  box-shadow: var(--soft-shadow);
}

.swatches {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.swatch {
  width: 2.15rem;
  height: 2.15rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--swatch);
}

.experiment-shelf {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 1rem;
}

.experiment-card {
  min-height: 12rem;
}

.banner-image {
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.banner-image img {
  width: 100%;
  aspect-ratio: 15 / 8;
  object-fit: cover;
}

.activity-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0.9rem;
  font-weight: 900;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.game-launcher-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-launcher {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-launcher .resource-content {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0.75rem;
}

.game-launcher .resource-content p {
  margin-bottom: 0;
}

.game-launcher .button {
  width: 100%;
  margin-top: auto;
}

.game-status {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff8ea;
  padding: 0.5rem 0.85rem;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(68, 55, 47, 0.16);
}

.back-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(68, 55, 47, 0.16);
}

.game-page-return {
  margin: 1.5rem 0 0;
}

/* Kids Island turns the activity chooser into one editable illustrated map. */
.kids-island-hero {
  background: #e8faf7;
}

.island-section {
  background: #fffdf7;
}

.island-section-header {
  margin-bottom: 1.2rem;
}

.island-map-figure {
  margin: 0;
}

.island-map-stage {
  --island-pan-x: 0%;
  --island-pan-y: 0%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #66cfd5;
  box-shadow: var(--shadow);
}

.island-map-stage::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(35, 69, 84, 0.38);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 820ms cubic-bezier(0.22, 1, 0.36, 1);
}

.island-map-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  transform: scale(1) translate(0, 0);
  transform-origin: center;
  transition: transform 1000ms cubic-bezier(0.22, 1, 0.36, 1);
}

.island-map-stage.is-focused .island-map-viewport {
  transform: scale(1.16) translate(var(--island-pan-x), var(--island-pan-y));
}

.island-map-stage.is-focused::after {
  opacity: 1;
}

.island-map-viewport > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.island-hotspots {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.island-travel-magic {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.island-travel-particle {
  --particle-turn: 0deg;
  position: absolute;
  left: var(--particle-x);
  top: var(--particle-y);
  width: var(--particle-size);
  height: var(--particle-size);
  opacity: 0;
  animation: island-particle-drift 780ms cubic-bezier(0.22, 1, 0.36, 1) var(--particle-delay) both;
}

.island-travel-magic[data-island-effect="fireflies"] .island-travel-particle {
  border-radius: 50%;
  background: #fff7b8;
  box-shadow: 0 0 10px 3px rgba(255, 235, 113, 0.88);
}

.island-travel-magic[data-island-effect="bubbles"] .island-travel-particle,
.island-travel-magic[data-island-effect="sea-sparkles"] .island-travel-particle {
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(156, 225, 255, 0.23);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.45);
}

.island-travel-magic[data-island-effect="bubbles"] .island-travel-particle {
  border-color: rgba(255, 241, 248, 0.95);
  background: rgba(255, 151, 188, 0.3);
}

.island-travel-magic[data-island-effect="twinkles"] .island-travel-particle,
.island-travel-magic[data-island-effect="shimmer"] .island-travel-particle {
  --particle-turn: 45deg;
  border-radius: 2px;
  background: #fff8c8;
  box-shadow: 0 0 9px 2px rgba(255, 250, 198, 0.78);
}

.island-travel-magic[data-island-effect="shimmer"] .island-travel-particle {
  background: #ddfff7;
  box-shadow: 0 0 8px 2px rgba(195, 255, 239, 0.86);
}

.island-travel-magic[data-island-effect="meadow-mist"] .island-travel-particle {
  width: calc(var(--particle-size) * 1.8);
  border-radius: 999px;
  background: rgba(255, 255, 239, 0.8);
  box-shadow: 0 0 10px 3px rgba(240, 255, 190, 0.58);
}

@keyframes island-particle-drift {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(var(--particle-turn));
  }

  24% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) scale(1.25) rotate(var(--particle-turn));
  }
}

.island-hotspot {
  position: absolute;
  left: var(--place-x);
  top: var(--place-y);
  display: grid;
  min-width: 7.75rem;
  min-height: 48px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--place-colour);
  padding: 0.42rem 0.7rem;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(0.72rem, 1.45vw, 0.98rem);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 4px 4px 0 rgba(68, 55, 47, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.island-hotspot::before {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.28rem);
  width: 0.78rem;
  height: 0.78rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff8ea;
  content: "";
  transform: translateX(-50%);
}

.island-hotspot:hover {
  transform: translate(-50%, calc(-50% - 2px));
  box-shadow: 6px 6px 0 rgba(68, 55, 47, 0.2);
}

.island-hotspot.is-selected {
  z-index: 2;
  animation: island-hotspot-pulse 1150ms cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes island-hotspot-pulse {
  0%,
  100% {
    box-shadow: 4px 4px 0 rgba(68, 55, 47, 0.2), 0 0 0 0 color-mix(in srgb, var(--place-colour) 58%, transparent);
  }

  55% {
    box-shadow: 5px 5px 0 rgba(68, 55, 47, 0.2), 0 0 0 12px color-mix(in srgb, var(--place-colour) 8%, transparent), 0 0 24px 4px color-mix(in srgb, var(--place-colour) 55%, transparent);
  }
}

.island-hotspot-name,
.island-hotspot-status {
  display: block;
}

.island-hotspot-status {
  margin-top: 0.16rem;
  font-size: 0.72em;
  font-weight: 800;
}

.island-map-figure figcaption {
  margin-top: 0.8rem;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.island-place-fallback {
  margin-top: 1.2rem;
}

.island-place-fallback h3 {
  margin-bottom: 0.7rem;
}

.island-place-fallback ul {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.island-place-link {
  display: grid;
  width: 100%;
  gap: 0.25rem;
  border: 2px solid rgba(68, 55, 47, 0.45);
  border-radius: var(--radius);
  background: #fff8ea;
  padding: 0.8rem;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.island-place-link span {
  color: var(--muted);
  font-size: 0.9rem;
}

.island-parent-note {
  margin-top: 1.2rem;
}

@media (min-width: 681px) {
  .island-place-fallback {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .island-place-fallback:focus-within {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }
}

.island-modal {
  width: min(980px, calc(100% - 2rem));
  max-width: 980px;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffdad0 0%, #fff0b5 48%, #c7f1e5 100%);
  padding: 0.35rem;
  color: var(--ink);
  box-shadow: 0 1.35rem 0 rgba(38, 50, 74, 0.28);
}

.island-modal[open] {
  animation: island-modal-arrive 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes island-modal-arrive {
  0% {
    opacity: 0;
    transform: translateY(1.2rem) scale(0.94) rotate(-0.45deg);
    box-shadow: 0 0 0 rgba(255, 244, 177, 0);
  }

  72% {
    opacity: 1;
    transform: translateY(-0.12rem) scale(1.012) rotate(0.1deg);
    box-shadow: 0 0 28px rgba(255, 244, 177, 0.6), 0 1.35rem 0 rgba(38, 50, 74, 0.28);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
    box-shadow: 0 0 14px rgba(255, 244, 177, 0.28), 0 1.35rem 0 rgba(38, 50, 74, 0.28);
  }
}

.island-modal::backdrop {
  background: rgba(38, 50, 74, 0.62);
  backdrop-filter: blur(4px);
}

.island-modal-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100dvh - 2.75rem);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: calc(var(--radius) - 2px);
  background: var(--paper);
}

.island-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px dashed rgba(68, 55, 47, 0.55);
  background: #fff8ea;
  padding: 0.85rem 1rem;
}

.island-modal-header .eyebrow {
  margin-bottom: 0.2rem;
}

.island-modal-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.island-modal-close {
  display: inline-grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(68, 55, 47, 0.18);
}

.island-modal-close:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(68, 55, 47, 0.18);
}

.island-modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(0.9rem, 2.5vw, 1.35rem);
}

.island-modal-description {
  max-width: 58ch;
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 800;
}

.island-modal-panel[hidden] {
  display: none;
}

.island-modal-panel .mixer,
.island-modal-panel .glow-lab {
  margin-top: 0;
}

.island-idea-panel > h3 {
  margin-bottom: 1rem;
}

.island-resource-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.island-resource-list article {
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff8ea;
  box-shadow: var(--soft-shadow);
}

.island-resource-list img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-bottom: 3px solid var(--ink);
  object-fit: cover;
}

.island-resource-list h4,
.island-resource-list p {
  margin-inline: 0.8rem;
}

.island-resource-list h4 {
  margin-top: 0.8rem;
  margin-bottom: 0.38rem;
  font-size: 1rem;
}

.island-resource-list p {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.island-make-along-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.island-make-along-list li {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff8ea;
  padding: 0.85rem;
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.island-modal-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1.15rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sun);
  padding: 0.55rem 0.9rem;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
  box-shadow: 3px 3px 0 rgba(68, 55, 47, 0.18);
}

.island-modal-back:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(68, 55, 47, 0.18);
}

/*
  Charm Forest uses one illustrated clearing with code-native beads, controls and
  workbench layered above it. Replace the background image in kids-corner.html
  with final Procreate artwork without changing the game interactions.
*/
.charm-forest {
  display: grid;
  gap: 1rem;
}

.charm-forest-heading,
.charm-base-picker,
.charm-bucket-panel,
.charm-testing-panel,
.charm-finish-panel {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.charm-forest-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.56fr);
  gap: 1rem;
  align-items: center;
  background: #edf9e8;
  padding: clamp(0.9rem, 2.5vw, 1.25rem);
}

.charm-forest-heading .eyebrow,
.charm-base-picker .eyebrow,
.charm-bucket-panel .eyebrow,
.charm-testing-panel .eyebrow,
.charm-finish-panel .eyebrow {
  margin-bottom: 0.25rem;
}

.charm-forest-heading h3,
.charm-base-picker h4,
.charm-bucket-panel h4,
.charm-testing-panel h4,
.charm-finish-panel h4 {
  margin: 0;
}

.charm-forest-heading p:last-child:not(.charm-forest-status) {
  max-width: 62ch;
  margin: 0.55rem 0 0;
}

.charm-forest-status {
  min-height: 4rem;
  margin: 0;
  border: 2px dashed rgba(68, 55, 47, 0.45);
  border-radius: var(--radius);
  background: #fffdf7;
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.35;
}

.charm-base-picker {
  background: #fff7de;
  padding: 0.9rem;
}

.charm-base-picker > h4 {
  margin-bottom: 0.7rem;
}

.charm-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.charm-choice,
.atmosphere-button,
.charm-mini-button {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
}

.charm-choice {
  min-height: 44px;
  background: #fffdf7;
  padding: 0.48rem 0.72rem;
  box-shadow: 2px 2px 0 rgba(68, 55, 47, 0.15);
}

.charm-choice:hover,
.charm-choice.is-selected,
.atmosphere-button:hover,
.atmosphere-button.is-selected,
.charm-mini-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(68, 55, 47, 0.16);
}

.charm-choice.is-selected {
  background: var(--sun);
}

.charm-choice:disabled,
.atmosphere-button:disabled,
.charm-mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.charm-forest-scene {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #dcecc1;
  box-shadow: var(--soft-shadow);
  transition: background-color 500ms ease;
}

.charm-forest-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 500ms ease, opacity 500ms ease;
}

.charm-forest-scene::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: transparent;
  content: "";
  pointer-events: none;
  transition: background-color 500ms ease;
}

.charm-forest-scene[data-atmosphere="dark"] .charm-forest-backdrop {
  filter: brightness(0.34) saturate(0.85) hue-rotate(12deg);
}

.charm-forest-scene[data-atmosphere="dark"]::after {
  background: rgba(21, 30, 65, 0.34);
}

.charm-forest-scene[data-atmosphere="sunny"] .charm-forest-backdrop {
  filter: saturate(1.25) brightness(1.08);
}

.charm-forest-scene[data-atmosphere="uv"] .charm-forest-backdrop {
  filter: saturate(1.3) hue-rotate(18deg) brightness(0.94);
}

.charm-forest-scene[data-atmosphere="uv"]::after {
  background: rgba(171, 126, 255, 0.16);
}

.charm-forest-scene[data-atmosphere="warm"] .charm-forest-backdrop {
  filter: sepia(0.12) saturate(1.1) brightness(1.04);
}

.charm-forest-scene[data-atmosphere="cool"] .charm-forest-backdrop {
  filter: saturate(0.9) hue-rotate(184deg) brightness(0.96);
}

.charm-forest-trees {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.bead-tree {
  position: absolute;
  display: grid;
  width: min(28%, 180px);
  gap: 0.45rem;
  justify-items: center;
  pointer-events: auto;
}

.bead-tree-left {
  top: 8%;
  left: 3%;
}

.bead-tree-middle {
  top: 9%;
  left: 50%;
  transform: translateX(-50%);
}

.bead-tree-right {
  top: 8%;
  right: 3%;
}

.bead-tree-sign {
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.96);
  padding: 0.22rem 0.56rem;
  color: var(--ink);
  font-size: clamp(0.68rem, 1.7vw, 0.84rem);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  box-shadow: 2px 2px 0 rgba(68, 55, 47, 0.16);
}

.tree-bead-cluster {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 0.45rem;
  width: 100%;
  justify-items: center;
}

.tree-bead {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease;
}

.tree-bead:hover:not(:disabled) {
  transform: translateY(-4px) rotate(-4deg);
}

.tree-bead:disabled {
  cursor: default;
}

.tree-bead-orb,
.charm-bead-orb,
.forest-bucket-bead,
.charm-string-orb {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--bead-colour);
  box-shadow: inset 6px -7px 0 rgba(68, 55, 47, 0.13), inset -3px 4px 0 rgba(255, 255, 255, 0.36), 2px 2px 0 rgba(68, 55, 47, 0.18);
}

.tree-bead-orb {
  width: 42px;
  height: 42px;
}

.tree-bead-orb::before,
.charm-bead-orb::before,
.forest-bucket-bead::before,
.charm-string-orb::before {
  position: absolute;
  top: 20%;
  left: 23%;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  content: "";
}

[data-sparkle="true"]::after {
  position: absolute;
  top: -0.35rem;
  right: -0.28rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  background: #fff8c8;
  box-shadow: 0 0 7px 2px rgba(255, 248, 200, 0.9);
  content: "";
  transform: rotate(45deg);
}

.tree-bead-letter {
  position: absolute;
  z-index: 1;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  pointer-events: none;
}

.tree-bead.is-regrowing .tree-bead-orb {
  border-style: dashed;
  background: #f8eed0;
  animation: bead-regrow 700ms ease-in-out infinite alternate;
}

.charm-forest-scene[data-atmosphere="dark"] [data-type="glow"] {
  box-shadow: inset 6px -7px 0 rgba(68, 55, 47, 0.13), inset -3px 4px 0 rgba(255, 255, 255, 0.42), 0 0 11px 4px rgba(232, 255, 157, 0.9), 0 0 28px 7px rgba(209, 255, 123, 0.6);
  animation: glow-bead 1.1s ease-in-out infinite alternate;
}

.charm-forest-scene[data-atmosphere="uv"] [data-type="uv"] {
  box-shadow: inset 6px -7px 0 rgba(68, 55, 47, 0.13), inset -3px 4px 0 rgba(255, 255, 255, 0.42), 0 0 15px 5px rgba(171, 126, 255, 0.8);
}

.charm-pick-sparkles {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.charm-pick-sparkle {
  position: absolute;
  left: var(--sparkle-x);
  top: var(--sparkle-y);
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #fff9bb;
  box-shadow: 0 0 8px 2px rgba(255, 250, 180, 0.9);
  animation: charm-pick-sparkle 650ms cubic-bezier(0.22, 1, 0.36, 1) var(--sparkle-delay) both;
}

.charm-workbench {
  position: absolute;
  z-index: 3;
  bottom: 0.85rem;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0.75rem;
  width: min(460px, 68%);
  min-height: 192px;
  border: 3px solid var(--ink);
  border-radius: 18px 18px 10px 10px;
  background: #e6aa75;
  padding: 0.8rem 0.85rem 0.62rem;
  box-shadow: 0 10px 0 rgba(68, 55, 47, 0.18);
  transform: translateX(-50%);
}

.charm-workbench::after {
  position: absolute;
  right: 0;
  bottom: -0.55rem;
  left: 0;
  height: 0.55rem;
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #bd744c;
  content: "";
}

.forest-bucket {
  position: relative;
  display: grid;
  min-height: 115px;
  align-content: end;
  justify-items: center;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 0.7rem 0.7rem 1rem 1rem;
  background: #f3c36d;
  padding: 1.7rem 0.5rem 0.48rem;
}

.forest-bucket::before {
  position: absolute;
  top: 0.55rem;
  left: 12%;
  width: 76%;
  height: 1.1rem;
  border: 2px solid rgba(68, 55, 47, 0.65);
  border-radius: 50%;
  background: #754b35;
  content: "";
}

.forest-bucket-handle {
  position: absolute;
  top: -0.72rem;
  left: 50%;
  width: 60%;
  height: 1.6rem;
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
  transform: translateX(-50%);
}

.forest-bucket-beads {
  z-index: 1;
  display: flex;
  min-height: 2.3rem;
  max-width: 100%;
  flex-wrap: wrap;
  align-content: end;
  justify-content: center;
  gap: 0.1rem;
}

.forest-bucket-bead {
  width: 1.05rem;
  height: 1.05rem;
}

.forest-bucket-label,
.charm-pin-label {
  z-index: 1;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
}

.charm-pin-area {
  position: relative;
  display: grid;
  min-height: 160px;
  align-content: center;
  justify-items: center;
  border: 2px dashed rgba(68, 55, 47, 0.58);
  border-radius: var(--radius);
  background: rgba(255, 248, 234, 0.72);
  padding: 0.6rem 0.6rem 0.4rem;
}

.charm-pin-top {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  width: 1.1rem;
  height: 1.1rem;
  border: 3px solid #9fa5aa;
  border-radius: 50%;
  background: #f5f7fa;
  transform: translateX(-50%);
}

.charm-pin {
  position: relative;
  display: flex;
  min-height: 102px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 0 0.4rem;
}

.charm-pin::before {
  position: absolute;
  top: 0.35rem;
  bottom: 0.22rem;
  left: 50%;
  z-index: -1;
  width: 3px;
  border-radius: 999px;
  background: #9fa5aa;
  content: "";
  transform: translateX(-50%);
}

.charm-string-bead {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  margin-top: -0.22rem;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 160ms ease;
}

.charm-string-bead:hover:not(:disabled) {
  transform: scale(1.12);
}

.charm-string-bead:disabled {
  cursor: default;
}

.charm-string-orb {
  width: 1.6rem;
  height: 1.6rem;
}

.charm-forest-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 1rem;
}

.charm-bucket-panel,
.charm-testing-panel,
.charm-finish-panel {
  background: #fffdf7;
  padding: 1rem;
}

.charm-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.charm-count {
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint);
  padding: 0.15rem 0.48rem;
  font-size: 0.78rem;
  font-weight: 900;
}

.charm-panel-note,
.charm-testing-note {
  margin: 0.7rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.charm-bucket-list {
  display: grid;
  gap: 0.48rem;
  max-height: 280px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.charm-bucket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 2px solid rgba(68, 55, 47, 0.24);
  border-radius: var(--radius);
  background: #fff8ea;
  padding: 0.42rem;
}

.charm-bucket-bead-info {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
}

.charm-bead-orb {
  width: 1.8rem;
  height: 1.8rem;
}

.charm-bucket-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.charm-bucket-copy strong {
  overflow: hidden;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charm-bucket-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.charm-bucket-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.32rem;
}

.charm-mini-button {
  min-height: 33px;
  background: var(--sun);
  padding: 0.22rem 0.42rem;
  font-size: 0.74rem;
}

.charm-mini-button-soft {
  background: #fffdf7;
}

.charm-bucket-empty {
  border: 2px dashed rgba(68, 55, 47, 0.4);
  border-radius: var(--radius);
  background: #fff8ea;
  padding: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.charm-atmosphere-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
  margin-top: 0.9rem;
}

.atmosphere-button {
  min-height: 42px;
  background: #eaf8f7;
  padding: 0.36rem 0.32rem;
  font-size: clamp(0.7rem, 1.6vw, 0.84rem);
  line-height: 1.12;
  box-shadow: 2px 2px 0 rgba(68, 55, 47, 0.13);
}

.atmosphere-button.is-selected {
  background: var(--lilac);
}

.charm-finish-panel {
  display: grid;
  gap: 0.85rem;
  background: #fff4df;
}

.charm-detail-row .charm-choice {
  flex: 1 1 8rem;
}

.charm-finish-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: charm-finish;
}

.charm-finish-steps li {
  position: relative;
  min-height: 4.7rem;
  border: 2px dashed rgba(68, 55, 47, 0.38);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.72);
  padding: 0.6rem 0.45rem 0.45rem 2.05rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  counter-increment: charm-finish;
}

.charm-finish-steps li::before {
  position: absolute;
  top: 0.5rem;
  left: 0.45rem;
  display: grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fffdf7;
  color: var(--ink);
  content: counter(charm-finish);
  font-size: 0.68rem;
}

.charm-finish-steps li.is-active {
  border-style: solid;
  border-color: var(--ink);
  background: #dff3bd;
  color: var(--ink);
}

.charm-finish-steps li.is-current {
  animation: finish-step-pulse 650ms ease-in-out infinite alternate;
}

.charm-finish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.charm-finish-actions .button {
  flex: 1 1 15rem;
}

.charm-result {
  min-height: 1.6rem;
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.charm-forest.is-finished .charm-workbench {
  box-shadow: 0 0 0 5px rgba(255, 226, 109, 0.48), 0 10px 0 rgba(68, 55, 47, 0.18), 0 0 28px rgba(255, 231, 123, 0.75);
}

.charm-forest.is-finished .charm-result {
  color: var(--ink);
}

@keyframes charm-pick-sparkle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(0deg);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sparkle-drift-x)), calc(-50% + var(--sparkle-drift-y))) scale(1.15) rotate(90deg);
  }
}

@keyframes bead-regrow {
  from {
    transform: scale(0.74);
  }

  to {
    transform: scale(1);
  }
}

@keyframes glow-bead {
  from {
    transform: scale(0.94);
  }

  to {
    transform: scale(1.07);
  }
}

@keyframes finish-step-pulse {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-2px);
  }
}

/*
  Bead Bridge keeps the background art separate from the repair controls. The
  18 bead slots, tray, flowers and Ant are all code-native so the three repair
  modes stay interactive when final Procreate artwork replaces the placeholder.
*/
.bead-bridge {
  display: grid;
  gap: 1rem;
}

.bead-bridge-heading,
.bridge-mode-picker,
.bridge-tray-panel,
.bridge-help-panel {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.bead-bridge-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr);
  gap: 1rem;
  align-items: center;
  background: #eef9e7;
  padding: clamp(0.9rem, 2.5vw, 1.25rem);
}

.bead-bridge-heading .eyebrow,
.bridge-tray-panel .eyebrow,
.bridge-help-panel .eyebrow {
  margin-bottom: 0.25rem;
}

.bead-bridge-heading h3,
.bridge-mode-picker h4,
.bridge-tray-panel h4,
.bridge-help-panel h4 {
  margin: 0;
}

.bead-bridge-heading p:last-child:not(.bead-bridge-status) {
  max-width: 62ch;
  margin: 0.55rem 0 0;
}

.bead-bridge-status {
  min-height: 4rem;
  margin: 0;
  border: 2px dashed rgba(68, 55, 47, 0.45);
  border-radius: var(--radius);
  background: #fffdf7;
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.35;
}

.bridge-mode-picker {
  background: #fff6de;
  padding: 0.9rem;
}

.bridge-mode-picker > h4 {
  margin-bottom: 0.7rem;
}

.bridge-mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.bridge-mode-button {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fffdf7;
  padding: 0.46rem 0.55rem;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(0.78rem, 1.7vw, 0.94rem);
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 2px 2px 0 rgba(68, 55, 47, 0.15);
}

.bridge-mode-button:hover,
.bridge-mode-button.is-selected {
  background: var(--sun);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(68, 55, 47, 0.16);
}

.bridge-mode-copy {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-weight: 800;
}

.bead-bridge-scene {
  position: relative;
  min-height: 445px;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #d5ebc1;
  box-shadow: var(--soft-shadow);
}

.bead-bridge-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 500ms ease, opacity 500ms ease;
}

.bead-bridge-scene::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: transparent;
  content: "";
  pointer-events: none;
  transition: background-color 500ms ease;
}

.bead-bridge-scene.is-dark .bead-bridge-backdrop {
  filter: brightness(0.34) saturate(0.8) hue-rotate(12deg);
}

.bead-bridge-scene.is-dark::after {
  background: rgba(18, 31, 67, 0.35);
}

.bead-bridge-scene.is-sunny .bead-bridge-backdrop {
  filter: saturate(1.22) brightness(1.1);
}

.bead-bridge-track {
  position: absolute;
  top: 43%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: min(86%, 830px);
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: clamp(0.06rem, 0.35vw, 0.23rem);
  align-items: center;
  transform: translateX(-50%);
}

.bridge-slot {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease;
}

.bridge-slot:hover:not(:disabled) {
  transform: translateY(-3px);
}

.bridge-slot:disabled {
  cursor: default;
}

.bridge-bead-orb,
.bridge-tray-orb {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--bridge-bead-colour);
  box-shadow: inset 5px -6px 0 rgba(68, 55, 47, 0.13), inset -2px 3px 0 rgba(255, 255, 255, 0.42), 2px 2px 0 rgba(68, 55, 47, 0.2);
}

.bridge-bead-orb::before,
.bridge-tray-orb::before {
  position: absolute;
  top: 20%;
  left: 23%;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  content: "";
}

.bridge-slot-label {
  position: absolute;
  z-index: 1;
  color: var(--ink);
  font-size: clamp(0.5rem, 1vw, 0.72rem);
  font-weight: 900;
  pointer-events: none;
}

.bridge-slot.is-empty::before {
  position: absolute;
  inset: 9%;
  border: 2px dashed rgba(68, 55, 47, 0.78);
  border-radius: 50%;
  background: rgba(255, 248, 234, 0.74);
  content: "";
}

.bridge-slot.is-dim::before {
  border-color: #796f62;
  background: rgba(64, 72, 93, 0.72);
}

.bridge-slot.is-dim .bridge-slot-label {
  color: #fff8ea;
  font-size: clamp(0.42rem, 0.85vw, 0.64rem);
}

.bead-bridge-scene.is-dark .bridge-slot.is-glow .bridge-bead-orb {
  box-shadow: inset 5px -6px 0 rgba(68, 55, 47, 0.12), inset -2px 3px 0 rgba(255, 255, 255, 0.48), 0 0 12px 4px rgba(233, 255, 155, 0.95), 0 0 25px 6px rgba(190, 255, 150, 0.62);
  animation: bridge-glow 1.1s ease-in-out infinite alternate;
}

.bridge-slot.is-gentle-wrong {
  animation: bridge-gentle-wiggle 420ms ease-in-out 2;
}

.bridge-flower-garden {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.bridge-flower {
  position: absolute;
  left: var(--flower-x);
  top: var(--flower-y);
  display: grid;
  width: clamp(48px, 7vw, 68px);
  height: clamp(48px, 7vw, 68px);
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.bridge-flower-bloom {
  position: relative;
  display: block;
  width: 82%;
  height: 82%;
  border: 3px solid var(--ink);
  border-radius: 46% 54% 48% 52%;
  background: #f1e9d6;
  box-shadow: inset 7px -7px 0 rgba(68, 55, 47, 0.1), 2px 2px 0 rgba(68, 55, 47, 0.2);
  transform: rotate(16deg);
}

.bridge-flower-bloom::before,
.bridge-flower-bloom::after {
  position: absolute;
  inset: 22%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff8bd;
  content: "";
}

.bridge-flower-bloom::after {
  inset: auto;
  top: 34%;
  left: 34%;
  width: 32%;
  height: 32%;
  background: #d59d5d;
}

.bridge-flower.is-painted .bridge-flower-bloom {
  background: var(--flower-colour);
}

.bridge-flower.is-blooming .bridge-flower-bloom {
  box-shadow: inset 7px -7px 0 rgba(68, 55, 47, 0.1), 0 0 17px 4px rgba(255, 250, 179, 0.9), 2px 2px 0 rgba(68, 55, 47, 0.2);
  animation: flower-bloom 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bridge-flower.is-gentle-wrong {
  animation: bridge-gentle-wiggle 420ms ease-in-out 2;
}

.bridge-flower-label {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: #fffdf7;
  padding: 0.05rem 0.25rem;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1.15;
}

.bridge-sparkles {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.bridge-sparkle {
  position: absolute;
  left: var(--sparkle-left);
  top: var(--sparkle-top);
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #fff9b8;
  box-shadow: 0 0 8px 2px rgba(255, 249, 184, 0.95);
  animation: bridge-sparkle 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--sparkle-delay) both;
}

.bead-bridge-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(250px, 0.88fr);
  gap: 1rem;
}

.bridge-tray-panel,
.bridge-help-panel {
  background: #fffdf7;
  padding: 1rem;
}

.bridge-tray-note,
.bridge-help-panel > p:last-of-type {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.4;
}

.bridge-bead-tray {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.bridge-tray-bead {
  display: grid;
  min-height: 103px;
  justify-items: center;
  align-content: center;
  gap: 0.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff8ea;
  padding: 0.42rem;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  box-shadow: 2px 2px 0 rgba(68, 55, 47, 0.12);
}

.bridge-tray-bead:hover,
.bridge-tray-bead.is-selected {
  transform: translate(-1px, -2px);
  box-shadow: 4px 4px 0 rgba(68, 55, 47, 0.16);
}

.bridge-tray-bead.is-selected {
  background: #e5f6c8;
}

.bridge-tray-orb {
  width: 2.2rem;
  height: 2.2rem;
}

.bridge-tray-name {
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.1;
}

.bridge-tray-meta {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 800;
  line-height: 1.15;
}

.bridge-action-row {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.bridge-action-row .button {
  width: 100%;
}

@keyframes bridge-glow {
  from {
    transform: scale(0.94);
  }

  to {
    transform: scale(1.08);
  }
}

@keyframes bridge-gentle-wiggle {
  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(-3px);
  }

  70% {
    transform: translateX(3px);
  }
}

@keyframes flower-bloom {
  0% {
    transform: rotate(16deg) scale(0.76);
  }

  70% {
    transform: rotate(-8deg) scale(1.1);
  }

  100% {
    transform: rotate(0) scale(1);
  }
}

@keyframes bridge-sparkle {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-18px) scale(1.15) rotate(75deg);
  }
}

/*
  Refined Bead Bridge. The woodland backdrop is a replaceable asset; lamps,
  clay, flowers and bridge spaces remain HTML/CSS so every repair stays tactile
  and interactive. The later rules intentionally replace the first Bead Bridge
  pass above while keeping its shared Kids Island palette and focus treatment.
*/
.bead-bridge {
  gap: clamp(0.9rem, 2vw, 1.35rem);
}

.bead-bridge-heading,
.bridge-mode-picker,
.bridge-tray-panel,
.bridge-help-panel {
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
}

.bead-bridge-heading {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.55fr);
  align-items: stretch;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 226, 109, 0.72) 0 8px, transparent 9px),
    radial-gradient(circle at 85% 22%, rgba(142, 216, 199, 0.62) 0 15px, transparent 16px),
    linear-gradient(135deg, #e8f7d6 0%, #fff5d8 58%, #e0f6ef 100%);
  padding: clamp(1rem, 2.8vw, 1.5rem);
}

.bead-bridge-heading::before,
.bead-bridge-heading::after {
  position: absolute;
  border-radius: 48% 52% 56% 44% / 46% 54% 46% 54%;
  background: rgba(255, 255, 255, 0.45);
  content: "";
  pointer-events: none;
}

.bead-bridge-heading::before {
  right: 17%;
  bottom: -2.3rem;
  width: 8rem;
  height: 5rem;
  transform: rotate(-18deg);
}

.bead-bridge-heading::after {
  right: -1.6rem;
  top: -2rem;
  width: 6.5rem;
  height: 6.5rem;
  background: rgba(183, 168, 255, 0.28);
}

.bead-bridge-heading > * {
  position: relative;
  z-index: 1;
}

.bead-bridge-heading h3 {
  max-width: 24ch;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.08;
}

.bead-bridge-heading p:last-child:not(.bead-bridge-status) {
  max-width: 58ch;
  font-weight: 750;
}

.bead-bridge-status {
  display: grid;
  min-height: 5.2rem;
  align-self: center;
  align-items: center;
  border: 2px dashed rgba(68, 55, 47, 0.5);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.78);
  padding: 0.85rem 0.9rem;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.bridge-mode-picker {
  background: linear-gradient(180deg, #fff8ea, #fff0d0);
  padding: clamp(0.85rem, 2vw, 1.1rem);
}

.bridge-mode-picker > h4 {
  margin-bottom: 0.75rem;
}

.bridge-mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.bridge-mode-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.82);
  padding: 0.6rem;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  font-weight: 900;
  line-height: 1.12;
  box-shadow: 0 3px 0 rgba(68, 55, 47, 0.16);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.bridge-mode-button span {
  color: #a27c33;
  font-size: 1.1rem;
  line-height: 1;
}

.bridge-mode-button:hover,
.bridge-mode-button.is-selected {
  background: linear-gradient(135deg, #fff0a8, #fff9d8);
  box-shadow: 0 5px 0 rgba(68, 55, 47, 0.2);
  transform: translateY(-2px);
}

.bridge-mode-button.is-selected {
  outline: 3px solid rgba(142, 216, 199, 0.58);
  outline-offset: 2px;
}

.bridge-mode-copy {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-weight: 850;
}

.bead-bridge-scene {
  min-height: clamp(430px, 54vw, 570px);
  aspect-ratio: 1.58 / 1;
  border-radius: 18px;
  background: #b5e5dd;
}

.bead-bridge-backdrop {
  filter: saturate(1.03) contrast(1.02);
  transition: filter 800ms ease;
}

.bridge-scene-wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(255, 250, 220, 0.04), rgba(38, 50, 74, 0.08));
  pointer-events: none;
  transition: background-color 800ms ease, opacity 800ms ease;
}

.bead-bridge-scene.is-dark .bead-bridge-backdrop {
  filter: brightness(0.34) saturate(0.78) hue-rotate(9deg);
}

.bead-bridge-scene.is-dark .bridge-scene-wash {
  background: rgba(20, 29, 67, 0.52);
}

.bead-bridge-scene.is-sunny .bead-bridge-backdrop {
  filter: brightness(1.12) saturate(1.22);
}

.bead-bridge-scene.is-sunny .bridge-scene-wash {
  background: rgba(255, 239, 146, 0.1);
}

.bridge-sunbeam {
  position: absolute;
  top: -20%;
  right: -13%;
  z-index: 1;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 160, 0.73), rgba(255, 234, 114, 0.1) 44%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.72);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bridge-sunbeam span {
  position: absolute;
  inset: 25%;
  border: 2px solid rgba(255, 248, 193, 0.75);
  border-radius: 50%;
}

.bead-bridge-scene.is-sunny .bridge-sunbeam {
  opacity: 1;
  transform: scale(1);
}

.bridge-scene-prompt {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 10;
  width: min(76%, 34rem);
  margin: 0;
  border: 2px solid rgba(68, 55, 47, 0.82);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  padding: 0.45rem 0.85rem;
  color: var(--ink);
  font-size: clamp(0.72rem, 1.55vw, 0.9rem);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 3px 0 rgba(68, 55, 47, 0.14);
}

.bead-bridge-track {
  top: 45.5%;
  z-index: 8;
  width: min(82%, 850px);
  gap: clamp(0.08rem, 0.4vw, 0.28rem);
}

.bridge-lamp-spacer,
.bridge-lamp-slot,
.bridge-pattern-slot,
.bridge-flower-bridge-bead {
  min-width: 0;
  aspect-ratio: 1;
  transform: translateY(calc(var(--slot-lift) * -1));
}

.bridge-lamp-slot {
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 220ms ease;
}

.bridge-lamp-slot:disabled {
  cursor: default;
}

.bridge-lamp-slot:hover:not(:disabled),
.bridge-lamp-slot.is-drop-ready {
  transform: translateY(calc((var(--slot-lift) * -1) - 5px)) scale(1.08);
}

.bridge-lamp-hanger {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 35%;
  height: 46%;
  border-inline: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
  border-radius: 55% 55% 0 0;
  transform: translateX(-50%);
}

.bridge-lamp-glass {
  position: relative;
  display: grid;
  width: 88%;
  height: 88%;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 42% 58% / 44% 46% 54% 56%;
  background: rgba(56, 64, 84, 0.72);
  box-shadow: inset 3px -4px 0 rgba(0, 0, 0, 0.16), 2px 3px 0 rgba(68, 55, 47, 0.2);
  transition: background-color 380ms ease, box-shadow 380ms ease;
}

.bridge-lamp-slot.is-drop-ready .bridge-lamp-glass,
.bead-bridge-scene.has-active-drag .bridge-lamp-slot:not(.is-charged) .bridge-lamp-glass {
  background: rgba(255, 251, 202, 0.84);
  box-shadow: inset 3px -4px 0 rgba(68, 55, 47, 0.1), 0 0 14px rgba(255, 244, 163, 0.9), 2px 3px 0 rgba(68, 55, 47, 0.2);
}

.bridge-lamp-slot.is-charged .bridge-lamp-glass {
  background: rgba(242, 255, 181, 0.93);
  box-shadow: inset 3px -4px 0 rgba(68, 55, 47, 0.1), 0 0 12px 5px rgba(233, 255, 155, 0.86), 0 0 25px rgba(198, 255, 151, 0.65);
  animation: lamp-charge 1.35s ease-in-out infinite alternate;
}

.bridge-lamp-clay {
  width: 75%;
  height: 75%;
}

.bridge-lamp-label {
  position: absolute;
  top: calc(100% + 0.1rem);
  left: 50%;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.94);
  padding: 0.05rem 0.22rem;
  font-size: clamp(0.42rem, 0.8vw, 0.62rem);
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
}

.bridge-pattern-slot,
.bridge-flower-bridge-bead {
  position: relative;
  display: grid;
  place-items: center;
}

.bridge-pattern-slot {
  border: 0;
  background: transparent;
  color: var(--ink);
}

.bridge-pattern-slot.is-cracked {
  cursor: pointer;
}

.bridge-pattern-slot.is-cracked::before {
  position: absolute;
  inset: 5%;
  border: 2px dashed rgba(68, 55, 47, 0.72);
  border-radius: 47% 53% 44% 56% / 52% 46% 54% 48%;
  background: rgba(255, 249, 231, 0.8);
  content: "";
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.bridge-pattern-slot.is-cracked:hover::before,
.bridge-pattern-slot.is-drop-ready::before,
.bead-bridge-scene.has-active-drag .bridge-pattern-slot.is-cracked:not(.is-settled)::before {
  background: rgba(255, 240, 168, 0.95);
  box-shadow: 0 0 14px rgba(255, 237, 133, 0.9);
  transform: scale(1.08);
}

.bridge-pattern-slot.is-cracked:disabled {
  cursor: default;
}

.bridge-pattern-clay {
  z-index: 2;
  width: 96%;
  height: 96%;
}

.bridge-pattern-slot.is-settled .bridge-pattern-clay {
  animation: clay-settle 470ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bridge-crack {
  position: relative;
  z-index: 1;
  width: 44%;
  height: 44%;
  border-left: 2px solid rgba(68, 55, 47, 0.68);
  transform: rotate(28deg);
}

.bridge-crack::after {
  position: absolute;
  top: 28%;
  left: -2px;
  width: 140%;
  height: 2px;
  background: rgba(68, 55, 47, 0.68);
  content: "";
  transform: rotate(-48deg);
}

.bridge-flower-bridge-bead .bridge-pattern-clay {
  width: 76%;
  height: 76%;
  opacity: 0.82;
}

.bridge-clay-piece {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 56% 44% / 46% 54% 46% 54%;
  background: radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.68) 0 8%, transparent 10%), linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 42%), var(--clay-colour);
  box-shadow: inset 5px -6px 0 rgba(68, 55, 47, 0.12), inset -3px 4px 0 rgba(255, 255, 255, 0.3), 2px 3px 0 rgba(68, 55, 47, 0.18);
}

.bridge-clay-piece.is-glow {
  background: radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.7) 0 8%, transparent 10%), linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 42%), var(--clay-colour);
}

.bridge-clay-piece.is-uv {
  background: radial-gradient(circle at 30% 24%, #ffffff 0 8%, transparent 10%), linear-gradient(135deg, #fffdf7, var(--clay-colour));
}

.bridge-clay-piece.shape-cloud {
  border-radius: 42% 58% 52% 48% / 58% 43% 57% 42%;
}

.bridge-clay-piece.shape-leaf {
  border-radius: 12% 88% 14% 86% / 14% 86% 14% 86%;
  transform: rotate(-30deg);
}

.bridge-clay-piece.shape-starburst {
  border-radius: 20%;
  clip-path: polygon(50% 0, 61% 31%, 94% 21%, 76% 51%, 98% 77%, 64% 72%, 50% 100%, 38% 71%, 4% 80%, 25% 51%, 5% 20%, 39% 30%);
}

.bridge-clay-piece.shape-heart {
  border-radius: 0;
  clip-path: polygon(50% 94%, 8% 53%, 0 27%, 13% 6%, 34% 5%, 50% 22%, 66% 5%, 87% 6%, 100% 27%, 92% 53%);
}

.bridge-clay-piece.shape-crescent {
  border-radius: 50%;
  clip-path: polygon(75% 0, 50% 7%, 30% 24%, 21% 48%, 30% 72%, 52% 91%, 76% 96%, 60% 76%, 56% 53%, 63% 25%);
}

.bridge-clay-shine {
  position: absolute;
  top: 18%;
  left: 21%;
  width: 19%;
  height: 15%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
}

.bridge-lamp-slot.is-charged .bridge-lamp-clay {
  box-shadow: inset 5px -6px 0 rgba(68, 55, 47, 0.12), inset -3px 4px 0 rgba(255, 255, 255, 0.34), 0 0 12px 4px rgba(243, 255, 169, 0.9);
}

.bridge-lamp-slot.is-gentle-wrong,
.bridge-pattern-slot.is-gentle-wrong,
.bridge-flower.is-gentle-wrong {
  animation: bridge-gentle-wiggle 420ms ease-in-out 2;
}

.bridge-flower-garden {
  z-index: 9;
}

.bridge-flower {
  width: clamp(62px, 8.5vw, 90px);
  height: clamp(62px, 8.5vw, 90px);
  cursor: pointer;
  transition: transform 210ms ease;
}

.bridge-flower:disabled {
  cursor: default;
}

.bridge-flower:hover:not(:disabled),
.bridge-flower.is-drop-ready {
  transform: translate(-50%, -50%) scale(1.09);
}

.bridge-flower-petals {
  position: relative;
  display: grid;
  width: 82%;
  height: 82%;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 46% 54% 48% 52%;
  background: linear-gradient(145deg, #fffdf7, #ece2d1);
  box-shadow: inset 7px -7px 0 rgba(68, 55, 47, 0.1), 3px 4px 0 rgba(68, 55, 47, 0.18);
  transition: background 620ms ease, box-shadow 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bridge-flower.shape-starburst .bridge-flower-petals {
  border-radius: 16px;
  clip-path: polygon(50% 0, 61% 31%, 94% 21%, 76% 51%, 98% 77%, 64% 72%, 50% 100%, 38% 71%, 4% 80%, 25% 51%, 5% 20%, 39% 30%);
}

.bridge-flower.shape-heart .bridge-flower-petals {
  border-radius: 0;
  clip-path: polygon(50% 94%, 8% 53%, 0 27%, 13% 6%, 34% 5%, 50% 22%, 66% 5%, 87% 6%, 100% 27%, 92% 53%);
}

.bridge-flower.shape-leaf .bridge-flower-petals {
  border-radius: 12% 88% 14% 86% / 14% 86% 14% 86%;
  transform: rotate(-30deg);
}

.bridge-flower.shape-crescent .bridge-flower-petals {
  border-radius: 50%;
  clip-path: polygon(75% 0, 50% 7%, 30% 24%, 21% 48%, 30% 72%, 52% 91%, 76% 96%, 60% 76%, 56% 53%, 63% 25%);
}

.bridge-flower.is-drop-ready .bridge-flower-petals,
.bead-bridge-scene.has-active-drag .bridge-flower:not(.is-ready) .bridge-flower-petals {
  background: linear-gradient(145deg, #fff9d7, #f6e7bd);
  box-shadow: inset 7px -7px 0 rgba(68, 55, 47, 0.08), 0 0 16px rgba(255, 239, 138, 0.85), 3px 4px 0 rgba(68, 55, 47, 0.18);
}

.bridge-flower.is-ready .bridge-flower-petals {
  background: linear-gradient(145deg, #fffdf7, #e9e0d1);
  box-shadow: inset 7px -7px 0 rgba(68, 55, 47, 0.08), 0 0 14px rgba(255, 255, 236, 0.9), 3px 4px 0 rgba(68, 55, 47, 0.18);
}

.bead-bridge-scene.is-sunny .bridge-flower.is-blooming .bridge-flower-petals {
  background: radial-gradient(circle at 35% 27%, rgba(255, 255, 255, 0.58) 0 9%, transparent 10%), var(--flower-colour);
  box-shadow: inset 7px -7px 0 rgba(68, 55, 47, 0.1), 0 0 22px 7px rgba(255, 242, 149, 0.82), 3px 4px 0 rgba(68, 55, 47, 0.18);
  animation: flower-bloom 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bridge-flower-clay {
  position: absolute;
  z-index: 1;
  width: 62%;
  height: 62%;
  border-color: rgba(68, 55, 47, 0.72);
  opacity: 0.92;
  transform: scale(0.86) rotate(-7deg);
}

.bead-bridge-scene.is-sunny .bridge-flower-clay {
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.68) 0 8%, transparent 10%), var(--clay-reveal);
}

.bridge-flower-core {
  position: absolute;
  z-index: 3;
  width: 24%;
  height: 24%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #d59d5d;
  box-shadow: inset 2px -2px 0 rgba(68, 55, 47, 0.12);
}

.bridge-flower-label {
  top: calc(100% - 0.08rem);
  max-width: 6.3rem;
  padding: 0.12rem 0.32rem;
  font-size: clamp(0.54rem, 1vw, 0.67rem);
  text-align: center;
}

.bridge-sparkles {
  z-index: 15;
}

.bridge-sparkle {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #fff9b8;
  box-shadow: 0 0 10px 3px rgba(255, 249, 184, 0.95);
}

.bridge-sparkle.is-glow {
  background: #e9ff9b;
  box-shadow: 0 0 11px 4px rgba(214, 255, 151, 0.95);
}

.bridge-sparkle.is-pattern {
  background: #ffd1ea;
  box-shadow: 0 0 10px 3px rgba(183, 168, 255, 0.86);
}

.bead-bridge-lower-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(250px, 0.72fr);
}

.bridge-tray-panel,
.bridge-help-panel {
  background: linear-gradient(145deg, #fffdf7, #fff5df);
  padding: clamp(0.9rem, 2.1vw, 1.15rem);
}

.bridge-tray-panel h4,
.bridge-help-panel h4 {
  font-size: 1.08rem;
}

.bridge-tray-note,
.bridge-help-panel > p:not(.bridge-selection) {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.42;
}

.bridge-bead-tray {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.bridge-tray-piece {
  display: grid;
  min-height: 132px;
  align-content: center;
  justify-items: center;
  gap: 0.36rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf7, #fff1d2);
  padding: 0.55rem;
  color: var(--ink);
  cursor: grab;
  font-family: inherit;
  text-align: center;
  box-shadow: 0 4px 0 rgba(68, 55, 47, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.bridge-tray-piece:hover,
.bridge-tray-piece.is-selected {
  background: linear-gradient(145deg, #fff8bd, #eaf8d9);
  box-shadow: 0 7px 0 rgba(68, 55, 47, 0.16), 0 0 0 3px rgba(142, 216, 199, 0.46);
  transform: translateY(-4px) rotate(-1deg);
}

.bridge-tray-piece:active,
.bridge-tray-piece.is-dragging {
  cursor: grabbing;
  transform: scale(0.96) rotate(2deg);
}

.bridge-tray-piece.is-used {
  cursor: default;
  opacity: 0.42;
  filter: grayscale(0.2);
}

.bridge-tray-piece .bridge-clay-piece {
  width: 3.45rem;
  height: 3.45rem;
}

.bridge-tray-name {
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.1;
}

.bridge-tray-meta {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.1;
}

.bridge-selection {
  min-height: 3.3rem;
  margin: 0.9rem 0 0;
  border: 2px dashed rgba(68, 55, 47, 0.48);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.72);
  padding: 0.65rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 900;
  line-height: 1.35;
}

.bridge-selection.is-ready {
  border-style: solid;
  border-color: #6caa7c;
  background: #eaf7d8;
  color: var(--ink);
}

.bridge-action-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.bridge-action-row .button {
  min-height: 46px;
}

@keyframes lamp-charge {
  from {
    transform: scale(0.97);
  }

  to {
    transform: scale(1.06);
  }
}

@keyframes clay-settle {
  0% {
    opacity: 0;
    transform: translateY(-20%) scale(1.28);
  }

  72% {
    opacity: 1;
    transform: translateY(4%) scale(0.94);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes ant-happy-wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(9deg);
  }
}

/*
  One visual pattern is shared by each dedicated Kids Island game page. Keep the
  game content inside this room so future activities inherit the same friendly,
  tactile frame without needing modal-specific code.
*/
.game-room {
  position: relative;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: clamp(1rem, 3vw, 1.7rem);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.game-room::before {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 6rem;
  height: 6rem;
  background: url("../assets/decorative-sparkles.svg") center / contain no-repeat;
  content: "";
  opacity: 0.45;
  pointer-events: none;
}

.game-room > * {
  position: relative;
  z-index: 1;
}

.game-room-coral {
  background: #fff0ea;
}

.game-room-mint {
  background: #edf9f5;
}

.game-room-sky {
  background: #eef8ff;
}

.game-room-lilac {
  background: #f4f0ff;
}

.game-room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px dashed rgba(68, 55, 47, 0.55);
  padding-bottom: 1rem;
}

.game-room-heading .eyebrow {
  margin-bottom: 0.2rem;
}

.game-room-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.game-room-heading img {
  flex: 0 0 auto;
  width: min(145px, 24vw);
  aspect-ratio: 4 / 3;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff8ea;
  object-fit: cover;
  box-shadow: var(--soft-shadow);
}

.game-room .mixer,
.game-room .glow-lab {
  margin-top: 1.2rem;
}

.game-room .glow-lab {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.coming-soon-game {
  display: grid;
  width: min(590px, 100%);
  min-height: min(370px, 55dvh);
  margin-inline: auto;
  align-content: center;
  justify-items: center;
  padding: 1.2rem 0;
  text-align: center;
}

.coming-soon-game img {
  width: 100%;
  max-width: 390px;
  aspect-ratio: 16 / 9;
  margin-bottom: 1.1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff8ea;
  object-fit: cover;
  box-shadow: var(--soft-shadow);
}

.coming-soon-game h3 {
  max-width: 24ch;
}

.coming-soon-game p:last-child {
  max-width: 48ch;
  margin-bottom: 0;
  color: var(--muted);
}

.future-activity-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  border-top: 3px dashed rgba(68, 55, 47, 0.55);
  padding-top: 1.2rem;
}

.future-activity-steps h3 {
  margin-bottom: 0.4rem;
  font-size: 1.12rem;
}

.future-activity-steps p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.future-step-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  margin: 0 0 0.65rem;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font-weight: 900;
}

.mixer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 1rem;
  align-items: stretch;
}

.mixer-game {
  margin-top: 1.2rem;
}

.mixer-panel {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1rem;
  box-shadow: var(--soft-shadow);
}

.selected-colours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.selected-colour {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.8rem;
  margin: 0;
  border: 2px solid rgba(68, 55, 47, 0.3);
  border-radius: var(--radius);
  background: #fffaf1;
  padding: 0.55rem 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.25;
}

.selected-colour strong {
  display: block;
  color: var(--ink);
}

.selection-dot {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px dashed var(--ink);
  border-radius: 50%;
}

.selection-dot.is-filled {
  border-style: solid;
}

.colour-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.colour-button {
  min-height: 76px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--colour);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 3px 3px 0 rgba(68, 55, 47, 0.14);
}

.colour-button.is-selected {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(68, 55, 47, 0.18);
}

.mixer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.mixer-actions .button {
  flex: 1 1 11rem;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
}

.button:disabled:hover {
  transform: none;
}

.mixer-result {
  display: grid;
  min-height: 100%;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.result-swatch {
  width: min(170px, 55vw);
  height: min(170px, 55vw);
  margin-bottom: 1rem;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--sun));
  box-shadow: inset 10px -14px 0 rgba(255, 255, 255, 0.28), var(--soft-shadow);
}

.mixer-kicker {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mixer-prompt {
  max-width: 28ch;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

.glow-lab {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 1.18fr);
  gap: 1rem;
  margin-top: 1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #edf9f5;
  padding: clamp(1rem, 3vw, 1.4rem);
  box-shadow: var(--shadow);
}

.glow-lab-copy {
  align-self: center;
}

.glow-lab-copy .eyebrow {
  margin-bottom: 0.6rem;
}

.glow-lab-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.glow-lab-actions .button {
  width: 100%;
}

.glow-lab-status {
  min-height: 3.2rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 800;
}

.glow-stage {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf7 0%, #f4e3ae 100%);
  transition: background-color 400ms ease, background-image 400ms ease;
}

.glow-lamp {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  z-index: 2;
  width: 3.8rem;
  height: 1.3rem;
  border: 3px solid var(--ink);
  border-radius: 0.35rem 0.35rem 1rem 1rem;
  background: var(--sun);
  transform: translateX(-50%);
}

.glow-lamp::before {
  position: absolute;
  top: -1.15rem;
  left: 50%;
  width: 0.7rem;
  height: 1.2rem;
  border-inline: 3px solid var(--ink);
  content: "";
  transform: translateX(-50%);
}

.glow-lamp::after {
  position: absolute;
  top: calc(100% + 0.1rem);
  left: 50%;
  width: 12rem;
  height: 15rem;
  background: linear-gradient(180deg, rgba(255, 226, 109, 0.68), rgba(255, 226, 109, 0));
  clip-path: polygon(39% 0, 61% 0, 100% 100%, 0 100%);
  content: "";
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 180ms ease;
}

.glow-clay {
  position: relative;
  z-index: 1;
  width: min(12rem, 48vw);
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 53% 47% 55% 45% / 48% 53% 47% 52%;
  background: linear-gradient(135deg, #a6e4ca, #71c6b4);
  box-shadow: inset 1rem -1.2rem 0 rgba(255, 255, 255, 0.22), 0.45rem 0.55rem 0 rgba(68, 55, 47, 0.14);
  transition: background 350ms ease, box-shadow 400ms ease, transform 250ms ease;
}

.glow-lab.is-charging .glow-lamp::after {
  opacity: 1;
}

.glow-lab.is-charging .glow-clay {
  animation: charge-clay 700ms ease-in-out infinite alternate;
}

.glow-lab.is-charged .glow-clay {
  background: linear-gradient(135deg, #d5ff91, #9cff7d);
}

.glow-lab.is-lights-out .glow-stage {
  background: radial-gradient(circle at 50% 55%, #26365a 0%, #151b31 62%, #0e1325 100%);
}

.glow-lab.is-lights-out .glow-lamp {
  background: #a6a9b1;
}

.glow-lab.is-lights-out .glow-clay {
  animation: glow-clay 1.2s ease-in-out infinite alternate;
  background: #d7ff9e;
  box-shadow: inset 1rem -1.2rem 0 rgba(255, 255, 255, 0.3), 0 0 1.4rem rgba(211, 255, 143, 0.95), 0 0 4.4rem rgba(162, 255, 101, 0.72);
}

.glow-sparkles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms ease;
}

.glow-sparkles span {
  position: absolute;
  width: 0.8rem;
  aspect-ratio: 1;
  background: #fffbd7;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

.glow-sparkles span:nth-child(1) {
  top: 21%;
  left: 19%;
}

.glow-sparkles span:nth-child(2) {
  top: 35%;
  right: 19%;
  width: 1.1rem;
}

.glow-sparkles span:nth-child(3) {
  bottom: 23%;
  left: 27%;
  width: 0.55rem;
}

.glow-sparkles span:nth-child(4) {
  right: 29%;
  bottom: 18%;
  width: 0.7rem;
}

.glow-lab.is-lights-out .glow-sparkles {
  opacity: 1;
}

.glow-progress-wrap {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 4;
}

.glow-progress {
  overflow: hidden;
  height: 0.9rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
}

.glow-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sun), #cbff8f);
  transition: width 1400ms linear;
}

.glow-lab.is-charging .glow-progress-fill,
.glow-lab.is-charged .glow-progress-fill {
  width: 100%;
}

.glow-progress-label {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
}

@keyframes charge-clay {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.055) rotate(2deg);
  }
}

@keyframes glow-clay {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.045);
  }
}

@media (max-width: 980px) {
  .glow-lab {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow-stage,
  .glow-lamp::after,
  .glow-clay,
  .glow-sparkles,
  .glow-progress-fill {
    transition-duration: 1ms;
  }

  .glow-lab.is-charging .glow-clay,
  .glow-lab.is-lights-out .glow-clay {
    animation: none;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: clamp(1rem, 3vw, 1.4rem);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 3px solid rgba(68, 55, 47, 0.78);
  border-radius: var(--radius);
  background: #fffdf7;
  color: var(--ink);
  padding: 0.75rem 0.8rem;
}

.field textarea {
  min-height: 180px;
  resize: vertical;
}

.form-message {
  display: none;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #ecfbf4;
  padding: 0.8rem;
  color: var(--ink);
  font-weight: 900;
}

.form-message.is-visible {
  display: block;
}

.faq {
  display: grid;
  gap: 0.8rem;
}

.faq details {
  padding: 0.95rem 1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 900;
}

.faq p {
  margin: 0.6rem 0 0;
}

.site-footer {
  border-top: 3px solid var(--ink);
  background: var(--deep);
  color: #fff8ea;
  padding: 2.4rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(130px, 0.55fr));
  gap: 1.4rem;
}

.footer-logo {
  width: 150px;
  margin-bottom: 0.8rem;
  background: #fff8ea;
  border-radius: var(--radius);
}

.footer-grid h2,
.footer-grid h3 {
  margin-bottom: 0.7rem;
  font-size: 1rem;
}

.footer-grid ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a {
  color: #fff8ea;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.copyright {
  margin: 1.8rem 0 0;
  border-top: 1px solid rgba(255, 248, 234, 0.24);
  padding-top: 1rem;
  color: rgba(255, 248, 234, 0.78);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.6rem);
    display: none;
    border: 3px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
    padding: 0.65rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    display: grid;
    gap: 0.2rem;
  }

  .site-nav a {
    width: 100%;
  }

  .hero-grid,
  .split-grid,
  .maker-grid,
  .difference-grid,
  .scroll-grid,
  .form-grid,
  .mixer {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .three-grid,
  .four-grid,
  .care-list,
  .swatch-grid,
  .activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-note {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }

  .scroll-effect {
    min-height: auto;
  }

  .scroll-pin {
    position: relative;
    top: auto;
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 1.1rem, var(--max-width));
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-link img {
    width: 112px;
  }

  .brand-name {
    display: none;
  }

  .hero,
  .page-hero {
    padding-top: 2.4rem;
  }

  h1,
  .hero-title {
    font-size: clamp(2.25rem, 12vw, 3.05rem);
  }

  .button {
    width: 100%;
  }

  .cta-band .container {
    display: grid;
  }

  .three-grid,
  .four-grid,
  .game-launcher-grid,
  .two-grid,
  .care-list,
  .swatch-grid,
  .experiment-shelf,
  .activity-list,
  .colour-buttons,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .image-frame img,
  .image-stack {
    aspect-ratio: 1 / 1;
  }

  .home-hero .hero-grid {
    gap: 1.2rem;
  }

  .home-hero .image-frame {
    width: min(280px, 86vw);
    margin-inline: auto;
  }

  .home-hero .image-frame img {
    aspect-ratio: 16 / 10;
  }

  .social-strip {
    justify-content: flex-start;
  }

  .social-strip span {
    width: 100%;
  }

  .island-map-stage {
    border-width: 3px;
    border-radius: 14px;
  }

  .island-hotspot {
    min-width: 5.65rem;
    min-height: 42px;
    border-width: 2px;
    padding: 0.32rem 0.42rem;
    font-size: clamp(0.62rem, 2.45vw, 0.82rem);
    box-shadow: 2px 2px 0 rgba(68, 55, 47, 0.2);
  }

  .island-hotspot::before {
    width: 0.56rem;
    height: 0.56rem;
    border-width: 1px;
  }

  .island-place-fallback {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .island-modal {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 14px;
  }

  .island-modal-shell {
    max-height: calc(100dvh - 1.75rem);
  }

  .island-modal-header {
    align-items: flex-start;
    padding: 0.75rem 0.8rem;
  }

  .island-modal-header h2 {
    font-size: 1.45rem;
  }

  .island-modal-close {
    width: 42px;
    height: 42px;
    font-size: 1.75rem;
  }

  .island-modal-body {
    padding: 0.8rem;
  }

  .island-resource-list,
  .island-make-along-list {
    grid-template-columns: 1fr;
  }

  .game-room {
    border-width: 3px;
    border-radius: 14px;
    padding: 0.85rem;
  }

  .game-room-heading {
    align-items: flex-start;
    padding-bottom: 0.85rem;
  }

  .game-room-heading img {
    width: 98px;
  }

  .future-activity-steps {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .coming-soon-game {
    min-height: 300px;
  }
}

@media (max-width: 680px) {
  .bead-bridge-heading,
  .bead-bridge-lower-grid {
    grid-template-columns: 1fr;
  }

  .bridge-mode-row {
    grid-template-columns: 1fr;
  }

  .bead-bridge-scene {
    min-height: 385px;
    overflow-x: auto;
  }

  .bead-bridge-track {
    top: 44%;
    left: 0.6rem;
    width: 756px;
    grid-template-columns: repeat(18, 40px);
    gap: 2px;
    transform: none;
  }

  .bridge-slot-label {
    font-size: 0.46rem;
  }

  .bridge-ant {
    top: 59%;
    left: 1%;
    font-size: 1.5rem;
  }

  .bridge-ant.is-crossing {
    left: calc(100% - 3.8rem);
  }

  .bridge-ant-label {
    display: none;
  }

  .bridge-bead-tray {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bridge-tray-bead {
    min-height: 86px;
  }

  .bridge-flower {
    width: 45px;
    height: 45px;
  }

  .charm-forest-heading,
  .charm-forest-lower-grid {
    grid-template-columns: 1fr;
  }

  .charm-forest-heading {
    gap: 0.75rem;
  }

  .charm-forest-scene {
    min-height: 530px;
  }

  .bead-tree {
    width: 31%;
  }

  .bead-tree-left {
    top: 5%;
    left: 1%;
  }

  .bead-tree-middle {
    top: 22%;
  }

  .bead-tree-right {
    top: 5%;
    right: 1%;
  }

  .bead-tree-sign {
    padding-inline: 0.28rem;
    font-size: 0.66rem;
  }

  .tree-bead-cluster {
    grid-template-columns: repeat(3, minmax(32px, 1fr));
    gap: 0.15rem;
  }

  .tree-bead {
    width: 38px;
    height: 38px;
  }

  .tree-bead-orb {
    width: 34px;
    height: 34px;
  }

  .tree-bead-letter {
    font-size: 0.65rem;
  }

  .charm-workbench {
    grid-template-columns: 0.78fr 1.22fr;
    width: calc(100% - 1rem);
    min-height: 182px;
    padding-inline: 0.55rem;
  }

  .forest-bucket {
    min-height: 110px;
  }

  .charm-atmosphere-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .charm-finish-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .charm-bucket-item {
    align-items: flex-start;
  }

  .charm-bucket-actions {
    display: grid;
    gap: 0.25rem;
  }
}

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

  .scroll-effect {
    min-height: auto;
  }

  .scroll-pin {
    position: relative;
    top: auto;
    min-height: auto;
  }

  .scroll-effect .image-before,
  .scroll-effect .scene-label-start {
    opacity: 0 !important;
  }

  .scroll-effect .scene-label-end {
    opacity: 1 !important;
    transform: none !important;
  }

  .island-map-stage.is-focused .island-map-viewport {
    transform: none !important;
  }
}

/* Bead Bridge keeps its 18-space path tap-friendly on narrow screens. */
@media (max-width: 680px) {
  .bead-bridge-heading,
  .bead-bridge-lower-grid {
    grid-template-columns: 1fr;
  }

  .bridge-mode-row {
    grid-template-columns: 1fr;
  }

  .bridge-mode-button {
    min-height: 50px;
  }

  .bead-bridge-scene {
    min-height: 420px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .bead-bridge-backdrop,
  .bridge-scene-wash {
    width: 760px;
    max-width: none;
    height: 100%;
  }

  .bridge-scene-prompt {
    left: 14px;
    width: 330px;
    max-width: calc(100% - 28px);
    transform: none;
  }

  .bead-bridge-track {
    top: 46%;
    left: 16px;
    width: 720px;
    grid-template-columns: repeat(18, 38px);
    gap: 2px;
    transform: none;
  }

  .bridge-ant {
    top: 59%;
    left: 28px;
  }

  .bridge-ant.is-crossing {
    left: 650px;
  }

  .bridge-flower {
    width: 62px;
    height: 62px;
  }

  .bridge-flower-label {
    font-size: 0.52rem;
  }

  .bridge-bead-tray {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bridge-tray-piece {
    min-height: 124px;
  }

  .bridge-action-row {
    grid-template-columns: 1fr;
  }
}

/*
  Bead Bridge art-direction refinement: one soft clay-garden language for the
  bridge, ant, lamps, beads and flowers. Final Procreate artwork can replace the
  backdrop, while these reusable HTML shapes keep the activity playable.
*/
.bead-bridge {
  --bridge-outline: rgba(78, 63, 49, 0.76);
  --bridge-shadow: rgba(91, 72, 49, 0.16);
  --bridge-paper: #fffaf0;
  --bridge-clay-light: #f7f0e4;
  --bridge-moss: #8caa78;
  gap: 1rem;
}

.bead-bridge-heading,
.bridge-mode-picker {
  border-color: rgba(78, 63, 49, 0.58);
  box-shadow: 0 10px 26px rgba(80, 64, 45, 0.09);
}

.bead-bridge-heading {
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, 0.48fr);
  background:
    linear-gradient(115deg, rgba(255, 253, 244, 0.9), rgba(239, 247, 224, 0.88)),
    #eef4df;
}

.bead-bridge-heading::before {
  right: 7%;
  bottom: -2.7rem;
  width: 9rem;
  height: 5.6rem;
  border-radius: 54% 46% 48% 52% / 58% 44% 56% 42%;
  background: rgba(196, 221, 166, 0.32);
  transform: rotate(-10deg);
}

.bead-bridge-heading::after {
  right: -1rem;
  top: -2.2rem;
  width: 7rem;
  height: 7rem;
  border-radius: 55% 45% 50% 50% / 44% 55% 45% 56%;
  background: rgba(249, 222, 146, 0.28);
}

.bead-bridge-heading h3 {
  max-width: 25ch;
}

.bead-bridge-status {
  border-color: rgba(78, 63, 49, 0.44);
  border-radius: 16px;
  background: rgba(255, 252, 243, 0.76);
  color: #584a3f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bridge-mode-picker {
  background: linear-gradient(180deg, #fffaf0, #f8eed5);
}

.bridge-mode-button {
  min-height: 50px;
  border-color: rgba(78, 63, 49, 0.58);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.85);
  box-shadow: 0 3px 0 rgba(78, 63, 49, 0.13);
}

.bridge-mode-button span {
  color: #b38943;
  font-size: 0.92rem;
}

.bridge-mode-button:hover,
.bridge-mode-button.is-selected {
  background: linear-gradient(145deg, #fff2bd, #fff9e4);
  box-shadow: 0 4px 0 rgba(78, 63, 49, 0.16);
  transform: translateY(-1px);
}

.bead-bridge-scene {
  min-height: clamp(440px, 52vw, 570px);
  border-color: rgba(78, 63, 49, 0.64);
  border-radius: 22px;
  background: #d5e5cf;
  box-shadow: 0 15px 30px rgba(72, 95, 73, 0.17);
}

.bead-bridge-backdrop {
  object-position: center center;
  filter: saturate(0.92) contrast(0.99);
  transition: filter 2600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bridge-scene-wash {
  background: linear-gradient(180deg, rgba(255, 253, 240, 0.06), rgba(71, 111, 111, 0.05));
  transition: background 2600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bead-bridge-scene.is-dark .bead-bridge-backdrop {
  filter: brightness(0.56) saturate(0.78) hue-rotate(8deg);
}

.bead-bridge-scene.is-dark .bridge-scene-wash {
  background: rgba(26, 37, 69, 0.38);
}

.bead-bridge-scene.is-sunny .bead-bridge-backdrop {
  filter: brightness(1.08) saturate(1.06) sepia(0.06);
}

.bead-bridge-scene.is-sunny .bridge-scene-wash {
  background: linear-gradient(180deg, rgba(255, 237, 160, 0.21), rgba(255, 248, 210, 0.04) 58%, rgba(245, 208, 111, 0.08));
}

.bridge-sunbeam {
  top: -38%;
  right: -3%;
  z-index: 5;
  width: 52%;
  background: radial-gradient(circle, rgba(255, 245, 181, 0.72) 0 13%, rgba(255, 232, 142, 0.25) 36%, rgba(255, 239, 169, 0.05) 58%, transparent 72%);
  opacity: 0;
  transform: translateY(-18%) scale(0.72);
  transition: opacity 2100ms ease-in, transform 3000ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bridge-sunbeam::after {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 246, 184, 0.18) 0deg 9deg, transparent 10deg 26deg);
  content: "";
  opacity: 0.62;
  transform: rotate(10deg);
}

.bridge-sunbeam span {
  inset: 31%;
  border: 0;
  background: radial-gradient(circle, rgba(255, 252, 217, 0.88), rgba(255, 224, 119, 0.28) 56%, transparent 72%);
}

.bead-bridge-scene.is-sunny .bridge-sunbeam {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.bridge-scene-prompt {
  z-index: 12;
  border-color: rgba(78, 63, 49, 0.55);
  border-radius: 14px;
  background: rgba(255, 250, 239, 0.84);
  box-shadow: 0 4px 12px rgba(78, 63, 49, 0.11);
  backdrop-filter: blur(4px);
}

.bead-bridge-track {
  top: 47%;
  z-index: 8;
  width: min(78%, 800px);
}

/* One reusable smiling clay-ant image moves between waiting and crossing states.
   Replace the PNG with final Procreate art without changing the game logic. */
.bridge-ant {
  position: absolute;
  top: 55.5%;
  left: 8%;
  z-index: 13;
  display: grid;
  justify-items: center;
  width: clamp(4rem, 6.5vw, 5rem);
  line-height: 0;
  filter: drop-shadow(0 5px 4px rgba(38, 31, 43, 0.28));
  transition: left 2800ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms ease;
}

.bridge-ant-art {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 54% 82%;
  will-change: transform;
}

.bridge-ant:not(.is-crossing) .bridge-ant-art {
  animation: ant-waiting 3200ms ease-in-out infinite;
}

.bridge-ant.is-crossing {
  left: calc(100% - 14%);
  transform: translateY(-0.5rem);
}

.bridge-ant.is-crossing .bridge-ant-art {
  animation: ant-walking 650ms ease-in-out infinite;
}

/* Rounded, reusable clay silhouettes replace the former sharp clip-path shapes. */
.bridge-clay-piece {
  display: grid;
  place-items: center;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bridge-clay-piece::before,
.bridge-clay-piece::after {
  display: none;
}

.bridge-clay-surface {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  border: 2px solid var(--bridge-outline);
  border-radius: 48% 52% 56% 44% / 46% 54% 46% 54%;
  background:
    radial-gradient(ellipse at 32% 24%, rgba(255, 255, 255, 0.64) 0 8%, transparent 10%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 48%),
    var(--clay-colour);
  box-shadow: inset 4px -5px 0 rgba(78, 63, 49, 0.11), inset -2px 3px 0 rgba(255, 255, 255, 0.26), 0 3px 0 var(--bridge-shadow);
}

.bridge-clay-piece.is-uv .bridge-clay-surface {
  background:
    radial-gradient(ellipse at 32% 24%, #fff 0 8%, transparent 10%),
    linear-gradient(145deg, #fffdf9, var(--clay-colour));
}

.bridge-clay-piece.shape-round .bridge-clay-surface {
  border-radius: 50%;
}

.bridge-clay-piece.shape-blob .bridge-clay-surface {
  border-radius: 55% 45% 52% 48% / 46% 57% 43% 54%;
  transform: rotate(-8deg);
}

.bridge-clay-piece.shape-leaf .bridge-clay-surface {
  width: 68%;
  height: 92%;
  border-radius: 64% 36% 62% 38% / 68% 42% 58% 32%;
  transform: rotate(38deg);
}

.bridge-clay-piece.shape-cloud .bridge-clay-surface {
  width: 64%;
  height: 58%;
  border-radius: 50%;
}

.bridge-clay-piece.shape-cloud .bridge-clay-surface::before,
.bridge-clay-piece.shape-cloud .bridge-clay-surface::after,
.bridge-clay-piece.shape-flower .bridge-clay-surface::before,
.bridge-clay-piece.shape-flower .bridge-clay-surface::after {
  position: absolute;
  border: inherit;
  background: inherit;
  box-shadow: inherit;
  content: "";
}

.bridge-clay-piece.shape-cloud .bridge-clay-surface::before {
  left: -38%;
  bottom: -8%;
  width: 74%;
  height: 92%;
  border-radius: 50%;
}

.bridge-clay-piece.shape-cloud .bridge-clay-surface::after {
  right: -42%;
  bottom: 2%;
  width: 82%;
  height: 104%;
  border-radius: 50%;
}

.bridge-clay-piece.shape-flower .bridge-clay-surface {
  width: 70%;
  height: 70%;
  border-radius: 46% 54% 48% 52%;
}

.bridge-clay-piece.shape-flower .bridge-clay-surface::before,
.bridge-clay-piece.shape-flower .bridge-clay-surface::after {
  inset: 6% 23%;
  border-radius: 50%;
  transform: rotate(58deg);
}

.bridge-clay-piece.shape-flower .bridge-clay-surface::after {
  transform: rotate(-58deg);
}

.bridge-clay-piece.shape-heart .bridge-clay-surface {
  width: 68%;
  height: 68%;
  border-radius: 22% 22% 32% 22%;
  transform: rotate(-45deg);
}

.bridge-clay-piece.shape-heart .bridge-clay-surface::before,
.bridge-clay-piece.shape-heart .bridge-clay-surface::after {
  position: absolute;
  top: -28%;
  width: 62%;
  height: 62%;
  border: inherit;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.bridge-clay-piece.shape-heart .bridge-clay-surface::before {
  left: -2%;
}

.bridge-clay-piece.shape-heart .bridge-clay-surface::after {
  right: -2%;
}

.bridge-clay-piece.shape-starburst .bridge-clay-surface,
.bridge-clay-piece.shape-crescent .bridge-clay-surface {
  clip-path: none;
}

.bridge-clay-shine {
  top: 17%;
  left: 20%;
  z-index: 4;
  width: 17%;
  height: 13%;
  background: rgba(255, 255, 255, 0.52);
}

.bridge-lamp-slot,
.bridge-pattern-slot,
.bridge-flower-bridge-bead {
  transform: translateY(calc(var(--slot-lift) * -0.78));
}

.bridge-lamp-hanger {
  top: -25%;
  z-index: 1;
  width: 36%;
  height: 35%;
  border-width: 1.5px;
  border-color: rgba(71, 54, 43, 0.76);
  box-shadow: 0 1px 0 rgba(255, 241, 199, 0.22);
}

.bridge-lamp-glass {
  z-index: 2;
  width: 76%;
  height: 74%;
  overflow: visible;
  border: 1.5px solid rgba(75, 57, 44, 0.66);
  border-radius: 48% 52% 46% 54% / 42% 42% 58% 58%;
  background: radial-gradient(circle at 38% 31%, rgba(255, 255, 248, 0.36), transparent 26%), rgba(87, 77, 70, 0.42);
  box-shadow: inset 2px -3px 0 rgba(47, 36, 31, 0.12), inset 1px 2px 0 rgba(255, 249, 228, 0.2), 0 3px 4px rgba(54, 41, 34, 0.24);
}

.bridge-lamp-glass::before {
  position: absolute;
  top: -11%;
  left: 50%;
  width: 58%;
  height: 17%;
  border-radius: 999px;
  background: linear-gradient(180deg, #7a5b45, #4d3b31);
  box-shadow: inset 0 1px 0 rgba(255, 234, 188, 0.25);
  content: "";
  transform: translateX(-50%);
}

.bridge-lamp-slot.is-charged::before {
  position: absolute;
  inset: -70%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 255, 183, 0.68) 0 12%, rgba(221, 255, 159, 0.24) 35%, transparent 69%);
  content: "";
  opacity: 0.86;
  pointer-events: none;
  transition: opacity 900ms ease;
}

.bridge-lamp-slot.is-drop-ready .bridge-lamp-glass,
.bead-bridge-scene.has-active-drag .bridge-lamp-slot:not(.is-charged) .bridge-lamp-glass {
  background: radial-gradient(circle at 38% 31%, rgba(255, 255, 248, 0.76), transparent 26%), rgba(228, 208, 132, 0.58);
  box-shadow: inset 2px -3px 0 rgba(72, 55, 43, 0.1), 0 0 13px rgba(255, 238, 155, 0.48), 0 3px 4px rgba(54, 41, 34, 0.18);
}

.bridge-lamp-slot.is-charged .bridge-lamp-glass {
  background: radial-gradient(circle at 38% 31%, #fffde6 0 12%, #eaffb4 38%, rgba(167, 220, 133, 0.78) 72%);
  box-shadow: inset 2px -3px 0 rgba(75, 94, 57, 0.12), inset 1px 2px 0 rgba(255, 255, 238, 0.45), 0 0 12px 2px rgba(224, 255, 158, 0.56), 0 0 25px rgba(199, 251, 147, 0.32);
  animation: none;
}

.bead-bridge-scene.is-lights-ready .bridge-lamp-slot.is-charged .bridge-lamp-glass {
  animation: bridge-lamp-charge 1800ms ease-in-out infinite alternate;
}

.bridge-lamp-clay .bridge-clay-surface {
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 27%, rgba(255, 255, 255, 0.86) 0 8%, transparent 10%), radial-gradient(circle, var(--clay-colour) 0 42%, rgba(212, 255, 161, 0.75) 100%);
  box-shadow: inset 2px -3px 0 rgba(75, 94, 57, 0.1), inset -1px 2px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(238, 255, 179, 0.7);
}

.bridge-lamp-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.bridge-pattern-slot.is-cracked::before {
  border-style: solid;
  border-color: rgba(112, 93, 66, 0.4);
  border-radius: 50%;
  background: rgba(245, 232, 201, 0.7);
  box-shadow: inset 0 3px 0 rgba(118, 88, 54, 0.1);
}

.bridge-pattern-slot.is-cracked:hover::before,
.bridge-pattern-slot.is-drop-ready::before,
.bead-bridge-scene.has-active-drag .bridge-pattern-slot.is-cracked:not(.is-settled)::before {
  background: rgba(255, 245, 204, 0.95);
  box-shadow: 0 0 13px rgba(255, 228, 137, 0.64), inset 0 3px 0 rgba(118, 88, 54, 0.08);
}

.bridge-crack {
  opacity: 0.52;
  transform: rotate(20deg) scale(0.78);
}

.bridge-pattern-clay .bridge-clay-surface {
  border-color: rgba(78, 63, 49, 0.64);
}

.bead-bridge-scene.is-pattern-ready .bridge-pattern-clay {
  animation: bridge-pattern-shimmer 1500ms ease-in-out infinite alternate;
}

.bridge-flower {
  width: clamp(68px, 8.5vw, 88px);
  height: clamp(68px, 8.5vw, 88px);
}

.bridge-flower-petals {
  width: 76%;
  height: 76%;
  border-color: rgba(78, 63, 49, 0.64);
  border-radius: 48% 52% 50% 50% / 54% 48% 52% 46%;
  background: linear-gradient(145deg, #fffdf7, #ece5d6);
  box-shadow: inset 5px -5px 0 rgba(78, 63, 49, 0.08), 0 3px 0 rgba(78, 63, 49, 0.14);
  transition: background 1700ms ease var(--flower-delay), box-shadow 1700ms ease var(--flower-delay), transform 1600ms cubic-bezier(0.22, 1, 0.36, 1) var(--flower-delay);
}

.bridge-flower.shape-flower .bridge-flower-petals {
  border-radius: 46% 54% 50% 50% / 54% 48% 52% 46%;
  clip-path: none;
}

.bridge-flower.shape-heart .bridge-flower-petals {
  border-radius: 43% 43% 50% 50% / 50% 50% 54% 54%;
  clip-path: none;
}

.bridge-flower.shape-leaf .bridge-flower-petals {
  width: 62%;
  height: 82%;
  border-radius: 64% 36% 62% 38% / 68% 42% 58% 32%;
  clip-path: none;
  transform: rotate(34deg);
}

.bridge-flower.shape-cloud .bridge-flower-petals {
  width: 67%;
  height: 58%;
  border-radius: 50%;
  clip-path: none;
}

.bridge-flower.is-ready .bridge-flower-petals {
  background: linear-gradient(145deg, #fffdf8, #eee5d2);
  box-shadow: inset 5px -5px 0 rgba(78, 63, 49, 0.07), 0 0 11px rgba(255, 252, 225, 0.72), 0 3px 0 rgba(78, 63, 49, 0.14);
}

.bead-bridge-scene.is-sunny .bridge-flower.is-blooming .bridge-flower-petals {
  background: radial-gradient(ellipse at 35% 25%, rgba(255, 255, 255, 0.62) 0 9%, transparent 11%), var(--flower-colour);
  box-shadow: inset 5px -5px 0 rgba(78, 63, 49, 0.08), 0 0 20px 5px rgba(255, 239, 154, 0.72), 0 3px 0 rgba(78, 63, 49, 0.14);
  animation: bridge-flower-awaken 1650ms cubic-bezier(0.22, 1, 0.36, 1) var(--flower-delay) both;
}

.bead-bridge-scene.is-sunny .bridge-flower.shape-leaf.is-blooming .bridge-flower-petals {
  animation-name: bridge-leaf-awaken;
}

.bridge-flower-clay {
  width: 58%;
  height: 58%;
  z-index: 2;
  opacity: 0.9;
  transform: scale(0.82) rotate(-4deg);
}

.bridge-flower-clay .bridge-clay-surface {
  border-color: rgba(78, 63, 49, 0.5);
}

.bead-bridge-scene.is-sunny .bridge-flower-clay .bridge-clay-surface {
  background: radial-gradient(ellipse at 32% 24%, rgba(255, 255, 255, 0.62) 0 8%, transparent 10%), var(--clay-reveal);
}

.bridge-flower-shape-mark {
  position: absolute;
  z-index: 1;
  width: 37%;
  height: 37%;
  border: 1.5px dashed rgba(96, 81, 63, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  transition: opacity 450ms ease;
}

.bridge-flower.is-ready .bridge-flower-shape-mark {
  opacity: 0.24;
}

.bridge-flower-shape-mark.shape-heart {
  width: 32%;
  height: 32%;
  border-radius: 35% 35% 45% 45%;
  transform: rotate(-45deg);
}

.bridge-flower-shape-mark.shape-leaf {
  width: 26%;
  height: 42%;
  border-radius: 70% 30% 70% 30%;
  transform: rotate(37deg);
}

.bridge-flower-shape-mark.shape-cloud {
  width: 42%;
  height: 28%;
  border-radius: 50%;
}

.bridge-flower-shape-mark.shape-cloud::before,
.bridge-flower-shape-mark.shape-cloud::after,
.bridge-flower-shape-mark.shape-flower::before,
.bridge-flower-shape-mark.shape-flower::after {
  position: absolute;
  border: inherit;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.bridge-flower-shape-mark.shape-cloud::before {
  left: -27%;
  bottom: -17%;
  width: 58%;
  height: 120%;
}

.bridge-flower-shape-mark.shape-cloud::after {
  right: -27%;
  bottom: -28%;
  width: 62%;
  height: 145%;
}

.bridge-flower-shape-mark.shape-flower {
  width: 32%;
  height: 32%;
}

.bridge-flower-shape-mark.shape-flower::before,
.bridge-flower-shape-mark.shape-flower::after {
  inset: 5% 28%;
  transform: rotate(58deg);
}

.bridge-flower-shape-mark.shape-flower::after {
  transform: rotate(-58deg);
}

.bridge-flower-core {
  z-index: 4;
  border-color: rgba(78, 63, 49, 0.65);
  background: #dfb36b;
}

.bridge-flower-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.bridge-sparkle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(255, 247, 192, 0.8);
  animation-duration: 820ms;
}

.bead-bridge-lower-grid {
  gap: 0;
  overflow: hidden;
  border: 2px solid rgba(78, 63, 49, 0.46);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff8ea, #f4ecd6);
  box-shadow: 0 10px 24px rgba(80, 64, 45, 0.08);
}

.bridge-tray-panel,
.bridge-help-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bridge-help-panel {
  border-left: 2px dashed rgba(78, 63, 49, 0.27);
}

.bridge-tray-piece {
  min-height: 122px;
  border-color: rgba(78, 63, 49, 0.55);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdf7, #f9efd9);
  box-shadow: 0 3px 0 rgba(78, 63, 49, 0.11);
}

.bridge-tray-piece:hover,
.bridge-tray-piece.is-selected {
  background: linear-gradient(145deg, #fff9dc, #eaf2d7);
  box-shadow: 0 5px 0 rgba(78, 63, 49, 0.14), 0 0 0 2px rgba(158, 191, 139, 0.42);
  transform: translateY(-3px) rotate(-0.4deg);
}

.bridge-tray-piece .bridge-clay-piece {
  width: 3.2rem;
  height: 3.2rem;
}

.bridge-selection {
  border-color: rgba(78, 63, 49, 0.35);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.6);
}

.bridge-selection.is-ready {
  border-color: rgba(116, 158, 112, 0.72);
  background: #edf4dc;
}

@keyframes bridge-lamp-charge {
  from {
    box-shadow: inset 3px -4px 0 rgba(78, 63, 49, 0.1), 0 0 9px 2px rgba(224, 255, 158, 0.55), 0 0 17px rgba(199, 251, 147, 0.25);
    transform: scale(0.98);
  }

  to {
    box-shadow: inset 3px -4px 0 rgba(78, 63, 49, 0.08), 0 0 16px 5px rgba(224, 255, 158, 0.82), 0 0 31px rgba(199, 251, 147, 0.52);
    transform: scale(1.04);
  }
}

@keyframes bridge-pattern-shimmer {
  from {
    filter: brightness(1);
    transform: translateY(0);
  }

  to {
    filter: brightness(1.12) saturate(1.06);
    transform: translateY(-2px);
  }
}

@keyframes bridge-flower-awaken {
  0% {
    filter: brightness(0.96) saturate(0.7);
    transform: scale(0.88);
  }

  58% {
    filter: brightness(1.08) saturate(1.08);
    transform: scale(1.08);
  }

  100% {
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
}

@keyframes bridge-leaf-awaken {
  0% {
    filter: brightness(0.96) saturate(0.7);
    transform: rotate(34deg) scale(0.88);
  }

  58% {
    filter: brightness(1.08) saturate(1.08);
    transform: rotate(28deg) scale(1.08);
  }

  100% {
    filter: brightness(1) saturate(1);
    transform: rotate(34deg) scale(1);
  }
}

@keyframes ant-waiting {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  45% {
    transform: translateY(-2px) rotate(-2deg);
  }

  60% {
    transform: translateY(0) rotate(1deg);
  }
}

@keyframes ant-walking {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-3px) rotate(2deg);
  }
}

@media (max-width: 680px) {
  .bead-bridge-scene {
    min-height: 410px;
  }

  .bead-bridge-backdrop,
  .bridge-scene-wash {
    width: 730px;
  }

  .bead-bridge-track {
    top: 48%;
    width: 704px;
    grid-template-columns: repeat(18, 37px);
  }

  .bridge-ant {
    top: 55%;
    left: 24px;
    width: 4.4rem;
  }

  .bridge-ant.is-crossing {
    left: 625px;
  }

  .bridge-ant-label {
    display: none;
  }

  .bridge-help-panel {
    border-top: 2px dashed rgba(78, 63, 49, 0.27);
    border-left: 0;
  }

  .bridge-flower {
    width: 64px;
    height: 64px;
  }
}
