/* Design themes: stylish (default) / simple / fancy.
   Stylish = existing studio.css + layout.css look. No overrides needed. */

/* --- Shared selector UI --- */
.design-section {
  margin-top: 27px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.design-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.design-list button {
  min-width: 0;
  min-height: 40px;
  padding: 8px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background-color 0.16s, transform 0.16s;
}
.design-list button:hover {
  color: var(--ink);
  border-color: var(--cyan);
}
.design-list button.active {
  color: var(--navy);
  border-color: var(--cyan);
  background: var(--cyan);
  font-weight: 700;
}

/* ================= DARK =================
   Dark minimal: single column, flat surfaces, no decoration.
   Functional controls stay; decorative chrome is removed. */
[data-design-theme="dark"] *,
[data-design-theme="dark"] *::before,
[data-design-theme="dark"] *::after {
  animation: none !important;
  transition: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
[data-design-theme="dark"] body {
  background: var(--deep) !important;
  background-image: none !important;
}
[data-design-theme="dark"] body::before {
  display: none !important;
}
[data-design-theme="dark"] .app-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: block;
}
[data-design-theme="dark"] header {
  gap: 12px;
}
[data-design-theme="dark"] .brand-mark {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
}
[data-design-theme="dark"] .status {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
[data-design-theme="dark"] .playing .status i,
[data-design-theme="dark"] .status i {
  box-shadow: none;
}
[data-design-theme="dark"] .install-button--header {
  border-radius: 4px;
  box-shadow: none;
}
[data-design-theme="dark"] .workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: none;
  padding: 20px 0 0;
  align-items: stretch;
}
[data-design-theme="dark"] .player-column {
  min-width: 0;
  width: 100%;
}
[data-design-theme="dark"] .workspace .sound-core,
[data-design-theme="dark"] .control-panel {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
[data-design-theme="dark"] .workspace .sound-core {
  gap: 14px;
  padding-bottom: 24px !important;
  border-bottom: 1px solid var(--line) !important;
}
[data-design-theme="dark"] .control-panel {
  padding-top: 24px !important;
  overflow: visible;
}
/* Decorative elements off */
[data-design-theme="dark"] .sound-core .orbit,
[data-design-theme="dark"] .sound-core::before,
[data-design-theme="dark"] .sound-core::after,
[data-design-theme="dark"] .waveform,
[data-design-theme="dark"] .settings-links {
  display: none !important;
}
[data-design-theme="dark"] .frequency-readout {
  padding: 0 0 12px;
  border-bottom: 0;
}
[data-design-theme="dark"] .readout-label {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-weight: 400;
}
[data-design-theme="dark"] .frequency-readout output {
  margin: 4px 0;
  font-size: clamp(1.8rem, 6vw, 2.2rem);
  letter-spacing: 0;
}
[data-design-theme="dark"] #clockTime {
  font-size: 2rem;
  letter-spacing: 0;
}
[data-design-theme="dark"] .ambient-info {
  gap: 8px;
}
/* Flat primary action */
[data-design-theme="dark"] .sound-core .play-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 700;
}
[data-design-theme="dark"] .sound-core .play-button:hover,
[data-design-theme="dark"] .sound-core .play-button:active {
  transform: none;
  box-shadow: none;
}
[data-design-theme="dark"] .playing .sound-core .play-button {
  background: var(--ink);
  color: var(--deep);
}
[data-design-theme="dark"] input[type="range"] {
  accent-color: var(--ink);
}
/* Flat secondary buttons: bordered boxes, active = inverted */
[data-design-theme="dark"] .preset-list button,
[data-design-theme="dark"] .noise-types button,
[data-design-theme="dark"] .design-list button,
[data-design-theme="dark"] .pomodoro-modes button,
[data-design-theme="dark"] .pomodoro-actions button,
[data-design-theme="dark"] .save-button,
[data-design-theme="dark"] .install-button,
[data-design-theme="dark"] .reward-button,
[data-design-theme="dark"] .favorite-button,
[data-design-theme="dark"] .favorite-load,
[data-design-theme="dark"] .favorite-remove,
[data-design-theme="dark"] .settings-link {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-weight: 400;
}
[data-design-theme="dark"] .preset-list button:hover,
[data-design-theme="dark"] .noise-types button:hover,
[data-design-theme="dark"] .design-list button:hover,
[data-design-theme="dark"] .pomodoro-modes button:hover,
[data-design-theme="dark"] .pomodoro-actions button:hover {
  transform: none;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
}
[data-design-theme="dark"] .preset-list button.active,
[data-design-theme="dark"] .noise-types button.active,
[data-design-theme="dark"] .design-list button.active,
[data-design-theme="dark"] .pomodoro-modes button.active,
[data-design-theme="dark"] .pomodoro-actions .pomodoro-primary,
[data-design-theme="dark"] .favorite-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--deep);
  font-weight: 700;
}
[data-design-theme="dark"] .save-button:hover,
[data-design-theme="dark"] .install-button:hover,
[data-design-theme="dark"] .reward-button:hover,
[data-design-theme="dark"] .favorite-button:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
  transform: none;
}
/* Flat sections divided by hairlines only */
[data-design-theme="dark"] .pomodoro {
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
[data-design-theme="dark"] .pomodoro-display {
  font-size: 1.8rem;
  letter-spacing: 0;
  text-align: left;
}
[data-design-theme="dark"] .pomodoro-progress {
  height: 2px;
  border: 0;
  border-radius: 0;
  background: var(--line);
}
[data-design-theme="dark"] .pomodoro-progress span {
  background: var(--ink);
  box-shadow: none;
}
[data-design-theme="dark"] .preset-section,
[data-design-theme="dark"] .theme-section,
[data-design-theme="dark"] .design-section,
[data-design-theme="dark"] .favorites-section,
[data-design-theme="dark"] .display-settings,
[data-design-theme="dark"] .background-audio-setting,
[data-design-theme="dark"] .reward-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0;
  background: none;
}
[data-design-theme="dark"] .settings-title {
  margin: 20px 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
}
[data-design-theme="dark"] .section-label span {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
}
[data-design-theme="dark"] .theme-swatch {
  border-width: 1px;
  box-shadow: none;
}
[data-design-theme="dark"] .theme-swatch:hover {
  transform: none;
}
[data-design-theme="dark"] .theme-swatch.active {
  box-shadow: 0 0 0 2px var(--deep), 0 0 0 3px var(--ink);
}
[data-design-theme="dark"] .toggle-row input,
[data-design-theme="dark"] .background-audio-setting input {
  box-shadow: none;
}
[data-design-theme="dark"] dialog {
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}
[data-design-theme="dark"] .listening-guide {
  max-width: none;
  margin: 32px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 0.82rem;
}
[data-design-theme="dark"] .ad-area {
  border: 0;
  background: none;
  box-shadow: none;
}

/* ================= SIMPLE =================
   Bright minimal: same flat single-column structure as dark,
   with a light palette supplied from app.js (lightPalette).
   Only light-specific surface tweaks live here. */
html[data-design-theme="simple"] {
  color-scheme: light;
}
[data-design-theme="simple"] *,
[data-design-theme="simple"] *::before,
[data-design-theme="simple"] *::after {
  animation: none !important;
  transition: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
[data-design-theme="simple"] body {
  background: var(--deep) !important;
  background-image: none !important;
}
[data-design-theme="simple"] body::before {
  display: none !important;
}
[data-design-theme="simple"] .app-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: block;
}
[data-design-theme="simple"] header {
  gap: 12px;
}
[data-design-theme="simple"] .brand-mark {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
}
[data-design-theme="simple"] .status {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
[data-design-theme="simple"] .playing .status i,
[data-design-theme="simple"] .status i {
  box-shadow: none;
}
[data-design-theme="simple"] .install-button--header {
  border-radius: 4px;
  box-shadow: none;
}
[data-design-theme="simple"] .workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: none;
  padding: 20px 0 0;
  align-items: stretch;
}
[data-design-theme="simple"] .player-column {
  min-width: 0;
  width: 100%;
}
[data-design-theme="simple"] .workspace .sound-core,
[data-design-theme="simple"] .control-panel {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
[data-design-theme="simple"] .workspace .sound-core {
  gap: 14px;
  padding-bottom: 24px !important;
  border-bottom: 1px solid var(--line) !important;
}
[data-design-theme="simple"] .control-panel {
  padding-top: 24px !important;
  overflow: visible;
}
/* Decorative elements off */
[data-design-theme="simple"] .sound-core .orbit,
[data-design-theme="simple"] .sound-core::before,
[data-design-theme="simple"] .sound-core::after,
[data-design-theme="simple"] .waveform,
[data-design-theme="simple"] .settings-links {
  display: none !important;
}
[data-design-theme="simple"] .frequency-readout {
  padding: 0 0 12px;
  border-bottom: 0;
}
[data-design-theme="simple"] .readout-label {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-weight: 400;
}
[data-design-theme="simple"] .frequency-readout output {
  margin: 4px 0;
  font-size: clamp(1.8rem, 6vw, 2.2rem);
  letter-spacing: 0;
}
[data-design-theme="simple"] #clockTime {
  font-size: 2rem;
  letter-spacing: 0;
}
[data-design-theme="simple"] .ambient-info {
  gap: 8px;
}
/* Flat primary action */
[data-design-theme="simple"] .sound-core .play-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 700;
}
[data-design-theme="simple"] .sound-core .play-button:hover,
[data-design-theme="simple"] .sound-core .play-button:active {
  transform: none;
  box-shadow: none;
}
[data-design-theme="simple"] .playing .sound-core .play-button {
  background: var(--ink);
  color: var(--deep);
}
[data-design-theme="simple"] input[type="range"] {
  accent-color: var(--ink);
}
/* Unfilled track needs a dark tint to stay visible on light surfaces. */
[data-design-theme="simple"] input[type="range"] {
  background: linear-gradient(90deg, var(--cyan) var(--fill,8%), rgba(23,34,44,.16) var(--fill,8%));
}
/* Flat secondary buttons: bordered boxes, active = inverted */
[data-design-theme="simple"] .preset-list button,
[data-design-theme="simple"] .noise-types button,
[data-design-theme="simple"] .design-list button,
[data-design-theme="simple"] .pomodoro-modes button,
[data-design-theme="simple"] .pomodoro-actions button,
[data-design-theme="simple"] .save-button,
[data-design-theme="simple"] .install-button,
[data-design-theme="simple"] .reward-button,
[data-design-theme="simple"] .favorite-button,
[data-design-theme="simple"] .favorite-load,
[data-design-theme="simple"] .favorite-remove,
[data-design-theme="simple"] .settings-link {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-weight: 400;
}
[data-design-theme="simple"] .preset-list button:hover,
[data-design-theme="simple"] .noise-types button:hover,
[data-design-theme="simple"] .design-list button:hover,
[data-design-theme="simple"] .pomodoro-modes button:hover,
[data-design-theme="simple"] .pomodoro-actions button:hover {
  transform: none;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
}
[data-design-theme="simple"] .preset-list button.active,
[data-design-theme="simple"] .noise-types button.active,
[data-design-theme="simple"] .design-list button.active,
[data-design-theme="simple"] .pomodoro-modes button.active,
[data-design-theme="simple"] .pomodoro-actions .pomodoro-primary,
[data-design-theme="simple"] .favorite-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--deep);
  font-weight: 700;
}
[data-design-theme="simple"] .save-button:hover,
[data-design-theme="simple"] .install-button:hover,
[data-design-theme="simple"] .reward-button:hover,
[data-design-theme="simple"] .favorite-button:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
  transform: none;
}
/* Flat sections divided by hairlines only */
[data-design-theme="simple"] .pomodoro {
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
[data-design-theme="simple"] .pomodoro-display {
  font-size: 1.8rem;
  letter-spacing: 0;
  text-align: left;
}
[data-design-theme="simple"] .pomodoro-progress {
  height: 2px;
  border: 0;
  border-radius: 0;
  background: var(--line);
}
[data-design-theme="simple"] .pomodoro-progress span {
  background: var(--ink);
  box-shadow: none;
}
[data-design-theme="simple"] .preset-section,
[data-design-theme="simple"] .theme-section,
[data-design-theme="simple"] .design-section,
[data-design-theme="simple"] .favorites-section,
[data-design-theme="simple"] .display-settings,
[data-design-theme="simple"] .background-audio-setting,
[data-design-theme="simple"] .reward-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0;
  background: none;
}
[data-design-theme="simple"] .settings-title {
  margin: 20px 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
}
[data-design-theme="simple"] .section-label span {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
}
[data-design-theme="simple"] .theme-swatch {
  border-width: 1px;
  border-color: rgba(23,34,44,.25);
  box-shadow: none;
}
[data-design-theme="simple"] .theme-swatch:hover {
  transform: none;
}
[data-design-theme="simple"] .theme-swatch.active {
  box-shadow: 0 0 0 2px var(--deep), 0 0 0 3px var(--ink);
}
[data-design-theme="simple"] .toggle-row input,
[data-design-theme="simple"] .background-audio-setting input {
  box-shadow: none;
}
/* Unchecked switch tracks stay visible on light surfaces. */
[data-design-theme="simple"] .toggle-row input:not(:checked),
[data-design-theme="simple"] .background-audio-setting input:not(:checked) {
  background: #9aa8b1;
}
[data-design-theme="simple"] dialog {
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}
[data-design-theme="simple"] .listening-guide {
  max-width: none;
  margin: 32px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 0.82rem;
}
[data-design-theme="simple"] .ad-area {
  border: 0;
  background: none;
  box-shadow: none;
}
/* Hardcoded light-gray body copy needs darkening on light surfaces. */
[data-design-theme="simple"] .description,
[data-design-theme="simple"] .terms-content p {
  color: var(--muted);
}

/* ================= FANCY =================
   Kawaii pastel mochi theme. Light structure stays cute, while the
   accent color follows the selected color theme via var(--cyan). */
html[data-design-theme="fancy"] {
  --ink: #6d3a4f !important;
  --muted: #b08195 !important;
  --line: color-mix(in srgb, var(--cyan) 38%, #ffffff) !important;
  --navy: #fffafc !important;
  --deep: color-mix(in srgb, var(--cyan) 12%, #fff4f7) !important;
  --glow: color-mix(in srgb, var(--cyan) 25%, #ffffff) !important;
  --fancy-light: color-mix(in srgb, var(--cyan) 60%, #ffffff);
  --fancy-border: color-mix(in srgb, var(--cyan) 55%, #ffffff);
  --fancy-pale: color-mix(in srgb, var(--cyan) 25%, #ffffff);
  --fancy-mist: color-mix(in srgb, var(--cyan) 13%, #ffffff);
  --fancy-deep: color-mix(in srgb, var(--cyan) 55%, #6d2f45);
  --fancy-cocoa: #5e2f44;
  color-scheme: light;
}
[data-design-theme="fancy"] body {
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--cyan) 55%, #ffffff) 0 5rem, transparent 6rem),
    radial-gradient(circle at 88% 12%, #c9f0e4 0 4.5rem, transparent 5.5rem),
    radial-gradient(circle at 82% 82%, #e6d9ff 0 6rem, transparent 7rem),
    radial-gradient(circle at 8% 88%, #fff1b8 0 4rem, transparent 5rem),
    radial-gradient(circle at 50% 30%, #ffffff 0 10rem, transparent 11rem),
    radial-gradient(#ffffff 1.6px, transparent 1.7px),
    linear-gradient(180deg, var(--deep) 0%, var(--fancy-mist) 45%, var(--deep) 100%);
  background-size: auto, auto, auto, auto, auto, 22px 22px, auto;
}
[data-design-theme="fancy"] body::before {
  opacity: 0.06;
}
[data-design-theme="fancy"] ::selection {
  background: var(--fancy-border);
  color: #6d3a4f;
}

/* Header: sticker-like brand + status pill */
[data-design-theme="fancy"] .brand-mark {
  color: var(--cyan);
  background: #fff;
  border: 2px solid var(--fancy-border);
  border-radius: 50%;
  padding: 3px;
  box-shadow: 0 3px 0 var(--fancy-pale);
}
[data-design-theme="fancy"] .brand-word {
  color: #6d3a4f;
}
[data-design-theme="fancy"] .brand-title > span {
  color: #c08497;
}
[data-design-theme="fancy"] .status {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: #c08497;
  letter-spacing: 0.06em;
  box-shadow: 0 3px 0 var(--fancy-pale);
}
[data-design-theme="fancy"] .playing .status i {
  background: var(--fancy-deep);
  box-shadow: 0 0 0 4px var(--line);
  animation: fancy-heart-beat 1.2s ease-in-out infinite;
}
@keyframes fancy-heart-beat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.5); }
  45% { transform: scale(1.15); }
}

/* Main mochi card */
[data-design-theme="fancy"] .workspace .sound-core {
  position: relative;
  isolation: isolate;
  border: 2px solid var(--fancy-border);
  border-radius: 32px;
  background: #fffdfd;
  padding: 52px 32px 36px;
  gap: 20px;
  box-shadow:
    0 8px 0 var(--fancy-pale),
    0 24px 50px color-mix(in srgb, var(--cyan) 35%, transparent);
}
/* Keep decorative layers behind the controls so dotted/dashed
   frames never paint over text on the left/right edges. */
[data-design-theme="fancy"] .workspace .sound-core::before {
  display: block;
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 2px dashed var(--fancy-pale);
  border-radius: 22px;
  pointer-events: none;
  background: none;
  opacity: 1;
  mix-blend-mode: normal;
}
[data-design-theme="fancy"] .workspace .sound-core::after {
  content: "♡ noise sound ♡";
  position: absolute;
  z-index: 2;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  white-space: nowrap;
  background: var(--cyan);
  color: var(--fancy-cocoa);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 7px 16px;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--fancy-deep), 0 8px 18px color-mix(in srgb, var(--cyan) 45%, transparent);
  animation: fancy-bob 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fancy-bob {
  0%, 100% { transform: translateX(-50%) rotate(-2deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(2deg) translateY(-4px); }
}
[data-design-theme="fancy"] .sound-core .orbit {
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  border: 2px dotted var(--fancy-border);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 177, 0.08), transparent 70%);
}
/* Controls stay above the decorative orbits/frames. */
[data-design-theme="fancy"] .sound-core > :not(.orbit) {
  position: relative;
  z-index: 1;
}
/* Keep the decoration layer behind the controls (same tie-break order wins). */
[data-design-theme="fancy"] .sound-core > .orbit-field {
  position: absolute;
  inset: 0;
  z-index: 0;
}
[data-design-theme="fancy"] .sound-core .orbit-one {
  inset: 5% 7%;
}
[data-design-theme="fancy"] .sound-core .orbit-two {
  inset: 13% 17%;
}
[data-design-theme="fancy"] .sound-core .orbit::after {
  background: var(--cyan);
  box-shadow: 0 0 10px 3px rgba(255, 143, 177, 0.45);
}
[data-design-theme="fancy"] .playing .sound-core .orbit {
  animation-play-state: running;
}

[data-design-theme="fancy"] .readout-label {
  display: inline-block;
  background: var(--fancy-pale);
  color: var(--fancy-deep);
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--fancy-border);
}
[data-design-theme="fancy"] .frequency-readout {
  border-bottom: 2px dashed var(--fancy-pale);
  padding-bottom: 20px;
}
[data-design-theme="fancy"] .frequency-readout output {
  color: #6d3a4f;
  text-shadow: 0 2px 0 var(--fancy-pale);
}
[data-design-theme="fancy"] .frequency-readout output small {
  color: var(--cyan);
}
[data-design-theme="fancy"] .waveform {
  height: 84px;
  background: var(--fancy-mist);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 6px;
  opacity: 1;
  filter: none;
}

/* Mochi play button */
[data-design-theme="fancy"] .sound-core .play-button {
  width: min(100%, 290px);
  min-height: 68px;
  border: 3px solid #fff;
  border-radius: 999px;
  color: var(--fancy-cocoa);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--fancy-light) 0%, var(--cyan) 100%);
  box-shadow:
    0 6px 0 var(--fancy-deep),
    0 14px 28px color-mix(in srgb, var(--cyan) 45%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
[data-design-theme="fancy"] .sound-core .play-button:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow:
    0 8px 0 var(--fancy-deep),
    0 18px 34px color-mix(in srgb, var(--cyan) 52%, transparent);
}
[data-design-theme="fancy"] .sound-core .play-button:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 var(--fancy-deep),
    0 6px 14px color-mix(in srgb, var(--cyan) 40%, transparent);
}
[data-design-theme="fancy"] .playing .sound-core .play-button {
  animation: fancy-cute-pulse 1.8s ease-in-out infinite;
}
@keyframes fancy-cute-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 0 var(--fancy-deep), 0 14px 28px color-mix(in srgb, var(--cyan) 45%, transparent); }
  50% { transform: scale(1.03); box-shadow: 0 6px 0 var(--fancy-deep), 0 14px 36px color-mix(in srgb, var(--cyan) 65%, transparent); }
}
[data-design-theme="fancy"] .volume-control,
[data-design-theme="fancy"] .range-label,
[data-design-theme="fancy"] .number-control,
[data-design-theme="fancy"] .noise-types legend {
  color: #a2637a;
}
[data-design-theme="fancy"] .settings-link {
  color: var(--fancy-deep);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--fancy-pale);
}

/* Cute sliders */
[data-design-theme="fancy"] input[type="range"] {
  accent-color: var(--cyan);
}
[data-design-theme="fancy"] input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--fancy-pale), var(--fancy-border));
  border: 2px solid var(--fancy-border);
}
[data-design-theme="fancy"] input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cyan);
  box-shadow: 0 3px 0 var(--fancy-deep);
  cursor: pointer;
  transition: transform 0.15s ease;
}
[data-design-theme="fancy"] input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15) rotate(-8deg);
}
[data-design-theme="fancy"] input[type="range"]::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--fancy-pale), var(--fancy-border));
  border: 2px solid var(--fancy-border);
}
[data-design-theme="fancy"] input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cyan);
  box-shadow: 0 3px 0 var(--fancy-deep);
  cursor: pointer;
}

/* Control panel = sticker notebook */
[data-design-theme="fancy"] .control-panel {
  border: 2px solid var(--fancy-border);
  border-radius: 28px;
  background: #fffdfd;
  box-shadow:
    0 8px 0 var(--fancy-pale),
    0 20px 45px color-mix(in srgb, var(--cyan) 30%, transparent);
}
[data-design-theme="fancy"] .settings-title {
  text-align: center;
  color: var(--fancy-deep);
  background: var(--fancy-mist);
  border: 2px dashed var(--fancy-border);
  border-radius: 999px;
  padding: 10px 16px;
}
[data-design-theme="fancy"] .settings-title::before {
  content: "⋆ ♡ ";
}
[data-design-theme="fancy"] .settings-title::after {
  content: " ♡ ⋆";
}
[data-design-theme="fancy"] .section-label h2 {
  color: #c08497;
}
[data-design-theme="fancy"] .section-label span {
  background: var(--cyan);
  color: var(--fancy-cocoa);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
[data-design-theme="fancy"] .pomodoro {
  border: 2px dashed var(--fancy-border);
  border-radius: 20px;
  background: var(--fancy-mist);
  box-shadow: none;
}
[data-design-theme="fancy"] .pomodoro-display {
  color: #6d3a4f;
}
[data-design-theme="fancy"] .pomodoro-progress {
  background: var(--fancy-pale);
  height: 12px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}
[data-design-theme="fancy"] .pomodoro-progress span {
  background: repeating-linear-gradient(-45deg, var(--cyan) 0 8px, var(--fancy-light) 8px 16px);
  box-shadow: none;
}

/* Pill buttons */
[data-design-theme="fancy"] .preset-list button,
[data-design-theme="fancy"] .noise-types button,
[data-design-theme="fancy"] .design-list button,
[data-design-theme="fancy"] .pomodoro-modes button,
[data-design-theme="fancy"] .pomodoro-actions button {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #a2637a;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--fancy-pale);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
[data-design-theme="fancy"] .preset-list button:hover,
[data-design-theme="fancy"] .noise-types button:hover,
[data-design-theme="fancy"] .design-list button:hover,
[data-design-theme="fancy"] .pomodoro-modes button:hover,
[data-design-theme="fancy"] .pomodoro-actions button:hover {
  border-color: var(--cyan);
  color: var(--fancy-deep);
  transform: translateY(-1px) rotate(-1deg);
  box-shadow: 0 4px 0 var(--line);
}
[data-design-theme="fancy"] .design-list button.active,
[data-design-theme="fancy"] .preset-list button.active,
[data-design-theme="fancy"] .noise-types button.active,
[data-design-theme="fancy"] .pomodoro-modes button.active,
[data-design-theme="fancy"] .pomodoro-actions .pomodoro-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--fancy-cocoa);
  box-shadow: 0 4px 0 var(--fancy-deep);
}
[data-design-theme="fancy"] .preset-list button.active:hover,
[data-design-theme="fancy"] .noise-types button.active:hover {
  color: var(--fancy-cocoa);
}
[data-design-theme="fancy"] .noise-types button.active::before {
  content: "♡ ";
}
[data-design-theme="fancy"] .theme-swatch {
  border: 3px solid #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--cyan) 40%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
[data-design-theme="fancy"] .theme-swatch:hover {
  transform: scale(1.25) rotate(-10deg);
}
[data-design-theme="fancy"] .theme-swatch.active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--cyan), 0 4px 12px color-mix(in srgb, var(--cyan) 48%, transparent);
  transform: scale(1.1);
}
[data-design-theme="fancy"] .save-button,
[data-design-theme="fancy"] .install-button,
[data-design-theme="fancy"] .reward-button,
[data-design-theme="fancy"] .favorite-button {
  border: 2px solid var(--cyan);
  border-radius: 999px;
  background: #fff;
  color: var(--fancy-deep);
  font-weight: 800;
  box-shadow: 0 4px 0 var(--fancy-pale);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
[data-design-theme="fancy"] .save-button:hover,
[data-design-theme="fancy"] .install-button:hover,
[data-design-theme="fancy"] .reward-button:hover,
[data-design-theme="fancy"] .favorite-button:hover,
[data-design-theme="fancy"] .favorite-button[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--fancy-cocoa);
  border-color: var(--cyan);
  box-shadow: 0 4px 0 var(--fancy-deep);
  transform: translateY(-1px);
}
[data-design-theme="fancy"] .save-button:active,
[data-design-theme="fancy"] .install-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--fancy-deep);
}
[data-design-theme="fancy"] .favorite-load,
[data-design-theme="fancy"] .favorite-remove {
  border-radius: 999px;
  border-color: var(--line);
  background: #fff;
  color: #a2637a;
}
[data-design-theme="fancy"] .favorite-load:hover,
[data-design-theme="fancy"] .favorite-remove:hover {
  border-color: var(--cyan);
  color: var(--fancy-deep);
}

/* Guide + footer readability on pastel bg */
[data-design-theme="fancy"] .listening-guide {
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  color: #8a5a6e;
  box-shadow: 0 6px 0 var(--fancy-pale);
}
[data-design-theme="fancy"] .listening-guide h2,
[data-design-theme="fancy"] .listening-guide h3,
[data-design-theme="fancy"] .listening-guide summary {
  color: #6d3a4f;
}
[data-design-theme="fancy"] .listening-guide details {
  border-bottom: 2px dashed var(--fancy-pale);
}
[data-design-theme="fancy"] .toggle-row input,
[data-design-theme="fancy"] .background-audio-setting input {
  background: var(--fancy-border);
}
[data-design-theme="fancy"] .toggle-row input:checked,
[data-design-theme="fancy"] .background-audio-setting input:checked {
  background: var(--cyan);
}
[data-design-theme="fancy"] .toggle-row input:checked::after,
[data-design-theme="fancy"] .background-audio-setting input:checked::after {
  background: #fff;
}
[data-design-theme="fancy"] dialog {
  border: 2px solid var(--fancy-border);
  border-radius: 24px;
  background: #fffdfd;
  color: #6d3a4f;
  box-shadow: 0 8px 0 var(--fancy-pale);
}
[data-design-theme="fancy"] #clockTime {
  color: #6d3a4f;
}

@media (max-width: 800px) {
  [data-design-theme="fancy"] .workspace .sound-core {
    border-radius: 26px;
    padding: 46px 20px 28px;
  }
  [data-design-theme="fancy"] .listening-guide {
    padding: 22px 18px;
  }
  [data-design-theme="dark"] .app-shell {
    padding: 20px 16px 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-design-theme="fancy"] .workspace .sound-core::after,
  [data-design-theme="fancy"] .playing .sound-core .play-button,
  [data-design-theme="fancy"] .playing .status i {
    animation: none;
  }
  [data-design-theme="fancy"] .sound-core .play-button:hover {
    transform: none;
  }
}
