@font-face {
  font-family: "December Village Sans";
  src: url("assets/december-village-sans.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard Variable";
  src: url("assets/pretendard-variable-1.3.9.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --nav-height: 72px;
  --light: #fff6e6;
  --quiet: #e5e2ef;
  --gold: #ffe1a2;
  --trim: #d9ac71;
  --dark: #0a1220;
  --sans: "December Village Sans", "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--light);
  background: #090f1b;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-block: 76px calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px); }
body { margin: 0; min-width: 0; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid #ffdd91; outline-offset: 3px; }
:root[data-touch-input] body :is(button, a, select, summary, canvas, [tabindex]):focus { outline: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.symbol-library { width: 0; height: 0; position: absolute; pointer-events: none; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 8; left: 12px; top: 10px; padding: 12px; background: #172338; color: var(--gold); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.app {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100dvh;
  margin-inline: auto;
}
.game-world {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  background: #101a2d;
  pointer-events: none;
}
.game-world::before, .game-world::after {
  content: "";
  position: absolute;
  inset: 0;
  transition: opacity .28s ease;
}
.game-world::before {
  background:
    linear-gradient(180deg,#0c1325a3 1%,transparent 24%,transparent 71%,#060b18dd 100%),
    url("assets/christmas-salon.webp") center / 100% 100%;
}
.game-world::after { opacity: 0; }
.app[data-scene=today] .game-world::after {
  opacity: 1;
  background:
    linear-gradient(180deg,#061126c7 0%,transparent 25%,transparent 62%,#091023ea 94%),
    url("assets/winter-podium.webp") center / 100% 100%;
}
.app[data-scene=today] .game-world::before { opacity: 0; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(62px, 1fr) auto minmax(106px, 1fr);
  align-items: center;
  gap: 5px;
  min-height: calc(63px + env(safe-area-inset-top));
  padding: calc(6px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 5px max(12px, env(safe-area-inset-left));
  background: linear-gradient(#070d1ded, #070d1d63 61%, transparent 100%);
}
.game-score, .preview-toggle, .sound-toggle, .preview-date select {
  min-height: 44px;
  border: 1px solid #dbc0a474;
  border-radius: 14px;
  color: var(--light);
  background: linear-gradient(155deg,#303a51f2,#141d33ed 94%);
  box-shadow: inset 0 1px #fff0d333, 0 3px 8px #070b18bd;
}
.game-score {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 64px;
  padding: 5px 7px;
  white-space: nowrap;
  font-size: .9375rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #ffe8b1;
}
.game-score strong { font-weight: 880; }
.score-total { color: var(--quiet); font-size: .6875rem; font-weight: 650; }
.score-glint { display: grid; align-items: center; justify-items: center; width: 17px; height: 20px; color: #ffd97f; }
.score-glint svg { width: 14px; height: 14px; filter: drop-shadow(0 0 4px #f1b95066); }
.header-actions { grid-column: 3; justify-self: end; display: flex; gap: 5px; }
.preview-toggle { white-space: nowrap; padding: 4px 8px; font-size: .75rem; font-weight: 790; }
.preview-toggle[aria-pressed=true], .sound-toggle[aria-pressed=true] { color: #ffe5b5; background: #4b263b; }
.icon-button { display: grid; place-items: center; width: 44px; min-height: 44px; border: 1px solid #dbc0a474; border-radius: 50%; padding: 0; background: #202e46; color: #ffe5ae; }
.sound-toggle { border-radius: 13px; }
.sound-toggle .icon { width: 20px; height: 20px; }
.preview-controls { grid-column: 2; min-width: 0; }
.preview-date { position: relative; display: block; }
.preview-date select { width: auto; appearance: none; padding: 0 17px 0 7px; font-size: .75rem; font-weight: 780; cursor: pointer; }
.preview-date option { background: #1c263c; }
.preview-date .icon { position: absolute; right: 4px; top: 15px; width: 11px; height: 11px; color: var(--gold); pointer-events: none; }
.game-score:active, .preview-toggle:active, .icon-button:active { scale: .955; }
@media (max-width: 335px) {
  .preview-toggle { padding-inline: 5px; }
  .game-score { padding-inline: 5px; }
  .header-actions { gap: 4px; }
  .preview-date select { padding-inline: 5px 15px; }
}

.app:is([data-scene=calendar], [data-scene=collection]) .app-header {
  --hud-glass: linear-gradient(164deg, #392630b4, #231a2bb3);
  --hud-rim: #f7dabb52;
  grid-template-columns: minmax(0, 1fr) auto 44px 51px;
  gap: 0;
  min-height: calc(57px + env(safe-area-inset-top));
  background: linear-gradient(180deg, #20152387, #2015232e 59%, transparent);
}

.app:is([data-scene=calendar], [data-scene=collection]) .header-actions { display: contents; }

.app[data-scene=calendar] .game-score {
  grid-row: 1;
  gap: 4px;
  min-width: 0;
  padding-inline: 4px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 1px 3px #1d111c;
}

.app[data-scene=collection] .game-score { display: none; }

.app:is([data-scene=calendar], [data-scene=collection]) :is(.preview-controls, .preview-toggle, .sound-toggle) {
  grid-row: 1;
  border: 1px solid var(--hud-rim);
  border-radius: 999px;
  color: #fff2db;
  background: var(--hud-glass);
  box-shadow: inset 0 1px #fff1d018;
}

.app:is([data-scene=calendar], [data-scene=collection]) .preview-controls {
  grid-column: 2;
  justify-self: end;
  border-inline-end: 0;
  border-radius: 999px 0 0 999px;
}

.app:is([data-scene=calendar], [data-scene=collection]) .preview-date select {
  min-height: 44px;
  padding-inline: 12px 24px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: transparent;
  box-shadow: none;
  font-weight: 650;
}

.app:is([data-scene=calendar], [data-scene=collection]) .preview-date .icon {
  top: 50%;
  right: 8px;
  translate: 0 -50%;
}

.app:is([data-scene=calendar], [data-scene=collection]) .preview-toggle {
  grid-column: 3;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
}

.app:is([data-scene=calendar], [data-scene=collection]) #preview-toggle-label { display: none; }

.app:is([data-scene=calendar], [data-scene=collection]) .preview-toggle .preview-toggle-icon {
  grid-area: 1 / 1;
  display: block;
  width: 19px;
  height: 19px;
}

.app:is([data-scene=calendar], [data-scene=collection]) .preview-toggle[aria-pressed=true] {
  height: 46px;
  border-inline-start: 0;
  border-radius: 0 999px 999px 0;
  color: #ffdfab;
  background: linear-gradient(#ffdca649, #ffdca649) 1px center / 1px 14px no-repeat, var(--hud-glass);
}

.app:is([data-scene=calendar], [data-scene=collection]) .preview-toggle[aria-pressed=true] .preview-toggle-icon { visibility: hidden; }

.app:is([data-scene=calendar], [data-scene=collection]) .preview-toggle[aria-pressed=true]::before,
.app:is([data-scene=calendar], [data-scene=collection]) .preview-toggle[aria-pressed=true]::after {
  content: "";
  grid-area: 1 / 1;
  width: 14px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  rotate: 45deg;
}

.app:is([data-scene=calendar], [data-scene=collection]) .preview-toggle[aria-pressed=true]::after { rotate: -45deg; }

.app:is([data-scene=calendar], [data-scene=collection]) .sound-toggle {
  grid-column: 4;
  justify-self: end;
}

.app:is([data-scene=calendar], [data-scene=collection]) .sound-toggle[aria-pressed=true] { color: #ffdbab; }

.app-main {
  display: grid;
  align-content: start;
  min-height: calc(100dvh - 63px - env(safe-area-inset-top));
  padding: clamp(9px, 2.9dvh, 27px) max(13px, env(safe-area-inset-right)) calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px) max(13px, env(safe-area-inset-left));
}
.app-main:focus, .scene-heading h1:focus { outline: none; }
[data-screen] { min-width: 0; }
[data-screen]:not([hidden]) { animation: scene-in .26s cubic-bezier(.2,.74,.26,1) both; }
@keyframes scene-in { from { opacity: 0; transform: translateY(5px) scale(.99); } to { opacity: 1; transform: none; } }
.scene-heading { margin: 0 0 clamp(11px, 2dvh, 19px); text-align: center; }
.scene-heading h1 { margin: 0; color: var(--light); font-size: clamp(1.875rem, 8.2vw, 2.45rem); font-weight: 770; line-height: 1.15; letter-spacing: -.055em; text-wrap: balance; text-shadow: 0 2px #101123, 0 3px 16px #080f21; }
.scene-note { margin: 6px 0 0; color: var(--quiet); font-size: .875rem; font-weight: 640; line-height: 1.4; text-shadow: 0 1px 7px #080e20; word-break: keep-all; }
#screen-today .scene-heading { margin-bottom: 1px; }
#screen-today .scene-heading h1 { color: #ffe4ad; font-size: clamp(1.35rem, 6vw, 1.65rem); font-weight: 720; }
.app-status { position: fixed; z-index: 6; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px); left: 50%; translate: -50% 0; margin: 0; width: max-content; max-width: min(calc(100% - 32px), 356px); padding: 9px 14px; border: 1px solid #d2a96b90; border-radius: 12px; color: #ffebc5; background: #241b14f2; font-size: .875rem; line-height: 1.4; text-align: center; word-break: keep-all; pointer-events: none; box-shadow: 0 5px 15px #10100ac0; }

.calendar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.calendar-preview, .solid-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 46px;
  max-width: 100%;
  margin: 15px auto 0;
  padding: 7px 19px;
  border: 1px solid #9b6837;
  border-radius: 12px;
  background: linear-gradient(180deg,#ffde9b,#e0ac65);
  color: #35251c;
  font-size: .875rem;
  font-weight: 850;
  text-align: center;
  box-shadow: inset 0 1px #fff2c6c7, 0 3px 0 #6c472a, 0 9px 13px #0e090a70;
  transition: transform .16s, filter .16s;
}
.calendar-preview:active, .solid-link:active { transform: translateY(2px) scale(.98); filter: brightness(.96); }

.app[data-scene=collection] .game-world::before {
  background:
    linear-gradient(180deg, #1b142d32, #2516299b 36%, #1b0e21bd 100%),
    url("assets/calendar-workshop.webp") center / cover,
    #2f1d27;
}

.app[data-scene=collection] .app-main { padding-top: clamp(25px, 6dvh, 60px); }

#screen-collection {
  width: min(100%, 414px);
  margin-inline: auto;
}

#screen-collection .collection-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 2px 8px;
  text-align: start;
}

#screen-collection .collection-heading h1 {
  font-size: clamp(1.25rem, 5.7vw, 1.5rem);
  font-weight: 760;
  text-shadow: 0 2px 8px #160d19;
}

.collection-count {
  margin: 0;
  color: #f2d9b7;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px #160d19;
}

.collection-count strong {
  color: #fff0cf;
  font-size: 1.125rem;
  font-weight: 790;
}

.collection-progress { margin: 0 2px 13px; }

.collection-progress progress {
  display: block;
  width: 100%;
  height: 3px;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #ffdbab48;
}

.collection-progress progress::-webkit-progress-bar { background: transparent; }
.collection-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #c78855, #fce4ae); border-radius: 999px; }
.collection-progress progress::-moz-progress-bar { background: linear-gradient(90deg, #c78855, #fce4ae); border-radius: 999px; }

.collection-cabinet {
  --shelf-height: clamp(104px, 29vw, 126px);
  --shelf-back: radial-gradient(ellipse at 50% 4%, #774747, #482a3b 61%, #301c31 100%);
  padding: 8px;
  border: 1px solid #b68764;
  border-right-color: #875240;
  border-bottom-color: #875240;
  border-radius: 14px;
  background:
    linear-gradient(149deg, #b9744861, #732f42ae 58%, #482335c9),
    url("assets/cabinet-wood.webp") center / 360px auto,
    #633846;
  box-shadow: 0 4px #492632, 0 12px 24px #170d1bd4, inset 0 1px #f8d7a690, inset -2px -3px #2d132670;
}

.collection-empty,
.collection-grid {
  border: 1px solid #29162a;
  border-radius: 7px;
  box-shadow: inset 0 4px 14px #241326b3, 0 1px #f0c49663;
}

.collection-empty {
  position: relative;
  display: grid;
  min-height: clamp(185px, 48vw, 228px);
  justify-items: center;
  align-content: center;
  padding: 19px 12px 28px;
  text-align: center;
  background: radial-gradient(ellipse 64% 74% at 50% 9%, #e8ad776b, transparent 82%), var(--shelf-back);
}

.collection-empty::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 14px;
  background: linear-gradient(#dfab7b, #855044 20%, #603344 81%, #361b2c);
  pointer-events: none;
}

.collection-empty h2 {
  margin: 0;
  font-size: clamp(.9375rem, 4.2vw, 1.125rem);
  font-weight: 680;
  word-break: keep-all;
}

.collection-empty a {
  display: grid;
  min-width: 98px;
  min-height: 44px;
  margin-top: 9px;
  place-items: center;
  padding-inline: 13px;
  border: 1px solid #efc99277;
  border-radius: 999px;
  background: #2f1c2a87;
  color: #ffe4b3;
  font-size: .8125rem;
  font-weight: 690;
}

.collection-grid {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--shelf-height);
  background:
    linear-gradient(90deg, #1c102786, transparent 7% 93%, #1c102777),
    repeating-linear-gradient(180deg,
      transparent 0 calc(var(--shelf-height) - 9px),
      #e1ac80 calc(var(--shelf-height) - 9px) calc(var(--shelf-height) - 8px),
      #a16955 calc(var(--shelf-height) - 8px) calc(var(--shelf-height) - 5px),
      #6e3f4a calc(var(--shelf-height) - 5px) calc(var(--shelf-height) - 2px),
      #2d182d calc(var(--shelf-height) - 2px) var(--shelf-height)),
    var(--shelf-back) 0 0 / 100% var(--shelf-height);
}

.collection-item {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 1px;
  min-width: 0;
  min-height: 44px;
  padding: 5px 5px 13px;
  border: 0;
  background: radial-gradient(ellipse 51% 48% at 49% 43%, #dcaa791d, transparent 98%);
  color: #ffe8c6;
}

.collection-item:focus-visible { outline-offset: -2px; }

@media (min-width: 700px) {
  .app:is([data-scene=calendar], [data-scene=collection]) .app-header {
    padding-inline: clamp(20px, 2.3vw, 48px);
  }
  #screen-collection { width: min(860px, 85vw); }
  .app[data-scene=collection] .app-main { padding-top: clamp(16px, 3dvh, 36px); }
  .collection-cabinet { --shelf-height: clamp(98px, 15dvh, 138px); }
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
}
.collection-item:active .collection-art { scale: .94; }

.collection-art {
  display: block;
  width: min(90%, 94px);
  height: min(100%, 93px);
  object-fit: contain;
  filter: drop-shadow(0 5px 3px #1e111fcc);
  transition: scale .17s ease;
}

.collection-name {
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(.625rem, 2.95vw, .75rem);
  font-weight: 620;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px #29172c;
  white-space: nowrap;
}

@media (max-height: 680px) {
  .app-header { min-height: calc(57px + env(safe-area-inset-top)); }
  .app-main { padding-top: 8px; }
  .scene-heading { margin-bottom: 10px; }
  .calendar-preview { min-height: 44px; margin-top: 10px; }
}
.daily-card {
  --gift-duration: 1450ms;
  --lift-ease: cubic-bezier(.25,.72,.28,1);
  --stage-height: clamp(223px, 48dvh, 421px);
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  min-width: 0;
  padding: 13px 0 0;
  isolation: isolate;
  text-align: center;
}
.daily-date { display: block; margin: 0; border: 1px solid #ffdf9a51; border-radius: 50px; padding: 6px 13px; font-variant-numeric: tabular-nums; font-size: .8125rem; font-weight: 720; color: #ffdfab; background: #182238d9; }
.daily-stage { position: relative; width: min(100%, 490px); height: var(--stage-height); isolation: isolate; }
.stage-moonlight, .stage-shadow, .stage-flash { position: absolute; pointer-events: none; left: 50%; transform: translateX(-50%); border-radius: 50%; }
.stage-moonlight { z-index: -1; width: min(80%, 330px); height: 91%; bottom: 2%; background: radial-gradient(ellipse at 50% 64%, #ffdf9b32, transparent 67%); }
.stage-shadow { z-index: -1; width: min(56%, 232px); height: 14%; bottom: 2%; background: radial-gradient(ellipse, #10213aab, #281d2b53 43%, transparent 67%); }
.stage-flash { z-index: 0; opacity: 0; width: min(88%, 350px); height: 83%; bottom: 10%; background: radial-gradient(ellipse at 50% 62%, #fff2b6 0%, #ffd07573 18%, #e8b75e21 46%, transparent 67%); }
.daily-motion { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.daily-motion svg { overflow: visible; }

.daily-action, .stage-front {
  position: absolute;
  inset-inline-start: 50%;
  bottom: 5%;
  translate: -50% 0;
  width: min(80%, 294px);
  aspect-ratio: 1.18;
}
.daily-action {
  z-index: 2;
  display: block;
  isolation: isolate;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: inherit;
}
.daily-action:focus-visible, .daily-result-actions > :focus-visible { outline-color: #ffde96; }
.daily-action[aria-disabled=true] { cursor: default; }
.play-parcel { position: absolute; inset: 0; display: block; transform-origin: 50% 88%; scale: 1; transition: scale 150ms ease; }
.stage-front { display: none; z-index: 4; transform-origin: 50% 88%; pointer-events: none; }
.stage-front img { clip-path: inset(27% 0 0); }
.daily-card[data-mode=ready] .play-parcel { animation: parcel-drift 4s ease-in-out; }
@media (hover: hover) {
  .daily-card[data-mode=ready] .daily-action:hover .play-parcel { scale: 1.045; }
}
.daily-card[data-mode=ready] .daily-action:active .play-parcel { scale: .94; }
.play-box { position: absolute; bottom: 0; left: 5%; width: 90%; height: auto; }
.play-lid { position: absolute; z-index: 2; top: 20%; left: 2%; width: 96%; height: 37%; transform-origin: 56% 70%; }
.play-lid img { display: block; width: 100%; height: 100%; }
.play-ribbon, .play-lid::after {
  position: absolute;
  left: 40.5%;
  width: 19%;
  background: linear-gradient(90deg,#bd874c,#f8dea1 12%,#f7dfa3 42%,#e8be77 80%,#ac733e);
}
.play-ribbon { z-index: 1; top: 47%; bottom: 1.9%; border-radius: 2px 2px 5px 5px; transform-origin: 50% 6%; box-shadow: 1px 1px 4px #621b19a0; }
.play-lid::after { content: ""; inset: 4% auto 4% 40.5%; border-radius: 4px; box-shadow: 1px 0 4px #7642146d; }
.play-bow { position: absolute; z-index: 3; width: 68%; height: auto; left: 16%; top: -7%; transform-origin: 50% 62%; filter: drop-shadow(0 5px 6px #38150979); }
.daily-prize { position: absolute; z-index: 3; width: min(77%, 250px); aspect-ratio: 1; bottom: 3%; left: 50%; translate: -50% 0; opacity: 0; visibility: hidden; pointer-events: none; }
.daily-prize img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 12px #130f086e); }
.daily-card[data-final=true] .daily-prize { width: min(83%, 312px); aspect-ratio: 3 / 2; bottom: 5%; }
.daily-card[data-final=true] .daily-prize img { border-radius: 12px; border: 1px solid #e7bd6ea3; }
.daily-card[data-mode=received] .daily-prize { opacity: 1; visibility: visible; }

.daily-caption { position: relative; isolation: isolate; width: min(100%, 420px); min-height: 85px; padding: clamp(27px, 4.5dvh, 43px) 8px 0; align-self: start; }
.daily-caption::before { content: ""; position: absolute; z-index: -1; inset: -16px -5px -20px; background: radial-gradient(ellipse closest-side,#0a1022f2 16%,#0a1022b0 62%,transparent); pointer-events: none; }
.daily-title { margin: 0; color: #fff9e9; font-size: clamp(1.55rem, 4vw, 2.1rem); font-weight: 760; letter-spacing: -.047em; line-height: 1.2; word-break: keep-all; text-wrap: balance; }
.daily-title:focus { outline: none; }
.daily-note { margin: 7px auto 0; color: #f6eef4; max-width: 42ch; font-size: .9375rem; line-height: 1.44; word-break: keep-all; text-wrap: pretty; }
.daily-card[data-mode=ready] .daily-note { color: #f9dea6; font-weight: 800; }
.daily-result { display: flex; gap: 5px; align-items: center; justify-content: center; margin: 0 auto 5px; color: #f8d897; font-size: .8125rem; font-weight: 800; }
.daily-result .icon { width: 16px; height: 16px; }
.daily-result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.daily-result-actions > * { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 11px; color: #ffe3b4; background: #192640db; border: 1px solid #f5d89a71; border-radius: 10px; font-size: .875rem; font-weight: 750; }
.daily-result-actions > *:hover { background: #2b3551; }
.daily-result-actions > .reward-primary { color: #402232; background: linear-gradient(#ffe9c0,#e7bb85); border-color: #ffe1ac; box-shadow: inset 0 1px #fff9de, 0 3px 8px #050a17a6; }
.daily-result-actions > .reward-primary:hover { background: #ffe6b8; }
.daily-card[data-mode=opening] .play-parcel, .daily-card[data-mode=opening] .stage-front { animation: parcel-unwrap-base var(--gift-duration) var(--lift-ease) both; }
.daily-card[data-mode=opening] .stage-front { display: block; }
.daily-card[data-mode=opening] .stage-front img { animation: parcel-front-visibility var(--gift-duration) step-end both; }
.daily-card[data-mode=opening] .play-ribbon { animation: parcel-ribbon-release var(--gift-duration) var(--lift-ease) both; }
.daily-card[data-mode=opening] .play-lid { animation: parcel-lid-launch var(--gift-duration) var(--lift-ease) both; }
.daily-card[data-mode=opening] .play-lid::after { animation: parcel-ribbon-release var(--gift-duration) var(--lift-ease) both; }
.daily-card[data-mode=opening] .play-bow { animation: parcel-bow-release var(--gift-duration) var(--lift-ease) both; }
.daily-card[data-mode=opening] .stage-flash { animation: parcel-glow-burst var(--gift-duration) ease-out both; }
.daily-card[data-mode=opening] .daily-prize { visibility: visible; animation: parcel-prize-rise var(--gift-duration) var(--lift-ease) both; }

@keyframes parcel-drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes parcel-front-visibility { 0% { visibility: hidden; } 32%, 100% { visibility: visible; } }
@keyframes parcel-unwrap-base {
  0% { transform: none; }
  8% { transform: translateY(7px) scale(1.09,.9) rotate(-3deg); }
  17% { transform: translateY(-7px) scale(.96,1.05) rotate(2.2deg); }
  32% { transform: translateY(1px) scale(1.03,.98); }
  54% { transform: translateY(12px) scale(.99,.94); opacity: 1; }
  79%, 100% { transform: translateY(40px) scale(.72,.68); opacity: 0; }
}
@keyframes parcel-ribbon-release {
  0%, 12% { transform: none; opacity: 1; }
  28% { transform: translateY(-7px) scaleX(.82) scaleY(.64) rotate(8deg); opacity: 1; }
  44%, 100% { transform: translateY(-22px) scale(.3,.03) rotate(19deg); opacity: 0; }
}
@keyframes parcel-bow-release {
  0%, 12% { transform: none; opacity: 1; }
  24% { transform: translate(-12%, -12%) rotate(-13deg) scale(1.1,.9); opacity: 1; }
  40% { transform: translate(-56%, -38%) rotate(-51deg) scale(.7,.51); opacity: .88; }
  62%, 100% { transform: translate(-97%, -55%) rotate(-94deg) scale(.36); opacity: 0; }
}
@keyframes parcel-lid-launch {
  0%, 24% { transform: none; opacity: 1; }
  39% { transform: translate(27%, -79%) rotate(25deg) scale(.98,.8); opacity: 1; }
  58% { transform: translate(63%, -103%) rotate(57deg) scale(.78,.54); opacity: .92; }
  74%, 100% { transform: translate(82%, -100%) rotate(91deg) scale(.42,.3); opacity: 0; }
}
@keyframes parcel-glow-burst {
  0%, 22% { opacity: 0; scale: .52; }
  34% { opacity: .94; scale: .82; }
  49% { opacity: .66; scale: 1.14; }
  82%, 100% { opacity: 0; scale: 1.24; }
}
@keyframes parcel-prize-rise {
  0%, 31% { transform: translateY(61px) rotate(12deg) scale(.33); opacity: 0; }
  44% { transform: translateY(16px) rotate(8deg) scale(.66); opacity: .94; }
  62% { transform: translateY(-22px) rotate(-5deg) scale(1.13); opacity: 1; }
  76% { transform: translateY(4px) rotate(2deg) scale(.99); opacity: 1; }
  88% { transform: translateY(-4px) rotate(-1deg) scale(1.02); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

html:has(.gift-dialog[open]) { overflow: hidden; }
.gift-dialog { width: min(428px, calc(100% - 28px)); max-height: calc(100dvh - 30px); padding: 0; border: 1px solid #ba8a49a6; border-radius: 20px; background: #192239; color: #fff5db; overflow: auto; box-shadow: 0 26px 90px #050d226b; }
.gift-dialog[open] { animation: dialog-in .38s cubic-bezier(.2,.82,.2,1) both; }
.gift-dialog::backdrop { background: #14241cc4; backdrop-filter: blur(7px); animation: backdrop-in .28s ease both; }
.dialog-inner { padding: 25px 26px 24px; position: relative; overflow: hidden; text-align: center; background: radial-gradient(ellipse at 50% 36%, #dcb06228, transparent 64%); border-radius: inherit; }
.dialog-close { position: absolute; z-index: 3; top: 11px; right: 11px; color: inherit; background: #302a1dc9; border-color: #cca56675; }
.dialog-close .icon { width: 17px; height: 17px; }
.dialog-date { display: inline-flex; background: #edc87521; border: 1px solid #c99b5e7f; color: #f5d194; border-radius: 40px; padding: 5px 12px; font-size: .875rem; font-weight: 850; margin: 5px auto 0; }
.gift-stage { height: 226px; position: relative; isolation: isolate; display: grid; place-items: center; }
.dialog-art { grid-area: 1/1; width: 210px; height: 210px; max-height: 100%; object-fit: contain; opacity: 0; transform: scale(.47); z-index: 1; pointer-events: none; }
.dialog-art:not([src]), .gift-stage[data-mode=ready] .dialog-art { visibility: hidden; }
.gift-orbit { grid-area: 1/1; position: relative; border: 1px solid #a56c3d39; width: 162px; aspect-ratio: 1; border-radius: 50%; opacity: 0; z-index: -1; }
.gift-orbit::after { content: ""; position: absolute; inset: -8px; border: 1px dashed #a56c3d2b; border-radius: 50%; }
.motion-stage { position: absolute; inset: -14px -16px; z-index: 2; pointer-events: none; }
.motion-stage svg { overflow: visible; }
.dialog-copy { min-height: 112px; margin-top: 3px; }
.dialog-copy h2 { margin: 0; font-size: clamp(1.8rem, 7vw, 2.4rem); font-weight: 760; line-height: 1.16; letter-spacing: -.05em; text-wrap: balance; }
.dialog-copy p { max-width: 33ch; margin: 11px auto 13px; font-size: 1rem; line-height: 1.6; letter-spacing: -.02em; color: #f0e3c2; word-break: keep-all; text-wrap: pretty; }
.dialog-action { width: 100%; min-height: 53px; border: 1px solid #cf9b55; border-radius: 10px; color: #2c1f19; background: linear-gradient(#ffe1a4,#e0ae67); font-weight: 850; transition: transform .16s, background .16s; }
.dialog-action:hover { background: #ffe1a4; }
.dialog-action:active { transform: scale(.98); }
.dialog-action[aria-disabled=true] { cursor: default; opacity: .65; }
.parcel { width: 150px; height: 136px; position: absolute; left: calc(50% - 75px); top: calc(50% - 59px); transform-origin: 50% 95%; }
.parcel-body, .parcel-lid { position: absolute; z-index: 1; background: linear-gradient(110deg, #df5751, #ad3838 69%, #7b222a); box-shadow: inset 0 1px 1px #ffc29d95, inset 0 -8px 13px #85222c55, 0 5px 10px #551c2930; }
.parcel-body { inset: 35px 6px 5px; border-radius: 8px 8px 17px 17px; }
.parcel-body::after, .parcel-lid::after { content: ""; position: absolute; inset: 0 auto 0 41%; width: 18%; background: linear-gradient(90deg, #bd8749, #f4d391 19%, #ffebbe 53%, #dcae6a 92%, #a26035); }
.parcel-lid { z-index: 2; inset: 19px 0 auto; height: 33px; border-radius: 9px 9px 7px 7px; transform-origin: 70% 88%; background: linear-gradient(145deg, #eb6b62, #b83737 65%, #822b30); }
.bow { position: absolute; height: 30px; width: 53px; bottom: 31px; z-index: 2; border: 8px solid #f5d49a; box-shadow: inset 0 0 8px #bb803c, 0 1px 2px #74352870; background: linear-gradient(#f2c48535, #a4703566); }
.bow-left { left: 28px; transform: rotate(25deg); border-radius: 62% 56% 20% 48%; }
.bow-right { right: 28px; transform: rotate(-28deg); border-radius: 53% 55% 58% 20%; }
.bow-knot { position: absolute; bottom: 28px; left: 43%; width: 14%; height: 17px; z-index: 3; border-radius: 8px; background: linear-gradient(110deg,#faf1ba,#d99a55); box-shadow: 0 2px 4px #69321d66; }
.parcel-shadow { position: absolute; inset: auto -7px -5px; height: 16px; border-radius: 50%; background: #59392836; filter: blur(7px); }
.parcel-glow { position: absolute; width: 176px; height: 140px; bottom: 4px; left: -13px; border-radius: 50%; background: #f3ba64; filter: blur(38px); opacity: .25; }
.gift-stage[data-mode=ready] .parcel { animation: parcel-arrive .65s cubic-bezier(.2,.85,.35,1.25) both; }
.gift-stage[data-mode=locked] .parcel { opacity: .7; filter: saturate(.63); }
.gift-stage[data-mode=animating] .parcel { animation: parcel-open .87s cubic-bezier(.35,0,.35,1) both; }
.gift-stage[data-mode=animating] .parcel-lid { animation: lid-open .87s cubic-bezier(.25,.04,.42,1) both; }
.gift-stage[data-mode=animating] .parcel-glow { animation: glow-open .87s ease-out both; }
.gift-stage[data-mode=animating] .dialog-art { animation: gift-pop .67s .31s cubic-bezier(.28,.75,.28,1) both; }
.gift-stage[data-mode=animating] .gift-orbit { animation: orbit-in .7s .28s ease-out both; }
.gift-stage[data-mode=revealed] .parcel { display: none; }
.gift-stage[data-mode=revealed] .dialog-art { opacity: 1; transform: none; }
.gift-stage[data-mode=revealed] .gift-orbit { opacity: 1; }
.gift-dialog[data-final=true] { background: #15382b; color: #fff7df; border-color: #d7b27183; }
.gift-dialog[data-final=true] .dialog-inner { background: radial-gradient(ellipse at 50% 39%, #36624c, #14372a 60%); }
.gift-dialog[data-final=true] .dialog-date, .gift-dialog[data-final=true] .dialog-close { color: #fae4b6; background: #f4d6a017; border-color: #f4d6a058; }
.gift-dialog[data-final=true] .dialog-copy p { color: #edf0dd; }
.gift-dialog[data-final=true] .dialog-action { color: #242b20; background: #f1d39a; }
.gift-dialog[data-final=true] .dialog-art { width: min(100%, 304px); height: auto; aspect-ratio: 3 / 2; border: 1px solid #e4bc735e; border-radius: 10px; box-shadow: 0 10px 23px #091f145c; }
.gift-dialog[data-final=true] .gift-orbit { border-color: #eac47776; }
.gift-dialog[data-final=true] .gift-orbit::after { border-color: #eac47742; }
.card-download { display: grid; place-items: center; min-height: 44px; margin-top: 5px; color: #f4d89d; text-decoration: underline; text-underline-offset: .18em; font-size: .9375rem; font-weight: 700; }

@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes parcel-arrive { from { opacity: 0; transform: translateY(16px) scale(.82) rotate(-7deg); } to { opacity: 1; transform: none; } }
@keyframes parcel-open { 0% { transform: none; } 18% { transform: translateY(4px) scale(1.08,.86) rotate(-4deg); } 38% { transform: translateY(-12px) scale(.96,1.08) rotate(3deg); opacity: 1; } 72%, 100% { transform: translateY(31px) scale(.79); opacity: 0; } }
@keyframes lid-open { 0%, 24% { transform: none; } 64%, 100% { transform: translate(-76px,-105px) rotate(-57deg) scale(.8); } }
@keyframes glow-open { 0%, 20%, 100% { opacity: .2; } 48% { opacity: .9; } }
@keyframes gift-pop { 0% { opacity: 0; transform: translateY(24px) scale(.36) rotate(8deg); } 58% { opacity: 1; transform: translateY(-10px) scale(1.07) rotate(-3deg); } 100% { opacity: 1; transform: none; } }
@keyframes orbit-in { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }

@media (max-height: 620px) {
  .gift-stage { height: 184px; }
  .dialog-inner { padding-top: 18px; padding-bottom: 17px; }
  .dialog-copy { min-height: 96px; }
  .dialog-art { width: 176px; height: 176px; }
  .gift-dialog[data-final=true] .dialog-art { width: min(100%, 250px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 520px) {
  .gift-stage { height: min(208px, 36dvh); }
  .dialog-inner { padding-inline: 20px; }
}
