:root {
  --ink: #171711;
  --paper: #f4f1e9;
  --cream: #e9e5da;
  --accent: #e84b2f;
  --acid: #d9ff3f;
  --line: rgba(23, 23, 17, .16);
  --muted: #6f6d64;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 8%, rgba(217, 255, 63, .25), transparent 22rem),
    var(--paper);
  font-family: "Manrope", sans-serif;
  min-height: 100vh;
}

button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: .14em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  font-weight: 500;
  letter-spacing: 0;
}

.header-actions { display: flex; align-items: center; gap: 18px; }

.sound-control, .install-control {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: 500 11px/1 "DM Mono", monospace;
  letter-spacing: .1em;
}

.install-control { padding: 8px 13px; border: 1px solid var(--ink); border-radius: 2px; }

.sound-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sound-control[aria-pressed="false"] .sound-dot { background: var(--muted); }

.intro { padding: 90px 0 72px; }
.eyebrow { margin: 0 0 20px; font: 500 11px/1 "DM Mono", monospace; letter-spacing: .17em; }

.intro h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(54px, 8.3vw, 112px);
  line-height: .91;
  letter-spacing: -.065em;
  font-weight: 600;
}

.intro h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.lede { max-width: 550px; margin: 38px 0 0 auto; font-size: 17px; line-height: 1.6; color: var(--muted); }

.machine { border-top: 1px solid var(--ink); }
.step-block { padding: 42px 0 54px; border-bottom: 1px solid var(--ink); }
.step-heading { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; margin-bottom: 30px; }
.step-heading > span { color: var(--accent); font: 500 12px/1 "DM Mono", monospace; }
.step-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; font-weight: 600; }
.step-heading p { margin: 0; color: var(--muted); font: 400 11px/1 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }

.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.day {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 15px;
  text-align: left;
  transition: transform .2s ease, color .2s, background .2s, border-color .2s;
}

.day:hover { transform: translateY(-3px); border-color: var(--ink); }
.day.active { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.day-name { font: 500 11px/1 "DM Mono", monospace; letter-spacing: .08em; }
.day-date { font-size: clamp(25px, 3.4vw, 43px); line-height: 1; letter-spacing: -.05em; }
.day.active::after { content: ""; position: absolute; top: 15px; right: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--acid); }

.period-switch { display: flex; background: var(--cream); padding: 4px; border-radius: 100px; }
.period { border: 0; background: transparent; border-radius: 100px; padding: 8px 18px; cursor: pointer; font: 500 11px/1 "DM Mono", monospace; letter-spacing: .08em; }
.period.active { color: var(--paper); background: var(--ink); }

.time-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.time {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: clamp(17px, 2vw, 24px);
  letter-spacing: -.04em;
  transition: transform .18s, background .18s, color .18s, border-color .18s;
}
.time:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.time.active { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.time-hint { margin: 18px 0 0; text-align: right; color: var(--muted); font: 400 10px/1 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }

.upcoming { padding: 84px 0; }
.upcoming-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.upcoming h2 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.055em; }
.memory-count { color: var(--muted); font: 400 11px/1 "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.memory-list { border-top: 1px solid var(--ink); }
.empty { padding: 42px 0; color: var(--muted); }

.memory-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.memory-date { font: 500 11px/1.5 "DM Mono", monospace; text-transform: uppercase; letter-spacing: .07em; }
.memory-date strong { display: block; font-size: 16px; color: var(--accent); }
.memory-copy { min-width: 0; }
.memory-copy p { margin: 0 0 4px; font-weight: 600; }
.memory-copy span { color: var(--muted); font-size: 13px; }
.memory-actions { display: flex; gap: 8px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button:hover { border-color: var(--ink); }

footer { display: flex; justify-content: space-between; padding: 24px 0 38px; border-top: 1px solid var(--ink); color: var(--muted); font: 400 10px/1 "DM Mono", monospace; letter-spacing: .08em; }

.recorder { width: min(540px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 8px; color: var(--paper); background: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.recorder::backdrop { background: rgba(23, 23, 17, .63); backdrop-filter: blur(8px); }
.recorder-inner { position: relative; padding: 48px; text-align: center; }
.recorder .eyebrow { color: var(--acid); }
.recorder h2 { margin: 0 0 34px; font-size: 28px; }
.close { position: absolute; top: 18px; right: 20px; border: 0; color: var(--paper); background: transparent; font-size: 28px; cursor: pointer; }
.orb-wrap { position: relative; display: inline-grid; place-items: center; }
.record-orb { width: 136px; height: 136px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.orb-core { width: 74px; height: 74px; border-radius: 50%; background: var(--accent); transition: transform .2s, border-radius .2s; box-shadow: 0 0 42px rgba(232,75,47,.35); }
.record-orb.recording .orb-core { transform: scale(.72); border-radius: 12px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 55px rgba(232,75,47,.8); } }
.timer { margin-top: 15px; font: 400 12px/1 "DM Mono", monospace; }
.record-status { min-height: 24px; margin: 24px 0 15px; color: #bbb8af; font-size: 14px; }
.waveform { height: 34px; display: flex; justify-content: center; align-items: center; gap: 4px; }
.waveform i { display: block; width: 3px; border-radius: 3px; background: var(--acid); opacity: .8; }
.record-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.primary, .secondary { min-height: 48px; border-radius: 3px; cursor: pointer; font-weight: 600; }
.primary { border: 0; background: var(--acid); color: var(--ink); }
.secondary { border: 1px solid rgba(255,255,255,.26); background: transparent; color: var(--paper); }
.primary:disabled, .secondary:disabled { opacity: .35; cursor: not-allowed; }
.privacy-note { margin: 20px 0 0; color: #848178; font: 400 10px/1.4 "DM Mono", monospace; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 12px 18px; color: var(--paper); background: var(--ink); border-radius: 3px; opacity: 0; pointer-events: none; transition: .25s ease; font-size: 13px; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.play-due {
  position: fixed;
  z-index: 11;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 100px;
  padding: 15px 22px;
  color: var(--ink);
  background: var(--acid);
  box-shadow: 0 12px 45px rgba(0,0,0,.25);
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1180px); }
  .masthead { min-height: 72px; }
  .intro { padding: 68px 0 55px; }
  .lede { margin-top: 28px; }
  .step-heading { grid-template-columns: 40px 1fr; gap: 0; }
  .step-heading > p, .period-switch { grid-column: 2; justify-self: start; margin-top: 15px; }
  .days { grid-template-columns: repeat(4, 1fr); }
  .day { padding: 11px; }
  .time-grid { grid-template-columns: repeat(4, 1fr); }
  .time { min-height: 65px; }
  .memory-item { grid-template-columns: 85px 1fr; gap: 12px; }
  .memory-actions { grid-column: 2; }
  .recorder-inner { padding: 44px 22px 30px; }
  footer { gap: 14px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
