/* Shared HanBridge surfaces. The homepage keeps its own composition in home.css. */
/* The usable width can be below 320px when a vertical scrollbar is present. */
body{min-width:0}
body:not(.home-mode) .topbar-inner{min-height:76px;padding-top:10px;padding-bottom:10px}
body:not(.home-mode) .topbar{background:#f8f7f4f5;border-bottom-color:#e8e3ea}
body:not(.home-mode) .breadcrumb{font-size:11px;color:#7d748b}
body:not(.home-mode) .breadcrumb>a{color:#7d748b}
body:not(.home-mode) .breadcrumb strong{color:#54516d;font-weight:500}
body:not(.home-mode) .top-actions>.level-pill{border-radius:10px;background:#efebf5;border-color:#e6deee;color:#7d748b}
body:not(.home-mode) .account-popover{border-radius:18px;border-color:#e6dfec;background:#fffdfb;box-shadow:0 12px 35px #5e4d7412}
.main:not(.page-home){padding-top:32px;padding-bottom:24px;color:#7d748b;min-height:calc(100dvh - 126px);min-width:0}
.main:not(.page-home)>*{min-width:0;max-width:100%}
.main:not(.page-home) :is(.page-head,.lesson-title)>div{min-width:0}
.main:not(.page-home) .page-head{align-items:center;gap:18px;margin-bottom:25px}
.main:not(.page-home) .page-head h1{font-size:29px;line-height:1.45;letter-spacing:.015em;color:#54516d}
.main:not(.page-home) .page-heading{display:flex;align-items:center;gap:17px;min-width:0}
.main:not(.page-home) .page-heading>div{min-width:0}
.main:not(.page-home) .page-illustration{display:block;width:70px;height:66px;object-fit:contain;flex-shrink:0}
.main:not(.page-home) .page-head p{font-size:13px;line-height:1.8;color:#7d748b;margin-top:7px;overflow-wrap:anywhere}
.main:not(.page-home) .eyebrow{font-size:10px;letter-spacing:.08em;color:#7d748b}
.main:not(.page-home) .section-heading{align-items:center;gap:15px;margin:29px 0 17px}
.main:not(.page-home) .section-heading h2{font-size:19px;letter-spacing:.01em;color:#54516d}
.main:not(.page-home) .section-heading h2 small{font-size:10px;color:#54516d;letter-spacing:.035em}
.main:not(.page-home) .section-heading p{font-size:13px;color:#7d748b}
.main:not(.page-home) .btn{font-size:13px;border-radius:12px;padding:11px 17px;min-height:42px}
.main:not(.page-home) .btn.small{font-size:12px;min-height:36px;padding:8px 12px;border-radius:9px}
.main:not(.page-home) .btn.secondary{background:#faf8fc;border-color:#e6deef;color:#8a74a1}
.main:not(.page-home) .btn.secondary:hover{background:#efebf6;border-color:#d8cce6}
.main:not(.page-home) .btn.soft{background:#eeebf8;color:#8473ad}
.main:not(.page-home) .link-btn{font-size:12px;color:#7d748b}
.main:not(.page-home) .pill{font-size:11px;border-radius:8px;border-color:#e7e0ee;color:#a08dad;background:#fbf9fc}
.main:not(.page-home) .pill:is(.accent,.blue){background:#eeeaf7;border-color:#e0d7ec;color:#8c78b0}
.main:not(.page-home) .muted{color:#7d748b}
.main:not(.page-home) .en{font-size:12px;line-height:1.7;color:#7d748b}
body.english .main:not(.page-home) .en{font-size:13px;color:#7d748b}
.main:not(.page-home) :is(input,textarea,select){border-color:#e5ddeb;border-radius:12px;padding:12px 13px;color:#514b68;background:#fffdfd;font-size:13px;line-height:1.7}
.main:not(.page-home) :is(input,textarea)::placeholder{color:#7d748b}
.main:not(.page-home) :is(input,textarea,select):focus{border-color:#aba0d2}
.main:not(.page-home) label{font-size:13px;color:#7d748b;line-height:1.6;gap:7px}
.main:not(.page-home) .footer{font-size:11px;color:#7d748b;border-top-color:#e8e1eb;margin-top:26px;padding-top:22px}
.main:not(.page-home) .footer button{font-size:11px;color:#7d748b}

/* Cultural cards and saved lessons use the same rounded, quiet frame. */
.main:not(.page-home) .card-grid{gap:20px}
.main:not(.page-home) .course-card{border-color:#e8dfed;border-radius:22px;background:#fffdfd;box-shadow:none;transition:transform .18s,box-shadow .18s}
.main:not(.page-home) .course-card:hover{transform:translateY(-3px);box-shadow:0 10px 25px #7357890b}
.main:not(.page-home) .card-art{height:175px;background:#eeeaf7}
.main:not(.page-home) .card-art .pill{font-size:10px;border:0;background:#ffffffeb;color:#9a80ae;max-width:calc(100% - 24px);top:12px;left:12px;padding:6px 8px;line-height:1.6}
.main:not(.page-home) .course-card-body{padding:21px 22px;gap:0}
.main:not(.page-home) .card-kicker{font-size:11px;color:#7d748b;letter-spacing:.025em;margin-bottom:7px}
.main:not(.page-home) .course-card h3{font-size:18px;line-height:1.6;font-weight:600;letter-spacing:.01em;color:#54516d;overflow-wrap:anywhere}
.main:not(.page-home) .course-card p{font-size:12px;line-height:1.8;color:#7d748b;margin-top:7px;margin-bottom:16px;overflow-wrap:anywhere}
.main:not(.page-home) .card-footer{border-top-color:#eee5f0;font-size:11px;gap:8px;padding-top:12px;color:#7d748b}
.main:not(.page-home) .card-footer>.link-btn{font-size:12px}
.main:not(.page-home) .round-arrow{width:31px;height:31px;border-color:#e7ddee;background:#f6f0fa;color:#aa8ac1}
.main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .course-card{border-color:#ffffff99;background:#eeeaf7}
.main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .course-card:nth-child(3n+2){background:#f4eedf}
.main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .course-card:nth-child(3n){background:#e8edf6}
.main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .course-card:nth-child(6n+4){background:#f5e9e7}
.main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .card-footer{border-top-color:#ffffffa3}
.main:not(.page-home) .filter-bar{gap:12px;margin-bottom:20px}
.main:not(.page-home) .filter-bar select{width:190px}
.main:not(.page-home) .discovery-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.main:not(.page-home) .topic-tile{display:grid;grid-template-columns:52px minmax(0,1fr) 15px;grid-template-rows:auto auto;align-items:center;column-gap:10px;row-gap:4px;min-width:0;padding:14px 13px;border:1px solid #ffffff99;border-radius:18px;background:#eeeaf7;text-align:left;transition:transform .18s,box-shadow .18s}
.main:not(.page-home) .topic-tile:nth-child(5n+2){background:#f4eedf}
.main:not(.page-home) .topic-tile:nth-child(5n+3){background:#e8edf6}
.main:not(.page-home) .topic-tile:nth-child(5n+4){background:#f5e9e7}
.main:not(.page-home) .topic-tile:nth-child(5n){background:#eae9f3}
.main:not(.page-home) .topic-tile:hover{transform:translateY(-2px);box-shadow:0 8px 18px #7357890b}
.main:not(.page-home) .topic-tile>img{grid-column:1;grid-row:1/3;display:block;width:52px;height:52px;object-fit:cover;border-radius:11px}
.main:not(.page-home) .topic-tile>strong{grid-column:2;grid-row:1;align-self:end;font-size:14px;line-height:1.5;font-weight:550;letter-spacing:.01em;color:#54516d;overflow-wrap:anywhere}
.main:not(.page-home) .topic-tile>span{grid-column:2;grid-row:2;align-self:start;font-size:11px;line-height:1.5;color:#7d748b;overflow-wrap:anywhere}
.main:not(.page-home) .topic-tile>.icon{grid-column:3;grid-row:1/3;width:15px;height:15px;color:#b49ac2}
.main:not(.page-home) .empty{background:#efebf7;border:1px solid #e9e0f0;border-radius:24px;padding:40px 25px}
.main:not(.page-home) .empty>svg{width:150px;max-height:120px;margin-bottom:15px}
.main:not(.page-home) .empty h3{font-size:20px;line-height:1.6;color:#54516d;letter-spacing:.01em}
.main:not(.page-home) .empty p{font-size:13px;line-height:1.9;color:#7d748b;margin:10px auto 22px;max-width:420px}
.main:not(.page-home) .error-screen{background:#faf0f3;border-color:#ecd6e0}
.main:not(.page-home) .error-screen h3{color:#b7869c}

/* Pastel summaries, white content panels and clear data rows. */
.main:not(.page-home) .panel{background:#fffdfd;border-color:#e8dfed;border-radius:22px;padding:26px;margin-bottom:21px;box-shadow:none}
.main:not(.page-home) .panel>h2{font-size:20px;line-height:1.6;color:#54516d;letter-spacing:.01em;margin-bottom:17px}
.main:not(.page-home) .panel>h3{font-size:17px;line-height:1.7;color:#54516d;letter-spacing:.01em}
.main:not(.page-home) .panel>p{font-size:13px;line-height:1.9;color:#7d748b;overflow-wrap:anywhere}
.main:not(.page-home) .panel>p.muted{font-size:13px}
.main:not(.page-home) .stats-grid{gap:16px;margin-bottom:24px}
.main:not(.page-home) .stat{border-color:#ffffffb3;border-radius:21px;padding:24px;background:#eeeaf7}
.main:not(.page-home) .stat:nth-child(4n+2){background:#f4eedf}
.main:not(.page-home) .stat:nth-child(4n+3){background:#e8edf6}
.main:not(.page-home) .stat:nth-child(4n){background:#f5e9e7}
.main:not(.page-home) .stat>span{font-size:12px;line-height:1.8;color:#7d748b;overflow-wrap:anywhere}
.main:not(.page-home) .stat strong{font-size:34px;font-weight:550;line-height:1.4;margin-top:10px;color:#54516d;font-variant-numeric:tabular-nums}
.main:not(.page-home) .settings-grid{gap:21px}
.main:not(.page-home) .list-row{gap:16px;padding:17px 0;border-bottom-color:#eee5f0;flex-wrap:wrap;min-width:0}
.main:not(.page-home) .list-row h3{font-size:14px;line-height:1.7;color:#54516d;overflow-wrap:anywhere}
.main:not(.page-home) .list-row p{font-size:12px;line-height:1.8;color:#7d748b;overflow-wrap:anywhere}
.main:not(.page-home) .list-row>div{min-width:0;max-width:100%}
.main:not(.page-home) .list-row .btn{max-width:100%;white-space:normal}
.main:not(.page-home) :is(.empty-actions,.notice-actions,.chapter-actions){display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.main:not(.page-home) .empty-actions{justify-content:center}
.main:not(.page-home) .notice-actions{margin-top:10px}
.main:not(.page-home) .chapter-actions{margin-left:auto;justify-content:flex-end}
.main:not(.page-home) details.panel>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:28px;font-size:16px;line-height:1.7;font-weight:550;color:#7d748b;list-style:none}
.main:not(.page-home) details.panel>summary::-webkit-details-marker{display:none}
.main:not(.page-home) details.panel>summary:after{content:"⌄";font-size:18px;line-height:1;color:#7d748b;flex-shrink:0;transition:transform .15s}
.main:not(.page-home) details.panel[open]>summary{margin-bottom:15px}
.main:not(.page-home) details.panel[open]>summary:after{transform:rotate(180deg)}
.main:not(.page-home) .notice{border-radius:13px;background:#f2edf8;color:#7d748b;font-size:13px;line-height:1.9;padding:14px 17px;overflow-wrap:anywhere}
.main:not(.page-home) .progress-bar{height:5px;background:#eee7f5}
.main:not(.page-home) .progress-bar i{background:#a392c7}
.main:not(.page-home) .inline-form{gap:10px;margin:15px 0}
.main:not(.page-home) .inline-form .btn{min-height:41px;flex-shrink:0}
.main:not(.page-home) .table-scroll{border:1px solid #eee5f0;border-radius:14px;max-width:100%;overflow:auto}
.main:not(.page-home) table{font-size:13px;width:100%;table-layout:auto}
.main:not(.page-home) th{font-size:11px;color:#7d748b;background:#f5f0fa;padding:13px 14px;white-space:normal}
.main:not(.page-home) td{padding:15px 14px;color:#7d748b;border-bottom-color:#eee5f0;overflow-wrap:anywhere;min-width:0}
.main:not(.page-home) td details{font-size:12px;line-height:1.8;max-width:100%}
.main:not(.page-home) td .btn{font-size:11px;padding:7px 9px;min-height:33px}
.main:not(.page-home) .balance-card{background:#eeeaf7;border:1px solid #ffffff99;border-radius:24px;padding:29px;color:#7d748b;margin-bottom:23px}
.main:not(.page-home) .balance-card .eyebrow{color:#7d748b}
.main:not(.page-home) .balance-card strong{font-size:44px;line-height:1.4;margin:10px 0 4px;color:#54516d}
.main:not(.page-home) .balance-card small{font-size:12px;color:#7d748b}
.main:not(.page-home) .balance-card>.icon{width:53px;height:53px;color:#c0afdb}
.main:not(.page-home) .balance-art{display:block;width:112px;height:110px;object-fit:contain;flex-shrink:0}
.main:not(.page-home) .package .price{font-size:32px;color:#54516d;line-height:1.4;margin:19px 0 6px}
.main:not(.page-home) .package .token-count{font-size:13px;color:#7d748b}
.main:not(.page-home) .package ul{font-size:12px;line-height:2.2;color:#7d748b;margin:16px 0 22px}

/* Learning remains content first: generous Chinese text and readable translations. */
.main:not(.page-home) .lesson-title{align-items:center;gap:20px;margin-bottom:22px}
.main:not(.page-home) .lesson-title h1{font-size:28px;line-height:1.5;color:#54516d;letter-spacing:.01em;overflow-wrap:anywhere}
.main:not(.page-home) .lesson-title .en{font-size:13px;color:#7d748b;line-height:1.8}
.main:not(.page-home) .level-switch{padding:5px;gap:3px;background:#efebf6;border-radius:13px;max-width:100%;min-width:0}
.main:not(.page-home) .level-switch button{padding:8px 10px;font-size:11px;color:#7d748b;border-radius:9px;min-width:0}
.main:not(.page-home) .level-switch button.active{color:#7d748b;background:#fffdfd;box-shadow:0 2px 8px #82609808}
.main:not(.page-home) .tabs{gap:4px;padding:5px;background:#efeaf7;border-radius:16px;margin-bottom:15px}
.main:not(.page-home) .tab{font-size:13px;line-height:1.5;color:#7d748b;padding:11px 6px;border-radius:11px;min-width:0}
.main:not(.page-home) .tab.active{background:#fffdfd;color:#7d748b;box-shadow:0 2px 8px #82609808}
.main:not(.page-home) .tab .en{font-size:11px;color:inherit}
.main:not(.page-home) .lesson-tools{border-color:#e7dcee;border-radius:15px;background:#fcf9fd;margin-bottom:21px}
.main:not(.page-home) .lesson-tools>summary{font-size:13px;color:#7d748b;padding:14px 18px;align-items:center}
.main:not(.page-home) .lesson-tools>summary>span{font-size:11px;color:#7d748b}
.main:not(.page-home) .lesson-tools-content{border-top-color:#e7dcee;padding:21px;gap:23px;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.main:not(.page-home) .lesson-tools .panel{border:0;border-radius:0;background:transparent;padding:0;margin:0;gap:13px;min-width:0}
.main:not(.page-home) .lesson-tools h3{font-size:15px;color:#54516d;margin-bottom:2px}
.main:not(.page-home) .lesson-tools label{font-size:12px;min-width:0}
.main:not(.page-home) .lesson-tools select{font-size:12px;padding:10px}
.main:not(.page-home) .lesson-tools .btn{font-size:12px;min-height:39px;padding:10px 8px;white-space:normal}
.main:not(.page-home) .policy-note{font-size:12px!important;color:#7d748b;line-height:1.8}
.main:not(.page-home) .lesson-body{padding:32px 39px}
.main:not(.page-home) .lesson-body h2{font-size:25px;line-height:1.6;color:#54516d}
.main:not(.page-home) .zh-text{font-size:21px;line-height:2.35;letter-spacing:.035em;color:#514b68}
.main:not(.page-home) .translation{font-size:14px;line-height:1.95;color:#7d748b;overflow-wrap:anywhere}
body.english .main:not(.page-home) .translation{font-size:15px;color:#7d748b}
.main:not(.page-home) .article-meta .pill{font-size:11px}
.main:not(.page-home) .article-figure{border-radius:18px;border-color:#e7dcee;margin-top:23px;margin-bottom:28px}
.main:not(.page-home) .article-figure figcaption{background:#faf6fd;color:#7d748b;font-size:11px;line-height:1.8}
.main:not(.page-home) .article-figure figcaption span{font-size:10px;color:#7d748b}
.main:not(.page-home) .source-links{font-size:11px;color:#7d748b;border-top-color:#eee5f3;overflow-wrap:anywhere}
.main:not(.page-home) .source-links a{color:#7d748b;overflow-wrap:anywhere}
.main:not(.page-home) .chapter-end{border-top-color:#eee5f3;margin-top:24px;padding-top:20px}
.main:not(.page-home) .chapter-end .en{font-size:11px}
.main:not(.page-home) .vocab-grid{gap:16px}
.main:not(.page-home) .vocab-card{padding:22px;border-color:#e8ddec;border-radius:20px;background:#fffdfd}
.main:not(.page-home) .vocab-title strong{font-size:27px;color:#54516d;overflow-wrap:anywhere;max-width:100%}
.main:not(.page-home) .vocab-title .pill{font-size:10px;padding:5px 7px}
.main:not(.page-home) .vocab-card p{font-size:13px;line-height:1.9;color:#7d748b}
.main:not(.page-home) .vocab-card .pinyin-line{font-size:13px;line-height:1.8}
.main:not(.page-home) .vocab-actions{border-top-color:#eee5f3;gap:8px;margin-top:17px;padding-top:12px}
.main:not(.page-home) .vocab-actions button{font-size:12px;min-height:32px;color:#7d748b}
.main:not(.page-home) .vocab-example{color:#7d748b}
.main:not(.page-home) .grammar-formula{border-radius:15px;background:#efeaf8;color:#7d748b;padding:20px;font-size:23px;overflow-wrap:anywhere}
.main:not(.page-home) .english-tip{background:#faf6fd;border-left-color:#ccb4df;border-radius:0 13px 13px 0;font-size:13px;line-height:1.9;color:#7d748b}
.main:not(.page-home) .english-tip strong{font-size:10px;line-height:1.6;color:#54516d}
.main:not(.page-home) .scaffolds{border-color:#e8ddf0;border-radius:13px;background:#fcf9fe;padding:14px 16px;font-size:13px;line-height:1.9;overflow-wrap:anywhere}
.main:not(.page-home) .scaffolds summary{color:#7d748b}
.main:not(.page-home) .writing-requirements li{font-size:13px;line-height:1.9;color:#7d748b}
.main:not(.page-home) .writing-meter{font-size:11px;line-height:1.8;color:#7d748b}
.main:not(.page-home) #writing-draft{font-size:16px;line-height:2;min-height:250px}
.main:not(.page-home) .question{border-color:#e8ddec;border-radius:20px;background:#fffdfd;padding:24px}
.main:not(.page-home) .question h3{font-size:15px;line-height:1.9;color:#54516d;overflow-wrap:anywhere}
.main:not(.page-home) .question-num{background:#eee7f8;color:#b293cb;border-radius:10px}
.main:not(.page-home) .option{font-size:13px;border-color:#e8ddf0;border-radius:11px;background:#fcf9ff;color:#7d748b;padding:11px 15px;overflow-wrap:anywhere;max-width:100%}
.main:not(.page-home) .option:is(.selected,.correct){border-color:#c7b0dc;background:#f0e8fb;color:#514b68}
.main:not(.page-home) .feedback{font-size:13px;background:#f1eafa;color:#7d748b;border-radius:13px;overflow-wrap:anywhere}
.main:not(.page-home) .feedback.wrong{background:#faf0f4;color:#ba8d9f}
.main:not(.page-home) .feedback small{font-size:12px}
.main:not(.page-home) .match-item{font-size:13px;line-height:1.8;border-radius:12px;min-width:0;padding:11px 13px}
.main:not(.page-home) .match-save{font-size:11px;color:#7d748b}
.main:not(.page-home) .saved-response{font-size:14px;color:#7d748b;line-height:1.95}

/* Dialogs share the page's shapes without affecting the homepage underneath. */
.overlay{background:#4b3d603e;backdrop-filter:blur(5px)}
.modal{border-color:#e9deef;border-radius:26px;background:#fffdfb;padding:29px;box-shadow:0 20px 70px #6241751c;scrollbar-width:thin;scrollbar-color:#d9c9e3 transparent}
.modal-head{gap:15px;margin-bottom:22px}
.modal-head h2{font-size:23px;color:#54516d;line-height:1.5;letter-spacing:.01em;overflow-wrap:anywhere}
.modal-head>div{min-width:0}
.modal-head .en{font-size:12px;color:#7d748b;line-height:1.7}
.modal .close-modal{width:32px;height:32px;background:#f4ecfb;border-radius:10px;color:#bea0d2}
.modal .close-modal:hover{background:#ebdef7}
.modal :is(input,select,textarea){font-size:13px;color:#514b68;border-color:#e9daf4;background:#fffdfd;padding:11px 13px;border-radius:11px;line-height:1.7}
.modal :is(input,textarea)::placeholder{color:#7d748b}
.modal :is(input,select,textarea):focus{border-color:#c4a6df}
.modal label{font-size:13px;color:#7d748b;gap:7px;line-height:1.7}
.modal .btn{font-size:13px;min-height:41px;padding:10px 15px;border-radius:11px}
.modal .btn.small{font-size:12px;min-height:35px}
.modal .btn.secondary{background:#fbf6ff;border-color:#e9d9f5;color:#c5a1dd}
.modal>p,.modal .panel>p{font-size:13px;line-height:1.95;color:#7d748b;overflow-wrap:anywhere}
.modal .en{font-size:12px;color:#7d748b}
body.english .modal .en{font-size:13px;color:#7d748b}
.modal .policy-note{font-size:12px!important;line-height:1.9;color:#7d748b}
.modal-error{font-size:12px;color:#b67990;overflow-wrap:anywhere}
.modal .auth-switch{font-size:12px;color:#7d748b;line-height:1.8}
.modal .explain-card{font-size:13px;line-height:1.9;border-color:#e7d5f4;border-radius:14px;background:#f7effd;color:#7d748b}
.modal .explain-card p{font-size:12px;color:#7d748b}
.modal .level-option{border-color:#e6d3f5;border-radius:12px;font-size:12px;padding:13px 5px;color:#7d748b;min-width:0}
.modal .level-option small{font-size:10px;line-height:1.5;color:#7d748b;overflow-wrap:anywhere}
.modal .level-option.active{border-color:#c3a0dc;background:#efe1fb;color:#7d748b}
.modal .quality-grid>div{border-radius:13px;font-size:12px;background:#f3eafa;color:#7d748b;overflow-wrap:anywhere}
.modal .panel{border-color:#e9ddf2;border-radius:18px;padding:21px;background:#fffdfd}
.modal .panel>h3{font-size:17px;color:#54516d;line-height:1.7}
.modal .notice{border-radius:12px;padding:13px 15px;font-size:13px;line-height:1.85;background:#f4ecfb;color:#7d748b;overflow-wrap:anywhere}
.modal .dimension>div:first-child,.modal .dimension strong{font-size:13px}
.modal .dimension p{font-size:13px;line-height:1.9;color:#7d748b}
.modal .dimension small{font-size:11px}
.modal .feedback{font-size:13px;line-height:1.85;border-radius:12px;overflow-wrap:anywhere}
.modal .feedback small{font-size:12px}
.modal .learner-section>h3{font-size:15px;line-height:1.7;color:#54516d}
.modal .learner-section>.muted{font-size:13px;color:#7d748b}
.modal .learner-summary{font-size:12px;gap:10px;color:#7d748b;border-bottom-color:#ebdbf5}
.modal .learner-report{border-color:#e7d5f2;border-radius:14px}
.modal .learner-report>summary{background:#f7effc}
.modal .learner-report strong{font-size:13px;color:#54516d}
.modal .learner-report small{font-size:11px;color:#7d748b}
.modal .learner-report-body>.panel{border:0;border-radius:0;padding:0;background:transparent;margin:0}
.modal .learner-error{font-size:13px;border-bottom-color:#ebdbf5;color:#7d748b}
.modal .correction-summary li{font-size:12px;color:#7d748b}
.chat-drawer{border-color:#e3d2ee;border-radius:22px;box-shadow:0 15px 45px #78519a17;background:#fffdfd}
.chat-header{border-bottom-color:#eadbf3}
.chat-header strong{font-size:15px;color:#54516d}
.chat-header .en{font-size:11px;color:#7d748b}
.chat-message{font-size:13px;line-height:1.85;border-radius:14px;color:#7d748b;background:#f7f0fc}
.chat-message.user{background:#eee5f8}
.chat-form{border-top-color:#eadbf3}
.chat-form input{font-size:13px;min-width:0}
.toast{font-size:12px;line-height:1.8;border-radius:14px;border-color:#dfccec;background:#fffdfd;box-shadow:0 8px 25px #7c529c14;overflow-wrap:anywhere}

/* Keep the softness in the surfaces; text carries a clear, readable hierarchy. */
.main:not(.page-home) :is(.panel>h2,.panel>h3,.course-card h3,.lesson-title h1,.lesson-body h2,.empty h3,.vocab-title strong,.question h3){color:#54516d}
.main:not(.page-home) .course-card h3{color:#62566f}
.main:not(.page-home) #lesson-content{scroll-margin-top:140px}
.main:not(.page-home) :is(.panel>p,.course-card p,.list-row p,.vocab-card p,.writing-requirements li,.option,.feedback,.saved-response){color:#7d748b}
.main:not(.page-home) :is(.stat>span,.card-footer,.source-links,.source-links a,.writing-meter,.policy-note,.map-caption,.map-building small){color:#7d748b}
.main:not(.page-home) .pill,.main:not(.page-home) .card-art .pill{color:#7d748b}
.main:not(.page-home) :is(.stat strong,.balance-card strong,.package .price){color:#54516d}
.main:not(.page-home) :is(.translation,.english-tip,.scaffolds summary){color:#7d748b}
body.english .main:not(.page-home) .translation{color:#7d748b}
.main:not(.page-home) .notice{color:#7d748b}
.main:not(.page-home) .option.wrong,.main:not(.page-home) .feedback.wrong{color:#b27890}
.main:not(.page-home) td{color:#7d748b}
.modal :is(.modal-head h2,.learner-report strong){color:#54516d}
.modal :is(label,.explain-card,.explain-card p,.policy-note,.learner-report small,.learner-error,.correction-summary li,.learner-summary){color:#7d748b}
.modal :is(input,select,textarea){color:#514b68}
.modal>p,.modal .panel>p{color:#7d748b}
.chat-header strong{color:#54516d}
.chat-message{color:#7d748b}

@media(max-width:1050px){
 .main:not(.page-home){padding:28px 30px 21px}
 .main:not(.page-home) .card-grid{gap:17px}
 .main:not(.page-home) .course-card-body{padding:19px}
 .main:not(.page-home) .card-art{height:160px}
 .main:not(.page-home) .lesson-title{display:block}
 .main:not(.page-home) .level-switch{margin-top:16px}
 .main:not(.page-home) .lesson-tools-content{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:19px}
 .main:not(.page-home) .panel{padding:23px}
 .main:not(.page-home) .lesson-body{padding:29px}
 .main:not(.page-home) .stat{padding:21px}
 .main:not(.page-home) .discovery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:800px){
 body:not(.home-mode) .topbar-inner{min-height:70px;padding-top:9px;padding-bottom:9px}
 .main:not(.page-home){padding:25px 24px 20px}
 .main:not(.page-home) .page-head h1{font-size:27px}
 .main:not(.page-home) .card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .main:not(.page-home) .course-card h3{font-size:17px}
 .main:not(.page-home) .settings-grid{grid-template-columns:minmax(0,1fr)}
 .main:not(.page-home) .lesson-tools-content{grid-template-columns:minmax(0,1fr)}
 .main:not(.page-home) .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .main:not(.page-home) .stat>span{font-size:12px}
 .main:not(.page-home) .stat strong{font-size:32px}
 body.english .main:not(.page-home) .tab .en{display:block;font-size:10px;line-height:1.4}
 body.english .main:not(.page-home) .tab{flex-direction:column;gap:2px}
}
@media(max-width:600px){
 body:not(.home-mode) .topbar-inner{min-height:63px;padding:9px 17px;gap:10px}
 body:not(.home-mode) .breadcrumb{font-size:10px;padding-top:3px;gap:8px}
 body:not(.home-mode) .top-actions>.level-pill{font-size:10px}
 .main:not(.page-home){padding:23px 17px 18px;min-height:calc(100dvh - 146px)}
 .main:not(.page-home) .page-head{display:flex;align-items:flex-start;flex-wrap:wrap;gap:13px;margin-bottom:21px}
 .main:not(.page-home) .page-head h1{font-size:25px;line-height:1.5}
 .main:not(.page-home) .page-head p{font-size:12px;line-height:1.85;margin-top:5px}
 .main:not(.page-home) .page-head>.btn{margin-top:0}
 .main:not(.page-home) .page-heading{gap:12px}
 .main:not(.page-home) .page-illustration{width:56px;height:53px}
 .main:not(.page-home) .section-heading{margin:24px 0 15px;flex-wrap:wrap;gap:10px}
 .main:not(.page-home) .section-heading h2{font-size:18px}
 .main:not(.page-home) .section-heading p{font-size:12px}
 .main:not(.page-home) .btn{font-size:12px;min-height:40px;padding:10px 13px;border-radius:10px}
 .main:not(.page-home) .btn.small{font-size:12px;min-height:35px;padding:8px 10px}
 .main:not(.page-home) .pill{font-size:12px;padding:6px 8px}
 .main:not(.page-home) label{font-size:12px}
 .main:not(.page-home) :is(input,textarea,select){font-size:13px;padding:11px 12px}
 .main:not(.page-home) .card-grid{grid-template-columns:minmax(0,1fr);gap:15px}
 .main:not(.page-home) .course-card{display:grid;grid-template-columns:108px minmax(0,1fr);border-radius:18px}
 .main:not(.page-home) .card-art{height:100%;min-height:178px}
 .main:not(.page-home) .card-art .pill{font-size:12px;padding:5px 6px;top:9px;left:7px;max-width:calc(100% - 14px)}
 .main:not(.page-home) .course-card-body{padding:16px}
 .main:not(.page-home) .course-card h3{font-size:16px;line-height:1.6}
 .main:not(.page-home) .course-card p{font-size:12px;line-height:1.75;margin-bottom:12px}
 .main:not(.page-home) .card-kicker{font-size:12px;margin-bottom:5px}
 .main:not(.page-home) .card-footer{font-size:12px;gap:7px;padding-top:10px}
 .main:not(.page-home) .card-footer>.link-btn{font-size:12px}
 .main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .course-card{display:flex;border-radius:18px}
 .main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .card-art{height:115px;min-height:115px}
 .main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .course-card-body{padding:14px}
 .main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .course-card h3{font-size:16px}
 .main:not(.page-home) :is(.discovery-grid,.card-grid:has(.card-art[data-topic])) .card-footer{font-size:12px;gap:5px}
 .main:not(.page-home) .filter-bar{flex-wrap:wrap;gap:9px}
 .main:not(.page-home) .filter-bar input,.main:not(.page-home) .filter-bar select{width:100%;flex-basis:100%}
 .main:not(.page-home) .discovery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .main:not(.page-home) .topic-tile{grid-template-columns:42px minmax(0,1fr) 13px;padding:11px 10px;column-gap:8px;row-gap:3px;border-radius:15px}
 .main:not(.page-home) .topic-tile>img{width:42px;height:42px;border-radius:9px}
 .main:not(.page-home) .topic-tile>strong{font-size:13px}
 .main:not(.page-home) .topic-tile>span{font-size:12px}
 .main:not(.page-home) .topic-tile>.icon{width:13px;height:13px}
 .main:not(.page-home) .panel{border-radius:18px;padding:20px 17px;margin-bottom:17px}
 .main:not(.page-home) .panel>h2{font-size:19px;margin-bottom:14px}
 .main:not(.page-home) .panel>h3{font-size:16px}
 .main:not(.page-home) .panel>p{font-size:13px}
 .main:not(.page-home) .empty{padding:30px 20px;border-radius:21px}
 .main:not(.page-home) .empty h3{font-size:18px}
 .main:not(.page-home) .empty p{font-size:12px;line-height:1.85}
 .main:not(.page-home) .stats-grid{gap:12px;margin-bottom:19px}
 .main:not(.page-home) .stat{padding:18px 16px;border-radius:18px}
 .main:not(.page-home) .stat strong{font-size:29px;line-height:1.4;margin-top:8px}
 .main:not(.page-home) .settings-grid{gap:0}
 .main:not(.page-home) .list-row{padding:15px 0;gap:11px}
 .main:not(.page-home) .list-row h3{font-size:13px}
 .main:not(.page-home) .list-row p{font-size:12px}
 .main:not(.page-home) details.panel>summary{font-size:15px;line-height:1.8}
 .main:not(.page-home) .notice{font-size:12px;line-height:1.85;padding:12px 14px;border-radius:11px}
 .main:not(.page-home) .inline-form :is(input,select){width:100%;flex-basis:100%}
 .main:not(.page-home) .inline-form .btn{font-size:12px}
 .main:not(.page-home) .table-scroll{border:0;border-radius:0;overflow:visible}
 .main:not(.page-home) :is(table,tbody,tr,td){display:block;width:100%;max-width:100%}
 .main:not(.page-home) thead{display:none}
 .main:not(.page-home) tbody{display:grid;gap:12px}
 .main:not(.page-home) tbody tr{border-color:#e8dcec;border-radius:14px;background:#fcf8fe;padding:11px 13px}
 .main:not(.page-home) td,.main:not(.page-home) tbody tr:last-child td{display:flex;align-items:flex-start;justify-content:space-between;gap:13px;padding:9px 0;border:0;border-bottom:1px solid #eee0f6;font-size:12px;line-height:1.8;text-align:right;min-width:0;overflow-wrap:anywhere}
 .main:not(.page-home) td:last-child,.main:not(.page-home) tbody tr:last-child td:last-child{border-bottom:0}
 .main:not(.page-home) td:before{font-size:12px;line-height:1.8;color:#7d748b;white-space:normal;max-width:42%;text-align:left;flex-shrink:0}
 .main:not(.page-home) td:has(.btn),.main:not(.page-home) td:has(details){flex-wrap:wrap;justify-content:flex-end}
 .main:not(.page-home) td details{font-size:12px;width:100%;text-align:left;overflow-wrap:anywhere}
 .main:not(.page-home) td .btn{font-size:12px;max-width:100%}
 .main:not(.page-home) td[colspan]{text-align:left}
 .main:not(.page-home) td[colspan]:before{display:none}
 .main:not(.page-home) .balance-card{padding:24px 21px;border-radius:20px;gap:15px}
 .main:not(.page-home) .balance-card strong{font-size:37px}
 .main:not(.page-home) .balance-card small{font-size:12px}
 .main:not(.page-home) .balance-card>.icon{width:43px;height:43px;flex-shrink:0}
 .main:not(.page-home) .balance-art{width:88px;height:89px}
 .main:not(.page-home) .package{display:block}
 .main:not(.page-home) .package .price{font-size:30px;margin-top:17px}
 .main:not(.page-home) .package ul{font-size:12px;line-height:2.2;margin:14px 0 19px}
 .main:not(.page-home) .lesson-title{margin-bottom:19px}
 .main:not(.page-home) .lesson-title h1{font-size:24px;line-height:1.6}
 .main:not(.page-home) .lesson-title .en{font-size:12px;line-height:1.8;margin-top:6px}
 .main:not(.page-home) .level-switch{width:100%;margin-top:14px;gap:2px;padding:4px;border-radius:11px}
 .main:not(.page-home) .level-switch button{font-size:12px;flex:1;padding:8px 3px;border-radius:8px}
 .main:not(.page-home) .tabs{gap:2px;padding:4px;border-radius:13px;margin-bottom:13px}
 .main:not(.page-home) .tab{font-size:12px;padding:10px 2px;min-height:41px;border-radius:9px}
 .main:not(.page-home) .lesson-tools{border-radius:13px;margin-bottom:18px}
 .main:not(.page-home) .lesson-tools>summary{padding:12px 14px;font-size:12px;gap:8px;flex-wrap:wrap}
 .main:not(.page-home) .lesson-tools>summary>span{font-size:11px}
 .main:not(.page-home) .lesson-tools-content{padding:17px 14px;gap:22px}
 .main:not(.page-home) .lesson-tools .panel{padding:0;gap:11px}
 .main:not(.page-home) .lesson-tools label,.main:not(.page-home) .lesson-tools select,.main:not(.page-home) .lesson-tools .btn{font-size:12px}
 .main:not(.page-home) .lesson-body{padding:24px 19px}
 .main:not(.page-home) .lesson-body h2{font-size:22px;line-height:1.6}
 .main:not(.page-home) .article-meta{gap:7px}
 .main:not(.page-home) .article-meta .pill{font-size:12px}
 .main:not(.page-home) .article-figure{border-radius:14px;margin:21px 0 24px}
 .main:not(.page-home) .article-figure figcaption{font-size:11px;padding:10px 12px}
 .main:not(.page-home) .article-figure figcaption span{font-size:10px}
 .main:not(.page-home) .zh-text{font-size:19px;line-height:2.3;letter-spacing:.025em}
 .main:not(.page-home) .translation{font-size:13px;line-height:1.9}
 body.english .main:not(.page-home) .translation{font-size:14px}
 .main:not(.page-home) .article-paragraph{margin:22px 0}
 .main:not(.page-home) .chapter-end{gap:12px;padding-top:18px}
 .main:not(.page-home) .vocab-grid{gap:12px}
 .main:not(.page-home) .collection-grid{grid-template-columns:minmax(0,1fr)}
 .main:not(.page-home) .vocab-card{padding:17px 14px;border-radius:17px}
 .main:not(.page-home) .vocab-title strong{font-size:25px}
 .main:not(.page-home) .vocab-card p{font-size:13px;line-height:1.85}
 .main:not(.page-home) .vocab-card .pinyin-line{font-size:12px}
 .main:not(.page-home) .vocab-title .pill{font-size:12px;padding:5px 6px}
 .main:not(.page-home) .vocab-actions{gap:6px;margin-top:14px;padding-top:10px}
 .main:not(.page-home) .vocab-actions button{font-size:12px}
 .main:not(.page-home) .grammar-formula{font-size:21px;padding:17px;border-radius:13px}
 .main:not(.page-home) .english-tip{font-size:13px;padding:14px 15px}
 .main:not(.page-home) .scaffolds{font-size:13px;padding:12px 13px;line-height:1.9}
 .main:not(.page-home) .writing-requirements li{font-size:13px}
 .main:not(.page-home) .writing-meter{font-size:11px}
 .main:not(.page-home) .question{padding:20px 16px;border-radius:17px}
 .main:not(.page-home) .question h3{font-size:14px}
 .main:not(.page-home) .option{font-size:13px;padding:10px 12px;border-radius:10px}
 .main:not(.page-home) .feedback{font-size:13px;padding:12px 14px}
 .main:not(.page-home) .matching{column-gap:36px;padding:17px 0}
 .main:not(.page-home) .match-item{font-size:12px;line-height:1.7;padding:10px 8px;min-height:61px}
 .main:not(.page-home) .match-save{font-size:11px}
 .main:not(.page-home) .palace-map{grid-template-columns:minmax(0,1fr) 112px minmax(0,1fr);gap:7px;padding:17px 7px;border-radius:13px}
 .main:not(.page-home) .map-caption{font-size:12px;line-height:1.8;overflow-wrap:anywhere}
 .main:not(.page-home) .map-building{font-size:12px;padding:9px 6px}
 .main:not(.page-home) .map-building small{font-size:11px;line-height:1.6}
 .main:not(.page-home) .teaching-diagram>p{font-size:11px}
 .main:not(.page-home) .footer{font-size:11px;margin-top:23px;padding-top:20px;gap:12px;flex-wrap:wrap}
 .main:not(.page-home) .footer>div{gap:13px}
 .overlay{padding:15px}
 .modal{padding:24px 19px;border-radius:22px;max-height:90dvh}
 .modal-head{margin-bottom:19px;gap:12px}
 .modal-head h2{font-size:21px;line-height:1.55}
 .modal-head .en{font-size:12px}
 .modal-actions{gap:8px;justify-content:flex-start}
 .modal .level-options{gap:5px}
 .modal .level-option{font-size:12px;padding:12px 2px;border-radius:10px;overflow-wrap:anywhere}
 .modal .level-option small{font-size:10px}
 .modal .explain-card{font-size:13px;padding:15px}
 .modal .learner-report>summary{padding:13px;gap:10px}
 .modal .learner-report-body{padding:14px}
 .modal .quality-grid>div{padding:14px;font-size:11px}
 .chat-drawer{right:14px;bottom:14px;max-width:calc(100vw - 28px);border-radius:18px}
 .chat-header{padding:16px;gap:9px}
 .chat-header .en{font-size:11px}
 .chat-messages{padding:16px}
 .chat-form{padding:11px;gap:8px}
 .toast{font-size:12px;bottom:16px;padding:12px 16px}
}
@media(max-width:374px){
 body:not(.home-mode) .topbar-inner{padding-left:14px;padding-right:14px}
 .main:not(.page-home){padding-left:14px;padding-right:14px}
 .main:not(.page-home) .course-card{grid-template-columns:94px minmax(0,1fr)}
 .main:not(.page-home) .course-card-body{padding:14px}
 .main:not(.page-home) .card-footer{font-size:12px}
 .main:not(.page-home) .stat{padding:16px 14px}
 .main:not(.page-home) .stat>span{font-size:12px}
 .main:not(.page-home) .stat strong{font-size:27px}
 .main:not(.page-home) .topic-tile{grid-template-columns:38px minmax(0,1fr) 12px;column-gap:6px;padding:10px 8px}
 .main:not(.page-home) .topic-tile>img{width:38px;height:38px}
 .main:not(.page-home) .balance-art{width:70px;height:75px}
 .main:not(.page-home) .tabs{gap:1px;padding:3px}
 .main:not(.page-home) .tab{font-size:12px;padding-left:1px;padding-right:1px}
 .main:not(.page-home) .level-switch button{font-size:12px}
 .main:not(.page-home) .panel{padding:18px 15px}
 .main:not(.page-home) .lesson-body{padding:21px 17px}
 .main:not(.page-home) .vocab-card{padding:16px 12px}
 .main:not(.page-home) .vocab-title strong{font-size:23px}
 .main:not(.page-home) .vocab-actions button{font-size:12px}
 .main:not(.page-home) .palace-map{grid-template-columns:minmax(0,1fr) 105px minmax(0,1fr);gap:5px}
 .main:not(.page-home) .map-caption{font-size:12px}
 .main:not(.page-home) .map-building small{font-size:11px}
 .modal{padding-left:17px;padding-right:17px}
 .modal-head h2{font-size:20px}
}
@media(prefers-reduced-motion:reduce){.main:not(.page-home) .course-card{transition:none;transform:none}}
