:root {
  color-scheme: light;
  --ink: #292134;
  --muted: #6f6378;
  --line: #f1c4d1;
  --paper: #fff6dd;
  --panel: #ffffff;
  --accent: #ff4f86;
  --accent-strong: #cf1d5c;
  --teal: #00a6a6;
  --gold: #ffb703;
  --blue: #5b7cfa;
  --mint: #8ee8c8;
  --lavender: #b58cff;
  --shadow: 0 22px 60px rgba(117, 64, 91, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12px 18px, rgba(255, 79, 134, 0.32) 0 3px, transparent 4px),
    radial-gradient(circle at 58px 34px, rgba(0, 166, 166, 0.28) 0 3px, transparent 4px),
    radial-gradient(circle at 34px 64px, rgba(255, 183, 3, 0.34) 0 3px, transparent 4px),
    linear-gradient(135deg, #fff7df 0%, #ffeaf3 38%, #eafcff 72%, #fff6dc 100%);
  background-size: 92px 92px, 92px 92px, 92px 92px, auto;
  min-height: 100vh;
}

a {
  color: inherit;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff 0 46%, #ffc7dc 47% 100%);
  border: 2px solid rgba(255, 79, 134, 0.42);
  box-shadow: 0 10px 24px rgba(255, 79, 134, 0.24);
  font-size: 24px;
}

.pill {
  padding: 8px 12px;
  border: 1px solid rgba(255, 183, 3, 0.46);
  border-radius: 999px;
  color: #764600;
  background: rgba(255, 245, 178, 0.86);
  font-size: 13px;
  white-space: nowrap;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 32px;
  align-items: start;
}

.headline {
  padding-top: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
  margin-bottom: 22px;
  text-wrap: balance;
}

.spark {
  color: var(--accent-strong);
  text-shadow: 0 4px 0 rgba(255, 183, 3, 0.24);
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 14px;
}

h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  pointer-events: none;
  border-radius: 8px 8px 0 0;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0 34px,
    var(--gold) 34px 68px,
    var(--teal) 68px 102px,
    var(--blue) 102px 136px,
    var(--lavender) 136px 170px
  );
}

.stack {
  display: grid;
  align-content: start;
  gap: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 46px;
  border: 2px solid rgba(241, 196, 209, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

input:focus,
textarea:focus {
  border-color: rgba(0, 166, 166, 0.8);
  box-shadow: 0 0 0 4px rgba(0, 166, 166, 0.14);
  outline: 0;
}

textarea {
  resize: vertical;
  min-height: 104px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #ff7a59);
  color: white;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 8px 0 rgba(207, 29, 92, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

button:active,
.button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 0 rgba(207, 29, 92, 0.14);
}

button.secondary,
.button.secondary {
  background: linear-gradient(135deg, #fff3b8, #ffe08a);
  color: var(--ink);
  border: 1px solid rgba(255, 183, 3, 0.35);
  box-shadow: 0 8px 0 rgba(255, 183, 3, 0.18);
}

button.ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--teal);
  border: 2px solid rgba(0, 166, 166, 0.28);
  box-shadow: none;
}

button.danger {
  background: #fff;
  color: var(--accent-strong);
  border: 1px solid rgba(185, 31, 58, 0.25);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.step {
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  border-top: 5px solid rgba(91, 124, 250, 0.72);
  box-shadow: 0 10px 24px rgba(117, 64, 91, 0.08);
}

.step:nth-child(2) {
  border-top-color: rgba(0, 166, 166, 0.72);
}

.step:nth-child(3) {
  border-top-color: rgba(255, 183, 3, 0.9);
}

.status {
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
}

.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 22px;
}

.recipient-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  align-items: start;
}

.recipient-hero {
  min-height: 520px;
}

.list {
  display: grid;
  gap: 10px;
}

.person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 2px solid rgba(255, 226, 236, 0.95);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #fff8e4 54%, #f3fffc 100%);
}

.meter {
  height: 16px;
  border-radius: 999px;
  background: #fff0c9;
  overflow: hidden;
  border: 1px solid rgba(255, 183, 3, 0.28);
}

.meter > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--accent));
  transition: width 120ms linear;
}

.recorder {
  display: grid;
  gap: 16px;
  max-width: 620px;
  margin: 0 auto;
}

.recorder h1 {
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1;
}

.record-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c8c0b8;
}

.recording .record-dot {
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(217, 67, 50, 0.14);
}

.count {
  display: grid;
  place-items: center;
  text-align: center;
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 148px;
  max-height: 220px;
  border: 3px dashed rgba(255, 79, 134, 0.48);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16px 20px, rgba(255, 79, 134, 0.18) 0 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 22px) 26px, rgba(0, 166, 166, 0.16) 0 5px, transparent 6px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 242, 184, 0.72));
  color: var(--accent-strong);
  font-size: clamp(32px, 9vw, 72px);
  font-weight: 900;
  padding: 18px;
  overflow-wrap: anywhere;
  line-height: 0.95;
}

audio {
  width: 100%;
}

.sharebox {
  display: grid;
  gap: 9px;
}

.sharebox input {
  font-size: 14px;
}

.tiny {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .hero,
  .event-layout,
  .recipient-layout,
  .steps,
  .grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 22px, 1040px);
    padding-top: 18px;
  }

  .topbar {
    margin-bottom: 16px;
  }

  .panel {
    padding: 16px;
  }

  .recorder {
    max-width: none;
    width: 100%;
  }

  .recorder .panel {
    gap: 14px;
  }

  .recorder h1 {
    font-size: clamp(32px, 11vw, 44px);
    margin-bottom: 10px;
  }

  .recorder .lede {
    font-size: 17px;
    line-height: 1.35;
  }

  .recorder .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .recorder button,
  .recorder .button {
    width: 100%;
    min-height: 54px;
    height: 54px;
    font-size: 17px;
  }

  .recorder input {
    min-height: 52px;
    font-size: 17px;
  }

  .count {
    aspect-ratio: 2.4 / 1;
    min-height: 126px;
    font-size: clamp(34px, 12vw, 58px);
    padding: 14px;
  }
}
