/* LearnDoKids – Color Your Name (premium kids theme). Scoped to .nc-page and its modal. */
.nc-page, .nc-celebrate {
  --ink: #2d2a55; --muted: #6b6896; --brand: #6c4cf5; --brand-2: #ff5fa2; --sun: #ffc93c; --sky: #3ec6ff;
  --card: #ffffff; --line: #e8e4fb; --r: 26px;
  --shadow: 0 1px 2px rgba(45,42,85,.06), 0 10px 30px rgba(108,76,245,.12), 0 30px 60px rgba(45,42,85,.08);
  --display: Fredoka, 'Baloo 2', 'Trebuchet MS', 'Arial Rounded MT Bold', system-ui, sans-serif;
  color: var(--ink);
}
.nc-page { max-width: 1240px; margin: 0 auto; padding: 0 16px 64px; }
.nc-page *, .nc-celebrate * { box-sizing: border-box; }
.nc-page [hidden], .nc-celebrate[hidden] { display: none !important; }

/* ---------- hero ---------- */
.nc-hero {
  position: relative; text-align: center; padding: 44px 16px 28px; margin: 12px 0 8px; overflow: hidden; border-radius: 36px;
  background: radial-gradient(60% 80% at 15% 0%, #ffe3f1 0, transparent 60%), radial-gradient(60% 80% at 90% 10%, #dff3ff 0, transparent 60%), radial-gradient(50% 70% at 50% 100%, #fff3c9 0, transparent 70%), #fff;
}
.nc-kicker { display: inline-block; margin: 0 0 12px; padding: 7px 16px; border-radius: 99px; font: 600 .85rem/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: #fff; box-shadow: 0 4px 14px rgba(108,76,245,.15); }
.nc-hero h1 { margin: 0; font: 700 clamp(2.3rem, 7vw, 4.2rem)/1.05 var(--display); color: var(--ink); }
.nc-grad { background: linear-gradient(90deg, #ff5fa2, #ff9a3c 35%, #6c4cf5 75%, #3ec6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nc-lead { max-width: 640px; margin: 14px auto 0; font-size: clamp(1rem, 2.4vw, 1.2rem); line-height: 1.55; color: var(--muted); }
.nc-steps { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 0; padding: 0; list-style: none; }
.nc-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 99px; background: #fff; box-shadow: 0 4px 14px rgba(45,42,85,.08); font: 600 .95rem var(--display); }
.nc-steps b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); font-size: .85rem; }
.nc-float { position: absolute; font-size: 2rem; opacity: .9; animation: ncBob 5s ease-in-out infinite; pointer-events: none; }
.nc-f1 { left: 6%; top: 22%; } .nc-f2 { right: 7%; top: 16%; animation-delay: -1.5s; font-size: 2.6rem; } .nc-f3 { left: 12%; bottom: 14%; animation-delay: -3s; } .nc-f4 { right: 14%; bottom: 18%; animation-delay: -2s; }
@keyframes ncBob { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(6deg); } }

/* ---------- layout ---------- */
.nc-studio { margin-top: 20px; }
.nc-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1020px) { .nc-layout { grid-template-columns: minmax(0, 1fr) 340px; } .nc-learn { position: sticky; top: 16px; } }
.nc-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.nc-main > *, .nc-learn { min-width: 0; }
.nc-page { overflow-x: clip; }

/* ---------- controls ---------- */
.nc-controls { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.nc-label { display: block; margin-bottom: 8px; font: 600 1rem var(--display); }
.nc-name-row { display: flex; gap: 10px; }
.nc-name-row input {
  flex: 1; min-width: 0; padding: 14px 18px; font: 600 1.4rem var(--display); color: var(--ink); background: #faf9ff;
  border: 3px solid var(--line); border-radius: 18px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.nc-name-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 5px rgba(108,76,245,.15); background: #fff; }
.nc-style-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.nc-style-label { flex: 1 1 140px; font: 600 1rem var(--display); color: var(--brand); }
.nc-toggles { display: flex; gap: 8px; }
.nc-toggle { padding: 8px 12px; border-radius: 99px; border: 2px solid var(--line); background: #fff; font: 600 .85rem var(--display); color: var(--muted); cursor: pointer; transition: all .15s; }
.nc-toggle.on { background: #efeaff; border-color: var(--brand); color: var(--brand); }
@media (max-width: 420px) { .nc-toggle span { display: none; } }

/* ---------- buttons ---------- */
.nc-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border: 0; border-radius: 16px; cursor: pointer;
  font: 600 1rem var(--display); color: var(--ink); background: #fff; box-shadow: 0 4px 0 #ddd8f5, 0 6px 14px rgba(45,42,85,.08);
  transition: transform .08s, box-shadow .08s, filter .15s; -webkit-tap-highlight-color: transparent;
}
.nc-btn:hover { filter: brightness(1.03); } .nc-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #ddd8f5; }
.nc-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.nc-btn-primary { color: #fff; background: linear-gradient(135deg, #8a5cff, #6c4cf5); box-shadow: 0 4px 0 #4d33c4, 0 8px 18px rgba(108,76,245,.35); }
.nc-btn-primary:active { box-shadow: 0 1px 0 #4d33c4; }
.nc-btn-refresh { color: #fff; background: linear-gradient(135deg, #ff7ab8, #ff9a3c); box-shadow: 0 4px 0 #d9622a, 0 8px 18px rgba(255,122,90,.3); }
.nc-btn-refresh:active { box-shadow: 0 1px 0 #d9622a; }
.nc-pulse { animation: ncPulse 1.1s ease-in-out infinite; }
@keyframes ncPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.nc-btn:focus-visible, .nc-swatch:focus-visible, .nc-chip:focus-visible, .nc-tool:focus-visible, .nc-tile:focus-visible, .nc-toggle:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }

/* ---------- stage ---------- */
.nc-stage-wrap { position: relative; padding: 14px; border-radius: 34px; background: linear-gradient(135deg, #fff, #f4f0ff); box-shadow: var(--shadow); }
.nc-stage { aspect-ratio: 10 / 7; position: relative; border-radius: 26px; overflow: hidden; line-height: 0; user-select: none; -webkit-user-select: none; background: #fff; box-shadow: inset 0 0 0 1px rgba(45,42,85,.06); }
.nc-svg { display: block; width: 100%; height: auto; animation: ncIn .45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes ncIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.nc-fill { cursor: pointer; transition: filter .12s; } .nc-fill:hover { filter: brightness(.96) saturate(1.1); }
.nc-name { pointer-events: auto; }
.nc-spark { position: absolute; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; z-index: 3; animation: ncSpark .65s ease-out forwards; }
@keyframes ncSpark { from { transform: translate(-50%,-50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; } }

.nc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nc-progress-wrap { display: flex; align-items: center; gap: 14px; background: var(--card); padding: 14px 18px; border-radius: 20px; box-shadow: var(--shadow); }
.nc-progress { flex: 1; height: 14px; border-radius: 99px; background: #eee9ff; overflow: hidden; }
.nc-progress span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ff5fa2, #ffc93c, #3ddc97, #3ec6ff, #6c4cf5); background-size: 200% 100%; transition: width .35s cubic-bezier(.3,1.3,.5,1); }
.nc-stars { display: flex; gap: 2px; }
.nc-star { font-style: normal; font-size: 1.7rem; line-height: 1; color: #e3dff5; transition: color .2s, transform .3s; }
.nc-star.on { color: #ffc93c; transform: scale(1.25) rotate(-8deg); text-shadow: 0 2px 8px rgba(255,201,60,.6); }
.nc-hint { margin: -4px 0 0; text-align: center; font: 600 1rem var(--display); color: var(--muted); }

/* ---------- palette ---------- */
.nc-palette { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.nc-now { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 14px; font: 600 1.1rem var(--display); }
.nc-now-dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink); }
.nc-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; max-width: 560px; margin: 0 auto; }
@media (max-width: 520px) { .nc-swatches { grid-template-columns: repeat(6, 1fr); gap: 8px; } }
.nc-swatch { aspect-ratio: 1; width: 100%; border-radius: 50%; cursor: pointer; border: 3px solid #fff; background: var(--sw); box-shadow: 0 0 0 2px rgba(45,42,85,.18), 0 4px 8px rgba(45,42,85,.15); transition: transform .12s; padding: 0; }
.nc-swatch:hover { transform: scale(1.12); }
.nc-swatch.on { transform: scale(1.2); box-shadow: 0 0 0 4px var(--ink), 0 6px 12px rgba(45,42,85,.3); }
.nc-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.nc-tool { padding: 10px 16px; border-radius: 99px; border: 2px solid var(--line); background: #fff; font: 600 .95rem var(--display); color: var(--ink); cursor: pointer; transition: all .15s; }
.nc-tool.on { border-color: var(--brand); background: #efeaff; color: var(--brand); box-shadow: 0 0 0 3px rgba(108,76,245,.15); }

/* ---------- style gallery ---------- */
.nc-gallery { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.nc-h2 { margin: 0 0 14px; font: 700 clamp(1.3rem, 3.5vw, 1.8rem)/1.2 var(--display); }
.nc-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
@media (max-width: 640px) { .nc-styles { display: flex; overflow-x: auto; gap: 10px; padding: 4px 2px 10px; scroll-snap-type: x proximity; } .nc-chip { flex: 0 0 112px; scroll-snap-align: start; } }
.nc-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 20px; cursor: pointer; border: 3px solid transparent; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ac) 25%, transparent); transition: transform .12s, box-shadow .12s; font-family: var(--display); color: var(--ink); }
.nc-chip:hover { transform: translateY(-3px); }
.nc-chip.on { border-color: var(--ac); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ac); transform: translateY(-3px); }
.nc-chip-emoji { font-size: 1.9rem; line-height: 1; } .nc-chip-name { font-weight: 600; font-size: .82rem; text-align: center; line-height: 1.15; }

/* ---------- learn panel ---------- */
.nc-learn { background: linear-gradient(180deg, #fff, #f8f5ff); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.nc-learn h2 { margin: 0 0 14px; font: 700 1.25rem/1.2 var(--display); }
.nc-learn h2 span { color: var(--brand); }
.nc-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.nc-stats span { padding: 6px 12px; border-radius: 99px; background: #efeaff; font: 600 .85rem var(--display); }
.nc-stats b { font-size: 1.05rem; }
.vowel { --t: #ff7a45; } .cons { --t: #3b82f6; }
.nc-stats .vowel { background: #ffece3; color: #c2410c; } .nc-stats .cons { background: #e3eeff; color: #1d4ed8; }
.nc-letters { display: flex; flex-wrap: wrap; gap: 8px; }
.nc-tile { position: relative; width: 52px; height: 62px; padding: 0; border: 0; border-radius: 16px; cursor: pointer; display: grid; place-items: center; color: #fff; font-family: var(--display); transition: transform .12s; }
.nc-tile.vowel { background: linear-gradient(160deg, #ff9a5c, #ff6b6b); box-shadow: 0 4px 0 #d9483f; }
.nc-tile.cons { background: linear-gradient(160deg, #5eb0ff, #5b6cf5); box-shadow: 0 4px 0 #3b46c4; }
.nc-tile:active { transform: translateY(3px); box-shadow: none; }
.nc-tile-letter { font-weight: 700; font-size: 1.8rem; line-height: 1; margin-top: -6px; }
.nc-tile-num { position: absolute; bottom: 5px; font-size: .72rem; font-weight: 600; opacity: .9; }
.nc-tile.flash { animation: ncFlash .7s ease; }
@keyframes ncFlash { 0%,100% { transform: none; } 30% { transform: translateY(-10px) scale(1.15) rotate(-4deg); } }
.nc-legend { margin: 10px 0 0; font-size: .78rem; color: var(--muted); } .nc-legend .vowel { color: #c2410c; font-weight: 700; } .nc-legend .cons { color: #1d4ed8; font-weight: 700; }
.nc-word { min-height: 3.2rem; margin: 14px 0; padding: 12px 14px; border-radius: 16px; background: #fff; border: 2px dashed var(--line); font: 600 1.1rem var(--display); text-align: center; }
.nc-word-emoji { font-size: 1.6rem; vertical-align: -3px; }
.nc-spell { width: 100%; }
.nc-fact { position: relative; margin-top: 20px; padding: 24px 16px 16px; border-radius: 20px; background: linear-gradient(135deg, #fff7d6, #ffe9f3); box-shadow: inset 0 0 0 2px rgba(255,201,60,.5); }
.nc-fact-badge { position: absolute; top: -13px; left: 14px; padding: 5px 12px; border-radius: 99px; background: var(--ink); color: #fff; font: 600 .8rem var(--display); }
.nc-fact-title { margin: 0 0 4px; font: 700 1rem var(--display); color: #b4570c; }
.nc-fact p:last-child { margin: 0; line-height: 1.55; font-size: .98rem; }

/* ---------- why / faq ---------- */
.nc-why { margin-top: 48px; }
.nc-why-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.nc-why-grid article { padding: 22px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); }
.nc-why-grid article > span { font-size: 2rem; } .nc-why-grid h3 { margin: 8px 0 6px; font: 700 1.15rem var(--display); } .nc-why-grid p { margin: 0; color: var(--muted); line-height: 1.55; }
.nc-faq-title { margin-top: 36px; }
.nc-faq details { margin-bottom: 10px; padding: 14px 18px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(45,42,85,.07); }
.nc-faq summary { cursor: pointer; font: 600 1.05rem var(--display); } .nc-faq p { margin: 10px 0 0; color: var(--muted); line-height: 1.55; }

/* ---------- celebration ---------- */
.nc-celebrate { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 16px; background: rgba(45,42,85,.6); backdrop-filter: blur(6px); overflow-y: auto; }
.nc-celebrate-inner { position: relative; width: min(560px, 100%); padding: 26px 22px 24px; border-radius: 32px; background: #fff; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: ncIn .4s cubic-bezier(.2,.9,.3,1.3); z-index: 2; }
.nc-celebrate-inner h2 { margin: 4px 0 12px; font: 700 clamp(1.5rem, 5vw, 2rem) var(--display); }
.nc-celebrate-inner p { margin: 12px 0; color: var(--muted); }
.nc-celebrate-emoji { font-size: 2rem; margin: 0 !important; }
.nc-preview { border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px rgba(45,42,85,.2); line-height: 0; } .nc-preview svg { width: 100%; height: auto; }
.nc-celebrate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.nc-x { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #f1eefc; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink); }
.nc-confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.nc-confetti i { position: absolute; top: -20px; border-radius: 2px; animation: ncFall linear forwards; }
@keyframes ncFall { to { transform: translateY(110vh) rotate(var(--rot)); } }
body.nc-modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .nc-page *, .nc-celebrate * { animation: none !important; transition: none !important; } }

/* ---------- print: just the card ---------- */
@media print {
  body * { visibility: hidden; }
  #ncStage, #ncStage *, #ncPreview, #ncPreview * { visibility: visible; }
  #ncStage { position: fixed; left: 0; top: 0; width: 100%; box-shadow: none; }
  .nc-celebrate { position: static; background: none; backdrop-filter: none; }
  .nc-celebrate:not([hidden]) #ncStage { display: none; }
  .nc-celebrate:not([hidden]) #ncPreview { position: fixed; left: 0; top: 0; width: 100%; box-shadow: none; }
  .nc-confetti { display: none; }
}

@media (max-width: 600px) { .nc-float { display: none; } .nc-hero { padding-top: 32px; } }

/* ---------- SEO: breadcrumb, locked save panel, content blocks ---------- */
.nc-crumbs { margin: 10px 4px 0; font-size: .85rem; color: var(--muted); }
.nc-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nc-crumbs li + li::before { content: '›'; margin-right: 6px; }
.nc-crumbs a { color: var(--brand); text-decoration: none; font-weight: 600; } .nc-crumbs a:hover { text-decoration: underline; }
.nc-save { position: relative; padding: 22px; border-radius: var(--r); background: linear-gradient(135deg, #f4f0ff, #fff3fa); box-shadow: var(--shadow), inset 0 0 0 2px rgba(108,76,245,.18); }
.nc-save h2 { margin: 0 0 6px; font: 700 1.3rem var(--display); }
.nc-save p { margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.nc-save-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.nc-save-opts li { padding: 7px 14px; border-radius: 99px; background: #fff; font: 600 .85rem var(--display); box-shadow: 0 2px 8px rgba(45,42,85,.08); }
.nc-save-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.nc-save-cta a { text-decoration: none; }
.nc-save-mini { margin: 14px 0 0; padding: 14px; border-radius: 18px; background: #f4f0ff; text-align: left; }
.nc-save-mini p { margin: 0 0 10px; font-size: .92rem; }
.nc-lock { font-size: 1.2rem; }
.nc-steps-list { counter-reset: s; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.nc-steps-list li { counter-increment: s; position: relative; padding: 14px 16px 14px 58px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(45,42,85,.07); line-height: 1.55; }
.nc-steps-list li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; font: 700 1rem var(--display); background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.nc-style-groups { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.nc-style-groups section { padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 2px 10px rgba(45,42,85,.07); }
.nc-style-groups h3 { margin: 0 0 10px; font: 700 1.05rem var(--display); }
.nc-style-groups ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nc-style-groups li { padding: 5px 11px; border-radius: 99px; background: #f4f0ff; font-size: .85rem; font-weight: 600; }
.nc-prose { max-width: 820px; color: var(--muted); line-height: 1.7; } .nc-prose p { margin: 0 0 12px; }
.nc-ideas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 0; padding: 0; list-style: none; }
.nc-ideas li { padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(45,42,85,.07); line-height: 1.5; } .nc-ideas b { display: block; margin-bottom: 4px; font-family: var(--display); color: var(--ink); }
.nc-why section, .nc-why > div { margin-top: 0; } .nc-block { margin-top: 40px; }
.nc-noscript { padding: 24px; border-radius: 20px; background: #fff7d6; text-align: center; }
