/* Crunchy Squishy — shared styles */
:root {
  --bg: #f6f0e6;
  --bg-2: #efe5d3;
  --card: #fffdf8;
  --ink: #2b2217;
  --ink-soft: #6f6252;
  --ink-faint: #9b8d7a;
  --line: #e5dac6;
  --accent: #e5653a;
  --good: #3f8f5f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 32px rgba(80, 55, 20, .10);
  --shadow-sm: 0 4px 14px rgba(80, 55, 20, .08);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(78px + var(--safe-b));
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { padding: 18px 0 10px; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; flex-direction: column; gap: 8px; }
.brand { font-weight: 900; font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.brand .dot { color: var(--accent); }
.tagline { font-size: 14px; color: var(--ink-soft); margin: 0; }
.nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto; padding: 9px 15px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-weight: 800; font-size: 14px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.nav a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.nav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav a.soon { color: var(--ink-faint); }

/* Hero */
.hero { padding: 34px 0 6px; text-align: center; }
.hero h1 { font-size: 40px; font-weight: 900; letter-spacing: -.03em; margin: 0 0 4px; }
.hero .tagline { font-size: 17px; }

/* Layout — single column on mobile, two columns on desktop */
.layout { display: grid; gap: 28px; padding: 18px 0 40px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 420px 1fr; gap: 44px; align-items: start; }
  .toy-col { position: sticky; top: 20px; }
}

/* Toy stage */
.toy-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.toy-card {
  width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 18px 20px;
  position: relative; overflow: hidden;
}
.toy-stage { position: relative; display: flex; align-items: center; justify-content: center; }
.toy-card .toy-stage { min-height: 280px; }
.toy {
  width: 210px; height: 210px; transform-origin: center bottom;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
  cursor: pointer; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.toy svg { width: 100%; height: 100%; display: block; overflow: visible; }
.toy.pressing { transform: scale(1.14, .78); }
.toy.tapping { animation: wiggle .28s ease; }
.toy.pop { animation: pop .22s ease; }
.toy.cracked .core, .toy.cracked .cracks { opacity: 1 !important; }
.toy.cracked .core { animation: ooze .4s ease; }

@keyframes wiggle {
  0% { transform: rotate(0); }
  25% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  75% { transform: rotate(-3deg); }
  100% { transform: rotate(0); }
}
@keyframes pop {
  0% { transform: scale(1.16, .76); }
  55% { transform: scale(.94, 1.07); }
  100% { transform: scale(1, 1); }
}
@keyframes ooze { from { transform: scale(.4); } to { transform: scale(1); } }

.shard-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.shard {
  position: absolute; left: 50%; top: 50%; border-radius: 2px;
  animation: shard-fly .55s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes shard-fly {
  0% { transform: translate(-50%, -50%) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)); opacity: 0; }
}
.puff {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  animation: puff .4s ease-out forwards;
}
@keyframes puff {
  0% { transform: translate(-50%, -50%); opacity: .9; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))); opacity: 0; }
}

.toy-hint { font-size: 13px; color: var(--ink-faint); text-align: center; margin: 8px 0 0; }
.toy-counter {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg-2);
  border: 1px solid var(--line); color: var(--ink-soft);
  padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 14px;
}
.toy-counter b { color: var(--accent); font-size: 16px; }
.get-fresh {
  margin-top: 10px; min-height: 44px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-weight: 800; font-size: 13px; cursor: pointer; font-family: var(--font);
}
.get-fresh:disabled { opacity: .35; cursor: default; }

/* Crispy corner */
.crispy-corner { margin: 26px 0 8px; }
.crispy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .crispy-grid { grid-template-columns: repeat(3, 1fr); } }
.crispy-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.crispy-item .toy { width: 112px; height: 112px; }
.crispy-item .nm { font-weight: 800; font-size: 14px; margin-top: 4px; }

/* Sections / text */
.section { margin: 24px 0; }
.section h2 { font-size: 22px; font-weight: 900; letter-spacing: -.02em; margin: 0 0 10px; }
.section h2 .kicker {
  display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 800; margin-bottom: 4px;
}
.section p { margin: 0 0 12px; }
.lead { font-size: 17px; }

/* Index cards */
.index-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; color: var(--ink);
  box-shadow: var(--shadow-sm); min-height: 44px;
}
a.card:hover { text-decoration: none; border-color: var(--accent); }
.card .t { display: block; font-weight: 800; font-size: 17px; }
.card .d { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.card.soon { opacity: .6; }
.card .tag {
  background: var(--bg-2); color: var(--ink-soft); border-radius: 999px;
  padding: 2px 9px; font-size: 11px; font-weight: 800; margin-left: 6px;
}

/* Buy list */
.buy-list { display: flex; flex-direction: column; gap: 12px; }
.buy-item {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-height: 44px;
  color: var(--ink);
}
.buy-item:hover { text-decoration: none; border-color: var(--accent); }
.buy-item .info { flex: 1; min-width: 0; }
.buy-item .m { display: block; font-weight: 800; font-size: 15px; }
.buy-item .n { display: block; font-size: 13px; color: var(--ink-soft); }
.buy-item .p { font-weight: 800; font-size: 15px; color: var(--good); white-space: nowrap; }
.buy-item .go {
  flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; background: var(--accent);
  color: #fff; font-weight: 800; font-size: 13px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.buy-item .go:hover { background: #cf552f; }
.price-note { font-size: 12px; color: var(--ink-faint); margin-top: 12px; }

/* Safety note */
.safety { background: #fff4ea; border: 1px solid #f3d9bf; border-radius: var(--radius); padding: 16px 18px; }
.safety h3 { margin: 0 0 6px; font-size: 15px; }
.safety p { margin: 0; font-size: 14px; color: #7a5a3a; }

/* Guide soon */
.soon-hero { text-align: center; padding: 70px 0; }
.soon-hero .big { font-size: 26px; font-weight: 900; }
.soon-hero .sub { color: var(--ink-soft); margin-top: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.site-footer .nav { justify-content: center; margin-bottom: 12px; }

/* Sound bar */
.sound-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(255, 253, 248, .92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px max(16px, var(--safe-r)) calc(10px + var(--safe-b)) max(16px, var(--safe-l));
  display: flex; align-items: center; gap: 12px;
}
.sound-toggle {
  flex: 0 0 auto; min-width: 44px; min-height: 44px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.sound-toggle.off { background: var(--card); color: var(--ink); }
.sound-label { font-size: 13px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.volume { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--line); outline: none; }
.volume::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer;
}
.volume::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; cursor: pointer; }

/* Headphone toast */
.headphone-toast {
  position: fixed; left: 50%; bottom: calc(88px + var(--safe-b)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 700; z-index: 60; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
}
.headphone-toast button {
  background: var(--accent); border: 0; color: #fff; border-radius: 999px;
  padding: 6px 14px; font-weight: 800; font-size: 13px; cursor: pointer; min-height: 36px; font-family: var(--font);
}
