:root {
  color-scheme: light;
  --paper: #f6f3e9;
  --paper-deep: #eee9d9;
  --ink: #20251d;
  --muted: #7d8072;
  --green: #d8fa54;
  --green-dark: #25331c;
  --orange: #ff7448;
  --lilac: #e6d6ff;
  --line: #dedbce;
  --white: #fffef9;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh; margin: 0; color: var(--ink); background: var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: radial-gradient(#b9b5a4 0.55px, transparent 0.55px);
  background-size: 15px 15px; background-position: 7px 7px;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.site-header {
  height: 74px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid rgba(32,37,29,.14);
  background: rgba(246,243,233,.92); position: relative; z-index: 2;
}
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 950; letter-spacing: -.065em; font-size: 19px; }
.wordmark-egg { font-size: 24px; filter: saturate(.82); }
.wordmark-dot, .heading-period { color: var(--orange); }
.header-note, .eyebrow, .volume-label, .press-note, .hero-index, .keyboard-note {
  font-size: 10px; font-weight: 800; letter-spacing: .11em;
}
.header-note { display: flex; align-items: center; gap: 8px; color: #727568; }
.live-dot, .press-dot, .counter-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #89aa3c; }
.live-dot { box-shadow: 0 0 0 3px rgba(137,170,60,.16); }
.credits-trigger { border: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 750; cursor: pointer; padding: 9px 0 9px 12px; }
.credits-trigger span { color: var(--orange); font-size: 16px; margin-left: 4px; }

.page-shell { width: min(1120px, calc(100% - 48px)); margin: 32px auto 0; }
.hero {
  min-height: 344px; background: var(--green); position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; border-radius: 7px;
  padding: clamp(30px, 5.6vw, 66px) clamp(28px, 6vw, 78px) 58px;
  isolation: isolate;
}
.hero::after {
  content: ""; z-index: -1; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  right: 30px; top: -255px; border: 1px solid rgba(37,51,28,.14);
  box-shadow: 0 0 0 34px rgba(37,51,28,.035), 0 0 0 70px rgba(37,51,28,.035), 0 0 0 112px rgba(37,51,28,.035);
}
.hero-copy { z-index: 1; align-self: center; max-width: 530px; }
.eyebrow { margin: 0; color: #66734e; }
.eyebrow-mark { color: var(--orange); font-size: 16px; vertical-align: -1px; margin-right: 4px; }
.hero h1 { margin: 19px 0 14px; font-size: clamp(54px, 8.4vw, 96px); line-height: .84; letter-spacing: -.09em; font-weight: 950; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero-description { margin: 19px 0 23px; max-width: 355px; color: #47513d; font-size: 15px; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 17px; flex-wrap: wrap; }
.random-button {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 17px;
  border: 0; border-radius: 4px; background: var(--ink); color: var(--white);
  font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: 4px 4px 0 rgba(32,37,29,.17);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.random-button:hover { background: #41483a; transform: translate(-2px,-2px); box-shadow: 6px 6px 0 rgba(32,37,29,.15); }
.random-button:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(32,37,29,.17); }
.random-icon { font-size: 18px; color: var(--green); line-height: 1; }
.press-note { display: inline-flex; align-items: center; gap: 7px; color: #66734e; font-size: 9px; }
.press-dot { background: var(--orange); width: 6px; height: 6px; }
.hero-art { position: relative; min-height: 220px; display: grid; place-items: center; }
.hero-egg { z-index: 1; display: inline-block; font-size: clamp(100px, 15vw, 175px); line-height: 1; filter: drop-shadow(12px 16px 0 rgba(32,37,29,.12)); transform: rotate(9deg); }
.art-orbit { position: absolute; border: 1px solid rgba(37,51,28,.28); border-radius: 50%; width: 230px; height: 112px; transform: rotate(-25deg); }
.orbit-two { width: 270px; height: 140px; transform: rotate(34deg); border-style: dashed; opacity: .65; }
.art-spark { position: absolute; z-index: 2; color: var(--orange); font-size: 29px; animation: twinkle 2s ease-in-out infinite alternate; }
.spark-one { top: 23px; right: 16%; }
.spark-two { bottom: 30px; left: 13%; color: var(--ink); font-size: 23px; animation-delay: .7s; }
.art-cloud { position: absolute; color: #6c8245; font-size: 52px; font-weight: 300; transform: rotate(-14deg); opacity: .8; }
.cloud-one { right: 5%; top: 45%; }
.cloud-two { left: 3%; top: 30%; transform: rotate(12deg) scale(.7); }
.art-caption { position: absolute; right: 0; bottom: 14px; border-left: 1px solid rgba(32,37,29,.45); padding-left: 8px; color: #67734e; text-transform: uppercase; font-size: 9px; line-height: 1.45; letter-spacing: .09em; font-weight: 800; transform: rotate(-5deg); }
.hero-index { position: absolute; bottom: 19px; left: clamp(28px, 6vw, 78px); color: #64714d; font-size: 9px; }
.hero-index span { color: var(--ink); }
@keyframes twinkle { from { transform: rotate(-8deg) scale(.86); } to { transform: rotate(12deg) scale(1.12); } }

.sound-section { padding: 46px 0 40px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 19px; }
.section-eyebrow { color: #848777; }
.section-heading h2 { margin: 7px 0 0; font-size: clamp(28px, 4vw, 39px); letter-spacing: -.065em; line-height: 1; font-weight: 900; }
.volume-control { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--line); background: rgba(255,254,249,.7); border-radius: 4px; }
.volume-icon { color: var(--orange); font-size: 21px; transform: rotate(180deg); line-height: .7; }
.volume-label { color: #76796c; font-size: 9px; white-space: nowrap; }
.volume-control input { width: 92px; height: 4px; accent-color: #829d34; cursor: pointer; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 11px; }
.pad {
  --pad-tint: var(--white);
  position: relative; text-align: left; color: var(--ink); cursor: pointer; min-height: 105px;
  border: 1px solid rgba(32,37,29,.11); border-radius: 5px; background: var(--pad-tint);
  padding: 15px 14px 13px; display: grid; grid-template-columns: 42px 1fr 20px;
  grid-template-rows: 1fr auto; column-gap: 11px; align-items: center; overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  box-shadow: 0 2px 0 rgba(32,37,29,.04);
}
.pad:nth-child(4n + 2) { --pad-tint: #fbf4dc; }
.pad:nth-child(4n + 3) { --pad-tint: #f3ecff; }
.pad:nth-child(4n) { --pad-tint: #f8e8df; }
.pad::before { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: #b3cd54; transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.pad:hover { transform: translateY(-3px); border-color: rgba(32,37,29,.32); box-shadow: 0 7px 16px rgba(32,37,29,.09); }
.pad:hover::before { transform: scaleX(1); }
.pad:active { transform: translateY(1px) scale(.99); }
.pad-emoji { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.68); font-size: 25px; }
.pad-copy { min-width: 0; align-self: end; }
.pad-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 850; letter-spacing: -.025em; }
.pad-note { display: block; margin-top: 3px; color: #858779; font-size: 10px; }
.pad-key { grid-column: 3; grid-row: 1; align-self: start; justify-self: end; border: 1px solid #d8d5c9; border-radius: 3px; padding: 2px 5px; color: #8a8b7e; font-size: 9px; font-weight: 800; line-height: 1.2; }
.pad-meter { grid-column: 2 / 4; grid-row: 2; align-self: end; height: 13px; display: flex; gap: 2px; align-items: center; opacity: .55; }
.pad-meter i { display: block; width: 2px; height: var(--h); border-radius: 2px; background: #879d42; }
.pad-play { grid-column: 3; grid-row: 2; align-self: end; justify-self: end; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--ink); color: var(--green); font-size: 9px; padding-left: 1px; }
.pad.hit { animation: pad-hit .34s cubic-bezier(.2,.8,.3,1.2); }
.pad.hit::before { transform: scaleX(1); background: var(--orange); }
@keyframes pad-hit { 0% { transform: scale(1); } 35% { transform: scale(.96) rotate(-.7deg); } 72% { transform: scale(1.025) rotate(.5deg); } 100% { transform: scale(1); } }
.keyboard-note { margin: 18px 0 0; display: flex; align-items: center; justify-content: center; gap: 5px; color: #858779; letter-spacing: .035em; font-size: 10px; font-weight: 600; }
.keyboard-icon { color: #989987; font-size: 16px; margin-right: 3px; }
kbd { display: inline-block; min-width: 19px; text-align: center; padding: 3px 5px; border: 1px solid #d8d5c9; border-bottom-width: 2px; border-radius: 3px; background: #fffcf2; color: #565b4c; font-family: inherit; font-size: 9px; font-weight: 700; line-height: 1.1; }
.keyboard-sep { padding: 0 4px; color: #c1beaf; }
.site-footer { min-height: 63px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #858779; font-size: 10px; }
.footer-brand { color: var(--ink); font-size: 12px; font-weight: 950; letter-spacing: -.04em; }
.footer-disclaimer { text-align: center; }
.counter-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 99px; color: #666a5b; white-space: nowrap; }
.counter-dot { width: 6px; height: 6px; background: var(--orange); }

/* Fun burst and mascot motion */
.fx { position: fixed; inset: 0; z-index: 20; overflow: hidden; pointer-events: none; }
.particle { position: fixed; transform: translate(-50%,-50%); animation: fly var(--dur,1s) cubic-bezier(.15,.6,.4,1) forwards; }
@keyframes fly { to { transform: translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(var(--rot)) scale(1.15); opacity: 0; } }
.egg.wobble { animation: egg-wobble .65s ease; }
@keyframes egg-wobble { 0%,100% { transform: rotate(0) scale(1); } 24% { transform: rotate(-13deg) scale(1.1); } 55% { transform: rotate(15deg) scale(1.04); } 80% { transform: rotate(3deg) scale(1.01); } }
body.shake { animation: page-nudge .3s ease; }
@keyframes page-nudge { 20% { transform: translateX(-3px); } 55% { transform: translateX(3px); } 80% { transform: translateX(-1px); } }

.credits-dialog { width: min(620px, calc(100% - 28px)); max-height: min(78vh, 720px); overflow: auto; padding: 27px 30px 30px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 20px 80px rgba(20,24,17,.26); }
.credits-dialog::backdrop { background: rgba(28,33,24,.48); backdrop-filter: blur(3px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; }
.dialog-top .eyebrow { font-size: 9px; }
.dialog-close { border: 1px solid var(--line); border-radius: 50%; width: 30px; height: 30px; background: transparent; color: var(--ink); font-size: 21px; line-height: 1; cursor: pointer; }
.credits-dialog h2 { margin: 15px 0 5px; font-size: 34px; letter-spacing: -.07em; }
.credit-note { margin: 0 0 17px; color: var(--muted); font-size: 12px; }
.credit-list { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.7; }
.credit-list li { padding: 5px 0; border-top: 1px solid var(--line); }
.credit-list a { color: #526a22; font-weight: 700; }
.clic { font-weight: 800; }

@media (min-width: 900px) {
  .pad:nth-child(1) { --pad-tint: #e7edcf; }
}
@media (max-width: 760px) {
  .site-header { height: 64px; padding-inline: 20px; }
  .header-note { display: none; }
  .page-shell { width: min(100% - 32px, 560px); margin-top: 16px; }
  .hero { grid-template-columns: 1fr .75fr; min-height: 330px; padding: 35px 27px 50px; }
  .hero h1 { font-size: clamp(54px, 11vw, 76px); }
  .hero-art { min-height: 190px; }
  .hero-egg { font-size: clamp(94px, 19vw, 140px); }
  .art-orbit { width: 180px; height: 95px; }
  .orbit-two { width: 208px; height: 115px; }
  .board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pad { min-height: 96px; }
  .site-footer { flex-wrap: wrap; padding: 15px 0; }
  .footer-disclaimer { order: 3; width: 100%; text-align: left; }
}
@media (max-width: 480px) {
  .wordmark { font-size: 17px; }
  .credits-trigger { font-size: 11px; }
  .hero { display: block; min-height: 0; padding: 32px 23px 55px; }
  .hero h1 { font-size: clamp(48px, 16vw, 68px); }
  .hero-description { max-width: 270px; font-size: 14px; }
  .hero-art { position: absolute; width: 126px; height: 112px; min-height: 0; right: -17px; top: -4px; opacity: .48; }
  .hero-egg { font-size: 73px; }
  .art-orbit { width: 112px; height: 58px; }
  .orbit-two { width: 132px; height: 73px; }
  .art-caption, .cloud-two { display: none; }
  .spark-one { right: 8%; top: 7px; }
  .spark-two { left: 2%; bottom: 3px; }
  .hero-copy { position: relative; }
  .eyebrow { max-width: 210px; font-size: 8px; }
  .hero-index { left: 23px; }
  .section-heading { align-items: start; flex-direction: column; }
  .volume-control { align-self: stretch; justify-content: flex-start; }
  .volume-control input { flex: 1; max-width: 150px; }
  .pad { padding: 12px 10px; grid-template-columns: 34px 1fr 18px; column-gap: 8px; min-height: 88px; }
  .pad-emoji { width: 34px; height: 34px; font-size: 21px; }
  .pad-name { font-size: 11px; }
  .pad-note { font-size: 9px; }
  .keyboard-note { flex-wrap: wrap; font-size: 9px; line-height: 1.8; }
  .site-footer { align-items: center; }
  .counter-pill { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Compact masthead: keep the board above the fold, not the decoration. */
.page-shell { margin-top: 14px; }
.hero {
  min-height: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 13px 2px 17px; overflow: visible;
  background: transparent; border-radius: 0; border-bottom: 1px solid var(--line);
}
.hero::after, .hero-art, .hero-index { display: none; }
.hero-copy { max-width: none; }
.hero .eyebrow { font-size: 9px; }
.hero h1 { margin: 5px 0 0; font-size: clamp(32px, 4.5vw, 47px); line-height: 1; letter-spacing: -.075em; }
.hero-side { display: flex; align-items: center; gap: 19px; }
.hero-description { margin: 0; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.random-button { padding: 10px 13px; font-size: 12px; white-space: nowrap; }
.random-icon { font-size: 16px; }
.sound-section { padding-top: 25px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: unset; min-height: 0; padding: 13px 0 17px; }
  .hero-side { gap: 12px; }
}
@media (max-width: 480px) {
  .hero { display: flex; flex-direction: column; align-items: stretch; padding: 13px 0 16px; gap: 0; }
  .hero-copy { width: 100%; }
  .hero .eyebrow { font-size: 8px; }
  .hero h1 { font-size: clamp(31px, 9vw, 39px); }
  .hero-side { width: 100%; margin-top: 10px; justify-content: space-between; }
  .hero-description { font-size: 11px; }
  .random-button { padding: 9px 11px; }
  .sound-section { padding-top: 20px; }
}
