/* ════════════════════════════════════════════════════════════
   KidOS · Kiosk Shared Chassis (Direction A — "Playroom")
   ────────────────────────────────────────────────────────────
   Kiosk-specific primitives layered on top of /frontend/tokens.css.
   Include order in each kiosk html:
     <link rel="stylesheet" href="/frontend/tokens.css"/>
     <link rel="stylesheet" href="/frontend/kiosk/kiosk-common.css"/>

   Design DNA:
   - Thick sticker-black borders (2.5px)
   - Hard drop shadows (offset only, no blur)
   - Nunito Black display + Caveat handwriting accents
   - Multicolor "zones" — each kiosk mode claims one accent color
   - Mascot character + ✦ eyebrow + ticker bottom bar
   ════════════════════════════════════════════════════════════ */

/* ── Zone color theming — set --zone on .kc-chassis or body ── */
.kc-zone-green   { --zone: var(--g-green);  --zone-on: #fff; }
.kc-zone-blue    { --zone: var(--g-blue);   --zone-on: #fff; }
.kc-zone-orange  { --zone: var(--g-orange); --zone-on: #fff; }
.kc-zone-purple  { --zone: var(--g-purple); --zone-on: #fff; }
.kc-zone-yellow  { --zone: var(--g-yellow); --zone-on: var(--g-dark); }
.kc-zone-pink    { --zone: var(--g-pink);   --zone-on: #fff; }
.kc-zone-red     { --zone: var(--g-red);    --zone-on: #fff; }

/* ── Full-height chassis (keeps topbar/content/ticker sticky) ─ */
.kc-chassis {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--g-cream);
  color: var(--g-dark);
  font-family: var(--g-font-body);
}

/* ── Top bar with mascot + brand + zone pill ────────────────── */
.kc-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 14px 22px;
  background: var(--g-cream);
  border-bottom: var(--g-stroke);
  flex-shrink: 0;
}
.kc-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.kc-brand-name {
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--g-dark);
}

/* Brand logo (SVG wordmark — replaces text name when using real logo) */
.kc-brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
@media (max-width: 640px) {
  .kc-brand-logo { height: 18px; }
}
.kc-zone-pill {
  background: var(--zone, var(--g-dark));
  color: var(--zone-on, #fff);
  font-size: 0.62rem;
  font-weight: 900;
  padding: 4px 11px;
  border-radius: 100px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid var(--g-dark);
}
.kc-topbar-right {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.82rem; font-weight: 700; color: var(--g-muted);
}

/* ── Mascot SVG wrapper (kc-mascot) ─────────────────────────── */
.kc-mascot {
  display: inline-block;
  flex-shrink: 0;
  filter: drop-shadow(2px 2px 0 var(--g-dark));
}
.kc-mascot svg { display: block; }

/* ── Bottom ticker (Caveat handwriting, dark bar) ───────────── */
.kc-ticker {
  background: var(--g-dark);
  color: #fff;
  padding: 10px 18px;
  font-family: var(--g-font-hand);
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  gap: 22px;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}
.kc-ticker .sep { opacity: 0.4; }
.kc-ticker .highlight { color: var(--zone, var(--g-yellow)); }

/* ── Main content scroll area ───────────────────────────────── */
.kc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 28px 26px;
  position: relative;
}

/* ── Decorative blobs (for attract / welcome) ───────────────── */
.kc-blob {
  position: absolute;
  pointer-events: none;
  border-radius: 62% 38% 44% 56% / 54% 48% 52% 46%;
  animation: kc-blob-float 8s ease-in-out infinite;
  z-index: 0;
}
.kc-blob.b2 { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; animation-duration: 10s; animation-direction: reverse; }
@keyframes kc-blob-float {
  0%,100% { transform: translate(0,0) rotate(0); }
  33%     { transform: translate(10px,-14px) rotate(3deg); }
  66%     { transform: translate(-8px,8px) rotate(-2deg); }
}

/* ── Caveat ✦ eyebrow (used above titles) ───────────────────── */
.kc-eyebrow {
  font-family: var(--g-font-hand);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--zone, var(--g-green));
  display: inline-flex; align-items: center; gap: 4px;
  line-height: 1;
}

/* ── Display titles ────────────────────────────────────────── */
.kc-h1 {
  font-weight: 900;
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.kc-h1 em { font-style: italic; color: var(--g-purple); font-weight: 900; }
.kc-h2 {
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.kc-sub {
  font-weight: 600;
  color: var(--g-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* ── Sticker card (hard drop shadow, zone-colored) ──────────── */
.kc-sticker {
  background: #fff;
  border: var(--g-stroke);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 3px 3px 0 var(--zone, var(--g-dark));
  transition: transform .2s var(--g-ease-bounce), box-shadow .2s;
}
.kc-sticker.flat { box-shadow: none; }
.kc-sticker.hoverable:hover {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--zone, var(--g-dark));
}
.kc-sticker.lg { padding: 32px 36px; border-radius: 24px; box-shadow: 4px 4px 0 var(--zone, var(--g-dark)); }

/* ── Option card (big button with icon + title + sub) ───────── */
.kc-option-card {
  background: #fff;
  border: var(--g-stroke);
  border-radius: 20px;
  padding: 18px 22px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--zone, var(--g-dark));
  transition: transform .15s var(--g-ease-bounce), box-shadow .15s;
  text-align: left;
  width: 100%;
  color: inherit;
  font-family: inherit;
}
.kc-option-card:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--zone, var(--g-dark)); }
.kc-option-card:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--zone, var(--g-dark)); }
.kc-option-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--zone, var(--g-green));
  border: var(--g-stroke);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  color: #fff;
}
.kc-option-body { flex: 1; min-width: 0; }
.kc-option-title { font-size: 1rem; font-weight: 900; color: var(--g-dark); }
.kc-option-sub { font-size: 0.8rem; color: var(--g-muted-2); font-weight: 600; margin-top: 2px; }
.kc-option-arrow { font-size: 1.4rem; font-weight: 900; color: var(--zone, var(--g-dark)); flex-shrink: 0; }

/* ── Primary button (dark fill, zone-colored shadow) ────────── */
.kc-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 15px 24px;
  background: var(--g-dark);
  color: #fff;
  border: var(--g-stroke);
  border-radius: 100px;
  font-family: var(--g-font-body);
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--zone, var(--g-purple));
  transition: all .2s var(--g-ease-bounce);
}
.kc-btn-primary:hover:not(:disabled) {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--zone, var(--g-purple));
}
.kc-btn-primary:active:not(:disabled) {
  transform: translate(0,0);
  box-shadow: 1px 1px 0 var(--zone, var(--g-purple));
}
.kc-btn-primary:disabled {
  background: #ddd; color: var(--g-muted); cursor: not-allowed; box-shadow: none;
}

/* ── Secondary button (ghost, cream) ───────────────────────── */
.kc-btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 22px;
  background: var(--g-cream);
  border: var(--g-stroke);
  border-radius: 100px;
  font-family: var(--g-font-body);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--g-dark);
  cursor: pointer;
  transition: all .15s;
}
.kc-btn-secondary:hover { background: var(--g-light); transform: translateY(-1px); }

/* ── Circular small round btn (+/- counter) ─────────────────── */
.kc-rbtn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: var(--g-stroke);
  background: var(--g-cream);
  font-family: var(--g-font-body);
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--g-dark);
  cursor: pointer;
  transition: transform .1s;
}
.kc-rbtn:active { transform: scale(0.88); }
.kc-rbtn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Progress pills (step indicator) ───────────────────────── */
.kc-progress {
  display: flex; gap: 6px;
  padding: 12px 22px 0;
  flex-shrink: 0;
}
.kc-progress-step {
  flex: 1; height: 6px;
  border-radius: 100px;
  background: #e0d8ca;
  border: 1.5px solid var(--g-dark);
  transition: background .3s;
}
.kc-progress-step.done { background: var(--zone, var(--g-green)); }
.kc-progress-step.active {
  background: var(--zone, var(--g-purple));
  animation: kc-pulse 1.8s ease-in-out infinite;
}
@keyframes kc-pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.08); }
}

/* ── Zone strip (attract bottom nav) ────────────────────────── */
.kc-zone-strip {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  border-top: var(--g-stroke);
  flex-shrink: 0;
}
.kc-zone-strip-cell {
  padding: 14px 18px;
  color: #fff;
  border-right: var(--g-stroke);
  cursor: pointer;
  transition: transform .15s;
  text-decoration: none;
  display: block;
}
.kc-zone-strip-cell:last-child { border-right: none; }
.kc-zone-strip-cell:hover { transform: translateY(-2px); }
.kc-zone-strip-cell .tag {
  font-size: 0.62rem; font-weight: 900;
  letter-spacing: 0.14em; opacity: 0.85;
  text-transform: uppercase;
}
.kc-zone-strip-cell .name {
  font-size: 1.05rem; font-weight: 900; margin-top: 3px;
}

/* ── Attract: bouncing CTA ──────────────────────────────────── */
@keyframes kc-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.kc-bounce { animation: kc-bounce 1.8s ease-in-out infinite; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .kc-topbar { padding: 10px 14px; gap: 10px; }
  .kc-brand-name { font-size: 1rem; }
  .kc-main { padding: 20px 16px; }
  .kc-zone-strip { grid-template-columns: repeat(2, 1fr); }
  .kc-zone-strip-cell:nth-child(2n) { border-right: none; }
  .kc-zone-strip-cell:nth-child(-n+2) { border-bottom: var(--g-stroke); }
}
