/* Countdown to Date - /app/countdown/ (tool page, holiday pages and embed widget).
   Tool-only styles live here, not in assets/css/main.css. */
.cd-tool { max-width: 1080px; margin: 0 auto; min-width: 0; } /* grid item in .content - without min-width:0 it grew to its widest child and the right edge was clipped */

/* HERO - light header card in the site's palette (white box, #e9f2f7 tint, #2f6e8d headings) */
.hero-section {
    text-align: center;
    padding: 1.5rem 1.25rem 1.375rem;
    background: linear-gradient(180deg, #e9f2f7 0%, #fff 70%);
    border: 1px solid #c9dde8;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}
.hero-section__icon { width: 64px; height: 64px; margin: 0 auto .875rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #3b779b; color: #fff; font-size: 1.875rem; box-shadow: 0 0 0 5px #fff, 0 0 0 6px #c9dde8; }
.hero-section__title { font-size: 1.5rem; font-weight: 700; color: #2f6e8d; margin: 0 0 .375rem; line-height: 1.25; }
.hero-section__subtitle { font-size: .9375rem; color: #4a5a68; margin: 0 auto; max-width: 640px; line-height: 1.55; }

/* ============================================
   COUNTDOWN STAGE
   ============================================ */
.cd-stage {
    border-radius: 12px;
    padding: 3rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cd-border, #2a1a4a);
    background: var(--cd-stage-bg, linear-gradient(135deg, #1a0f2e 0%, #0e0820 100%));
    transition: background 0.4s ease;
}
.cd-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cd-stage-glow, radial-gradient(circle at 30% 70%, rgba(147, 51, 234, 0.18) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.10) 0%, transparent 50%));
    pointer-events: none;
    z-index: 0;
}
.cd-stage > * { position: relative; z-index: 1; }

.cd-event-name {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--cd-text, #fff);
    text-align: center;
    margin: 0 0 0.5rem;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.cd-event-target {
    font-size: 0.875rem;
    color: var(--cd-muted, rgba(255,255,255,0.6));
    margin: 0 0 1.75rem;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
}

.cd-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.5rem, 1.5vw, 1.25rem);
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
}
.cd-grid--with-weeks { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.cd-tile {
    background: var(--cd-tile-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--cd-tile-border, rgba(255,255,255,0.1));
    border-radius: 10px;
    padding: clamp(0.75rem, 2vw, 1.5rem) clamp(0.5rem, 1.5vw, 1rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
}
.cd-tile__num {
    font-size: clamp(2.25rem, 7vw, 5.5rem);
    font-weight: 700;
    color: var(--cd-text, #fff);
    line-height: 1;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.cd-tile__num.cd-pop { transform: scale(1.08); opacity: 0.85; }
.cd-tile__label {
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cd-muted, rgba(255,255,255,0.55));
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* PROGRESS BAR */
.cd-progress-wrap {
    width: 100%;
    max-width: 880px;
    margin: 1.5rem auto 0;
    display: none;
}
.cd-progress-wrap.visible { display: block; }
.cd-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}
.cd-progress-fill {
    height: 100%;
    background: var(--cd-accent, linear-gradient(90deg, #c084fc, #ec4899));
    border-radius: 999px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.cd-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--cd-muted, rgba(255,255,255,0.55));
    margin-top: 0.5rem;
    font-family: 'Segoe UI', sans-serif;
}

/* ZERO BANNER */
.cd-zero-banner {
    display: none;
    margin-top: 1.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(90deg, #ec4899, #c084fc);
    color: #fff;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35);
    animation: cd-pulse 1.6s ease-in-out infinite;
    font-family: 'Segoe UI', sans-serif;
}
.cd-stage.cd-finished .cd-zero-banner { display: inline-block; }
@keyframes cd-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
.cd-since-tag {
    display: none;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--cd-muted, rgba(255,255,255,0.65));
    font-family: 'Segoe UI', sans-serif;
}
.cd-stage.cd-since .cd-since-tag { display: block; }

/* THEMES */
.cd-stage[data-theme="purple"] { --cd-stage-bg: linear-gradient(135deg, #1a0f2e 0%, #0e0820 100%); --cd-stage-glow: radial-gradient(circle at 30% 70%, rgba(147, 51, 234, 0.20) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.12) 0%, transparent 50%); --cd-border: #2a1a4a; --cd-tile-bg: rgba(192, 132, 252, 0.08); --cd-tile-border: rgba(192, 132, 252, 0.2); --cd-text: #fff; --cd-muted: rgba(255,255,255,0.6); --cd-accent: linear-gradient(90deg, #c084fc, #ec4899); }
.cd-stage[data-theme="ocean"] { --cd-stage-bg: linear-gradient(135deg, #082f49 0%, #0c1e2e 100%); --cd-stage-glow: radial-gradient(circle at 30% 70%, rgba(14, 165, 233, 0.22) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(20, 184, 166, 0.14) 0%, transparent 50%); --cd-border: #134e6f; --cd-tile-bg: rgba(56, 189, 248, 0.08); --cd-tile-border: rgba(56, 189, 248, 0.22); --cd-text: #fff; --cd-muted: rgba(255,255,255,0.6); --cd-accent: linear-gradient(90deg, #38bdf8, #2dd4bf); }
.cd-stage[data-theme="sunset"] { --cd-stage-bg: linear-gradient(135deg, #4a1d0a 0%, #2a0e08 100%); --cd-stage-glow: radial-gradient(circle at 30% 70%, rgba(249, 115, 22, 0.24) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(251, 191, 36, 0.16) 0%, transparent 50%); --cd-border: #6e2a1a; --cd-tile-bg: rgba(251, 146, 60, 0.10); --cd-tile-border: rgba(251, 146, 60, 0.24); --cd-text: #fff; --cd-muted: rgba(255,255,255,0.6); --cd-accent: linear-gradient(90deg, #fb923c, #fbbf24); }
.cd-stage[data-theme="forest"] { --cd-stage-bg: linear-gradient(135deg, #0e2818 0%, #061308 100%); --cd-stage-glow: radial-gradient(circle at 30% 70%, rgba(34, 197, 94, 0.20) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(132, 204, 22, 0.12) 0%, transparent 50%); --cd-border: #14532d; --cd-tile-bg: rgba(74, 222, 128, 0.08); --cd-tile-border: rgba(74, 222, 128, 0.22); --cd-text: #fff; --cd-muted: rgba(255,255,255,0.6); --cd-accent: linear-gradient(90deg, #4ade80, #a3e635); }
.cd-stage[data-theme="midnight"] { --cd-stage-bg: linear-gradient(135deg, #0f172a 0%, #020617 100%); --cd-stage-glow: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, 0.18) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(148, 163, 184, 0.08) 0%, transparent 50%); --cd-border: #1e293b; --cd-tile-bg: rgba(148, 163, 184, 0.08); --cd-tile-border: rgba(148, 163, 184, 0.18); --cd-text: #f1f5f9; --cd-muted: rgba(241,245,249,0.5); --cd-accent: linear-gradient(90deg, #6366f1, #94a3b8); }
.cd-stage[data-theme="candy"] { --cd-stage-bg: linear-gradient(135deg, #4a0a2a 0%, #2a0820 100%); --cd-stage-glow: radial-gradient(circle at 30% 70%, rgba(236, 72, 153, 0.24) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(244, 114, 182, 0.16) 0%, transparent 50%); --cd-border: #6e1a4a; --cd-tile-bg: rgba(244, 114, 182, 0.10); --cd-tile-border: rgba(244, 114, 182, 0.24); --cd-text: #fff; --cd-muted: rgba(255,255,255,0.6); --cd-accent: linear-gradient(90deg, #f472b6, #fb7185); }

/* ============================================
   WIN-STYLE CONTROL PANEL
   ============================================ */
.win-control-panel { background: #fff; border: 1px solid #c9dde8; border-radius: 8px; margin-bottom: 2rem; overflow: hidden; }
.win-titlebar { background: #e9f2f7; color: #2f6e8d; padding: .75rem 1rem; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #c9dde8; }
.win-titlebar__icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; color: #3b779b; }
.win-titlebar__text { flex: 1; font-size: 1.125rem; font-weight: 700; color: #2f6e8d; }
.win-titlebar__buttons { display: none; }
.win-titlebar__btn { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.win-titlebar__btn--minimize { background: #ffc107; }
.win-titlebar__btn--maximize { background: #28a745; }
.win-titlebar__btn--close { background: #dc3545; }

.win-panel-content { padding: 20px; font-family: 'Segoe UI', sans-serif; }
.win-section { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #e8eef3; }
.win-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.win-section__title { font-size: 0.875rem; font-weight: 700; color: #2f6e8d; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.win-section__title i { color: #4bb2d5; }
.mode-section { display: none; }
.mode-section.active { display: block; }

.win-input-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 8px; }
.win-input-row--three { grid-template-columns: repeat(3, 1fr); }
.win-input-row--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) {
    .win-input-row, .win-input-row--three, .win-input-row--four { grid-template-columns: 1fr; }
}
.win-input-group { display: flex; flex-direction: column; gap: 4px; }
.win-input-label { font-size: 0.75rem; font-weight: 600; color: #5a7a8a; text-transform: uppercase; letter-spacing: 0.5px; }
.win-input, .win-select {
    width: 100%; padding: 8px 10px; border: 1px solid #c5d4e0; border-radius: 4px;
    font-size: 0.875rem; color: #2c3e50; background: #fff; font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.win-input:focus, .win-select:focus { outline: none; border-color: #4bb2d5; box-shadow: 0 0 0 3px rgba(75,178,213,0.18); }

.win-toggle-list { display: flex; flex-direction: column; gap: 8px; }
.win-toggle { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 4px; cursor: pointer; transition: background 0.15s ease; }
.win-toggle:hover { background: #f4f8fb; }
.win-toggle input { display: none; }
.win-toggle__switch { width: 36px; height: 20px; background: #c5d4e0; border-radius: 999px; position: relative; transition: background 0.2s ease; flex-shrink: 0; }
.win-toggle__switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.win-toggle input:checked + .win-toggle__switch { background: #4bb2d5; }
.win-toggle input:checked + .win-toggle__switch::after { transform: translateX(16px); }
.win-toggle__text { display: flex; flex-direction: column; gap: 2px; }
.win-toggle__label { font-size: 0.875rem; font-weight: 600; color: #2c3e50; }
.win-toggle__hint { font-size: 0.75rem; color: #5a7a8a; }

/* PRESETS */
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-chip {
    padding: 7px 14px; border: 1px solid #c5d4e0; background: #f4f8fb; border-radius: 999px;
    font-size: 0.8125rem; font-weight: 600; color: #3b779b; cursor: pointer;
    transition: all 0.15s ease; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px;
}
.preset-chip:hover { background: #4bb2d5; color: #fff; border-color: #4bb2d5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(75,178,213,0.25); }
.preset-chip i { font-size: 0.875rem; }

/* THEMES */
.theme-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 700px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-card { border: 2px solid #e8eef3; border-radius: 8px; padding: 8px; cursor: pointer; transition: all 0.15s ease; text-align: center; background: #f8fafc; }
.theme-card:hover { border-color: #4bb2d5; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(75,178,213,0.18); }
.theme-card.active { border-color: #4bb2d5; background: #e8f4f9; box-shadow: 0 0 0 3px rgba(75,178,213,0.15); }
.theme-card__swatch { width: 100%; height: 38px; border-radius: 6px; margin-bottom: 6px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.15); }
.theme-card[data-theme="purple"] .theme-card__swatch { background: linear-gradient(135deg, #1a0f2e 0%, #c084fc 100%); }
.theme-card[data-theme="ocean"] .theme-card__swatch { background: linear-gradient(135deg, #082f49 0%, #38bdf8 100%); }
.theme-card[data-theme="sunset"] .theme-card__swatch { background: linear-gradient(135deg, #4a1d0a 0%, #fbbf24 100%); }
.theme-card[data-theme="forest"] .theme-card__swatch { background: linear-gradient(135deg, #0e2818 0%, #4ade80 100%); }
.theme-card[data-theme="midnight"] .theme-card__swatch { background: linear-gradient(135deg, #0f172a 0%, #6366f1 100%); }
.theme-card[data-theme="candy"] .theme-card__swatch { background: linear-gradient(135deg, #4a0a2a 0%, #f472b6 100%); }
.theme-card__name { margin: 0; font-size: 0.75rem; font-weight: 600; color: #2c3e50; }

/* TIPS */
.win-tips { margin-top: 12px; padding: 12px 14px; background: #fff8e1; border-left: 3px solid #f59e0b; border-radius: 4px; }
.win-tips__title { font-size: 0.8125rem; font-weight: 700; color: #92400e; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.win-tips__title i { color: #f59e0b; }
.win-tips__list { margin: 0; padding-left: 18px; color: #78350f; font-size: 0.8125rem; line-height: 1.7; }
.win-tips__list li { margin: 0; }
.win-tips__list kbd { display: inline-block; padding: 1px 6px; font: 600 11px 'Consolas', monospace; background: #fff; border: 1px solid #d4a76a; border-radius: 3px; color: #78350f; }

/* BUTTON ROWS */
.win-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e8eef3; }
.win-btn { padding: 9px 16px; border-radius: 6px; font-size: 0.875rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; font-family: inherit; transition: all 0.15s ease; flex: 1; justify-content: center; min-width: 140px; }
.win-btn-primary { background: #4bb2d5; color: #fff; border-color: #3b9bbf; }
.win-btn-primary:hover { background: #3b779b; border-color: #2f6e8d; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(75,178,213,0.25); }
.win-btn-secondary { background: #fff; color: #3b779b; border-color: #c5d4e0; }
.win-btn-secondary:hover { background: #f4f8fb; border-color: #4bb2d5; color: #2f6e8d; }
.win-btn-share { background: #fff; color: #3a9d85; border-color: #b5e6da; }
.win-btn-share:hover { background: #3a9d85; color: #fff; border-color: #3a9d85; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(58,157,133,0.25); }
.win-btn-share.copied { background: #28a745; color: #fff; border-color: #28a745; }
.win-btn-ics { background: #fff; color: #ce3527; border-color: #f5c2bd; }
.win-btn-ics:hover { background: #ce3527; color: #fff; border-color: #ce3527; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(206,53,39,0.25); }

/* FEATURES ROW */
.features-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .features-row { grid-template-columns: 1fr; } }
.feature-box { background: #fff; border: 1px solid #e8eef3; border-radius: 8px; padding: 1.5rem 1.25rem; text-align: center; transition: all 0.2s ease; }
.feature-box:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); border-color: #c084fc; }
.feature-box__icon { width: 56px; height: 56px; margin: 0 auto 0.875rem; background: linear-gradient(135deg, rgba(192,132,252,0.15), rgba(236,72,153,0.10)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #9333ea; }
.feature-box__title { font-size: 1rem; font-weight: 700; color: #2f6e8d; margin: 0 0 0.4rem; }
.feature-box__desc { font-size: 0.875rem; color: #5a7a8a; margin: 0; line-height: 1.5; }

/* INFO CARDS */
.info-card { background: #fff; border: 1px solid #e8eef3; border-radius: 8px; margin-bottom: 1.25rem; overflow: hidden; }
.info-card__header { padding: 0.875rem 1.25rem; background: #f8fafc; border-bottom: 1px solid #e8eef3; display: flex; align-items: center; gap: 10px; }
.info-card__header i { color: #c084fc; font-size: 1.125rem; }
.info-card__title { font-size: 1rem; font-weight: 700; color: #2f6e8d; margin: 0; }
.info-card__body { padding: 1.25rem; color: #4a5a68; line-height: 1.7; font-size: 0.9375rem; }
.info-card__body p { margin: 0 0 0.875rem; }
.info-card__body p:last-child { margin: 0; }
.info-card__body strong { color: #2f6e8d; }
.info-card__body kbd { display: inline-block; padding: 1px 6px; font: 600 11px 'Consolas', monospace; background: #f4f8fb; border: 1px solid #c5d4e0; border-radius: 3px; color: #3b779b; }

/* USE CASES */
.use-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 768px) { .use-cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .use-cases { grid-template-columns: 1fr; } }
.use-case { padding: 1rem; background: #f8fafc; border: 1px solid #e8eef3; border-radius: 6px; transition: all 0.2s ease; }
.use-case:hover { background: #fff; border-color: #c084fc; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(192,132,252,0.15); }
.use-case__icon { width: 38px; height: 38px; background: linear-gradient(135deg, rgba(192,132,252,0.15), rgba(236,72,153,0.10)); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #9333ea; font-size: 1.125rem; margin-bottom: 0.6rem; }
.use-case__title { font-size: 0.9375rem; font-weight: 700; color: #2f6e8d; margin: 0 0 0.35rem; }
.use-case__desc { font-size: 0.8125rem; color: #5a7a8a; margin: 0; line-height: 1.5; }

/* FAQ */

/* SHARE/EXPORT MODAL */
.cd-modal { display: none; position: fixed; inset: 0; background: rgba(15,8,32,0.7); z-index: 2147483646; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(4px); }
.cd-modal.visible { display: flex; }
.cd-modal__box { background: #fff; border-radius: 10px; padding: 1.5rem; max-width: 380px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.cd-modal__title { font-size: 1.125rem; font-weight: 700; color: #2f6e8d; margin: 0 0 1rem; display: flex; align-items: center; gap: 8px; }
.cd-modal__title i { color: #c084fc; }
.cd-modal__qr { background: #fff; padding: 1rem; border: 1px solid #e8eef3; border-radius: 8px; display: flex; justify-content: center; }
.cd-modal__qr canvas, .cd-modal__qr img { max-width: 100%; height: auto; }
.cd-modal__url { margin-top: 0.875rem; padding: 0.625rem; background: #f8fafc; border: 1px solid #e8eef3; border-radius: 6px; font-family: 'Consolas', monospace; font-size: 0.75rem; color: #3b779b; word-break: break-all; max-height: 80px; overflow: auto; }
.cd-modal__close { display: block; margin-left: auto; margin-top: 1rem; padding: 8px 18px; background: #4bb2d5; color: #fff; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cd-modal__close:hover { background: #3b779b; }

/* CONFETTI CANVAS */
.cd-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

/* FULLSCREEN MODE */
body.cd-fullscreen, html.cd-fullscreen { overflow: hidden !important; height: 100% !important; margin: 0 !important; padding: 0 !important; }
.cd-stage.fullscreen-active { position: fixed; inset: 0; z-index: 2147483647; border-radius: 0; border: none; padding: 0 1rem; min-height: 100vh; justify-content: center; }
.cd-stage.fullscreen-active .cd-event-name { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 1.5rem; }
.cd-stage.fullscreen-active .cd-event-target { font-size: clamp(1rem, 1.5vw, 1.5rem); margin-bottom: 3rem; }
.cd-stage.fullscreen-active .cd-tile__num { font-size: clamp(4rem, 13vw, 12rem); }
.cd-stage.fullscreen-active .cd-tile__label { font-size: clamp(0.9rem, 1.4vw, 1.4rem); margin-top: 1rem; }
.cd-stage.fullscreen-active .cd-grid { max-width: 95vw; gap: clamp(1rem, 2vw, 2.5rem); }
.cd-stage.fullscreen-active .cd-tile { padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 2rem); }
.cd-stage.fullscreen-active .cd-progress-wrap { max-width: 80vw; margin-top: 2.5rem; }

.exit-hint { position: fixed; top: 20px; right: 20px; padding: 10px 20px; background: rgba(0,0,0,0.85); color: rgba(255,255,255,0.9); font-size: 13px; border-radius: 6px; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; z-index: 2147483648; font-family: 'Segoe UI', sans-serif; }
.exit-hint.visible { opacity: 1; }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); padding: 12px 24px; background: #1f1f1f; color: #fff; border-radius: 6px; font-size: 14px; z-index: 2147483647; transition: transform 0.3s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.3); border: 1px solid #404040; font-family: 'Segoe UI', sans-serif; }
.toast.visible { transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
    .hero-section { padding: 1.25rem 1rem; }
    .hero-section__title { font-size: 1.3rem; }
    .win-panel-content { padding: 16px; }
    .cd-stage { padding: 2rem 0.75rem; }
    .cd-grid { gap: 0.5rem; }
    .cd-tile { padding: 0.75rem 0.5rem; }
}

/* ==========================================================================
   /app/countdown/ - holiday countdown pages (/app/countdown/christmas/ etc.)
   Each card/hero sets --cd-hol-accent (dark enough for white icons and
   4.5:1 text on white). Mobile-first: 1 column, 2 from 520px, 3 from 900px.
   ========================================================================== */
.cd-hol-hero__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto .875rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--cd-hol-accent, #3b779b);
	color: #fff;
	font-size: 1.875rem;
	box-shadow: 0 0 0 5px #fff, 0 0 0 6px #c9dde8;
}
.cd-hol-hero__days {
	margin: .125rem 0 .5rem;
	font-size: clamp(1.625rem, 6vw, 2.25rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--cd-hol-accent, #2f6e8d);
	font-variant-numeric: tabular-nums;
}
.cd-hol-hero .hero-section__subtitle strong { color: #1f3a4d; }

.cd-hol {
	margin: 0 0 1.25rem;
	padding: 1.125rem 1rem 1.25rem;
	background: #fff;
	border: 1px solid #e8eef3;
	border-radius: 8px;
}
.cd-hol__title {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: 0 0 .25rem;
	font-size: 1.0625rem;
	font-weight: 700;
	color: #2f6e8d;
}
.cd-hol__title i { color: #be185d; }
.cd-hol__lead { margin: 0 0 .875rem; font-size: .875rem; color: #5a6b78; }
.cd-hol__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: .5rem;
}
@media (min-width: 520px) { .cd-hol__grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.cd-hol__grid > li { min-width: 0; } /* lets long names ellipsize instead of widening the page column */
.cd-hol__card {
	display: flex;
	align-items: center;
	gap: .75rem;
	min-height: 56px;
	padding: .5rem .75rem;
	border: 1px solid #e3e9ef;
	border-radius: 8px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.cd-hol__card:hover { border-color: var(--cd-hol-accent, #2f6e8d); box-shadow: 0 4px 14px rgba(15, 40, 60, .08); transform: translateY(-1px); text-decoration: none; }
.cd-hol__card:focus-visible { outline: 3px solid var(--cd-hol-accent, #2f6e8d); outline-offset: 2px; }
.cd-hol__card[aria-current="page"] { border-color: var(--cd-hol-accent, #2f6e8d); box-shadow: inset 0 0 0 1px var(--cd-hol-accent, #2f6e8d); background: #f8fafc; }
.cd-hol__icon {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: var(--cd-hol-accent, #2f6e8d);
	color: #fff;
	font-size: 1.125rem;
}
.cd-hol__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cd-hol__name { font-size: .9375rem; font-weight: 600; color: #1f3a4d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-hol__date { font-size: .8125rem; color: #5a6b78; }
.cd-hol__days { flex-shrink: 0; font-size: .875rem; font-weight: 700; color: var(--cd-hol-accent, #2f6e8d); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cd-hol__days.is-today { padding: 2px 8px; border-radius: 999px; background: var(--cd-hol-accent, #2f6e8d); color: #fff; }
.cd-hol__more { margin: .875rem 0 0; }
.cd-hol__more a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-size: .9375rem; font-weight: 600; color: #2f6e8d; }

/* "When is <holiday>?" dates table */
.cd-dates-wrap { overflow-x: auto; margin-top: .25rem; }
.cd-dates { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.cd-dates th,
.cd-dates td { padding: .625rem .5rem; text-align: left; border-bottom: 1px solid #e8eef3; white-space: nowrap; }
.cd-dates thead th { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #5a6b78; background: #f8fafc; }
.cd-dates tbody th { color: #2f6e8d; font-weight: 700; }
.cd-dates th:last-child,
.cd-dates td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cd-dates tr.is-next td,
.cd-dates tr.is-next th { background: #f5f3ff; font-weight: 700; }
.cd-dates tbody tr:last-child th,
.cd-dates tbody tr:last-child td { border-bottom: 0; }
.cd-dates__short { display: none; }
@media (max-width: 479px) {
	.cd-dates { font-size: .875rem; }
	.cd-dates th, .cd-dates td { padding: .5rem .375rem; }
	.cd-dates__long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.cd-dates__short { display: inline; }
}
@media (min-width: 600px) { .cd-dates th, .cd-dates td { padding: .625rem .875rem; } }

.cd-facts { margin: 0; padding-left: 1.25rem; }
.cd-facts li { margin: 0 0 .5rem; }
.cd-facts li:last-child { margin-bottom: 0; }

/* Grid groups */
.cd-hol__group { margin: 1.125rem 0 .5rem; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #5a6b78; }
.cd-hol__days--set { padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: .75rem; }
.cd-dates-note { display: flex; gap: .5rem; align-items: flex-start; margin: .875rem 0 0 !important; padding: .625rem .75rem; background: #f8fafc; border: 1px solid #e8eef3; border-radius: 6px; font-size: .8125rem; color: #4a5a68; }
.cd-dates-note i { color: #2f6e8d; margin-top: 2px; }

/* "Set your own date" card (birthday, last day of school) */
.cd-setup {
	margin: 0 0 1.25rem;
	padding: 1rem;
	background: #fff;
	border: 2px solid var(--cd-hol-accent, #2f6e8d);
	border-radius: 10px;
}
.cd-setup__title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; font-size: 1.0625rem; font-weight: 700; color: #1f3a4d; }
.cd-setup__title i { color: var(--cd-hol-accent, #2f6e8d); }
.cd-setup__form { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: end; }
.cd-setup__field { display: flex; flex-direction: column; gap: .25rem; font-size: .8125rem; font-weight: 600; color: #4a5a68; grid-column: 1 / -1; }
.cd-setup__field--sm { grid-column: auto; }
.cd-setup__field em { font-style: normal; font-weight: 400; color: #5a6b78; }
.cd-setup__field input,
.cd-setup__field select { min-height: 44px; padding: .5rem .625rem; font: inherit; font-size: 1rem; font-weight: 400; color: #1f3a4d; background: #fff; border: 1px solid #c5d4e0; border-radius: 6px; width: 100%; }
.cd-setup__field input:focus-visible,
.cd-setup__field select:focus-visible { outline: 3px solid var(--cd-hol-accent, #2f6e8d); outline-offset: 1px; border-color: transparent; }
.cd-setup__actions { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }
.cd-setup__btn,
.cd-setup__reset { min-height: 44px; padding: .5rem 1.125rem; font: inherit; font-weight: 600; border-radius: 6px; cursor: pointer; }
.cd-setup__btn { background: var(--cd-hol-accent, #2f6e8d); color: #fff; border: 0; }
.cd-setup__btn:hover { filter: brightness(1.1); }
.cd-setup__reset { background: #fff; color: #2f6e8d; border: 1px solid #c5d4e0; }
.cd-setup__btn:focus-visible,
.cd-setup__reset:focus-visible { outline: 3px solid #1f3a4d; outline-offset: 2px; }
.cd-setup__result { margin: .75rem 0 0; font-size: .9375rem; color: #1f3a4d; }
.cd-setup__result:empty { display: none; }
@media (min-width: 720px) {
	.cd-setup__form { grid-template-columns: 1.4fr .7fr 1fr 1.4fr auto; }
	.cd-setup__field, .cd-setup__actions { grid-column: auto; }
	.cd-setup__form[data-type="date"] { grid-template-columns: minmax(200px, 280px) auto; justify-content: start; }
}

/* Personal page before a date is set */
.cd-stage__empty { display: none; position: relative; z-index: 1; margin: 1rem 0 0; font-size: 1.0625rem; color: var(--cd-muted, rgba(255,255,255,.7)); text-align: center; }
.cd-stage__empty i { display: block; margin-bottom: .5rem; font-size: 2.5rem; color: var(--cd-text, #fff); }
.cd-stage--empty .cd-stage__empty { display: block; }
.cd-stage--empty .cd-grid,
.cd-stage--empty .cd-progress-wrap,
.cd-stage--empty .cd-event-target { display: none !important; }

/* Holiday checklist */
.cd-check .info-card__header { flex-wrap: wrap; }
.cd-check .info-card__header i { color: var(--cd-hol-accent, #2f6e8d); }
.cd-check__count { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: #eef2f6; font-size: .8125rem; font-weight: 600; color: #4a5a68; }
.cd-check.is-done .cd-check__count { background: var(--cd-hol-accent, #2f6e8d); color: #fff; }
.cd-check__list { list-style: none; margin: 0; padding: 0; }
.cd-check__list li { border-bottom: 1px solid #eef2f6; }
.cd-check__list li:last-child { border-bottom: 0; }
.cd-check__item { display: flex; align-items: flex-start; gap: .75rem; min-height: 44px; padding: .625rem 0; cursor: pointer; color: #1f3a4d; }
.cd-check__item input { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cd-hol-accent, #2f6e8d); cursor: pointer; }
.cd-check__item input:focus-visible { outline: 3px solid var(--cd-hol-accent, #2f6e8d); outline-offset: 2px; }
.cd-check__item input:checked + span { color: #6b7c88; text-decoration: line-through; }
.cd-check__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .75rem; font-size: .8125rem; color: #5a6b78; }
.cd-check__reset { min-height: 40px; padding: .375rem .875rem; font: inherit; font-size: .8125rem; font-weight: 600; color: #2f6e8d; background: #fff; border: 1px solid #c5d4e0; border-radius: 6px; cursor: pointer; }
.cd-check__reset:focus-visible { outline: 3px solid #2f6e8d; outline-offset: 2px; }
.cd-links { margin: 1rem 0 0 !important; padding-top: .875rem; border-top: 1px solid #eef2f6; font-size: .875rem; }
.cd-links a { font-weight: 600; color: #2f6e8d; }

/* Sponsored / affiliate deals (only rendered when 'deals' is filled in _holidays.php) */
.cd-deals { margin-top: 1rem; padding: .875rem 1rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; }
.cd-deals__title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: .9375rem; font-weight: 700; color: #1f3a4d; }
.cd-deals__badge { padding: 1px 8px; border-radius: 999px; background: #fef3c7; border: 1px solid #f59e0b; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #92400e; }
.cd-deals__list { margin: 0; padding-left: 1.125rem; }
.cd-deals__list li { margin: .375rem 0; }
.cd-deals__list a { font-weight: 600; color: #2f6e8d; }
.cd-deals__list span { color: #5a6b78; font-size: .875rem; }

/* Embed modal */
.cd-modal__box.cd-embed { max-width: 620px; max-height: calc(100vh - 2rem); overflow: auto; }
.cd-embed__lead { margin: -.25rem 0 .875rem; font-size: .875rem; color: #4a5a68; line-height: 1.5; }
.cd-embed__sizes { display: flex; gap: 1rem; margin-bottom: .75rem; font-size: .875rem; color: #1f3a4d; }
.cd-embed__sizes label { display: inline-flex; align-items: center; gap: .375rem; min-height: 40px; cursor: pointer; }
.cd-embed__preview { padding: .75rem; background: #f1f5f8; border: 1px solid #e8eef3; border-radius: 8px; }
.cd-embed__preview iframe { display: block; width: 100%; border: 0; margin: 0 auto; }
.cd-embed__label { display: block; margin: .875rem 0 .25rem; font-size: .8125rem; font-weight: 700; color: #2f6e8d; }
.cd-embed__code { width: 100%; padding: .625rem; font: 12px/1.5 'Consolas', monospace; color: #1f3a4d; background: #f8fafc; border: 1px solid #c5d4e0; border-radius: 6px; resize: vertical; }
.cd-embed__actions { display: flex; justify-content: flex-end; gap: .5rem; }
.cd-embed__actions .cd-modal__close { margin-left: 0; min-height: 44px; }
.cd-embed__close { background: #fff !important; color: #2f6e8d !important; border: 1px solid #c5d4e0 !important; }
.cd-embed__copy { background: #2f6e8d !important; }
.cd-embed__copy:hover { background: #245a74 !important; }
.cd-embed__actions .cd-modal__close:focus-visible { outline: 3px solid #1f3a4d; outline-offset: 2px; }

/* Fullscreen button inside the live countdown box (top right) */
.cd-fs-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	min-height: 40px;
	padding: 0 .875rem;
	font: inherit;
	font-size: .8125rem;
	font-weight: 600;
	color: #fff;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 999px;
	cursor: pointer;
	backdrop-filter: blur(4px);
	transition: background .15s ease, border-color .15s ease;
}
.cd-fs-btn i { font-size: 1rem; }
.cd-fs-btn:hover { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .6); }
.cd-fs-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cd-stage.fullscreen-active .cd-fs-btn { display: none; }
.cd-stage { padding-top: 3.75rem; }
@media (max-width: 479px) {
	.cd-fs-btn { width: 44px; min-height: 44px; padding: 0; justify-content: center; top: 8px; right: 8px; }
	.cd-fs-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Small phones: keep 3-digit day counts and the labels on one line
   (main.css sets word-break: break-word on .content__main below 768px) */
.cd-tile__num, .cd-tile__label { word-break: normal; overflow-wrap: normal; white-space: nowrap; }
@media (max-width: 479px) {
	.cd-stage { padding-left: .5rem; padding-right: .5rem; }
	.cd-grid { gap: .375rem; }
	.cd-tile { padding: .75rem .25rem; }
	.cd-tile__num { font-size: clamp(1.5rem, 8.5vw, 2.25rem); }
	.cd-tile__label { font-size: .625rem; letter-spacing: .5px; }
}

/* "Embed this countdown" text link under the live countdown box */
.cd-embed-link { margin: -1.25rem 0 1.5rem; text-align: center; }
.cd-embed-link__btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .25rem .75rem; font: inherit; font-size: .9375rem; font-weight: 600; color: #2f6e8d; background: none; border: 0; border-radius: 6px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cd-embed-link__btn:hover { color: #1f4e66; background: #e9f2f7; }
.cd-embed-link__btn:focus-visible { outline: 3px solid #2f6e8d; outline-offset: 2px; }

/* Top-right tools in the live countdown box: Save image + Fullscreen */
.cd-stage__tools { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 8px; }
.cd-stage__tools .cd-fs-btn { position: static; }
.cd-stage.fullscreen-active .cd-stage__tools { display: none; }
@media (max-width: 479px) {
	.cd-stage__tools { top: 8px; right: 8px; gap: 6px; }
}

/* Share-as-image dialog */
.cd-modal__box.cd-img { max-width: 560px; max-height: calc(100vh - 2rem); overflow: auto; }
.cd-img__preview { display: flex; justify-content: center; padding: .75rem; background: #f1f5f8; border: 1px solid #e8eef3; border-radius: 8px; margin-bottom: .875rem; }
.cd-img__preview canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 52vh; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.cd-img .cd-embed__actions { flex-wrap: wrap; }
.cd-img [hidden] { display: none !important; }
@media (max-width: 479px) {
	/* keep the words on the image button - it's the one people look for on a phone */
	.cd-stage__tools #cdImageBtn { width: auto; padding: 0 .875rem; }
	.cd-stage__tools #cdImageBtn span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
