:root{--primary:#0f766e;--primary-dark:#095c56;--tint:#e9f5f1;--bg:#f5f8f7;--surface:#fff;--ink:#173a35;--muted:#75867f;--border:#e3ebe7;--danger:#b83b47;--shadow:0 12px 36px #133f3010;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:var(--primary);text-decoration:none}h1,h2,h3,p{margin:0}h1{font-size:30px;letter-spacing:-1px;line-height:1.25}h2{font-size:20px;letter-spacing:-.4px}h3{font-size:16px}p{line-height:1.65}small,.muted{color:var(--muted)}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #54b2a6;outline-offset:3px}button svg{flex-shrink:0}.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--ink);padding:11px 16px;min-height:44px;font-weight:600;font-size:14px;transition:background .15s,transform .15s}.btn:hover{background:var(--tint)}.btn.primary{background:var(--primary);border-color:var(--primary);color:white}.btn.primary:hover{background:var(--primary-dark)}.btn.danger{color:var(--danger)}.btn.ghost{background:transparent;border-color:transparent}.btn.small{padding:7px 10px;min-height:36px;font-size:12px}.icon-btn{width:42px;height:42px;padding:0;flex-shrink:0}.pill{display:inline-flex;gap:5px;align-items:center;padding:5px 9px;font-size:11px;font-weight:650;border-radius:7px;background:var(--tint);color:var(--primary);white-space:nowrap}.pill.neutral{background:var(--bg);color:var(--muted)}.flex{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.stack{display:grid;gap:18px}.section-gap{margin-top:26px}.mt{margin-top:16px}.hidden{display:none!important}.empty{text-align:center;padding:48px 20px;color:var(--muted)}.empty>.icon{width:40px;height:40px;margin-bottom:15px;color:var(--primary)}.empty h3{color:var(--ink);margin-bottom:8px}.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:24px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:1.5px;color:var(--muted);text-transform:uppercase}.loading-screen{min-height:100vh;display:grid;place-items:center;color:var(--primary)}
.sidebar{position:fixed;top:0;bottom:0;width:238px;display:flex;flex-direction:column;padding:32px 20px 20px;border-right:1px solid var(--border);background:var(--surface);z-index:10}.brand{display:flex;align-items:center;gap:11px;padding:0 6px}.brand img{width:43px;height:43px;border-radius:12px}.brand strong{font-size:16px;line-height:1.35;letter-spacing:-.4px}.brand small{display:block;font-size:10px;letter-spacing:1.2px;margin-top:3px}.nav-label{margin:38px 14px 12px;font-size:10px;letter-spacing:1.7px;font-weight:700;color:var(--muted)}.nav{display:grid;gap:5px}.nav a{padding:13px 14px;border-radius:11px;color:var(--muted);display:flex;align-items:center;gap:12px;font-size:13px;font-weight:550}.nav a.active{color:var(--primary);background:var(--tint);font-weight:700}.nav a:hover{background:var(--bg)}.nav .icon{width:19px;height:19px}.sidebar-bottom{margin-top:auto;padding-top:25px}.side-note{background:var(--bg);border:1px solid var(--border);padding:16px;border-radius:13px;margin-bottom:20px}.side-note .cn{font-size:25px;margin:7px 0}.side-note p{font-size:11px;color:var(--muted)}.profile{display:flex;gap:9px;align-items:center;padding:14px 2px 0;border-top:1px solid var(--border);min-width:0}.avatar{background:var(--tint);color:var(--primary);border-radius:50%;width:37px;height:37px;display:grid;place-items:center;font-weight:700;flex-shrink:0}.profile-info{min-width:0;flex:1}.profile strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis}.profile small{font-size:10px}.mobile-head,.bottom-nav{display:none}.workspace{margin-left:238px}.topbar{height:78px;background:var(--surface);border-bottom:1px solid var(--border);padding:0 38px;display:flex;align-items:center;justify-content:space-between}.breadcrumb{font-size:12px;color:var(--muted)}.breadcrumb b{font-weight:600;color:var(--ink);margin-left:10px}.topbar .date{font-size:12px;color:var(--muted)}main{max-width:1440px;margin:auto;padding:34px 38px 56px}.page-heading{display:flex;gap:20px;justify-content:space-between;align-items:center;margin-bottom:26px}.page-heading p{font-size:13px;color:var(--muted);margin-top:8px}.dashboard{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px}.hero{position:relative;overflow:hidden;background:var(--tint);border:1px solid #cde4db;padding:29px 30px;border-radius:16px;min-height:180px;display:flex;align-items:center;justify-content:space-between}.hero h2{font-size:25px;max-width:350px;line-height:1.35}.hero p{font-size:13px;color:var(--muted);margin:10px 0 19px;max-width:360px}.hero-glyph{font-family:serif;font-size:114px;line-height:1;color:var(--primary);opacity:.18;transform:rotate(-8deg);padding-right:5px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0 26px}.stat{padding:18px;border-radius:13px;background:var(--surface);border:1px solid var(--border)}.stat .stat-label{font-size:11px;color:var(--muted)}.stat .stat-value{font-size:27px;font-weight:700;margin-top:9px;letter-spacing:-1px}.stat .stat-value small{font-size:11px;font-weight:400;margin-left:5px;letter-spacing:0}.stat .icon{width:17px;height:17px;color:var(--primary)}.searchbox{display:flex;align-items:center;gap:10px;padding:5px 7px 5px 15px;background:var(--surface);border:1px solid var(--border);border-radius:12px;margin-bottom:18px}.searchbox>.icon{color:var(--muted);flex-shrink:0}.searchbox input{border:0;background:transparent;outline:0;min-width:0;flex:1;padding:10px 0;color:var(--ink);font-size:13px}.searchbox .btn{border:0;background:var(--bg);width:36px;min-height:36px;height:36px}.chips{display:flex;gap:8px;overflow:auto;padding:1px 1px 10px;margin-bottom:8px;scrollbar-width:thin}.chip{border:1px solid var(--border);border-radius:8px;padding:8px 13px;background:var(--surface);color:var(--muted);font-size:12px;white-space:nowrap;min-height:36px}.chip.active{background:var(--primary);color:white;border-color:var(--primary)}.list-heading{margin:23px 0 14px}.list-heading h2{font-size:17px}.word-list{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:var(--surface)}.word-row{display:flex;align-items:center;gap:15px;padding:17px 18px;border-bottom:1px solid var(--border)}.word-row:last-child{border-bottom:0}.word-open{display:flex;align-items:center;gap:16px;flex:1;min-width:0;text-align:left;border:0;background:transparent;color:var(--ink);padding:0;cursor:pointer}.word-glyph{font-family:"Noto Sans CJK SC","Microsoft YaHei",sans-serif;font-size:25px;min-width:67px;color:var(--ink);white-space:nowrap}.word-info{flex:1;min-width:0}.word-info .pinyin{display:block;font-size:12px;color:var(--primary);margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.word-info p{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}.word-row .icon-btn{width:32px;height:32px;min-height:32px;background:var(--bg);border:0;color:var(--primary)}.word-row .status-dot{width:6px;height:6px;background:var(--primary);border-radius:50%;margin-right:6px;display:inline-block}.word-side{display:grid;justify-items:end;gap:7px}.word-side small{font-size:10px}.daily-card{text-align:center;padding:24px 20px;background:var(--surface);border:1px solid var(--border);border-radius:16px}.daily-card .cn{font-size:61px;font-family:serif;line-height:1.5;margin:14px 0 0}.daily-card .py{color:var(--primary);font-size:14px}.daily-card .meaning{font-size:15px;margin-top:9px}.daily-card .example{border-top:1px solid var(--border);padding-top:18px;margin-top:22px;font-size:12px}.daily-card .example span{display:block;margin-top:5px;color:var(--muted);font-size:11px}.daily-card .btn{margin-top:19px}.quick{display:grid;gap:8px;margin-top:14px}.quick .btn{justify-content:flex-start;font-size:12px;border-radius:10px}.quick .btn .icon:last-child{margin-left:auto;width:15px}.progress-track{height:6px;background:var(--tint);border-radius:6px;overflow:hidden;margin:15px 0 10px}.progress-fill{height:100%;background:var(--primary);width:var(--progress,0%)}.tip{padding:20px;margin-top:16px;background:#fcf6e7;border:1px solid #f2e8cb;border-radius:14px;color:#8b6a2c}.tip p{font-size:12px;margin-top:8px;line-height:1.7}.tip .eyebrow{color:#9b7c43}.toolbar{display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap;margin:14px 0}.toolbar select{width:auto;min-width:135px}.page-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);gap:24px}.field{display:grid;gap:7px;margin-bottom:17px}.field label{font-size:12px;font-weight:650}.field small{font-size:11px;line-height:1.5}.field input,.field select,.field textarea,input.control,select.control,textarea.control{width:100%;padding:12px 13px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink);min-height:44px;font-size:14px}.field textarea,textarea.control{resize:vertical;line-height:1.6;min-height:95px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.full{grid-column:1/-1}.form-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:22px}.result-cn{font-size:30px;line-height:1.7}.result-py{color:var(--primary);margin:10px 0}.example-block{padding:15px;background:var(--bg);border-radius:10px;margin-top:12px}.example-block p{font-size:14px;margin-top:4px}.example-block small{display:block;margin-top:4px}.detail-word{font-size:62px;line-height:1.4;font-family:serif}.detail-pinyin{color:var(--primary);font-size:19px;margin:5px 0 14px}.detail-meaning{font-size:20px;margin-bottom:17px}.note{white-space:pre-wrap;padding:16px;border-left:3px solid var(--primary);background:var(--tint);margin-top:20px;font-size:13px}.table-wrap{overflow:auto}.table{border-collapse:collapse;width:100%;text-align:left;font-size:12px;white-space:nowrap}.table th{font-weight:600;color:var(--muted);font-size:11px;padding:14px 12px;border-bottom:1px solid var(--border);background:var(--bg)}.table td{padding:14px 12px;border-bottom:1px solid var(--border)}.table tbody tr:last-child td{border:0}.table td small{display:block;margin-top:4px}.checkline{display:flex;gap:10px;align-items:center;font-size:13px;margin:12px 0}.checkline input{accent-color:var(--primary);width:17px;height:17px}.help{font-size:12px;line-height:1.8;color:var(--muted)}.notice{border:1px solid var(--border);padding:13px 15px;border-radius:10px;background:var(--bg);font-size:12px;color:var(--muted);line-height:1.6}.error-box{color:var(--danger);font-size:13px;line-height:1.6;margin:10px 0}.two-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px}.review-area{max-width:730px;margin:0 auto}.flashcard{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;min-height:330px;width:100%;border:1px solid var(--border);border-radius:22px;padding:35px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);cursor:pointer}.flashcard .big{font-size:57px;font-family:serif;line-height:1.5}.flashcard .meaning{font-size:28px}.flashcard small{display:block;margin-top:25px}.flashcard .pinyin{font-size:20px;color:var(--primary);margin-top:12px}.review-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:20px}.review-nav .btn{min-width:0;padding:11px 8px}.review-nav .btn:disabled{opacity:.4;cursor:not-allowed}.review-controls{display:flex;justify-content:center;gap:12px;margin-top:20px}.review-bar{display:flex;align-items:center;justify-content:space-between;margin:0 0 20px;font-size:13px}.conversation-line{border:1px solid var(--border);background:var(--surface);padding:18px;border-radius:14px;margin:14px 30px 14px 0}.conversation-line.other{margin:14px 0 14px 30px;background:var(--tint)}.conversation-line .cn{font-size:20px;margin-top:8px}.conversation-line .py{font-size:12px;color:var(--primary);margin:6px 0}.conversation-line .vi{font-size:13px;color:var(--muted)}.conversation-heading{text-align:center;margin-bottom:25px}.conversation-heading h2{font-size:26px}.conversation-heading p{color:var(--muted);font-size:14px}.media-player{width:100%;max-height:420px;background:#102724;border-radius:14px}.subtitle-list{max-height:300px;overflow:auto;margin-top:16px}.subtitle-line{display:block;text-align:left;border:0;border-bottom:1px solid var(--border);background:transparent;width:100%;color:var(--ink);padding:13px;cursor:pointer;font-size:15px;line-height:1.5}.subtitle-line small{display:block;font-size:10px;color:var(--muted)}.subtitle-line.active{background:var(--tint);color:var(--primary)}.media-tile{display:flex;gap:14px;align-items:center;padding:18px;border:1px solid var(--border);border-radius:13px;background:var(--surface)}.media-tile>.icon{width:34px;height:34px;color:var(--primary)}.media-tile .meta{flex:1;min-width:0}.media-tile h3{font-size:14px;overflow-wrap:anywhere}.media-tile p{font-size:11px;color:var(--muted);margin-top:5px}.theme-buttons{display:flex;gap:9px;flex-wrap:wrap}.theme-btn{width:35px;height:35px;border-radius:50%;background:var(--swatch);border:3px solid var(--surface);outline:1px solid var(--border)}.theme-btn.active{outline:2px solid var(--primary)}.account-card{display:flex;gap:14px;align-items:center;margin-bottom:20px}.account-card .avatar{width:50px;height:50px;font-size:20px}.account-card p{font-size:12px;color:var(--muted)}
dialog{padding:0;border:1px solid var(--border);border-radius:20px;width:min(700px,calc(100vw - 32px));max-height:90dvh;background:var(--surface);color:var(--ink);box-shadow:0 25px 90px #001d2840}dialog::backdrop{background:#0a252559;backdrop-filter:blur(3px)}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:21px 26px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface);z-index:1}.modal-header h2{font-size:19px}.modal-body{padding:25px 26px}.example-editor{background:var(--bg);border:1px solid var(--border);padding:15px;border-radius:12px;margin:13px 0}.example-editor .field{margin-bottom:10px}.code{font-family:ui-monospace,monospace;font-size:15px;word-break:break-all;border:1px dashed var(--primary);background:var(--tint);padding:18px;border-radius:12px;margin:15px 0;user-select:all}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,20px);padding:13px 20px;border-radius:12px;background:var(--ink);color:var(--surface);box-shadow:var(--shadow);font-size:13px;z-index:100;opacity:0;pointer-events:none;max-width:calc(100vw - 32px);transition:opacity .18s,transform .18s}#toast.show{opacity:1;transform:translate(-50%,0)}
.auth{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;background:var(--surface)}.auth-art{background:#104f49;color:#e5f6ed;padding:45px 58px;display:flex;flex-direction:column;position:relative;overflow:hidden}.auth-art .brand small{color:#a3c6bc}.auth-art .brand img{width:45px}.auth-copy{margin:auto 0;position:relative;z-index:1}.auth-copy .eyebrow{color:#a3c6bc}.auth-copy h1{font-size:44px;line-height:1.28;letter-spacing:-1.7px;max-width:460px;margin:20px 0}.auth-copy p{color:#b3d2c8;max-width:370px;font-size:14px}.auth-calligraphy{font-family:serif;font-size:130px;color:#91c3ae3b;letter-spacing:18px;margin:36px 0}.auth-art footer{color:#a3c6bc;font-size:11px}.auth-form-panel{display:grid;place-items:center;padding:40px}.auth-form{width:100%;max-width:370px}.auth-form h2{font-size:29px;margin:15px 0 8px}.auth-form>p{font-size:13px;color:var(--muted);margin-bottom:27px}.auth-tabs{display:flex;gap:6px;background:var(--bg);padding:4px;border-radius:10px;margin-bottom:25px}.auth-tabs button{flex:1;border:0;background:transparent;padding:10px;border-radius:7px;color:var(--muted);font-size:13px}.auth-tabs button.active{background:var(--surface);color:var(--primary);box-shadow:0 2px 6px #0f352210}.auth-form .primary{width:100%;margin-top:4px}.auth-form .help{text-align:center;margin-top:23px;font-size:11px}.auth-mark{display:flex;align-items:center;gap:8px;color:var(--primary);font-size:12px;font-weight:650}.auth-mark .icon{width:22px;height:22px}
body[data-theme=blue]{--primary:#386cba;--primary-dark:#254f91;--tint:#eaf1fc;--bg:#f4f7fc;--ink:#20314e;--border:#e0e7f1}body[data-theme=pink]{--primary:#ad547e;--primary-dark:#8c3c62;--tint:#fceef4;--bg:#fbf7f9;--ink:#4c2b3b;--border:#f0e2e9}body[data-theme=yellow]{--primary:#957019;--primary-dark:#6e5312;--tint:#faf2d7;--bg:#fcfaf3;--ink:#463c24;--border:#eee7d3}body[data-theme=gray]{--primary:#55666e;--primary-dark:#34464e;--tint:#eaf0f2;--bg:#f5f7f8;--ink:#263a43;--border:#dde4e8}body[data-theme=dark]{--primary:#5ac8b7;--primary-dark:#367f73;--tint:#1a3631;--bg:#0d1c19;--surface:#142823;--ink:#e4f3ec;--muted:#99b3a8;--border:#294139;--shadow:none}body[data-theme=dark] .hero{border-color:var(--border)}body[data-theme=dark] .tip{background:#332e1d;border-color:#54482c;color:#e5cb92}body[data-theme=dark] .btn.primary{color:#102720}
@media(min-width:1500px){main{padding-top:40px}.dashboard{grid-template-columns:minmax(0,1fr) 315px;gap:28px}.hero{min-height:205px}.hero h2{font-size:29px}}
@media(max-width:1150px){.sidebar{width:210px;padding-left:13px;padding-right:13px}.workspace{margin-left:210px}.topbar{padding:0 24px}main{padding:28px 24px}.dashboard{grid-template-columns:minmax(0,1fr) 245px;gap:18px}.hero{padding:23px}.hero h2{font-size:23px}.hero-glyph{font-size:86px}.word-side small{display:none}.stat{padding:14px}.stat .stat-label{font-size:10px}.page-grid{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.dashboard{grid-template-columns:1fr}.dashboard aside{display:grid;grid-template-columns:1fr 1fr;gap:16px}.daily-card{grid-row:span 2}.quick{margin-top:0}.tip{margin:0}.page-grid{grid-template-columns:1fr}.hero-glyph{font-size:115px}.auth-art{padding:35px}.auth-copy h1{font-size:35px}.auth-calligraphy{font-size:90px}.auth-form-panel{padding:30px}}
@media(max-width:700px){.sidebar,.topbar{display:none}.workspace{margin-left:0}.mobile-head{display:flex;position:sticky;top:0;align-items:center;justify-content:space-between;background:var(--surface);padding:12px 17px;border-bottom:1px solid var(--border);z-index:10;gap:10px}.mobile-head .brand{padding:0;gap:8px}.mobile-head .brand img{width:33px;height:33px;border-radius:9px}.mobile-head .brand strong{font-size:14px}.mobile-head .brand small{display:none}.mobile-head .btn{min-height:35px;width:35px;height:35px}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--border);z-index:10;padding:7px 5px max(8px,env(safe-area-inset-bottom));justify-content:space-around}.bottom-nav a{display:flex;flex:1;min-width:0;align-items:center;flex-direction:column;gap:4px;font-size:9px;color:var(--muted);padding:5px 0;border-radius:8px}.bottom-nav a.active{color:var(--primary);background:var(--tint)}.bottom-nav .icon{width:21px;height:21px}main{padding:23px 17px 105px}.page-heading{margin-bottom:21px;align-items:flex-start;gap:12px}.page-heading h1{font-size:24px;letter-spacing:-.7px}.page-heading p{font-size:11px;max-width:240px}.page-heading .btn{font-size:12px;padding:9px 11px;min-height:40px}.page-heading .btn .icon{width:17px;height:17px}.hero{padding:22px 20px;min-height:175px}.hero h2{font-size:23px;max-width:240px}.hero p{font-size:12px;max-width:240px}.hero-glyph{font-size:78px;padding:0}.stats{gap:9px;margin:15px 0 23px}.stat{padding:13px 11px}.stat .stat-value{font-size:24px}.stat .stat-value small{display:none}.stat .icon{width:14px}.word-row{padding:15px 12px;gap:9px}.word-open{gap:10px}.word-glyph{min-width:55px;font-size:23px}.word-side .pill{font-size:9px;max-width:90px;overflow:hidden;text-overflow:ellipsis;display:block}.word-side small{display:none}.word-info .pinyin{font-size:11px}.word-info p{font-size:11px}.word-row .icon-btn{width:31px;height:31px}.searchbox{gap:8px;padding-left:12px}.searchbox input{font-size:12px}.searchbox .btn{width:33px}.list-heading h2{font-size:16px}.dashboard aside{grid-template-columns:1fr 1fr;gap:12px}.daily-card{padding:20px 13px}.daily-card .cn{font-size:48px}.daily-card .example{padding-top:15px;margin-top:15px;font-size:11px}.daily-card .eyebrow{font-size:9px}.daily-card .meaning{font-size:13px}.quick .btn{font-size:11px;padding:10px;gap:6px;justify-content:flex-start}.quick .btn .icon{width:17px}.quick .btn .icon:last-child{display:none}.tip{padding:15px}.tip p{font-size:11px}.card{padding:20px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.modal-header{padding:17px 18px}.modal-body{padding:20px 18px}dialog{max-height:92dvh;width:calc(100vw - 20px);border-radius:16px}.flashcard{min-height:320px;padding:25px 20px}.flashcard .big{font-size:48px}.flashcard .meaning{font-size:25px}.review-controls{gap:8px}.review-controls .btn{font-size:12px;padding:11px 12px}.auth{grid-template-columns:1fr}.auth-art{padding:24px;min-height:auto}.auth-copy{margin:28px 0 12px}.auth-copy h1{font-size:28px;margin:10px 0}.auth-copy p{font-size:12px}.auth-copy .eyebrow,.auth-calligraphy,.auth-art footer{display:none}.auth-form-panel{padding:28px 24px 40px}.auth-form h2{font-size:25px}.auth-form>p{margin-bottom:20px}.auth-mark{display:none}#toast{bottom:92px}.detail-word{font-size:51px}.conversation-line,.conversation-line.other{margin-right:0;margin-left:0}.table td,.table th{padding:12px 9px}.toolbar{gap:8px}.toolbar select{font-size:12px;min-width:0;flex:1}.account-card{align-items:flex-start}}
@media(max-width:700px){
html,body{overflow-x:hidden}
.dashboard{grid-template-columns:minmax(0,1fr)}.dashboard>*,.dashboard section{min-width:0}
.word-list,.word-row{min-width:0;max-width:100%}
.btn{white-space:nowrap}
.page-heading{flex-wrap:wrap}
.page-heading>div:first-child{flex:1 1 150px;min-width:0}
.page-heading>.flex{flex:0 0 auto}
.page-heading p{max-width:none}
.card{padding:18px 16px}
.card>.flex.between{flex-wrap:wrap;gap:8px}.card>.flex.between>h2{flex:1 1 60%;min-width:0}
.dashboard aside{grid-template-columns:minmax(0,1fr)}.daily-card{grid-row:auto}
.hero{padding:20px 18px;min-height:0;align-items:flex-start}
.hero>div:first-child{position:relative;z-index:1;min-width:0;width:100%}
.hero h2{max-width:none;font-size:22px}
.hero p{max-width:none;margin:8px 0 16px}
.hero-glyph{position:absolute;right:8px;top:6px;font-size:88px;opacity:.13;padding:0}
.stats{gap:8px}
.stat{padding:11px 10px;min-width:0}
.stat .flex.between{align-items:flex-start;gap:4px}
.stat .stat-label{font-size:10.5px;line-height:1.35;overflow-wrap:anywhere}
.stat .stat-value{font-size:22px;margin-top:7px}
.toolbar{display:grid;gap:10px;margin:12px 0}
.toolbar>.flex{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
.toolbar>.flex:last-child{grid-template-columns:repeat(auto-fit,minmax(88px,1fr))}
.toolbar select{width:100%;min-width:0;padding:10px 8px;font-size:13px;text-overflow:ellipsis}
.toolbar>.flex>.btn{min-width:0;padding-left:8px;padding-right:8px}
.empty{padding:36px 6px}
.empty .mt .btn{width:100%;max-width:300px}
.empty .mt{display:grid;gap:10px;justify-items:center}
.card .flex.wrap>.btn,.form-actions>.btn,.two-buttons .btn{flex:1 1 calc(50% - 8px);min-width:0;white-space:normal;text-align:center}
.form-actions{justify-content:stretch}
.form-actions .btn.primary{flex-basis:100%}
.field input,.field select,.field textarea{font-size:16px}
.example-editor{padding:12px}
.word-open{min-width:0}
.word-info p{max-width:100%}
.review-controls{flex-wrap:wrap}
.review-controls .btn{flex:1 1 calc(50% - 8px);min-width:0}
.flashcard{min-height:280px}
.flashcard .big,.detail-word{max-width:100%;overflow-wrap:anywhere}
.conversation-heading h2{font-size:21px}
.conversation-line{padding:14px}
.media-tile{flex-wrap:wrap}
.subtitle-list{max-height:240px}
.media-player{max-height:240px}
.modal-body .form-grid{grid-template-columns:1fr}
.modal-body .btn{min-width:0}
/* Bảng quản trị: mỗi dòng thành một khung riêng, không phải kéo ngang */
.table-wrap{overflow:visible}
.table{white-space:normal;display:block}
.table thead{display:none}
.table tbody{display:grid;gap:10px}
.table tr{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.table td{padding:0;border:0;min-width:0;overflow-wrap:anywhere}
.table td:first-child{flex:1 1 100%}
.table tbody tr:last-child td{border:0}
#admin-users td:last-child{margin-left:auto}
.auth-form{max-width:none}
}
@media(max-width:380px){
main{padding-left:14px;padding-right:14px}
h1{font-size:26px}
.page-heading h1{font-size:22px}
.page-heading .btn{padding:8px 10px;font-size:12px}
.stat .icon{display:none}
.hero h2{font-size:20px}
.hero-glyph{font-size:72px}
.word-row{padding:13px 10px;gap:8px}
.word-glyph{min-width:48px;font-size:21px}
.word-side .pill{max-width:72px}
.daily-card .cn{font-size:42px}
.bottom-nav a{font-size:8.5px}
.flashcard{padding:22px 14px}
.flashcard .big{font-size:42px}
.flashcard .meaning{font-size:22px}
.auth-form-panel{padding:24px 18px 36px}
.auth-art{padding:20px 18px}
.modal-header{padding:15px 14px}.modal-body{padding:18px 14px}
}
.search-row{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px}.search-row .searchbox{flex:1 1 0;min-width:0;margin-bottom:0}.search-row .category-select{flex:0 0 34%;min-width:112px;max-width:240px;height:52px;padding:0 10px;text-overflow:ellipsis}
.greeting{font-size:16px;display:block;max-width:60vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.greeting-bar{font-size:15px;color:var(--ink)}.greeting-bar b{margin-left:4px}
@media(max-width:700px){.search-row{gap:8px}.search-row .category-select{flex-basis:38%;min-width:0;font-size:12.5px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* ===== Bố cục theo ứng dụng Sổ Tay Từ Điển (Android) ===== */
#main{max-width:760px;margin:0 auto;padding-top:26px}
.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;min-height:44px}
.page-title{font-size:26px;line-height:1.25;letter-spacing:-.5px;color:var(--primary);font-weight:800}
.page-title-actions{display:flex;align-items:center;gap:4px}
.icon-btn.flat{background:transparent;border:0;box-shadow:none;color:var(--primary)}
.icon-btn.flat:hover{background:var(--tint)}
.icon-btn.flat[disabled]{opacity:.4}
.search-help{margin:-4px 0 14px}
.search-row .icon-btn.flat{width:40px;height:40px;min-height:40px;flex:0 0 auto;align-self:center}
.section-title{font-size:16px;font-weight:800;margin:6px 0 10px}
.add-below{margin:14px 0;display:flex;justify-content:center}
.dash-card{display:block;width:100%;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:16px 18px;margin-bottom:12px;color:var(--ink)}
.dash-link{display:flex;align-items:center;gap:12px;cursor:pointer}
.dash-link>strong{flex:1;font-size:15px}
.dash-link>.icon:first-child{color:var(--primary)}
.dash-link>.icon:last-child{color:var(--muted)}
.dash-title{font-size:15px;font-weight:800;margin-bottom:10px}
.recent-words{display:flex;flex-wrap:wrap;gap:8px}
.recent-word{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px;border:1px solid var(--border);border-radius:12px;background:var(--bg);color:var(--ink);min-width:0;max-width:100%}
.recent-word span{font-size:20px;line-height:1.3;font-family:serif}
.recent-word small{color:var(--primary);font-size:11px}
.stat-card .stat-text{flex:1;display:flex;flex-direction:column;gap:2px}
.stat-card small{color:var(--muted);font-size:12px}
.stat-number{font-size:28px;line-height:1.2;color:var(--ink)}
.stats-list{display:flex;flex-direction:column;max-height:60vh;overflow:auto;border:1px solid var(--border);border-radius:12px}
.stats-row{display:flex;justify-content:space-between;gap:12px;padding:11px 14px;border-bottom:1px solid var(--border)}
.stats-row:last-child{border-bottom:0}
.sort-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;color:var(--muted);font-size:13px}
.review-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;color:var(--muted);font-size:13px}
.review-meta .category-select{flex:0 0 46%;max-width:260px;min-width:0;height:42px}
.review-controls{display:flex;justify-content:center;gap:10px;margin-top:12px}
.translate-form{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}
.translate-input{width:100%;height:92px;min-height:92px;max-height:92px;resize:none;padding:12px 14px;line-height:22px;font-size:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--ink);overflow:auto}
.result-card{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:12px 16px 16px;margin-top:4px;display:flex;flex-direction:column;gap:6px}
.result-cn-btn{background:transparent;border:0;padding:0;text-align:left;color:var(--ink);cursor:pointer}
.result-card .result-cn{font-size:28px;line-height:40px;font-family:serif}
.result-card .result-py{font-size:14px;line-height:20px;margin-top:-3px}
.history-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 4px;border-bottom:1px solid var(--border)}
.history-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.history-main>strong{font-size:15px;overflow-wrap:anywhere}
.history-zh{font-size:18px;line-height:26px;font-family:serif}
.history-py{color:var(--primary);font-size:13px}
.history-actions{display:flex;align-items:center;gap:2px;flex-shrink:0}
.conversation-create{display:flex;flex-direction:column;gap:12px;margin-bottom:16px}
.conversation-history{display:flex;flex-direction:column}
.source-line{display:flex;align-items:center;gap:8px;margin:-2px 0 12px}
.source-line .icon{width:16px;height:16px;color:var(--primary)}
.media-library{margin-top:12px}
.settings-section{font-size:14px;font-weight:800;color:var(--primary);margin:20px 0 8px}
.settings-card{padding:6px 16px;margin-bottom:6px}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px}
.setting-row>label{font-weight:700;font-size:15px;flex:0 0 auto}
.setting-row .control{width:auto;min-width:130px;max-width:55%}
.settings-card .field{margin:10px 0}
.data-list{padding:0 16px}
.data-row{display:flex;align-items:center;gap:12px;width:100%;min-height:54px;padding:6px 0;background:transparent;border:0;border-bottom:1px solid var(--border);color:var(--ink);text-align:left;cursor:pointer}
.data-row:last-child{border-bottom:0}
.data-row>strong{flex:1;font-size:15px}
.data-row>.icon:last-child{color:var(--muted)}
.data-ico{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--bg);color:var(--primary)}
.sidebar-bottom{padding-top:0}
@media(max-width:700px){#main{padding-top:20px}.page-title{font-size:24px}}
.review-nav{grid-template-columns:auto minmax(0,1fr) auto;align-items:center}
.review-nav .icon-btn{width:48px;height:48px;min-height:48px;border:1px solid var(--border);background:var(--surface)}
.review-controls{display:grid;grid-template-columns:1fr 1fr}
.setting-row>label{flex:1 1 auto;min-width:0}
.setting-row .control{flex:0 1 150px;width:auto;min-width:0;max-width:150px}
.setting-row .control[type=number]{flex-basis:96px;max-width:96px}
.key-status{color:var(--muted);font-size:12px;white-space:nowrap}
.btn.danger{border-color:currentColor}
