/* FOM site presentation, shared by the shop and both calendars.
 * Presentation only: no selectors change hidden/disabled state or host hit areas.
 */
:is(body.shop-v4-page, .calendar-window, main.attendance-page) {
    --fom-paper: #f6eddb;
    --fom-ink: #432c1d;
    --fom-night: #342317;
    --fom-accent: #c58c48;
    --fom-line: #d6bd97;
    --fom-copy: #755d45;
    --fom-serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

/* The embedded storefront retains its existing grid, scrolling and dialogs. */
body.shop-v4-page.is-embedded {
    --shop-bg: #f6eddb;
    --shop-bg-2: #efdfc3;
    --shop-panel: #fff7e8;
    --shop-panel-2: #efdfc3;
    --shop-panel-3: #e8d2ae;
    --shop-border: #d6bd97;
    --shop-border-strong: #b7854b;
    --shop-text: #432c1d;
    --shop-text-soft: #694b32;
    --shop-muted: #81684e;
    --shop-gold: #a15c2a;
    --shop-gold-light: #875026;
    --shop-gold-deep: #875026;
    --shop-violet: #a15c2a;
    --shop-violet-soft: #875026;
    --shop-violet-deep: #704017;
    --shop-violet-glow: #c58c4820;
    --shop-ring: 0 0 0 3px #c58c4830;
    --shop-success: #2d7051;
    --shop-warning: #8a5d1f;
    --shop-danger: #a23f3f;
    --shop-blue: #875026;
    --shop-shadow: 0 10px 30px #3423170c;
    --shop-shadow-raised: 0 14px 32px #34231716;
    --shop-radius-xl: 12px;
    --shop-radius-lg: 9px;
    --shop-radius-md: 6px;
    color-scheme: light;
    background: var(--fom-paper);
    color: var(--fom-ink);
    font-family: "Segoe UI", Arial, sans-serif;
}
body.shop-v4-page.is-embedded .shop-v4-shell {
    background: var(--fom-paper);
}
body.shop-v4-page.is-embedded .shop-v4-shell::before {
    background: none;
}
body.shop-v4-page.is-embedded :is(.shop-v4-topbar, .shop-v4-sidebar) {
    color: #fff0d6;
    background: var(--fom-night);
    border-color: #b7854b66;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-topbar {
    border-radius: 8px;
}
body.shop-v4-page.is-embedded .shop-v4-mark {
    width: 38px;
    height: 42px;
    border: 1px solid #ba8d5980;
    border-radius: 4px;
    background: #ffffff04 url("/assets/discord/fom_logo.png") center / 82% no-repeat;
    font-size: 0;
    box-shadow: none;
    transform: none;
}
body.shop-v4-page.is-embedded .shop-v4-brand-copy strong {
    color: #fff0d6;
    font-family: var(--fom-serif);
    font-weight: 400;
    letter-spacing: .025em;
}
body.shop-v4-page.is-embedded :is(.shop-v4-brand-copy span, .shop-v4-sidebar-note p) {
    color: #d6bd9e;
}
body.shop-v4-page.is-embedded .shop-v4-search input {
    color: #fff0d6;
    background: #291c13;
    border-color: #997754;
    border-radius: 5px;
}
body.shop-v4-page.is-embedded .shop-v4-search input::placeholder {
    color: #cbb18d;
}
body.shop-v4-page.is-embedded .shop-v4-search svg { color: #d6bd9e; }
body.shop-v4-page.is-embedded .shop-v4-balance {
    background: #ffffff06;
    border-color: #b7854b80;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-balance span { color: #d6bd9e; }
body.shop-v4-page.is-embedded .shop-v4-balance strong { color: #f2c890; }
body.shop-v4-page.is-embedded :is(.shop-v4-close, .shop-v4-topup-button) {
    color: #fff0d6;
    background: #ffffff06;
    border-color: #a17a50;
    border-radius: 5px;
}
body.shop-v4-page.is-embedded :is(.shop-v4-close, .shop-v4-topup-button):hover {
    background: #654326;
    color: #fff4d8;
}
body.shop-v4-page.is-embedded .shop-v4-sidebar-head {
    border-color: #ffffff18;
}
body.shop-v4-page.is-embedded .shop-v4-sidebar-head :is(strong, h2) {
    color: #fff0d6;
    font-family: var(--fom-serif);
    font-weight: 400;
}
body.shop-v4-page.is-embedded .shop-v4-sidebar :is(.shop-v4-kicker, .shop-v4-sidebar-note strong) {
    color: #e5b97e;
}
body.shop-v4-page.is-embedded .shop-v4-category {
    color: #eddbc4;
    background: transparent;
    border-color: transparent;
    border-radius: 5px;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-category:hover {
    background: #5e3d25;
    border-color: #a27b51;
}
body.shop-v4-page.is-embedded .shop-v4-category.is-active {
    color: #432c1d;
    background: #edc38a;
    border-color: #c58c48;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-category-icon {
    color: #f1d6ac;
    background: #ffffff08;
    border-color: #ffffff18;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-category.is-active :is(.shop-v4-category-icon, .shop-v4-category-count) {
    color: #432c1d;
    background: #ffffff3d;
    border-color: #b17c41;
}
body.shop-v4-page.is-embedded .shop-v4-category-count {
    color: #dfc6a5;
    background: #ffffff08;
    border-color: #ffffff18;
}
body.shop-v4-page.is-embedded .shop-v4-sidebar-note {
    color: #d6bd9e;
    background: #291c134d;
    border-color: #a27b5180;
    border-radius: 6px;
}
body.shop-v4-page.is-embedded .shop-v4-hero {
    background: linear-gradient(105deg, #efdfc3, #fff7e8);
    border-color: #d1b48a;
    border-radius: 9px;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-hero::before,
body.shop-v4-page.is-embedded .shop-v4-hero::after {
    opacity: .12;
    background: radial-gradient(ellipse at top right, #b7854b, transparent 65%);
}
body.shop-v4-page.is-embedded .shop-v4-hero h1 {
    color: var(--fom-ink);
    font-family: var(--fom-serif);
    font-weight: 400;
    letter-spacing: -.035em;
}
body.shop-v4-page.is-embedded .shop-v4-hero :is(p, .shop-v4-hero-stat-meta) {
    color: var(--fom-copy);
}
body.shop-v4-page.is-embedded :is(.shop-v4-kicker, .shop-v4-hero-pills span) {
    color: #885325;
    background: #e7caa066;
    border-color: #be9565;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-hero-stat {
    color: var(--fom-ink);
    background: #fff7e880;
    border-color: #be9565;
    border-radius: 7px;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-hero-stat :is(strong, h2) {
    color: #885325;
    font-family: var(--fom-serif);
    font-weight: 400;
}
body.shop-v4-page.is-embedded .shop-v4-hero-stat-head { color: #755d45; }
body.shop-v4-page.is-embedded .shop-v4-hero-stat-status { color: #2d7051; }
body.shop-v4-page.is-embedded .shop-v4-hero-stat :is(span, small) { color: #755d45; }
body.shop-v4-page.is-embedded .shop-v4-hero-stat .shop-v4-hero-stat-status { color: #2d7051; }
body.shop-v4-page.is-embedded :is(.shop-v4-toolbar, .shop-v4-sort select) {
    color: var(--fom-ink);
    background: #fff7e8;
    border-color: var(--fom-line);
    border-radius: 6px;
    box-shadow: none;
}
body.shop-v4-page.is-embedded select.shop-v4-sort {
    color: #432c1d;
    background: #f6eddb;
    border-color: #c5a57d;
}
body.shop-v4-page.is-embedded :is(.shop-v4-toolbar-title strong, .shop-v4-toolbar-title h2) {
    color: var(--fom-ink);
}
body.shop-v4-page.is-embedded :is(.shop-v4-subcategory, .shop-v4-preview-tab, .shop-v4-preview-control) {
    color: #694b32;
    background: #fff7e8;
    border-color: #c5a57d;
    box-shadow: none;
}
body.shop-v4-page.is-embedded :is(.shop-v4-subcategory.is-active, .shop-v4-preview-tab.is-active, .shop-v4-preview-control.is-active) {
    color: #432c1d;
    background: #edcea1;
    border-color: #b27a3e;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-card {
    background: #fff7e8;
    border-color: #d6bd97;
    border-radius: 8px;
    box-shadow: 0 3px 12px #34231708;
}
body.shop-v4-page.is-embedded .shop-v4-card:hover {
    border-color: #b27a3e;
    box-shadow: 0 8px 20px #34231716;
}
body.shop-v4-page.is-embedded :is(.shop-v4-card-media, .shop-v4-drawer-art) {
    background: radial-gradient(ellipse at 50% 35%, #6c492f, #342317 85%);
    border-color: #d6bd97;
}
body.shop-v4-page.is-embedded .shop-v4-card-media::before,
body.shop-v4-page.is-embedded .shop-v4-card-media::after { opacity: .12; }
body.shop-v4-page.is-embedded :is(.shop-v4-card-body, .shop-v4-card-footer) {
    color: #432c1d;
    background: #fff7e8;
    border-color: #dec5a1;
}
body.shop-v4-page.is-embedded .shop-v4-card-name {
    color: #432c1d;
    white-space: normal;
    overflow-wrap: anywhere;
}
body.shop-v4-page.is-embedded .shop-v4-card-meta { color: #755d45; }
body.shop-v4-page.is-embedded .shop-v4-card-meta > span:last-child {
    color: #885325;
    background: #eedcba;
    border-color: #c9a77c;
}
body.shop-v4-page.is-embedded :is(.shop-v4-price, .shop-v4-drawer-price) { color: #8b5427; }
body.shop-v4-page.is-embedded :is(.shop-v4-details, .shop-v4-drawer-buy, .shop-v4-topup-submit) {
    color: #432c1d;
    background: #edc38a;
    border-color: #b7854b;
    border-radius: 5px;
    box-shadow: none;
}
body.shop-v4-page.is-embedded :is(.shop-v4-details, .shop-v4-drawer-buy, .shop-v4-topup-submit):hover:not(:disabled) {
    background: #f5d5a8;
    border-color: #9e6533;
}
body.shop-v4-page.is-embedded :is(.shop-v4-drawer-action, .shop-v4-drawer-buy):disabled {
    color: #694b32;
    background: #e5d9c5;
    border-color: #baaa93;
    box-shadow: none;
    opacity: 1;
}
body.shop-v4-page.is-embedded :is(.shop-v4-drawer, .shop-v4-topup-modal, .shop-v4-login) {
    color: #432c1d;
    background: #f6eddb;
    border-color: #b7854b;
    border-radius: 10px;
    box-shadow: 0 20px 70px #2c170c66;
}
body.shop-v4-page.is-embedded :is(.shop-v4-drawer h2, .shop-v4-topup-modal h2, .shop-v4-login h1) {
    color: #432c1d;
    font-family: var(--fom-serif);
    font-weight: 400;
}
body.shop-v4-page.is-embedded :is(.shop-v4-drawer-head, .shop-v4-drawer-action, .shop-v4-topup-head) {
    background: #f6eddb;
    border-color: #d6bd97;
}
body.shop-v4-page.is-embedded :is(.shop-v4-drawer-description, .shop-v4-topup-copy, .shop-v4-topup-security, .shop-v4-login p, .shop-v4-login small) {
    color: #755d45;
}
body.shop-v4-page.is-embedded :is(.shop-v4-drawer-close, .shop-v4-topup-close) {
    color: #432c1d;
    background: #efdfc3;
    border-color: #c5a57d;
}
body.shop-v4-page.is-embedded :is(.shop-v4-drawer-facts, .shop-v4-topup-summary) {
    color: #694b32;
    background: #efdfc3;
    border-color: #c9a77c;
}
body.shop-v4-page.is-embedded .shop-v4-topup-summary strong { color: #885325; }
body.shop-v4-page.is-embedded .shop-v4-topup-field input {
    color: #432c1d;
    background: #fff7e8;
    border-color: #b79771;
}
body.shop-v4-page.is-embedded .shop-v4-preview-chip { color: #fff0d6; }
body.shop-v4-page.is-embedded .shop-v4-preview-caption { color: #755d45; }
body.shop-v4-page.is-embedded .shop-v4-preview-controls :is(.shop-v4-preview-switch, .shop-v4-preview-control) {
    color: #755d45;
    background: #fff7e8;
    border-color: #c9a77c;
}
body.shop-v4-page.is-embedded .shop-v4-preview-controls button {
    color: #694b32;
    background: #f6eddb;
    border-color: #d6bd97;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-preview-controls button[aria-pressed="true"] {
    color: #432c1d;
    background: #edc38a;
    border-color: #b7854b;
    box-shadow: none;
}
body.shop-v4-page.is-embedded .shop-v4-toast {
    color: #432c1d;
    background: #fff7e8;
    border-color: #b7854b;
    box-shadow: 0 8px 28px #34231726;
}
body.shop-v4-page.is-embedded :is(button, input, select, a):focus-visible {
    outline: 2px solid #a56731;
    outline-offset: 3px;
}

/* Floating game calendar: keep the existing seven-column layout and drag region. */
html:has(.calendar-window) { color-scheme: light; background: #f6eddb; }
body:has(.calendar-window) { background: #f6eddb; color: #432c1d; }
.calendar-window.calendar-window {
    color: #432c1d;
    background: #f6eddb;
    border-color: #b7854b;
    border-radius: 14px;
    font-family: "Segoe UI", Arial, sans-serif;
}
.calendar-window > header {
    color: #432c1d;
    border-color: #d4c9b1;
    background: #f6eddb;
}
.calendar-window .eyebrow { color: #875026; }
.calendar-window h1 {
    color: #432c1d;
    font-family: var(--fom-serif);
    font-weight: 400;
    letter-spacing: -.035em;
}
.calendar-window h2 { color: #432c1d; }
.calendar-window .close {
    color: #432c1d;
    background: #efdfc3;
    border-color: #c3a071;
    border-radius: 5px;
}
.calendar-window .close:hover { color: #432c1d; background: #edc38a; }
.calendar-window .date-label {
    color: #885325;
    background: #eedcba;
    border-color: #bf915d;
    border-radius: 5px;
}
.calendar-window .weekdays { color: #755d45; }
.calendar-window .day-card {
    color: #432c1d;
    background: #fff7e8;
    border-color: #d6bd97;
    border-radius: 7px;
}
.calendar-window .day-number { color: #81684e; }
.calendar-window .quantity { color: #885325; }
.calendar-window .gift-state { color: #81684e; }
.calendar-window .available {
    background: #f0d4a7;
    border-color: #b57b3d;
    box-shadow: inset 0 0 0 1px #c58c4844;
}
.calendar-window .available:hover { background: #e8bd83; border-color: #875026; }
.calendar-window .available :is(.gift-state, .day-number) { color: #75451f; }
.calendar-window :is(.claimed, .legacy_claimed) { background: #e6eee3; border-color: #a2b79f; }
.calendar-window :is(.claimed, .legacy_claimed) .gift-state { color: #326047; }
.calendar-window .missed { background: #ecdfc9; border-color: #d6bd97; }
.calendar-window .missed :is(.gift-name, .quantity) { color: #88715a; }
.calendar-window .upcoming .gift-name { color: #755d45; }
.calendar-window .pending { background: #e2ebf0; border-color: #8babbc; }
.calendar-window .pending .gift-state { color: #875026; }
.calendar-window .manual_review { background: #f0e2db; border-color: #c2967c; }
.calendar-window .manual_review .gift-state { color: #874d32; }
.calendar-window #message { color: #694b32; }
.calendar-window #retry {
    color: #432c1d;
    background: #edcea1;
    border-color: #b7854b;
    border-radius: 4px;
}
.calendar-window :is(.rules, .unavailable) { color: #755d45; }
.calendar-window button:focus-visible { outline: 2px solid #875026; outline-offset: 2px; }

/* Public calendar: outrank the shared legacy panels only inside this view. */
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page {
    color: #432c1d;
    background: #f6eddb;
    margin-top: 28px;
    margin-bottom: 36px;
    padding: clamp(18px, 3vw, 36px) !important;
    border: 1px solid #d6bd97;
    border-radius: 8px;
    box-shadow: 0 14px 40px #34231718;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-hero {
    color: #fff0d6;
    background: #342317 !important;
    border: 1px solid #b7854b80 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    padding: clamp(24px, 4vw, 42px);
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-hero h1 {
    color: #fff0d6 !important;
    font-family: var(--fom-serif);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 45px);
    line-height: 1.12;
    letter-spacing: -.035em;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-hero p { color: #e2c7a5 !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-eyebrow { color: #e5b97e !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page :is(.attendance-status, .attendance-card) {
    color: #432c1d !important;
    background: #fff7e8 !important;
    border-color: #d6bd97 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page :is(h2, .attendance-item) { color: #432c1d !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page :is(.attendance-status p, .attendance-rules) { color: #755d45 !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-status { grid-template-columns: 1fr; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card::before { background: none; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-day {
    color: #755d45;
    background: #efdfc3;
    border-color: #d6bd97;
    border-radius: 4px;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-amount { color: #875026; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-state {
    color: #755d45;
    background: #ecdfc9;
    border-color: #d6bd97;
    border-radius: 4px;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card.available {
    background: #f0d4a7 !important;
    border-color: #b57b3d !important;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page :is(.claimed, .legacy_claimed) { background: #e6eee3 !important; border-color: #a2b79f !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page :is(.claimed, .legacy_claimed) .attendance-state { color: #326047; background: #d6e5d3; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card.pending { background: #e2ebf0 !important; border-color: #8babbc !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card.manual_review { background: #f0e2db !important; border-color: #c2967c !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-btn {
    color: #432c1d !important;
    background: #edc38a !important;
    border-color: #b7854b !important;
    border-radius: 4px !important;
}

@media (max-width: 620px) {
    body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page { width: calc(100% - 24px); padding: 14px !important; }
    body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-status { padding: 18px; }
}
@media (max-height: 560px) {
    .calendar-window > header { background: #f6eddb; }
}

body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-section-title { background: transparent !important; border: 0 !important; padding: 8px 0 !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card.missed {
    background: #ecdfc9 !important;
    border-color: #d6bd97 !important;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card .attendance-day,
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card .attendance-state {
    color: #755d45 !important;
    background: #ecdfc9 !important;
    border-color: #d6bd97 !important;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card .attendance-amount { color: #875026 !important; }
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page :is(.attendance-card.claimed, .attendance-card.legacy_claimed) .attendance-state {
    color: #326047 !important;
    background: #d6e5d3 !important;
    border-color: #a2b79f !important;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-card.available .attendance-state {
    color: #75451f !important;
    background: #edcea1 !important;
    border-color: #b7854b !important;
}

/* Autumn illustration: decorative paint only, existing sizing/drag/hit regions retained. */
body.shop-v4-page.is-embedded .shop-v4-hero {
 background:linear-gradient(90deg,#f6eddbe8,#fff7e8c9),url("/assets/img/patcher-autumn-20261108.jpg") center 44%/cover;
}
.calendar-window > header {
 background:linear-gradient(90deg,#f6eddbf0,#f6eddbcc),url("/assets/img/patcher-autumn-20261108.jpg") center 40%/cover;
}
body.site-pro.page-content#fom-site-ui[data-site-season="autumn"] main.attendance-page.attendance-page .attendance-hero {
 background:linear-gradient(90deg,#342317ed,#493224db),url("/assets/img/patcher-autumn-20261108.jpg") center 40%/cover!important;
}
