/* Phan Thiết learning workspace: shared tokens and layouts. */
:root {
 color-scheme:light;--bg:#f4f6f2;--surface:#fff;--text:#183330;--muted:#4d6760;--line:#d9e4dc;
 --alt:#edf4ee;--primary:#176b58;--primary-hover:#105743;--on-primary:#fff;
 --shadow:0 12px 32px #1b493317;--radius:16px;--display:"Be Vietnam Pro",Arial,sans-serif;
}
body {min-height:100vh;display:flex;flex-direction:column}
[hidden] {display:none!important}
.wrap {width:min(1240px,calc(100% - 64px))}
main {flex:1;min-height:0;padding-bottom:50px}
button,a { -webkit-tap-highlight-color:transparent }
button:hover {transform:none}
button:disabled {cursor:wait;opacity:.67}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
 outline:2px solid #288a70;outline-offset:3px;box-shadow:none;
}
.skip-link {position:fixed;top:14px;left:14px;z-index:20;transform:translateY(-150%);padding:10px 16px;border-radius:8px;background:var(--surface);color:var(--text)}
.skip-link:focus {transform:none}
#workspace {min-width:0;scroll-margin-top:100px}
#q {scroll-margin-top:125px}
.site-header {z-index:4;background:color-mix(in srgb,var(--surface) 96%,transparent)}
.site-header .nav {min-height:72px;gap:16px}
.brand {flex:none;gap:11px;color:var(--text);white-space:nowrap}
.brand-logo {width:44px;height:44px}
.brand-copy {display:grid;gap:2px;line-height:1.2}
.brand-copy strong {font-size:15px;font-weight:600;letter-spacing:-.02em}
.brand-copy small {font-size:11px;color:var(--muted);font-weight:400}
#nav {gap:2px}
#nav a {display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:8px 9px;border-radius:9px;font-size:13px;white-space:nowrap}
#nav a .icon {width:16px;height:16px}
#nav a:hover,#nav a.on {background:var(--alt);color:var(--primary)}
#nav a.on {box-shadow:inset 0 -2px var(--primary)}
.actions {gap:8px}
.primary,a.primary {display:inline-flex;align-items:center;gap:7px;justify-content:center;min-height:40px;border-radius:9px;color:var(--on-primary);background:var(--primary);border:1px solid var(--primary);padding:8px 13px;line-height:1.4;text-align:center}
.primary:hover,a.primary:hover {background:var(--primary-hover);border-color:var(--primary-hover);box-shadow:none}
.avatar {width:38px;height:38px;background:var(--alt);border-color:var(--line);color:var(--primary)}
.mobile-menu {border-radius:9px}
.hero {isolation:isolate;min-height:160px;margin:26px 0 24px;padding:30px 40px;overflow:hidden;border-radius:22px;border:1px solid #28554b;background:linear-gradient(118deg,#133e35 12%,#205f4e 100%);color:#f3f6e8}
.hero-copy {max-width:700px;min-width:0}
.hero h1 {font-size:clamp(29px,4vw,52px);line-height:1.16;letter-spacing:-.052em;color:#f5f8ec;margin:10px 0}
.hero p {font-size:14px;max-width:560px;color:#d8e9d9;line-height:1.7}
.hero .eyebrow,.auth-brand .eyebrow {font-size:10px;font-weight:600;letter-spacing:.15em;color:#f1d8a5}
.hero .mini-rule,.auth-brand .mini-rule {border-color:#e6b873;width:20px}
.hero-shortcuts {display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}
.hero-shortcuts:empty {display:none}
.hero-link {display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border:1px solid #b2d8bf80;border-radius:8px;color:#eef5ea;background:#ffffff08;font-weight:600;font-size:13px}
.hero-link:hover {background:#ffffff24;border-color:#f1ead1}
.hero-link-main {background:#deedce;color:#193d32;border-color:#deedce}
.hero-link-main:hover {background:#f0f7e6;color:#193d32}
.hero-link:focus-visible {outline-color:#f2d69c}
.hero>.hero-art {position:absolute;z-index:0;inset:0 0 0 auto;width:39%;pointer-events:none;overflow:hidden}
.hero-ring {position:absolute;border:1px solid #d1e7d22e;border-radius:50%;width:380px;height:380px;right:-24px;top:50%;transform:translateY(-50%);box-shadow:0 0 0 33px #dbecd21e,0 0 0 67px #dbecd211}
.hero-illustration {position:absolute;inset:0;display:grid;place-items:center}
.hero-illustration svg {width:86%;max-width:330px;height:100%;max-height:224px}
body[data-view=kho] .hero {min-height:244px;padding-block:34px}
body:not([data-view=kho]) .hero-illustration {opacity:.63}
body:is([data-view=bai],[data-view=login],[data-view=setup],[data-view=error]) .hero {display:none}
body[data-view=bai] #workspace {margin-top:27px}
body:is([data-view=setup],[data-view=error]) #workspace {padding-top:32px}
.filter-panel,.toolbar,.panel,.empty,.detail-meta {background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.filter-panel {padding:18px 20px;box-shadow:0 4px 16px #23463a08}
.filter-heading {display:flex;align-items:center;gap:10px;margin-bottom:12px}
.filter-heading>span,.empty-icon,.auth-icon {display:inline-grid;place-items:center;width:40px;height:40px;flex:none;border-radius:10px;background:var(--alt);color:var(--primary)}
.filter-heading h2 {font-size:17px}
.filter-heading p {font-size:12px;margin-top:2px}
.catalog-toolbar {padding:0;border:0;border-radius:0;gap:8px}
.field,.search,.sort,.switch {border-radius:8px;border:1px solid var(--line);background:var(--surface)}
.search {min-height:43px;background:var(--alt)}
.search:focus-within {border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent)}
.search input {font-size:14px}
.search input:focus-visible {outline:0}
.field {min-height:40px}
.field select {max-width:195px;min-height:38px}
.field select,.sort select {font-size:13px}
.advanced {margin-top:10px}
.advanced summary {width:fit-content;max-width:100%;color:var(--primary);font-size:13px;padding:5px 2px}
.advanced .toolbar {background:var(--alt);padding:9px}
.sectionbar {margin:25px 0 12px}
.sectionbar h2 {line-height:1.27;font-size:clamp(18px,2vw,24px);letter-spacing:-.025em}
.controls {gap:8px;flex-wrap:wrap}
.sort {height:38px;padding:0 8px;gap:4px}
.sort .chev {right:8px}
.switch {gap:2px;padding:2px}
.switch button {min-width:34px;min-height:32px;border-radius:6px}
.switch button.on {background:var(--primary);color:var(--on-primary)}
.soft,.saved-shortcut {min-height:36px;border:1px solid var(--line);border-radius:8px;padding:6px 11px;background:var(--surface);color:var(--text);display:inline-flex;align-items:center;gap:6px;line-height:1.4;font-weight:600}
.soft:hover,.saved-shortcut:hover,.save:hover {background:var(--alt);border-color:var(--primary);color:var(--primary)}
.clear-filter {font-size:12px}
.count {min-width:26px;padding:1px 7px;background:var(--alt);border-color:var(--line);color:var(--primary)}
.grid {gap:15px}
.card {min-width:0;border:1px solid var(--line);border-radius:15px;background:var(--surface);transition:box-shadow .18s,border-color .18s}
.card:hover,.card:focus-within {box-shadow:var(--shadow);border-color:color-mix(in srgb,var(--primary) 38%,var(--line))}
.cover {height:157px}
.cover-name {font-size:clamp(19px,2.35vw,34px);line-height:1.18}
.cardmain {padding:15px 15px 12px}
.cardmain h3 {font-size:17px;line-height:1.4;letter-spacing:-.017em;overflow-wrap:anywhere}
.cardmain h3 a:hover {color:var(--primary);text-decoration:underline;text-underline-offset:3px}
.badge {font-size:11px}
.cardfoot {min-width:0;padding-inline:15px}
.cardfoot span:nth-child(2) {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.save {width:36px;height:36px}
.empty {padding:36px 20px}
.empty-icon {display:grid;margin:0 auto 11px;width:48px;height:48px}
.empty p,.panel p {max-width:72ch}
.empty p {margin:7px auto 16px}
.tabs {display:flex;gap:5px;padding:5px;background:var(--alt);border:1px solid var(--line);border-radius:11px;margin-bottom:16px;width:max-content;max-width:100%}
.tabs .soft {background:transparent;border:1px solid transparent;color:var(--muted)}
.tabs .soft:hover {background:var(--surface);color:var(--primary)}
.tabs .soft[aria-pressed=true] {background:var(--surface);color:var(--primary);border-color:var(--line);box-shadow:0 1px 4px #203b2f17}
.panel {padding:20px}
.panel h3 {font-size:18px;letter-spacing:-.02em}
.row h3 {overflow-wrap:anywhere}
.report {gap:14px}
.report .panel {padding:15px 18px;border-top:3px solid var(--primary)}
.report .panel:nth-child(2) {border-top-color:#b58235}
.report .panel:nth-child(3) {border-top-color:#397890}
.report p {margin:0 0 4px;font-size:13px}
.metric {font-size:32px;font-variant-numeric:tabular-nums;color:var(--text)}
.tableflow {padding:4px 12px}
.tableflow thead {background:var(--alt)}
.tableflow th,.tableflow td {padding:10px 9px;font-size:13px;overflow-wrap:anywhere}
.tableflow th {color:var(--muted)}
.tableflow tr:last-child td {border-bottom:0}
.breadcrumb {margin-top:0}
.breadcrumb a {color:var(--primary)}
.detail-head {border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:18px}
.detail-title {font-size:clamp(24px,3.2vw,40px)}
.detail-desc {margin-inline:2px}
.viewer {border-radius:var(--radius)}
.viewer:not(:has(iframe)) {min-height:180px}
dialog {border-radius:19px;box-shadow:0 24px 80px #09191555}
dialog::backdrop {background:#0d221e8a}
.dialogtop {padding:0 0 12px;margin:0 0 16px;border-bottom:1px solid var(--line)}
.dialogtop h2 {font-size:22px;letter-spacing:-.02em}
.close {width:37px;height:37px;border-radius:8px;display:grid;place-items:center}
form input,form select,textarea {min-height:42px;border-radius:8px}
form .checkbox input {min-height:0}
.form-error:not(:empty) {background:color-mix(in srgb,#cf4b38 8%,var(--surface));border-color:color-mix(in srgb,#cf4b38 28%,var(--line))}
#notice {min-width:min(260px,calc(100% - 32px));max-width:min(580px,calc(100% - 32px));width:max-content;text-align:center;box-shadow:var(--shadow)}
.site-footer {padding:16px 0 22px;align-items:baseline}
.footer-divider {padding:0 4px;color:var(--primary)}
.auth-layout {display:grid;grid-template-columns:1.08fr .92fr;width:min(940px,100%);margin:36px auto 0;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);background:var(--surface);overflow:hidden}
.auth-brand {background:radial-gradient(ellipse at 100% 100%,#2a715a,transparent 66%),#163d34;color:#f5f8e9;padding:clamp(25px,5vw,54px);display:flex;flex-direction:column;justify-content:center}
.auth-brand img {padding:4px;background:#eff4e8;border-radius:10px;width:54px;height:54px;margin-bottom:24px}
.auth-brand h1 {font-size:clamp(31px,5vw,58px);line-height:1.15;letter-spacing:-.05em;margin:10px 0 12px}
.auth-brand p {color:#dcebe0;line-height:1.7;font-size:14px}
.auth-features {display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.auth-features span {display:inline-flex;align-items:center;gap:6px;border-radius:8px;padding:6px 8px;border:1px solid #dcebe04f;font-size:11px;font-weight:600}
.auth-features .icon {width:14px;height:14px}
.auth-layout .login-card {max-width:none;margin:0;border:0;border-radius:0;padding:clamp(24px,4vw,46px);background:transparent;align-self:center}
.login-card h2 {font-size:28px;letter-spacing:-.035em}
.login-card p {font-size:14px}
.auth-icon {margin-bottom:12px}
#login .primary {justify-content:space-between;text-align:left}
.loading {display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);padding:30px}
.loading-dot {width:9px;height:9px;border-radius:50%;background:var(--primary);animation:breathe 1s alternate infinite}
@keyframes breathe {to{opacity:.3}}
@media(max-width:960px){
 .wrap {width:calc(100% - 44px)}
 #nav a {gap:4px;font-size:12px;padding-inline:7px}
 #nav a .icon {display:none}
 .hero {padding-inline:28px}
}
@media(max-width:760px){
 .wrap {width:calc(100% - 32px)}
 .site-header .nav {min-height:62px;display:flex;flex-wrap:wrap;row-gap:0}
 .brand-logo {width:34px;height:34px}
 .brand {gap:7px}
 .brand-copy strong {font-size:13px}
 .brand-copy small {font-size:10px}
 .actions {margin-left:auto;gap:5px}
 .actions .avatar,.mobile-menu {display:inline-grid;place-items:center;width:34px;height:34px}
 .header-contribute.primary {padding:5px 8px;min-height:34px;font-size:11px;gap:3px}
 .header-contribute .icon {width:13px;height:13px}
 #nav {display:none}
 #nav.expanded {display:flex;order:3;flex:0 0 100%;flex-direction:column;align-items:stretch;padding:6px 0}
 #nav a {min-height:42px;padding:7px 12px}
 #nav a .icon {display:inline-block}
 .hero {margin:16px 0;min-height:0;padding:21px 19px;border-radius:15px}
 body[data-view=kho] .hero {min-height:0;padding:24px 19px}
 .hero h1 {font-size:clamp(28px,8vw,44px)}
 .hero .hero-art {width:35%;opacity:.38}
 .hero-illustration {display:none}
 .hero-shortcuts {margin-top:13px}
 .hero-link {min-height:36px;font-size:12px}
 .filter-panel {padding:13px}
 .catalog-toolbar {gap:6px}
 .search {padding-inline:8px}
 .field select {padding-left:6px;max-width:100%}
 .sort {height:36px}
 .sectionbar {margin:20px 0 10px}
 .controls:has(.saved-shortcut) {width:auto}
 .grid:not(.list) {grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))}
 .panel {padding:15px}
 .tableflow {padding:2px 8px}
 .report {grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .report .panel {padding:9px 7px}
 .report .panel p {font-size:11px}
 .metric {font-size:22px}
 .auth-layout {display:flex;flex-direction:column;margin-top:18px;width:min(520px,100%);border-radius:16px}
 .auth-brand {padding:20px}
 .auth-brand img,.auth-features {display:none}
 .auth-brand h1 {font-size:33px;margin:.2em 0}
 .auth-brand br {display:none}
 .auth-brand p {font-size:13px}
 .auth-layout .login-card {align-self:stretch;padding:21px}
 .site-footer {flex-direction:column;gap:3px}
}
@media(max-width:370px){
 .wrap {width:calc(100% - 22px)}
 .actions {gap:4px}
 .brand-copy strong {font-size:12px}
 .brand-copy small {font-size:9px}
 .header-contribute.primary span {display:none}
 .header-contribute.primary {width:34px}
 .search kbd {display:none}
}
@media(prefers-color-scheme:dark) {
 :root {color-scheme:dark;--bg:#10201c;--surface:#192d27;--text:#edf5ee;--muted:#b4cbbf;--line:#3a584d;--alt:#233d33;--primary:#9bd3ba;--primary-hover:#b9e4d0;--on-primary:#122d24;--shadow:0 12px 32px #0a1d163d}
}
@media(prefers-reduced-motion:reduce) {.loading-dot{animation:none}}
.storage-card {max-width:800px}
.storage-header {display:flex;gap:12px;align-items:flex-start}
.storage-header .auth-icon {margin:0}
.storage-header p {font-size:13px;margin:3px 0 9px}
.storage-steps {padding:12px 15px;background:var(--alt);border:1px solid var(--line);border-radius:10px;margin:12px 0;margin-inline-end:auto}
.storage-steps h4 {font-size:14px}
.storage-steps ol {padding-left:20px;margin:5px 0 0;font-size:13px;color:var(--muted)}
.storage-steps li+li {margin-top:4px}

/* Ấn phẩm thư viện: nền giấy, tiêu đề Lora và ảnh tĩnh vật theo nhóm môn. */
:root {
 --bg:#f7f5ed;--surface:#fffdf7;--text:#202a26;--muted:#59625b;--line:#d7d6c9;
 --alt:#eeede2;--primary:#205343;--primary-hover:#123b30;--accent:#a8442a;
 --shadow:0 5px 18px #3035270b;--radius:5px;--serif:"Lora",Georgia,serif;
}
.wrap {width:min(1320px,calc(100% - clamp(40px,8vw,144px)))}
.site-header {background:var(--bg);backdrop-filter:none;border-top:3px solid var(--primary)}
.site-header .nav {min-height:75px}
.brand-copy strong {font-family:var(--serif);font-size:18px}
.brand-copy small {font-size:11px;letter-spacing:.02em}
#nav a {border-radius:2px}
#nav a.on {color:var(--primary);background:transparent;box-shadow:inset 0 -2px var(--accent)}
.primary,a.primary,.soft,.hero-link,.field,.search,.sort,.switch,.close,.tabs button,form input,form select,textarea {border-radius:4px}
.hero,body[data-view=kho] .hero {margin:28px 0 18px;padding:0;border:0;border-radius:4px;background:#203e32;min-height:0;display:grid;grid-template-columns:1fr 1.12fr;gap:0}
.hero .hero-copy {padding:clamp(26px,3.6vw,55px);max-width:none}
.hero h1,.auth-brand h1,.login-card h2,.sectionbar h2,.detail-title,.dialogtop h2,.filter-heading h2 {
 font-family:var(--serif);font-weight:400;letter-spacing:-.045em;line-height:1.22;
}
.hero h1 {font-size:clamp(35px,4.4vw,64px);margin:12px 0}
.hero p {color:#e0e7d9;max-width:40ch}
.hero .hero-art {position:relative;inset:auto;align-self:stretch;width:100%;opacity:1;min-height:100%;background:center 58% / cover url("/images/thu-vien.webp")}
body[data-view=tuan] .hero-art {background-image:url("/images/tu-nhien.webp")}
body[data-view=toi] .hero-art {background-image:url("/images/thuc-hanh.webp")}
body[data-view=dashboard] .hero-art {background-image:url("/images/xa-hoi.webp")}
.hero .eyebrow {color:#e7d5a8;font-size:10px}
.hero-link-main {background:#f0dfac;border-color:#f0dfac;color:#293b2f}
.hero-link-main:hover {background:#fff1ca}
.collection-shelf {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 26px}
.collection-tile {padding:0 12px 0 0;display:flex;align-items:center;gap:15px;color:var(--text);text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:4px;overflow:hidden}
.collection-tile img {width:28%;height:82px;object-fit:cover;flex:none}
.collection-tile span {min-width:0;flex:1}
.collection-tile strong {display:block;font:400 clamp(15px,1.45vw,21px)/1.32 var(--serif);letter-spacing:-.035em}
.collection-tile small {color:var(--muted);font-size:11px}
.collection-tile>.icon {width:15px;height:15px;color:var(--primary);flex:none}
.collection-tile:hover,.collection-tile[aria-pressed=true] {background:var(--alt);border-color:var(--primary)}
.filter-panel,.panel,.empty,.detail-meta,.card,.tableflow {box-shadow:none;border-radius:4px}
.filter-panel {border-top:2px solid var(--primary);padding:20px 22px}
.filter-heading h2 {font-size:23px}
.filter-heading>span,.empty-icon,.auth-icon {border-radius:4px}
.sectionbar {margin-top:29px}
.sectionbar h2 {font-size:clamp(23px,2.2vw,34px)}
.card {overflow:hidden}
.cover {padding:0;background:var(--alt)}
.cover:after {display:none}
.cover-photo {width:100%;height:100%;object-fit:cover;display:block}
.list .cover {padding:0}
.badge {border-radius:4px}
.tabs {border-bottom:1px solid var(--line);padding:0 0 10px}
.tabs button[aria-pressed=true] {color:var(--on-primary)}
.metric {font-family:var(--serif);font-weight:400}
.detail-head {border-top:3px solid var(--primary)}
dialog {border-radius:7px}
dialog:has(#contribute) .dialogtop {border-top:4px solid var(--accent);padding-top:15px}
#contribute fieldset {border-radius:4px}
.site-footer {font-size:12px;border-top:1px solid var(--line);padding-block:20px}
.auth-layout {width:min(1180px,100%);grid-template-columns:minmax(0,1.32fr) minmax(340px,.9fr);margin:clamp(28px,6vh,72px) auto;border:1px solid var(--line);border-radius:4px;box-shadow:none}
.auth-brand {background:#213f32;padding:0;display:grid;grid-template-rows:minmax(0,1fr) auto;position:relative;min-height:clamp(440px,62vh,630px)}
.auth-brand .auth-photo {position:absolute;display:block;inset:0;width:100%;height:100%;object-fit:cover;object-position:55% 55%;margin:0;padding:0;border-radius:0}
.auth-caption {position:relative;grid-row:2;background:#203e32;color:#faf4dd;border-top:4px solid #c8a86b;padding:23px clamp(24px,3.5vw,48px) 25px}
.auth-caption h1 {font-size:clamp(32px,4.1vw,62px);margin:0 0 4px}
.auth-caption p {color:#e1e7d8;font-size:13px}
.auth-layout .login-card {padding:clamp(26px,4vw,65px);width:100%}
.login-card h2 {font-size:clamp(33px,3.4vw,50px);margin:0 0 7px}
#login {gap:11px;margin-top:26px}
#login input {min-height:47px;width:100%;background:var(--bg)}
#login label {font-weight:600;font-size:13px}
#login .primary {width:100%;min-height:46px}
.password-box {position:relative;margin-top:-6px}
.password-box input {padding-right:58px}
.password-box button {position:absolute;right:2px;top:2px;bottom:2px;border:0;background:transparent;color:var(--primary);width:53px;font-size:13px;font-weight:600}
@media(max-width:900px) {
 .collection-tile {gap:8px}.collection-tile img {width:22%}
 .hero .hero-copy {padding:26px}
}
@media(max-width:760px) {
 .wrap {width:calc(100% - 32px)}
 .site-header .nav {min-height:59px;padding-block:4px}
 .brand-copy strong {font-size:15px}
 .hero,body[data-view=kho] .hero {grid-template-columns:1fr;margin:16px 0 12px;padding:0}
 .hero .hero-copy {padding:21px}
 body[data-view=kho] .hero-art {height:clamp(108px,30vw,175px)}
 body:not([data-view=kho]) .hero-art {display:none}
 .hero h1 {margin:5px 0;font-size:37px}
 .hero p {font-size:13px}
 .collection-shelf {grid-template-columns:1fr;gap:0;border:1px solid var(--line);border-radius:4px;overflow:hidden;margin-bottom:18px}
 .collection-tile {border:0;border-radius:0;padding:0 13px 0 0;gap:12px}
 .collection-tile+.collection-tile {border-top:1px solid var(--line)}
 .collection-tile img {width:65px;height:49px}
 .collection-tile strong {font-size:16px}.collection-tile small {font-size:10px}
 .collection-tile span {display:flex;align-items:baseline;justify-content:space-between;gap:6px;flex-wrap:wrap}
 .filter-panel {padding:15px}
 .auth-layout {display:flex;width:min(530px,100%);margin:18px auto 25px}
 .auth-brand {min-height:0;display:block}
 .auth-brand .auth-photo {position:static;display:block;height:clamp(125px,38vw,195px);object-position:center 60%}
 .auth-caption {padding:12px 19px;border-top-width:2px}
 .auth-caption h1 {font-size:31px}
 .auth-caption p {font-size:12px}
 .auth-layout .login-card {padding:21px}
 .login-card h2 {font-size:30px}
 #login {margin-top:17px}
}
@media(prefers-color-scheme:dark){
 :root {--bg:#17221d;--surface:#202d26;--text:#f4f0df;--muted:#bcc5b7;--line:#435349;--alt:#2c3b31;--primary:#b9d8bf;--primary-hover:#d4e7ce;--accent:#eab48f;--on-primary:#183326}
}
#contribute .source-tabs {border-radius:4px}
#contribute .source-tabs label {min-height:43px}
#contribute .file-drop {background:var(--alt);min-height:125px;padding:18px;border-radius:4px}
#contribute .file-title {font-size:15px}
#contribute .form-fields {padding-top:16px;border-top:1px solid var(--line)}
#contribute .contribute-footer {background:var(--surface);padding-bottom:4px}
[data-view=tuan] .stack>.panel {border-left:3px solid var(--primary)}
[data-view=dashboard] .report .panel {border-top:2px solid var(--accent)}
@media(max-width:760px){
 .actions .avatar,.actions .mobile-menu,.actions .header-contribute {min-height:40px;min-width:40px}
 .collection-tile:focus-visible {outline-offset:-3px}
 #contribute .contribute-footer {position:sticky;bottom:0;z-index:1;padding:9px 0;gap:6px}
 #contribute .contribute-footer small {display:none}
 #contribute .contribute-footer button {min-height:42px}
 #contribute input:not([type=radio]):not([type=file]),#contribute select,#contribute textarea,#login input {font-size:16px}
}

@media(min-width:761px) and (max-width:1050px){.collection-shelf {grid-template-columns:repeat(2,minmax(0,1fr))}}

.send-status:not([hidden]){display:grid;gap:7px;padding:10px 12px;border-left:3px solid var(--primary);background:var(--alt);font-weight:600;font-size:13px}
.send-status progress{width:100%;height:7px;accent-color:var(--primary)}
.viewer:has(.office-reader){display:block;min-height:0}
.office-reader{min-width:0;background:var(--alt)}
.office-head{position:static;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid var(--line);background:var(--surface);backdrop-filter:none}
.office-head>div,.office-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.office-head small{font:600 11px var(--body);letter-spacing:.05em;background:var(--primary);color:var(--on-primary);padding:5px 7px;border-radius:3px}
.office-head strong{font:400 20px var(--serif)}
.office-controls{font-size:13px}.office-controls select{max-width:200px;min-height:37px;border:1px solid var(--line);border-radius:4px;background:var(--surface);padding:4px 8px}
.office-status{padding:18px;color:var(--text)}.office-status .soft{margin:4px}
.office-content{max-width:100%;overflow:auto}.office-content:empty{display:none}
.word-paper{width:min(760px,calc(100% - 32px));margin:18px auto;padding:clamp(20px,4vw,58px);background:#fffefb;color:#242a27;box-shadow:0 2px 8px #15291b19;line-height:1.72;overflow-wrap:anywhere;font-family:var(--serif)}
.word-paper :is(h1,h2,h3,h4,p,li){color:inherit;font-family:inherit}.word-paper p{margin:.65em 0;font-size:1em}.word-paper h1{font-size:1.85em}.word-paper h2{font-size:1.45em}.word-paper img{max-width:100%;height:auto}.word-paper table{width:100%;border-collapse:collapse}.word-paper td,.word-paper th{border:1px solid #b6c0b9;padding:5px 8px}
.office-range{padding:7px 15px;font-size:12px;color:var(--muted)}
.sheet-scroll{max-height:62vh;overflow:auto;background:var(--surface)}.sheet-scroll table{border-spacing:0;width:max-content;min-width:100%;font:400 13px/1.55 var(--body)}
.sheet-scroll :is(td,th){min-width:70px;max-width:300px;border:solid var(--line);border-width:0 1px 1px 0;padding:7px 11px;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}
.sheet-scroll th{background:var(--alt);font-weight:600}.sheet-scroll thead th{position:sticky;top:0;z-index:1}.sheet-scroll tr>th:first-child{position:sticky;left:0;min-width:40px;text-align:right}.sheet-scroll thead th:first-child{z-index:2}
.slide-frame{display:block;width:100%;max-height:min(72vh,900px);aspect-ratio:16/9;border:0;background:white}
@media(max-width:600px){.office-head{padding:10px}.office-controls select{max-width:155px}.word-paper{width:100%;margin:0;padding:18px}.office-head strong{font-size:17px}.sheet-scroll :is(td,th){padding:6px 8px}}
