/* Play-zone polish: connect the river to the play zone, a real stepper, flatter cards. Loaded last. */

/* ---------- 1. river → play zone: one continuous night-to-pastel world ---------- */
body {
  background:
    radial-gradient(1200px 380px at 50% 0, rgba(185, 162, 255, .35), transparent 70%),
    linear-gradient(180deg, #2a2466 0, #4a3c8f 120px, #b9a2ff 300px, #ffd9e6 520px, var(--panel-bg) 820px) no-repeat;
  background-color: var(--panel-bg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background: linear-gradient(180deg, #1d1650 0, #2a2466 240px, var(--panel-bg) 640px) no-repeat; background-color: var(--panel-bg);
  }
}
/* lotus-leaf riverbank along the bottom edge of the river */
.scene::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px; z-index: 5; pointer-events: none;
  background:
    radial-gradient(18px 10px at 6% 100%, #5fc27a 98%, transparent) ,
    radial-gradient(22px 12px at 17% 100%, #4fb466 98%, transparent),
    radial-gradient(16px 9px at 29% 100%, #6fcf7f 98%, transparent),
    radial-gradient(24px 12px at 71% 100%, #4fb466 98%, transparent),
    radial-gradient(18px 10px at 84% 100%, #5fc27a 98%, transparent),
    radial-gradient(14px 8px at 94% 100%, #6fcf7f 98%, transparent),
    linear-gradient(180deg, transparent 55%, rgba(42, 36, 102, .55));
}

/* ---------- 2. play card ---------- */
.sheet .card {
  border-radius: 32px; border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(42, 31, 92, .18), 0 2px 0 rgba(255, 255, 255, .9) inset;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet .card { background: rgba(34, 27, 74, .9); border-color: var(--line); } }
@media (min-width: 760px) { .sheet .card { padding: 22px 28px 26px; } }

/* ---------- 3. stepper: 1 — 2 — 3 with a filling line ---------- */
.progress { display: none; }
.tabs {
  --p: 0; position: relative; background: none; padding: 0 4px; margin: 2px 0 18px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.tabs::before, .tabs::after {
  content: ""; position: absolute; top: 22px; left: 16.66%; right: 16.66%; height: 4px; border-radius: 4px; background: var(--line);
}
.tabs::after {
  right: auto; width: calc((100% - 33.33%) * var(--p)); background: linear-gradient(90deg, #ff83a9, #b9a2ff);
  transition: width .45s cubic-bezier(.3, 1.3, .5, 1);
}
.tabs button {
  position: relative; z-index: 1; background: none !important; box-shadow: none !important; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font: 600 .86rem "Mali", sans-serif;
}
.tabs button span {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem;
  background: var(--card); border: 3px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.tabs button.on { color: var(--ink); }
.tabs button.on span { border-color: #ff83a9; box-shadow: 0 0 0 6px rgba(255, 131, 169, .18), 0 8px 18px rgba(255, 131, 169, .3); transform: scale(1.08); }
.tabs button.done { color: var(--k-lav, #51417e); }
.tabs button.done span { border-color: #b9a2ff; background: linear-gradient(135deg, #fff, #f3ecff); }
.tabs button.done span::after { content: "✓"; position: absolute; top: -2px; right: calc(50% - 30px); width: 18px; height: 18px; border-radius: 50%; background: #b9a2ff; color: #fff; font: 700 .65rem/18px sans-serif; margin: 0; }

/* ---------- 4. flatter sections (no pink box inside white box) ---------- */
.filters, .wish-ideas, .dress, .fan-box { background: transparent; padding-left: 0; padding-right: 0; }
.dress { border-top: 1px dashed var(--line); padding-top: 14px; border-radius: 0; }
.filters { border-top: 1px dashed var(--line); border-radius: 0; padding-top: 12px; }
.wish-ideas { border-top: 1px dashed var(--line); border-radius: 0; padding-top: 12px; margin-top: 10px; }
.step h2 { font-size: 1.12rem; color: var(--midnight, #2a1f5c); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step h2 { color: var(--ink); } }
.modes button, .kstyles button { background: var(--card); }

/* studio header: title left, style switch right */
.studio-head { align-items: center; margin-bottom: 14px; }
.step-pill { display: none; }
@container sheet (min-width: 720px) {
  .studio-top { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 14px; }
  .studio-top .studio-head { margin: 0; }
  .studio-top .kstyles { margin: 0; justify-self: end; width: min(100%, 520px); }
}

/* studio palette: on wide panels every category is listed, no empty right side */
.kitems.all { display: block; max-height: none; padding-top: 4px; }
.kitems.all .ksec { margin-bottom: 14px; }
.kitems.all .ksec h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 700 .86rem "Mali", sans-serif; color: var(--ink); }
.kitems.all .ksec h3 small { font: 400 .72rem "IBM Plex Sans Thai", sans-serif; color: var(--muted); }
.kitems.all .kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.kitems.all .kinc, .kitems.all .kleft { grid-column: 1 / -1; }
.kcats.hide-wide { display: none; }
@container sheet (min-width: 720px) {
  .studio-bar { position: static; box-shadow: none; background: transparent; border: 0; padding: 0; margin-top: 16px; }
  .studio-bar button { background: var(--card); border: 1px solid var(--line); padding: 8px 4px; }
  .studio-preview { min-height: 100%; }
}

/* small screens keep the compact look */
@media (max-width: 520px) {
  .tabs button span { width: 40px; height: 40px; font-size: 1.1rem; }
  .tabs::before, .tabs::after { top: 19px; }
  .tabs button { font-size: .76rem; }
}
