/* =========================================================
   Trio Tangle: Triple Match — Official Landing
   Style: Light clay / toy-UI (game-inspired), unique tray nav
   ========================================================= */

:root {
  --bg: #eef6ff;
  --bg-soft: #f7fbff;
  --surface: #ffffff;
  --ink: #1a3560;
  --ink-soft: #4a6289;
  --blue: #3b82f6;
  --blue-deep: #1d4ed8;
  --sky: #60a5fa;
  --lime: #34d399;
  --lime-deep: #059669;
  --yellow: #fbbf24;
  --orange: #fb923c;
  --violet: #a78bfa;
  --wood: #c4a574;
  --wood-dark: #8b6914;
  --wood-edge: #a67c52;
  --border: #bfd4f5;
  --shadow: 0 10px 28px rgba(29, 78, 216, 0.12);
  --shadow-press: 0 4px 10px rgba(29, 78, 216, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --tray-h: 92px;
  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--blue);
}

[data-theme="dark"] {
  --bg: #0f1b33;
  --bg-soft: #152445;
  --surface: #1a2d52;
  --ink: #e8f0ff;
  --ink-soft: #a8bdd9;
  --border: #2d4a7a;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --wood: #6b5235;
  --wood-dark: #3d2e1a;
  --wood-edge: #5a4128;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  padding-bottom: calc(var(--tray-h) + 24px);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 9999;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Atmosphere ---------- */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sky__beam {
  position: absolute;
  inset: -20% 20% auto;
  height: 55%;
  background: radial-gradient(ellipse at top, rgba(255, 236, 179, 0.55), transparent 70%);
}

[data-theme="dark"] .sky__beam {
  background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.25), transparent 70%);
}

.sky__cloud {
  position: absolute;
  width: 280px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(2px);
}

[data-theme="dark"] .sky__cloud {
  background: rgba(96, 165, 250, 0.08);
}

.sky__cloud--a { top: 12%; left: -40px; }
.sky__cloud--b { top: 28%; right: -60px; width: 320px; }

.sky__star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.7;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: color-mix(in srgb, var(--bg-soft) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.topbar.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: var(--shadow-press);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
}

.brand__tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-image: linear-gradient(90deg, #ef4444, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-btn,
.burger {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-press);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.theme-btn:hover,
.burger:hover {
  transform: translateY(-1px);
}

.theme-btn:focus-visible,
.burger:focus-visible,
.btn:focus-visible,
.tray__item:focus-visible,
.journey__nav:focus-visible,
.overlay__close:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.theme-btn svg,
.burger svg { width: 20px; height: 20px; }

.theme-btn__moon { display: none; }
[data-theme="dark"] .theme-btn__sun { display: none; }
[data-theme="dark"] .theme-btn__moon { display: block; }

.burger span {
  display: block;
  width: 18px;
  height: 2.5px;
  margin: 3px 0;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.mobile-drawer {
  position: fixed;
  top: 72px;
  right: 12px;
  left: 12px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  background: var(--surface);
  border: 4px solid var(--blue);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.mobile-drawer[hidden] { display: none; }

.mobile-drawer a {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mobile-drawer a:hover {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  border: 3px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }

.btn--lime {
  background: linear-gradient(180deg, #6ee7b7 0%, #34d399 45%, #10b981 100%);
  color: #064e3b;
  border-color: #059669;
  box-shadow: 0 6px 0 #047857, 0 10px 20px rgba(16, 185, 129, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--lime:hover {
  filter: brightness(1.05);
  box-shadow: 0 7px 0 #047857, 0 12px 22px rgba(16, 185, 129, 0.4);
}

.btn--lime:active {
  box-shadow: 0 2px 0 #047857, 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn--sky {
  background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 45%, #3b82f6 100%);
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 6px 0 #1e40af, 0 10px 20px rgba(59, 130, 246, 0.35);
}

.btn--sky:hover {
  filter: brightness(1.05);
}

.btn--sky:active {
  box-shadow: 0 2px 0 #1e40af, 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn--lg {
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
}

.btn--block { width: 100%; }

/* ---------- Toy panel (screw corners) ---------- */
.toy-panel {
  position: relative;
  background: var(--surface);
  border: 5px solid var(--blue);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.65);
}

.screw {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e5e7eb, #9ca3af);
  box-shadow: inset 0 1px 2px #fff, 0 1px 2px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.screw::after {
  content: "";
  position: absolute;
  inset: 5px 3px;
  background: #6b7280;
  height: 2px;
  border-radius: 1px;
}

.screw--tl { top: 10px; left: 10px; }
.screw--tr { top: 10px; right: 10px; }
.screw--bl { bottom: 10px; left: 10px; }
.screw--br { bottom: 10px; right: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  padding: 1rem 1.25rem 0.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

.hero__stage {
  position: relative;
  border-radius: calc(var(--radius-xl) + 4px);
  overflow: hidden;
  border: 5px solid #93c5fd;
  box-shadow: var(--shadow);
  background: #dbeafe;
  aspect-ratio: 1200 / 586;
}

.hero__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__glow {
  display: none;
}

.hero__modal {
  padding: 1.75rem 1.5rem 1.5rem;
  margin-top: 0;
  z-index: 1;
  max-width: 640px;
  justify-self: center;
  width: 100%;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue-deep);
  background: color-mix(in srgb, var(--yellow) 35%, #fff);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.hero__eyebrow svg { width: 14px; height: 14px; }

.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}

.hero__accent {
  background: linear-gradient(180deg, #fde047, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(146, 64, 14, 0.25);
}

.hero__lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 auto 1.25rem;
  max-width: 42ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hero__chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
  border: 2px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.hero__chips svg { width: 14px; height: 14px; color: var(--blue); }

@media (min-width: 900px) {
  .hero {
    gap: 1.75rem;
    padding-top: 1.5rem;
  }

  .hero__modal {
    max-width: 680px;
    padding: 2rem 2rem 1.75rem;
  }
}

/* ---------- Slot rail ---------- */
.slot-rail {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 1.5rem auto 0.5rem;
  padding: 0 1.25rem;
  text-align: center;
}

.slot-rail__inner {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #1e3a5f, #0f2744);
  border-radius: 16px;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.35), var(--shadow-press);
}

.slot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #0a1628;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5);
  border: 2px solid #2a4a72;
}

.slot.is-filled {
  background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 70%);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-color: #d97706;
}

.slot-rail__hint {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 3.5rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section__head {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.section__kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-deep);
  background: color-mix(in srgb, var(--lime) 22%, #fff);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section__sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Features — asymmetric trio ---------- */
.feature-trio {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .feature-trio {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
  }

  .feature-card--hot {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.25rem;
    align-items: start;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  }

  [data-theme="dark"] .feature-card--hot {
    background: linear-gradient(135deg, #143528, #1a2d52);
  }

  .feature-card--hot .feature-card__icon {
    grid-row: 1 / -1;
    align-self: center;
  }
}

.feature-card {
  background: var(--surface);
  border: 4px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-press);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--sky);
  box-shadow: var(--shadow);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin: 0.75rem 0 0.4rem;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15), inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.feature-card__icon svg { width: 26px; height: 26px; }

.feature-card__icon--yellow { background: linear-gradient(160deg, #fde047, #f59e0b); }
.feature-card__icon--lime { background: linear-gradient(160deg, #6ee7b7, #059669); }
.feature-card__icon--violet { background: linear-gradient(160deg, #c4b5fd, #7c3aed); }
.feature-card__icon--blue { background: linear-gradient(160deg, #93c5fd, #2563eb); }

/* ---------- How to ---------- */
.howto {
  max-width: 720px;
}

.howto-track {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.howto-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1.15rem 1.1rem;
}

.howto-step__num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(160deg, #60a5fa, #2563eb);
  box-shadow: 0 4px 0 #1e40af;
}

.howto-step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.howto-step p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Gallery pile ---------- */
.gallery .pile {
  display: none;
}

@media (min-width: 900px) {
  .gallery .pile {
    display: block;
    position: relative;
    height: 520px;
    margin: 2rem auto 1rem;
    max-width: 900px;
  }

  .gallery .journey { display: none; }

  .phone {
    position: absolute;
    width: min(200px, 22vw);
    margin: 0;
    transition: transform 0.25s ease;
    cursor: default;
  }

  .phone img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 22px;
    border: 4px solid #1e3a5f;
    box-shadow: 0 16px 32px rgba(15, 39, 68, 0.28);
    background: #0f2744;
  }

  .phone figcaption {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--ink-soft);
  }

  .phone--a { left: 4%; top: 8%; transform: rotate(-12deg); z-index: 2; }
  .phone--b { left: 22%; top: 18%; transform: rotate(6deg); z-index: 4; }
  .phone--c { left: 42%; top: 4%; transform: rotate(-4deg); z-index: 5; }
  .phone--d { left: 60%; top: 20%; transform: rotate(10deg); z-index: 3; }
  .phone--e { left: 76%; top: 10%; transform: rotate(-8deg); z-index: 2; }

  .phone:hover {
    z-index: 10;
    transform: rotate(0deg) translateY(-8px) scale(1.04);
  }
}

.journey {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.journey__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0.25rem 1.25rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.journey__track img {
  flex: 0 0 auto;
  width: min(220px, 62vw);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 22px;
  border: 4px solid #1e3a5f;
  scroll-snap-align: center;
  box-shadow: var(--shadow);
  background: #0f2744;
}

.journey__nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-press);
  cursor: pointer;
  transition: background 0.2s ease;
}

.journey__nav:hover {
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
}

.journey__nav svg { width: 22px; height: 22px; }

/* ---------- Download ---------- */
.download {
  padding-bottom: 2rem;
}

.download__panel {
  text-align: center;
  padding: 2.5rem 1.5rem;
  max-width: 640px;
  margin: 0 auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(253, 224, 71, 0.35), transparent 55%),
    var(--surface);
}

.download__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.download__panel h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.download__panel > p {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.download__btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.25rem 1.5rem;
  border-top: 3px dashed var(--border);
  background: var(--bg-soft);
}

.footer__inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.footer__brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.footer__brand strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  display: block;
}

.footer__brand p {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.footer__links a {
  font-weight: 700;
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer__links a:hover {
  color: var(--lime-deep);
}

[data-theme="dark"] .footer__links a {
  color: var(--sky);
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Wood tray nav ---------- */
.tray {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  pointer-events: none;
}

.tray__wood {
  pointer-events: auto;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 0.25rem;
  padding: 0.65rem 0.5rem 0.55rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 40%),
    repeating-linear-gradient(
      90deg,
      var(--wood) 0 12px,
      color-mix(in srgb, var(--wood) 88%, #000) 12px 14px
    );
  border: 4px solid var(--wood-edge);
  border-radius: 22px 22px 18px 18px;
  box-shadow:
    0 -4px 24px rgba(29, 78, 216, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -6px 12px rgba(0, 0, 0, 0.12);
}

.tray__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 56px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #3b2a14;
  cursor: pointer;
  transition: transform 0.2s ease;
}

[data-theme="dark"] .tray__item {
  color: #f5e6c8;
}

.tray__item:hover {
  transform: translateY(-4px);
}

.tray__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.35);
  position: relative;
}

.tray__icon svg { width: 20px; height: 20px; }

.tray__icon--yellow { background: linear-gradient(160deg, #fde047, #f59e0b); }
.tray__icon--blue { background: linear-gradient(160deg, #93c5fd, #2563eb); }
.tray__icon--lime { background: linear-gradient(160deg, #6ee7b7, #059669); }
.tray__icon--violet { background: linear-gradient(160deg, #c4b5fd, #7c3aed); }
.tray__icon--orange { background: linear-gradient(160deg, #fdba74, #ea580c); }

.tray__item--cta .tray__icon {
  width: 52px;
  height: 52px;
  margin-top: -10px;
  border-radius: 16px;
}

.tray__item--cta .tray__icon svg { width: 24px; height: 24px; }

.tray__item--cta .tray__icon::after {
  content: "+";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  color: #fff;
}

/* ---------- Overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 39, 68, 0.55);
  backdrop-filter: blur(4px);
}

.overlay[hidden] { display: none; }

.overlay__panel {
  width: min(400px, 100%);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  animation: pop-in 0.28s ease-out;
}

@keyframes pop-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.overlay__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f87171, #dc2626);
  color: #fff;
  border: 3px solid #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
  cursor: pointer;
  z-index: 3;
}

.overlay__close svg { width: 18px; height: 18px; }

.overlay__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #93c5fd, #2563eb);
  color: #fff;
  box-shadow: 0 6px 0 #1e40af;
}

.overlay__icon svg { width: 30px; height: 30px; }

.overlay__panel h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.overlay__panel p {
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

/* ---------- Responsive polish ---------- */
@media (max-width: 480px) {
  .tray__item span:not(.tray__icon) {
    font-size: 0.62rem;
  }

  .tray__item {
    min-width: 48px;
  }

  .tray__icon {
    width: 40px;
    height: 40px;
  }

  .tray__item--cta .tray__icon {
    width: 46px;
    height: 46px;
  }
}

@media (min-width: 1100px) {
  .tray {
    padding-bottom: 1rem;
  }

  .tray__wood {
    max-width: 620px;
  }
}
