:root {
  color-scheme: light;
  --ink: #242220;
  --muted: #6f665d;
  --paper: #fffaf1;
  --panel: rgba(255, 250, 241, 0.9);
  --panel-strong: rgba(255, 250, 241, 0.96);
  --line: rgba(36, 34, 32, 0.16);
  --eucalyptus: #3d6f62;
  --coral: #c95242;
  --gold: #ad7b2f;
  --blue: #315a7c;
  --shadow: 0 22px 70px rgba(36, 34, 32, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 250, 241, 0.86), rgba(255, 250, 241, 0.5)),
    url("assets/wedding-planning-desk.png") center / cover fixed,
    #efe2ce;
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  min-height: 100vh;
  width: min(100% - 24px, 620px);
  margin: 0 auto;
  padding: 14px 0 24px;
}

.picker-panel,
.rejections-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.picker-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: min(660px, calc(100vh - 28px));
  padding: 18px;
}

.brand-line {
  width: fit-content;
  margin-bottom: 10px;
  border-left: 4px solid var(--coral);
  padding-left: 12px;
  color: var(--eucalyptus);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 6px;
  font-size: clamp(2.45rem, 12.2vw, 4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.tagline {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.32;
}

.date-stage {
  display: grid;
  gap: 6px;
  grid-template-rows: auto 1fr;
  height: 156px;
  margin-bottom: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  overflow: hidden;
}

.date-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.date-display {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  color: var(--blue);
  font-size: clamp(1.75rem, 8.2vw, 3.2rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.date-display.is-spinning {
  color: var(--blue);
}

.date-display.is-long {
  font-size: clamp(1.48rem, 7vw, 2.75rem);
}

.date-display.is-rejected {
  margin: 4px 0;
  border: 6px solid #d71920;
  border-radius: 999px;
  padding: 8px 16px 10px;
  color: #b51218;
  background: rgba(255, 236, 232, 0.86);
  box-shadow:
    0 0 0 4px rgba(215, 25, 32, 0.14),
    0 12px 26px rgba(181, 18, 24, 0.16);
  transform: rotate(-1deg);
}

.pick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 8px;
  padding: 15px 22px;
  color: #fffdf8;
  background: var(--ink);
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(36, 34, 32, 0.22);
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.pick-button:hover {
  transform: translateY(-1px);
  background: #171514;
  box-shadow: 0 12px 28px rgba(36, 34, 32, 0.27);
}

.pick-button:disabled {
  cursor: wait;
  transform: none;
  opacity: 0.76;
}

.button-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #f4c36d;
}

.button-icon::before,
.button-icon::after {
  content: "";
  grid-area: 1 / 1;
  display: block;
  background: currentColor;
}

.button-icon::before {
  width: 18px;
  height: 4px;
}

.button-icon::after {
  width: 4px;
  height: 18px;
}

.reason-text {
  min-height: 84px;
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(1rem, 4.6vw, 1.22rem);
  font-weight: 720;
  line-height: 1.35;
}

.reason-text.has-result {
  color: var(--coral);
}

.rejections-panel {
  align-self: stretch;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--panel-strong);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 0 0 16px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.rejections-panel.is-collapsed .panel-heading {
  margin-bottom: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.reject-heading-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reject-count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fffaf1;
  background: var(--eucalyptus);
  font-weight: 850;
}

.chevron {
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--muted);
  border-bottom: 3px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.panel-heading[aria-expanded="true"] .chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.reject-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  overflow: visible;
  list-style: none;
}

.reject-list[hidden] {
  display: none;
}

.reject-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.reject-date {
  display: block;
  color: var(--blue);
  font-weight: 850;
}

.reject-reason {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.empty-state {
  color: var(--muted);
  font-weight: 700;
}

@media (min-width: 760px) {
  .app-shell {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.62fr);
    gap: clamp(18px, 4vw, 42px);
    align-items: stretch;
    width: min(1180px, calc(100% - 32px));
    padding: clamp(24px, 5vw, 64px) 0;
  }

  .picker-panel {
    min-height: 520px;
    padding: clamp(22px, 3.2vw, 36px);
  }

  h1 {
    font-size: clamp(3rem, 5vw, 4.7rem);
  }

  .tagline {
    max-width: 520px;
    font-size: 1.12rem;
  }

  .date-display {
    font-size: clamp(2rem, 4vw, 3.8rem);
  }

  .date-display.is-long {
    font-size: clamp(1.8rem, 3.4vw, 3.2rem);
  }

  .pick-button {
    width: min(100%, 360px);
  }

  .reason-text {
    max-width: 760px;
    min-height: 60px;
    font-size: clamp(1.02rem, 2vw, 1.32rem);
  }

  .rejections-panel {
    min-height: 0;
    max-height: calc(100vh - 96px);
    padding: 22px;
  }

  .reject-list {
    overflow: auto;
  }
}

@media (max-width: 520px) {
  body {
    background-position: center top;
    background-attachment: scroll;
  }

  .app-shell {
    width: min(100% - 16px, 420px);
    padding-top: 8px;
  }

  .brand-line {
    font-size: 0.74rem;
  }

  .date-stage {
    height: 148px;
  }

  .date-display.is-rejected {
    border-width: 5px;
    padding: 7px 12px 9px;
  }
}
