/* ============================================================
   Holiday Times — Material Design 3  v2.0
   ============================================================ */

/* No external font requests — GDPR compliant system font stack.
   Roboto is pre-installed on Android/ChromeOS. Other platforms
   fall back to their native UI font which matches MD3 aesthetics. */

/* ── MD3 Color Tokens ─────────────────────────────────────── */
.ht-wrap {
    --md-primary:              #1a56db;
    --md-on-primary:           #ffffff;
    --md-primary-container:    #dde3ff;
    --md-on-primary-container: #00105c;
    --md-secondary:            #5b5d72;
    --md-secondary-container:  #e0e0f9;
    --md-on-secondary-container: #181a2c;
    --md-tertiary:             #76517a;
    --md-tertiary-container:   #ffd6fd;
    --md-error:                #ba1a1a;
    --md-error-container:      #ffdad6;
    --md-bg:                   #faf9ff;
    --md-surface:              #faf9ff;
    --md-surface-variant:      #e3e1ec;
    --md-on-surface:           #1b1b1f;
    --md-on-surface-variant:   #46464f;
    --md-outline:              #777680;
    --md-outline-variant:      #c7c5d0;
    --md-surface-tonal:        #f0efff;
    --md-elev1: 0px 1px 2px rgba(0,0,0,.30), 0px 1px 3px 1px rgba(0,0,0,.15);
    --md-elev2: 0px 1px 2px rgba(0,0,0,.30), 0px 2px 6px 2px rgba(0,0,0,.15);
    --md-elev3: 0px 4px 8px 3px rgba(0,0,0,.15), 0px 1px 3px rgba(0,0,0,.30);
    --md-shape-xs:   4px;
    --md-shape-sm:   8px;
    --md-shape-md:   12px;
    --md-shape-lg:   16px;
    --md-shape-full: 100px;
    --md-font: Roboto, 'Roboto Flex', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    font-family: var(--md-font);
    font-size: 14px;
    color: var(--md-on-surface);
    background: var(--md-bg);
    padding: 24px 16px 48px;
    max-width: 1100px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
    /* Prevent horizontal overflow on mobile */
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ── Controls ─────────────────────────────────────────────── */
.ht-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 16px;
    background: var(--md-surface-tonal);
    border-radius: var(--md-shape-lg);
    box-shadow: var(--md-elev1);
}
.ht-field {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ht-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--md-primary);
    margin-bottom: 4px;
    padding-left: 4px;
}
.ht-select {
    appearance: none;
    background: var(--md-surface)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%2346464f' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")
        no-repeat right 10px center;
    border: 1px solid var(--md-outline);
    border-radius: var(--md-shape-xs);
    padding: 12px 40px 12px 14px;
    font-family: var(--md-font);
    font-size: 14px;
    color: var(--md-on-surface);
    cursor: pointer;
    transition: border-color .15s;
    line-height: 1.4;
    width: 100%;
}
.ht-select:hover { border-color: var(--md-on-surface); }
.ht-select:focus { outline: none; border: 2px solid var(--md-primary); }

/* ── Segmented year buttons ───────────────────────────────── */
.ht-year-tabs {
    display: flex;
    margin-left: auto;
    border: 1px solid var(--md-outline);
    border-radius: var(--md-shape-full);
    overflow: hidden;
    flex-shrink: 0;
}
.ht-year-btn {
    background: transparent;
    border: none;
    border-right: 1px solid var(--md-outline);
    padding: 10px 20px;
    font-family: var(--md-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--md-on-surface);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.ht-year-btn:last-child { border-right: none; }
.ht-year-btn:hover { background: rgba(26,86,219,.08); color: var(--md-primary); }
.ht-year-btn.active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.ht-year-btn.active::before { content: '✓ '; font-size: 12px; opacity: .8; }

/* ── Loading ──────────────────────────────────────────────── */
.ht-loading { display: none; justify-content: center; align-items: center; padding: 48px; gap: 16px; }
.ht-loading.is-visible { display: flex; }
.ht-loading-text { font-size: 14px; color: var(--md-on-surface-variant); }
.ht-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--md-primary-container);
    border-top-color: var(--md-primary);
    border-radius: 50%;
    animation: ht-spin .8s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes ht-spin { to { transform: rotate(360deg); } }

/* ── Year section ─────────────────────────────────────────── */
.ht-year-group { margin-bottom: 40px; }
.ht-year-group.is-hidden { display: none; }
.ht-year-label {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: -.02em;
    margin-bottom: 16px;
    padding-left: 4px;
    line-height: 1;
    user-select: none;
    background: linear-gradient(90deg, var(--md-primary) 0%, var(--md-on-surface-variant) 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Month grid ───────────────────────────────────────────── */
.ht-months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 12px;
}
.ht-month-card {
    background: var(--md-surface);
    border-radius: var(--md-shape-lg);
    padding: 16px;
    box-shadow: var(--md-elev1);
    border: 1px solid var(--md-outline-variant);
    transition: box-shadow .2s, transform .2s;
    opacity: 0;
    animation: ht-fade-up .3s cubic-bezier(.2,0,0,1) forwards;
}
.ht-month-card:hover { box-shadow: var(--md-elev2); transform: translateY(-2px); }
@keyframes ht-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ht-months-grid .ht-month-card:nth-child(1)  { animation-delay: .03s; }
.ht-months-grid .ht-month-card:nth-child(2)  { animation-delay: .06s; }
.ht-months-grid .ht-month-card:nth-child(3)  { animation-delay: .09s; }
.ht-months-grid .ht-month-card:nth-child(4)  { animation-delay: .12s; }
.ht-months-grid .ht-month-card:nth-child(5)  { animation-delay: .15s; }
.ht-months-grid .ht-month-card:nth-child(6)  { animation-delay: .18s; }
.ht-months-grid .ht-month-card:nth-child(7)  { animation-delay: .21s; }
.ht-months-grid .ht-month-card:nth-child(8)  { animation-delay: .24s; }
.ht-months-grid .ht-month-card:nth-child(9)  { animation-delay: .27s; }
.ht-months-grid .ht-month-card:nth-child(10) { animation-delay: .30s; }
.ht-months-grid .ht-month-card:nth-child(11) { animation-delay: .33s; }
.ht-months-grid .ht-month-card:nth-child(12) { animation-delay: .36s; }

.ht-month-name {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--md-on-surface-variant);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--md-outline-variant);
}

/* ── Holiday list ─────────────────────────────────────────── */
.ht-holiday-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

/* KEY FIX: no ::before pseudo-element, no absolute children that could block clicks.
   The hover background is applied directly on the element. */
.ht-holiday-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 6px 7px 10px;
    border-radius: var(--md-shape-sm);
    border-left: 3px solid transparent;
    transition: background .15s;
    /* NO position:relative — tooltip is now inline, not absolute */
}
.ht-holiday-item:hover { background: rgba(26,86,219,.06); }
.ht-holiday-item.is-global   { border-left-color: var(--md-primary); }
.ht-holiday-item.is-regional { border-left-color: var(--md-tertiary); }

/* Day circle */
.ht-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    background: var(--md-primary-container);
    border-radius: 50%;
    flex-shrink: 0;
}
.ht-holiday-item.is-regional .ht-day { background: var(--md-tertiary-container); }
.ht-day-num { font-size: 12px; font-weight: 600; line-height: 1; color: var(--md-on-primary-container); }
.ht-day-name { font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--md-on-primary-container); opacity: .75; line-height: 1; }

/* Info text */
.ht-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ht-name { font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--md-on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-intl-name { font-size: 11px; color: var(--md-on-surface-variant); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Regional badge */
.ht-badge {
    display: inline-flex; align-items: center;
    font-size: 10px; font-weight: 500; letter-spacing: .02em;
    color: var(--md-tertiary); background: var(--md-tertiary-container);
    border-radius: var(--md-shape-full); padding: 2px 8px; margin-top: 3px;
    align-self: flex-start; border: 1px solid rgba(118,81,122,.2);
}

/* ── Countdown label — INLINE, not absolute ───────────────── */
/* Shown only on hover via the parent :hover selector.
   Because it is a normal inline-flex item in the flex row,
   it cannot overlap or block any sibling buttons. */
.ht-countdown-tip {
    display: none;               /* hidden by default */
    align-items: center;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--md-surface);
    background: var(--md-on-surface);
    border-radius: var(--md-shape-full);
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    pointer-events: none;        /* never intercept clicks */
}
.ht-holiday-item:hover .ht-countdown-tip { display: inline-flex; }

/* ── Calendar buttons ─────────────────────────────────────── */
/* Also inline-flex items — always in the flex flow, never overlapping */
.ht-cal-btns {
    display: none;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.ht-holiday-item:hover .ht-cal-btns { display: inline-flex; }
@media (hover: none) {
    .ht-cal-btns { display: inline-flex; } /* always visible on touch */
}

.ht-cal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: var(--md-shape-xs);
    background: var(--md-surface-variant);
    color: var(--md-on-surface-variant);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s, transform .1s;
}
.ht-cal-btn:hover  { transform: scale(1.12); }
.ht-cal-btn:active { transform: scale(.93); }
.ht-cal-google:hover { background: #e8f0fe; }
.ht-cal-apple:hover  { background: var(--md-surface-variant); color: var(--md-on-surface); }

/* ── Current month ────────────────────────────────────────── */
.ht-month-card.is-current-month {
    background: var(--md-primary-container);
    border-color: var(--md-primary);
    border-width: 2px;
    box-shadow: var(--md-elev2);
}
.ht-month-card.is-current-month .ht-month-name {
    color: var(--md-on-primary-container);
    border-bottom-color: rgba(26,86,219,.25);
    display: flex; align-items: center; gap: 6px;
}
.ht-month-card.is-current-month .ht-month-name::before {
    content: ''; display: inline-block;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--md-primary); flex-shrink: 0;
}
.ht-month-card.is-current-month .ht-day { background: var(--md-primary); }
.ht-month-card.is-current-month .ht-day-num,
.ht-month-card.is-current-month .ht-day-name { color: var(--md-on-primary); }
.ht-month-card.is-current-month .ht-holiday-item.is-regional .ht-day { background: var(--md-tertiary); }
.ht-month-card.is-current-month .ht-holiday-item.is-regional .ht-day-num,
.ht-month-card.is-current-month .ht-holiday-item.is-regional .ht-day-name { color: #fff; }

/* ── Next-holiday banner ──────────────────────────────────── */
.ht-next-banner {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
    background: var(--md-primary); color: var(--md-on-primary);
    border-radius: var(--md-shape-lg); padding: 14px 20px;
    margin-bottom: 20px; box-shadow: var(--md-elev2); font-size: 14px;
    animation: ht-fade-up .3s cubic-bezier(.2,0,0,1) forwards;
}
.ht-next-icon  { display: flex; align-items: center; opacity: .85; flex-shrink: 0; }
.ht-next-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; opacity: .75; flex-shrink: 0; }
.ht-next-names { display: flex; flex-direction: column; gap: 1px; }
.ht-next-name  { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.ht-next-name-en { font-size: 12px; font-weight: 400; opacity: .75; }
.ht-next-date  { opacity: .8; font-size: 13px; }
.ht-next-countdown {
    margin-left: auto; background: rgba(255,255,255,.18);
    border-radius: var(--md-shape-full); padding: 4px 14px;
    font-size: 13px; font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.ht-next-today { font-weight: 700; letter-spacing: .02em; }

/* ── Misc ─────────────────────────────────────────────────── */
.ht-source { font-size: 12px; color: var(--md-on-surface-variant); text-align: right; margin-top: 16px; }
.ht-source a { color: var(--md-primary); text-decoration: none; font-weight: 500; }
.ht-source a:hover { text-decoration: underline; }
.ht-error { color: var(--md-error); padding: 16px; background: var(--md-error-container); border-radius: var(--md-shape-md); font-size: 14px; font-weight: 500; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .ht-controls       { flex-direction: column; align-items: stretch; }
    .ht-field          { min-width: unset; width: 100%; }
    .ht-select         { width: 100%; }
    .ht-year-tabs      { margin-left: 0; align-self: flex-start; }
    .ht-year-label     { font-size: 28px; }
    .ht-months-grid    { grid-template-columns: 1fr; }
    .ht-wrap           { padding: 16px 12px 32px; }
    .ht-next-countdown { margin-left: 0; }
    .ht-countdown-tip  { display: none !important; }
    /* Prevent any child from breaking out */
    .ht-next-banner    { word-break: break-word; }
    .ht-holiday-item   { min-width: 0; }
    .ht-info           { min-width: 0; overflow: hidden; }
    .ht-name           { white-space: normal; }
    .ht-intl-name      { white-space: normal; }
    .ht-related        { gap: 6px; }
    .ht-related-link   { font-size: 12px; padding: 3px 10px; }
    .ht-country-label  { width: 100%; box-sizing: border-box; }
    .ht-cal-btns       { flex-shrink: 0; }
}

/* ── Seasonal month header colors ────────────────────────── */
/* Shown as a colored left border on the card + tinted month name.
   No ::before pseudo-elements — avoids layout/overflow issues.   */

/* Winter: Dec–Feb — ice blue */
.ht-month-card[data-month="12"],
.ht-month-card[data-month="1"],
.ht-month-card[data-month="2"] {
    border-left: 3px solid #74c0d8;
}
.ht-month-card[data-month="12"] .ht-month-name,
.ht-month-card[data-month="1"]  .ht-month-name,
.ht-month-card[data-month="2"]  .ht-month-name {
    color: #1a6b8a;
    border-bottom-color: #b3dce8;
}

/* Spring: Mar–May — green */
.ht-month-card[data-month="3"],
.ht-month-card[data-month="4"],
.ht-month-card[data-month="5"] {
    border-left: 3px solid #52b76a;
}
.ht-month-card[data-month="3"] .ht-month-name,
.ht-month-card[data-month="4"] .ht-month-name,
.ht-month-card[data-month="5"] .ht-month-name {
    color: #2d7a3a;
    border-bottom-color: #b2ddb8;
}

/* Summer: Jun–Aug — amber */
.ht-month-card[data-month="6"],
.ht-month-card[data-month="7"],
.ht-month-card[data-month="8"] {
    border-left: 3px solid #f5c842;
}
.ht-month-card[data-month="6"] .ht-month-name,
.ht-month-card[data-month="7"] .ht-month-name,
.ht-month-card[data-month="8"] .ht-month-name {
    color: #8a5c00;
    border-bottom-color: #f5d88a;
}

/* Autumn: Sep–Nov — terracotta */
.ht-month-card[data-month="9"],
.ht-month-card[data-month="10"],
.ht-month-card[data-month="11"] {
    border-left: 3px solid #d4663a;
}
.ht-month-card[data-month="9"]  .ht-month-name,
.ht-month-card[data-month="10"] .ht-month-name,
.ht-month-card[data-month="11"] .ht-month-name {
    color: #8a3a1a;
    border-bottom-color: #f0b89a;
}

/* Current month overrides seasonal border — keep primary blue */
.ht-month-card.is-current-month {
    border-left: 3px solid var(--md-primary) !important;
}
/* ── Year holiday count ───────────────────────────────────── */
.ht-year-label {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.ht-year-count {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--md-on-surface-variant);
    opacity: .7;
    -webkit-text-fill-color: initial; /* override gradient from parent */
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

/* ── Badge container ──────────────────────────────────────── */
.ht-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
}

/* ── Bridge day badge ─────────────────────────────────────── */
.ht-badge-regional {
    color: var(--md-tertiary);
    background: var(--md-tertiary-container);
    border: 1px solid rgba(118,81,122,.2);
}
.ht-badge-bridge {
    color: #7a4800;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    font-size: 10px;
    white-space: normal;
    word-break: break-word;
}
.ht-holiday-item.is-bridge .ht-day {
    background: #ffe0b2;
}
.ht-holiday-item.is-bridge .ht-day-num,
.ht-holiday-item.is-bridge .ht-day-name {
    color: #7a4800;
}

/* ── Related countries navigation ────────────────────────── */
.ht-related {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--md-surface-tonal);
    border-radius: var(--md-shape-md);
    border: 1px solid var(--md-outline-variant);
}
.ht-related-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--md-on-surface-variant);
    flex-shrink: 0;
    margin-right: 4px;
}
.ht-related-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--md-shape-full);
    font-size: 13px;
    font-weight: 500;
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    color: var(--md-primary);
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
    max-width: 100%;
}
.ht-related-link:hover {
    background: var(--md-primary-container);
    border-color: var(--md-primary);
    color: var(--md-on-primary-container);
    text-decoration: none;
}
.ht-related-link.is-inactive {
    color: var(--md-on-surface-variant);
    cursor: default;
    opacity: .5;
}
@media (max-width: 640px) {
    .ht-related { gap: 6px; }
    .ht-related-link { font-size: 12px; padding: 3px 10px; }
}

/* ── Static country label (show_selector=false) ──────────── */
.ht-country-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-full);
    color: var(--md-on-surface);
}
.ht-country-label svg {
    color: var(--md-primary);
    flex-shrink: 0;
}
.ht-country-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-on-surface);
}
.ht-country-code {
    font-size: 11px;
    font-weight: 500;
    color: var(--md-on-surface-variant);
    background: var(--md-surface-variant);
    border-radius: var(--md-shape-full);
    padding: 1px 7px;
    letter-spacing: .04em;
}

/* ── FAQ Section ───────────────────────────────────────────── */
.ht-faq {
    margin-top: 40px;
    padding-top: 8px;
}
.ht-faq-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--md-on-surface);
    margin: 0 0 16px 0;
    letter-spacing: .01em;
}
.ht-faq-title svg {
    color: var(--md-primary);
    flex-shrink: 0;
}
.ht-faq-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ht-faq-item {
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-md);
    overflow: hidden;
    transition: box-shadow .2s;
}
.ht-faq-item:hover {
    box-shadow: var(--md-elev1);
}
.ht-faq-item.ht-faq-open {
    border-color: var(--md-primary);
    box-shadow: var(--md-elev1);
}
.ht-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--md-on-surface);
    cursor: pointer;
    user-select: none;
    transition: background .15s;
    list-style: none;
}
.ht-faq-question:hover {
    background: var(--md-surface-tonal);
}
.ht-faq-item.ht-faq-open .ht-faq-question {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}
.ht-faq-question span {
    flex: 1;
    line-height: 1.45;
}
.ht-faq-chevron {
    flex-shrink: 0;
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    color: var(--md-on-surface-variant);
}
.ht-faq-item.ht-faq-open .ht-faq-chevron {
    transform: rotate(180deg);
    color: var(--md-primary);
}
.ht-faq-answer {
    margin: 0;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s cubic-bezier(.4,0,.2,1), padding .3s;
}
.ht-faq-answer:not([hidden]) {
    padding: 0 16px 14px;
    max-height: 300px;
}
.ht-faq-answer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--md-on-surface-variant);
    border-top: 1px solid var(--md-outline-variant);
    padding-top: 12px;
}
.ht-faq-answer strong {
    color: var(--md-on-surface);
    font-weight: 600;
}

@media (max-width: 480px) {
    .ht-faq-question {
        padding: 12px 14px;
        font-size: 13px;
    }
    .ht-faq-answer p {
        font-size: 13px;
    }
}

/* ── Today Shortcode ───────────────────────────────────────── */
.ht-today-wrap {
    --md-primary:              #1a56db;
    --md-on-primary:           #ffffff;
    --md-primary-container:    #dde3ff;
    --md-on-primary-container: #00105c;
    --md-secondary-container:  #e0e0f9;
    --md-on-surface:           #1b1b1f;
    --md-on-surface-variant:   #46464f;
    --md-outline-variant:      #c7c5d0;
    --md-surface:              #faf9ff;
    --md-surface-tonal:        #f0efff;
    --md-surface-variant:      #e3e1ec;
    --md-bg:                   #faf9ff;
    --md-elev1: 0px 1px 2px rgba(0,0,0,.30), 0px 1px 3px 1px rgba(0,0,0,.15);
    --md-elev2: 0px 1px 2px rgba(0,0,0,.30), 0px 2px 6px 2px rgba(0,0,0,.15);
    --md-shape-sm:   8px;
    --md-shape-md:   12px;
    --md-shape-lg:   16px;
    --md-shape-full: 100px;
    --md-font: Roboto, 'Roboto Flex', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* 12-color palette for country badges */
    --ht-c0:  #1a56db; --ht-c0t:  #fff;
    --ht-c1:  #0e9f6e; --ht-c1t:  #fff;
    --ht-c2:  #d97706; --ht-c2t:  #fff;
    --ht-c3:  #dc2626; --ht-c3t:  #fff;
    --ht-c4:  #7c3aed; --ht-c4t:  #fff;
    --ht-c5:  #db2777; --ht-c5t:  #fff;
    --ht-c6:  #0891b2; --ht-c6t:  #fff;
    --ht-c7:  #65a30d; --ht-c7t:  #fff;
    --ht-c8:  #ea580c; --ht-c8t:  #fff;
    --ht-c9:  #0284c7; --ht-c9t:  #fff;
    --ht-c10: #9333ea; --ht-c10t: #fff;
    --ht-c11: #059669; --ht-c11t: #fff;

    font-family: var(--md-font);
    font-size: 14px;
    color: var(--md-on-surface);
    background: var(--md-bg);
    padding: 24px 16px 48px;
    max-width: 1100px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Header — identical to .ht-next-banner */
.ht-today-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    background: var(--md-primary);
    color: var(--md-on-primary);
    border-radius: var(--md-shape-lg);
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: var(--md-elev2);
    font-size: 14px;
    animation: ht-fade-up .3s cubic-bezier(.2,0,0,1) forwards;
}
.ht-today-icon {
    display: flex;
    align-items: center;
    opacity: .85;
    flex-shrink: 0;
}
.ht-today-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.ht-today-date {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.ht-today-no-holidays {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .75;
}
.ht-today-count {
    font-size: 12px;
    font-weight: 400;
    opacity: .8;
}
.ht-today-count-pill {
    margin-left: auto;
    background: rgba(255,255,255,.18);
    border-radius: var(--md-shape-full);
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* List */
.ht-today-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Each row — matches .ht-holiday-item style */
.ht-today-item {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-md);
    overflow: hidden;
    transition: box-shadow .15s, border-color .15s;
    min-height: 48px;
}
.ht-today-item:hover {
    box-shadow: var(--md-elev1);
    border-color: var(--ht-item-color, var(--md-primary));
}

/* Colored day-box — matches .ht-day */
.ht-today-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-width: 52px;
    align-self: stretch;
    background: var(--ht-item-color, var(--md-primary));
    color: var(--ht-item-text, #fff);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-align: center;
    padding: 6px 4px;
    flex-shrink: 0;
}
.ht-today-code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.2;
}
.ht-today-country {
    font-size: 10px;
    font-weight: 500;
    opacity: .85;
    letter-spacing: .04em;
    line-height: 1.2;
}

/* Holiday names — matches .ht-info */
.ht-today-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 12px;
    gap: 2px;
    min-width: 0;
}
.ht-today-hname {
    font-size: 13px;
    font-weight: 500;
    color: var(--md-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ht-today-local {
    font-size: 12px;
    color: var(--md-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ht-today-more {
    font-size: 11px;
    color: var(--md-primary);
    font-weight: 500;
}

/* Per-color assignments */
.ht-today-item[data-color="0"]  { --ht-item-color: var(--ht-c0);  --ht-item-text: var(--ht-c0t);  }
.ht-today-item[data-color="1"]  { --ht-item-color: var(--ht-c1);  --ht-item-text: var(--ht-c1t);  }
.ht-today-item[data-color="2"]  { --ht-item-color: var(--ht-c2);  --ht-item-text: var(--ht-c2t);  }
.ht-today-item[data-color="3"]  { --ht-item-color: var(--ht-c3);  --ht-item-text: var(--ht-c3t);  }
.ht-today-item[data-color="4"]  { --ht-item-color: var(--ht-c4);  --ht-item-text: var(--ht-c4t);  }
.ht-today-item[data-color="5"]  { --ht-item-color: var(--ht-c5);  --ht-item-text: var(--ht-c5t);  }
.ht-today-item[data-color="6"]  { --ht-item-color: var(--ht-c6);  --ht-item-text: var(--ht-c6t);  }
.ht-today-item[data-color="7"]  { --ht-item-color: var(--ht-c7);  --ht-item-text: var(--ht-c7t);  }
.ht-today-item[data-color="8"]  { --ht-item-color: var(--ht-c8);  --ht-item-text: var(--ht-c8t);  }
.ht-today-item[data-color="9"]  { --ht-item-color: var(--ht-c9);  --ht-item-text: var(--ht-c9t);  }
.ht-today-item[data-color="10"] { --ht-item-color: var(--ht-c10); --ht-item-text: var(--ht-c10t); }
.ht-today-item[data-color="11"] { --ht-item-color: var(--ht-c11); --ht-item-text: var(--ht-c11t); }

.ht-today-empty {
    padding: 16px;
    color: var(--md-on-surface-variant);
    font-size: 14px;
}

@media (max-width: 480px) {
    .ht-today-wrap  { padding: 16px 12px 32px; }
    .ht-today-day   { width: 44px; min-width: 44px; }
    .ht-today-hname { font-size: 12px; }
}
