:root {
  color-scheme: dark;
  --cream: #fff5e8;
  --ink: #341913;
  --accent: #f07d61;
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #2e1716; }
body { display: flex; justify-content: center; }
.shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 30rem);
  min-height: 44rem;
  min-height: max(44rem, 100svh);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(1.75rem, env(safe-area-inset-top)) 0 max(1.1rem, env(safe-area-inset-bottom));
  color: var(--cream);
  background: #a65c50;
  box-shadow: 0 0 40px #0006;
}
.bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 58% center;
}
.shell::before {
  content: '';
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, #2a121766, transparent 22%, transparent 59%, #25100d40 76%, #200c0db8);
}
header, footer { text-align: center; padding: 0 1.5rem; }
.brand {
  color: var(--cream); text-decoration: none;
  display: inline-block;
  font-size: clamp(1.85rem, 7.2vw, 2.25rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -.025em;
  text-shadow: 0 2px 12px #30100cb3;
}
.brand:focus-visible { outline: 2px solid var(--cream); outline-offset: 6px; }
hr { border: 0; height: 2px; background: var(--accent); }
.top-line { width: 2.9rem; margin: .6rem auto 0; }
main {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(18rem, 1fr) auto minmax(2.5rem, .2fr);
  padding: .5rem 0 0;
}
.message-wrap {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 84%; max-width: 25rem;
  padding: 1.25rem .6rem;
  text-align: center;
}
.message-wrap::before {
  content: ''; position: absolute; inset: -12% -5%; z-index: -1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, #fff1dc80, #ffe8d138 48%, transparent 73%);
}
.message {
  margin: 0; color: var(--ink);
  font-size: clamp(1.75rem, 7vw, 2.2rem);
  font-weight: 700; line-height: 1.16; letter-spacing: -.022em;
  text-wrap: balance; overflow-wrap: break-word;
  text-shadow: 0 1px 0 #ffffff3d;
}
.message-wrap[data-length='long'] .message { font-size: clamp(1.5rem, 6vw, 1.9rem); line-height: 1.2; }
.ref {
  margin: .85rem 0 0;
  color: #4a2118; font-size: 1rem; line-height: 1.3; font-weight: 600;
  text-wrap: balance;
}
.section-line { width: 2.3rem; margin: .85rem auto 0; }
.countdown { margin: .65rem 0 0; color: #5f3a31; font-size: .78rem; line-height: 1.3; letter-spacing: .04em; opacity: .7; }
.subtitle-wrap {
  grid-row: 2; justify-self: center;
  width: 84%; max-width: 22rem;
  padding: .85rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #34161280, #341612b3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  text-align: center;
}
.subtitle {
  margin: 0; font-size: clamp(1.25rem, 5.3vw, 1.6rem);
  font-weight: 600; font-style: italic; line-height: 1.25;
  text-wrap: balance; text-shadow: 0 2px 8px #230a08b3;
}
.footer-text { margin: 0; font-size: .875rem; line-height: 1.4; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.bottom-line { width: 2.1rem; margin: .5rem auto 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-height: 740px) {
  .shell { min-height: max(38rem, 100svh); padding-top: max(1.15rem, env(safe-area-inset-top)); }
  main { grid-template-rows: minmax(17rem, 1fr) auto minmax(1.5rem, .14fr); }
}
@media (max-width: 340px) {
  .message-wrap { width: 88%; padding-inline: .3rem; }
  .subtitle-wrap { width: 88%; padding-inline: .6rem; }
}
