@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #35945f;
  --cream: #fffaf6;
  --ink: #241c18;
  --muted: #5c534c;
  --red: #e14b46;
  --red-deep: #c73732;
  --door-green: #2f7a4c;
  --door-green-dark: #256843;
  --gold: #f0c14d;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --shadow: 0 16px 40px rgba(18, 70, 36, 0.18);
  --cranberry: var(--red);
  --cranberry-deep: var(--red-deep);
}

* {
  box-sizing: border-box;
}

html {
  background: #071428;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: #fffaf6;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  background: #071428;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("night.jpg?v=2") center center / cover no-repeat;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.paper :focus-visible,
.letter :focus-visible {
  outline-color: var(--red);
}

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

.snow {
  display: none;
}

.snow span {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: rgba(246, 241, 232, 0.9);
  animation: fall linear infinite;
}

.snow span:nth-child(1) { left: 7%; width: 3px; height: 3px; animation-duration: 22s; animation-delay: -6s; opacity: 0.28; }
.snow span:nth-child(2) { left: 16%; width: 4px; height: 4px; animation-duration: 26s; animation-delay: -14s; opacity: 0.4; }
.snow span:nth-child(3) { left: 27%; width: 2px; height: 2px; animation-duration: 18s; animation-delay: -3s; opacity: 0.25; }
.snow span:nth-child(4) { left: 38%; width: 4px; height: 4px; animation-duration: 29s; animation-delay: -19s; opacity: 0.34; }
.snow span:nth-child(5) { left: 49%; width: 3px; height: 3px; animation-duration: 21s; animation-delay: -9s; opacity: 0.3; }
.snow span:nth-child(6) { left: 61%; width: 5px; height: 5px; animation-duration: 27s; animation-delay: -16s; opacity: 0.22; }
.snow span:nth-child(7) { left: 72%; width: 3px; height: 3px; animation-duration: 24s; animation-delay: -4s; opacity: 0.36; }
.snow span:nth-child(8) { left: 83%; width: 2px; height: 2px; animation-duration: 19s; animation-delay: -11s; opacity: 0.28; }
.snow span:nth-child(9) { left: 91%; width: 4px; height: 4px; animation-duration: 31s; animation-delay: -21s; opacity: 0.24; }
.snow span:nth-child(10) { left: 54%; width: 2px; height: 2px; animation-duration: 23s; animation-delay: -7s; opacity: 0.2; }
.snow span:nth-child(11) { left: 21%; width: 3px; height: 3px; animation-duration: 28s; animation-delay: -18s; opacity: 0.26; }
.snow span:nth-child(12) { left: 76%; width: 3px; height: 3px; animation-duration: 20s; animation-delay: -12s; opacity: 0.32; }

@keyframes fall {
  from { transform: translate3d(0, -8px, 0); }
  to { transform: translate3d(16px, 105vh, 0); }
}

#app {
  position: relative;
  z-index: 1;
}

.wrap {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding:
    calc(16px + env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}

.wrap.mid {
  justify-content: safe center;
}

.wrap.mid .paper.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  align-self: center;
  width: min(100%, 28rem);
}

.wrap.top {
  justify-content: flex-start;
}

.paper {
  width: 100%;
  flex: 1;
  background: transparent;
  color: #fffaf6;
  color-scheme: dark;
  border-radius: 0;
  box-shadow: none;
  padding: 4px 0 0;
}

.letter {
  width: min(100%, 440px);
  background-color: var(--cream);
  color: var(--ink);
  color-scheme: light;
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.paper {
  padding: 0;
  position: relative;
}

.paper.center .mast,
.letter-scroll {
  text-align: center;
}

.tree {
  display: block;
  width: min(78%, 230px);
  height: auto;
  margin: 0 auto 4px;
}

.tree-sm {
  width: min(46%, 132px);
}

.star {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--red);
}

.kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cranberry);
}

h1,
h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 10.5vw, 3.4rem);
  color: var(--red);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.year,
.subtitle {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 1.35rem;
  letter-spacing: 0;
  color: #f6d98a;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.rule {
  width: 46px;
  height: 1px;
  margin: 16px auto 0;
  border: 0;
  background: rgba(225, 75, 70, 0.35);
}

.lede,
.status {
  margin: 14px 0 0;
  color: rgba(255, 250, 246, 0.92);
  font-size: 1rem;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.status.is-preview {
  color: var(--cranberry);
  font-weight: 600;
}

.year-title {
  margin: 19px 0 0;
  color: #f6edd4;
  font-size: clamp(2.7rem, 12vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: none;
}

.mast .text-bow {
  margin-top: 9px;
}

.who {
  width: 100%;
  margin-top: 22px;
  appearance: none;
  -webkit-appearance: none;
  min-height: 70px;
  padding: 16px 54px 17px;
  border: 1.5px solid #f6ad52;
  border-radius: 999px;
  background-color: #ae1715;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fffaf6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #c72e2a 0%, #ae1715 52%, #970d0d 100%);
  background-repeat: no-repeat;
  background-position: right 22px center, center;
  background-size: 14px 10px, 100% 100%;
  box-shadow:
    inset 0 2px 7px rgba(255, 255, 255, 0.34),
    0 0 12px rgba(255, 117, 36, 0.72),
    0 9px 22px rgba(0, 0, 0, 0.28);
  color: #fff;
  color-scheme: dark;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  text-align: center;
  text-align-last: center;
}

.who option {
  color: var(--ink);
  background: #fffaf6;
}

.person {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 18px;
  text-align: center;
  background: rgba(225, 75, 70, 0.7);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(180, 40, 36, 0.22);
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: #fff;
}

.person:active {
  background: rgba(199, 55, 50, 0.7);
  color: #fff;
}

.back {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cranberry);
  font-weight: 600;
  font-size: 0.95rem;
}

.form {
  margin-top: 18px;
  text-align: left;
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cranberry);
}

.pw-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.pw {
  flex: 1;
  min-width: 0;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(28, 25, 21, 0.18);
  background: #fffdf9;
  color: var(--ink);
  font-size: 1.05rem;
}

.pw::placeholder {
  color: #8a8178;
}

.pw:focus {
  border-color: transparent;
}

.form.is-invalid .pw {
  border-color: var(--cranberry);
}

.pw:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #fffdf9 inset;
}

.ghost {
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 250, 246, 0.55);
  background: transparent;
  color: #fffaf6;
  font-weight: 600;
}

.ghost:active,
.primary:active {
  transform: translateY(1px);
}

.form-error {
  min-height: 1.35em;
  margin: 8px 0 0;
  color: var(--cranberry);
  font-size: 0.95rem;
}

.form-error:empty {
  display: none;
}

.primary {
  width: 100%;
  margin-top: 12px;
  padding: 16px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
}

.primary:active {
  background: var(--cranberry-deep);
}

.open-calendar {
  position: relative;
  min-height: 70px;
  padding: 16px 54px 17px;
  border: 1.5px solid #f6ad52;
  background: linear-gradient(180deg, #c72e2a 0%, #ae1715 52%, #970d0d 100%);
  box-shadow:
    inset 0 2px 7px rgba(255, 255, 255, 0.34),
    0 0 12px rgba(255, 117, 36, 0.72),
    0 9px 22px rgba(0, 0, 0, 0.28);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.open-calendar span {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-54%);
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

.cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cal-top .text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cranberry);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.calendar h1 {
  font-size: clamp(2.1rem, 10vw, 2.8rem);
}

.countdown {
  margin: 0 0 14px;
  padding: 10px 8px 12px;
  text-align: center;
  border-radius: 18px;
  background: rgba(6, 14, 32, 0.78);
}

.ticks {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
}

.ticks div {
  min-width: 64px;
}

.ticks strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 10vw, 2.7rem);
  line-height: 0.95;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.ticks span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 250, 246, 0.9);
  font-size: 0.75rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.ticks b {
  color: var(--red);
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 0.9;
}

.count-done {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--red);
}

.doors {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: start;
  margin: 4px 0 0;
  padding: 0;
}

.doors li {
  display: contents;
}

.door {
  position: relative;
  width: 100%;
  height: 124px;
  display: block;
  border: 0;
  border-radius: 16px;
  color: #fffaf6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.door.span-2 {
  grid-column: span 2;
  height: 112px;
}

.door.span-3 {
  grid-column: span 3;
  height: 138px;
}

.door.span-4 {
  grid-column: span 4;
  height: 156px;
}

.door.is-green {
  background: var(--door-green);
}

.door.is-red {
  background: var(--red);
}

.letter-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bow,
.ribbon-v,
.ribbon-h,
.arrow {
  pointer-events: none;
}

.bow {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 50%;
  width: 36px;
  height: 16px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 8px 8px, #f0c14d 7px, transparent 7.5px),
    radial-gradient(circle at 28px 8px, #f0c14d 7px, transparent 7.5px);
}

.bow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e2ae32;
  transform: translateX(-50%);
}

.ribbon-v,
.ribbon-h {
  position: absolute;
  z-index: 1;
  background: #f0c14d;
}

.ribbon-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 12px;
  transform: translateX(-50%);
}

.ribbon-h {
  left: 0;
  right: 0;
  top: 50%;
  height: 14px;
  transform: translateY(-50%);
}

.door-num {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.35rem;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: #fffaf6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
}

.door.span-3 .door-num {
  font-size: 3rem;
}

.door.span-4 .door-num {
  font-size: 3.6rem;
}

.arrow {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
}

.arrow::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}

.door.is-locked.is-green {
  background: repeating-linear-gradient(-32deg, var(--door-green) 0 11px, var(--door-green-dark) 11px 20px);
  cursor: default;
}

.door.is-locked.is-red {
  background: repeating-linear-gradient(-32deg, #e14b46 0 11px, #c93d38 11px 20px);
  cursor: default;
}

.door.is-open,
.door.is-open.is-today {
  opacity: 0.1;
}

.door.is-today {
  box-shadow: 0 0 0 3px #fff;
}

.letter-art {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
}

.hint {
  margin: 16px 0 2px;
  text-align: center;
  color: #8a8178;
  font-size: 0.86rem;
}

.site-footer {
  width: 100%;
  margin: 16px 0 0;
  text-align: center;
  color: #fffaf6;
  font-size: 0.95rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}

#gift {
  width: 100%;
  height: 100dvh;
  max-width: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #fffaf6;
}

#gift::backdrop {
  background:
    linear-gradient(180deg, rgba(7, 16, 40, 0.12), rgba(7, 16, 40, 0.05) 42%, rgba(7, 16, 40, 0.28)),
    url("night.jpg?v=2") center center / cover no-repeat;
}

#gift.is-wheel::backdrop {
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("night.jpg?v=2") center center / cover no-repeat;
}

.lights {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.strand {
  position: absolute;
}

.strand-top,
.strand-bottom {
  left: 0;
  right: 0;
  height: 34px;
  background-image:
    linear-gradient(#23402c, #23402c),
    radial-gradient(circle at 12px 20px, #ffe1a8 0 2px, #e23b3b 3px 6px, rgba(226, 59, 59, 0.55) 7px 11px, transparent 12px),
    radial-gradient(circle at 12px 20px, #e7ffe8 0 2px, #1f8a48 3px 6px, rgba(31, 138, 72, 0.5) 7px 11px, transparent 12px),
    radial-gradient(circle at 12px 20px, #fff4c8 0 2px, #e2b33a 3px 6px, rgba(226, 179, 58, 0.5) 7px 11px, transparent 12px),
    radial-gradient(circle at 12px 20px, #fff 0 2px, #f7f1df 3px 6px, rgba(247, 241, 223, 0.45) 7px 11px, transparent 12px);
  background-size: 100% 2px, 80px 34px, 80px 34px, 80px 34px, 80px 34px;
  background-repeat: no-repeat, repeat-x, repeat-x, repeat-x, repeat-x;
  background-position: center 6px, 0 0, 20px 0, 40px 0, 60px 0;
}

.strand-top {
  top: 0;
  animation: twinkle 2.4s ease-in-out infinite;
}

.strand-bottom {
  bottom: 0;
  transform: scaleY(-1);
  animation: twinkle 2.8s ease-in-out infinite 0.4s;
}

.strand-left,
.strand-right {
  top: 0;
  bottom: 0;
  width: 34px;
  background-image:
    linear-gradient(#23402c, #23402c),
    radial-gradient(circle at 20px 12px, #ffe1a8 0 2px, #e23b3b 3px 6px, rgba(226, 59, 59, 0.55) 7px 11px, transparent 12px),
    radial-gradient(circle at 20px 12px, #e7ffe8 0 2px, #1f8a48 3px 6px, rgba(31, 138, 72, 0.5) 7px 11px, transparent 12px),
    radial-gradient(circle at 20px 12px, #fff4c8 0 2px, #e2b33a 3px 6px, rgba(226, 179, 58, 0.5) 7px 11px, transparent 12px),
    radial-gradient(circle at 20px 12px, #fff 0 2px, #f7f1df 3px 6px, rgba(247, 241, 223, 0.45) 7px 11px, transparent 12px);
  background-size: 2px 100%, 34px 80px, 34px 80px, 34px 80px, 34px 80px;
  background-repeat: no-repeat, repeat-y, repeat-y, repeat-y, repeat-y;
  background-position: 6px center, 0 0, 0 20px, 0 40px, 0 60px;
}

.strand-left {
  left: 0;
  animation: twinkle 2.6s ease-in-out infinite 0.2s;
}

.strand-right {
  right: 0;
  transform: scaleX(-1);
  animation: twinkle 3s ease-in-out infinite 0.6s;
}

.lights ~ .letter .letter-scroll {
  padding-top: calc(46px + env(safe-area-inset-top));
  padding-left: 40px;
  padding-right: 40px;
}

.lights ~ .letter .primary {
  margin-bottom: calc(42px + env(safe-area-inset-bottom));
}

@keyframes twinkle {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.62; }
}

#gift:focus {
  outline: none;
}

.letter {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  overflow: hidden;
  background: transparent;
  color: #fffaf6;
  border-radius: 0;
  box-shadow: none;
}

.letter-scroll {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: calc(28px + env(safe-area-inset-top)) 22px 12px;
}

.letter h2 {
  margin: 0;
  color: #fffaf6;
  font-size: clamp(2rem, 8vw, 2.6rem);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.letter-body {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 250, 246, 0.35);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.45;
  text-align: left;
  text-wrap: pretty;
  color: #fffaf6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.decorated-gift .letter-scroll {
  display: block;
  padding: clamp(60px, 10.1dvh, 102px) 22px 18px;
}

.text-brand,
.decorated-gift h2,
.text-bow,
.text-card {
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.text-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.text-emblem span {
  width: 39px;
  height: 1px;
  background: rgba(216, 180, 124, 0.65);
}

.text-tree {
  display: block;
  width: 24px;
  height: 28px;
  flex: none;
}

.text-kicker {
  margin: 7px 0 0;
  color: #d8b47c;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}

.decorated-gift h2 {
  margin: 19px auto 0;
  color: #f6edd4;
  font-size: clamp(2.7rem, 12vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: none;
}

.text-bow {
  display: block;
  width: min(48%, 200px);
  height: 24px;
  margin: 9px auto 0;
}

.text-card {
  position: relative;
  width: min(100%, 411px);
  margin: 20px auto 0;
  padding: 50px 34px 10px;
  border: 1px solid rgba(163, 186, 202, 0.46);
  border-radius: 22px;
  background: rgba(5, 21, 42, 0.18);
}

.text-flake {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 29px;
  height: 29px;
  transform: translateX(-50%);
}

.text-gift .letter-body {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
  font-size: clamp(1.15rem, 4.8vw, 1.42rem);
  line-height: 1.35;
  color: #f6edd4;
  text-shadow: none;
}

.choice-card {
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 22px;
}

.choice-card .gift-lead {
  margin: 0;
  color: #f6edd4;
  font-family: var(--serif);
  font-size: 1.3rem;
  text-shadow: none;
}

.choice-card .choices {
  margin-top: 16px;
}

.choice-card .choice {
  border-color: rgba(216, 180, 124, 0.55);
  background: rgba(5, 21, 42, 0.42);
  color: #f6edd4;
}

.choice-card .choice.is-chosen {
  border-color: #f6ad52;
  background: linear-gradient(180deg, #c72e2a, #970d0d);
}

.choice-proof {
  width: min(100%, 411px);
  margin: 18px auto 0;
  color: #f6edd4;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.text-close {
  position: relative;
  width: min(calc(100% - 64px), 356px) !important;
  min-height: 70px;
  margin: 14px auto calc(clamp(48px, 10.8dvh, 109px) + env(safe-area-inset-bottom)) !important;
  padding: 16px 54px 17px;
  border: 1.5px solid #f6ad52;
  background: linear-gradient(180deg, #c72e2a 0%, #ae1715 52%, #970d0d 100%);
  box-shadow:
    inset 0 2px 7px rgba(255, 255, 255, 0.34),
    0 0 12px rgba(255, 117, 36, 0.72),
    0 9px 22px rgba(0, 0, 0, 0.28);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.text-close span {
  position: absolute;
  right: 91px;
  top: 50%;
  transform: translateY(-54%);
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

.letter-body p {
  margin: 0 0 0.85em;
}

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

.gift-lead,
.proof {
  margin: 14px 0 0;
  text-align: center;
  color: #fffaf6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.wheel-stage {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 18px auto 10px;
  overflow: hidden;
}

.wheel-frame,
.wheel-rotor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.wheel-frame {
  z-index: 1;
  pointer-events: none;
}

.wheel-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.wheel-hit[data-spun="1"] {
  cursor: default;
}

.wheel-rotor {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
}

.hub {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, #f4efe4 0 7px, transparent 8px),
    radial-gradient(circle at 50% 18%, #f4efe4 0 5px, transparent 6px),
    radial-gradient(circle at 82% 38%, #f4efe4 0 5px, transparent 6px),
    radial-gradient(circle at 70% 78%, #f4efe4 0 5px, transparent 6px),
    radial-gradient(circle at 30% 78%, #f4efe4 0 5px, transparent 6px),
    radial-gradient(circle at 18% 38%, #f4efe4 0 5px, transparent 6px),
    #9d2c36;
  box-shadow: inset 0 0 0 3px #f3e7c3, 0 0 0 4px #c9922a;
}

.pointer {
  position: absolute;
  z-index: 4;
  top: 2px;
  left: 50%;
  width: 18px;
  height: 18px;
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
  background: #f3e7c3;
  box-shadow: 0 0 0 2px #9d2c36;
}

.prize-list {
  margin: 10px auto 0;
  padding: 0;
  width: min(100%, 320px);
  list-style: none;
  color: #fffaf6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.prize-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 10px;
}

.prize-list li.is-won {
  background: rgba(243, 231, 195, 0.22);
  box-shadow: 0 0 0 1px #f3e7c3, 0 0 22px rgba(201, 146, 42, 0.45);
  animation: win-pop 0.7s ease;
}

.prize-list li.is-won .swatch {
  animation: win-glow 1.1s ease;
}

.prize-list li.is-won::after {
  content: "✦";
  margin-left: auto;
  color: #f3e7c3;
  animation: win-star 0.8s ease;
}

@keyframes win-pop {
  0% { transform: scale(0.94); }
  45% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes win-glow {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@keyframes win-star {
  0% { opacity: 0; transform: translateY(6px) scale(0.4); }
  50% { opacity: 1; transform: translateY(-4px) scale(1.2); }
  100% { opacity: 1; transform: none; }
}

.swatch {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 250, 246, 0.7);
}

.gift-result {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.7rem;
  color: #fffaf6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.choice {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 250, 246, 0.45);
  background: rgba(255, 250, 246, 0.16);
  color: #fffaf6;
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
}

.choice-label {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.choice-detail {
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.35;
}

.choice.is-chosen {
  background: rgba(225, 75, 70, 0.88);
  border-color: transparent;
}

.choice:disabled {
  cursor: default;
}

.letter .primary {
  width: calc(100% - 32px);
  margin: 8px 16px calc(16px + env(safe-area-inset-bottom));
  flex: none;
}

.snake-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

.snake-header {
  position: relative;
  flex: none;
  padding: calc(16px + env(safe-area-inset-top)) 22px 10px;
  text-align: center;
}

.snake-close {
  position: absolute;
  z-index: 2;
  top: calc(10px + env(safe-area-inset-top));
  right: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #fffaf6;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.snake-header .gift-lead,
.snake-header .snake-status {
  margin: 4px 0 0;
}

.snake-prize-card {
  width: min(100%, 390px);
  margin: 10px auto 8px;
  padding: 13px 18px 14px;
  border: 1px solid rgba(163, 186, 202, 0.42);
  border-radius: 18px;
  background: rgba(2, 12, 28, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f6edd4;
  font-family: var(--serif);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.snake-prize-card span {
  display: block;
  color: #d8b47c;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.snake-prize-card p {
  margin: 4px 0 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.snake-status {
  min-height: 1.2em;
  text-align: center;
  color: #fffaf6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  white-space: pre-line;
}

.snake-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
}

.snake-board {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  border-radius: 0;
  background: rgba(6, 18, 14, 0.55);
}

.snake-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  color: #fffaf6;
  background: rgba(6, 14, 32, 0.72);
}

.snake-overlay[hidden] {
  display: none;
}

.snake-crash {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 2.8rem);
}

.snake-overlay-line {
  margin: 0;
  font-size: 1.15rem;
}

.snake-tries-left {
  margin: 0;
  color: #f6edd4;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
  white-space: pre-line;
}

.snake-overlay .snake-start {
  width: auto;
  min-width: 11rem;
  margin: 8px 0 0;
}

.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 12px 16px;
  border-top: 4px solid var(--red);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  color-scheme: light;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.save-error {
  margin: 0 0 12px;
  color: #ffb4ae;
  font-weight: 600;
  text-align: center;
}

.save-error:empty {
  display: none;
}

.noscript {
  width: min(100% - 32px, 440px);
  margin: 28px auto;
  padding: 22px;
  border-top: 0;
  border-radius: 18px;
  background: var(--cream);
  color: var(--ink);
}

.is-shaking {
  animation: shake 0.34s ease;
}

@keyframes shake {
  0%,
  100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#gift[open] .letter {
  animation: rise 0.28s ease;
}

@media (hover: hover) {
  .person:hover {
    background: rgba(199, 55, 50, 0.7);
  }

  .primary:not(.text-close):not(.open-calendar):hover {
    background: var(--red-deep);
  }

  .door:not(.is-locked):hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 360px) {
  .person {
    font-size: 1.5rem;
    padding: 14px 16px;
  }

  .door.span-3 .door-num {
    font-size: 2.5rem;
  }

  .door.span-4 .door-num {
    font-size: 3rem;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .paper,
  .site-footer {
    width: 100%;
  }

  .doors {
    grid-template-columns: repeat(6, 1fr);
  }
}

.overview {
  width: min(100%, 40rem);
  margin: 0 auto;
}

.overview-days {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overview-day {
  margin: 0;
  padding: 14px 16px 12px;
  border-radius: 18px;
  background: rgba(6, 14, 32, 0.78);
}

.overview-day h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5.4vw, 1.8rem);
  color: #fffaf6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.overview-empty,
.overview-name,
.overview-result {
  margin: 0;
}

.overview-empty {
  margin-top: 6px;
  color: rgba(255, 250, 246, 0.78);
}

.overview-people {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.overview-people li {
  padding-top: 8px;
}

.overview-people li + li {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 250, 246, 0.14);
}

.overview-name {
  font-weight: 600;
}

.overview-result {
  margin-top: 2px;
  color: #f6d98a;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .snow {
    display: none;
  }

  .is-shaking,
  #gift[open] .letter,
  .door,
  .toast,
  .prize-list li.is-won,
  .prize-list li.is-won .swatch,
  .prize-list li.is-won::after,
  .strand {
    animation: none;
    transition: none;
  }
}
