:root {
  --cream: #f4eee6;
  --card: #fffaf4;
  --ink: #3a322c;
  --muted: #8a7e74;
  --line: rgba(58, 50, 44, 0.08);
  --blush: #d4a5a5;
  --sage: #8fa08a;
  --lilac: #b8a9c0;
  --gold: #c4a574;
  --shadow: 0 14px 40px rgba(90, 70, 55, 0.08);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, #fbeee6 0%, transparent 55%),
    radial-gradient(90% 50% at 100% 80%, #efe8f2 0%, transparent 45%),
    var(--cream);
  color: var(--ink);
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.header {
  text-align: center;
  padding: 8px 8px 2px;
}

.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.logo {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 4px 0 6px;
}

.tagline {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 300;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 18px;
}

.card-head h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
}

.card-head p {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.share-row {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
}

input[type="url"] {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf6ef;
  padding: 0 16px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
}

input[type="url"]::placeholder {
  color: #b5aaa1;
}

input[type="url"]:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 3px rgba(212, 165, 165, 0.22);
}

.btn-ghost {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #faf6f0;
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #efe8df;
  aspect-ratio: 16 / 9;
}

#yt-player,
#yt-player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  pointer-events: none;
}

.hint.hidden {
  display: none;
}

.rain-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.rain-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbf6ef;
  padding: 11px 12px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.rain-chip[aria-pressed="true"] {
  background: #f7eee8;
  border-color: rgba(212, 165, 165, 0.55);
  box-shadow: inset 0 0 0 1px rgba(212, 165, 165, 0.25);
}

.chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #efe6dc;
  color: var(--sage);
  flex-shrink: 0;
}

.rain-chip[data-rain="thunder"] .chip-icon {
  color: var(--lilac);
}

.rain-chip[data-rain="window"] .chip-icon {
  color: var(--blush);
}

.chip-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chip-copy strong {
  font-size: 0.92rem;
  font-weight: 500;
}

.chip-copy em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 300;
}

.mixer {
  padding-bottom: 20px;
}

.slider-row + .slider-row {
  margin-top: 16px;
}

.slider-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.slider-meta label {
  font-size: 0.86rem;
}

.slider-meta span {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.8rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blush), var(--lilac));
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(90, 70, 55, 0.16);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(90, 70, 55, 0.16);
  cursor: pointer;
}

.btn-save {
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #3f3731, #2f2925);
  color: #faf6f0;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(47, 41, 37, 0.2);
}

.save-status {
  min-height: 1.1em;
  text-align: center;
  color: var(--sage);
  font-size: 0.78rem;
}

@media (max-width: 380px) {
  .logo {
    font-size: 2.7rem;
  }

  .app {
    padding-left: 14px;
    padding-right: 14px;
    gap: 12px;
  }
}
