/* kid-themes.css - 10/10 per-kid themes (docs/KID_THEMES.md). CSS only, keyed on body[data-user]; base colors come from
   tenants.json via brandCss (--bg / --accent / --theme). Motifs are inline SVG at low opacity. Adults are untouched. */

/* ---------- shared kid polish ---------- */
:root body[data-user="ryann"], :root body[data-user="raylee"], :root body[data-user="reese"],
:root body[data-user="roman"], :root body[data-user="reed"], :root body[data-user="nora"] {
  --kid-motif: none;
  --kid-title-font: inherit;
  --kid-title-transform: none;
  --kid-title-spacing: normal;
  --kid-bubble-radius: 18px;
  --kid-glow: 0 0 0 transparent;
  --surface: color-mix(in srgb, var(--theme) 38%, #10131a);
  --surface-raised: color-mix(in srgb, var(--theme) 48%, #151a22);
  --border-subtle: color-mix(in srgb, var(--accent) 22%, transparent);
  background: var(--kid-motif), linear-gradient(180deg, var(--theme, #141820), var(--bg)) fixed;
  background-size: 120px 120px, auto;
  background-attachment: fixed, fixed;
}
body[data-user] .pane-title, body[data-user] .login-title {
  font-family: var(--kid-title-font);
  text-transform: var(--kid-title-transform);
  letter-spacing: var(--kid-title-spacing);
  text-shadow: var(--kid-glow);
}
body[data-user]:not([data-user="tyler"]):not([data-user="ally"]):not([data-user="rob"]) .chat-bubble { border-radius: var(--kid-bubble-radius); }
body[data-user]:not([data-user="tyler"]):not([data-user="ally"]):not([data-user="rob"]) .chat-bubble--user {
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 28%, transparent);
}
body[data-user]:not([data-user="tyler"]):not([data-user="ally"]):not([data-user="rob"]) .chat-bubble--nyx {
  border-bottom-left-radius: 6px;
  border-left: 3px solid var(--accent);
}
body[data-user]:not([data-user="tyler"]):not([data-user="ally"]):not([data-user="rob"]) .tab-btn.active,
body[data-user]:not([data-user="tyler"]):not([data-user="ally"]):not([data-user="rob"]) .tab-btn[aria-selected="true"] {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 55%, transparent));
}

/* ---------- Ryann / BETTY - Forest Den (wolf, baker, caring) ---------- */
:root body[data-user="ryann"] {
  --kid-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='%236fd49a' fill-opacity='.055'%3E%3Cpath d='M92 18a12 12 0 1 0 8 21 14 14 0 1 1-8-21z'/%3E%3Cpath d='M26 64l9 16h-5l7 12h-6l6 10H11l6-10h-6l7-12h-5z'/%3E%3Cpath d='M66 86l6 11h-3l5 8H54l5-8h-3z'/%3E%3C/svg%3E");
  --kid-title-font: "Iowan Old Style", "Palatino", Georgia, serif;
  --kid-bubble-radius: 16px;
}

/* ---------- Raylee / KING - Royal Chill (sloth, crown, cheer) ---------- */
:root body[data-user="raylee"] {
  --kid-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='%23f2c14e' fill-opacity='.06'%3E%3Cpath d='M14 40l6-14 8 9 8-9 6 14z'/%3E%3Cpath d='M84 86c10-12 22-12 26-6-8 0-16 4-26 6z'/%3E%3Ccircle cx='96' cy='26' r='2.5'/%3E%3Ccircle cx='40' cy='96' r='2'/%3E%3C/svg%3E");
  --kid-title-font: "Avenir Next", "Futura", system-ui, sans-serif;
  --kid-title-transform: uppercase;
  --kid-title-spacing: .06em;
  --kid-glow: 0 0 12px rgba(242, 193, 78, .35);
}
body[data-user="raylee"] .chat-bubble { transition-timing-function: cubic-bezier(.2, .8, .2, 1); animation-duration: 260ms; }

/* ---------- Reese / MAX - Skate Dragon (purple dragon, Max Mayfield, retro neon) ---------- */
:root body[data-user="reese"] {
  --kid-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' fill='none' stroke='%23c59bf0' stroke-opacity='.045' stroke-width='2'%3E%3Cpath d='M0 30a15 15 0 0 1 30 0a15 15 0 0 1 30 0M-15 60a15 15 0 0 1 30 0a15 15 0 0 1 30 0a15 15 0 0 1 30 0'/%3E%3C/svg%3E");
  --kid-title-font: "Avenir Next Condensed", "Arial Narrow", system-ui, sans-serif;
  --kid-title-transform: uppercase;
  --kid-title-spacing: .08em;
  --kid-glow: 0 0 10px rgba(197, 155, 240, .65), 0 0 22px rgba(255, 79, 163, .25);
}
:root body[data-user="reese"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23ff8fc7' stroke-opacity='.07' stroke-width='2'%3E%3Ccircle cx='140' cy='40' r='16'/%3E%3Cpath d='M124 40h32M140 24v32M129 29c6 6 6 16 0 22M151 29c-6 6-6 16 0 22'/%3E%3C/svg%3E"), var(--kid-motif), linear-gradient(180deg, var(--theme), var(--bg));
  background-size: 180px 180px, 60px 60px, auto;
  background-attachment: fixed, fixed, fixed;
}
body[data-user="reese"] .chat-bubble--user { background: linear-gradient(135deg, var(--accent), #ff8fc7); }
body[data-user="reese"] .chat-bubble--nyx { border-left-color: #ff8fc7; }

/* ---------- Roman / OBSIDIAN - Night Prowl (black panther) ---------- */
:root body[data-user="roman"] {
  --kid-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%23a78bfa' stroke-opacity='.07' stroke-width='2'%3E%3Cpath d='M20 30c6-6 14-2 12 6s-12 8-14 2M80 70c6-6 14-2 12 6s-12 8-14 2M60 18c3-3 7-1 6 3M30 90c3-3 7-1 6 3'/%3E%3C/svg%3E");
  --kid-title-font: "Avenir Next", system-ui, sans-serif;
  --kid-title-transform: uppercase;
  --kid-title-spacing: .14em;
  --kid-bubble-radius: 8px;
  --kid-glow: 0 0 14px rgba(167, 139, 250, .45);
  --surface: rgba(24, 22, 34, .82);
}

/* ---------- Reed / BONKERS - Jersey Jungle (monkey, all-gas athlete) ---------- */
:root body[data-user="reed"] {
  --kid-motif: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 212, 0, .035) 46px 58px);
  --kid-title-font: "Impact", "Haettenschweiler", "Arial Narrow Bold", system-ui, sans-serif;
  --kid-title-spacing: .03em;
  --kid-bubble-radius: 14px;
}
:root body[data-user="reed"] { background-size: auto, auto; }
body[data-user="reed"] .chat-send-btn:active, body[data-user="reed"] .tab-btn:active { transform: scale(.9); transition: transform 90ms; }

/* ---------- Nora / BELLA - Meadow Ride (horse, chinchillas) ---------- */
:root body[data-user="nora"] {
  --kid-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%23f9a8d4' stroke-opacity='.08' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 26v10a10 10 0 0 0 20 0V26'/%3E%3Cpath d='M86 90l3 6 6 1-4 4 1 6-6-3-6 3 1-6-4-4 6-1z' stroke-width='2'/%3E%3C/svg%3E");
  --kid-title-font: "Iowan Old Style", Georgia, serif;
  --kid-bubble-radius: 22px;
}

/* Council 10/10: motifs off for high-contrast / forced-colors users; titles keep no glow there either. */
@media (prefers-contrast: more), (forced-colors: active) {
  :root body[data-user] { background-image: none !important; background: var(--bg) !important; }
  body[data-user] .pane-title, body[data-user] .login-title { text-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-user] .chat-bubble { animation: none; }
  body[data-user="reed"] .chat-send-btn:active, body[data-user="reed"] .tab-btn:active { transform: none; }
}
