:root,
html[data-theme="standard"]{
    --theme-bg:#f3f5f8;
    --theme-surface:#fff;
    --theme-surface-soft:#f7f8fa;
    --theme-text:#333;
    --theme-muted:#667085;
    --theme-border:#e5e7eb;
    --theme-accent:#2f6eb5;
    --theme-accent-soft:#edf3ff;
    --theme-shadow:rgba(0,0,0,.08);
}

html[data-theme="pop"]{
    --theme-bg:#fffaf0;
    --theme-surface:#fff;
    --theme-surface-soft:#fffdf5;
    --theme-text:#152047;
    --theme-muted:#63708e;
    --theme-border:#152047;
    --theme-accent:#2674ed;
    --theme-accent-soft:#dffbfc;
    --theme-pink:#ff5f91;
    --theme-yellow:#ffd938;
    --theme-cyan:#35d7dc;
    --theme-violet:#8259e8;
    --theme-green:#27c991;
    --theme-shadow:#152047;
}

.aes-pop-character{display:none}

html[data-theme="pop"] body{
    background:
        radial-gradient(circle at 10% 12%,#ffdded 0 4px,transparent 5px) 0 0/42px 42px,
        radial-gradient(circle at 92% 24%,#d8fbfc 0 5px,transparent 6px) 0 0/55px 55px,
        linear-gradient(135deg,#fffdf5,#f5feff 48%,#fff5fb);
    color:var(--theme-text);
    font-family:"Arial Rounded MT Bold","Yu Gothic","Hiragino Maru Gothic ProN","Segoe UI",sans-serif;
}

html[data-theme="pop"] .site-header{
    height:68px;
    border-bottom:3px solid var(--theme-border);
    background:#ffffffee;
    box-shadow:none;
    backdrop-filter:blur(15px);
}

html[data-theme="pop"] .layout{margin-top:68px;min-height:calc(100vh - 68px)}
html[data-theme="pop"] .logo{color:var(--theme-accent);font-weight:900;letter-spacing:-.03em}
html[data-theme="pop"] .menu-toggle{color:var(--theme-text)}
html[data-theme="pop"] .header-notification{
    width:40px;height:40px;border:2px solid var(--theme-border);border-radius:50%;
    background:var(--theme-cyan);color:var(--theme-text);box-shadow:2px 3px 0 var(--theme-border)
}
html[data-theme="pop"] .header-notification span{border-color:var(--theme-border);background:var(--theme-pink)}
html[data-theme="pop"] .locale-form select{
    border:2px solid var(--theme-border);border-radius:999px;background:#fff;color:var(--theme-text);font-weight:700;
    box-shadow:2px 3px 0 var(--theme-border)
}

html[data-theme="pop"] .sidebar{
    top:68px;height:calc(100vh - 68px);padding:20px 16px;border-right:3px solid var(--theme-border);
    background:
        radial-gradient(circle at 25px 25px,#ffffff38 0 5px,transparent 6px) 0 0/50px 50px,
        linear-gradient(180deg,#24cbd4,#3a93ee 58%,#7762e9);
}
html[data-theme="pop"] .sidebar a,
html[data-theme="pop"] .sidebar-group-toggle,
html[data-theme="pop"] .sidebar-notification-link,
html[data-theme="pop"] .logout-button{
    border:2px solid transparent;border-radius:18px;color:#fff;font-weight:800;text-shadow:1px 1px 0 #15204755
}
html[data-theme="pop"] .sidebar a:hover,
html[data-theme="pop"] .sidebar-notification-link:hover,
html[data-theme="pop"] .sidebar-notification-link:focus-visible,
html[data-theme="pop"] .sidebar a.is-active,
html[data-theme="pop"] .sidebar-group-toggle:hover,
html[data-theme="pop"] .sidebar-group-toggle:focus-visible,
html[data-theme="pop"] .sidebar-group-toggle.is-active,
html[data-theme="pop"] .sidebar-group.is-open>.sidebar-group-toggle,
html[data-theme="pop"] .logout-button:hover{
    border-color:var(--theme-border);background:var(--theme-yellow);color:var(--theme-text);
    box-shadow:3px 4px 0 var(--theme-border);text-shadow:none;transform:translateX(2px)
}
html[data-theme="pop"] .sidebar-group-items a{border-left:2px solid #ffffffaa;border-radius:0 14px 14px 0}
html[data-theme="pop"] .sidebar hr{border-top:2px dashed #ffffff99}
html[data-theme="pop"] .content{width:100%;max-width:1600px;margin:0 auto;padding:34px}

html[data-theme="pop"] h1,
html[data-theme="pop"] h2,
html[data-theme="pop"] h3,
html[data-theme="pop"] h4{color:var(--theme-text);font-weight:900}
html[data-theme="pop"] a{color:var(--theme-accent)}

html[data-theme="pop"] .card,
html[data-theme="pop"] .event-card,
html[data-theme="pop"] .participant-card,
html[data-theme="pop"] .participant-event-card,
html[data-theme="pop"] .notice-list,
html[data-theme="pop"] .news-article,
html[data-theme="pop"] .live-archive-card,
html[data-theme="pop"] .ndc-card,
html[data-theme="pop"] .modal-content,
html[data-theme="pop"] .profile-section,
html[data-theme="pop"] .admin-section,
html[data-theme="pop"] .dashboard-card{
    border:2px solid var(--theme-border)!important;
    border-radius:24px 13px 24px 13px!important;
    background:var(--theme-surface)!important;
    color:var(--theme-text)!important;
    box-shadow:4px 5px 0 var(--theme-shadow)!important;
}
html[data-theme="pop"] .event-card:nth-child(even),
html[data-theme="pop"] .participant-event-card:nth-child(even){border-radius:13px 24px 13px 24px!important}

html[data-theme="pop"] .btn,
html[data-theme="pop"] button:not(.menu-toggle):not(.sidebar-group-toggle):not(.sidebar-notification-link):not(.logout-button):not(.header-notification):not(.header-notification-close),
html[data-theme="pop"] .ndc-button{
    border:2px solid var(--theme-border);
    border-radius:999px;
    font-weight:800;
    box-shadow:2px 3px 0 var(--theme-border);
}
html[data-theme="pop"] .btn-primary,
html[data-theme="pop"] .ndc-button:not(.secondary):not(.danger){
    border-color:var(--theme-border)!important;background:var(--theme-yellow)!important;color:var(--theme-text)!important
}
html[data-theme="pop"] .btn-outline-primary,
html[data-theme="pop"] .btn-secondary,
html[data-theme="pop"] .ndc-button.secondary{background:var(--theme-cyan)!important;color:var(--theme-text)!important}
html[data-theme="pop"] .btn-danger,
html[data-theme="pop"] .ndc-button.danger{background:var(--theme-pink)!important;color:#fff!important}
html[data-theme="pop"] .btn:hover,
html[data-theme="pop"] button:hover{transform:translateY(-1px)}

/* Event detail actions use solid backgrounds, so the global pop link colour must not win. */
html[data-theme="pop"] .event-qualifier-link,
html[data-theme="pop"] .event-qualifier-link strong,
html[data-theme="pop"] .event-qualifier-link small,
html[data-theme="pop"] .event-qualifier-link b{
    color:#fff!important;
}
html[data-theme="pop"] .detail-primary{
    border:2px solid var(--theme-border);
    background:var(--theme-cyan);
    color:var(--theme-text)!important;
    box-shadow:2px 3px 0 var(--theme-border);
}
html[data-theme="pop"] .event-result-banner a{
    color:#fff!important;
}

html[data-theme="pop"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="pop"] select,
html[data-theme="pop"] textarea{
    border:2px solid var(--theme-border)!important;border-radius:13px!important;
    background:#fff!important;color:var(--theme-text)!important
}
html[data-theme="pop"] input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="pop"] select:focus,
html[data-theme="pop"] textarea:focus{
    border-color:var(--theme-pink)!important;box-shadow:0 0 0 3px #ff5f9133!important
}
html[data-theme="pop"] .form-check-input{
    border:2px solid var(--theme-border)!important;
    background-color:#fff;
}
html[data-theme="pop"] .form-check-input:checked{
    border-color:var(--theme-border)!important;
    background-color:var(--theme-cyan)!important;
}
html[data-theme="pop"] .form-check-input:focus{
    border-color:var(--theme-pink)!important;
    box-shadow:0 0 0 3px #ff5f9133!important;
}
html[data-theme="pop"] table{color:var(--theme-text)}
html[data-theme="pop"] th{background:#eefcfd!important;color:var(--theme-text)!important;font-weight:900}
html[data-theme="pop"] th,
html[data-theme="pop"] td{border-color:#dbe2f0!important}
html[data-theme="pop"] .table-responsive{border-radius:16px}

html[data-theme="pop"] .event-status,
html[data-theme="pop"] .event-type-badge,
html[data-theme="pop"] .badge,
html[data-theme="pop"] .notice-badge{
    border:1px solid var(--theme-border);border-radius:999px;font-weight:800
}
html[data-theme="pop"] .status-entry{background:#d9fff0;color:#116642}
html[data-theme="pop"] .status-open{background:#dffbfc;color:#105d75}
html[data-theme="pop"] .status-end{background:#eee9ff;color:#5436a7}
html[data-theme="pop"] .home-subtitle,
html[data-theme="pop"] .home-title{color:var(--theme-text)}
html[data-theme="pop"] .empty-card{border:2px dashed #9aa9c1;background:#fff;color:var(--theme-muted)}

/* NDC pages */
html[data-theme="pop"] .ndc-content{color:var(--theme-text)}
html[data-theme="pop"] .ndc-hero{
    padding:24px 26px;border:3px solid var(--theme-border);border-radius:28px 14px;
    background:linear-gradient(110deg,#fff4a7,#fff 54%,#dcfbfc);
    box-shadow:4px 5px 0 var(--theme-border)
}
html[data-theme="pop"] .ndc-hero h1{color:var(--theme-text)}
html[data-theme="pop"] .ndc-hero p,
html[data-theme="pop"] .ndc-muted,
html[data-theme="pop"] .ndc-metric-label{color:var(--theme-muted)}
html[data-theme="pop"] .ndc-tabs a{border:2px solid var(--theme-border);border-radius:999px;background:#fff;color:var(--theme-text);box-shadow:2px 3px 0 var(--theme-border)}
html[data-theme="pop"] .ndc-tabs a.active{background:var(--theme-yellow);color:var(--theme-text)}
html[data-theme="pop"] .ndc-link-code-panel,
html[data-theme="pop"] .ndc-code,
html[data-theme="pop"] .ndc-platform-option,
html[data-theme="pop"] .ndc-ocr-report-card,
html[data-theme="pop"] .ndc-ocr-correction-form,
html[data-theme="pop"] .ndc-song-suggestions{
    border:2px solid var(--theme-border);border-radius:16px;background:#fffdf5;color:var(--theme-text)
}
html[data-theme="pop"] .ndc-link-code{border:2px solid var(--theme-border);background:#fff;color:var(--theme-accent)}
html[data-theme="pop"] .ndc-platform-option strong,
html[data-theme="pop"] .ndc-platform-option small,
html[data-theme="pop"] .ndc-ocr-report-heading strong,
html[data-theme="pop"] .ndc-ocr-report-meta dd,
html[data-theme="pop"] .ndc-song-suggestion{color:var(--theme-text)}
html[data-theme="pop"] .aes-summary-metrics article,
html[data-theme="pop"] .aes-game-data-card{border:2px solid var(--theme-border);border-radius:24px 13px;background:#fff;box-shadow:4px 5px 0 var(--theme-border)}
html[data-theme="pop"] .aes-summary-metrics article>i,
html[data-theme="pop"] .aes-game-data-icon{border:2px solid var(--theme-border);box-shadow:2px 3px 0 var(--theme-border)}
html[data-theme="pop"] .aes-game-data-row{border-top:2px dashed #dbe2f0}

html[data-theme="pop"] .aes-portal-hero{
    position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) 270px minmax(270px,.8fr);
    gap:22px;min-height:390px;overflow:hidden;padding:38px 34px;
    border:3px solid var(--theme-border);border-radius:38px 18px;
    background:
        radial-gradient(circle at 76% 16%,#fff 0 8px,transparent 9px),
        radial-gradient(circle at 88% 72%,#fff8 0 13px,transparent 14px),
        linear-gradient(125deg,#fff1a9 0 35%,#ff83aa 35% 68%,#43dce0 68%);
    box-shadow:6px 7px 0 var(--theme-shadow)
}
html[data-theme="pop"] .aes-portal-hero:before{
    content:"";position:absolute;width:170px;height:170px;left:-70px;bottom:-90px;border:22px solid #fff8;border-radius:50%
}
html[data-theme="pop"] .aes-portal-copy{position:relative;z-index:2}
html[data-theme="pop"] .aes-portal-eyebrow{
    display:inline-flex;margin-bottom:16px;padding:7px 13px;border:2px solid var(--theme-border);
    border-radius:999px;background:#fff;color:var(--theme-accent);font-size:10px;font-weight:1000;
    box-shadow:2px 3px 0 var(--theme-border)
}
html[data-theme="pop"] .aes-portal-copy h1{
    color:var(--theme-text);font-size:clamp(34px,4.5vw,62px);line-height:1.05;letter-spacing:-.05em;text-shadow:3px 3px 0 #fff
}
html[data-theme="pop"] .aes-portal-copy p{color:#334166;font-weight:700}
html[data-theme="pop"] .aes-portal-actions{position:relative;z-index:4}
html[data-theme="pop"] .aes-portal-links{position:relative;z-index:4}
html[data-theme="pop"] .aes-portal-card{
    border:2px solid var(--theme-border);border-radius:18px;background:#fff;color:var(--theme-text);
    box-shadow:3px 4px 0 var(--theme-border)
}
html[data-theme="pop"] .aes-portal-card:hover{border-color:var(--theme-border);box-shadow:5px 6px 0 var(--theme-border);transform:translateY(-2px)}
html[data-theme="pop"] .aes-portal-card>i:first-child{display:grid;width:38px;height:38px;place-items:center;border:2px solid var(--theme-border);border-radius:50%;background:var(--theme-yellow);color:var(--theme-text)}
html[data-theme="pop"] .aes-pop-character{position:relative;z-index:2;display:block;align-self:stretch;overflow:hidden;min-height:315px}
html[data-theme="pop"] .aes-pop-character img{
    position:absolute;top:0;bottom:0;left:50%;width:auto;height:100%;max-width:none;max-height:100%;
    object-fit:contain;object-position:center bottom;transform:translateX(-50%);filter:drop-shadow(6px 8px 0 #15204735)
}
html[data-theme="pop"] .aes-pop-speech{
    position:absolute;left:4px;bottom:30px;z-index:3;width:max-content;max-width:145px;padding:9px 12px;
    border:2px solid var(--theme-border);border-radius:18px 18px 4px;background:#fff;color:var(--theme-pink);
    font-size:11px;font-weight:900;line-height:1.4;text-align:center;box-shadow:2px 3px 0 var(--theme-border);transform:rotate(-3deg)
}

html[data-theme="pop"] .home-live-section,
html[data-theme="pop"] .live-archive-header{
    border:3px solid var(--theme-border);border-radius:28px 14px;background:linear-gradient(135deg,#8259e8,#2674ed 60%,#35d7dc);box-shadow:5px 6px 0 var(--theme-border)
}

.theme-settings{margin:0 0 28px;padding:20px;border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface-soft)}
.theme-settings h3{margin:0 0 8px}.theme-settings p{margin:0 0 14px;color:var(--theme-muted)}
.theme-settings-row{display:flex;align-items:end;gap:14px;flex-wrap:wrap}
.theme-settings-row label{display:flex;flex:1 1 260px;flex-direction:column;gap:7px;font-weight:700}
.theme-settings-row select{min-height:44px}.theme-preview{display:flex;gap:6px;margin-top:14px}
.theme-preview span{width:32px;height:18px;border:1px solid var(--theme-border);border-radius:999px}
.theme-preview span:nth-child(1){background:var(--theme-bg)}.theme-preview span:nth-child(2){background:var(--theme-surface)}.theme-preview span:nth-child(3){background:var(--theme-accent)}

@media(max-width:1150px){
    html[data-theme="pop"] .aes-portal-hero{grid-template-columns:minmax(0,1fr) 250px}
    html[data-theme="pop"] .aes-portal-links{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
    html[data-theme="pop"] .sidebar{top:68px;height:calc(100vh - 68px)}
    html[data-theme="pop"] .content{padding:22px 15px}
    html[data-theme="pop"] .aes-portal-hero{grid-template-columns:minmax(0,1fr) 235px;padding:28px 24px}
    html[data-theme="pop"] .aes-pop-character img{width:auto;height:100%}
}
@media(max-width:680px){
    html[data-theme="pop"] .site-header{padding:0 12px}
    html[data-theme="pop"] .logo{font-size:20px}
    html[data-theme="pop"] .header-right{gap:10px}
    html[data-theme="pop"] .locale-form select{min-width:96px;max-width:104px}
    html[data-theme="pop"] .aes-portal-hero{display:flex;min-height:auto;flex-direction:column;padding:25px 20px 0;border-radius:29px 13px}
    html[data-theme="pop"] .aes-portal-copy h1{font-size:40px}
    html[data-theme="pop"] .aes-pop-character{order:2;width:100%;min-height:290px}
    html[data-theme="pop"] .aes-pop-character img{top:0;right:-20px;bottom:auto;left:auto;width:330px;height:auto;max-height:none;transform:none}
    html[data-theme="pop"] .aes-pop-speech{top:20px;bottom:auto;left:4px;max-width:130px}
    html[data-theme="pop"] .aes-portal-links{order:3;display:flex;width:100%;padding-bottom:24px}
    html[data-theme="pop"] .aes-portal-card{grid-template-columns:35px 1fr auto;padding:13px}
    html[data-theme="pop"] .event-card{padding:20px}
}
@media(max-width:460px){
    html[data-theme="pop"] .header-left{gap:8px}
    html[data-theme="pop"] .site-header .logo{font-size:0}
    html[data-theme="pop"] .site-header .logo:after{content:"AES";font-size:20px}
    html[data-theme="pop"] .header-right>.fa-user{display:none}
    html[data-theme="pop"] .header-notification{width:36px;height:36px}
}

@media(prefers-reduced-motion:no-preference){
    html[data-theme="pop"] .aes-pop-character img{animation:aes-pop-float 3s ease-in-out infinite}
    @keyframes aes-pop-float{0%,100%{margin-top:0}50%{margin-top:-7px}}
}

/* ==========================================================
   Neon theme — original dark cyber design
========================================================== */
html[data-theme="neon"]{
    --theme-bg:#030711;
    --theme-surface:#091321;
    --theme-surface-soft:#07101d;
    --theme-text:#eaf7ff;
    --theme-muted:#8ea7bd;
    --theme-border:#28516b;
    --theme-accent:#20dcff;
    --theme-accent-soft:#0b2438;
    --theme-pink:#ff2dab;
    --theme-yellow:#b7ff2a;
    --theme-cyan:#00f0ff;
    --theme-violet:#925cff;
    --theme-green:#27ffc1;
    --theme-shadow:#000a;
    color-scheme:dark;
}

.aes-character-image-neon,.aes-character-speech-neon{display:none}

html[data-theme="neon"] body{
    background:
        radial-gradient(circle at 72% 0,#172c58 0,transparent 38%),
        linear-gradient(#00e5ff0b 1px,transparent 1px),
        linear-gradient(90deg,#00e5ff0b 1px,transparent 1px),
        linear-gradient(145deg,#030711,#071221 55%,#050914);
    background-size:auto,40px 40px,40px 40px,auto;
    color:var(--theme-text);
    font-family:"Bahnschrift","Yu Gothic UI","Segoe UI",sans-serif;
}
html[data-theme="neon"] .site-header{
    height:68px;border-bottom:1px solid #20dfff66;background:#07101eee;
    box-shadow:0 12px 35px #0009;backdrop-filter:blur(16px)
}
html[data-theme="neon"] .layout{margin-top:68px;min-height:calc(100vh - 68px)}
html[data-theme="neon"] .logo{color:#75f5ff;font-weight:900;letter-spacing:.02em;text-shadow:0 0 16px #00dcff66}
html[data-theme="neon"] .menu-toggle{color:#8af7ff}
html[data-theme="neon"] .header-notification{
    width:40px;height:40px;border:1px solid #2de7ff;border-radius:4px;
    background:#071c2d;color:#6ff6ff;box-shadow:0 0 14px #00ddff44
}
html[data-theme="neon"] .header-notification span{border-color:#07101e;background:#ff2dab}
html[data-theme="neon"] .locale-form select{
    border:1px solid #2de7ff!important;border-radius:3px!important;background:#071522!important;
    color:#dffaff!important;box-shadow:0 0 12px #00d9ff2e
}
html[data-theme="neon"] .sidebar{
    top:68px;height:calc(100vh - 68px);border-right:1px solid #15dfff66;
    background:linear-gradient(180deg,#07101e 0,#0b1730 54%,#080a17);box-shadow:12px 0 40px #0008
}
html[data-theme="neon"] .sidebar a,
html[data-theme="neon"] .sidebar-group-toggle,
html[data-theme="neon"] .sidebar-notification-link,
html[data-theme="neon"] .logout-button{border:1px solid transparent;border-radius:3px;color:#a7bed2;text-shadow:none}
html[data-theme="neon"] .sidebar a:hover,
html[data-theme="neon"] .sidebar-notification-link:hover,
html[data-theme="neon"] .sidebar-notification-link:focus-visible,
html[data-theme="neon"] .sidebar a.is-active,
html[data-theme="neon"] .sidebar-group-toggle:hover,
html[data-theme="neon"] .sidebar-group-toggle:focus-visible,
html[data-theme="neon"] .sidebar-group-toggle.is-active,
html[data-theme="neon"] .sidebar-group.is-open>.sidebar-group-toggle,
html[data-theme="neon"] .logout-button:hover{
    border-color:#00e5ff;background:linear-gradient(90deg,#00e5ff25,#ff2dab1c);color:#fff;
    box-shadow:inset 3px 0 #00e5ff,0 0 18px #00d9ff33;transform:translateX(2px)
}
html[data-theme="neon"] .sidebar-group-items a{border-left:1px solid #00dcff55;border-radius:0 3px 3px 0}
html[data-theme="neon"] .sidebar hr{border-color:#16d9ff44}
html[data-theme="neon"] .content{width:100%;max-width:1600px;margin:0 auto;padding:34px}
html[data-theme="neon"] h1,html[data-theme="neon"] h2,html[data-theme="neon"] h3,html[data-theme="neon"] h4,
html[data-theme="neon"] .home-title{color:var(--theme-text)}
html[data-theme="neon"] p,html[data-theme="neon"] .home-subtitle{color:var(--theme-muted)}
html[data-theme="neon"] a{color:var(--theme-accent)}

html[data-theme="neon"] .card,
html[data-theme="neon"] .event-card,
html[data-theme="neon"] .participant-card,
html[data-theme="neon"] .participant-event-card,
html[data-theme="neon"] .notice-list,
html[data-theme="neon"] .news-article,
html[data-theme="neon"] .live-archive-card,
html[data-theme="neon"] .ndc-card,
html[data-theme="neon"] .modal-content,
html[data-theme="neon"] .profile-section,
html[data-theme="neon"] .admin-section,
html[data-theme="neon"] .dashboard-card{
    border:1px solid var(--theme-border)!important;border-radius:3px!important;
    background:linear-gradient(145deg,#0a1525,#08101d)!important;color:var(--theme-text)!important;
    box-shadow:0 0 0 1px #18dfff22,0 18px 40px #0009!important
}
html[data-theme="neon"] .card-header,
html[data-theme="neon"] .modal-header,
html[data-theme="neon"] .modal-footer{border-color:#214158;background:#0b1727;color:var(--theme-text)}
html[data-theme="neon"] .btn,
html[data-theme="neon"] button:not(.menu-toggle):not(.sidebar-group-toggle):not(.sidebar-notification-link):not(.logout-button):not(.header-notification):not(.header-notification-close),
html[data-theme="neon"] .ndc-button{
    border:1px solid #42ebff;border-radius:3px;font-weight:800;box-shadow:0 0 14px #00dfff32
}
html[data-theme="neon"] .btn-primary,
html[data-theme="neon"] .ndc-button:not(.secondary):not(.danger){background:linear-gradient(90deg,#087ba1,#633eaf)!important;color:#fff!important}
html[data-theme="neon"] .btn-outline-primary,
html[data-theme="neon"] .btn-secondary,
html[data-theme="neon"] .ndc-button.secondary{background:#09243a!important;color:#84f7ff!important}
html[data-theme="neon"] .btn-danger,
html[data-theme="neon"] .ndc-button.danger{border-color:#ff2dab;background:#48132f!important;color:#ffb1e3!important}
html[data-theme="neon"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="neon"] select,
html[data-theme="neon"] textarea{
    border:1px solid #2c5971!important;border-radius:3px!important;background:#050d18!important;color:#eaf7ff!important
}
html[data-theme="neon"] input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="neon"] select:focus,
html[data-theme="neon"] textarea:focus{border-color:#28e7ff!important;box-shadow:0 0 0 3px #00dfff25!important}
html[data-theme="neon"] .form-check-input{
    border:1px solid #4c7188!important;
    background-color:#050d18;
}
html[data-theme="neon"] .form-check-input:checked{
    border-color:#42ebff!important;
    background-color:#18cfe8!important;
}
html[data-theme="neon"] .form-check-input:focus{
    border-color:#28e7ff!important;
    box-shadow:0 0 0 3px #00dfff25!important;
}
html[data-theme="neon"] table{color:var(--theme-text)}
html[data-theme="neon"] th{background:#0c2033!important;color:#8df7ff!important}
html[data-theme="neon"] th,html[data-theme="neon"] td{border-color:#214158!important;background-color:transparent;color:inherit}
html[data-theme="neon"] .table-responsive{border:1px solid #214158;border-radius:3px}
html[data-theme="neon"] .alert{border-radius:3px;background:#0c2033;color:#bdefff;border-color:#28516b}
html[data-theme="neon"] .event-status,
html[data-theme="neon"] .event-type-badge,
html[data-theme="neon"] .badge,
html[data-theme="neon"] .notice-badge{border:1px solid #2bdff4;border-radius:3px;background:#0a2334;color:#8cf7ff}
html[data-theme="neon"] .empty-card{border:1px dashed #29506a;background:#07111d;color:#7795aa}

/* NDC pages */
html[data-theme="neon"] .ndc-content{color:var(--theme-text)}
html[data-theme="neon"] .ndc-hero{
    padding:24px 26px;border:1px solid #2de7ff;border-radius:3px;
    background:linear-gradient(110deg,#091425,#10254a 58%,#23102f);
    box-shadow:0 0 0 1px #18dfff22,0 18px 40px #0009
}
html[data-theme="neon"] .ndc-hero h1,
html[data-theme="neon"] .ndc-card h2,
html[data-theme="neon"] .ndc-metric-value{color:var(--theme-text)}
html[data-theme="neon"] .ndc-hero p,
html[data-theme="neon"] .ndc-muted,
html[data-theme="neon"] .ndc-metric-label{color:#a7bed2}
html[data-theme="neon"] .ndc-tabs a{border:1px solid #2de7ff;border-radius:3px;background:#09243a;color:#84f7ff}
html[data-theme="neon"] .ndc-tabs a.active{background:linear-gradient(90deg,#087ba1,#633eaf);color:#fff}
html[data-theme="neon"] .ndc-link-code-panel,
html[data-theme="neon"] .ndc-code,
html[data-theme="neon"] .ndc-platform-option,
html[data-theme="neon"] .ndc-ocr-report-card,
html[data-theme="neon"] .ndc-ocr-correction-form,
html[data-theme="neon"] .ndc-song-suggestions{
    border-color:#28516b;background:#071523;color:var(--theme-text)
}
html[data-theme="neon"] .ndc-link-code-label,
html[data-theme="neon"] .ndc-platform-option strong,
html[data-theme="neon"] .ndc-ocr-report-heading strong,
html[data-theme="neon"] .ndc-ocr-report-meta dd,
html[data-theme="neon"] .ndc-song-suggestion{color:#eaf7ff}
html[data-theme="neon"] .ndc-platform-option small,
html[data-theme="neon"] .ndc-ocr-report-meta dt,
html[data-theme="neon"] .ndc-song-suggestion small{color:#a7bed2}
html[data-theme="neon"] .ndc-link-code{border-color:#2c5971;background:#050d18;color:#75f5ff}
html[data-theme="neon"] .ndc-platform-check{border-color:#4c7188;background:#07101d}
html[data-theme="neon"] .ndc-song-suggestion:hover,
html[data-theme="neon"] .ndc-song-suggestion.is-active{background:#0b2941;color:#7df7ff}

/* Event details: keep every surface and its text in the neon colour system. */
html[data-theme="neon"] .event-detail-back{color:#7df7ff}
html[data-theme="neon"] .event-detail-hero,
html[data-theme="neon"] .event-detail-card{
    border:1px solid #28516b;background:linear-gradient(145deg,#0a1525,#08101d);
    color:#eaf7ff;box-shadow:0 0 0 1px #18dfff22,0 18px 40px #0009
}
html[data-theme="neon"] .event-detail-label{color:#63efff}
html[data-theme="neon"] .event-detail-subtitle{color:#bed3e3}
html[data-theme="neon"] .event-detail-summary,
html[data-theme="neon"] .entry-card dl{border-color:#214158}
html[data-theme="neon"] .event-detail-summary div,
html[data-theme="neon"] .entry-card dl div{border-color:#214158}
html[data-theme="neon"] .event-detail-summary dt,
html[data-theme="neon"] .entry-card dt{color:#b9cddd}
html[data-theme="neon"] .event-detail-summary dd,
html[data-theme="neon"] .entry-card dd,
html[data-theme="neon"] .event-description{color:#f2f9ff}
html[data-theme="neon"] .event-qualifier-card{
    border-color:#31e8ff;background:linear-gradient(135deg,#0a1b30,#15163a);
    color:#eaf7ff;box-shadow:0 0 0 1px #18dfff33,0 18px 40px #0009
}
html[data-theme="neon"] .event-qualifier-card h2{color:#f4fbff}
html[data-theme="neon"] .event-qualifier-card>p:not(.event-detail-label){color:#c4d8e7}
html[data-theme="neon"] .event-qualifier-link{
    border:1px solid #54efff;background:linear-gradient(90deg,#087ba1,#573ca4);
    color:#fff!important;box-shadow:0 0 16px #00dfff2e
}
html[data-theme="neon"] .event-qualifier-link strong,
html[data-theme="neon"] .event-qualifier-link small,
html[data-theme="neon"] .event-qualifier-link b{color:#fff}
html[data-theme="neon"] .detail-plan{border:1px solid #214158;background:#071523;color:#eef9ff}
html[data-theme="neon"] .detail-plan span{color:#74f3ff}
html[data-theme="neon"] .detail-primary{border:1px solid #42ebff;background:linear-gradient(90deg,#087ba1,#633eaf);color:#fff!important}
html[data-theme="neon"] .detail-danger{border:1px solid #ff5bbd;background:#351126;color:#ffc5e7}
html[data-theme="neon"] .cancel-notice{color:#ffd47d}
html[data-theme="neon"] .event-result-banner{border-color:#8d6c24;background:linear-gradient(135deg,#211a0b,#121827);color:#fff3be}
html[data-theme="neon"] .event-result-banner span{color:#e7d89e}
html[data-theme="neon"] .event-result-banner a{background:#8b6212;color:#fff!important}

html[data-theme="neon"] .aes-summary-metrics article,
html[data-theme="neon"] .aes-game-data-card{
    border:1px solid #254b68;border-radius:3px;background:linear-gradient(145deg,#0a1525,#08101d);
    box-shadow:0 0 0 1px #18dfff22,0 18px 40px #0009
}
html[data-theme="neon"] .aes-summary-metrics article>i,
html[data-theme="neon"] .aes-game-data-icon{
    border:1px solid #44edff;border-radius:4px;background:linear-gradient(135deg,#112a45,#30153c);
    color:#6ff6ff;box-shadow:0 0 15px #00e5ff44
}
html[data-theme="neon"] .aes-summary-metrics span,
html[data-theme="neon"] .aes-game-data-title small,
html[data-theme="neon"] .aes-game-data-row dt{color:var(--theme-muted)}
html[data-theme="neon"] .aes-summary-metrics strong,
html[data-theme="neon"] .aes-game-data-row dd{color:var(--theme-text)}
html[data-theme="neon"] .aes-summary-metrics small{color:#ff5bc5}
html[data-theme="neon"] .aes-game-data-card header>div>span{color:#34eaff}
html[data-theme="neon"] .aes-game-data-card header>a{border:1px solid #00dfff55;border-radius:3px;background:#00d9ff12;color:#68f1ff}
html[data-theme="neon"] .aes-game-data-row{border-color:#1c3c54}

html[data-theme="neon"] .aes-portal-hero{
    position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) 270px minmax(270px,.8fr);
    gap:22px;min-height:390px;overflow:hidden;padding:38px 34px;border:1px solid #47eaff99;border-radius:3px;
    background:radial-gradient(circle at 78% 42%,#00d9ff25,transparent 30%),linear-gradient(115deg,#07101f 0 48%,#0b2240 48% 70%,#230d32 70%);
    box-shadow:inset 0 0 70px #00c8ff10,0 0 0 1px #00d9ff22,0 24px 65px #000a;
    clip-path:polygon(0 0,96% 0,100% 11%,100% 100%,4% 100%,0 89%)
}
html[data-theme="neon"] .aes-portal-hero:before{
    content:"";position:absolute;width:380px;height:380px;right:-170px;bottom:-220px;border:1px solid #00eaff55;
    border-radius:50%;box-shadow:0 0 0 30px #00eaff0b,0 0 0 70px #ff2dab09
}
html[data-theme="neon"] .aes-portal-copy{position:relative;z-index:2}
html[data-theme="neon"] .aes-portal-eyebrow{
    display:inline-flex;margin-bottom:16px;padding:7px 13px;border:1px solid #17e8ff;border-radius:2px;
    background:#06121e;color:#66f5ff;font-size:10px;font-weight:1000;letter-spacing:.14em;box-shadow:0 0 15px #00dfff44
}
html[data-theme="neon"] .aes-portal-copy h1{color:#eaf7ff;font-size:clamp(34px,4.5vw,62px);line-height:1.05;text-shadow:0 0 24px #00d9ff33}
html[data-theme="neon"] .aes-portal-copy p{color:#a7bfd2;font-weight:700}
html[data-theme="neon"] .aes-portal-actions,html[data-theme="neon"] .aes-portal-links{position:relative;z-index:4}
html[data-theme="neon"] .aes-portal-card{
    border:1px solid #1cdcf2;border-radius:3px;background:#071728;color:#dffbff;box-shadow:0 0 15px #00dfff22
}
html[data-theme="neon"] .aes-portal-card:hover{border-color:#6ff5ff;box-shadow:0 0 22px #00dfff55;transform:translateY(-2px)}
html[data-theme="neon"] .aes-portal-card>i:first-child{display:grid;width:38px;height:38px;place-items:center;border:1px solid #44edff;border-radius:4px;background:#09243a;color:#6ff6ff}
html[data-theme="neon"] .aes-pop-character{position:relative;z-index:2;display:block;align-self:stretch;overflow:hidden;min-height:315px}
html[data-theme="neon"] .aes-character-image-pop,html[data-theme="neon"] .aes-character-speech-pop{display:none}
html[data-theme="neon"] .aes-character-image-neon{
    display:block;position:absolute;top:0;bottom:0;left:50%;width:auto;height:100%;max-width:none;max-height:100%;
    object-fit:contain;object-position:center bottom;transform:translateX(-50%);filter:drop-shadow(0 0 16px #00e5ff55)
}
html[data-theme="neon"] .aes-character-speech-neon{
    position:absolute;left:4px;bottom:30px;z-index:3;display:block;width:max-content;max-width:145px;padding:9px 12px;
    border:1px solid #40efff;border-radius:2px;background:#06101ee8;color:#7df7ff;font:900 11px/1.4 monospace;
    text-align:center;box-shadow:0 0 18px #00d9ff55
}
html[data-theme="neon"] .home-live-section,
html[data-theme="neon"] .live-archive-header{border:1px solid #2de7ff;border-radius:3px;background:linear-gradient(135deg,#102b4a,#40153f);box-shadow:0 0 24px #00dfff33}
html[data-theme="neon"] .theme-settings{border-color:#28516b;border-radius:3px;background:#07101d}

/* Page-specific surfaces that do not use the shared card class. */
html[data-theme="neon"] .login-card{
    border:1px solid #2de7ff;border-radius:3px;background:linear-gradient(145deg,#0a1525,#08101d);
    color:var(--theme-text);box-shadow:0 0 0 1px #18dfff22,0 22px 55px #000b
}
html[data-theme="neon"] .login-card .logo p,
html[data-theme="neon"] .login-footer{color:var(--theme-muted)}
html[data-theme="neon"] .verify-note{border:1px solid #28516b;border-radius:3px;background:#071523;color:#b7cfdf}
html[data-theme="neon"] .alert-error{border-color:#ff2dab;background:#361226;color:#ffacd9}

html[data-theme="neon"] .bdc-panel,
html[data-theme="neon"] .bdc-control-bar,
html[data-theme="neon"] .bdc-stat,
html[data-theme="neon"] .bdc-rival-card,
html[data-theme="neon"] .bdc-rival-result{
    border-color:#28516b;background:linear-gradient(145deg,#0a1525,#08101d);color:var(--theme-text);
    box-shadow:0 0 0 1px #18dfff1c,0 12px 28px #0008
}
html[data-theme="neon"] .bdc-panel-heading h2,
html[data-theme="neon"] .bdc-stat strong,
html[data-theme="neon"] .bdc-rival-subsection h3,
html[data-theme="neon"] .bdc-rival-result strong{color:var(--theme-text)}
html[data-theme="neon"] .bdc-panel-heading span,
html[data-theme="neon"] .bdc-breadcrumb a{color:#53edff}
html[data-theme="neon"] .bdc-muted,
html[data-theme="neon"] .bdc-stat span,
html[data-theme="neon"] .bdc-stat small,
html[data-theme="neon"] .bdc-profile-form label,
html[data-theme="neon"] .bdc-score-filter label,
html[data-theme="neon"] .bdc-control-bar label,
html[data-theme="neon"] .bdc-rival-card small{color:var(--theme-muted)}
html[data-theme="neon"] .bdc-style-tabs a,
html[data-theme="neon"] .bdc-pagination a{border:1px solid #28516b;border-radius:3px;background:#0a2135;color:#78f4ff}
html[data-theme="neon"] .bdc-style-tabs a.is-active,
html[data-theme="neon"] .bdc-pagination a.is-active{border-color:#22e5ff;background:linear-gradient(90deg,#087ba1,#633eaf);color:#fff}
html[data-theme="neon"] .bdc-account-chip,
html[data-theme="neon"] .bdc-request-count{border:1px solid #2bdff4;border-radius:3px;background:#0a2334;color:#8cf7ff!important}
html[data-theme="neon"] .bdc-premium-notice{border-color:#7f6320;border-radius:3px;background:#211b0c;color:#e8ce79}

html[data-theme="neon"] .dashboard-event-row,
html[data-theme="neon"] .dashboard-filters,
html[data-theme="neon"] .news-admin-filters,
html[data-theme="neon"] .admin-table-wrap{
    border-color:#28516b!important;background:#08121f!important;color:var(--theme-text)!important
}
html[data-theme="neon"] .dashboard-event-row.has-attention{background:#21190b!important}

@media(max-width:1150px){
    html[data-theme="neon"] .aes-portal-hero{grid-template-columns:minmax(0,1fr) 250px}
    html[data-theme="neon"] .aes-portal-links{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
    html[data-theme="neon"] .sidebar{top:68px;height:calc(100vh - 68px)}
    html[data-theme="neon"] .content{padding:22px 15px}
    html[data-theme="neon"] .aes-portal-hero{grid-template-columns:minmax(0,1fr) 235px;padding:28px 24px}
    html[data-theme="neon"] .aes-character-image-neon{width:auto;height:100%}
}
@media(max-width:680px){
    html[data-theme="neon"] .site-header{padding:0 12px}
    html[data-theme="neon"] .logo{font-size:20px}
    html[data-theme="neon"] .header-right{gap:10px}
    html[data-theme="neon"] .locale-form select{min-width:96px;max-width:104px}
    html[data-theme="neon"] .aes-portal-hero{display:flex;min-height:auto;flex-direction:column;padding:25px 20px 0}
    html[data-theme="neon"] .aes-portal-copy h1{font-size:40px}
    html[data-theme="neon"] .aes-pop-character{order:2;width:100%;min-height:290px}
    html[data-theme="neon"] .aes-character-image-neon{top:0;right:-20px;bottom:auto;left:auto;width:330px;height:auto;max-height:none;transform:none}
    html[data-theme="neon"] .aes-character-speech-neon{top:20px;bottom:auto;left:4px;max-width:130px}
    html[data-theme="neon"] .aes-portal-links{order:3;display:flex;width:100%;padding-bottom:24px}
    html[data-theme="neon"] .aes-portal-card{grid-template-columns:35px 1fr auto;padding:13px}
}
@media(max-width:460px){
    html[data-theme="neon"] .site-header .logo{font-size:0}
    html[data-theme="neon"] .site-header .logo:after{content:"AES";font-size:20px}
    html[data-theme="neon"] .header-right>.fa-user{display:none}
    html[data-theme="neon"] .header-notification{width:36px;height:36px}
}
@media(prefers-reduced-motion:no-preference){
    html[data-theme="neon"] .aes-character-image-neon{animation:aes-neon-float 3s ease-in-out infinite}
    @keyframes aes-neon-float{0%,100%{margin-top:0}50%{margin-top:-7px}}
}

/* Pop profile layout: use the sections as cards without nesting card frames. */
html[data-theme="pop"] .participant-page{max-width:980px}
html[data-theme="pop"] .participant-card{
    padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important
}
html[data-theme="pop"] .participant-page-head{
    margin:0 0 22px;padding:20px 24px;border:2px solid var(--theme-border);border-radius:24px 13px;
    background:linear-gradient(110deg,#fff4a7,#fff 54%,#dcfbfc);box-shadow:4px 5px 0 var(--theme-shadow)
}
html[data-theme="pop"] .participant-card .participant-page-head>span,
html[data-theme="pop"] .profile-section-eyebrow{color:var(--theme-pink)}
html[data-theme="pop"] .participant-card .participant-page-head>h2{margin:3px 0 7px!important;color:var(--theme-text);font-size:28px;text-align:left}
html[data-theme="pop"] .participant-page-head>p{color:var(--theme-muted)}
html[data-theme="pop"] .participant-card>.profile-section{
    margin:0 0 22px;padding:24px!important;border:2px solid var(--theme-border)!important;
    border-radius:24px 13px!important;background:#fff!important;box-shadow:4px 5px 0 var(--theme-shadow)!important
}
html[data-theme="pop"] .participant-card>.profile-section:nth-of-type(even){border-radius:13px 24px!important}
html[data-theme="pop"] .participant-card>.profile-section h3{margin:0 0 20px;padding-bottom:13px;border-bottom:2px dashed #dbe2f0;color:var(--theme-text)}
html[data-theme="pop"] .profile-summary-item{padding:2px}
html[data-theme="pop"] .owned-badge-card{border-color:#cdd9e8;border-radius:14px;background:#fffdf5}
html[data-theme="pop"] .owned-badge-option input:checked+.owned-badge-card{border-color:var(--theme-accent);background:#eef7ff}
html[data-theme="pop"] .account-summary-value{color:var(--theme-text)}
html[data-theme="pop"] .account-summary-grid{display:block;margin:0 0 20px}
html[data-theme="pop"] .account-summary-grid>.profile-summary-item{
    display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 2px;border-bottom:2px dashed #dbe2f0
}
html[data-theme="pop"] .account-summary-grid .profile-summary-label{margin:0;color:var(--theme-muted);font-size:14px}
html[data-theme="pop"] .account-summary-grid .account-summary-value{margin:0;text-align:right}
html[data-theme="pop"] .account-summary-grid .status{flex:none;padding:6px 14px}
html[data-theme="pop"] .theme-settings{
    margin:0 0 22px;padding:24px;border:2px solid var(--theme-border);border-radius:24px 13px;background:#fff;
    box-shadow:4px 5px 0 var(--theme-shadow)
}
html[data-theme="pop"] .theme-settings h3{margin:0 0 14px;padding-bottom:13px;border-bottom:2px dashed #dbe2f0;color:var(--theme-text)}
@media(max-width:680px){
    html[data-theme="pop"] .participant-page-head{margin-bottom:16px;padding:18px}
    html[data-theme="pop"] .participant-card .participant-page-head>h2{font-size:24px}
    html[data-theme="pop"] .participant-card>.profile-section{margin-bottom:17px;padding:19px 17px!important}
    html[data-theme="pop"] .participant-card>.profile-section h3{font-size:18px;line-height:1.45}
    html[data-theme="pop"] .profile-summary-grid{gap:20px}
    html[data-theme="pop"] .profile-value-row{align-items:flex-start;flex-direction:column}
    html[data-theme="pop"] .account-summary-grid>.profile-summary-item{min-height:58px;padding:12px 0}
    html[data-theme="pop"] .account-summary-grid .profile-summary-label{font-size:13px}
    html[data-theme="pop"] .account-summary-grid .account-summary-value{max-width:64%;font-size:14px}
    html[data-theme="pop"] .theme-settings{margin-bottom:17px;padding:19px 17px}
}

/* Keep the production profile structure consistent in Neon as well. */
html[data-theme="neon"] .participant-page{max-width:980px}
html[data-theme="neon"] .participant-card{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
html[data-theme="neon"] .participant-page-head,
html[data-theme="neon"] .participant-card>.profile-section,
html[data-theme="neon"] .theme-settings{
    margin:0 0 22px;padding:24px!important;border:1px solid #28516b!important;border-radius:3px!important;
    background:linear-gradient(145deg,#0a1525,#08101d)!important;box-shadow:0 0 0 1px #18dfff22,0 18px 40px #0009!important
}
html[data-theme="neon"] .participant-page-head{background:linear-gradient(110deg,#091425,#10254a 58%,#23102f)!important}
html[data-theme="neon"] .participant-card .participant-page-head>span,
html[data-theme="neon"] .profile-section-eyebrow{color:#34eaff}
html[data-theme="neon"] .participant-card .participant-page-head>h2{margin:3px 0 7px!important;color:var(--theme-text);text-align:left}
html[data-theme="neon"] .participant-page-head>p{color:var(--theme-muted)}
html[data-theme="neon"] .participant-card>.profile-section h3,
html[data-theme="neon"] .theme-settings h3{margin:0 0 20px;padding-bottom:13px;border-bottom:1px solid #214158;color:var(--theme-text)}
html[data-theme="neon"] .account-summary-grid{display:block;margin:0 0 20px}
html[data-theme="neon"] .account-summary-grid>.profile-summary-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 2px;border-bottom:1px solid #214158}
html[data-theme="neon"] .account-summary-grid .profile-summary-label{margin:0;color:var(--theme-muted)}
html[data-theme="neon"] .account-summary-grid .account-summary-value{margin:0;color:var(--theme-text);text-align:right}
html[data-theme="neon"] .owned-badge-card{border-color:#28516b;border-radius:3px;background:#07131f;color:var(--theme-text)}
html[data-theme="neon"] .participant-page .text-muted,
html[data-theme="neon"] .participant-page .owned-badge-description,
html[data-theme="neon"] .participant-page .profile-event-role,
html[data-theme="neon"] .participant-page .participant-event-group-heading,
html[data-theme="neon"] .participant-page .participant-event-info-label,
html[data-theme="neon"] .participant-page .participant-event-empty{color:#a7bbcc!important}
html[data-theme="neon"] .participant-page .nostalgia-grade-grid label,
html[data-theme="neon"] .participant-page .profile-summary-label{color:#c4d7e5}
html[data-theme="neon"] .participant-page .participant-event-title,
html[data-theme="neon"] .participant-page .participant-event-info-value{color:#eaf7ff}
html[data-theme="neon"] .participant-page .participant-event-info-item,
html[data-theme="neon"] .participant-page .participant-event-empty{border-color:#28516b;background:#071523}
html[data-theme="neon"] .participant-page .participant-event-card[data-completed="1"]{background:#08121f!important}
@media(max-width:680px){
    html[data-theme="neon"] .participant-page-head,
    html[data-theme="neon"] .participant-card>.profile-section,
    html[data-theme="neon"] .theme-settings{margin-bottom:17px;padding:19px 17px!important}
    html[data-theme="neon"] .participant-card .participant-page-head>h2{font-size:24px}
    html[data-theme="neon"] .account-summary-grid>.profile-summary-item{min-height:58px;padding:12px 0}
    html[data-theme="neon"] .account-summary-grid .account-summary-value{max-width:64%;font-size:14px}
}

/* ==========================================================
   Neon readability audit
   Keep legacy page colours from leaking onto dark surfaces.
========================================================== */
html[data-theme="neon"]{
    --theme-muted:#b7cad9;
    --text:#eaf7ff;
    --subtext:#b7cad9;
    --border:#28516b;
    --background:#030711;
    --card:#091321;
    --primary:#39e7ff;
    --bs-body-color:#eaf7ff;
    --bs-secondary-color:#b7cad9;
    --bs-tertiary-color:#9eb5c7;
    --bs-emphasis-color:#fff;
    --bs-body-bg:#030711;
    --bs-border-color:#28516b;
}
html[data-theme="neon"] .content{color:var(--theme-text)}
html[data-theme="neon"] :is(label,legend,.form-label,.form-group label){color:#dcebf5}
html[data-theme="neon"] :is(.text-muted,.text-secondary,.form-text,.help-text,.stat-note,.page-description){color:#b7cad9!important}
html[data-theme="neon"] :is(input,select,textarea)::placeholder{color:#91aabd!important;opacity:1}
html[data-theme="neon"] :is(input,select,textarea):disabled{background:#111b28!important;color:#91aabd!important;opacity:1}
html[data-theme="neon"] :is(.bg-white,.bg-light){background:#091522!important;color:#eaf7ff!important}
html[data-theme="neon"] hr{border-color:#28516b;opacity:1}
html[data-theme="neon"] .card-body{color:#eaf7ff}
html[data-theme="neon"] .card-header :is(h1,h2,h3,h4,p){color:inherit}
html[data-theme="neon"] .card-header.bg-warning{border-color:#82651f!important;background:#35290b!important;color:#ffe69a!important}
html[data-theme="neon"] .card-header.bg-success{border-color:#24785e!important;background:#0b3529!important;color:#b8ffe3!important}
html[data-theme="neon"] .card-header.bg-danger{border-color:#8d3154!important;background:#3c1325!important;color:#ffc2d8!important}

/* Home, event cards, announcements and archive pages. */
html[data-theme="neon"] :is(.event-title,.event-info strong,.event-info div,.notice-text,.live-archive-body h2,.news-article-title,.news-article-body){color:#eaf7ff}
html[data-theme="neon"] :is(.event-number,.event-date,.notice-date,.live-archive-body time,.empty,.news-article-date){color:#b7cad9}
html[data-theme="neon"] .notice-item{border-color:#214158;background:#08131f;color:#eaf7ff}
html[data-theme="neon"] .notice-item.notice-pinned{border-left-color:#ff9b55;background:#25170d}
html[data-theme="neon"] .notice-item.notice-unread{background:#0a1d31}
html[data-theme="neon"] .notice-badge-important{border-color:#bb632c;background:#32180a;color:#ffbd8c}
html[data-theme="neon"] .notice-badge-unread{border-color:#398bce;background:#0b2740;color:#9bd5ff}
html[data-theme="neon"] .notice-badge-event{border-color:#8b55c5;background:#25143a;color:#d9b3ff}
html[data-theme="neon"] .news-article-body{border-color:#214158}
html[data-theme="neon"] .event-status.status-entry{border-color:#31846a;background:#0d3028;color:#9fffd9}
html[data-theme="neon"] .event-status.status-open{border-color:#318aa2;background:#092d3b;color:#9ceeff}
html[data-theme="neon"] .event-status.status-end{border-color:#67559a;background:#211a39;color:#cfbfff}
html[data-theme="neon"] .event-status.status-close{border-color:#82651f;background:#35290b;color:#ffe69a}
html[data-theme="neon"] :is(.status-finished,.event-status.status-finished){border-color:#496a83;background:#111f2c;color:#c8dcea}
html[data-theme="neon"] .event-type-badge{border-color:#496a83;background:#0c1e2d;color:#c8dcea}

/* Event application, profile and account pages. */
html[data-theme="neon"] .plan-box{
    border-color:#28516b!important;background:#08131f!important;color:#eaf7ff!important
}
html[data-theme="neon"] .plan-item:hover .plan-box{border-color:#3ae8ff!important;background:#0b2031!important}
html[data-theme="neon"] .plan-input:checked+.plan-box{border-color:#3ae8ff!important;background:#0c2940!important;box-shadow:0 0 0 2px #22dfff33!important}
html[data-theme="neon"] :is(.plan-name,.plan-price,.plan-feature){color:#eaf7ff}
html[data-theme="neon"] :is(.plan-capacity,.plan-desc){color:#b7cad9}
html[data-theme="neon"] .plan-check{border-color:#53758b;background:#06101b}
html[data-theme="neon"] :is(.participant-card h2,.profile-section h3,.mail-address,.event-list strong,.nostalgia-grade-grid label){color:#eaf7ff}
html[data-theme="neon"] .event-list li{border-color:#214158;background:#071523;color:#eaf7ff}
html[data-theme="neon"] .btn-secondary{border-color:#3c718d!important;background:#0a2335!important;color:#a6f8ff!important}
html[data-theme="neon"] .alert-success{border-color:#287b61!important;background:#0c3328!important;color:#a9ffdc!important}
html[data-theme="neon"] .alert-error,
html[data-theme="neon"] .alert-danger{border-color:#a63b66!important;background:#3a1326!important;color:#ffc1db!important}
html[data-theme="neon"] .alert-info{border-color:#287991!important;background:#0a2d3b!important;color:#a8efff!important}
html[data-theme="neon"] .status.verified{background:#0d352a;color:#a2ffda}
html[data-theme="neon"] .status.unverified{background:#3a1721;color:#ffb4c3}

/* Administration dashboard, forms and status chips. */
html[data-theme="neon"] :is(.section,.stat-card,.news-option,.news-form-card){border-color:#28516b;background:#08131f;color:#eaf7ff}
html[data-theme="neon"] :is(.page-title,.section-title,.stat-value,.dashboard-event-title,.dashboard-metric,.dashboard-metric strong,.dashboard-plan-counts strong,.news-summary-grid .stat-card strong,.news-admin-title,.news-read-count strong){color:#eaf7ff}
html[data-theme="neon"] :is(.stat-title,.dashboard-card-heading small,.dashboard-event-row small,.dashboard-metric small,.dashboard-plan-counts span,.news-summary-grid .stat-card span,.news-period small,.news-admin-table td>small,.news-option small){color:#b7cad9}
html[data-theme="neon"] :is(.dashboard-filters input,.dashboard-filters select,.news-admin-filters input,.news-admin-filters select){border-color:#2c5971!important;background:#050d18!important;color:#eaf7ff!important}
html[data-theme="neon"] .table tbody tr:hover{background:#0b2234}
html[data-theme="neon"] .dashboard-stat-red{background:linear-gradient(145deg,#27101d,#15101e)!important}
html[data-theme="neon"] :is(.dashboard-no-result,.news-no-result){color:#b7cad9}
html[data-theme="neon"] .badge-success{border-color:#287b61;background:#0c3328;color:#a9ffdc}
html[data-theme="neon"] .badge-warning{border-color:#82651f;background:#35290b;color:#ffe69a}
html[data-theme="neon"] .badge-danger{border-color:#a63b66;background:#3a1326;color:#ffc1db}
html[data-theme="neon"] .badge-secondary{border-color:#496a83;background:#111f2c;color:#c8dcea}
html[data-theme="neon"] .score-pending{color:#ffe69a}
html[data-theme="neon"] .score-approved{color:#92ffd5}
html[data-theme="neon"] .score-rejected{color:#ff9ebd}

/* BDC and rival comparison pages. */
html[data-theme="neon"] .bdc-iidx-page{color:#eaf7ff}
html[data-theme="neon"] :is(.bdc-import-steps,.bdc-breadcrumb,.bdc-rival-result>span){color:#b7cad9}
html[data-theme="neon"] .bdc-rival-card.is-request{border-color:#327a9b;background:#0b2134}
html[data-theme="neon"] .bdc-rival-pending{border:1px solid #82651f;background:#35290b;color:#ffe69a}
html[data-theme="neon"] .bdc-compare-badge.is-win{background:#0c3328;color:#9fffd8}
html[data-theme="neon"] .bdc-compare-badge.is-loss{background:#3a1326;color:#ffb2cc}
html[data-theme="neon"] .bdc-compare-badge.is-tie{background:#152231;color:#c2d4e1}
html[data-theme="neon"] .bdc-rival-result.is-win strong,
html[data-theme="neon"] .is-score-win{color:#62ffc8!important}
html[data-theme="neon"] .bdc-rival-result.is-loss strong,
html[data-theme="neon"] .is-score-loss{color:#ff8faa!important}
html[data-theme="neon"] [class*="bdc-lamp-"]{border-color:#496a83;background:#111f2c;color:#eaf7ff}
html[data-theme="neon"] :is(.bdc-import-status,.bdc-import-result){border:1px solid #28516b;background:#071523;color:#eaf7ff}
html[data-theme="neon"] .bdc-import-status.is-success{border-color:#287b61;background:#0c3328;color:#a9ffdc}
html[data-theme="neon"] .bdc-import-status.is-error{border-color:#a63b66;background:#3a1326;color:#ffc1db}
html[data-theme="neon"] .bdc-import-status.is-loading{border-color:#287991;background:#0a2d3b;color:#a8efff}

/* NDC import/OCR feedback and disabled states. */
html[data-theme="neon"] :is(.ndc-notice,.ndc-ocr-status,.ndc-ocr-empty,.ndc-ocr-correction-current){border-color:#28516b;background:#071523;color:#dcebf5}
html[data-theme="neon"] .ndc-notice.success{border-color:#287b61;background:#0c3328;color:#a9ffdc}
html[data-theme="neon"] .ndc-notice.error{border-color:#a63b66;background:#3a1326;color:#ffc1db}
html[data-theme="neon"] .ndc-button:disabled{border-color:#3a5264!important;background:#14202c!important;color:#91aabd!important;box-shadow:none}

/* Modal and notification copy must remain readable over dark overlays. */
html[data-theme="neon"] :is(.modal-body,.notification-item,.notification-message,.notification-title){color:#eaf7ff}
html[data-theme="neon"] :is(.notification-time,.notification-date){color:#b7cad9}

/* Score submission subsystem uses late inline styles, so keep its complete
   surface hierarchy inside the Neon palette with explicit overrides. */
html[data-theme="neon"] :is(.score-system-page,.final-manage-page,.final-event-select-page){color:#eaf7ff!important}
html[data-theme="neon"] :is(.score-system-heading p,.score-system-user,.final-manage-heading p,.score-system-page .muted,.final-manage-page .muted,.manage-meta,.final-list-item span,.final-list-item small,.finalist-item small){color:#b7cad9!important}
html[data-theme="neon"] :is(.score-system-page .card,.final-manage-page .card,.final-event-select-page .card){
    border-color:#28516b!important;background:linear-gradient(145deg,#0a1525,#08101d)!important;color:#eaf7ff!important;
    box-shadow:0 0 0 1px #18dfff22,0 18px 40px #0009!important
}
html[data-theme="neon"] .score-system-page .card>h2,
html[data-theme="neon"] .final-manage-page .card>h2,
html[data-theme="neon"] .score-system-page .ranking-card-heading,
html[data-theme="neon"] .final-event-select-page h1{
    border-color:#28516b!important;background:#0c2033!important;color:#eaf7ff!important
}
html[data-theme="neon"] :is(.score-system-page .card>h2,.final-manage-page .card>h2,.score-system-page .ranking-card-heading h2,.final-toolbar h2,.final-score-settings h3){color:#eaf7ff!important}
html[data-theme="neon"] :is(.score-system-page label,.final-manage-page label,.final-event-select-form label){color:#dcebf5!important}
html[data-theme="neon"] .score-system-nav a,
html[data-theme="neon"] .score-system-page .button,
html[data-theme="neon"] .final-switch-nav a,
html[data-theme="neon"] .final-manage-page .button{
    border:1px solid #32708b!important;background:#09243a!important;color:#9cf8ff!important
}
html[data-theme="neon"] .score-system-nav a.active,
html[data-theme="neon"] .score-system-page .button.primary,
html[data-theme="neon"] .final-switch-nav a.active,
html[data-theme="neon"] .final-manage-page .button.primary{
    border-color:#42ebff!important;background:linear-gradient(90deg,#087ba1,#633eaf)!important;color:#fff!important
}
html[data-theme="neon"] :is(.score-system-page .button.danger,.final-manage-page .button.danger,.final-delete-form .danger){border-color:#a63b66!important;background:#3a1326!important;color:#ffc1db!important}
html[data-theme="neon"] .score-system-page .choice-list a{
    border-color:#28516b!important;background:#071523!important;color:#eaf7ff!important
}
html[data-theme="neon"] .score-system-page .choice-list a.active{
    border-color:#42ebff!important;background:#0b2941!important;color:#f4fdff!important;box-shadow:0 0 0 1px #20dcff22
}
html[data-theme="neon"] :is(.score-system-page .official-score-detail,.final-score-settings,.finalist-item,.final-list-item){border-color:#28516b!important;background:#071523!important;color:#eaf7ff!important}
html[data-theme="neon"] .final-list-item.active{border-color:#42ebff!important;background:#0b2941!important;color:#fff!important}
html[data-theme="neon"] :is(.score-system-page .qualifier-song-suggestions,.score-system-page .qualifier-song-suggestion){border-color:#28516b!important;background:#071523!important;color:#eaf7ff!important}
html[data-theme="neon"] .score-system-page .qualifier-song-suggestion:hover,
html[data-theme="neon"] .score-system-page .qualifier-song-suggestion.is-active{background:#0b2941!important;color:#fff!important}
html[data-theme="neon"] :is(.score-system-page .qualifier-song-suggestion small,.score-system-page .qualifier-song-suggestion-empty){color:#b7cad9!important}
html[data-theme="neon"] .score-system-page .flash.success,
html[data-theme="neon"] .final-manage-page .flash.success{border:1px solid #287b61!important;background:#0c3328!important;color:#a9ffdc!important}
html[data-theme="neon"] .score-system-page .flash.error,
html[data-theme="neon"] .final-manage-page .flash.error,
html[data-theme="neon"] .final-event-select-page .flash.error{border:1px solid #a63b66!important;background:#3a1326!important;color:#ffc1db!important}
html[data-theme="neon"] .score-system-page .stage-badge.qualifier{background:#0c3328!important;color:#a9ffdc!important}
html[data-theme="neon"] .score-system-page .stage-badge.final{background:#0b2941!important;color:#a8efff!important}
html[data-theme="neon"] .score-system-page .status.pending{background:#35290b!important;color:#ffe69a!important}
html[data-theme="neon"] .score-system-page .status.approved{background:#0c3328!important;color:#a9ffdc!important}
html[data-theme="neon"] .score-system-page .status.rejected{background:#3a1326!important;color:#ffc1db!important}
html[data-theme="neon"] .score-system-page :is(th,td){border-color:#214158!important}
html[data-theme="neon"] .score-system-page th{background:#0c2033!important;color:#8df7ff!important}
html[data-theme="neon"] .score-system-page td{background:transparent!important;color:#eaf7ff!important}
html[data-theme="neon"] .score-system-page .rank{color:#6ff6ff!important}

/* ==========================================================
   Nostalgia theme — original piano and antique-score design
========================================================== */
html[data-theme="nostalgia"]{
    --theme-bg:#eee8d6;
    --theme-surface:#fffdf3;
    --theme-surface-soft:#f2ecd8;
    --theme-text:#3f2c20;
    --theme-muted:#76675c;
    --theme-border:#9a8467;
    --theme-accent:#744b72;
    --theme-accent-soft:#eee4ed;
    --theme-pink:#a45c78;
    --theme-yellow:#d2b86d;
    --theme-cyan:#94a79e;
    --theme-violet:#846482;
    --theme-green:#71896f;
    --theme-shadow:rgba(73,49,31,.2);
    --text:#3f2c20;
    --subtext:#76675c;
    --border:#9a8467;
    --background:#eee8d6;
    --card:#fffdf3;
    --primary:#744b72;
    --bs-body-color:#3f2c20;
    --bs-secondary-color:#76675c;
    --bs-tertiary-color:#8c7d70;
    --bs-emphasis-color:#241811;
    --bs-body-bg:#eee8d6;
    --bs-border-color:#b9aa91;
    color-scheme:light;
}

html[data-theme="nostalgia"] body{
    background:
        radial-gradient(circle at 18% 8%,rgba(255,255,255,.72),transparent 29%),
        repeating-linear-gradient(0deg,transparent 0 31px,rgba(111,87,55,.055) 32px,transparent 33px),
        linear-gradient(135deg,#f7f3e6 0,#e9e0ca 54%,#f3ecdd 100%);
    color:var(--theme-text);
    font-family:"Yu Mincho","Hiragino Mincho ProN","HGS明朝E",Georgia,serif;
}

html[data-theme="nostalgia"] .site-header{
    height:68px;border-bottom:1px solid #8c7658;
    background:linear-gradient(180deg,rgba(255,254,247,.97),rgba(239,232,213,.96));
    box-shadow:0 8px 24px rgba(74,53,34,.14);backdrop-filter:blur(12px)
}
html[data-theme="nostalgia"] .layout{margin-top:68px;min-height:calc(100vh - 68px)}
html[data-theme="nostalgia"] .logo{color:#4b3125;font-weight:700;letter-spacing:.055em;text-shadow:0 1px #fff}
html[data-theme="nostalgia"] .menu-toggle{color:#4b3125}
html[data-theme="nostalgia"] .header-notification{
    width:40px;height:40px;border:1px solid #6a5040;border-radius:50%;
    background:linear-gradient(145deg,#fffdf3,#ddd2b8);color:#4b3125;box-shadow:0 3px 9px rgba(65,42,26,.2)
}
html[data-theme="nostalgia"] .header-notification span{border-color:#fffdf3;background:#92546c}
html[data-theme="nostalgia"] .locale-form select{
    border:1px solid #8d775b!important;border-radius:3px!important;background:#fffdf3!important;
    color:#3f2c20!important;box-shadow:inset 0 0 0 2px #f0ead9
}

html[data-theme="nostalgia"] .sidebar{
    top:68px;height:calc(100vh - 68px);padding-top:22px;border-right:1px solid #5b4132;
    background:
        linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px) 0 0/28px 100%,
        radial-gradient(circle at 20% 0,rgba(180,148,112,.22),transparent 38%),
        linear-gradient(180deg,#3c2b22,#251b17 62%,#17110f);
    box-shadow:10px 0 28px rgba(55,37,25,.16)
}
html[data-theme="nostalgia"] .sidebar a,
html[data-theme="nostalgia"] .sidebar-group-toggle,
html[data-theme="nostalgia"] .sidebar-notification-link,
html[data-theme="nostalgia"] .logout-button{
    border:1px solid transparent;border-radius:3px;color:#e9dfc9;font-weight:700;text-shadow:0 1px #0008
}
html[data-theme="nostalgia"] .sidebar a:hover,
html[data-theme="nostalgia"] .sidebar-notification-link:hover,
html[data-theme="nostalgia"] .sidebar-notification-link:focus-visible,
html[data-theme="nostalgia"] .sidebar a.is-active,
html[data-theme="nostalgia"] .sidebar-group-toggle:hover,
html[data-theme="nostalgia"] .sidebar-group-toggle:focus-visible,
html[data-theme="nostalgia"] .sidebar-group-toggle.is-active,
html[data-theme="nostalgia"] .sidebar-group.is-open>.sidebar-group-toggle,
html[data-theme="nostalgia"] .logout-button:hover{
    border-color:#d2c5a8;background:linear-gradient(90deg,#fffdf3,#dfd4bc);color:#3f2c20;
    box-shadow:inset 4px 0 #8c5f83,0 3px 10px #0005;text-shadow:none;transform:translateX(2px)
}
html[data-theme="nostalgia"] .sidebar-group-items a{border-left:1px solid #cbbd9d88;border-radius:0 3px 3px 0}
html[data-theme="nostalgia"] .sidebar hr{border-color:#c9b99366}
html[data-theme="nostalgia"] .content{width:100%;max-width:1600px;margin:0 auto;padding:34px}

html[data-theme="nostalgia"] h1,
html[data-theme="nostalgia"] h2,
html[data-theme="nostalgia"] h3,
html[data-theme="nostalgia"] h4,
html[data-theme="nostalgia"] .home-title{color:#3f2c20;font-family:"Yu Mincho","Hiragino Mincho ProN",Georgia,serif;font-weight:700}
html[data-theme="nostalgia"] p,
html[data-theme="nostalgia"] .home-subtitle{color:var(--theme-muted)}
html[data-theme="nostalgia"] a{color:#744b72}

html[data-theme="nostalgia"] .card,
html[data-theme="nostalgia"] .event-card,
html[data-theme="nostalgia"] .participant-card,
html[data-theme="nostalgia"] .participant-event-card,
html[data-theme="nostalgia"] .notice-list,
html[data-theme="nostalgia"] .news-article,
html[data-theme="nostalgia"] .live-archive-card,
html[data-theme="nostalgia"] .ndc-card,
html[data-theme="nostalgia"] .modal-content,
html[data-theme="nostalgia"] .profile-section,
html[data-theme="nostalgia"] .admin-section,
html[data-theme="nostalgia"] .dashboard-card,
html[data-theme="nostalgia"] .event-ranking-card,
html[data-theme="nostalgia"] .event-ranking-placeholder,
html[data-theme="nostalgia"] .event-ranking-hero{
    border:1px solid #a89474!important;border-radius:5px!important;
    background:
        linear-gradient(90deg,rgba(255,255,255,.4),transparent 12%,transparent 88%,rgba(119,91,52,.04)),
        var(--theme-surface)!important;
    color:var(--theme-text)!important;
    box-shadow:0 8px 24px rgba(76,52,33,.15),inset 0 0 32px rgba(157,132,83,.07)!important
}
html[data-theme="nostalgia"] :is(.card,.event-card,.participant-event-card,.ndc-card,.event-ranking-card)::before{
    border-color:#d5c8aa!important
}

html[data-theme="nostalgia"] .btn,
html[data-theme="nostalgia"] button:not(.menu-toggle):not(.sidebar-group-toggle):not(.sidebar-notification-link):not(.logout-button):not(.header-notification):not(.header-notification-close),
html[data-theme="nostalgia"] .ndc-button{
    border:1px solid #6c513f;border-radius:3px;font-family:inherit;font-weight:700;
    box-shadow:0 2px 5px rgba(67,43,27,.18)
}
html[data-theme="nostalgia"] .btn-primary,
html[data-theme="nostalgia"] .ndc-button:not(.secondary):not(.danger){
    border-color:#5d3e5b!important;background:linear-gradient(#8b6988,#694765)!important;color:#fff!important
}
html[data-theme="nostalgia"] .btn-outline-primary,
html[data-theme="nostalgia"] .btn-secondary,
html[data-theme="nostalgia"] .ndc-button.secondary{
    border-color:#80684e!important;background:linear-gradient(#fffdf3,#e1d6bd)!important;color:#3f2c20!important
}
html[data-theme="nostalgia"] .btn-danger,
html[data-theme="nostalgia"] .ndc-button.danger{border-color:#834b54!important;background:#985b64!important;color:#fff!important}
html[data-theme="nostalgia"] .btn:hover,
html[data-theme="nostalgia"] button:hover{filter:brightness(1.04);transform:translateY(-1px)}

html[data-theme="nostalgia"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="nostalgia"] select,
html[data-theme="nostalgia"] textarea{
    border:1px solid #9b866a!important;border-radius:3px!important;background:#fffef8!important;
    color:#3f2c20!important;box-shadow:inset 0 1px 4px rgba(75,49,30,.08)
}
html[data-theme="nostalgia"] input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="nostalgia"] select:focus,
html[data-theme="nostalgia"] textarea:focus{
    border-color:#81527a!important;box-shadow:0 0 0 3px rgba(129,82,122,.18)!important
}
html[data-theme="nostalgia"] :is(input,select,textarea)::placeholder{color:#9b8c7e!important;opacity:1}
html[data-theme="nostalgia"] .form-check-input{border:1px solid #8f785e!important;background-color:#fffdf3}
html[data-theme="nostalgia"] .form-check-input:checked{border-color:#5d3e5b!important;background-color:#744b72!important}

html[data-theme="nostalgia"] table{color:#3f2c20}
html[data-theme="nostalgia"] th{background:#e5dcc5!important;color:#3f2c20!important;font-weight:700}
html[data-theme="nostalgia"] th,
html[data-theme="nostalgia"] td{border-color:#cfc1a5!important}
html[data-theme="nostalgia"] tbody tr:nth-child(even){background:rgba(133,104,72,.035)}
html[data-theme="nostalgia"] .table-responsive{border-radius:4px}

html[data-theme="nostalgia"] .event-status,
html[data-theme="nostalgia"] .event-type-badge,
html[data-theme="nostalgia"] .badge,
html[data-theme="nostalgia"] .notice-badge{
    border:1px solid #9a8467;border-radius:3px;font-weight:700
}
html[data-theme="nostalgia"] .status-entry{background:#e6eddf;color:#496047}
html[data-theme="nostalgia"] .status-open{background:#e0eaeb;color:#405f62}
html[data-theme="nostalgia"] .status-end{background:#e9e0e9;color:#654760}
html[data-theme="nostalgia"] .empty-card{border:1px dashed #9a8467;background:#f8f3e6;color:#76675c}

html[data-theme="nostalgia"] .aes-portal-hero{
    position:relative;overflow:hidden;border:1px solid #816b51;border-radius:6px;
    background:
        linear-gradient(110deg,rgba(255,253,243,.97) 0 58%,rgba(224,214,190,.9) 100%),
        repeating-linear-gradient(0deg,transparent 0 25px,rgba(91,68,42,.08) 26px);
    box-shadow:0 12px 32px rgba(73,50,31,.18),inset 0 0 45px rgba(145,113,71,.1)
}
html[data-theme="nostalgia"] .aes-portal-hero:after{
    content:"";position:absolute;right:-8px;bottom:0;width:46%;height:72px;pointer-events:none;opacity:.55;
    border-top:2px solid #5d4938;
    background:
        linear-gradient(90deg,
            transparent 0 37px,#2b211b 37px 55px,
            transparent 55px 83px,#2b211b 83px 101px,
            transparent 101px 175px,#2b211b 175px 193px,
            transparent 193px 221px,#2b211b 221px 239px,
            transparent 239px 267px,#2b211b 267px 285px,
            transparent 285px 322px) 0 0/322px 44px repeat-x,
        repeating-linear-gradient(90deg,#fffdf3 0 44px,#5d4938 44px 46px)
}
html[data-theme="nostalgia"] .aes-portal-copy,
html[data-theme="nostalgia"] .aes-portal-actions,
html[data-theme="nostalgia"] .aes-portal-links{position:relative;z-index:2}
html[data-theme="nostalgia"] .aes-portal-eyebrow{
    border:1px solid #8f775a;border-radius:3px;background:#f4eedc;color:#744b72;box-shadow:none;letter-spacing:.16em
}
html[data-theme="nostalgia"] .aes-portal-copy h1{color:#3f2c20;letter-spacing:.01em;text-shadow:0 1px #fff}
html[data-theme="nostalgia"] .aes-portal-card{
    border:1px solid #9a8467;border-radius:4px;background:rgba(255,253,243,.94);color:#3f2c20;
    box-shadow:0 5px 14px rgba(70,46,28,.12)
}
html[data-theme="nostalgia"] .aes-portal-card:hover{border-color:#744b72;box-shadow:0 8px 18px rgba(70,46,28,.18);transform:translateY(-2px)}
html[data-theme="nostalgia"] .aes-portal-card>i:first-child{border:1px solid #876d50;border-radius:50%;background:#e5dac0;color:#4b3125}

html[data-theme="nostalgia"] .home-live-section,
html[data-theme="nostalgia"] .live-archive-header{
    border:1px solid #66503d;border-radius:5px;background:linear-gradient(135deg,#4b3629,#6e4f68 70%,#8d7f69);box-shadow:0 8px 23px rgba(64,41,26,.2)
}

html[data-theme="nostalgia"] .ndc-hero{
    padding:24px 26px;border:1px solid #816b51;border-radius:5px;
    background:linear-gradient(110deg,#fffdf3,#eee6d3 58%,#e6dce4);box-shadow:0 8px 24px rgba(76,52,33,.15)
}
html[data-theme="nostalgia"] .ndc-hero h1{color:#3f2c20}
html[data-theme="nostalgia"] .ndc-muted,
html[data-theme="nostalgia"] .ndc-metric-label{color:#76675c}
html[data-theme="nostalgia"] .ndc-tabs a{border:1px solid #8e775b;border-radius:3px;background:#fffdf3;color:#3f2c20;box-shadow:0 2px 5px rgba(67,43,27,.12)}
html[data-theme="nostalgia"] .ndc-tabs a.active{background:#744b72;color:#fff}

html[data-theme="nostalgia"] .participant-page{max-width:980px}
html[data-theme="nostalgia"] .participant-card{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
html[data-theme="nostalgia"] .participant-page-head,
html[data-theme="nostalgia"] .participant-card>.profile-section,
html[data-theme="nostalgia"] .theme-settings{
    margin:0 0 22px;padding:24px!important;border:1px solid #a89474!important;border-radius:5px!important;
    background:#fffdf3!important;box-shadow:0 8px 24px rgba(76,52,33,.15)!important
}
html[data-theme="nostalgia"] .participant-page-head{background:linear-gradient(110deg,#fffdf3,#e8dfc9 65%,#eee3ec)!important}
html[data-theme="nostalgia"] .participant-card .participant-page-head>span,
html[data-theme="nostalgia"] .profile-section-eyebrow{color:#744b72;letter-spacing:.14em}
html[data-theme="nostalgia"] .participant-card .participant-page-head>h2{margin:3px 0 7px!important;color:#3f2c20;text-align:left}
html[data-theme="nostalgia"] .participant-card>.profile-section h3,
html[data-theme="nostalgia"] .theme-settings h3{margin:0 0 20px;padding-bottom:13px;border-bottom:1px solid #cdbd9f;color:#3f2c20}
html[data-theme="nostalgia"] .account-summary-grid{display:block;margin:0 0 20px}
html[data-theme="nostalgia"] .account-summary-grid>.profile-summary-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 2px;border-bottom:1px solid #d7c9ad}
html[data-theme="nostalgia"] .account-summary-grid .profile-summary-label{margin:0;color:#76675c}
html[data-theme="nostalgia"] .account-summary-grid .account-summary-value{margin:0;color:#3f2c20;text-align:right}
html[data-theme="nostalgia"] .owned-badge-card{border-color:#b9a88a;border-radius:4px;background:#faf6e9;color:#3f2c20}
html[data-theme="nostalgia"] .owned-badge-option input:checked+.owned-badge-card{border-color:#744b72;background:#f0e7ef}

html[data-theme="nostalgia"] .event-ranking-status,
html[data-theme="nostalgia"] .event-ranking-nav a,
html[data-theme="nostalgia"] .event-ranking-difficulty{border-radius:3px}
html[data-theme="nostalgia"] .event-ranking-nav a{border-color:#9a8467;background:#f3ecda;color:#3f2c20}
html[data-theme="nostalgia"] .event-ranking-stage,
html[data-theme="nostalgia"] .event-ranking-songs summary{color:#744b72}

html[data-theme="nostalgia"] .score-system-page .card,
html[data-theme="nostalgia"] .final-manage-page .card,
html[data-theme="nostalgia"] .final-event-select-page .card{
    border-color:#a89474!important;background:#fffdf3!important;color:#3f2c20!important;box-shadow:0 8px 24px rgba(76,52,33,.15)!important
}
html[data-theme="nostalgia"] .score-system-page .card>h2,
html[data-theme="nostalgia"] .final-manage-page .card>h2,
html[data-theme="nostalgia"] .score-system-page .ranking-card-heading{
    border-color:#c6b695!important;background:#e9e0cb!important;color:#3f2c20!important
}
html[data-theme="nostalgia"] .score-system-nav a,
html[data-theme="nostalgia"] .score-system-page .button,
html[data-theme="nostalgia"] .final-switch-nav a,
html[data-theme="nostalgia"] .final-manage-page .button{
    border:1px solid #8f775a!important;border-radius:3px!important;background:#f8f2e3!important;color:#3f2c20!important
}
html[data-theme="nostalgia"] .score-system-nav a.active,
html[data-theme="nostalgia"] .score-system-page .button.primary,
html[data-theme="nostalgia"] .final-switch-nav a.active,
html[data-theme="nostalgia"] .final-manage-page .button.primary{
    border-color:#5d3e5b!important;background:linear-gradient(#8b6988,#694765)!important;color:#fff!important
}
html[data-theme="nostalgia"] .score-system-page th{background:#e5dcc5!important;color:#3f2c20!important}
html[data-theme="nostalgia"] .score-system-page td{background:transparent!important;color:#3f2c20!important}

@media(max-width:900px){
    html[data-theme="nostalgia"] .sidebar{top:68px;height:calc(100vh - 68px)}
    html[data-theme="nostalgia"] .content{padding:22px 15px}
}
@media(max-width:680px){
    html[data-theme="nostalgia"] .site-header{padding:0 12px}
    html[data-theme="nostalgia"] .logo{font-size:20px;letter-spacing:.02em}
    html[data-theme="nostalgia"] .header-right{gap:10px}
    html[data-theme="nostalgia"] .locale-form select{min-width:96px;max-width:104px}
    html[data-theme="nostalgia"] .aes-portal-hero{padding:25px 20px 92px}
    html[data-theme="nostalgia"] .aes-portal-hero:after{width:100%;height:66px;opacity:.48}
    html[data-theme="nostalgia"] .participant-page-head,
    html[data-theme="nostalgia"] .participant-card>.profile-section,
    html[data-theme="nostalgia"] .theme-settings{margin-bottom:17px;padding:19px 17px!important}
}
@media(max-width:460px){
    html[data-theme="nostalgia"] .header-left{gap:8px}
    html[data-theme="nostalgia"] .site-header .logo{font-size:0}
    html[data-theme="nostalgia"] .site-header .logo:after{content:"AES";font-size:20px;letter-spacing:.08em}
    html[data-theme="nostalgia"] .header-right>.fa-user{display:none}
    html[data-theme="nostalgia"] .header-notification{width:36px;height:36px}
}

/* Nostalgia compatibility audit — keep legacy notices and badges harmonious. */
html[data-theme="nostalgia"] :is(.text-muted,.text-secondary,.form-text,.help-text,.stat-note,.page-description){color:#76675c!important}
html[data-theme="nostalgia"] .alert-info{border-color:#9b8196!important;background:#eee4ed!important;color:#533b51!important}
html[data-theme="nostalgia"] .alert-success{border-color:#8b9a78!important;background:#e8eddf!important;color:#40513d!important}
html[data-theme="nostalgia"] .alert-warning{border-color:#b0975d!important;background:#f3e8c8!important;color:#624f28!important}
html[data-theme="nostalgia"] :is(.alert-error,.alert-danger){border-color:#a66b70!important;background:#f1dfe0!important;color:#6b3b42!important}
html[data-theme="nostalgia"] .event-type-badge{border-color:#9a8467;background:#eee7d6;color:#4b382b}
html[data-theme="nostalgia"] .notice-item{border-color:#c7b89b;background:#faf6e9;color:#3f2c20}
html[data-theme="nostalgia"] .notice-item.notice-pinned{border-left-color:#8a5d82;background:#f2e8ef}
html[data-theme="nostalgia"] .notice-item.notice-unread{background:#eee8d8}
html[data-theme="nostalgia"] .event-ranking-announcement{border-color:#a89474;background:#f2eadb}

/* Nostalgia home icon audit — remove leftover Pop accent colours. */
html[data-theme="nostalgia"] .aes-summary-metrics article>i{
    border:1px solid #8d7558;background:#e7dcc4!important;color:#4b3326!important;
    box-shadow:inset 0 0 0 3px #f8f3e6,0 2px 5px rgba(65,42,26,.15)
}
html[data-theme="nostalgia"] .aes-summary-metrics article:nth-child(2)>i{
    border-color:#8b6985;background:#e9dfe8!important;color:#62465e!important
}
html[data-theme="nostalgia"] .aes-summary-metrics small,
html[data-theme="nostalgia"] .aes-game-data-card>header span{color:#744b72}
html[data-theme="nostalgia"] .aes-game-data-card>header a{background:#eee5ed;color:#5d3e5b}
html[data-theme="nostalgia"] .aes-game-data-icon{
    border:1px solid #8d7558;background:#e7dcc4!important;color:#4b3326!important;
    box-shadow:inset 0 0 0 3px #f8f3e6
}
html[data-theme="nostalgia"] .aes-game-data-icon.is-iidx{
    border-color:#8b6985;background:#e9dfe8!important;color:#62465e!important
}
html[data-theme="nostalgia"] .aes-game-data-row{border-top-color:#cdbd9f}
html[data-theme="nostalgia"] .aes-game-data-row dl>div{border-left-color:#d7c9ad}

/* Header notification center and priority alerts. */
html[data-theme="pop"] .header-notification-panel,
html[data-theme="pop"] .site-priority-alert{
    border-width:2px;box-shadow:4px 5px 0 var(--theme-border)
}
html[data-theme="pop"] .header-notification-panel{border-color:var(--theme-border);border-radius:20px}

html[data-theme="neon"] .header-notification-panel{
    border-color:#2de7ff;background:#081728;color:#eaf7ff;box-shadow:0 0 28px #00dfff44,0 22px 55px #000b
}
html[data-theme="neon"] .header-notification-panel>header,
html[data-theme="neon"] .header-notification-panel>footer{border-color:#28516b}
html[data-theme="neon"] .header-notification-panel>header small,
html[data-theme="neon"] .header-notification-item p,
html[data-theme="neon"] .header-notification-empty{color:#a9bfd1}
html[data-theme="neon"] .header-notification-item.is-warning{border-color:#b48827;background:#34280f;color:#fff0bd}
html[data-theme="neon"] .header-notification-item.is-info{border-color:#287991;background:#0a2d3b;color:#bdefff}
html[data-theme="neon"] .header-notification-item.is-news{color:#eaf7ff}
html[data-theme="neon"] .header-notification-item.is-unread{border-color:#7455c7;background:#1a173b}
html[data-theme="neon"] .header-notification-item a,
html[data-theme="neon"] .header-notification-links a,
html[data-theme="neon"] .header-notification-panel>footer a{color:#72efff}
html[data-theme="neon"] .site-priority-alert{border-color:#b48827;background:#34280f;color:#fff0bd;box-shadow:0 0 18px #ffb90022}
html[data-theme="neon"] .site-priority-alert.is-info{border-color:#287991;background:#0a2d3b;color:#bdefff;box-shadow:0 0 18px #00dfff22}

html[data-theme="nostalgia"] .header-notification-panel{
    border-color:#9a8467;border-radius:5px;background:#fffdf3;color:#3f2c20;
    box-shadow:0 16px 42px rgba(65,42,26,.28),inset 0 0 24px rgba(157,132,83,.06)
}
html[data-theme="nostalgia"] .header-notification-panel>header,
html[data-theme="nostalgia"] .header-notification-panel>footer{border-color:#d4c7aa}
html[data-theme="nostalgia"] .header-notification-panel>header small,
html[data-theme="nostalgia"] .header-notification-item p,
html[data-theme="nostalgia"] .header-notification-empty{color:#76675c}
html[data-theme="nostalgia"] .header-notification-item.is-warning{border-color:#b0975d;background:#f6edcf;color:#5d4827}
html[data-theme="nostalgia"] .header-notification-item.is-info{border-color:#9b8196;background:#eee4ed;color:#533b51}
html[data-theme="nostalgia"] .header-notification-item.is-news{color:#3f2c20}
html[data-theme="nostalgia"] .header-notification-item.is-unread{border-color:#9b8196;background:#f3eaf1}
html[data-theme="nostalgia"] .header-notification-item a,
html[data-theme="nostalgia"] .header-notification-links a,
html[data-theme="nostalgia"] .header-notification-panel>footer a{color:#744b72}
html[data-theme="nostalgia"] .site-priority-alert{border-color:#b0975d;border-radius:4px;background:#f6edcf;color:#5d4827;box-shadow:0 6px 16px rgba(65,42,26,.13)}
html[data-theme="nostalgia"] .site-priority-alert.is-info{border-color:#9b8196;background:#eee4ed;color:#533b51}

/* ==========================================================
   AES MEIBO — QR exclusive business-card / tech mascot theme
========================================================== */
.aes-character-image-meibo,
.aes-character-speech-meibo{display:none}

html[data-theme="meibo"]{
    --theme-bg:#eef8fc;
    --theme-surface:#fff;
    --theme-surface-soft:#e9faff;
    --theme-text:#071a39;
    --theme-muted:#55708a;
    --theme-border:#0b2146;
    --theme-accent:#00bfe9;
    --theme-accent-soft:#dff9ff;
    --theme-pink:#ff4eaa;
    --theme-yellow:#ffd748;
    --theme-cyan:#00c8ef;
    --theme-violet:#6f63df;
    --theme-green:#16a085;
    --theme-shadow:rgba(7,26,57,.19);
    --text:#071a39;
    --subtext:#55708a;
    --border:#0b2146;
    --background:#eef8fc;
    --card:#fff;
    --primary:#087ecb;
    --bs-body-color:#071a39;
    --bs-secondary-color:#55708a;
    --bs-body-bg:#eef8fc;
    --bs-border-color:#9cc8da;
    color-scheme:light;
}
html[data-theme="meibo"] body{
    background:
        linear-gradient(135deg,transparent 0 79%,rgba(255,78,170,.08) 79% 82%,transparent 82%) 0 0/140px 140px,
        linear-gradient(45deg,transparent 0 79%,rgba(0,191,233,.11) 79% 82%,transparent 82%) 0 0/140px 140px,
        radial-gradient(circle at 14% 6%,#fff 0,transparent 28%),
        linear-gradient(135deg,#f8fdff,#eaf8fd 58%,#fff4fa);
    color:var(--theme-text);
    font-family:"Yu Gothic","Hiragino Kaku Gothic ProN","Segoe UI",sans-serif;
}
html[data-theme="meibo"] .site-header{
    height:68px;border-bottom:0;background:rgba(255,255,255,.96);box-shadow:0 8px 28px rgba(7,26,57,.12);backdrop-filter:blur(14px)
}
html[data-theme="meibo"] .site-header:after{
    content:"";position:absolute;right:0;bottom:0;left:0;height:4px;
    background:linear-gradient(90deg,#0b2146 0 28%,#00c8ef 28% 72%,#ff4eaa 72% 100%)
}
html[data-theme="meibo"] .layout{margin-top:68px;min-height:calc(100vh - 68px)}
html[data-theme="meibo"] .logo{color:#071a39;font-weight:900;letter-spacing:.03em}
html[data-theme="meibo"] .logo:after{content:" / MEIBO";color:#00a7d1;font-size:.62em;letter-spacing:.12em}
html[data-theme="meibo"] .menu-toggle{color:#071a39}
html[data-theme="meibo"] .header-notification{
    border:2px solid #071a39;border-radius:12px;background:#e8fbff;color:#071a39;box-shadow:4px 4px 0 #00c8ef
}
html[data-theme="meibo"] .header-notification span{border-color:#fff;background:#ff4eaa}
html[data-theme="meibo"] .locale-form select{
    border:2px solid #071a39!important;border-radius:10px!important;background:#fff!important;color:#071a39!important;box-shadow:3px 3px 0 #b9eff8
}
html[data-theme="meibo"] .sidebar{
    top:68px;height:calc(100vh - 68px);border-right:0;
    background:
        linear-gradient(145deg,transparent 0 76%,rgba(0,200,239,.15) 76% 79%,transparent 79%) 0 0/95px 95px,
        linear-gradient(180deg,#071a39,#0a2950 64%,#061326);
    box-shadow:10px 0 30px rgba(7,26,57,.14)
}
html[data-theme="meibo"] .sidebar:before{
    content:"AES";display:block;margin:4px 16px 16px;padding:10px 12px;border-left:4px solid #00c8ef;color:#fff;
    font-weight:900;letter-spacing:.28em
}
html[data-theme="meibo"] .sidebar a,
html[data-theme="meibo"] .sidebar-group-toggle,
html[data-theme="meibo"] .logout-button{border:1px solid transparent;border-radius:9px;color:#dff9ff;font-weight:800}
html[data-theme="meibo"] .sidebar a:hover,
html[data-theme="meibo"] .sidebar a.is-active,
html[data-theme="meibo"] .sidebar-group-toggle:hover,
html[data-theme="meibo"] .sidebar-group-toggle.is-active,
html[data-theme="meibo"] .sidebar-group.is-open>.sidebar-group-toggle,
html[data-theme="meibo"] .logout-button:hover{
    border-color:#00c8ef;background:linear-gradient(90deg,#0d4d78,#0a315c);color:#fff;box-shadow:inset 4px 0 #ff4eaa,0 0 18px rgba(0,200,239,.24);transform:translateX(2px)
}
html[data-theme="meibo"] .sidebar hr{border-color:#3b678b}
html[data-theme="meibo"] .content{width:100%;max-width:1600px;margin:0 auto;padding:34px}
html[data-theme="meibo"] h1,
html[data-theme="meibo"] h2,
html[data-theme="meibo"] h3,
html[data-theme="meibo"] h4,
html[data-theme="meibo"] .home-title{color:#071a39;font-weight:900;letter-spacing:.015em}
html[data-theme="meibo"] p,
html[data-theme="meibo"] .home-subtitle{color:#55708a}
html[data-theme="meibo"] a{color:#087ecb}

html[data-theme="meibo"] :is(.card,.event-card,.participant-card,.participant-event-card,.notice-list,.news-article,.live-archive-card,.ndc-card,.modal-content,.profile-section,.admin-section,.dashboard-card,.event-ranking-card,.event-ranking-placeholder,.event-ranking-hero,.aes-game-data-card,.aes-summary-metrics article){
    border:2px solid #0b2146!important;border-radius:14px!important;background:#fff!important;color:#071a39!important;
    box-shadow:7px 8px 0 rgba(0,200,239,.17)!important
}
html[data-theme="meibo"] :is(.card,.event-card,.participant-event-card,.ndc-card,.event-ranking-card){position:relative;overflow:hidden}
html[data-theme="meibo"] :is(.card,.event-card,.participant-event-card,.ndc-card,.event-ranking-card):after{
    content:"";position:absolute;top:0;right:0;width:54px;height:8px;background:linear-gradient(90deg,#00c8ef 0 55%,#ff4eaa 55%);pointer-events:none
}
html[data-theme="meibo"] .btn,
html[data-theme="meibo"] button:not(.menu-toggle):not(.sidebar-group-toggle):not(.logout-button),
html[data-theme="meibo"] .ndc-button{border:2px solid #071a39;border-radius:10px;font-weight:900;box-shadow:3px 4px 0 #071a39}
html[data-theme="meibo"] .btn-primary,
html[data-theme="meibo"] .ndc-button:not(.secondary):not(.danger){border-color:#071a39!important;background:linear-gradient(135deg,#087ecb,#00bfe9)!important;color:#fff!important}
html[data-theme="meibo"] .btn-outline-primary,
html[data-theme="meibo"] .btn-secondary,
html[data-theme="meibo"] .ndc-button.secondary{border-color:#071a39!important;background:#fff!important;color:#071a39!important}
html[data-theme="meibo"] .btn-danger,
html[data-theme="meibo"] .ndc-button.danger{border-color:#071a39!important;background:#ff4eaa!important;color:#fff!important}
html[data-theme="meibo"] :is(.detail-primary,.event-qualifier-link,.event-result-banner a){border:2px solid #071a39!important;color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:0 1px 1px rgba(7,26,57,.28);box-shadow:3px 4px 0 #071a39!important}
html[data-theme="meibo"] .detail-danger{color:#9a271f!important;-webkit-text-fill-color:#9a271f!important;background:#fff5f3!important}
html[data-theme="meibo"] :is(.aes-team-name-open,.aes-team-name-heading button){color:#071a39!important;-webkit-text-fill-color:#071a39!important}
html[data-theme="meibo"] .aes-team-name-submit{color:#fff!important;-webkit-text-fill-color:#fff!important;background:#194fcf!important}
html[data-theme="meibo"] .btn:hover,
html[data-theme="meibo"] button:hover,
html[data-theme="meibo"] :is(.detail-primary,.event-qualifier-link,.event-result-banner a):hover{filter:brightness(1.04);transform:translate(-1px,-1px);box-shadow:5px 6px 0 #071a39!important}
html[data-theme="meibo"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="meibo"] select,
html[data-theme="meibo"] textarea{
    border:2px solid #789bb2!important;border-radius:9px!important;background:#fff!important;color:#071a39!important;box-shadow:none
}
html[data-theme="meibo"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{
    border-color:#00a8d3!important;box-shadow:0 0 0 4px rgba(0,200,239,.16)!important
}
html[data-theme="meibo"] .form-check-input:checked{border-color:#071a39!important;background-color:#00bfe9!important}
html[data-theme="meibo"] table{color:#071a39}
html[data-theme="meibo"] th{background:#09264a!important;color:#fff!important}
html[data-theme="meibo"] th,
html[data-theme="meibo"] td{border-color:#b4d6e3!important}
html[data-theme="meibo"] tbody tr:nth-child(even){background:#eefbff}

html[data-theme="meibo"] .aes-portal-hero{
    position:relative;overflow:hidden;border:2px solid #071a39;border-radius:20px;
    background:
        linear-gradient(125deg,transparent 0 68%,rgba(0,200,239,.09) 68% 70%,transparent 70%) 0 0/100px 100px,
        linear-gradient(135deg,#fff 0 64%,#e8faff 64% 84%,#fff0f8 84%);
    box-shadow:10px 11px 0 #071a39
}
html[data-theme="meibo"] .aes-portal-hero:before{
    content:"";position:absolute;top:0;right:0;width:170px;height:18px;background:linear-gradient(90deg,#00c8ef 0 68%,#ff4eaa 68%)
}
html[data-theme="meibo"] .aes-portal-copy,
html[data-theme="meibo"] .aes-portal-actions,
html[data-theme="meibo"] .aes-portal-links{position:relative;z-index:3}
html[data-theme="meibo"] .aes-portal-eyebrow{border:0;border-left:5px solid #ff4eaa;border-radius:0;background:transparent;color:#087ecb;box-shadow:none;letter-spacing:.19em}
html[data-theme="meibo"] .aes-portal-copy h1{color:#071a39;text-shadow:none}
html[data-theme="meibo"] .aes-portal-card{border:2px solid #071a39;border-radius:11px;background:rgba(255,255,255,.96);color:#071a39;box-shadow:4px 5px 0 #8eeaff}
html[data-theme="meibo"] .aes-portal-card:hover{border-color:#071a39;box-shadow:6px 7px 0 #ffb9da;transform:translateY(-2px)}
html[data-theme="meibo"] .aes-portal-card>i:first-child{display:grid;width:38px;height:38px;place-items:center;border:2px solid #071a39;border-radius:9px;background:#dff9ff;color:#087ecb}
html[data-theme="meibo"] .aes-pop-character{position:relative;z-index:2;display:block;align-self:stretch;overflow:hidden;min-height:380px}
html[data-theme="meibo"] :is(.aes-character-image-pop,.aes-character-image-neon,.aes-character-speech-pop,.aes-character-speech-neon){display:none}
html[data-theme="meibo"] .aes-character-image-meibo{
    display:block;position:absolute;top:0;bottom:0;left:50%;width:300px;height:100%;
    background:url("../img/themes/aes-meibo-mascot-v2.png") center bottom/contain no-repeat;
    transform:translateX(-50%);filter:drop-shadow(9px 10px 0 rgba(7,26,57,.13))
}
html[data-theme="meibo"] .aes-character-speech-meibo{
    position:absolute;left:0;bottom:30px;z-index:3;display:block;width:max-content;max-width:150px;padding:10px 13px;
    border:2px solid #071a39;border-radius:13px 13px 3px;background:#fff;color:#087ecb;font-size:11px;font-weight:900;line-height:1.4;text-align:center;box-shadow:3px 4px 0 #ff8cc2
}
html[data-theme="meibo"] .theme-preview{border-color:#071a39;background:#edfaff}
html[data-theme="meibo"] .theme-preview span:nth-child(1){background:#071a39}
html[data-theme="meibo"] .theme-preview span:nth-child(2){background:#00c8ef}
html[data-theme="meibo"] .theme-preview span:nth-child(3){background:#ff4eaa}
html[data-theme="meibo"] :is(.alert-info,.aes-style-claim-alert){border:2px solid #087ecb!important;background:#e6faff!important;color:#063e64!important}
html[data-theme="meibo"] .alert-success{border:2px solid #16866f!important;background:#e7fbf5!important;color:#075b4b!important}
html[data-theme="meibo"] :is(.alert-error,.alert-danger){border:2px solid #d93287!important;background:#fff0f7!important;color:#7b164d!important}
html[data-theme="meibo"] .header-notification-panel{border:2px solid #071a39;border-radius:14px;background:#fff;color:#071a39;box-shadow:8px 9px 0 #8eeaff}
html[data-theme="meibo"] .header-notification-panel>header,
html[data-theme="meibo"] .header-notification-panel>footer{border-color:#b4d6e3}
html[data-theme="meibo"] .header-notification-item.is-unread{border-color:#00a8d3;background:#e8fbff}
html[data-theme="meibo"] .site-priority-alert{border:2px solid #071a39;border-radius:12px;background:#fff4d7;color:#624a00;box-shadow:5px 6px 0 #ffd748}
html[data-theme="meibo"] .site-priority-alert.is-info{background:#e8fbff;color:#06476b;box-shadow-color:#00c8ef}

@media(max-width:900px){
    html[data-theme="meibo"] .content{padding:22px 15px}
    html[data-theme="meibo"] .aes-portal-hero{grid-template-columns:minmax(0,1fr) 235px;padding:28px 24px}
}
@media(max-width:680px){
    html[data-theme="meibo"] .site-header{padding:0 12px}
    html[data-theme="meibo"] .header-left{min-width:0;gap:8px}
    html[data-theme="meibo"] .header-right{flex:0 0 auto;gap:8px}
    html[data-theme="meibo"] .site-header .logo{flex:0 0 auto;overflow:hidden;width:48px;font-size:0;line-height:1;white-space:nowrap}
    html[data-theme="meibo"] .site-header .logo:after{content:"AES";display:inline;color:#071a39;font-size:21px;letter-spacing:.05em}
    html[data-theme="meibo"] .aes-portal-hero{display:flex;min-height:auto;flex-direction:column;padding:25px 20px 0;border-radius:16px;box-shadow:6px 7px 0 #071a39}
    html[data-theme="meibo"] .aes-portal-copy h1{font-size:40px}
    html[data-theme="meibo"] .aes-pop-character{order:2;width:100%;min-height:420px}
    html[data-theme="meibo"] .aes-character-image-meibo{top:0;right:-12px;bottom:auto;left:auto;width:300px;height:410px;transform:none}
    html[data-theme="meibo"] .aes-character-speech-meibo{top:22px;bottom:auto;left:0;max-width:128px}
    html[data-theme="meibo"] .aes-portal-links{order:3;display:flex;width:100%;padding-bottom:24px}
}
@media(max-width:460px){
    html[data-theme="meibo"] .header-right>.fa-user{display:none}
    html[data-theme="meibo"] .locale-form select{min-width:96px;max-width:104px}
}
@media(prefers-reduced-motion:no-preference){
    html[data-theme="meibo"] .aes-character-image-meibo{animation:aes-meibo-float 3.2s ease-in-out infinite}
    @keyframes aes-meibo-float{0%,100%{margin-top:0}50%{margin-top:-6px}}
}

