:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: rgba(10, 10, 11, 0.86);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f0;
  --muted: #a6a6a0;
  --signal: #e9ff70;
  --accent: #e9ff70;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 28rem),
    linear-gradient(245deg, rgba(255, 255, 255, 0.06), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

button,
input,
select { font: inherit; }

.app {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 0 72px;
}

.hero {
  display: grid;
  justify-items: center;
  padding: 28px 0 clamp(34px, 6vw, 58px);
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 760;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: inset 6px 0 0 var(--accent);
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 860;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin-top: 14px;
  font-size: clamp(58px, 11vw, 132px);
  line-height: 0.86;
}

h2 {
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.9;
}

.lede {
  max-width: 780px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.22;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: 14px;
}

.share-view .hero,
.share-view .controls {
  display: none;
}

.share-view .app {
  display: grid;
  min-height: 100vh;
  align-items: center;
  padding: clamp(18px, 4vw, 48px) 0;
}

.share-view .builder-grid {
  grid-template-columns: 1fr;
}

.share-view .countdown-stage {
  min-height: min(820px, calc(100vh - 36px));
}

.panel,
.countdown-stage {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 70%),
    var(--surface);
  padding: clamp(18px, 4vw, 34px);
}

.controls,
#countdown-form,
.section-heading,
.field {
  display: grid;
  gap: 14px;
}

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

.field span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
}

.field input,
.field select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.field option {
  background: #111113;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 780;
  white-space: nowrap;
}

.button-light {
  border: 1px solid #eff2d6;
  background: #f5f7e9;
  color: #11120e;
}

.button-dark {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 720;
}

.countdown-stage {
  display: grid;
  min-height: 620px;
  place-items: center;
  overflow: hidden;
}

.countdown-card {
  display: grid;
  width: 100%;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.countdown-card h2 {
  max-width: 780px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.countdown-card > p:not(.kicker):not(.target) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 720;
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 760px);
  margin-top: 10px;
}

.timer div {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  padding: 18px 10px 16px;
}

.timer strong {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(34px, 6vw, 66px);
  font-weight: 900;
  line-height: 0.9;
}

.share-view .timer strong {
  font-size: clamp(40px, 8vw, 92px);
}

.timer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.target {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 860;
  text-transform: uppercase;
}

.theme-birthday { --accent: #ff8fd4; }
.theme-exam { --accent: #ffcf5c; }
.theme-trip { --accent: #7fb7ff; }
.theme-release { --accent: #54ff84; }
.theme-void { --accent: #e9ff70; }

@media (max-width: 960px) {
  .builder-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(46px, 16vw, 72px);
  }

  .field-grid,
  .timer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
