/* ============================================================================
   AEON CALENDAR • anime.css — the ANIME skin
   Shonen cel / manga print / Persona-5-era menu design, ported from the
   `:root[data-skin="anime"]` block of the Aeon Terminal (Portal) project.

   Identity, in one breath:
     • deep-indigo INK outlines (#2B1A4E — never true black)
     • HARD offset shadows with ZERO blur (5px 5px 0 0)
     • 6px corners (squared, NOT pill-round) — the giveaway vs. the old kawaii skin
     • cel sunset  #FF5E7E → #FF9A56 → #B36BFF  on the chrome
     • pale-sky page #E9F3FF, lavender-white panes #F4F0FF, white cards
     • shonen pink #FF3E8A accent, sky #4DC9FF
     • static halftone screentone on the page
     • Mochiy Pop One (display, uppercase) + M PLUS Rounded 1c (body)
     • motion that SNAPS: cubic-bezier(0.16, 1.24, 0.3, 1), ~0.14s

   Loaded AFTER style.css + premium.css, so it wins the cascade. Light = the
   anime day look (the default). The existing theme toggle now switches to an
   anime NIGHT variant (same ink/pink/sunset language on deep indigo).
   Fonts are self-hosted (fonts/) because the CSP is self-only.
   ============================================================================ */

@font-face {
    font-family: 'Mochiy Pop One';
    src: url('fonts/mochiy-pop-one.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'M PLUS Rounded 1c';
    src: url('fonts/mplus-rounded-400.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'M PLUS Rounded 1c';
    src: url('fonts/mplus-rounded-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'M PLUS Rounded 1c';
    src: url('fonts/mplus-rounded-800.woff2') format('woff2');
    font-weight: 800; font-style: normal; font-display: swap;
}

/* ============================================================================
   1. TOKENS — anime DAY (default) and anime NIGHT
   Re-points every token premium.css/style.css consume, so the whole UI
   re-skins from the variables; the rules in §2+ add the cel chrome.
   ============================================================================ */
:root,
html[data-theme="light"] {
    --an-ink: #2B1A4E;
    --an-edge: #2B1A4E;            /* outline colour (ink in day) */
    --an-shadow: #2B1A4E;          /* hard-shadow colour */
    --an-sunset-a: #FF5E7E;
    --an-sunset-b: #FF9A56;
    --an-sunset-c: #B36BFF;
    --an-sunset: linear-gradient(100deg, #FF5E7E 0%, #FF9A56 52%, #B36BFF 100%);
    --an-pink: #FF3E8A;
    --an-sky: #4DC9FF;
    --an-red: #FF4D6D;
    --an-mint: #35E0A1;
    --an-card: #FFFFFF;
    --an-pane: #F4F0FF;
    --an-page: #E9F3FF;
    --an-tint: #FFE1EE;
    --an-dot-a: rgba(255, 62, 138, 0.12);
    --an-dot-b: rgba(77, 201, 255, 0.10);

    --font-anime-pop: 'Mochiy Pop One', 'M PLUS Rounded 1c', system-ui, sans-serif;
    --font-anime: 'M PLUS Rounded 1c', 'Quicksand', system-ui, -apple-system, sans-serif;

    /* Accent: shonen pink. --brand/--apple-red are FILLS (indigo ink sits on
       them, 4.6:1). --brand-ink is pink used AS TEXT on light: #C21B60 = 5.9:1. */
    --brand:        #FF3E8A;
    --brand-bright: #FF8AB8;
    --brand-deep:   #C21B60;
    --brand-glow:   rgba(255, 62, 138, 0.34);
    --brand-ink:    #C21B60;

    --apple-blue:   #1F8FD6;
    --apple-red:    #FF3E8A;
    --apple-orange: #FF9A56;
    --apple-green:  #0FA968;
    --apple-purple: #A876FF;

    --label:            #2B1A4E;
    --secondary-label:  #5E4F85;   /* 6.9:1 on white */
    --tertiary-label:   #937FBC;
    --quaternary-label: rgba(43, 26, 78, 0.12);

    --system-background:    #E9F3FF;   /* pale sky page */
    --secondary-background: #FFFFFF;   /* white cards  */
    --tertiary-background:  #F4F0FF;   /* lavender-white panes */
    --grouped-background:   #F4F0FF;

    --separator:        rgba(43, 26, 78, 0.28);
    --opaque-separator: #2B1A4E;

    --glass-bg:       #FFFFFF;
    --glass-bg-thick: #FFFFFF;
    --glass-blur:     none;

    --radius-xs: 3px; --radius-sm: 4px; --radius-md: 6px; --radius-lg: 6px;
    --radius-xl: 6px; --radius-2xl: 6px;

    /* Hard offset shadows only — print has no blur. */
    --elev-1: 2px 2px 0 0 var(--an-shadow);
    --elev-2: 3px 3px 0 0 var(--an-shadow);
    --elev-3: 4px 4px 0 0 var(--an-shadow);
    --elev-4: 5px 5px 0 0 var(--an-shadow);
    --elev-5: 6px 6px 0 0 var(--an-shadow);

    --wash-1: rgba(255, 62, 138, 0.0);
    --wash-2: rgba(77, 201, 255, 0.0);
    --art-scrim: linear-gradient(180deg, rgba(43,26,78,0) 40%, rgba(43,26,78,0.45) 100%);

    /* Motion: snap into a held pose. */
    --spring:      cubic-bezier(0.16, 1.24, 0.3, 1);
    --ease-out:    cubic-bezier(0.16, 1.24, 0.3, 1);
    --ease-in-out: cubic-bezier(0.16, 1.24, 0.3, 1);
    --dur-fast: 100ms; --dur: 140ms; --dur-slow: 220ms;
}

/* Anime NIGHT — the same ink/pink/sunset language, printed on deep indigo.
   Outlines flip to lavender so the cel line still reads on a dark page. */
html[data-theme="dark"] {
    --an-ink: #2B1A4E;
    --an-edge: #A58BFF;
    --an-shadow: #07020F;
    --an-card: #2A1A4E;
    --an-pane: #1E1240;
    --an-page: #140A2E;
    --an-tint: #3A1F5C;
    --an-dot-a: rgba(255, 62, 138, 0.09);
    --an-dot-b: rgba(77, 201, 255, 0.07);

    --brand:        #FF5E9B;
    --brand-bright: #FF9CC2;
    --brand-deep:   #FF3E8A;
    --brand-glow:   rgba(255, 94, 155, 0.40);
    --brand-ink:    #FF8AB8;

    --apple-blue:   #4DC9FF;
    --apple-red:    #FF5E9B;
    --apple-orange: #FF9A56;
    --apple-green:  #35E0A1;
    --apple-purple: #B98CFF;

    --label:            #F4EEFF;
    --secondary-label:  #BFB0E6;
    --tertiary-label:   #8E7DC0;
    --quaternary-label: rgba(244, 238, 255, 0.14);

    --system-background:    #140A2E;
    --secondary-background: #2A1A4E;
    --tertiary-background:  #1E1240;
    --grouped-background:   #1E1240;

    --separator:        rgba(165, 139, 255, 0.45);
    --opaque-separator: #A58BFF;

    --glass-bg:       #231443;
    --glass-bg-thick: #231443;

    --art-scrim: linear-gradient(180deg, rgba(20,10,46,0) 40%, rgba(20,10,46,0.6) 100%);
}

/* ============================================================================
   2. PAGE — pale-sky ground, static halftone screentone, type, snap motion
   ============================================================================ */
html { background: var(--system-background); }
body {
    background: var(--system-background) !important;
    font-family: var(--font-anime);
}
/* Manga screentone: two offset dot grids, static (print doesn't move). */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        radial-gradient(var(--an-dot-a) 1px, transparent 1.4px),
        radial-gradient(var(--an-dot-b) 1px, transparent 1.4px);
    background-size: 9px 9px, 14px 14px;
    background-position: 0 0, 4px 6px;
}
#app { position: relative; z-index: 1; }

* { transition-timing-function: cubic-bezier(0.16, 1.24, 0.3, 1) !important; }

/* Display face on chrome — uppercase, tracked. */
#month-title, #day-title, #list-title, .aeon-week-title, .modal-nav-title,
.list-date-label, .list-section-header, .detail-title, .footer-label,
.aeon-tab-label, #weekday-bar span, .header-btn, .modal-nav-btn,
.add-to-calendar-btn, .detail-join-btn, .detail-share-btn, .action-sheet-btn,
.aeon-toast-action, .now-badge, .aeon-week-dayname, .month-empty-link,
.action-sheet-title, .aeon-cmdk-hint {
    font-family: var(--font-anime-pop);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================================
   3. HEADER — white print strip with a sunset band, ink underline
   ============================================================================ */
#header {
    background:
        linear-gradient(100deg, var(--an-sunset-a) 0%, var(--an-sunset-b) 52%, var(--an-sunset-c) 100%) top / 100% 7px no-repeat,
        var(--an-card) !important;
    border-bottom: 3px solid var(--an-edge) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 3px 0 0 var(--an-shadow);
}
#header .header-top { padding-top: 6px; }

#month-title {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--an-edge);
    text-shadow: 2px 2px 0 var(--an-pink);
}
#month-title { white-space: nowrap; min-width: 0; }
@media (max-width: 480px) {
    #month-title { font-size: 19px; letter-spacing: 0.02em; text-shadow: 1.5px 1.5px 0 var(--an-pink); }
    #today-btn { padding: 3px 9px !important; font-size: 12px; }
    .footer-tz { font-size: 9px; padding: 2px 6px; letter-spacing: 0; gap: 3px; box-shadow: 1.5px 1.5px 0 0 var(--an-shadow); }
    .footer-tz svg { width: 9px; height: 9px; }
}
html[data-theme="dark"] #month-title { color: #F4EEFF; text-shadow: 2px 2px 0 var(--an-pink); }

.header-btn {
    font-size: 13px;
    color: var(--label);
}
#today-btn {
    background: var(--an-card) !important;
    color: var(--label) !important;
    border: 2.5px solid var(--an-edge) !important;
    border-radius: 6px !important;
    box-shadow: 3px 3px 0 0 var(--an-shadow);
    padding: 4px 12px !important;
    font-weight: 400;
}
#today-btn:hover { background: var(--an-pink) !important; color: #2B1A4E !important; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--an-shadow); }
#today-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 0 var(--an-shadow); }

#header .header-btn:not(#today-btn),
.nav-chevron {
    color: var(--label);
}
/* Square ink "keys" for the icon buttons — the titlebar-btn look. */
#admin-add-btn, #search-btn, #share-btn, #list-view-btn, #aeon-theme-toggle, .nav-chevron {
    background: var(--an-card) !important;
    border: 2.5px solid var(--an-edge) !important;
    border-radius: 4px !important;
    box-shadow: 2px 2px 0 0 var(--an-shadow);
    color: var(--label) !important;
    min-width: 36px; min-height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
}
#admin-add-btn:hover, #search-btn:hover, #share-btn:hover, #list-view-btn:hover, #aeon-theme-toggle:hover, .nav-chevron:hover {
    background: var(--an-pink) !important; color: #2B1A4E !important;
    transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 var(--an-shadow);
}
#admin-add-btn:active, #search-btn:active, #share-btn:active, #list-view-btn:active, #aeon-theme-toggle:active, .nav-chevron:active {
    transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--an-shadow);
}
.header-top { gap: 8px; }
.header-title-row { gap: 10px; }

/* ============================================================================
   4. MONTH GRID — ink lines, pane-tinted weekday bar, cel day numerals
   ============================================================================ */
#weekday-bar {
    background: var(--an-pane) !important;
    border-bottom: 2.5px solid var(--an-edge) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
#weekday-bar span,
#weekday-bar span:first-child, #weekday-bar span:last-child {
    color: var(--secondary-label);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

#month-grid { background: var(--an-page) !important; }
.day-cell {
    border-bottom: 2px solid var(--an-edge) !important;
    border-right: 2px solid var(--an-edge);
    border-radius: 0 !important;
    background: var(--an-card);
}
.day-cell:nth-child(7n) { border-right: 0; }
.day-cell:active { background: var(--an-tint); transform: none; }
/* The light-theme rule in premium.css dims the art to .42 (specificity 0,2,1);
   cel art should be loud, so match that specificity and win by order. */
html .day-bg, html[data-theme] .day-bg { opacity: 0.95; filter: none; }

/* Numerals: white cel fill with an indigo stroke — readable on any art. */
.day-number,
.day-cell .day-number,
.day-cell.other-month .day-number,
.day-cell.weekend .day-number,
.day-cell.other-month.weekend .day-number,
html[data-theme="light"] .day-cell:not(.is-today) .day-number,
html[data-theme="light"] .day-cell.other-month:not(.is-today) .day-number {
    font-family: var(--font-anime-pop);
    font-size: 15px;
    font-weight: 400;
    color: #FFFFFF;
    background: none;
    background-image: none;
    -webkit-text-stroke: 3.5px var(--an-ink);
    paint-order: stroke fill;
    text-shadow: none;
    border-radius: 0;
}
.day-cell.other-month .day-number,
.day-cell.other-month.weekend .day-number,
html[data-theme="light"] .day-cell.other-month:not(.is-today) .day-number {
    color: #E4DBFF;
    opacity: 0.85;
}
/* Today: a flat pink coin with an ink ring and a hard shadow. */
.day-cell.is-today .day-number,
.day-cell.is-today.is-selected .day-number {
    background: var(--an-pink) !important;
    background-image: none !important;
    color: #2B1A4E;
    -webkit-text-stroke: 0;
    border: 2.5px solid var(--an-ink);
    border-radius: 50%;
    box-shadow: 2px 2px 0 0 var(--an-ink);
}
.day-cell.is-selected .day-number { background: var(--an-sky); color: #2B1A4E; -webkit-text-stroke: 0; border: 2.5px solid var(--an-ink); border-radius: 50%; }
.day-cell.is-today {
    outline: 3px solid var(--an-pink);
    outline-offset: -3px;
    box-shadow: none;
}
.event-dot { border: 1.5px solid var(--an-ink); box-shadow: none; }
.today-time-bar { background: var(--an-pink); box-shadow: none; border: 1px solid var(--an-ink); }
.day-cell:focus-visible { outline: 3px solid var(--an-pink); outline-offset: -3px; box-shadow: none; }

#month-empty {
    background: var(--an-card);
    border: 2.5px solid var(--an-edge);
    box-shadow: 4px 4px 0 0 var(--an-shadow);
    border-radius: 6px;
    color: var(--label);
}

/* ============================================================================
   5. FOOTER + TIMEZONE CHIP
   ============================================================================ */
#footer {
    background: var(--an-pane) !important;
    border-top: 3px solid var(--an-edge) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.footer-label { font-size: 11px; color: var(--secondary-label); }
.footer-label.active { color: var(--brand-ink); }
.footer-tz {
    background: var(--an-card);
    border: 2px solid var(--an-edge);
    border-radius: 4px;
    box-shadow: 2px 2px 0 0 var(--an-shadow);
    color: var(--label);
    font-family: var(--font-anime);
    font-weight: 700;
}

/* ============================================================================
   6. DAY VIEW + LIST VIEW — cards with cel outline + hard shadow
   ============================================================================ */
#day-view, #list-view { background: var(--an-page); }
/* Day art behind the schedule: premium.css drops it to .18 + blur(5px) in light
   (specificity 1,2,1). Cel art should read, so go to ~half strength, near-sharp. */
html[data-theme] #day-view-bg, html #day-view-bg { opacity: 0.5; filter: blur(1.5px); }
#day-header, #list-header {
    background:
        linear-gradient(100deg, var(--an-sunset-a) 0%, var(--an-sunset-b) 52%, var(--an-sunset-c) 100%) top / 100% 7px no-repeat,
        var(--an-card) !important;
    border-bottom: 3px solid var(--an-edge) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 3px 0 0 var(--an-shadow);
}
#day-title { font-weight: 400; font-size: 22px; }
#list-title { font-size: 16px; font-weight: 400; }
#day-title span:first-child { text-shadow: 2px 2px 0 var(--an-pink); }
#back-to-month, #back-to-calendar { color: var(--brand-ink); }

#day-events-list { padding: 12px 12px 4px; }
.day-event-item {
    margin: 0 0 12px;
    background: var(--an-card) !important;
    border: 2.5px solid var(--an-edge) !important;
    border-radius: 6px;
    box-shadow: 4px 4px 0 0 var(--an-shadow);
}
.day-event-item:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--an-shadow); }
.day-event-item:active { transform: translate(3px, 3px); box-shadow: 0 0 0 0 var(--an-shadow); }
.event-color-bar { width: 10px; border-right: 2.5px solid var(--an-edge); }
.event-title { font-weight: 800; color: var(--label); }
.event-time { color: var(--secondary-label); font-weight: 700; }
.event-location { color: var(--secondary-label); }
.now-badge {
    background: var(--an-pink) !important; color: #2B1A4E !important;
    border: 2px solid var(--an-ink); border-radius: 3px;
    box-shadow: 1px 1px 0 0 var(--an-ink); font-size: 10px;
}
.no-events { font-family: var(--font-anime-pop); text-transform: uppercase; color: var(--tertiary-label); letter-spacing: 0.06em; }
.ics-bell-btn {
    background: var(--an-tint) !important; color: var(--brand-ink) !important;
    border: 2px solid var(--an-edge) !important; border-radius: 4px !important;
    box-shadow: 2px 2px 0 0 var(--an-shadow);
}

/* Timeline */
.hour-line { background: var(--separator); height: 1.5px; }
.hour-label { color: var(--secondary-label); font-weight: 700; }
.current-time-line { background: var(--an-pink); height: 3px; border-top: 1px solid var(--an-ink); border-bottom: 1px solid var(--an-ink); }
.timeline-event {
    border: 2.5px solid var(--an-ink);
    border-radius: 6px;
    box-shadow: 3px 3px 0 0 var(--an-ink);
}
.timeline-event-title { font-weight: 800; }

/* List */
#list-content { background: var(--an-page); }
.list-section-header, .list-date-label {
    display: inline-block;
    background: var(--an-sunset);
    color: #FFFFFF;
    text-shadow: 0 1.5px 0 rgba(43, 26, 78, 0.55);
    border: 2.5px solid var(--an-ink);
    border-radius: 4px;
    box-shadow: 3px 3px 0 0 var(--an-ink);
    padding: 3px 10px;
    margin: 12px 14px 8px;
    font-size: 11px;
}
.list-event-group { padding: 0 12px; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
#list-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 480px) { #list-title { font-size: 13px; } }
.list-event-item {
    background: var(--an-card);
    margin: 0 0 12px;
    border: 2.5px solid var(--an-edge) !important;
    border-radius: 6px;
    box-shadow: 4px 4px 0 0 var(--an-shadow);
}
.list-event-item:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--an-shadow); }
.list-event-item:active { transform: translate(3px, 3px); box-shadow: 0 0 0 0 var(--an-shadow); }
.list-event-accent { width: 8px; border: 2px solid var(--an-edge); border-radius: 3px; }
.list-event-title { font-weight: 800; color: var(--label); }
.list-event-meta, .list-event-time { color: var(--secondary-label); font-weight: 700; }

/* ============================================================================
   7. SHEETS + FORMS — inked panels, hard shadow cast upward/outward
   ============================================================================ */
.modal-overlay, .action-sheet-overlay { background: rgba(43, 26, 78, 0.58) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.modal-sheet {
    background: var(--an-pane) !important;
    border: 3px solid var(--an-edge) !important;
    border-bottom: 0 !important;
    border-radius: 6px 6px 0 0 !important;
    box-shadow: 0 -5px 0 0 var(--an-shadow) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
@media (min-width: 700px) {
    .modal-sheet { left: 50%; right: auto; width: 560px; transform-origin: bottom center; margin-left: -280px; box-shadow: 5px 0 0 0 var(--an-shadow), -5px 0 0 0 var(--an-shadow), 0 -5px 0 0 var(--an-shadow) !important; }
}
.modal-handle { background: var(--an-edge); height: 5px; width: 44px; border-radius: 2px; }
.modal-nav {
    background:
        linear-gradient(100deg, var(--an-sunset-a) 0%, var(--an-sunset-b) 52%, var(--an-sunset-c) 100%) top / 100% 6px no-repeat,
        var(--an-card);
    border-bottom: 3px solid var(--an-edge);
}
.modal-nav-title { font-size: 14px; font-weight: 400; color: var(--label); }
.modal-nav-btn { font-size: 12px; }
.modal-nav-btn.save {
    background: var(--an-pink) !important; color: #2B1A4E !important;
    border: 2.5px solid var(--an-ink) !important; border-radius: 6px !important;
    box-shadow: 3px 3px 0 0 var(--an-ink); padding: 4px 14px !important; font-weight: 400;
}
.modal-nav-btn.save:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--an-ink); }
.modal-nav-btn.save:active { transform: translate(3px, 3px); box-shadow: 0 0 0 0 var(--an-ink); }
.modal-nav-btn.cancel { color: var(--secondary-label); }

.form-group {
    background: var(--an-card) !important;
    border: 2.5px solid var(--an-edge) !important;
    border-radius: 6px !important;
    box-shadow: 4px 4px 0 0 var(--an-shadow);
    margin: 14px 14px 18px !important;
}
.form-field { border-bottom: 2px solid var(--separator) !important; }
.form-field:last-child { border-bottom: 0 !important; }
.form-field label, .form-field > span { font-weight: 800; color: var(--label); }
.form-field input, .form-field textarea, .form-field select {
    font-family: var(--font-anime);
    color: var(--label);
}
.form-field input:focus-visible, .form-field textarea:focus-visible, .form-field select:focus-visible { outline: 3px solid var(--an-pink); outline-offset: 2px; box-shadow: none; }
.form-tz-note, .detail-tz-note, .repeat-preview { color: var(--brand-ink); font-weight: 700; }
/* Toggle switch (All Day): see §17 at the end of this file. */
.color-option { border: 2.5px solid var(--an-ink) !important; border-radius: 4px !important; box-shadow: 2px 2px 0 0 var(--an-ink); }
.color-option.selected { transform: translate(1px, 1px); box-shadow: 0 0 0 3px var(--an-card), 0 0 0 6px var(--an-ink) !important; }
.modal-delete-btn, .admin-delete-btn {
    background: var(--an-card) !important; color: #C81E45 !important;
    border: 2.5px solid var(--an-ink) !important; border-radius: 6px !important;
    box-shadow: 3px 3px 0 0 var(--an-ink); font-weight: 800;
}

/* Action sheet (delete confirm etc.) */
.action-sheet-group {
    background: var(--an-card) !important;
    border: 2.5px solid var(--an-edge) !important;
    border-radius: 6px !important;
    box-shadow: 4px 4px 0 0 var(--an-shadow);
}
.action-sheet-btn { font-weight: 400; border-top: 2px solid var(--separator) !important; }
.action-sheet-btn.destructive { color: #C81E45; }

/* Detail sheet extras */
.detail-title { font-weight: 400; font-size: 20px; }
.detail-field-group {
    background: var(--an-card);
    border: 2.5px solid var(--an-edge);
    border-radius: 6px;
    box-shadow: 4px 4px 0 0 var(--an-shadow);
}
.detail-field-label { font-family: var(--font-anime-pop); text-transform: uppercase; letter-spacing: 0.06em; color: var(--secondary-label); }
.add-to-calendar-btn, .detail-share-btn, .detail-join-btn {
    background: var(--an-card) !important; color: var(--label) !important;
    border: 2.5px solid var(--an-edge) !important; border-radius: 6px !important;
    box-shadow: 3px 3px 0 0 var(--an-shadow);
}
.add-to-calendar-btn:hover, .detail-share-btn:hover, .detail-join-btn:hover { background: var(--an-pink) !important; color: #2B1A4E !important; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--an-shadow); }
.add-to-calendar-btn:active, .detail-share-btn:active, .detail-join-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 0 var(--an-shadow); }
.detail-join-btn { background: var(--an-pink) !important; color: #2B1A4E !important; }
.detail-color-indicator { border-bottom: 2.5px solid var(--an-edge); }
.detail-actions { flex-wrap: wrap; gap: 10px; align-items: stretch; }
.detail-actions > * { flex: 1 1 140px; font-size: 12px; justify-content: center; text-align: center; }

/* ============================================================================
   8. PREMIUM COMPONENTS — toast, palette, week view, tab bar, update bar
   ============================================================================ */
#aeon-toast, #aeon-update-bar {
    background: var(--an-card) !important; color: var(--label) !important;
    border: 2.5px solid var(--an-edge) !important; border-radius: 6px !important;
    box-shadow: 4px 4px 0 0 var(--an-shadow) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    font-weight: 700;
}
.aeon-toast-action, #aeon-update-btn {
    background: var(--an-pink) !important; color: #2B1A4E !important;
    border: 2px solid var(--an-ink) !important; border-radius: 4px !important;
    box-shadow: 2px 2px 0 0 var(--an-ink);
}

.aeon-cmdk::backdrop { background: rgba(43, 26, 78, 0.58); backdrop-filter: none; }
.aeon-cmdk-box {
    background: var(--an-card) !important;
    border: 3px solid var(--an-edge) !important;
    border-radius: 6px !important;
    box-shadow: 6px 6px 0 0 var(--an-shadow) !important;
    backdrop-filter: none !important;
}
.aeon-cmdk-input { font-family: var(--font-anime); color: var(--label); border-bottom: 2.5px solid var(--an-edge) !important; }
.aeon-cmdk-item { border-radius: 4px; }
.aeon-cmdk-item[aria-selected="true"] {
    background: var(--an-tint) !important;
    box-shadow: inset 0 0 0 2px var(--an-edge) !important;
}
.aeon-cmdk-label { font-weight: 700; text-transform: none; font-family: var(--font-anime); letter-spacing: 0; }

.aeon-week { background: var(--an-page) !important; }
.aeon-week-header {
    background:
        linear-gradient(100deg, var(--an-sunset-a) 0%, var(--an-sunset-b) 52%, var(--an-sunset-c) 100%) top / 100% 7px no-repeat,
        var(--an-card) !important;
    border-bottom: 3px solid var(--an-edge) !important;
    backdrop-filter: none !important;
}
.aeon-week-title { font-size: 15px; font-weight: 400; color: var(--label); }
.aeon-week-close, .aeon-week-nav {
    background: var(--an-card) !important; color: var(--label) !important;
    border: 2.5px solid var(--an-edge) !important; border-radius: 4px !important;
    box-shadow: 2px 2px 0 0 var(--an-shadow);
}
.aeon-week-daynames, .aeon-week-allday { background: var(--an-pane) !important; border-bottom: 2.5px solid var(--an-edge) !important; }
.aeon-week-dayname { color: var(--secondary-label); font-weight: 400; }
.aeon-week-dayname.is-today { color: var(--brand-ink); }
.aeon-week-col, .aeon-week-allday-cell { border-left: 2px solid var(--separator) !important; }
.aeon-week-hour, .aeon-week-hour::after { border-color: var(--separator) !important; }
.aeon-week-event {
    border: 2.5px solid var(--an-ink) !important;
    border-radius: 5px !important;
    box-shadow: 2px 2px 0 0 var(--an-ink) !important;
}
.aeon-week-now { background: var(--an-pink) !important; border-top: 1px solid var(--an-ink); }

#aeon-tabbar {
    background: var(--an-card) !important;
    border-top: 3px solid var(--an-edge) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
.aeon-tab { color: var(--secondary-label); }
.aeon-tab.is-active, .aeon-tab[aria-current="page"] { color: var(--brand-ink); }
.aeon-tab-label { font-size: 9px; }

.aeon-skeleton { background: var(--an-pane); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--an-pink); outline-offset: 2px; box-shadow: none; }

/* ============================================================================
   9. LOADER — sky ground, ink-framed sunset bar
   ============================================================================ */
#loader {
    background: linear-gradient(180deg, #8FD4FF 0%, #E9F3FF 44%, #FFC79F 76%, #FFB0CD 100%) !important;
}
#loader-bar-track {
    background: var(--an-card) !important;
    border: 3px solid var(--an-ink) !important;
    border-radius: 6px !important;
    box-shadow: 4px 4px 0 0 var(--an-ink);
    height: 16px; padding: 0; overflow: hidden;
}
#loader-bar-fill {
    background: linear-gradient(100deg, #FF5E7E 0%, #FF9A56 52%, #B36BFF 100%) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
#loader-bar-shimmer { opacity: 0.35; }

/* ============================================================================
   10. REDUCED MOTION — keep the cut, drop the travel
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    .day-event-item:hover, .list-event-item:hover, #today-btn:hover { transform: none; }
}

/* ============================================================================
   11. ADMIN + HOST SUBMISSION PAGES (admin.php, submit.php share these tokens)
   ============================================================================ */
.login-container h1, .logged-in-container h1, .head h1 {
    font-family: var(--font-anime-pop); text-transform: uppercase;
    letter-spacing: 0.04em; font-weight: 400; color: var(--label);
}
.login-icon, .logged-in-icon {
    background: var(--an-sunset) !important;
    border: 3px solid var(--an-ink); border-radius: 6px !important;
    box-shadow: 4px 4px 0 0 var(--an-ink);
}
.login-btn, .action-btn.primary, button.submit {
    background: var(--an-pink) !important; color: #2B1A4E !important;
    border: 2.5px solid var(--an-ink) !important; border-radius: 6px !important;
    box-shadow: 4px 4px 0 0 var(--an-ink);
    font-family: var(--font-anime-pop) !important; text-transform: uppercase;
    letter-spacing: 0.05em; font-weight: 400 !important;
}
.action-btn.secondary {
    background: var(--an-card) !important; color: var(--label) !important;
    border: 2.5px solid var(--an-edge) !important; border-radius: 6px !important;
    box-shadow: 4px 4px 0 0 var(--an-shadow);
    font-family: var(--font-anime-pop); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 400;
}
.login-btn:hover, .action-btn:hover, button.submit:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--an-ink); }
.login-btn:active, .action-btn:active, button.submit:active { transform: translate(4px, 4px); box-shadow: 0 0 0 0 var(--an-ink); }
.login-footer a { color: var(--brand-ink); font-weight: 700; }
.login-error { color: #C81E45; font-weight: 700; }
.msg.ok { background: rgba(53, 224, 161, .2); color: #0B7A4E; border: 2px solid var(--an-edge); border-radius: 6px; }
.msg.err { background: var(--an-tint); color: #C81E45; border: 2px solid var(--an-edge); border-radius: 6px; }

/* ============================================================================
   12. SHARE A POSTER (share.js) — header button + sheet
   Phone: bottom sheet, preview on top, controls below, sticky action bar.
   Desktop (≥ 860px): centred two-pane dialog — preview left, controls right.
   ============================================================================ */
#share-btn { gap: 6px; padding: 0 !important; }
#share-btn .share-btn-label { display: none; font-size: 12px; }
@media (min-width: 640px) {
    #share-btn { padding: 0 12px !important; background: var(--an-pink) !important; color: #2B1A4E !important; }
    #share-btn:hover { background: var(--an-sky) !important; }
    #share-btn .share-btn-label { display: inline; }
}

.share-overlay {
    position: fixed; inset: 0; z-index: 400; background: rgba(43, 26, 78, 0.62);
    opacity: 0; transition: opacity 0.18s;
}
.share-overlay.visible { opacity: 1; }
.share-sheet {
    position: fixed; z-index: 401; left: 0; right: 0; bottom: 0;
    max-height: 94vh; max-height: 94dvh;
    display: flex; flex-direction: column;
    background: var(--an-pane); color: var(--label);
    border: 3px solid var(--an-edge); border-bottom: 0; border-radius: 6px 6px 0 0;
    box-shadow: 0 -5px 0 0 var(--an-shadow);
    transform: translateY(100%); transition: transform 0.22s;
    font-family: var(--font-anime);
}
.share-sheet.visible { transform: translateY(0); }
.share-head {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px 10px calc(16px + var(--sal));
    background: linear-gradient(100deg, var(--an-sunset-a) 0%, var(--an-sunset-b) 52%, var(--an-sunset-c) 100%) top / 100% 6px no-repeat, var(--an-card);
    border-bottom: 3px solid var(--an-edge);
}
.share-head h2 { margin: 0; font-family: var(--font-anime-pop); font-weight: 400; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; text-shadow: 2px 2px 0 var(--an-pink); }
.share-x {
    width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--an-card); color: var(--label); font-size: 16px; cursor: pointer;
    border: 2.5px solid var(--an-edge); border-radius: 4px; box-shadow: 2px 2px 0 0 var(--an-shadow);
}
.share-x:active { transform: translate(2px, 2px); box-shadow: none; }

.share-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px calc(14px + var(--sar)) 6px calc(14px + var(--sal)); display: flex; flex-direction: column; gap: 16px; }
.share-preview { display: flex; justify-content: center; }
.share-frame {
    position: relative; display: inline-flex; max-width: 100%;
    padding: 10px; background: var(--an-card);
    border: 2.5px solid var(--an-edge); border-radius: 6px; box-shadow: 5px 5px 0 0 var(--an-shadow);
}
.share-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 36vh; max-height: 36dvh; background: var(--an-page); border: 2px solid var(--an-edge); }
.share-loading {
    position: absolute; inset: 10px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
    background: rgba(233, 243, 255, 0.82); font-family: var(--font-anime-pop); text-transform: uppercase; letter-spacing: 0.04em; font-size: 13px; line-height: 1.5; color: var(--label);
}

.share-controls { display: flex; flex-direction: column; gap: 14px; }
.share-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.share-field legend { padding: 0 0 8px; font-family: var(--font-anime-pop); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--secondary-label); }
.share-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.share-chip {
    font: 800 13px var(--font-anime); color: var(--label); background: var(--an-card); cursor: pointer;
    padding: 8px 12px; min-height: 40px;
    border: 2.5px solid var(--an-edge); border-radius: 6px; box-shadow: 3px 3px 0 0 var(--an-shadow);
}
.share-chip:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--an-shadow); }
.share-chip[aria-pressed="true"] { background: var(--an-pink); color: #2B1A4E; transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 var(--an-shadow); }
.share-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.share-dates label { display: flex; flex-direction: column; gap: 4px; font: 800 12px var(--font-anime); color: var(--secondary-label); text-transform: uppercase; letter-spacing: 0.05em; min-width: 0; }
.share-dates input {
    font: 700 16px var(--font-anime); color: var(--label); background: var(--an-card); min-height: 44px; width: 100%; min-width: 0;
    padding: 6px 10px; border: 2.5px solid var(--an-edge); border-radius: 6px; box-shadow: 2px 2px 0 0 var(--an-shadow);
}
.share-note { margin: 8px 0 0; min-height: 1.2em; font-size: 12.5px; font-weight: 700; color: var(--brand-ink); }

.share-formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-fmt { position: relative; cursor: pointer; display: block; }
.share-fmt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.share-fmt-card {
    display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 10px 6px 9px; height: 100%;
    background: var(--an-card); border: 2.5px solid var(--an-edge); border-radius: 6px; box-shadow: 3px 3px 0 0 var(--an-shadow);
}
.share-fmt-card b { font: 400 12px var(--font-anime-pop); text-transform: uppercase; letter-spacing: 0.04em; }
.share-fmt-card small { font: 700 11px var(--font-anime); color: var(--secondary-label); }
.share-fmt-card em { font: 700 10.5px var(--font-anime); font-style: normal; color: var(--brand-ink); }
.share-fmt input:checked + .share-fmt-card { background: var(--an-pink); color: #2B1A4E; transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 var(--an-shadow); }
.share-fmt input:checked + .share-fmt-card small, .share-fmt input:checked + .share-fmt-card em { color: #2B1A4E; }
.share-fmt input:focus-visible + .share-fmt-card { outline: 3px solid var(--an-sky); outline-offset: 2px; }
.share-fmt-shape { display: block; border: 2.5px solid var(--an-edge); background: var(--an-sunset); border-radius: 2px; margin-bottom: 4px; }
.share-fmt-story { width: 16px; height: 28px; }
.share-fmt-square { width: 24px; height: 24px; }
.share-fmt-wide { width: 32px; height: 18px; }

.share-actions {
    flex: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px calc(14px + var(--sar)) calc(12px + var(--sab)) calc(14px + var(--sal));
    background: var(--an-card); border-top: 3px solid var(--an-edge);
}
.share-btn {
    flex: 1 1 140px; min-height: 48px; padding: 8px 14px; cursor: pointer;
    font: 400 12px var(--font-anime-pop); text-transform: uppercase; letter-spacing: 0.03em; color: var(--label); background: var(--an-card);
    border: 2.5px solid var(--an-edge); border-radius: 6px; box-shadow: 3px 3px 0 0 var(--an-shadow); white-space: nowrap;
}
.share-btn[hidden] { display: none; }
.share-btn.primary { background: var(--an-pink); color: #2B1A4E; box-shadow: 4px 4px 0 0 var(--an-shadow); order: -1; }
.share-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--an-shadow); }
.share-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 0 var(--an-shadow); }

@media (min-width: 860px) {
    .share-sheet {
        left: 50%; right: auto; bottom: auto; top: 50%;
        width: min(1000px, 94vw); max-height: min(740px, 92vh);
        border: 3px solid var(--an-edge); border-radius: 6px; box-shadow: 8px 8px 0 0 var(--an-shadow);
        transform: translate(-50%, -46%); opacity: 0; transition: transform 0.2s, opacity 0.18s;
    }
    .share-sheet.visible { transform: translate(-50%, -50%); opacity: 1; }
    .share-body { flex-direction: row; align-items: stretch; gap: 22px; padding: 18px 18px 10px; }
    .share-preview { flex: 1 1 auto; min-width: 0; align-items: center; }
    .share-canvas { max-height: calc(min(740px, 92vh) - 190px); max-width: 100%; }
    .share-controls { flex: 0 0 340px; overflow-y: auto; padding: 2px 6px 6px 2px; }
    .share-actions { padding-bottom: 12px; }
    .share-btn { flex: 0 1 auto; min-width: 150px; }
    .share-btn.primary { order: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .share-sheet, .share-overlay { transition: none; }
}

/* ============================================================================
   13. ONLINE / IRL FILTER — header switch, chapter chips, 📍 markers
   ============================================================================ */
.filter-bar {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 2px 12px 8px;
}
.filter-seg {
    display: inline-flex; padding: 3px; gap: 3px;
    background: var(--an-pane);
    border: 2.5px solid var(--an-edge); border-radius: 6px;
    box-shadow: 3px 3px 0 0 var(--an-shadow);
}
.filter-seg [role="radio"] {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    min-height: 30px; min-width: 64px; padding: 0 12px;
    font: 400 12px var(--font-anime-pop); letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--label); background: transparent;
    border: 2px solid transparent; border-radius: 4px; cursor: pointer;
    transition: background 0.12s, transform 0.12s cubic-bezier(0.16, 1.24, 0.3, 1);
}
.filter-seg [role="radio"]:hover { background: var(--an-tint); }
.filter-seg [role="radio"][aria-checked="true"] {
    background: var(--an-pink); color: #2B1A4E;
    border-color: var(--an-ink); box-shadow: 2px 2px 0 0 var(--an-ink);
}
.filter-bar[data-show="irl"] .filter-seg [data-show="irl"][aria-checked="true"] { background: var(--an-sky); }
.filter-seg [role="radio"]:focus-visible { outline: 3px solid var(--an-sky); outline-offset: 2px; }
.filter-seg [role="radio"]:active { transform: translate(1px, 1px); }

.filter-cities {
    display: flex; gap: 6px; max-width: 100%;
    overflow-x: auto; scrollbar-width: none; padding: 1px 3px 4px;
    -webkit-overflow-scrolling: touch;
}
.filter-cities::-webkit-scrollbar { display: none; }
.filter-cities[hidden] { display: none; }
.city-chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    min-height: 28px; padding: 0 11px;
    font: 700 12px var(--font-anime); color: var(--label);
    background: var(--an-card);
    border: 2px solid var(--an-edge); border-radius: 999px;
    box-shadow: 2px 2px 0 0 var(--an-shadow); cursor: pointer; white-space: nowrap;
}
.city-chip:hover { background: var(--an-tint); }
.city-chip.is-on { background: var(--an-sky); color: #2B1A4E; border-color: var(--an-ink); }
.city-chip:focus-visible { outline: 3px solid var(--an-pink); outline-offset: 2px; }
.city-chip-n {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; background: var(--an-ink); color: #FFFFFF;
}
html[data-theme="dark"] .city-chip-n { background: var(--an-edge); color: #140A2E; }

@media (max-width: 480px) {
    .filter-bar { padding: 0 10px 6px; gap: 6px; }
    .filter-seg [role="radio"] { min-height: 28px; min-width: 0; padding: 0 11px; font-size: 11px; }
}

/* The anime pin (app.js PIN_SVG): cel teardrop + ink outline + hard offset
   shadow + white sparkle-star. Theme colours via vars: pink body everywhere
   in the UI; in the month grid the body takes the EVENT colour. */
:root {
    --pin-fill: var(--an-pink);
    --pin-ink: var(--an-edge);
    --pin-shadow: var(--an-shadow);
}
.pin-ico { display: inline-block; flex: 0 0 auto; overflow: visible; vertical-align: -2px; }

/* IRL marker in the month grid: the pin, in the event's own colour */
.event-dot.is-irl {
    --pin-fill: currentColor; --pin-ink: #2B1A4E; --pin-shadow: #2B1A4E;
    width: 17px; height: 17px; margin-top: -11px; align-self: flex-end;
    background: none !important; border: 0; border-radius: 0; box-shadow: none;
    display: inline-flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 0 1.2px rgba(255, 255, 255, 0.95));
}
.event-dot.is-irl .pin-ico { width: 17px; height: 17px; }
@media (max-width: 480px) {
    .event-dot.is-irl { width: 14px; height: 14px; margin-top: -8px; }
    .event-dot.is-irl .pin-ico { width: 14px; height: 14px; }
}

/* Bigger pins in the switches, with a snap hop on hover */
.filter-seg .pin-ico, .kind-seg .pin-ico { width: 15px; height: 15px; transition: transform 0.18s cubic-bezier(0.16, 1.24, 0.3, 1); }
.filter-seg [data-show="irl"]:hover .pin-ico, .kind-seg [data-kind="irl"]:hover .pin-ico { transform: translateY(-2px) rotate(-8deg); }
.filter-seg [aria-checked="true"] .pin-ico, .kind-seg [aria-checked="true"] .pin-ico { --pin-ink: #2B1A4E; --pin-shadow: #2B1A4E; }
@media (prefers-reduced-motion: reduce) {
    .filter-seg .pin-ico, .kind-seg .pin-ico { transition: none; }
    .filter-seg [data-show="irl"]:hover .pin-ico, .kind-seg [data-kind="irl"]:hover .pin-ico { transform: none; }
}

/* "📍 London · The Crown" lines */
.event-where, .list-event-where, .detail-where {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--brand-ink); font-weight: 700;
}
.event-where { display: flex; margin-top: 2px; font-size: 12px; gap: 5px; }
.event-where .pin-ico, .list-event-where .pin-ico, .detail-where .pin-ico { width: 14px; height: 14px; }
.timeline-event-title .pin-ico { width: 13px; height: 13px; --pin-ink: #2B1A4E; --pin-shadow: #2B1A4E; }
.list-event-where { margin-left: 6px; font-size: inherit; }
.event-where .pin-ico, .list-event-where .pin-ico, .detail-where .pin-ico { flex: 0 0 auto; }
.detail-where { flex-wrap: wrap; gap: 6px; }
.detail-maps-link {
    margin-left: 4px; padding: 2px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; text-decoration: none;
    color: #2B1A4E; background: var(--an-sky); border: 2px solid var(--an-ink);
}
.timeline-event-title .pin-ico { margin-right: 4px; vertical-align: -2px; }

/* Editor: Online / IRL segmented control */
.kind-seg {
    display: inline-flex; gap: 3px; padding: 3px; margin-left: auto;
    background: var(--an-pane); border: 2px solid var(--an-edge); border-radius: 6px;
}
.kind-seg [role="radio"] {
    display: inline-flex; align-items: center; gap: 5px;
    min-height: 32px; padding: 0 12px; cursor: pointer;
    font: 700 13px var(--font-anime); color: var(--label);
    background: transparent; border: 2px solid transparent; border-radius: 4px;
}
.kind-seg [role="radio"][aria-checked="true"] {
    background: var(--an-pink); color: #2B1A4E; border-color: var(--an-ink); box-shadow: 2px 2px 0 0 var(--an-ink);
}
.kind-seg [data-kind="irl"][aria-checked="true"] { background: var(--an-sky); }
.kind-seg [role="radio"]:focus-visible { outline: 3px solid var(--an-sky); outline-offset: 2px; }
.form-field[hidden] { display: none !important; }
/* Search results: IRL meetups get the pin in their event colour */
.aeon-cmdk-icon.is-pin { --pin-fill: currentColor; --pin-ink: #2B1A4E; --pin-shadow: #2B1A4E; display: inline-flex; align-items: center; justify-content: center; }
.aeon-cmdk-icon.is-pin .pin-ico { width: 16px; height: 16px; }

/* ============================================================================
   14. MONTH CELL EVENT COUNT — count coin (small cells) / event chips (roomy
   cells), chosen per cell by container queries; busy-day sunset glow; and
   the desktop hover/focus peek card. Markup: app.js dayCountHtml / showPeek.
   ============================================================================ */
.day-cell { container: daycell / size; padding-bottom: 15px; }

/* -- busy-day glow: a sunset wash rising from the bottom, scaled by --busy -- */
.day-cell.is-busy::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
    z-index: 0; pointer-events: none;
    background: linear-gradient(to top,
        rgba(255, 94, 126, calc(var(--busy, 0) * 0.62)) 0%,
        rgba(255, 154, 86, calc(var(--busy, 0) * 0.30)) 45%,
        rgba(179, 107, 255, 0) 100%);
}

/* -- count coin (default = small cells / phones) -------------------------- */
.day-count { position: absolute !important; inset: 0; z-index: 2 !important; pointer-events: none; }
.count-coin {
    position: absolute; top: 5px; right: 5px;
    min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    font: 400 11px/1 var(--font-anime-pop); font-variant-numeric: tabular-nums;
    color: #2B1A4E; background: #FFFFFF;
    border: 2px solid #2B1A4E; border-radius: 999px;
    box-shadow: 2px 2px 0 0 #2B1A4E;
}
.count-coin.is-hot { background: var(--an-pink); }
.count-coin.is-hot::after {               /* manga sparkle on busy days */
    content: "✦"; position: absolute; top: -9px; right: -6px;
    font-size: 11px; line-height: 1; color: #FFFFFF;
    -webkit-text-stroke: 1.2px #2B1A4E; paint-order: stroke fill;
    animation: aeon-twinkle 2.4s ease-in-out infinite;
}
@keyframes aeon-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.3) rotate(18deg); } }
.coin-pin {
    position: absolute; left: -8px; bottom: -7px; width: 14px; height: 14px;
    --pin-fill: var(--an-sky); --pin-ink: #2B1A4E; --pin-shadow: #2B1A4E;
}
.coin-pin .pin-ico { width: 14px; height: 14px; }
.count-bar {
    position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
    width: 62%; max-width: 46px; height: 6px; box-sizing: border-box;
    display: flex; gap: 1.5px; overflow: hidden;
    background: #2B1A4E; border: 1.5px solid #2B1A4E; border-radius: 4px;
}
.count-bar i { flex: 1 1 0; min-width: 0; border-radius: 1px; }

/* -- event chips (roomy cells / desktop) — hidden until there's room ------- */
.day-chips { display: none; }
.day-chip, .day-chip-more { display: none; }

/* thresholds are the cell's CONTENT box (cell height minus its 15px bottom padding) */
@container daycell (min-width: 110px) and (min-height: 80px) {
    .day-count { display: none; }
    .day-cell .day-number {
        position: absolute !important; top: 4px; left: 5px; z-index: 3 !important;
        width: 28px; height: 28px; font-size: 14px;
    }
    .day-chips {
        display: flex; flex-direction: column; align-items: stretch; gap: 3px;
        position: absolute !important; left: 4px; right: 4px; bottom: 5px; z-index: 2 !important;
        pointer-events: none;
    }
    .day-chips::before {                  /* ink fade so chips read over the art */
        content: ""; position: absolute; left: -4px; right: -4px; bottom: -5px; top: -22px; z-index: -1;
        background:
            linear-gradient(to top, rgba(255, 62, 138, calc(var(--busy, 0) * 0.55)), rgba(255, 154, 86, 0) 75%),
            linear-gradient(to top, rgba(20, 10, 46, 0.58), rgba(20, 10, 46, 0));
    }
    .day-chip.chip-1, .day-chip.chip-2 { display: flex; }
    .day-chip-more.more-if-2 { display: block; }
}
@container daycell (min-width: 110px) and (min-height: 102px) {
    .day-chip.chip-3 { display: flex; }
    .day-chip-more.more-if-2 { display: none; }
    .day-chip-more.more-if-3 { display: block; }
}
.day-chip {
    align-items: center; gap: 4px; min-width: 0;
    height: 18px; padding: 0 6px 0 3px; box-sizing: border-box;
    font: 700 10.5px/1 var(--font-anime); color: #2B1A4E;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid #2B1A4E; border-radius: 4px;
    box-shadow: 1.5px 1.5px 0 0 #2B1A4E;
    white-space: nowrap; overflow: hidden;
}
.day-chip b { flex: 0 0 auto; font-weight: 800; color: #C21B60; }
.chip-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip-bar { flex: 0 0 4px; height: 11px; border-radius: 2px; box-shadow: 0 0 0 1px #2B1A4E; }
.chip-pin { flex: 0 0 auto; display: inline-flex; --pin-fill: currentColor; --pin-ink: #2B1A4E; --pin-shadow: #2B1A4E; }
.chip-pin .pin-ico { width: 13px; height: 13px; }
.day-chip-more {
    align-self: flex-start; padding: 0 2px;
    font: 400 10.5px/1.2 var(--font-anime-pop); letter-spacing: 0.02em; color: #FFFFFF;
    -webkit-text-stroke: 2.5px #2B1A4E; paint-order: stroke fill;
}
.day-cell.other-month .day-chips, .day-cell.other-month .day-count { opacity: 0.7; }
html[data-theme="dark"] .day-chip {
    background: rgba(30, 18, 64, 0.95); color: #F4EEFF;
    border-color: #A58BFF; box-shadow: 1.5px 1.5px 0 0 #07020F;
}
html[data-theme="dark"] .day-chip b { color: #FF8AB8; }

/* -- peek card (desktop hover / keyboard focus) --------------------------- */
.day-peek {
    position: fixed; z-index: 9000; width: 290px; max-height: min(460px, 86vh); overflow: hidden;
    background: var(--an-card); color: var(--label);
    border: 2.5px solid var(--an-edge); border-radius: 6px; box-shadow: 6px 6px 0 0 var(--an-shadow);
    opacity: 0; transform: translateY(6px) scale(0.97); pointer-events: none;
    transition: opacity 0.14s ease, transform 0.22s cubic-bezier(0.16, 1.24, 0.3, 1);
}
.day-peek.visible { opacity: 1; transform: none; }
.peek-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px 8px;
    background: linear-gradient(100deg, var(--an-sunset-a) 0%, var(--an-sunset-b) 52%, var(--an-sunset-c) 100%);
    border-bottom: 2.5px solid var(--an-edge);
}
.peek-date {
    font: 400 15px/1.1 var(--font-anime-pop); letter-spacing: 0.03em; text-transform: uppercase; color: #FFFFFF;
    -webkit-text-stroke: 3px #2B1A4E; paint-order: stroke fill;
}
.peek-count {
    flex: 0 0 auto; padding: 3px 8px; border-radius: 999px;
    font: 400 10.5px/1 var(--font-anime-pop); text-transform: uppercase; color: #2B1A4E;
    background: #FFFFFF; border: 2px solid #2B1A4E; box-shadow: 2px 2px 0 0 #2B1A4E;
}
.peek-list { list-style: none; margin: 0; padding: 6px 0; }
.peek-row { display: flex; gap: 10px; align-items: stretch; padding: 7px 12px; }
.peek-row + .peek-row { border-top: 1.5px dashed color-mix(in srgb, var(--an-edge) 28%, transparent); }
.peek-mark { flex: 0 0 5px; border-radius: 3px; box-shadow: 0 0 0 1.5px #2B1A4E; }
.peek-mark.is-pin { flex: 0 0 16px; background: none; box-shadow: none; display: inline-flex; align-items: flex-start; padding-top: 1px;
    --pin-fill: currentColor; --pin-ink: #2B1A4E; --pin-shadow: #2B1A4E; }
.peek-mark.is-pin .pin-ico { width: 16px; height: 16px; }
.peek-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.peek-time { font: 800 11px/1.2 var(--font-anime); color: var(--brand-ink); }
.peek-title { font: 800 13.5px/1.25 var(--font-anime); color: var(--label); overflow-wrap: anywhere; }
.peek-sub { font: 700 11.5px/1.25 var(--font-anime); color: var(--secondary-label); overflow-wrap: anywhere; }
.peek-sub.is-where { color: var(--brand-ink); }
.peek-more { padding: 6px 12px 4px; font: 700 11.5px var(--font-anime); color: var(--brand-ink); }

@media (prefers-reduced-motion: reduce) {
    .count-coin.is-hot::after { animation: none; }
    .day-peek { transition: none; transform: none; }
}

/* ============================================================================
   15. TODAY HIGHLIGHT — "Sunlit aura": the day is lit from within.
   The single today tile gets:
     • cell::after          a crisp SUNSET FRAME (4px gradient band, ink keyline,
                            warm light rim) — replaces premium.css's 1px mask ring
     • cell::before         cel-banded SUNLIGHT + light shafts pooling from the
                            top, screen-blended over the art (replaces the busy
                            glow on this one cell; coin/chips still show busyness)
     • .day-bg::before      a two-stripe cel GLINT sweeping the art (under the
                            numeral, coin and chips — never washes them)
     • .day-number          a SUNSET MEDAL: white ring, hard ink drop, stepped
                            hard-edged halo, twinkling ✦ on its shoulder
     • .day-number::after   "TODAY" tag (roomy/desktop cells only)
     • .today-time-bar      re-seated as the frame's bottom edge, filling
                            white-hot as the day passes (+ ✦ at "now" on desktop)
   Keyboard focus gets its OWN look (sky ring sandwiched in ink, drawn on a
   pseudo because .day-bg paints over inset outlines), so it never reads as today.
   Why the old ring was faint: an element's own outline is painted BEFORE its
   z-index:0 positioned children in Chrome/Safari, so .day-bg (absolute, z0,
   opacity .95) covered ~95% of the 3px pink today/focus outline.
   Stacking inside today's cell (cell is a stacking context via container
   size/layout containment + isolation):
     .day-bg z0 (glint inside) < ::before light z1 < .day-number z1 (small) <
     ::after frame z2 < .day-count z3 (coin/bar sit ON the frame as stickers) =
     .today-time-bar z3;  roomy: .day-chips z2 (moved inside the frame) <
     frame z2 < numeral z3 (anime §14 !important).
   Every selector is #month-grid-scoped so it outranks style.css, premium.css
   (incl. its @supports ::after ring) and anime.css §4/§14; the two !important
   properties it must beat (numeral background, .day-count z-index) repeat it.
   Must sit after §14 (reuses the aeon-twinkle keyframes defined there).
   ============================================================================ */

/* -- tokens (day = default; night below) ---------------------------------- */
#month-grid .day-cell.is-today {
    --tl-1:    rgba(255, 222, 150, 0.44);   /* inner sun band            */
    --tl-2:    rgba(255, 150, 90, 0.30);    /* middle band               */
    --tl-3:    rgba(255, 94, 126, 0.20);    /* outer band                */
    --tl-ray:  rgba(255, 255, 255, 0.18);   /* light shafts              */
    --tl-rim:  rgba(255, 236, 190, 0.85);   /* light rim inside the frame */
    --tl-halo: rgba(255, 210, 130, 0.62);   /* stepped halo round medal  */
    --tl-frame: linear-gradient(135deg, #FFD36E 0%, #FF5E7E 34%, #FF9A56 62%, #B36BFF 100%);
}
html[data-theme="dark"] #month-grid .day-cell.is-today {
    --tl-1:    rgba(255, 226, 170, 0.50);
    --tl-2:    rgba(255, 154, 86, 0.36);
    --tl-3:    rgba(255, 94, 126, 0.22);
    --tl-ray:  rgba(255, 236, 200, 0.16);
    --tl-rim:  rgba(255, 214, 150, 0.70);
    --tl-halo: rgba(255, 180, 110, 0.50);
}

/* -- keyboard focus: its OWN look (sky ring between ink lines) on ::after,
      above the art. Declared BEFORE the today frame so today's ::after wins
      on equal specificity; today + focus is handled after the frame. ------- */
#month-grid .day-cell:focus-visible {
    outline: none;
    box-shadow: none;
    border-radius: 0;
}
#month-grid .day-cell:focus-visible::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    box-shadow:
        inset 0 0 0 1.5px var(--an-ink),
        inset 0 0 0 4.5px var(--an-sky),
        inset 0 0 0 6px var(--an-ink);
}

/* -- the cell: drop the old pink outline + premium bloom ------------------- */
#month-grid .day-cell.is-today {
    outline: none;
    box-shadow: none;
    isolation: isolate;
}

/* -- ::after = the sunset frame (neutralises premium.css's mask ring) ------- */
#month-grid .day-cell.is-today::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    box-sizing: border-box;
    padding: 0;
    border-radius: 0;
    background: none;
    -webkit-mask: none;
            mask: none;
    border: 4px solid #FF5E7E;               /* fallback if border-image fails */
    border-image: var(--tl-frame) 1;
    box-shadow:
        inset 0 0 0 1.5px var(--an-ink),      /* ink keyline inside the band   */
        inset 0 0 0 3.5px var(--tl-rim);      /* warm light catching the bevel */
}
/* today + keyboard focus: the frame stays, the warm rim becomes the sky ring */
#month-grid .day-cell.is-today:focus-visible::after {
    box-shadow:
        inset 0 0 0 1.5px var(--an-ink),
        inset 0 0 0 4.5px var(--an-sky),
        inset 0 0 0 6px var(--an-ink);
}

/* -- ::before = sunlight pooling from the top (replaces busy glow here) ---- */
#month-grid .day-cell.is-today::before {
    content: "";
    position: absolute;
    inset: 0;
    height: auto;                 /* undo §14 busy rule's height:60% */
    z-index: 1;                   /* above .day-bg, below numeral/frame/coin */
    pointer-events: none;
    background:
        repeating-conic-gradient(from 0deg at 50% -14%,
            var(--tl-ray) 0deg 2.5deg, rgba(255, 255, 255, 0) 2.5deg 15deg),
        radial-gradient(130% 85% at 50% -6%,
            var(--tl-1) 0 24%,
            var(--tl-2) 25% 44%,
            var(--tl-3) 45% 64%,
            rgba(255, 94, 126, 0) 65%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 38%, transparent 84%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 38%, transparent 84%);
    mix-blend-mode: screen;
    opacity: 1;
}

/* -- cel glint on the art (inside .day-bg's own stacking context, so it sits
      under the light, numeral, coin, chips and frame) ---------------------- */
#month-grid .day-cell.is-today .day-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;                   /* above premium.css's .day-bg::after scrim */
    pointer-events: none;
    /* The glint moves by background-position, NOT transform/opacity: a
       transform-animated layer inside .day-bg (opacity .95) got composited
       on its own and washed the whole tile pale in Chrome. Painting one
       small cell is cheap; the stripes sit off-tile between sweeps. */
    background: linear-gradient(105deg,
        rgba(255, 255, 255, 0) 0 44%,
        rgba(255, 255, 255, 0.55) 44% 47%,
        rgba(255, 255, 255, 0) 47% 49%,
        rgba(255, 250, 230, 0.42) 49% 50.5%,
        rgba(255, 255, 255, 0) 50.5% 100%) no-repeat;
    background-size: 300% 100%;
    background-position: 100% 0;
}

/* -- the numeral: a sunset medal (beats anime §4's !important pink coin) --- */
#month-grid .day-cell.is-today .day-number,
#month-grid .day-cell.is-today.is-selected .day-number {
    background:
        radial-gradient(circle at 31% 27%, rgba(255, 255, 255, 0.95) 0 11%, rgba(255, 255, 255, 0) 12%),
        linear-gradient(150deg, #FFD36E 0%, #FF9A56 30%, #FF5E7E 62%, #B36BFF 100%) !important;
    color: #FFFFFF;
    opacity: 1;
    -webkit-text-stroke: 3px var(--an-ink);
    paint-order: stroke fill;
    text-shadow: none;
    border: 2.5px solid var(--an-ink);
    border-radius: 50%;
    overflow: visible;
    box-shadow:
        0 0 0 2px #FFFFFF,                    /* white medal ring  */
        2px 2px 0 2px var(--an-ink),          /* hard cel drop     */
        0 0 0 5.5px var(--tl-halo);           /* stepped hard halo */
}
/* twinkling sparkle on the medal's shoulder */
#month-grid .day-cell.is-today .day-number::before {
    content: "\2726";
    position: absolute;
    top: -9px;
    right: -9px;
    z-index: 1;
    pointer-events: none;
    font: 400 13px/1 system-ui, -apple-system, sans-serif;
    color: #FFF6C8;
    -webkit-text-stroke: 1.4px var(--an-ink);
    paint-order: stroke fill;
}
#month-grid .day-cell.is-today .day-number::after { content: none; }

/* -- count coin + colour bar (small cells) ride ON the frame as stickers --- */
#month-grid .day-cell.is-today .day-count { z-index: 3 !important; }

/* -- time bar: re-seated as the frame's bottom edge (style.css
      `.day-cell > :not(.day-bg)` had made it an in-flow flex item that lifted
      today's numeral), filling white-hot as the day passes ---------------- */
#month-grid .day-cell.is-today > .today-time-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    top: auto;
    right: auto;
    z-index: 3;
    margin: 0;
    height: 4px;
    max-width: 100%;
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(255, 246, 214, 0.9) 0%, #FFFFFF 100%);
    border: 0;
    border-radius: 0;
    box-shadow: 1.5px 0 0 0 var(--an-ink);    /* ink cap at "now" */
    pointer-events: none;
}

/* -- roomy cells (desktop): medal seated inside the frame, TODAY tag, chips
      stepped inside the frame, ✦ riding the time bar --------------------- */
@container daycell (min-width: 110px) and (min-height: 80px) {
    #month-grid .day-cell.is-today .day-number {
        top: 9px;
        left: 10px;
    }
    #month-grid .day-cell.is-today .day-number::after {
        content: "Today";
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%) rotate(-3deg);
        padding: 3px 6px 2px;
        font: 400 9.5px/1 var(--font-anime-pop);
        letter-spacing: 0.07em;
        text-transform: uppercase;
        white-space: nowrap;
        color: #C21B60;
        -webkit-text-stroke: 0;
        background: #FFFFFF;
        border: 1.5px solid var(--an-ink);
        border-radius: 3px;
        box-shadow: 1.5px 1.5px 0 0 var(--an-ink);
        pointer-events: none;
    }
    #month-grid .day-cell.is-today .day-chips {
        left: 8px;
        right: 8px;
        bottom: 7.5px;
    }
    #month-grid .day-cell.is-today .day-chips::before {
        left: -0.5px;
        right: -0.5px;
        bottom: 0;
    }
    #month-grid .day-cell.is-today > .today-time-bar::after {
        content: "\2726";
        position: absolute;
        right: -6px;
        bottom: 0;
        font: 400 11px/1 system-ui, -apple-system, sans-serif;
        color: #FFFFFF;
        -webkit-text-stroke: 1.2px var(--an-ink);
        paint-order: stroke fill;
        pointer-events: none;
    }
}

/* -- motion: only the single today cell animates, transform/opacity only -- */
@keyframes an-today-breathe {
    0%, 100% { opacity: 0.78; }
    50%      { opacity: 1; }
}
@keyframes an-today-shine {
    0%        { background-position: 100% 0; }
    30%, 100% { background-position: 0% 0; }
}
@media (prefers-reduced-motion: no-preference) {
    #month-grid .day-cell.is-today::before {
        animation: an-today-breathe 4.2s ease-in-out infinite;
    }
    #month-grid .day-cell.is-today .day-bg::before {
        animation: an-today-shine 7s cubic-bezier(0.45, 0, 0.25, 1) 1.2s infinite;
    }
    #month-grid .day-cell.is-today .day-number::before {
        animation: aeon-twinkle 2.4s ease-in-out infinite;
    }
    #month-grid .day-cell.is-today > .today-time-bar::after {
        animation: aeon-twinkle 2.4s ease-in-out 1.2s infinite;
    }
}
@media (prefers-reduced-motion: reduce) {
    #month-grid .day-cell.is-today::before,
    #month-grid .day-cell.is-today .day-bg::before,
    #month-grid .day-cell.is-today .day-number::before,
    #month-grid .day-cell.is-today > .today-time-bar::after {
        animation: none !important;
    }
    #month-grid .day-cell.is-today::before { opacity: 1; }
    #month-grid .day-cell.is-today .day-bg::before { background: none; }
}

/* -- forced colours (Windows High Contrast): box-shadows are dropped there,
      so give focus a real outline and the frame a system colour ----------- */
@media (forced-colors: active) {
    #month-grid .day-cell:focus-visible {
        outline: 3px solid CanvasText;
        outline-offset: -3px;
    }
    #month-grid .day-cell.is-today::after {
        border-image: none;
        border-color: Highlight;
    }
}


/* ============================================================================
   16. NIGHT EVENT EDGES — events get a warm SUNSET edge in night mode.
   The lavender outline (--an-edge) had plenty of brightness contrast (~5.7:1)
   but the SAME hue as the indigo cards behind it, so purple-on-purple read as
   one blur. Warm pink→orange→gold is the complement of indigo, comes straight
   from the header's sunset band and today's frame, and makes each event pop
   as a lit cel sticker. Drawn as a gradient border (padding-box fill over a
   border-box gradient) so rounded corners stay round. Light theme untouched.
   ============================================================================ */
html[data-theme="dark"] {
    --an-event-edge: linear-gradient(115deg, #FF5E9B 0%, #FF9A56 55%, #FFD36E 100%);
}
html[data-theme="dark"] .day-event-item,
html[data-theme="dark"] .list-event-item {
    border-color: transparent !important;
    background:
        linear-gradient(var(--an-card), var(--an-card)) padding-box,
        var(--an-event-edge) border-box !important;
}
html[data-theme="dark"] .day-chip {
    border-color: transparent;
    background:
        linear-gradient(#1E1240, #1E1240) padding-box,     /* opaque, so the edge can't bleed through */
        var(--an-event-edge) border-box;
    box-shadow: 1.5px 1.5px 0 0 #07020F;
}
/* the little dividers inside cards: crisp dark ink instead of lavender */
html[data-theme="dark"] .event-color-bar { border-right-color: #07020F; }
html[data-theme="dark"] .list-event-accent { border-color: #07020F; }
/* Timeline + week-view blocks are filled with the EVENT's own colour (inline
   style), so they take a solid warm edge from the same sunset family. */
html[data-theme="dark"] .timeline-event,
html[data-theme="dark"] .aeon-week-event {
    border-color: #FF8AB8 !important;
    box-shadow: 2px 2px 0 0 #07020F !important;
}
html[data-theme="dark"] .day-event-item .ics-bell-btn,
html[data-theme="dark"] .list-event-item .ics-bell-btn {
    border-color: #FF8AB8 !important;
    color: #FF8AB8;
}

/* ============================================================================
   17. TOGGLE SWITCH — a cel switch instead of the stock grey iOS pill.
   OFF: inked track with pale screentone, white knob.  ON: the sunset track,
   the knob turns into a little sun and a ✦ pops in on the left.  Snap
   easing; the knob squishes while pressed.  Markup (app.js):
   <label class="toggle-switch"><input type="checkbox" role="switch">
   <span class="toggle-slider"></span></label>  — the real checkbox lies
   invisibly over the track (style.css), so taps always land.
   Geometry: 58×32 outer, 2.5px border → 53×27 inside; knob 21px at 3px in.
   ============================================================================ */
/* right-aligned like every other value; it's a <label>, so undo the form's
   generic label sizing (style.css .form-field label { min-width: 80px }) */
.form-field .toggle-switch { margin-left: auto; min-width: 0; flex: 0 0 58px; }
.toggle-switch { width: 58px; height: 32px; }
.toggle-switch .toggle-slider {
    inset: 0;
    box-sizing: border-box;
    border: 2.5px solid var(--an-edge);
    border-radius: 999px;
    background-color: var(--an-pane);
    background-image: radial-gradient(var(--an-dot-a) 1.1px, transparent 1.5px),
                      radial-gradient(var(--an-dot-b) 1.1px, transparent 1.5px);
    background-size: 7px 7px, 7px 7px;
    background-position: 0 0, 3.5px 3.5px;
    box-shadow: 2px 2px 0 0 var(--an-shadow);
    transition: background-color 0.2s ease, box-shadow 0.15s ease;
}
/* the knob */
.toggle-switch .toggle-slider::before {
    left: 3px; top: 50%; bottom: auto;
    width: 21px; height: 21px;
    box-sizing: border-box;
    background: #FFFFFF;
    border: 2px solid #2B1A4E;
    border-radius: 999px;
    box-shadow: 1.5px 1.5px 0 0 #2B1A4E;
    transform: translate(0, -50%);
    transition: transform 0.32s cubic-bezier(0.16, 1.24, 0.3, 1), width 0.16s ease, background 0.2s ease;
}
/* the sparkle, hidden until ON */
.toggle-switch .toggle-slider::after {
    content: "\2726";
    position: absolute; left: 7px; top: 50%;
    font: 400 12px/1 system-ui, -apple-system, sans-serif;
    color: #FFFFFF;
    -webkit-text-stroke: 1.1px #2B1A4E; paint-order: stroke fill;
    transform: translateY(-50%) scale(0) rotate(-90deg);
    transition: transform 0.34s cubic-bezier(0.16, 1.24, 0.3, 1);
    pointer-events: none;
}
/* ON */
.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(100deg, var(--an-sunset-a) 0%, var(--an-sunset-b) 55%, var(--an-sunset-c) 100%) !important;
    border-color: #2B1A4E;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translate(26px, -50%);                       /* 53 inner − 21 knob − 3×2 gap */
    background: radial-gradient(circle at 36% 34%, #FFFDF2 0 22%, #FFE58A 23% 58%, #FFC94A 59% 100%);
}
.toggle-switch input:checked + .toggle-slider::after { transform: translateY(-50%) scale(1) rotate(0); }
/* hover lift + pressed squish */
.toggle-switch:hover .toggle-slider { box-shadow: 3px 3px 0 0 var(--an-shadow); }
.toggle-switch input:active + .toggle-slider::before { width: 26px; }
.toggle-switch input:checked:active + .toggle-slider::before { transform: translate(21px, -50%); }
/* keyboard focus */
.toggle-switch input:focus-visible + .toggle-slider { outline: 3px solid var(--an-sky); outline-offset: 3px; }
/* night: the track ink flips to the lavender edge like every other control */
html[data-theme="dark"] .toggle-switch input:checked + .toggle-slider { border-color: #FFD36E; }
@media (prefers-reduced-motion: reduce) {
    .toggle-switch .toggle-slider, .toggle-switch .toggle-slider::before, .toggle-switch .toggle-slider::after { transition: none; }
}
