@font-face {
  font-family: Onest;
  src: url('assets/onest-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Onest;
  src: url('assets/onest-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #122820;
  --stage: #174332;
  --surface: #183429;
  --paper: #fbf9f1;
  --muted: #b6c8bd;
  --line: #ffffff18;
  --glass: rgba(23, 49, 39, .60);
  --glass-edge: rgba(255, 255, 255, .18);
  --glass-hi: inset 1px 1px 0 rgba(255, 255, 255, .24), inset -1px -1px 0 rgba(255, 255, 255, .05);
  --glass-shadow: 0 6px 24px #020f0a50;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --wrap: 850px;
  --gutter: 22px;
  --pill: 999px;
  font: 16px/1.4 Onest, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--paper);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button { border: 0; padding: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid #fff7d8; outline-offset: 3px; }
button:disabled { opacity: .43; cursor: default; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 760; line-height: 1.04; letter-spacing: -.055em; }
.icon { display: inline-block; width: 21px; height: 21px; flex: 0 0 auto; object-fit: contain; vertical-align: -.26em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.event { position: fixed; inset: 0; background: var(--bg); }
.content { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #345548 transparent; }
.topbar { position: absolute; inset: 0 0 auto; z-index: 4; pointer-events: none; }
.top-inner { max-width: 1090px; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: calc(15px + var(--safe-top)) var(--gutter) 8px; }

.balance, .icon-button, .bottom-inner {
  background: var(--glass);
  border: .5px solid var(--glass-edge);
  box-shadow: var(--glass-hi), var(--glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
}
.balance, .icon-button {
  min-height: 43px;
  border-radius: var(--pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.balance, .icon-button { pointer-events: auto; transition: background-color .18s, transform .18s; }
.balance { gap: 6px; min-width: 60px; padding: 0 12px; justify-self: start; }
.balance .icon { color: #ffe2a1; width: 18px; height: 18px; }
.balance strong { font-weight: 780; font-variant-numeric: tabular-nums; }
.icon-button { width: 43px; }
.icon-button .icon { width: 16px; height: 16px; }
.icon-button:hover, .balance:hover { background: #315646b8; }
.icon-button:active, .balance:active, .tab:active, .primary:active:not(:disabled) { transform: scale(.96); }
.edge { justify-self: end; }
.countdown {
  align-self: center;
  justify-self: center;
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 12px;
  font-weight: 530;
  color: #e5e9d9;
  white-space: nowrap;
  text-shadow: 0 1px 3px #0b1e17, 0 1px 10px #0b1e17;
}
.countdown strong { color: white; font-weight: 750; font-variant-numeric: tabular-nums; }

#home {
  padding-bottom: calc(105px + var(--safe-bottom));
  background: repeating-linear-gradient(135deg, #f0e5c107 0 1px, transparent 1px 15px);
}
.hero {
  --thaw: 0;
  --frozen: 1;
  --melting: 1;
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  padding: calc(56px + var(--safe-top)) 0 13px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 58% 65%, #318460 0%, transparent 55%),
    linear-gradient(135deg, #133326, var(--stage) 63%, #102c23);
}
.hero::before {
  content: '';
  pointer-events: none;
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: .58;
  background:
    radial-gradient(ellipse at center, #f5e1ba50 0 1px, transparent 1.6px) 0 0 / 22px 22px,
    repeating-linear-gradient(45deg, transparent 0 29px, #f6e9cb17 30px 31px, transparent 32px 44px),
    repeating-linear-gradient(135deg, transparent 0 29px, #f6e9cb17 30px 31px, transparent 32px 44px);
  mask-image: linear-gradient(black 0%, black 73%, transparent 100%);
}
.hero::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 45px;
  background: linear-gradient(0deg, var(--bg), transparent);
  pointer-events: none;
}
.event-brand { display: inline-block; width: 89px; height: auto; }
.hero-title {
  position: relative;
  z-index: 3;
  margin: 4px 13px 0;
  color: #fff8e6;
  text-align: center;
  font-size: clamp(34px, 6vw, 69px);
  font-weight: 850;
  line-height: .95;
  letter-spacing: -.065em;
  text-shadow: 0 5px 26px #0a231880;
}
.hero-title:focus { outline: none; }
.tree-scene {
  position: relative;
  z-index: 2;
  isolation: isolate;
  width: clamp(340px, 36vw, 410px);
  aspect-ratio: 4 / 5;
}
.tree-scene::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: auto 1% 0%;
  height: 11%;
  background: #071e18a8;
  border-radius: 50%;
  filter: blur(13px);
}
.tree-props { position: absolute; z-index: 5; inset: 0; pointer-events: none; }
.tree-art { position: absolute; z-index: 2; inset: 0; background-repeat: no-repeat; background-position: center; background-size: 100% 100%; transition: opacity .9s ease; }
.tree-art.frozen { z-index: 3; background-image: url('assets/tree-ice-v3.webp'); opacity: var(--frozen); }
.tree-art.melting { background-image: url('assets/tree-melting-v3.webp'); opacity: var(--melting); }
.tree-art.warm, .tree-art.local { background-image: url('assets/tree-warm-v3.webp'); }
.tree-art.warm { z-index: 1; }
.tree-art.local { z-index: 3; pointer-events: none; }
.local-phone { mask-image: radial-gradient(ellipse 14% 12% at 50% 85%, black 48%, transparent); opacity: var(--phone-thaw, 0); }
.local-camera { mask-image: radial-gradient(ellipse 14% 12% at 30% 85%, black 48%, transparent); opacity: var(--camera-thaw, 0); }
.local-cash { mask-image: radial-gradient(ellipse 14% 12% at 69% 85%, black 48%, transparent); opacity: var(--cash-thaw, 0); }
.hero.flash .tree-scene { animation: tree-on 1.1s ease-out; }
@keyframes tree-on { 40% { filter: brightness(1.2) saturate(1.15); } }
.duck {
  position: absolute;
  z-index: 0;
  width: 31%;
  right: calc(-11% + 22% * var(--thaw));
  top: 46%;
  transform: scaleX(-1) rotate(-10deg);
  filter: drop-shadow(0 4px 4px #091e1260);
}
.tree-ornaments { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.tribute-topper, .creator-ornament {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.tribute-topper {
  display: grid;
  place-items: center;
  top: 13.8%;
  left: 50.6%;
  width: 14%;
  aspect-ratio: 1;
  border: 2px solid #edbd62;
  background: radial-gradient(circle at 34% 28%, #356a5a, #18392d 78%);
  box-shadow: inset 0 0 0 2px #ffe0933f, 0 0 12px #ffc8676c;
}
.tribute-topper > img {
  width: 75%;
  height: 75%;
  filter: drop-shadow(0 1px 1px #b07120);
}
.creator-ornament {
  z-index: 1;
  width: 7.7%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid #efb76f;
  box-shadow: inset 0 0 0 2px #c34e33, 0 2px 7px #102721d6;
  filter: saturate(calc(1 - .2 * var(--frozen)));
}
.ornament-one { top: 27.4%; left: 56.9%; }
.ornament-two { top: 45.9%; left: 48.3%; }
.ornament-three { top: 67.9%; left: 70%; }
.parcel-tag {
  position: absolute;
  top: 85.5%;
  pointer-events: auto;
  white-space: nowrap;
  padding: 4px 7px 4px 11px;
  border-radius: 4px;
  background: #fff4df;
  color: #43251e;
  box-shadow: 0 2px 7px #1020357f;
  font-size: 10px;
  font-weight: 780;
}
.parcel-tag::before { content: ''; position: absolute; top: 50%; left: 5px; width: 3px; height: 3px; border-radius: 50%; background: #9a7764; transform: translateY(-50%); }
.parcel-tag:hover, .parcel-tag.thawed { background: #ffdd87; box-shadow: 0 2px 12px #ffcf77af; }
.tag-phone { left: 50%; transform: translateX(-49%) rotate(7deg); }
.tag-camera { left: 30%; transform: translateX(-52%) rotate(-8deg); }
.tag-cash { left: 69%; transform: translateX(-42%) rotate(4deg); }

.advent-banner, .prizes { width: calc(100% - 2 * var(--gutter)); max-width: var(--wrap); margin-inline: auto; }
.advent-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 109px;
  margin-block: 0 24px;
  padding: 12px 24px;
  text-align: left;
  border-radius: 25px;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, #ffd4b70c 10px 13px, transparent 13px 18px),
    #ab273c;
  color: #fff9e8;
  box-shadow: 0 8px 20px #0a17134d;
  transition: background-color .17s;
}
.advent-banner::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(58%, 340px);
  height: 250%;
  right: 0;
  top: -68%;
  transform: rotate(27deg);
  background: repeating-linear-gradient(90deg, #efd7ab 0 12px, #fff0c8 12px 14px, #f9e6b9 14px 30px);
}
.advent-banner:hover { background-color: #c33547; }
.banner-copy { position: relative; z-index: 2; display: grid; gap: 7px; }
.banner-copy strong { font-size: clamp(29px, 5.4vw, 44px); line-height: .96; letter-spacing: -.065em; font-weight: 830; }
.advent-cta { display: inline-flex; align-items: center; width: fit-content; gap: 7px; padding: 4px 9px; border-radius: var(--pill); color: #782034; background: #fff0ca; font-size: 12px; font-weight: 760; white-space: nowrap; }
.advent-cta .icon { width: 12px; height: 12px; filter: brightness(.42) sepia(.3); }
.advent-art { position: absolute; z-index: 1; object-fit: contain; width: 33%; height: 94%; right: 5%; bottom: 2%; filter: drop-shadow(0 6px 6px #6d192d44); transform: rotate(-5deg); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(24px, 4.8vw, 36px); }
.text-button { color: #c4d9cd; padding: 6px 0; font-size: 13px; font-weight: 660; white-space: nowrap; }
.text-button:hover { color: white; }
.prize-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prize {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 7px 7px;
  border-radius: 25px;
  color: #2f201f;
  background: var(--card, #f5e2df);
}
.prize-phone { --card: #ffeee3; --card-face: #efac8c; --ribbon: #ca2942; --ribbon-shade: #a72038; --ribbon-bright: #f66876; --button: #f5c6bd; --button-hover: #eeb1a8; }
.prize-camera { --card: #e9f2d9; --card-face: #98c98e; --ribbon: #226844; --ribbon-shade: #215638; --ribbon-bright: #57a97a; --button: #cfe3b7; --button-hover: #bdd89f; }
.prize-cash { --card: #fff0c9; --card-face: #efc860; --ribbon: #bc3e4c; --ribbon-shade: #982e3e; --ribbon-bright: #f47b81; --button: #efd990; --button-hover: #ebcd70; }
.gift-picture {
  position: relative;
  isolation: isolate;
  display: block;
  width: calc(100% + 14px);
  margin-inline: -7px;
  aspect-ratio: 1.29;
  border-radius: 25px 25px 12px 12px;
  overflow: hidden;
  background: var(--card-face);
}
.gift-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 51%, #fff8da86, transparent 71%),
    radial-gradient(circle at 50% 50%, #fff9e45c 0 1px, transparent 1.5px) 0 0 / 17px 17px,
    repeating-linear-gradient(135deg, #fff6dc12 0 1px, transparent 1px 11px);
}
.gift-ribbon { position: absolute; inset: 0; pointer-events: none; }
.gift-ribbon::before, .gift-ribbon::after { content: ''; position: absolute; background: var(--ribbon); }
.gift-ribbon::before {
  inset: 15% 0 auto;
  height: 9%;
  background: linear-gradient(180deg, var(--ribbon-bright), var(--ribbon) 27%, var(--ribbon) 78%, var(--ribbon-shade));
  box-shadow: 0 2px 4px #311f242c;
}
.gift-ribbon::after {
  inset: 0 12.5% 0 auto;
  width: 8%;
  background: linear-gradient(90deg, var(--ribbon-shade), var(--ribbon-bright) 13%, var(--ribbon) 33%, var(--ribbon) 83%, var(--ribbon-shade));
  box-shadow: 2px 0 4px #311f242c;
}
.gift-bow {
  position: absolute;
  z-index: 2;
  right: 5%;
  top: 14%;
  width: 23%;
  height: 12%;
  filter: drop-shadow(0 2px 1px #48192340);
  pointer-events: none;
}
.gift-bow::before, .gift-bow::after {
  content: '';
  position: absolute;
  width: 49%;
  height: 81%;
  background: radial-gradient(ellipse at 30% 32%, var(--ribbon-shade) 28%, var(--ribbon-bright) 67%, var(--ribbon) 82%);
}
.gift-bow::before { left: 1%; border-radius: 80% 65% 30% 75%; transform: rotate(21deg); }
.gift-bow::after { right: 1%; border-radius: 65% 80% 75% 30%; transform: rotate(-24deg); }
.gift-bow i {
  position: absolute;
  z-index: 1;
  top: 41%;
  left: 41%;
  width: 18%;
  height: 47%;
  border-radius: 28%;
  background: linear-gradient(120deg, var(--ribbon-bright), var(--ribbon) 45%, var(--ribbon-shade));
}
.gift-bow i::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 75% -48% -120%;
  background: var(--ribbon);
  clip-path: polygon(25% 0, 75% 0, 100% 100%, 74% 79%, 65% 100%, 50% 29%, 33% 100%, 25% 79%, 0 100%);
}
.product-photo {
  position: absolute;
  top: 54%;
  left: 45%;
  max-width: 72%;
  height: 76%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 7px #2c161a52);
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.prize-phone .product-photo { transform: translate(-50%, -50%) rotate(-9deg); }
.prize-camera .product-photo { transform: translate(-50%, -50%) rotate(12deg); }
.gift-picture:hover .product-photo { scale: 1.025; }
.cash-stack {
  position: relative;
  width: 60%;
  margin: 9% 10% 0 0;
  aspect-ratio: 2.33;
}
.cash-stack .product-photo, .cash-stack::before, .cash-stack::after {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  border-radius: 4px;
}
.cash-stack .product-photo { transform: rotate(-9deg); }
.cash-stack::before, .cash-stack::after { content: ''; background: url('assets/prize-cash.webp') center / cover; }
.cash-stack::before { transform: translate(-5%, -18%) rotate(-20deg); }
.cash-stack::after { transform: translate(5%, 16%) rotate(2deg); z-index: -1; }
.gift-picture::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #bcefff37;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 45% 50%, transparent 61%, black 100%);
  transition: opacity .45s ease;
}
.is-thawed .gift-picture::after { opacity: 0; }
.is-thawed .gift-picture { box-shadow: inset 0 -2px #d68421; }
.ticket-badge { position: absolute; z-index: 3; top: 7px; left: 7px; display: flex; gap: 4px; align-items: center; border-radius: var(--pill); padding: 4px 9px 4px 7px; background: #154d36; color: #f5ffef; font-size: 11px; font-weight: 740; white-space: nowrap; }
.ticket-badge .icon { width: 15px; height: 15px; }
.prize-info { min-width: 0; padding: 10px 5px 8px; }
.prize-name { display: block; font-size: 15px; font-weight: 780; line-height: 1.2; text-align: left; }
.prize-info p { margin-top: 3px; font-size: 12px; color: #514943; }
.prize-button { min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: var(--pill); padding: 5px; background: var(--button); font-size: 13px; font-weight: 730; color: #342b26; }
.prize-button:hover { background: var(--button-hover); }
.prize-button.ready { color: #fff; background: var(--ribbon-shade); }
.prize-button.ready:hover { background: var(--ribbon); }
.prize-button .icon, .primary .icon { width: 16px; height: 16px; }

.bottom { position: absolute; z-index: 5; inset: auto 0 calc(10px + var(--safe-bottom)); display: flex; justify-content: center; pointer-events: none; }
.bottom-inner { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; width: min(100% - 36px, 244px); border-radius: var(--pill); pointer-events: auto; }
.tab { min-width: 0; min-height: 48px; border-radius: var(--pill); display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 650; transition: background-color .18s, color .18s, transform .18s; }
.tab .icon { width: 25px; height: 25px; filter: saturate(.6); }
.tab.selected .icon { filter: none; }
.tab.selected { color: #fff; background: rgba(230, 255, 238, .18); box-shadow: inset 0 1px 1px #ffffff31; }
.tab:hover { background: rgba(230, 255, 238, .24); }
.notice { position: absolute; z-index: 6; max-width: min(calc(100% - 26px), 500px); left: 50%; bottom: calc(77px + var(--safe-bottom)); transform: translateX(-50%); width: max-content; border-radius: var(--pill); box-shadow: 0 7px 26px #01110882; background: #e8f4ec; color: #16382a; }
.notice > * { display: flex; align-items: center; gap: 8px; padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 730; }

.quests { max-width: 714px; padding: calc(88px + var(--safe-top)) var(--gutter) calc(100px + var(--safe-bottom)); margin: 0 auto; }
.quest-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 18px 23px;
  min-height: 113px;
  margin-bottom: 13px;
  border-radius: 26px;
  color: #fff8e6;
  background: repeating-linear-gradient(135deg, #fff2d110 0 1px, transparent 1px 11px), #973247;
}
.quest-intro h1 { font-size: clamp(36px, 7vw, 49px); }
.quest-intro h1:focus { outline: none; }
.quest-intro p { color: #ffdfcd; margin-top: 5px; font-size: 14px; }
.quest-intro > .icon { width: 91px; height: 91px; margin-block: -19px; margin-right: 6%; transform: rotate(13deg); filter: drop-shadow(0 5px 6px #5e233d65); }
.quest-hint { width: 100%; color: #253b30; background: #f6e0a4; border-radius: 20px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 11px; text-align: left; }
.quest-hint > .icon { width: 34px; height: 34px; }
.quest-hint > .art-arrow { width: 17px; height: 17px; filter: brightness(.35); }
.quest-hint div { display: grid; flex: 1; }
.quest-hint span { font-size: 12px; }
.quest-hint strong .icon { width: 16px; height: 16px; }
.quest-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quest-actions button { min-height: 50px; border-radius: 18px; background: #e6b9cf; color: #4e2644; padding: 7px 11px; display: flex; align-items: center; gap: 6px; text-align: left; font-size: 13px; font-weight: 750; }
.quest-actions button + button { background: #f1d07d; color: #593416; }
.quest-actions button span { flex: 1; }
.quest-actions button .icon { width: 28px; height: 28px; }
.quest-actions button .art-arrow { width: 13px; height: 13px; filter: brightness(.4); }
.quest-actions button:hover { filter: brightness(1.08); }
.quest-sections { display: grid; gap: 17px; margin-top: 19px; }
.quest-section { scroll-margin-top: calc(68px + var(--safe-top)); }
.quest-section h2 { margin-bottom: 8px; font-size: 17px; letter-spacing: -.025em; line-height: 1.2; }
.quest-section h2:focus { outline: none; }
.quest-list { display: grid; gap: 8px; }
.quest-row { --task-face: #f8e4cf; --task-art: #ffd2b8; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; min-height: 61px; padding: 8px 10px; background: var(--task-face); color: #392b28; border-radius: 19px; text-align: left; }
.quest-stats { --task-face: #e8f0c9; --task-art: #cee5a3; }
.quest-post { --task-face: #f5d9e0; --task-art: #edbfc8; }
.quest-support { --task-face: #d6ecee; --task-art: #afd9df; }
.quest-row:hover { filter: brightness(1.045); }
.quest-icon { width: 42px; height: 42px; background: var(--task-art); border-radius: 15px; display: grid; place-items: center; }
.quest-icon .icon { width: 32px; height: 32px; }
.quest-row strong, .quest-row small { display: block; }
.quest-row strong { font-size: 14px; font-weight: 750; }
.quest-row small { font-size: 11px; color: #62493d; }
.reward { white-space: nowrap; color: #593525; font-size: 13px; font-weight: 760; padding-right: 2px; }
.reward .icon { width: 21px; height: 21px; }

dialog { margin: auto; width: min(100% - 24px, 482px); max-height: min(91dvh, 800px); border: .5px solid var(--glass-edge); border-radius: 29px; padding: 0; background: #1a382c; color: var(--paper); overscroll-behavior: contain; scrollbar-color: #526e60 transparent; box-shadow: var(--glass-hi), 0 14px 60px #020c0877; }
dialog::backdrop { background: #030d08a5; backdrop-filter: blur(5px) saturate(120%); }
.dialog-shell { position: relative; min-height: 100%; }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; min-height: 38px; background: #142b21b5; }
.dialog-content { padding: 21px; }
.dialog-content h2, .advent-page h2 { font-size: clamp(28px, 7vw, 40px); }
#dialog-title:focus { outline: none; }
.dialog-content h3 { margin: 15px 0 8px; font-size: 15px; }
.dialog-content p { color: #d1e1d6; margin: 8px 0 11px; font-size: 14px; }
.dialog-emblem { width: 49px; height: 49px; margin-bottom: 11px; border-radius: 50%; color: #e9f7eb; background: #38584a; display: grid; place-items: center; }
.dialog-emblem .icon { width: 34px; height: 34px; }
.info-panel { display: block; padding: 9px 12px; margin: 11px 0; border-radius: 15px; background: #2b4d3f; color: #f2f5ea; font-size: 14px; }
.info-panel strong, .info-panel span { display: block; }
.info-panel span { color: #cbddd1; font-size: 13px; margin-top: 2px; }
.dialog-links { display: grid; gap: 5px; }
.dialog-links button { min-height: 42px; padding: 6px 10px; border-radius: var(--pill); background: #254638; text-align: left; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dialog-links button .icon { color: #cfeadc; width: 17px; height: 17px; }
.dialog-links button .icon:last-child { margin-left: auto; }
.dialog-links button:hover, .quantity button:hover:not(:disabled) { background: #416754; }
.primary { background: #f6f4e8; color: #123326; border-radius: var(--pill); font-weight: 790; padding: 9px 14px; min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; transition: background-color .18s, transform .18s; }
.primary:hover:not(:disabled) { background: white; }
.primary.full { width: 100%; }
.detail-art { position: relative; isolation: isolate; height: clamp(184px, 33dvh, 272px); background: var(--card-face); }
.detail-art .product-photo { left: 47%; }
.detail-art .gift-bow { width: 19%; right: 7%; }
.detail-art .cash-stack { width: min(57%, 244px); margin-top: 3%; }
.detail-art .cash-stack .product-photo { left: 0; }
.detail-content { padding-top: 16px; }
.detail-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; color: #d0e8d9; font-size: 12px; font-weight: 680; }
.detail-meta span { border-radius: var(--pill); padding: 4px 8px; background: #2a493c; }
.detail-content .image-note { font-size: 11px; color: var(--muted); }
.detail-tickets { color: #e4f5e7; margin: 9px 0; font-weight: 720; }
.detail-tickets .icon { margin-right: 3px; }
.quantity { display: flex; align-items: center; justify-content: space-between; border-radius: var(--pill); padding: 3px; margin: 11px 0 8px; background: #28483b; font-size: 14px; font-weight: 750; }
.quantity button { width: 38px; font-size: 21px; border-radius: 50%; min-height: 38px; background: #3b5c4c; color: #f2fff0; }
.detail-title { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 10px; }
.detail-title .text-button { color: #ffe5af; padding: 4px 0 4px 3px; }
.rule-list p { padding-block: 6px; border-bottom: 1px solid var(--line); }
.rule-list p:last-child { border-bottom: 0; }
.rule-list strong { color: var(--paper); }

.advent-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 32% 10%, #bb5c5f 0, transparent 52%),
    radial-gradient(ellipse at 83% 83%, #943750 0, transparent 58%),
    repeating-linear-gradient(135deg, #f8c9b71a 0 1px, transparent 1px 12px),
    #692237;
}
.advent-page { width: min(100%, 529px); min-height: 100dvh; margin: auto; padding: calc(24px + var(--safe-top)) 17px calc(13px + var(--safe-bottom)); display: grid; align-content: center; }
.advent-dialog .dialog-close { top: calc(12px + var(--safe-top)); right: 15px; background: #98394c65; }
.advent-hero { min-height: 103px; display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 0 2px 5px; }
.advent-hero h2 { color: #fff5d7; font-size: clamp(40px, 11vw, 63px); font-weight: 820; line-height: .93; }
.advent-hero img { width: 31%; height: 112px; object-fit: contain; margin-right: 4%; transform: rotate(-5deg); filter: drop-shadow(0 4px 5px #4e1d30a1); }
.advent-hero p { color: #ffdfd1; margin-top: 4px; font-size: 13px; }
.advent-date { color: #ffddab; font-size: 12px; margin-bottom: 5px; font-weight: 700; }
.advent-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 11px; margin: 3px 0 10px; color: #ffe8dc; font-size: 10px; }
.advent-legend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.advent-legend .icon { width: 14px; height: 14px; }
.advent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.advent-day {
  --window-paper: #f0c296;
  --window-ink: #63382b;
  position: relative;
  min-width: 0;
  min-height: clamp(62px, 9dvh, 83px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 6px 6px;
  isolation: isolate;
  border-radius: 17px;
  border: 1px solid #ffefd84d;
  color: var(--window-ink);
  background:
    linear-gradient(145deg, #fff5dc4a, transparent 46%, #7e294113 100%),
    color-mix(in srgb, var(--window-paper) 81%, transparent);
  backdrop-filter: blur(10px) saturate(150%);
  box-shadow: inset 0 1px 1px #fff5dca0, inset 0 -1px 1px #6a30412f, 0 4px 8px #4c14294f;
}
.advent-day.tone-1 { --window-paper: #d7a3ad; --window-ink: #673241; }
.advent-day.tone-2 { --window-paper: #a8cba8; --window-ink: #254938; }
.advent-day.tone-3 { --window-paper: #b8d2de; --window-ink: #234853; }
.advent-day-date { position: absolute; top: 5px; left: 7px; font-size: 13px; font-weight: 810; white-space: nowrap; }
.advent-day-date small { font-size: 9px; font-weight: 650; }
.advent-day > .icon { width: 32px; height: 32px; margin-bottom: 6px; }
.advent-day.locked > .icon { opacity: .78; margin-bottom: 0; }
.advent-day.today { --window-paper: #ffdf81; --window-ink: #633515; box-shadow: inset 0 0 0 1px #fff5bb, 0 3px 10px #4b1e26aa; }
.advent-day.today:hover, .advent-day.unlocked:hover { filter: brightness(1.12); }
.advent-day.received { --window-paper: #a8dcb7; --window-ink: #153f31; }
.advent-day.received > .icon { margin-bottom: 0; }
.advent-reward { position: absolute; right: 6px; bottom: 4px; display: flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 830; }
.advent-reward .icon { width: 12px; height: 14px; }
.advent-day:last-child { grid-column: 1 / -1; min-height: 48px; padding: 4px 10px; align-items: center; justify-content: start; gap: 8px; }
.advent-day:last-child .advent-day-date { position: static; }
.advent-day:last-child > .icon { order: 2; margin: 0 0 0 auto; width: 28px; height: 28px; }
.advent-day:last-child.today > .icon { margin-right: 24px; }
.advent-last-label { margin-left: 4px; font-size: 12px; font-weight: 700; }
.advent-footer {
  position: sticky;
  bottom: calc(6px + var(--safe-bottom));
  z-index: 2;
  margin-top: 10px;
  padding: 5px;
  border: 1px solid #ffe7d46b;
  border-radius: 30px;
  background: #ad577167;
  backdrop-filter: blur(23px) saturate(160%);
  box-shadow: inset 1px 1px 0 #fff2df4f, 0 8px 22px #47132477;
}
.tree-preview-hit, .tree-preview-next {
  position: absolute;
  z-index: 4;
  inset: 1% 6% 20%;
  border-radius: 22%;
}
.tree-preview-hit:hover { box-shadow: inset 0 0 24px #a4dfe811; }
.tree-preview-link {
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  margin-top: 8px;
  border-radius: var(--pill);
  background: #e6fff313;
  color: #dcefea;
  font-size: 11px;
  font-weight: 680;
}
.tree-preview-link:hover { background: #e6fff328; }
.tree-preview-link .icon { width: 15px; height: 15px; }
.tree-preview-content { text-align: center; }
.tree-preview-content h2 { padding-inline: 25px; margin-bottom: 9px; }
.tree-scene.tree-preview-scene { margin-inline: auto; width: min(70vw, 260px, 39dvh); }
.tree-preview-scene::before { display: none; }
.tree-preview-next { bottom: 0; }
.tree-preview-content .tree-preview-caption { color: #fff5d9; font-weight: 750; min-height: 24px; margin-block: 6px 9px; }
.tree-preview-dates { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.tree-preview-dates button {
  display: grid;
  place-content: center;
  min-height: 47px;
  border-radius: 14px;
  border: 1px solid #e7ffec30;
  background: #d5f9df13;
  color: #e7f3e8;
  font-weight: 800;
  line-height: 1;
}
.tree-preview-dates small { margin-top: 2px; font-size: 10px; font-weight: 650; }
.tree-preview-dates button[aria-pressed="true"] { background: #fff1c9; color: #3e3428; }
.tree-preview-dates button:hover { box-shadow: inset 0 0 0 1px #fff2cd83; }

.energy-content { padding-top: 22px; }
.energy-content h2 { padding-right: 40px; margin-bottom: 17px; }
.energy-swap { display: grid; gap: 6px; position: relative; }
.swap-card { min-width: 0; padding: 11px 13px; border: 1px solid #e8f7da32; border-radius: 20px; background: #e2ffd41a; box-shadow: inset 0 1px 0 #f0ffd42a; }
.swap-get { background: #e9bc6823; }
.swap-card-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 3px; color: #d7e6d9; font-size: 12px; font-weight: 650; }
.swap-card-head b { color: white; }
.swap-value { display: flex; align-items: center; gap: 7px; }
.swap-value input, .swap-value output { width: 100%; min-width: 0; flex: 1; border: 0; padding: 0; appearance: textfield; background: transparent; color: #fff4d8; font: 780 29px/1.23 Onest, sans-serif; font-variant-numeric: tabular-nums; }
.swap-value input::-webkit-inner-spin-button, .swap-value input::-webkit-outer-spin-button { appearance: none; }
.swap-value input::placeholder { color: #b8cabc; }
.swap-value input:focus-visible { outline: 1px solid #fff3ce75; outline-offset: 1px; border-radius: 4px; }
.swap-max, .swap-token { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 3px; white-space: nowrap; padding: 4px 8px; border-radius: var(--pill); background: #ebffe12d; color: #fff5de; font-size: 12px; font-weight: 720; }
.swap-max { padding: 4px 7px; color: #ffdd9a; background: #e4f7cd18; }
.swap-max:hover { background: #e4f7cd32; }
.swap-token .icon { width: 18px; height: 18px; }
.swap-direction { z-index: 1; justify-self: center; width: 29px; height: 29px; margin-block: -11px; display: grid; place-items: center; border: 1px solid #e9ffe237; border-radius: 50%; background: #2e4d3d; pointer-events: none; }
.swap-direction .icon { width: 12px; height: 12px; transform: rotate(90deg); }
.swap-meta { min-height: 26px; }
.swap-meta p { margin: 2px 1px; font-size: 12px; }
.swap-meta .swap-error { color: #ffbdaf; }
.swap-error:empty { display: none; }

.advent-page .primary, .advent-task-dialog .primary { color: #702939; background: #fff0c5; }
.advent-page .primary:hover, .advent-task-dialog .primary:hover { background: #fff6dd; }
.advent-page .primary .art-arrow { filter: brightness(.48); }
.advent-result { display: flex; align-items: center; justify-content: center; gap: 3px; margin: 1px 0 4px; color: #fff3dd; font-size: 13px; font-weight: 760; }
.advent-result .icon { width: 16px; height: 16px; }
.advent-task-dialog { background: #71364ce8; backdrop-filter: blur(21px) saturate(150%); }
.advent-task-content { padding-top: 17px; }
.advent-back { display: flex; align-items: center; gap: 6px; width: max-content; margin-bottom: 14px; padding: 5px 12px; border-radius: var(--pill); background: #ffead225; font-size: 13px; font-weight: 720; }
.advent-back .icon { width: 13px; height: 13px; transform: scaleX(-1); }
.advent-task-content .info-panel { background: #fee4dd1e; }
.advent-task-content .advent-date { color: #ffe2ac; }
.advent-task-content p { color: #fff0e1; }
.intro-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 52% 41%, #3b8364 0, transparent 56%),
    repeating-linear-gradient(135deg, #f0ead314 0 1px, transparent 1px 18px),
    #173b2f;
}
.intro-dialog .dialog-close { top: calc(13px + var(--safe-top)); right: 15px; }
.intro-page {
  width: min(100%, 540px);
  min-height: 100dvh;
  margin: auto;
  display: grid;
  align-content: center;
  gap: 13px;
  padding: calc(54px + var(--safe-top)) 18px calc(18px + var(--safe-bottom));
}
.intro-scene { position: relative; isolation: isolate; width: min(100%, 420px); height: clamp(216px, 48dvh, 410px); margin-inline: auto; overflow: hidden; }
.intro-trees { position: absolute; left: 46%; top: 50%; height: 100%; aspect-ratio: 4 / 5; transform: translate(-50%, -50%); }
.intro-trees > img { position: absolute; width: 100%; height: 100%; object-fit: contain; }
.intro-trees .tribute-topper { width: 14%; }
.intro-frozen { opacity: 1; }
.intro-duck { position: absolute; z-index: 2; right: 2%; bottom: 14%; width: 32%; filter: drop-shadow(0 7px 8px #081c145f); }
.intro-theft .intro-frozen { animation: intro-freeze 1.65s both; }
.intro-theft .intro-duck { animation: intro-duck 1.3s both cubic-bezier(.23,.75,.31,1), intro-chuckle .48s 1.49s ease-in-out 2; }
.intro-rescue .intro-duck { animation: intro-retreat .64s .12s ease-in both; }
.intro-candle .intro-duck, .intro-melt .intro-duck, .intro-ticket .intro-duck { display: none; }
.intro-frost { position: absolute; z-index: 1; left: 39%; top: 10%; width: 66%; height: 70%; border-radius: 50%; background: radial-gradient(ellipse, #dffaff, #7deafb6e 36%, transparent 71%); filter: blur(9px); mix-blend-mode: screen; transform-origin: 77% 61%; opacity: 0; }
.intro-theft .intro-frost { animation: intro-frost 1.7s both; }
.intro-laugh { position: absolute; z-index: 3; right: 3%; bottom: 43%; padding: 5px 10px; border: 1px solid #fff0b28c; border-radius: 10px 12px 8px 12px; background: #ffd969; color: #592d17; font-size: clamp(15px, 4.7vw, 22px); font-weight: 850; box-shadow: 0 5px 14px #152a17b9; transform: rotate(8deg); animation: intro-laugh .4s 1.46s both; }
.intro-caption { position: relative; display: grid; align-content: center; text-align: center; min-height: 116px; max-width: 38ch; margin-inline: auto; color: #fff4dc; animation: intro-line .31s both; }
.intro-caption h2 { margin-bottom: 7px; font-size: clamp(28px, 8vw, 46px); line-height: 1; letter-spacing: -.045em; }
.intro-caption p { font-size: clamp(14px, 3.7vw, 17px); line-height: 1.34; }
.intro-caption .intro-prize { margin-top: 7px; color: #ffdea3; font-weight: 700; font-size: 13px; }
.intro-theft .intro-caption { animation-delay: 1.57s; }
.intro-theft .intro-caption h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.intro-quote { padding: 11px 16px; border-radius: 19px; color: #46291e; background: #fff0c9; box-shadow: 0 7px 24px #0b211b72; font-weight: 800; }
.intro-page .primary .art-arrow { filter: brightness(.42); }
.intro-next { animation: intro-line .27s both; }
.intro-theft .intro-next { animation-delay: 1.68s; }
.intro-candle-prop {
  position: absolute;
  z-index: 3;
  top: 49%;
  left: 47%;
  display: grid;
  place-items: center;
  width: clamp(84px, 26vw, 113px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid #ffe6a08c;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe287c9, #ffc46f92 54%, #ffe29435 77%);
  box-shadow: 0 0 0 7px #fff1bb2b, 0 0 31px #ffc65bb3;
  animation: intro-prop .45s .16s both;
}
.intro-candle-prop .icon { width: 55%; height: 69%; filter: drop-shadow(0 3px 6px #80502078); }
.intro-melt .intro-scene { overflow: visible; }
.intro-melt::after { content: ""; min-height: 46px; }
.intro-gifts { position: absolute; left: 8%; right: 8%; bottom: 6%; z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: center; gap: 6px; animation: intro-line .29s .28s both; }
.intro-gifts button { min-height: 40px; padding: 5px; border: 1px solid #fff7d77c; border-radius: var(--pill); background: #fff2ce; color: #5c2d22; font-size: clamp(11px, 3.3vw, 15px); font-weight: 790; box-shadow: 0 6px 17px #10231bbb; }
.intro-gifts button:hover { background: white; }
.intro-melt .intro-frost { animation: intro-warmth .86s both; background: radial-gradient(ellipse, #ffda80, #ffd05255 57%, transparent 73%); }
.intro-ticket .intro-frozen { animation: intro-melt .65s both; }
.intro-ticket .intro-frost { animation: intro-warmth 1.2s both; background: radial-gradient(ellipse, #ffdb8f, #ffc16c6b 38%, transparent 70%); }
.intro-ticket-prop { position: absolute; z-index: 3; width: clamp(98px, 33vw, 145px); top: 46%; left: 47%; transform: translate(-50%, -50%); animation: intro-prop .58s .42s both; }
.intro-ticket-prop .icon { width: 100%; height: auto; transform: rotate(-15deg); filter: drop-shadow(0 6px 15px #422f1768) drop-shadow(0 0 11px #ffe4a88f); }
@keyframes intro-duck {
  0% { transform: translate(128%, 11%) rotate(14deg); }
  21% { transform: translate(69%, -6%) rotate(-9deg); }
  43% { transform: translate(25%, 6%) rotate(8deg); }
  68% { transform: translate(-4%, -6%) rotate(-6deg); }
  100% { transform: none; }
}
@keyframes intro-freeze { 0%, 42% { opacity: 0; clip-path: inset(0 0 0 93%); } 89%, 100% { opacity: 1; clip-path: inset(0); } }
@keyframes intro-frost { 0%, 38%, 85%, 100% { opacity: 0; transform: scale(.35); } 60% { opacity: .9; transform: scale(1); } }
@keyframes intro-chuckle { 0%, 100% { transform: none; } 50% { transform: translateY(-7%) rotate(-7deg) scale(1.03,.96); } }
@keyframes intro-retreat { 0% { transform: none; opacity: 1; } 100% { transform: translateX(115%) rotate(-17deg); opacity: 0; } }
@keyframes intro-line { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes intro-laugh { from { opacity: 0; transform: translateY(8px) scale(.7) rotate(-6deg); } to { opacity: 1; transform: rotate(8deg); } }
@keyframes intro-prop { from { opacity: 0; transform: translate(-50%, -32%) scale(.58); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes intro-warmth { 0%, 100% { opacity: 0; transform: scale(.48); } 41% { opacity: .85; transform: scale(1); } }
@keyframes intro-melt { from { opacity: 1; } to { opacity: 0; } }

.lobby { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 46%, #214d39, var(--bg) 63%); }
.lobby-inner { text-align: center; padding: 18px; }
.lobby-inner h1 { font-size: clamp(49px, 10vw, 88px); margin: 6px 0 20px; }

@media (max-width: 640px) {
  :root { --gutter: 12px; }
  .top-inner { padding-top: calc(10px + var(--safe-top)); gap: 8px; }
  .balance, .icon-button { min-height: 39px; }
  .countdown { gap: 4px; font-size: 11px; }
  .icon-button { width: 39px; }
  .hero { padding: calc(48px + var(--safe-top)) 0 13px; }
  .hero-title { font-size: clamp(33px, 9.5vw, 47px); }
  .tree-scene { width: min(77vw, 310px); }
  .duck { right: calc(-13% + 21% * var(--thaw)); width: 33%; }
  .parcel-tag { font-size: 8px; padding: 3px 4px 3px 7px; }
  .parcel-tag::before { left: 2px; width: 2px; height: 2px; }
  .advent-banner { margin-bottom: 18px; min-height: 84px; border-radius: 22px; padding: 9px 14px; }
  .advent-art { width: 39%; right: 7%; height: 97%; }
  .advent-cta { font-size: 11px; }
  .section-head { margin-bottom: 10px; }
  .text-button { font-size: 12px; }
  .prize-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .prize { border-radius: 21px; }
  .gift-picture { aspect-ratio: 1.18; border-radius: 21px 21px 10px 10px; }
  .prize-name { font-size: 13px; }
  .prize-info { padding: 8px 4px 7px; }
  .prize-info p { font-size: 11px; }
  .prize-button { font-size: 11px; min-height: 34px; }
  .prize-button .icon { width: 14px; height: 14px; }
  .prize-cash.prize { grid-column: 1 / -1; grid-template: auto auto / 43% minmax(0, 1fr); gap: 0 10px; padding: 0 8px 0 0; align-items: end; overflow: hidden; }
  .prize-cash > .gift-picture { grid-row: 1 / 3; width: 100%; margin: 0; border-radius: 20px 8px 8px 20px; aspect-ratio: 1.33; }
  .prize-cash > .prize-info { padding-top: 9px; }
  .prize-cash > .prize-button { margin-bottom: 7px; }
  .quests { padding-top: calc(67px + var(--safe-top)); }
  .dialog-content { padding-inline: 16px; }
  dialog:not(.advent-dialog):not(.intro-dialog) { width: 100%; max-width: none; margin: auto 0 0; max-height: calc(92dvh - var(--safe-top)); border-radius: 25px 25px 0 0; }
  dialog:not(.advent-dialog):not(.intro-dialog) .dialog-content { padding-bottom: calc(16px + var(--safe-bottom)); }
  .advent-page { padding-top: calc(21px + var(--safe-top)); }
}

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