.advent { color: var(--shell-text); font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; }
.advent [hidden] { display: none !important; }
.advent-tools { position: fixed; z-index: 5; bottom: 16px; right: 16px; max-width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 12px 16px; color: #ddd; background: #141414; border: 1px solid #49070a; box-shadow: 0 8px 32px #0008; font: 12px/1.5 "Courier New", monospace; }
.advent-tools summary { cursor: pointer; color: var(--shell-gold); }
.advent-tools p { margin: 10px 0; }
.advent-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.advent-controls label { display: grid; gap: 4px; }
.advent-controls input, .advent-controls select { max-width: 100%; padding: 6px; color: #ddd; background: #222; border: 1px solid #666; }
.advent-controls .advent-check { display: flex; align-items: center; padding: 6px 0; }
.advent-controls button, .advent-action { padding: 7px 12px; color: #eee; background: linear-gradient(#4b1115, #290609); border: 1px solid #834148; cursor: pointer; }
.advent button:focus-visible, .advent input:focus-visible, .advent select:focus-visible, .advent summary:focus-visible { outline: 2px solid var(--shell-gold); outline-offset: 3px; }
.advent-preview-status { min-height: 18px; margin-bottom: 0 !important; }
.advent-date { color: var(--shell-text-muted); }
/* Shared folder classes supply the titlebar, X button and inset frame. */
.advent-modal { position: fixed; inset: 0; margin: 0; padding: 24px; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; border: 0; background: transparent; color: var(--shell-text); overflow: auto; }
.advent-modal[open] { display: grid; place-items: center; }
.advent-modal:not([open]) { display: none; }
.advent-modal::backdrop { background: rgba(0, 0, 0, 0.46); }
.advent-window { width: min(660px, calc(100vw - 48px)); max-width: none; min-width: 0; max-height: calc(100dvh - 48px); display: flex; flex-direction: column; }
.advent-window .cult-os-folder-titlebar, .advent-reward-window .cult-os-folder-titlebar { flex-shrink: 0; }
.advent-window .cult-os-folder-title, .advent-reward-window .cult-os-folder-title { font-size: clamp(14px, 2.5vw, 21px); }
.advent-calendar { overflow-y: auto; min-height: 0; padding: 16px 20px 20px; }
.advent-header { text-align: center; }
.advent-header p { margin: 0 0 14px; line-height: 1.5; font-size: 15px; }
.advent-header .advent-eyebrow { color: #b9a5a2; font: 12px/1.5 "Courier New", monospace; margin-bottom: 12px; }
.advent-token-phrase { white-space: nowrap; }
.advent-token-inline { display: inline-block; width: 1.1em; height: 1.1em; object-fit: contain; vertical-align: -.18em; }
.advent-door > span.advent-claimed-label:last-child { display: flex; justify-content: center; align-items: center; gap: .3em; white-space: nowrap; }
.advent-guest { padding: 24px 12px; text-align: center; line-height: 1.6; }
.advent-guest-heading { font-size: 24px; color: var(--shell-gold); }
.advent-coming-soon {
    position: absolute;
    inset: auto -12px 18% -12px;
    z-index: 2;
    transform: rotate(-12deg);
    padding: 3px;
    background: #72151c;
    border: 1px solid #dfb54a;
    color: #fff2d0;
    font: bold 10px/1.2 "Courier New", monospace;
    white-space: nowrap;
    text-align: center;
}
.advent-countdown {
    margin: 20px 0 8px;
    color: var(--shell-gold);
    font: 400 clamp(24px, 5vw, 38px)/1.2 "Permanent Marker", cursive;
}

.advent-countdown-word,
.advent-countdown-word > span {
    display: inline-block;
}

.advent-countdown-word > span {
    animation: advent-countdown-wave 2.8s ease-in-out infinite;
    animation-delay: calc(var(--advent-letter-index) * 65ms);
}

@keyframes advent-countdown-wave {
    0%, 40%, 100% { transform: translateY(0); }
    20% { transform: translateY(-.22em); }
}

@media (prefers-reduced-motion: reduce) {
    .advent-countdown-word > span { animation: none; }
}

.advent-guest [data-advent-signin] {
    min-width: 150px;
    min-height: 48px;
    padding: 10px 24px;
    font-size: 20px;
}
.advent-missed-days { margin-top: 20px; text-align: center; line-height: 1.5; }
.advent-missed-days img { display: block; max-width: 100%; height: auto; margin: 12px auto 0; }
.advent-live-message { padding: 10px; border: 1px solid #70573c; color: #f4d6a3; font: 13px/1.5 "Courier New", monospace; }
.advent-door--pending { border-style: dashed; border-color: #9d824c; }
.advent-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.advent-door { width: 100%; aspect-ratio: 1; min-height: 0; position: relative; display: grid; grid-template-rows: 19px minmax(0, 1fr) 26px; justify-items: center; gap: 4px; padding: 7px 5px; background: #311014; border: 1px solid #754147; color: #e9ded5; box-shadow: inset 1px 1px 0 #ffffff0c, inset -1px -1px 0 #0008; font-family: "Courier New", monospace; }
.advent-door strong { font: bold 19px/1 "Courier New", monospace; }
.advent-door > span:last-child { display: grid; align-items: center; width: 100%; min-height: 0; font: 10px/1.3 "Courier New", monospace; }
.advent-gift-mark { display: block; width: 100%; height: 100%; min-height: 0; min-width: 0; }
.advent-gift-mark img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.advent-door--today { border: 1px solid #d2b169; background: #54151c; box-shadow: inset 0 0 0 1px #d2b16960, 0 0 12px #8e1a1d50; }
.advent-door--saved { border: 1px dashed #c1a874; background: #342b20; }
.advent-door:enabled { cursor: pointer; }
.advent-door:enabled:hover { transform: translateY(-2px); background: #54262a; }
.advent-door--missed { background: #1b1b1b; color: #8e8987; border-color: #393536; }
.advent-door--missed .advent-gift-mark { opacity: .3; filter: grayscale(1); }
.advent-door--future, .advent-door--unvisited { background: #222; border-color: #494143; color: #a9a1a0; }
.advent-door--opened { background: #20231f; border-color: #455140; color: #a3b29a; }
.advent-launcher .cult-os-app-icon-circle { position: relative; overflow: visible; }
.advent-snow { position: absolute; inset: -12px; pointer-events: none; display: none; color: #fff; text-shadow: 0 0 5px #d6f0ff, 0 0 9px #a1d5ff; }
.advent-has-gifts .advent-snow { display: block; }
.advent-snow i { position: absolute; top: -5px; font: normal 15px/1 Georgia, serif; opacity: 0; animation: advent-snowfall 3.6s linear infinite; }
.advent-snow i:nth-child(1) { left: 5%; animation-delay: -.3s; }
.advent-snow i:nth-child(2) { left: 18%; animation-delay: -2s; font-size: 24px; }
.advent-snow i:nth-child(3) { left: 33%; animation-delay: -1.2s; }
.advent-snow i:nth-child(4) { left: 47%; animation-delay: -2.9s; font-size: 22px; }
.advent-snow i:nth-child(5) { left: 62%; animation-delay: -1.8s; }
.advent-snow i:nth-child(6) { left: 75%; animation-delay: -.6s; font-size: 25px; }
.advent-snow i:nth-child(7) { left: 88%; animation-delay: -2.5s; }
.advent-snow i:nth-child(8) { left: 54%; animation-delay: -3.3s; }
@keyframes advent-snowfall { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 20%, 65% { opacity: .9; } 100% { opacity: 0; transform: translate(9px, 95px) scale(.7) rotate(50deg); } }
@media (prefers-reduced-motion: reduce) { .advent-has-gifts .advent-snow i { animation: none !important; opacity: .85; top: 8px; } }
.advent-reward-window { width: min(400px, calc(100vw - 48px)); min-width: 0; max-width: none; }
.advent-reward-body { text-align: center; padding: 24px; }
.advent-reward-body h2 { color: var(--shell-gold); font-size: 26px; margin: 14px 0; }
.advent-reward-body p { font-size: 14px; line-height: 1.5; }
.advent-reveal { position: relative; width: 260px; height: 260px; max-width: 100%; margin: 12px auto; perspective: 600px; }
.advent-shaking-gift, .advent-fragments { position: absolute; width: 180px; height: 180px; left: 50%; top: 50%; margin: -90px; }
.advent-shaking-gift > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.advent-reveal[data-phase="shaking"] .advent-shaking-gift { animation: advent-tremor 1s linear forwards; }
.advent-fragments, .advent-coins { visibility: hidden; }
.advent-reveal[data-phase="burst"] .advent-shaking-gift, .advent-reveal[data-phase="revealed"] .advent-shaking-gift { visibility: hidden; }
.advent-reveal[data-phase="burst"] .advent-fragments { visibility: visible; }
.advent-shard { position: absolute; width: 20%; height: 20%; overflow: hidden; animation: advent-shatter .45s ease-out forwards; }
.advent-shard img { position: absolute; width: 180px; height: 180px; max-width: none; object-fit: contain; }
.advent-coins { position: absolute; inset: 0; }
.advent-reveal[data-phase="burst"] .advent-coins, .advent-reveal[data-phase="revealed"] .advent-coins { visibility: visible; }
.advent-token-position { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px; }
.advent-token-position:nth-child(1) { transform: translate(0, -76px); }
.advent-token-position:nth-child(2) { transform: translate(72px, -23px); }
.advent-token-position:nth-child(3) { transform: translate(45px, 61px); }
.advent-token-position:nth-child(4) { transform: translate(-45px, 61px); }
.advent-token-position:nth-child(5) { transform: translate(-72px, -23px); }
.advent-token-float { display: block; width: 100%; height: 100%; animation: advent-token-float 2.7s ease-in-out infinite alternate; }
.advent-token { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: advent-token-spin 3.2s linear infinite; }
.advent-token, .advent-token-float { animation-play-state: paused; }
.advent-reveal[data-phase="burst"] .advent-token, .advent-reveal[data-phase="revealed"] .advent-token, .advent-reveal[data-phase="burst"] .advent-token-float, .advent-reveal[data-phase="revealed"] .advent-token-float { animation-play-state: running; }
.advent-token-position:nth-child(2n) .advent-token-float { animation-delay: -1.2s; }
.advent-token-position:nth-child(2) .advent-token { animation-delay: -.6s; }
.advent-token-position:nth-child(3) .advent-token { animation-delay: -1.2s; }
.advent-token-position:nth-child(4) .advent-token { animation-delay: -1.8s; }
.advent-token-position:nth-child(5) .advent-token { animation-delay: -2.4s; }
.advent-token img { display: block; position: absolute; inset: 0; width: 50px; height: 50px; backface-visibility: hidden; }
.advent-token-front { transform: translateZ(1px); }
.advent-token-back { transform: rotateY(180deg) translateZ(1px); }
.advent-token::after { content: ''; position: absolute; width: 2px; height: 43px; left: 24px; top: 3px; border-radius: 50%; background: #a57b00; transform: rotateY(90deg); }
.advent-action:disabled { opacity: .5; cursor: default; }
@keyframes advent-tremor { 0%, 10% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(1px, 0) rotate(1deg); } 30% { transform: translate(-2px, 1px) rotate(-2deg); } 40% { transform: translate(3px, -2px) rotate(3deg); } 50% { transform: translate(-4px, 2px) rotate(-4deg); } 60% { transform: translate(5px, -3px) rotate(5deg); } 70% { transform: translate(-6px, 4px) rotate(-7deg); } 80% { transform: translate(8px, -5px) rotate(9deg); } 90% { transform: translate(-10px, 5px) rotate(-11deg); } 100% { transform: translate(12px, -6px) rotate(13deg); } }
@keyframes advent-shatter { to { transform: translate(var(--shard-x), var(--shard-y)) rotate(var(--shard-rotation)); opacity: 0; } }
@keyframes advent-token-float { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
@keyframes advent-token-spin { to { transform: rotateY(360deg); } }
@media (max-width: 550px) {
    .advent-modal { padding: 16px; }
    .advent-window { width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
    .advent-calendar { padding: 12px; }
    .advent-header p { font-size: 13px; }
    .advent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
    .advent-door > span:last-child { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .advent * { animation-duration: .01ms !important; transition: none !important; } }
@media (prefers-reduced-motion: reduce) { .advent-token, .advent-token-float { animation: none !important; } }
