/* ============================================================
   Claymorphism theme panel
   Puffy, soft, play-dough UI. Raised clay = pops out (outset dual
   soft shadow + light-catch highlight). Recessed clay = pressed in
   (inset shadow) — used for text inputs / toggle track / the
   streak-day tray. Pressing a raised element sinks it toward the
   recessed state, like squeezing dough.
   ============================================================ */

.theme-clay {
  --clay-font: "Segoe UI Rounded", "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Verdana, sans-serif;

  --clay-ink: #4a3a52;
  --clay-ink-soft: #8577a1;

  --clay-base: #fdf6ec;         /* dough-cream surface */
  --clay-base-dark: #e7d9c6;    /* cream shadow tint */
  --clay-base-light: #ffffff;   /* cream highlight tint */

  --clay-coral: #ff8f70;
  --clay-coral-dark: #d5613f;
  --clay-coral-light: #ffcdb8;

  --clay-mint: #63e2c0;
  --clay-mint-dark: #33a884;
  --clay-mint-light: #c9f7e9;

  --clay-sky: #7ec4ff;
  --clay-sky-dark: #4791d6;
  --clay-sky-light: #d6ecff;

  --clay-yellow: #ffcf5c;
  --clay-yellow-dark: #d99f2b;
  --clay-yellow-light: #fff0c4;

  --clay-lavender: #b9a4f5;
  --clay-lavender-dark: #7d63c9;
  --clay-lavender-light: #e8dfff;

  --clay-red: #ff6b7a;
  --clay-red-dark: #d43e50;
  --clay-red-light: #ffd3d8;

  position: relative;
  overflow: hidden;
  font-family: var(--clay-font);
  color: var(--clay-ink);
  background:
    radial-gradient(120% 90% at 8% -10%, #ffe6cf 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 0%, #d9e9ff 0%, transparent 50%),
    linear-gradient(160deg, #fff3e4 0%, #ffe9e0 38%, #e9e2ff 78%, #dcebff 100%);
}

/* ambient blurred clay blobs floating behind content, purely decorative */
.theme-clay::before,
.theme-clay::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}
.theme-clay::before {
  width: 220px;
  height: 220px;
  top: -90px;
  right: -70px;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--clay-yellow-light) 40%, transparent 72%);
}
.theme-clay::after {
  width: 260px;
  height: 260px;
  bottom: -120px;
  left: -90px;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--clay-lavender-light) 40%, transparent 72%);
}

.theme-clay > * {
  position: relative;
  z-index: 1;
}

/* ---------- panel head ---------- */
.theme-clay .panel-head h2 {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--clay-ink);
}
.theme-clay .clay-dots { display: inline-flex; gap: 5px; }
.theme-clay .clay-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.theme-clay .clay-dots i:nth-child(1) { background: var(--clay-coral); transform: translateY(-2px); }
.theme-clay .clay-dots i:nth-child(2) { background: var(--clay-mint); transform: translateY(1px); }
.theme-clay .clay-dots i:nth-child(3) { background: var(--clay-sky); transform: translateY(-1px); }

.theme-clay .panel-desc {
  color: var(--clay-ink-soft);
  font-weight: 600;
}

.theme-clay h3 {
  color: var(--clay-ink);
  font-weight: 800;
}

/* ============================================================
   Buttons
   ============================================================ */
.theme-clay .btn {
  font-family: inherit;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .01em;
  color: var(--clay-ink);
  border: none;
  border-radius: 999px;
  padding: .85em 1.6em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.theme-clay .btn:focus-visible {
  outline: 3px solid var(--clay-ink);
  outline-offset: 3px;
}

/* raised clay recipe: soft dark shadow (bottom-right) + soft light
   glow (top-left) + a crisp inner highlight to sell the "surface
   catching light" read, all diffuse — never a hard flat edge. */
.theme-clay .btn-primary {
  background: linear-gradient(160deg, #ffb197 0%, var(--clay-coral) 60%);
  color: #5c2c1c;
  box-shadow:
    8px 10px 22px rgba(213, 97, 63, .40),
    -6px -6px 16px rgba(255, 255, 255, .55),
    inset 2px 2px 3px rgba(255, 255, 255, .55),
    inset -3px -4px 8px rgba(213, 97, 63, .28);
}
.theme-clay .btn-primary:hover { transform: translateY(-2px); }
.theme-clay .btn-primary:active {
  transform: translateY(3px);
  box-shadow:
    3px 4px 10px rgba(213, 97, 63, .35),
    -3px -3px 8px rgba(255, 255, 255, .4),
    inset 3px 3px 8px rgba(213, 97, 63, .35);
}

.theme-clay .clay-play {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #5c2c1c;
  margin-left: 2px;
}

.theme-clay .btn-secondary {
  background: linear-gradient(160deg, #fffdf9 0%, var(--clay-base) 60%);
  color: var(--clay-mint-dark);
  box-shadow:
    7px 8px 18px rgba(51, 168, 132, .18),
    -6px -6px 14px rgba(255, 255, 255, .8),
    inset 2px 2px 3px rgba(255, 255, 255, .8),
    inset -2px -3px 6px rgba(51, 168, 132, .12);
}
.theme-clay .btn-secondary:hover { transform: translateY(-2px); }
.theme-clay .btn-secondary:active {
  transform: translateY(3px);
  box-shadow:
    2px 3px 8px rgba(51, 168, 132, .18),
    inset 3px 3px 7px rgba(51, 168, 132, .22);
}

.theme-clay .btn-icon {
  width: 52px;
  height: 52px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, #d3c1ff 0%, var(--clay-lavender) 60%);
  box-shadow:
    7px 8px 16px rgba(125, 99, 201, .38),
    -5px -5px 12px rgba(255, 255, 255, .55),
    inset 2px 2px 3px rgba(255, 255, 255, .55),
    inset -2px -3px 6px rgba(125, 99, 201, .3);
}
.theme-clay .btn-icon:hover { transform: translateY(-2px) scale(1.03); }
.theme-clay .btn-icon:active {
  transform: translateY(2px) scale(.97);
  box-shadow:
    2px 3px 8px rgba(125, 99, 201, .35),
    inset 3px 3px 7px rgba(125, 99, 201, .35);
}
.theme-clay .clay-star {
  width: 18px;
  height: 18px;
  background: #fff;
  display: inline-block;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.theme-clay .btn-disabled {
  background: linear-gradient(160deg, #efeae3 0%, #e2dcd2 100%);
  color: #a89f93;
  box-shadow:
    4px 5px 10px rgba(168, 159, 147, .18),
    inset 1px 1px 2px rgba(255, 255, 255, .5);
  cursor: not-allowed;
  opacity: .85;
}
.theme-clay .btn-disabled:hover,
.theme-clay .btn-disabled:active { transform: none; }

.theme-clay .btn-destructive {
  background: linear-gradient(160deg, #ff96a1 0%, var(--clay-red) 60%);
  color: #6e1424;
  box-shadow:
    8px 10px 20px rgba(212, 62, 80, .38),
    -6px -6px 14px rgba(255, 255, 255, .5),
    inset 2px 2px 3px rgba(255, 255, 255, .5),
    inset -2px -3px 7px rgba(212, 62, 80, .28);
}
.theme-clay .btn-destructive:hover { transform: translateY(-2px); }
.theme-clay .btn-destructive:active {
  transform: translateY(3px);
  box-shadow:
    2px 3px 8px rgba(212, 62, 80, .35),
    inset 3px 3px 7px rgba(212, 62, 80, .32);
}
.theme-clay .clay-x { font-size: .78em; }

/* ============================================================
   Form — inputs read as a soft cavity pressed *into* the clay
   ============================================================ */
.theme-clay .demo-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 360px;
}
.theme-clay .clay-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.theme-clay .clay-label {
  font-weight: 700;
  font-size: .85rem;
  color: var(--clay-ink-soft);
  padding-left: .3rem;
}
.theme-clay .demo-form input[type="text"],
.theme-clay .demo-form select {
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: var(--clay-ink);
  background: var(--clay-base);
  border: none;
  border-radius: 22px;
  padding: .85em 1.1em;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  box-shadow:
    inset 5px 5px 10px rgba(213, 200, 179, .55),
    inset -4px -4px 8px rgba(255, 255, 255, .85);
  transition: box-shadow .16s ease;
}
.theme-clay .demo-form input[type="text"]::placeholder { color: #b3a794; }
.theme-clay .demo-form input[type="text"]:focus,
.theme-clay .demo-form select:focus {
  outline: none;
  box-shadow:
    inset 5px 5px 10px rgba(213, 200, 179, .55),
    inset -4px -4px 8px rgba(255, 255, 255, .85),
    0 0 0 3px var(--clay-sky-light);
}
.theme-clay .clay-select-wrap { position: relative; display: block; }
.theme-clay .demo-form select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.4em;
}
.theme-clay .clay-select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-65%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--clay-lavender-dark);
  pointer-events: none;
}

.theme-clay .clay-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.theme-clay .clay-toggle {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 32px;
  flex: none;
}
.theme-clay .clay-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.theme-clay .clay-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--clay-base);
  box-shadow:
    inset 4px 4px 8px rgba(213, 200, 179, .55),
    inset -3px -3px 6px rgba(255, 255, 255, .85);
  transition: background .18s ease;
}
.theme-clay .clay-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff 0%, var(--clay-base) 100%);
  box-shadow:
    3px 3px 7px rgba(213, 200, 179, .6),
    -2px -2px 5px rgba(255, 255, 255, .9);
  transition: transform .2s cubic-bezier(.4, 1.8, .5, 1), background .2s ease;
}
.theme-clay .clay-toggle input:checked ~ .clay-toggle-track {
  background: var(--clay-mint-light);
}
.theme-clay .clay-toggle input:checked ~ .clay-toggle-track .clay-toggle-thumb {
  transform: translateX(24px);
  background: linear-gradient(160deg, #8ff2d6 0%, var(--clay-mint) 100%);
}
.theme-clay .clay-toggle input:focus-visible ~ .clay-toggle-track {
  outline: 3px solid var(--clay-ink);
  outline-offset: 2px;
}

.theme-clay .btn-submit {
  align-self: flex-start;
  background: linear-gradient(160deg, #8ff2d6 0%, var(--clay-mint) 60%);
  color: #12503f;
  box-shadow:
    8px 10px 20px rgba(51, 168, 132, .35),
    -6px -6px 14px rgba(255, 255, 255, .55),
    inset 2px 2px 3px rgba(255, 255, 255, .55),
    inset -2px -3px 7px rgba(51, 168, 132, .28);
}
.theme-clay .btn-submit:hover { transform: translateY(-2px); }
.theme-clay .btn-submit:active {
  transform: translateY(3px);
  box-shadow:
    2px 3px 8px rgba(51, 168, 132, .3),
    inset 3px 3px 7px rgba(51, 168, 132, .32);
}

/* ============================================================
   Card
   ============================================================ */
.theme-clay .demo-card {
  max-width: 340px;
  background: linear-gradient(165deg, #fffdf9 0%, var(--clay-base) 100%);
  border-radius: 34px;
  padding: 1.6rem 1.5rem 1.5rem;
  box-shadow:
    12px 16px 30px rgba(213, 200, 179, .5),
    -8px -8px 20px rgba(255, 255, 255, .85),
    inset 2px 2px 3px rgba(255, 255, 255, .7);
  text-align: left;
}
.theme-clay .clay-card-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
  background: linear-gradient(160deg, var(--clay-yellow-light) 0%, var(--clay-yellow) 100%);
  box-shadow:
    6px 7px 14px rgba(217, 159, 43, .35),
    -4px -4px 10px rgba(255, 255, 255, .7),
    inset 2px 2px 3px rgba(255, 255, 255, .6);
  margin-bottom: .9rem;
}
.theme-clay .demo-card h4 {
  margin: 0 0 .35rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--clay-ink);
}
.theme-clay .demo-card p {
  margin: 0 0 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--clay-ink-soft);
  line-height: 1.55;
}
.theme-clay .clay-stars {
  display: flex;
  gap: 6px;
  margin-bottom: 1.1rem;
}
.theme-clay .clay-stars span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--clay-base-dark);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .12);
}
.theme-clay .clay-stars span.on {
  background: linear-gradient(160deg, #ffe08a 0%, var(--clay-yellow) 100%);
  box-shadow:
    2px 2px 4px rgba(217, 159, 43, .45),
    inset 1px 1px 1px rgba(255, 255, 255, .7);
}
.theme-clay .clay-card-action {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  font-weight: 800;
  font-size: .9rem;
  color: var(--clay-coral-dark);
  text-decoration: none;
  cursor: pointer;
}
.theme-clay .clay-card-action:hover { text-decoration: underline; }
.theme-clay .clay-card-action:focus-visible {
  outline: 3px solid var(--clay-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   Mobile mock — phone-mock / phone-notch chrome comes from the
   shared shell; only .phone-screen contents are themed here.
   ============================================================ */
.theme-clay .phone-screen {
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 12px 10px;
  background:
    radial-gradient(120% 70% at 15% 0%, #fff3e0 0%, transparent 60%),
    linear-gradient(180deg, #fff8ee 0%, #ffece1 55%, #f1e9ff 100%);
  font-family: var(--clay-font);
  color: var(--clay-ink);
}

.theme-clay .clay-app-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--clay-base);
  border-radius: 20px;
  padding: 8px 10px;
  box-shadow:
    5px 6px 12px rgba(213, 200, 179, .45),
    -3px -3px 8px rgba(255, 255, 255, .8),
    inset 1px 1px 2px rgba(255, 255, 255, .7);
  flex: none;
}
.theme-clay .clay-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: linear-gradient(160deg, var(--clay-sky-light) 0%, var(--clay-sky) 100%);
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, .7), 2px 2px 5px rgba(71, 145, 214, .3);
}
.theme-clay .clay-app-title {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.theme-clay .clay-app-title strong { font-size: .74rem; font-weight: 800; }
.theme-clay .clay-app-title small { font-size: .62rem; color: var(--clay-ink-soft); font-weight: 600; }
.theme-clay .clay-coin {
  margin-left: auto;
  font-size: .64rem;
  font-weight: 800;
  color: var(--clay-yellow-dark);
  background: var(--clay-yellow-light);
  border-radius: 999px;
  padding: 4px 8px;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, .8);
  white-space: nowrap;
}

.theme-clay .clay-app-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.theme-clay .clay-app-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--clay-base);
  border-radius: 18px;
  padding: 7px 9px;
  box-shadow:
    4px 5px 10px rgba(213, 200, 179, .4),
    -3px -3px 7px rgba(255, 255, 255, .8),
    inset 1px 1px 2px rgba(255, 255, 255, .7);
}
.theme-clay .clay-row-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, .7);
}
.theme-clay .icon-mint { background: linear-gradient(160deg, var(--clay-mint-light) 0%, var(--clay-mint) 100%); }
.theme-clay .icon-sky { background: linear-gradient(160deg, var(--clay-sky-light) 0%, var(--clay-sky) 100%); }
.theme-clay .icon-yellow { background: linear-gradient(160deg, var(--clay-yellow-light) 0%, var(--clay-yellow) 100%); }
.theme-clay .clay-row-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.theme-clay .clay-row-text strong { font-size: .68rem; font-weight: 800; }
.theme-clay .clay-row-text small { font-size: .58rem; color: var(--clay-ink-soft); font-weight: 600; }
.theme-clay .clay-row-chevron { margin-left: auto; color: var(--clay-ink-soft); font-weight: 800; }

.theme-clay .clay-bottom-nav {
  flex: none;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--clay-base);
  border-radius: 999px;
  padding: 7px 8px;
  box-shadow:
    5px 6px 12px rgba(213, 200, 179, .45),
    -3px -3px 8px rgba(255, 255, 255, .8),
    inset 1px 1px 2px rgba(255, 255, 255, .7);
}
.theme-clay .clay-nav-item {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
}
.theme-clay .clay-nav-item.is-active {
  background: linear-gradient(160deg, #ffb197 0%, var(--clay-coral) 100%);
  box-shadow:
    2px 3px 6px rgba(213, 97, 63, .45),
    inset 1px 1px 2px rgba(255, 255, 255, .6);
  transform: translateY(-3px);
}

/* ============================================================
   Usage widget — streak / reward tracker
   ============================================================ */
.theme-clay .demo-usage { max-width: 360px; }
.theme-clay .clay-streak-widget {
  background: linear-gradient(165deg, #fffdf9 0%, var(--clay-base) 100%);
  border-radius: 30px;
  padding: 1.3rem 1.3rem 1.4rem;
  box-shadow:
    12px 16px 28px rgba(213, 200, 179, .5),
    -8px -8px 18px rgba(255, 255, 255, .85),
    inset 2px 2px 3px rgba(255, 255, 255, .7);
}
.theme-clay .clay-streak-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.1rem;
}
.theme-clay .clay-streak-flame {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: linear-gradient(160deg, #ffcdb8 0%, var(--clay-coral) 100%);
  box-shadow:
    4px 5px 10px rgba(213, 97, 63, .4),
    inset 1px 1px 2px rgba(255, 255, 255, .6);
}
.theme-clay .clay-streak-head strong { display: block; font-size: .95rem; font-weight: 800; }
.theme-clay .clay-streak-head small { font-size: .78rem; color: var(--clay-ink-soft); font-weight: 600; }

.theme-clay .clay-streak-days {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  background: var(--clay-base);
  border-radius: 22px;
  padding: 10px 8px;
  margin-bottom: 1.2rem;
  box-shadow:
    inset 4px 4px 9px rgba(213, 200, 179, .5),
    inset -3px -3px 7px rgba(255, 255, 255, .8);
}
.theme-clay .clay-day {
  flex: 1 1 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  font-weight: 800;
  color: var(--clay-ink-soft);
  background: var(--clay-base-dark);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .1);
}
.theme-clay .clay-day.done {
  color: #12503f;
  background: linear-gradient(160deg, #8ff2d6 0%, var(--clay-mint) 100%);
  box-shadow:
    2px 3px 6px rgba(51, 168, 132, .4),
    inset 1px 1px 2px rgba(255, 255, 255, .7);
}
.theme-clay .clay-day.today {
  outline: 2px solid var(--clay-coral-dark);
  outline-offset: 2px;
}

.theme-clay .btn-claim {
  width: 100%;
  background: linear-gradient(160deg, #ffb197 0%, var(--clay-coral) 60%);
  color: #5c2c1c;
  box-shadow:
    8px 10px 20px rgba(213, 97, 63, .4),
    -6px -6px 14px rgba(255, 255, 255, .55),
    inset 2px 2px 3px rgba(255, 255, 255, .55),
    inset -2px -3px 7px rgba(213, 97, 63, .28);
}
.theme-clay .btn-claim:hover { transform: translateY(-2px); }
.theme-clay .btn-claim:active {
  transform: translateY(3px);
  box-shadow:
    2px 3px 8px rgba(213, 97, 63, .35),
    inset 3px 3px 7px rgba(213, 97, 63, .35);
}

/* ============================================================
   Alert dialog — a big puffy clay card floating over a soft
   pastel scrim (never a harsh black overlay, keeps the kid-app
   tone even mid-"are you sure").
   ============================================================ */
.theme-clay .theme-alert-backdrop {
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255, 233, 224, .55) 0%, transparent 60%),
    rgba(74, 58, 82, .38);
  backdrop-filter: blur(3px);
  padding: 1.2rem;
  box-sizing: border-box;
}
.theme-clay .theme-alert-box {
  width: 100%;
  max-width: 340px;
  box-sizing: border-box;
  text-align: center;
  background: linear-gradient(165deg, #fffdf9 0%, var(--clay-base) 100%);
  border-radius: 38px;
  padding: 1.8rem 1.6rem 1.6rem;
  box-shadow:
    14px 18px 34px rgba(213, 200, 179, .55),
    -8px -8px 20px rgba(255, 255, 255, .9),
    inset 2px 2px 3px rgba(255, 255, 255, .7);
  animation: clayAlertPop .28s cubic-bezier(.4, 1.8, .5, 1);
}
@keyframes clayAlertPop {
  from { transform: scale(.85) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.theme-clay .theme-alert-box .alert-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
  background: linear-gradient(160deg, var(--clay-red-light) 0%, var(--clay-red) 100%);
  box-shadow:
    6px 7px 14px rgba(212, 62, 80, .38),
    -4px -4px 10px rgba(255, 255, 255, .7),
    inset 2px 2px 3px rgba(255, 255, 255, .6);
}
.theme-clay .theme-alert-box .alert-title {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--clay-ink);
}
.theme-clay .theme-alert-box .alert-desc {
  margin: 0 0 1.4rem;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--clay-ink-soft);
}
.theme-clay .theme-alert-box .alert-actions {
  display: flex;
  justify-content: center;
  gap: .7rem;
  flex-wrap: wrap;
}
.theme-clay .theme-alert-box .alert-actions .btn { flex: 1 1 auto; min-width: 108px; }

/* ============================================================
   Loading — puffy state panel: skeleton pills → bouncing clay
   dots → happy confirmation card.
   ============================================================ */
.theme-clay .demo-loading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  max-width: 360px;
}
.theme-clay .loading-panel {
  width: 100%;
  box-sizing: border-box;
  min-height: 128px;
  background: linear-gradient(165deg, #fffdf9 0%, var(--clay-base) 100%);
  border-radius: 28px;
  padding: 1.3rem 1.4rem;
  box-shadow:
    12px 16px 28px rgba(213, 200, 179, .5),
    -8px -8px 18px rgba(255, 255, 255, .85),
    inset 2px 2px 3px rgba(255, 255, 255, .7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
}

/* ---- skeleton (idle) ---- */
.theme-clay .loading-skeleton {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: .6rem;
}
.theme-clay .loading-panel[data-state="idle"] .loading-skeleton { display: flex; }
.theme-clay .loading-panel[data-state="loading"] .loading-skeleton {
  display: flex;
  opacity: .4;
  filter: saturate(.6);
}
.theme-clay .skel-line {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--clay-base-dark) 25%,
    var(--clay-mint-light) 50%,
    var(--clay-base-dark) 75%
  );
  background-size: 200% 100%;
  box-shadow: inset 2px 2px 4px rgba(213, 200, 179, .5);
  animation: claySkelShimmer 1.4s ease-in-out infinite;
}
.theme-clay .skel-w1 { width: 90%; }
.theme-clay .skel-w2 { width: 70%; }
.theme-clay .skel-w3 { width: 55%; }
@keyframes claySkelShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- spinner (loading) — trio of bouncing clay dots ---- */
.theme-clay .loading-spinner {
  display: none;
  position: relative;
  width: 68px;
  height: 40px;
  margin: 0 auto;
}
.theme-clay .loading-panel[data-state="loading"] .loading-spinner { display: block; }
.theme-clay .loading-spinner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffb197 0%, var(--clay-coral) 100%);
  box-shadow:
    26px 0 0 0 var(--clay-mint),
    52px 0 0 0 var(--clay-sky),
    2px 2px 4px rgba(213, 97, 63, .4);
  animation: clayDotBounce 1s ease-in-out infinite;
}
@keyframes clayDotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
}

/* ---- result (done) ---- */
.theme-clay .loading-result { display: none; width: 100%; }
.theme-clay .loading-panel[data-state="done"] .loading-result[hidden] { display: block; }
.theme-clay .loading-result p {
  margin: 0;
  padding: .9rem 1.1rem;
  border-radius: 20px;
  text-align: center;
  font-weight: 700;
  font-size: .88rem;
  color: #12503f;
  background: linear-gradient(160deg, var(--clay-mint-light) 0%, #b9f2e2 100%);
  box-shadow:
    5px 6px 14px rgba(51, 168, 132, .3),
    inset 2px 2px 3px rgba(255, 255, 255, .7);
  animation: clayResultPop .32s cubic-bezier(.4, 1.8, .5, 1);
}
@keyframes clayResultPop {
  from { transform: scale(.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- narrow viewport safety ---------- */
@media (max-width: 400px) {
  .theme-clay .demo-form,
  .theme-clay .demo-usage,
  .theme-clay .demo-card,
  .theme-clay .demo-loading,
  .theme-clay .theme-alert-box { max-width: 100%; }
  .theme-clay .btn { padding: .8em 1.3em; }
  .theme-clay .loading-spinner::before {
    box-shadow:
      22px 0 0 0 var(--clay-mint),
      44px 0 0 0 var(--clay-sky),
      2px 2px 4px rgba(213, 97, 63, .4);
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .theme-clay .btn,
  .theme-clay .clay-toggle-thumb,
  .theme-clay .clay-nav-item,
  .theme-clay .theme-alert-box,
  .theme-clay .skel-line,
  .theme-clay .loading-spinner::before,
  .theme-clay .loading-result p {
    transition: none !important;
    animation: none !important;
  }
}
