/* 米乘贝 · 深蓝赤金. App-owned theme; native navigation shape is preserved. */
:root {
  color-scheme:dark;
  --paper:#071D33;--surface:#102E4D;--ink:#F7F8FA;--deep:#153C64;
  --muted:#B3C6DB;--line:#294561;--gold:#FFBB47;--gold-light:#293C4D;
  --blue:#1769E0;--primary:#DA453C;--primary-soft:#173D63;--primary-line:#3E6590;
  --up:#FF8278;--down:#7ED7BE;--radius:14px;
  --sp-up:#FF8278;--sp-up-bg:#3C2733;--sp-down:#7ED7BE;--sp-down-bg:#153E43;
  --sp-neutral:#BCD0E5;--sp-neutral-bg:#1B3A57;
}
body{background:var(--paper);color:var(--ink)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:#FFBB47}
.studio-header,.studio-footer{border-color:var(--line)}
.brand small,.eyebrow,.intro-copy,.preview-nav small,.page-number,.preview-arrow,.prototype-note p,.prototype-note small,.visitor-toggle,.device-caption,.studio-footer,.studio-badge,.reset-button{color:var(--muted)}
.studio-badge>span,.note-dot,.device-caption>span:first-child{background:var(--gold)}
.intro h1{font-weight:600;line-height:1.5}
.preview-nav>button.selected{background:#14385A;border-color:#325A82;color:#fff}
.preview-nav>button:hover{background:#12314F}
.device-area:before{display:none}
.device{background:#092541;border-color:#17354F;box-shadow:0 0 0 1px #35526E,0 22px 65px #00000044}
.system-bar,.wechat-bar,.tabbar,.home-indicator{background:#092541;color:var(--ink)}
.wechat-capsule,.native-left-capsule{border-color:#3B5771;background:#102E4D;color:#F7F8FA}
.wechat-capsule i,.native-left-capsule i{background:#48627D}
.capsule-circle{border-color:#F7F8FA}.capsule-circle:after{background:#F7F8FA}
.home-indicator:after{background:#E9EFF5}
.wechat-bar.is-home{height:72px;justify-content:space-between;padding:6px 22px 8px;gap:10px}
.wechat-bar.is-home #wechat-title{gap:9px;font-size:25px;font-weight:700;letter-spacing:1px;line-height:1.08}
.wechat-bar.is-home #wechat-title small{display:block;font-size:8px;letter-spacing:2.8px;font-weight:500;margin-top:5px}
.wechat-bar.is-home .home-brand-logo{width:43px;height:43px;object-fit:contain}

.app-scroll{background:#092541;color:var(--ink)}
.app-scroll.is-home{padding:0;scroll-padding-top:0}
.midnight-home{padding-bottom:22px}
.midnight-hero{padding:10px 22px 0;background:url('./assets/hero-background.webp') right top / cover no-repeat}
.midnight-hero h1{font-size:46px;line-height:1.18;font-weight:750;letter-spacing:.6px;margin:0;color:#FAFAF8}
.hero-rule{height:5px;width:47px;background:#1769E0;margin-top:12px}
.midnight-hero p{font-size:16px;line-height:1.55;letter-spacing:.2px;margin:12px 0 0;color:#F7F8FA;white-space:nowrap}
.midnight-primary{height:65px;min-height:65px;width:100%;display:flex;align-items:center;justify-content:center;gap:13px;background:#DA453C;color:#fff;border-radius:14px;margin:29px 0 0;font-size:27px;font-weight:700;letter-spacing:1px;padding:0 10px}
.midnight-primary:hover{background:#E44E43}.midnight-primary .icon{width:29px;height:29px;stroke-width:2.5}
.sp-home-overview{background:#102F4E;border:0;border-radius:12px;margin:28px 14px 0;padding:15px 12px 20px}
.midnight-market-header{display:flex;align-items:center;gap:12px;padding:0 6px}
.midnight-section-title{border-left:4px solid #FFBB47;margin:0;padding-left:9px;font-size:20px;font-weight:700;line-height:1.1;white-space:nowrap;color:#F7F8FA}
.midnight-snapshot{color:#FFBB47;font-size:12px;letter-spacing:0;min-height:30px;white-space:nowrap;padding:0;font-weight:500;text-align:left}
.sp-home-main{display:flex;justify-content:flex-start;align-items:center;gap:21px;margin:15px 10px 14px;height:61px}
.sp-home-main>strong{font-family:var(--font);font-variant-numeric:tabular-nums;font-size:51px;font-weight:600;font-style:normal;letter-spacing:-1px;color:#FAFAF8;line-height:1}
.sp-home-main>.sp-signal{border-left:1px solid #526C85;border-radius:0;padding:0 0 0 20px;margin:0;min-height:37px;min-width:49px;font-size:21px;line-height:1.3;text-align:center;font-weight:700}
.sp-home-main>.sp-signal:before{display:none}

.sp-home-metrics{padding-top:14px;border-color:#59718A;gap:0}
.sp-home-metrics>div{gap:7px;border-color:#59718A}
.sp-home-metrics small{font-size:13px;color:#E7EEF5;font-weight:400}
.sp-home-metrics strong{font-family:var(--font);font-variant-numeric:tabular-nums;font-size:26px;font-weight:600;font-style:normal;color:#FAFAF8;line-height:1.05}
.midnight-learning{margin:26px 22px 0}
.midnight-learning>.midnight-section-title{font-size:21px;min-height:28px;display:flex;align-items:center}
.midnight-section-title>button{font:inherit;padding:0;min-height:40px;text-align:left}
.midnight-continue{display:flex;align-items:center;gap:17px;width:100%;text-align:left;padding:0;margin-top:16px;min-height:68px}
.course-cover,.course-cover.gold,.course-cover.blue{background:#1769E0 url('./assets/course-cover.webp') center / cover no-repeat;color:#fff;box-shadow:none;border-radius:8px}
.course-cover:before,.learning-banner:after,.membership-card:before{display:none}
.course-cover>small,.course-cover>strong{text-shadow:0 1px 4px #06254F}
.midnight-continue .course-cover{height:66px;width:68px;min-width:68px;border-radius:8px;padding:0}
.midnight-continue .course-cover>*{display:none}
.midnight-continue-content{flex:1;min-width:0}
.midnight-continue h3{font-size:16px;line-height:1.5;letter-spacing:0;margin:0 0 14px;font-weight:650;color:#F7F8FA;white-space:nowrap}
.midnight-progress-row{display:flex;align-items:center;gap:14px}
.midnight-progress-row>.progress{flex:1;height:8px;border-radius:8px}
.midnight-progress-row>span{font-size:14px;white-space:nowrap;line-height:1.2;color:#F7F8FA}
.progress{background:#2D4C6B}.progress>span{background:#FFBB47}
.tabbar{border-top-color:#56708B;height:65px;padding:6px 8px 0}
.tabbar button{color:#F7F8FA;font-size:13px;font-weight:450;gap:4px}
.tabbar .icon{width:27px;height:27px;stroke-width:1.7}
.tabbar button.active{color:#FF7669;font-weight:650}.tabbar button.active .icon{stroke-width:2.2}.tabbar button.active:after{display:none}
.home-guest{margin:28px 14px 0}.home-guest h2{font-size:20px}.home-guest p{font-size:12px;color:var(--muted)}
/* The other main tabs use the same restrained blue / gold system. */
.page-heading small,.course-intro,.course-meta,.course-bottom,.profile-header small,.rights small,.menu-row>small,.menu-row>.icon:last-child,.page-end,.sheet-desc,.sheet-paragraph,.subtle,.progress-text{color:var(--muted)}
.page-heading{margin-bottom:16px}.page-heading h2{font-size:25px;font-weight:650}.page-heading>.icon{color:#FFBB47}
.learning-banner,.lesson-screen{background:#0D3157 url('./assets/hero-background.webp') right center / cover no-repeat;border:1px solid #2E557B;color:#fff}
.learning-banner small,.lesson-screen>small{color:#FFBB47}.learning-banner h3{font-weight:600;font-size:21px}.learning-banner p{color:#CAD7E7;font-size:11px}.learning-banner button{background:#FFBB47;color:#201B12;font-size:11px;font-weight:600;min-height:40px}
.learning-stats strong{color:#F7F8FA;font-size:28px}.learning-stats small{font-size:10px;color:var(--muted)}
.course-filter button{color:#B3C6DB}.course-filter button.active{background:#1B4268;color:#fff}
.course-item{border-color:#294561;background:#102E4D}.course-item .course-cover{width:76px;min-width:76px;height:103px}.course-item-content h3{font-size:14px;color:#fff}.course-item-content .course-category{color:#FFBB47;font-size:10px}.course-item-content .course-meta,.course-bottom{font-size:10px}.course-bottom>span:last-child{color:#FFCB78}
.profile-header .avatar{background:#143754;border-color:#2F5277;padding:9px}.profile-header .avatar img{width:100%;height:100%;object-fit:contain}
.membership-card{background:#113353 url('./assets/hero-background.webp') right center / cover no-repeat;border:1px solid #B98C4B;color:#FFDBA3}
.membership-card .card-top>span{color:#FFCA75}.membership-card .card-top>small{border-color:#947A53;color:#FFDBA3}.membership-card h3{color:#FFDBA3;font-weight:650}.membership-card p{color:#D0DAE4;font-size:10px}
.member-card-bottom{border-color:#57708A}.member-card-bottom>span{color:#E9E7DF}.member-card-bottom>button{background:#FFBB47;color:#251B11;font-weight:600;min-height:38px}
.rights button .icon{color:#FFBB47}.rights button{font-size:11px}.rights small{font-size:9px}
.menu-row{min-height:56px}.menu-row+.menu-row{border-color:#294561}.menu-row>.icon:first-child{color:#A7C8F1}.menu-row:hover{background:#163D60}
/* Secondary content keeps the existing native-style back / home controls. */
.sheet-layer.secondary-page,.secondary-navbar,.sheet-layer.secondary-page .sheet,.sheet-layer.secondary-page .home-indicator{background:#092541}
.sheet{background:#092541}.sheet-heading h2{color:#fff}.sheet h3{color:#fff}
.primary-button{background:#C93630;color:#fff;font-weight:600}.primary-button:hover{background:#DB453B}
.secondary-button,.sp-detail-save{background:#173957;border-color:#41617E;color:#F7F8FA}
.sheet-link,.lesson-toolbar button,.benefit-row>.icon,.lesson-row .icon,.rights .icon{color:#FFCB78}
.info-box,.ticket-record,.guest-lock,.lesson-row.current{background:#153958;color:#D1DDEB;border-color:#41617E}
.info-box.gold{background:#303B43;color:#FFE0A9}
.form-input,.sp-filter-grid select,.sp-sort-row select{background:#12314F;border-color:#47627C;color:#F7F8FA}
.form-input::placeholder,.sp-search input::placeholder{color:#A5BED5;opacity:1}.agreement{color:#C3D2E2}.agreement input{accent-color:#1769E0}
.group-option{background:#102E4D}.group-option.selected{background:#193E61;border-color:#6B9BCB}.group-option p{color:var(--muted)}
.radio-circle{border-color:#9DBDDC}.selected .radio-circle{border-color:#FFBB47}.selected .radio-circle:after{background:#FFBB47}
.certificate{background:#102E4D;border-color:#B59660;color:#FFE0A9}.certificate:before{border-color:#7B6B4F}.certificate .cert-en,.certificate>p,.certificate dt{color:#D4C3A4}.cert-separator{background:#7F6F51}.cert-status{background:#153E43;color:#9BE2CE}
.key-value>span:first-child,.order-top,.benefit-row p,.sheet-fineprint,.faq p,.ticket-record p,.lesson-toolbar>span,.lesson-row small{color:var(--muted)}
.error-message{color:#FF9E94}.success-circle{background:#153E43;color:#9BE2CE}.toast{background:#F3F6FA;color:#112A43;box-shadow:0 4px 20px #00000040}
/* Dense market data retains red-up / green-down semantics, with dark-safe contrast. */
.sp-heading small,.sp-heading p,.sp-snapshot-line,.sp-source-note,.sp-table-hint,.sp-result-heading,.sp-group-heading,.sp-filter-grid>label,.sp-sort-row>label,.sp-pagination>span,.sp-breadth-label,.sp-detail-summary small{color:var(--muted)}
.sp-heading h2{color:#F7F8FA;font-weight:650}.sp-heading>.icon,.sp-heading button{color:#FFBB47}
.sp-view-tabs{border-color:#355370}.sp-view-tabs>button{color:var(--muted)}.sp-view-tabs>button.active{color:#FFCB78}
.sp-overview-compact{background:#102E4D;border-color:#2F4F6D}.sp-overview-compact .sp-metric+.sp-metric{border-color:#2F4F6D}
.sp-metric small{color:#C2D2E1}.sp-metric strong{color:inherit}.sp-metric.count{background:#173957;color:#E8EFF7}
.sp-market-controls{border-color:#294561}.sp-market-controls>button{color:#C3D4E6}
.sp-type-tabs>button{color:#B3C6DB}.sp-type-tabs>button.active{background:#1A426A;color:#fff}
.sp-search,.sp-filter-toggle{background:#102E4D;border-color:#395A79;color:#D5E3F2}.sp-search input{color:#fff;background:transparent}
.sp-filter-toggle[aria-expanded=true]{background:#1B4268;border-color:#7397BC}.sp-active-filter:not(:empty){color:#E2C48C}
.sp-sort-row>button,.sp-pagination>button{background:#153856;border-color:#3B5B78;color:#F7F8FA}
.sp-quote-modes{background:#092541;border-color:#355370}.sp-quote-modes>button{color:#B3C6DB}.sp-quote-modes>button.active{color:#FFCB78}.sp-quote-modes>button.active:after{background:#FFBB47}
.sp-result-heading strong,.sp-group-heading strong{color:#F7F8FA}
.sp-quote-wrap,.sp-sticky-quote-head{border-color:#355370;background:#102E4D}
.sp-quote-labels>div,.sp-sticky-quote-head,.sp-quote-scroll thead th:first-child{background:#193B5B}
.sp-quote-labels,.sp-quote-table thead th{color:#C2D2E1;background:#193B5B}
.sp-quote-scroll th:first-child{background:#102E4D;box-shadow:1px 0 #355370}
.sp-quote-table tbody th small{color:#AFC3D8}.sp-quote-table th,.sp-quote-table td{border-color:#284662}.sp-quote-table tbody tr:hover{background:#183A59}
.sp-quote-price strong{color:#F7F8FA}.sp-quote-scroll{scrollbar-color:#5D7A96 #102E4D}
.sp-history-intro{background:#143654}.sp-history-intro p,.sp-history-note{color:#B3C6DB}.sp-history-intro>span{background:#214765;color:#E4EFF9}
.sp-matrix-wrap{background:#102E4D;border-color:#355370;scrollbar-color:#5D7A96 #102E4D}.sp-matrix th:first-child{background:#102E4D;border-color:#355370}.sp-matrix thead th,.sp-matrix thead th:first-child{background:#193B5B;color:#D7E4F2}.sp-matrix th,.sp-matrix td{border-color:#294561}.sp-matrix th>button small,.sp-matrix thead th>small{color:#B3C6DB}
.sp-detail-summary{background:#102E4D;border-color:#355370}.sp-detail-summary strong em{color:#B3C6DB}.sp-detail-save.selected{background:#3B3B36;border-color:#B59660;color:#FFD385}.sp-detail-save.selected .icon{fill:currentColor}
.sp-score-history strong{color:#E7EFF7}.sp-score-history small{color:#B3C6DB}.sp-history-bar{background:#183D5F}.sp-history-bar.positive{color:#FF8278}.sp-history-bar.negative{color:#7ED7BE}.sp-history-bar.neutral{color:#9BB6D0}
.sp-sector-category>h4{color:#D6E2EE}.sp-saved-mark{color:#FFBB47}
@media(max-width:360px){
  .wechat-bar.is-home{padding-left:16px;padding-right:16px}.wechat-bar.is-home #wechat-title{font-size:23px}.wechat-bar.is-home .home-brand-logo{width:39px;height:39px}
  .midnight-hero{padding-left:18px;padding-right:18px}.midnight-hero h1{font-size:41px}.midnight-hero p{font-size:14px}.midnight-primary{font-size:24px}
  .sp-home-overview{margin-left:12px;margin-right:12px;padding-left:10px;padding-right:10px}.midnight-market-header{gap:9px;padding-left:3px;padding-right:3px}.midnight-section-title{font-size:18px}.midnight-snapshot{font-size:10px}.sp-home-main>strong{font-size:47px}.sp-home-metrics strong{font-size:24px}.sp-home-metrics small{font-size:12px}
  .midnight-learning{margin-left:18px;margin-right:18px}.midnight-continue{gap:13px}.midnight-continue .course-cover{width:60px;min-width:60px;height:60px}.midnight-continue h3{font-size:15px}.midnight-progress-row{gap:10px}.midnight-progress-row>span{font-size:12px}
}
@media(max-width:480px),(max-height:500px) and (max-width:1000px){html,body{background:#092541}}
@media(min-width:481px) and (min-height:501px){.midnight-hero h1{font-size:44px}.midnight-hero p{font-size:15px}.midnight-primary{font-size:25px}.midnight-continue h3{font-size:16px}}

/* Preserve reflow when a narrower font or enlarged system type is used. */
.midnight-hero p,.midnight-continue h3{white-space:normal}
.midnight-continue h3{overflow-wrap:break-word}
.sp-home-main>.sp-signal{border:0;min-width:35px;min-height:31px;padding:2px 7px;border-radius:6px;position:relative;margin-left:12px;font-size:20px}
.sp-home-main>.sp-signal:before{display:block;content:"";position:absolute;left:-21px;top:-2px;width:1px;height:37px;background:#59718A}

.midnight-snapshot{position:relative;min-height:30px}.midnight-snapshot:after{content:"";position:absolute;inset:-7px 0}

/* Home metrics use exactly the panel semantic tokens and thresholds. */
.sp-home-main>strong.positive,.sp-home-metrics strong.positive{color:var(--sp-up)}
.sp-home-main>strong.negative,.sp-home-metrics strong.negative{color:var(--sp-down)}
.sp-home-main>strong.neutral,.sp-home-metrics strong.neutral{color:var(--sp-neutral)}
