@font-face {
  font-family: "Allura";
  src: url("fonts/allura-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f0ece6;
  --paper-light: #f8f5ef;
  --ivory: #fcfaf6;
  --ink: #3b2b2c;
  --ink-soft: #685759;
  --wine: #8d2337;
  --wine-dark: #6e1729;
  --wine-pale: #ead8d9;
  --gold: #b49345;
  --gold-soft: #d8c48e;
  --line: rgba(110, 71, 61, 0.18);
  --shadow: 0 24px 70px rgba(76, 51, 43, 0.12);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", system-ui, sans-serif;
  --script: "Allura", "Snell Roundhand", "Segoe Script", cursive;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 10%, rgba(180, 147, 69, 0.055), transparent 28rem),
    radial-gradient(circle at 92% 88%, rgba(141, 35, 55, 0.045), transparent 28rem);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

.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;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(180, 147, 69, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(141, 35, 55, 0.06);
  border-radius: inherit;
}

.ambient::after {
  inset: 2rem;
  border-color: rgba(180, 147, 69, 0.1);
}

.ambient-one {
  top: -8rem;
  left: -8rem;
}

.ambient-two {
  right: -9rem;
  bottom: -9rem;
}

.corner-heart {
  position: fixed;
  z-index: 0;
  color: rgba(141, 35, 55, 0.1);
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 1;
  pointer-events: none;
}

.corner-heart-left {
  left: 1.2rem;
  bottom: 1rem;
  transform: rotate(-12deg);
}

.corner-heart-right {
  top: 1rem;
  right: 1.2rem;
  transform: rotate(12deg);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.shell-narrow {
  max-width: 700px;
}

.shell-wide,
.shell-admin {
  max-width: 1120px;
}

.shell-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shell-centered > * {
  min-width: 0;
  max-width: 100%;
}

.card {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.75rem;
  background: rgba(252, 250, 246, 0.83);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border: 1px solid rgba(180, 147, 69, 0.15);
  border-radius: 1.35rem;
  pointer-events: none;
}

.card-welcome {
  width: 100%;
  padding: 2.3rem 1.35rem 2rem;
  text-align: center;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: min(14rem, 72%);
  margin: 0 auto 1.4rem;
  color: var(--wine);
}

.ornament span {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}

.ornament span:last-child {
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

.ornament b {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

.ornament-small {
  margin-bottom: 1.1rem;
}

.eyebrow,
.admin-kicker {
  margin: 0 0 0.45rem;
  color: var(--wine);
  font-family: var(--sans);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
p {
  text-wrap: balance;
}

h1,
h2 {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 10vw, 3.6rem);
  letter-spacing: -0.025em;
}

.script-title {
  width: 100%;
  min-width: 0;
  margin: -0.15rem 0 0.15rem;
  color: var(--wine-dark);
  font-family: var(--script);
  font-size: clamp(3.4rem, 18vw, 6.6rem);
  font-weight: 400;
  line-height: 0.95;
}

.script-title-small {
  margin: 0.35rem auto 1rem;
  max-width: 30rem;
  font-size: clamp(3.05rem, 14.5vw, 5.25rem);
  line-height: 0.92;
}

.intro {
  margin: 0 auto 1.7rem;
  color: var(--ink-soft);
  font-size: 1.15rem;
  font-style: italic;
}

.login-form {
  width: 100%;
  min-width: 0;
  max-width: 24rem;
  margin: 0 auto;
  text-align: left;
}

.login-form label {
  display: block;
  margin: 0 0 0.5rem 0.15rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.password-field {
  position: relative;
  width: 100%;
  min-width: 0;
}

.password-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3.5rem;
  padding: 0.85rem 3.4rem 0.85rem 1rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  outline: 0;
  background: rgba(255, 255, 255, 0.64);
  font-family: var(--sans);
  font-size: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.password-field input:focus {
  border-color: rgba(141, 35, 55, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(141, 35, 55, 0.09);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle.is-active {
  color: var(--wine);
  background: rgba(141, 35, 55, 0.07);
}

.password-toggle svg {
  width: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.field-hint {
  margin: 0.45rem 0 1.15rem 0.15rem;
  color: #887779;
  font-size: 0.92rem;
  font-style: italic;
}

.button {
  display: inline-flex;
  min-height: 3.45rem;
  padding: 0.9rem 1.35rem;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button span {
  font-size: 1.1rem;
  line-height: 0;
  transition: transform 180ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:hover:not(:disabled) span {
  transform: translateX(3px);
}

.button:focus-visible {
  outline: 3px solid rgba(180, 147, 69, 0.45);
  outline-offset: 3px;
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.button-primary {
  color: #fff9f4;
  background: var(--wine);
  box-shadow: 0 13px 27px rgba(110, 23, 41, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: var(--wine-dark);
  box-shadow: 0 17px 32px rgba(110, 23, 41, 0.24);
}

.button-secondary {
  color: var(--wine-dark);
  border-color: rgba(141, 35, 55, 0.26);
  background: rgba(255, 255, 255, 0.5);
}

.button-secondary:hover:not(:disabled) {
  border-color: rgba(141, 35, 55, 0.46);
  background: rgba(255, 255, 255, 0.82);
}

.button-full {
  width: 100%;
}

.button-small {
  min-height: 2.7rem;
  padding: 0.7rem 1rem;
}

.signature {
  margin: 1.35rem 0 0;
  color: rgba(104, 87, 89, 0.75);
  font-family: var(--script);
  font-size: 1.75rem;
  line-height: 1;
  text-align: center;
}

.messages {
  width: 100%;
  margin: 0 0 1rem;
}

.message {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(141, 35, 55, 0.18);
  border-radius: 0.9rem;
  background: rgba(252, 250, 246, 0.9);
  box-shadow: 0 8px 24px rgba(76, 51, 43, 0.08);
  font-size: 0.95rem;
  text-align: center;
}

.message-error {
  color: var(--wine-dark);
  border-color: rgba(141, 35, 55, 0.26);
  background: rgba(250, 238, 238, 0.92);
}

.journey {
  display: flex;
  width: 8.5rem;
  margin: 0 auto 1.2rem;
  align-items: center;
  justify-content: center;
}

.journey-dot {
  display: grid;
  flex: 0 0 auto;
  width: 0.6rem;
  height: 0.6rem;
  place-items: center;
  border: 1px solid rgba(141, 35, 55, 0.3);
  border-radius: 50%;
  background: var(--paper);
  transition: background 180ms ease, transform 180ms ease;
}

.journey-dot.is-active {
  background: var(--wine);
  box-shadow: 0 0 0 4px rgba(141, 35, 55, 0.08);
  transform: scale(1.15);
}

.journey-dot.is-done {
  background: var(--gold);
}

.journey-line {
  width: 2.4rem;
  height: 1px;
  background: rgba(141, 35, 55, 0.18);
}

.journey-line.is-done {
  background: var(--gold-soft);
}

.story-card {
  padding: 2.35rem 1.35rem 1.4rem;
  text-align: center;
}

.story-card h1 {
  max-width: 29rem;
  margin-right: auto;
  margin-left: auto;
}

.prose {
  max-width: 34rem;
  margin: 1.4rem auto 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.68;
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.soft-rule {
  display: flex;
  max-width: 17rem;
  margin: 1.6rem auto 1rem;
  align-items: center;
  gap: 0.75rem;
  color: var(--wine);
}

.soft-rule::before,
.soft-rule::after {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--line);
}

.soft-rule span {
  font-size: 0.9rem;
}

.story-closing {
  margin: 0 auto 1.25rem;
  color: var(--ink);
  font-size: 1.18rem;
  font-style: italic;
}

.section-heading {
  max-width: 43rem;
  margin: 0 auto 1.2rem;
  text-align: center;
}

.section-heading h1 {
  margin-bottom: 0.7rem;
}

.section-heading > p:last-child {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.deadline {
  display: flex;
  max-width: 27rem;
  margin: 0 auto 1.35rem;
  padding: 0.75rem 1rem;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink-soft);
  border: 1px solid rgba(180, 147, 69, 0.26);
  border-radius: 1rem;
  background: rgba(252, 250, 246, 0.62);
}

.deadline svg {
  flex: 0 0 auto;
  width: 1.35rem;
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.deadline div {
  display: flex;
  flex-direction: column;
}

.deadline strong {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.deadline span {
  font-size: 0.92rem;
}

.book-grid {
  display: grid;
  gap: 1rem;
}

.book-option {
  position: relative;
  min-width: 0;
}

.book-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.book-card {
  position: relative;
  display: grid;
  min-height: 12.5rem;
  padding: 1rem;
  grid-template-columns: 7.3rem minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 0.9rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(110, 71, 61, 0.15);
  border-radius: 1.35rem;
  background: rgba(252, 250, 246, 0.78);
  box-shadow: 0 14px 35px rgba(76, 51, 43, 0.08);
  cursor: pointer;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease, background 190ms ease;
}

.book-card:hover {
  border-color: rgba(141, 35, 55, 0.3);
  box-shadow: 0 18px 42px rgba(76, 51, 43, 0.12);
  transform: translateY(-2px);
}

.book-radio:focus-visible + .book-card {
  outline: 3px solid rgba(180, 147, 69, 0.5);
  outline-offset: 3px;
}

.book-radio:checked + .book-card {
  border-color: rgba(141, 35, 55, 0.58);
  background: rgba(255, 252, 247, 0.95);
  box-shadow: 0 19px 44px rgba(110, 23, 41, 0.14);
}

.book-radio:disabled + .book-card {
  cursor: default;
}

.book-radio:disabled:not(:checked) + .book-card {
  opacity: 0.58;
  filter: grayscale(0.35);
}

.selected-mark {
  position: absolute;
  z-index: 2;
  top: 0.65rem;
  right: 0.65rem;
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--wine);
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 170ms ease, transform 170ms ease;
}

.selected-mark svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.book-radio:checked + .book-card .selected-mark {
  opacity: 1;
  transform: scale(1);
}

.book-cover {
  position: relative;
  display: grid;
  width: 7.3rem;
  height: 10.4rem;
  place-items: center;
}

.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(7px 10px 10px rgba(62, 39, 34, 0.2));
}

.book-copy {
  display: flex;
  min-width: 0;
  padding: 0.35rem 0.4rem 0 0;
  flex-direction: column;
  align-self: start;
}

.book-copy strong {
  padding-right: 1.1rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.05;
}

.book-copy em {
  margin: 0.3rem 0 0.65rem;
  color: var(--wine);
  font-size: 0.91rem;
  line-height: 1.35;
}

.book-copy > span {
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.45;
}

.book-note {
  display: block;
  margin-top: 0.8rem;
  color: var(--wine-dark);
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.35;
}

.choose-label {
  display: flex;
  padding-top: 0.7rem;
  grid-column: 2;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.radio-ring {
  display: block;
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(104, 87, 89, 0.45);
  border-radius: 50%;
  transition: border 170ms ease, box-shadow 170ms ease;
}

.book-radio:checked + .book-card .choose-label {
  color: var(--wine-dark);
}

.book-radio:checked + .book-card .radio-ring {
  border: 0.3rem solid var(--wine);
  box-shadow: 0 0 0 2px rgba(141, 35, 55, 0.09);
}

.book-actions {
  display: flex;
  margin-top: 1.4rem;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.book-actions .button {
  width: 100%;
  max-width: 25rem;
}

.book-actions p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
}

.locked-note {
  display: flex;
  max-width: 27rem;
  margin: 1.3rem auto 0;
  padding: 0.9rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--wine-dark);
  border: 1px solid rgba(141, 35, 55, 0.18);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.45);
}

.locked-note p {
  margin: 0;
}

.surprise-card {
  padding: 2.25rem 1.35rem 1.35rem;
  text-align: center;
}

.gift-seal {
  position: relative;
  display: grid;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.2rem;
  place-items: center;
  color: var(--wine);
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
}

.gift-seal::before {
  content: "";
  position: absolute;
  inset: 0.3rem;
  border: 1px solid rgba(141, 35, 55, 0.18);
  border-radius: inherit;
}

.gift-seal span {
  font-size: 1.25rem;
}

.surprise-prose {
  margin-top: 1.1rem;
}

.hint-box {
  display: flex;
  max-width: 31rem;
  margin: 1.45rem auto;
  padding: 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-top: 1px solid rgba(180, 147, 69, 0.28);
  border-bottom: 1px solid rgba(180, 147, 69, 0.28);
}

.hint-box > span {
  color: var(--wine);
  font-size: 0.85rem;
}

.hint-box p {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-style: italic;
}

.selection-receipt {
  display: flex;
  width: 100%;
  max-width: 25rem;
  margin: 0 auto 1rem;
  padding: 0.8rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.36);
}

.selection-receipt span {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selection-receipt strong {
  color: var(--wine-dark);
  font-size: 1.1rem;
}

.admin-login-card,
.error-card {
  padding: 2.4rem 1.35rem;
  text-align: center;
}

.admin-login-card > p:not(.admin-kicker),
.error-card > p {
  margin: -0.2rem auto 1.5rem;
  color: var(--ink-soft);
}

.admin-login-card h1,
.error-card h1 {
  font-size: clamp(2.2rem, 10vw, 3.2rem);
}

.admin-header {
  display: flex;
  margin-bottom: 1.2rem;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-header h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(2.2rem, 8vw, 3.2rem);
}

.admin-header p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.admin-grid {
  display: grid;
  gap: 1rem;
}

.admin-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1.35rem;
  background: rgba(252, 250, 246, 0.8);
  box-shadow: 0 14px 42px rgba(76, 51, 43, 0.09);
}

.panel-heading {
  display: flex;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.panel-heading a {
  color: var(--wine);
  text-decoration: none;
}

.status-pill {
  display: inline-flex;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.status-open {
  color: #6f5420;
  background: rgba(216, 196, 142, 0.32);
}

.status-closed {
  color: var(--wine-dark);
  background: rgba(141, 35, 55, 0.1);
}

.admin-selection {
  display: flex;
  padding: 1.4rem 1rem 1rem;
  align-items: center;
  gap: 1rem;
}

.mini-cover {
  display: grid;
  flex: 0 0 auto;
  width: 4rem;
  height: 5.6rem;
  place-items: center;
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.2rem 0.45rem 0.45rem 0.2rem;
  background: var(--wine-dark);
  box-shadow: 5px 7px 15px rgba(62, 39, 34, 0.18), inset 0.22rem 0 rgba(255, 255, 255, 0.1);
  font-size: 1.5rem;
}

.admin-selection p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-selection h2 {
  margin: 0.3rem 0 0.15rem;
  color: var(--wine-dark);
  font-size: 1.9rem;
}

.admin-selection span {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.selection-meta {
  display: grid;
  margin: 0;
  padding: 0 1rem 1rem;
  gap: 0.6rem;
}

.selection-meta div {
  display: flex;
  padding: 0.65rem 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.selection-meta dt {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.selection-meta dd {
  margin: 0;
  font-size: 0.94rem;
  text-align: right;
}

.admin-deadline {
  display: flex;
  padding: 1rem;
  flex-direction: column;
  border-top: 1px solid rgba(180, 147, 69, 0.22);
  background: rgba(216, 196, 142, 0.1);
}

.admin-deadline span,
.admin-deadline small {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.62rem;
}

.admin-deadline span {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-deadline strong {
  margin: 0.15rem 0;
  color: var(--wine-dark);
}

.empty-selection {
  padding: 2.6rem 1rem;
  text-align: center;
}

.empty-selection > span {
  color: var(--wine);
}

.empty-selection h2 {
  margin: 0.55rem 0 0.2rem;
  font-size: 1.65rem;
}

.empty-selection p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.history-list {
  max-height: 31rem;
  margin: 0;
  padding: 1.2rem 1rem 1.2rem 2.3rem;
  overflow-y: auto;
  list-style: none;
}

.history-list li {
  position: relative;
  padding: 0 0 1.25rem 1.1rem;
  border-left: 1px solid rgba(180, 147, 69, 0.35);
}

.history-list li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.history-dot {
  position: absolute;
  top: 0.35rem;
  left: -0.28rem;
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid var(--paper-light);
  border-radius: 50%;
  background: var(--wine);
  box-shadow: 0 0 0 1px rgba(141, 35, 55, 0.25);
}

.history-list strong {
  color: var(--wine-dark);
  font-size: 1.05rem;
}

.history-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.history-list time {
  color: #8a797a;
  font-family: var(--sans);
  font-size: 0.61rem;
}

.history-empty {
  margin: 0;
  padding: 2.5rem 1rem;
  color: var(--ink-soft);
  text-align: center;
}

.reveal {
  animation: reveal-up 580ms cubic-bezier(0.22, 0.8, 0.25, 1) both;
}

.reveal-delay {
  animation-delay: 100ms;
}

.reveal-book-1 {
  animation-delay: 60ms;
}

.reveal-book-2 {
  animation-delay: 120ms;
}

.reveal-book-3 {
  animation-delay: 180ms;
}

.reveal-book-4 {
  animation-delay: 240ms;
}

.reveal-book-5 {
  animation-delay: 300ms;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 560px) {
  .site-shell {
    padding: max(2rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
  }

  .card-welcome,
  .story-card,
  .surprise-card,
  .admin-login-card,
  .error-card {
    padding-right: 2.8rem;
    padding-left: 2.8rem;
  }

  .story-card,
  .surprise-card {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
}

@media (min-width: 760px) {
  .site-shell {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .journey {
    margin-bottom: 1.7rem;
  }

  .book-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .book-option {
    grid-column: span 2;
  }

  .book-option:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .book-card {
    height: 100%;
    min-height: 29rem;
    padding: 1.15rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    text-align: center;
  }

  .book-cover {
    width: 9rem;
    height: 12.8rem;
    margin: 0.15rem auto 0.35rem;
  }

  .book-copy {
    padding: 0;
    align-items: center;
  }

  .book-copy strong {
    padding: 0;
    font-size: 1.75rem;
  }

  .choose-label {
    width: 100%;
    grid-column: 1;
    justify-content: center;
  }

  .book-actions {
    margin-top: 1.7rem;
  }

  .admin-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

@media (min-width: 1000px) {
  .corner-heart {
    font-size: 5rem;
  }

  .corner-heart-left {
    left: 2.5rem;
    bottom: 2rem;
  }

  .corner-heart-right {
    top: 2rem;
    right: 2.5rem;
  }

  .book-grid {
    gap: 1.35rem;
  }

  .book-card {
    padding: 1.35rem;
  }
}

@media (max-width: 480px) {
  .admin-header {
    flex-direction: column;
  }

  .admin-header form,
  .admin-header .button {
    width: 100%;
  }
}

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