:root {
  --ink: #24343b;
  --navy: #17313b;
  --navy-deep: #102630;
  --navy-soft: #29424b;
  --paper: #f4f2ed;
  --paper-light: #fffdfa;
  --paper-warm: #eae7de;
  --line: #dcded8;
  --line-strong: #cbd1ca;
  --muted: #78847f;
  --orange: #c46b4e;
  --orange-deep: #a75038;
  --orange-soft: #f1ddd4;
  --danger: #a84f46;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.text-button, .inline-button { appearance: none; border: 0; background: transparent; color: var(--orange-deep); font-weight: 700; padding: 0; }
.text-button:hover, .inline-button:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #dc9475; outline-offset: 3px; }

/* Entry */
.loading-screen { display: flex; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; gap: 17px; color: var(--navy); background: radial-gradient(circle at 50% 43%, #fffdfa 0, var(--paper) 64%); }
.loading-screen p { color: var(--muted); letter-spacing: .12em; font-size: 12px; }
.loading-mark { display: flex; gap: 5px; align-items: center; transform: skewY(-17deg); }
.loading-mark span { width: 14px; height: 33px; border: 2px solid var(--navy); animation: loading-pulse 1.25s ease-in-out infinite; }
.loading-mark span:nth-child(2) { animation-delay: .15s; }
.loading-mark span:nth-child(3) { animation-delay: .3s; }
@keyframes loading-pulse { 0%, 100% { background: transparent; transform: translateY(0); } 50% { background: var(--orange); transform: translateY(-5px); } }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 50%) 1fr; }
.auth-visual { position: relative; min-height: 650px; overflow: hidden; background: #18343e; color: #f7f2e9; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 5vw, 76px); isolation: isolate; }
.auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 69% 43%, rgba(100, 126, 116, .28), transparent 35%), repeating-linear-gradient(100deg, transparent 0 72px, rgba(255,255,255,.025) 73px 74px); }
.auth-visual::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: rgba(255,255,255,.2); }
.auth-brand, .sidebar-brand { display: flex; align-items: center; gap: 16px; font-family: var(--serif); letter-spacing: .09em; font-size: 25px; font-weight: 700; line-height: 1.1; }
.auth-brand em, .sidebar-brand small { display: block; margin-top: 7px; font-family: var(--sans); font-size: 9px; font-style: normal; letter-spacing: .25em; font-weight: 600; opacity: .58; }
.brand-symbol { width: 36px; height: 38px; display: inline-flex; align-items: center; gap: 3px; transform: skewY(-18deg); flex: none; }
.brand-symbol i { display: block; width: 9px; height: 27px; border: 2px solid currentColor; border-radius: 1px; }
.brand-symbol i:nth-child(2) { height: 34px; }
.brand-symbol i:nth-child(3) { height: 23px; }
.auth-art { width: min(430px, 73%); height: min(470px, 48vh); position: absolute; top: 27%; right: 8%; pointer-events: none; }
.art-circle { position: absolute; width: 84%; aspect-ratio: 1; left: 13%; top: -8%; border: 1px solid rgba(241,236,220,.13); border-radius: 50%; box-shadow: 0 0 0 52px rgba(241,236,220,.025), 0 0 0 105px rgba(241,236,220,.012); }
.art-sheet { position: absolute; width: 65%; height: 76%; left: 19%; top: 7%; border: 1px solid #dddad0; background: #edeae0; box-shadow: 4px 20px 35px rgba(5,20,26,.15); }
.art-sheet-back { transform: rotate(-15deg) translate(-20px, 9px); opacity: .62; }
.art-sheet-middle { transform: rotate(11deg) translate(24px, 7px); background: #c6cec3; opacity: .85; }
.art-sheet-front { transform: rotate(-2deg); background: linear-gradient(145deg, #fbf8ee, #e7e2d5); padding: 18% 13%; display: flex; flex-direction: column; gap: 22px; }
.art-sheet-front::before { content: ""; position: absolute; top: 11%; left: 13%; width: 21%; height: 5px; background: var(--orange); }
.art-rule { display: block; width: 100%; height: 1px; background: #c4c3b9; }
.art-rule.short { width: 62%; }
.art-corner { width: 60px; height: 60px; border: 1px solid #c6c6bc; position: absolute; bottom: 9%; right: 12%; transform: rotate(45deg); }
.auth-visual-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0; color: var(--orange); font-size: 10px; letter-spacing: .24em; font-weight: 800; }
.eyebrow.light { color: #dba98f; }
.auth-visual-copy p { margin: 17px 0 24px; font-family: var(--serif); font-size: clamp(35px, 3.8vw, 59px); line-height: 1.34; letter-spacing: .08em; font-weight: 500; }
.visual-caption { color: #b3c0bb; font-size: 11px; letter-spacing: .13em; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 65px clamp(34px, 7vw, 130px); background: radial-gradient(circle at 65% 27%, #fffdfa 0, #f4f2ed 72%); }
.auth-panel-inner { width: min(100%, 405px); }
.auth-overline { display: inline-flex; align-items: center; gap: 10px; color: var(--orange-deep); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #c7805f; display: inline-block; box-shadow: 0 0 0 4px rgba(196,107,78,.12); flex: none; }
.auth-panel h1 { margin: 26px 0 8px; color: var(--navy); font-family: var(--serif); font-size: clamp(37px, 3.5vw, 52px); font-weight: 600; letter-spacing: .045em; }
.auth-description { margin: 0 0 45px; color: var(--muted); line-height: 1.9; }
.field-label { display: block; margin: 0 0 10px; font-weight: 700; color: #3e4b4b; font-size: 12px; letter-spacing: .06em; }
.confirm-label, .stacked-label { margin-top: 22px; }
.password-field { position: relative; display: flex; align-items: center; width: 100%; height: 56px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.66); transition: border-color .2s, box-shadow .2s; }
.password-field:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(196,107,78,.1); }
.password-field > .icon { margin-left: 18px; color: var(--muted); }
.password-field input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; background: transparent; color: var(--navy); padding: 0 12px; }
.password-field input::placeholder { color: #a1a9a3; }
.password-toggle { align-self: stretch; padding: 0 17px; border: 0; background: transparent; color: var(--orange-deep); font-weight: 700; font-size: 12px; }
.field-hint { color: #8b918a; margin: 10px 0 0; line-height: 1.6; font-size: 11px; }
.form-error { margin: 13px 0 0; color: var(--danger); font-size: 12px; line-height: 1.6; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 11px; min-height: 43px; border: 1px solid transparent; padding: 0 19px; font-weight: 700; font-size: 12px; letter-spacing: .055em; white-space: nowrap; transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button-primary { background: var(--orange); color: white; box-shadow: 0 7px 16px rgba(145,64,44,.13); }
.button-primary:hover:not(:disabled) { background: var(--orange-deep); box-shadow: 0 10px 19px rgba(145,64,44,.22); }
.button-primary:disabled { background: #d3c5bd; color: #f2eee9; box-shadow: none; }
.button-outline { background: transparent; color: var(--navy); border-color: #bcc9c5; }
.button-outline:hover:not(:disabled) { border-color: var(--navy); background: rgba(23,49,59,.04); }
.button-quiet { background: transparent; color: #677570; }
.button-quiet:hover { background: #f3f2ed; color: var(--navy); }
.button-danger { background: var(--danger); color: white; }
.button-danger:hover { background: #8d3c35; }
.auth-submit { margin-top: 27px; width: 100%; min-height: 56px; justify-content: space-between; padding: 0 22px; font-size: 13px; }
.auth-submit .icon { width: 20px; height: 20px; }
.auth-foot { display: flex; align-items: center; gap: 15px; margin-top: 90px; color: #9baba4; font-size: 11px; letter-spacing: .08em; }
.foot-rule { height: 1px; width: 26px; background: var(--orange); }

/* Library frame */
.workspace { min-height: 100vh; display: grid; grid-template-columns: 255px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-height: 580px; display: flex; flex-direction: column; overflow: hidden; background: var(--navy); color: #eef0e8; z-index: 25; }
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .43; background: radial-gradient(circle at -35% -10%, rgba(146,169,151,.24), transparent 37%), repeating-linear-gradient(100deg, transparent 0 70px, rgba(255,255,255,.018) 71px 72px); }
.sidebar-head, .sidebar-nav, .sidebar-bottom { position: relative; z-index: 1; }
.sidebar-head { padding: 34px 28px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-brand { font-size: 22px; gap: 12px; }
.sidebar-brand .brand-symbol { width: 32px; transform: scale(.86) skewY(-18deg); transform-origin: left center; }
.sidebar-edition { display: block; margin-top: 24px; color: #94aaa8; font-size: 10px; letter-spacing: .13em; }
.sidebar-nav { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; padding: 28px 16px 20px; }
.sidebar-section-label { display: flex; justify-content: space-between; align-items: center; margin: 0 12px 15px; color: #a1b5b2; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.sidebar-section-label span { color: #6e898b; font-size: 9px; letter-spacing: .09em; }
.nav-item { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 42px; border: 1px solid transparent; background: transparent; color: #bbc9c5; text-align: left; padding: 0 12px; border-radius: 4px; font-size: 12px; transition: background .2s, color .2s, border-color .2s; }
.nav-item:hover { background: rgba(255,255,255,.055); color: white; }
.nav-item.active { color: #fffdf7; background: rgba(233,239,228,.12); border-color: rgba(255,255,255,.08); }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 21px; background: #d68767; border-radius: 2px; }
.nav-item .icon { width: 17px; height: 17px; color: #89a4a0; }
.nav-item.active .icon { color: #e8aa8b; }
.nav-count { margin-left: auto; color: #84a09b; font-size: 10px; font-variant-numeric: tabular-nums; }
.category-heading { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding-right: 8px; }
.category-heading .sidebar-section-label { margin-bottom: 12px; flex: 1; gap: 10px; }
.category-heading .sidebar-section-label span { margin-left: auto; }
.sidebar-add { width: 23px; height: 23px; display: grid; place-items: center; padding: 0; margin-top: -12px; background: transparent; border: 1px solid rgba(255,255,255,.22); color: #a6b8b1; border-radius: 2px; }
.sidebar-add:hover { background: rgba(255,255,255,.12); color: white; }
.sidebar-add .icon { width: 14px; height: 14px; }
.category-list { display: grid; gap: 2px; }
.category-row { display: flex; align-items: center; position: relative; border-radius: 4px; }
.category-row .nav-item { padding-right: 0; min-width: 0; }
.category-row .nav-item span:nth-child(2) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.category-row .nav-count { margin-left: auto; padding-right: 1px; }
.category-more { flex: none; display: grid; place-items: center; width: 29px; height: 34px; margin: 0 5px 0 -2px; border: 0; border-radius: 3px; background: transparent; color: #92a9a4; opacity: 0; }
.category-row:hover .category-more, .category-more:focus-visible, .category-row.active .category-more { opacity: 1; }
.category-more:hover { background: rgba(255,255,255,.1); color: white; }
.category-more .icon { width: 15px; height: 15px; }
.category-menu { position: absolute; z-index: 10; right: 6px; top: calc(100% - 2px); min-width: 128px; padding: 5px; border: 1px solid rgba(255,255,255,.18); background: #25434d; box-shadow: 0 12px 30px rgba(0,0,0,.25); border-radius: 5px; }
.category-menu button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px; border: 0; background: transparent; color: #f3f4eb; text-align: left; border-radius: 3px; font-size: 11px; }
.category-menu button:hover { background: rgba(255,255,255,.1); }
.category-menu button.danger { color: #f0b0a4; }
.category-menu .icon { width: 15px; height: 15px; }
.sidebar-bottom { padding: 0 19px 21px; }
.privacy-note { display: flex; align-items: center; gap: 11px; padding: 17px 12px; border-top: 1px solid rgba(255,255,255,.12); color: #e1eae3; line-height: 1.55; font-size: 11px; }
.privacy-note .icon { width: 18px; height: 18px; color: #d5997a; }
.privacy-note small { font-size: 10px; color: #90aaa3; }
.logout-button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 39px; padding: 0 12px; background: transparent; border: 1px solid rgba(255,255,255,.14); border-radius: 3px; color: #a4b8b3; font-size: 11px; text-align: left; }
.logout-button:hover { background: rgba(255,255,255,.07); color: white; }
.logout-button .icon { width: 17px; height: 17px; }
.sidebar-backdrop { display: none; }

.main-content { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 95% 1%, #faf9f4 0, transparent 28%), var(--paper); }
.topbar { height: 77px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(28px, 5vw, 78px); border-bottom: 1px solid #e1e2db; color: #7d8983; }
.breadcrumb { display: flex; align-items: center; gap: 11px; font-size: 11px; }
.breadcrumb strong { color: var(--navy); font-weight: 700; }
.breadcrumb-slash { color: #c2c9c3; }
.topbar-right { display: flex; align-items: center; gap: 24px; color: #9aa59f; font-size: 10px; letter-spacing: .11em; }
.topbar-private { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }
.topbar-private .status-dot { width: 5px; height: 5px; box-shadow: 0 0 0 3px rgba(196,107,78,.09); }
.today-label { border-left: 1px solid #d9ddd7; padding-left: 24px; font-variant-numeric: tabular-nums; }
.mobile-menu { display: none; }
.content-wrap { width: min(100%, 1550px); flex: 1; padding: 57px clamp(28px, 5vw, 78px) 80px; margin: 0 auto; }
.collection-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.eyebrow-line { display: inline-block; width: 27px; height: 1px; margin: 0 7px 3px; background: currentColor; opacity: .6; }
.collection-header h1 { margin: 15px 0 11px; color: var(--navy); font-family: var(--serif); font-weight: 600; letter-spacing: .04em; font-size: clamp(39px, 4.1vw, 62px); line-height: 1.2; }
.title-period { color: var(--orange); }
.collection-description { margin: 0; color: #809089; font-size: 12px; line-height: 1.75; }
.upload-open-button { min-height: 47px; padding: 0 20px; margin-bottom: 5px; }
.upload-open-button .icon { width: 17px; height: 17px; }
.collection-meta { display: flex; align-items: flex-end; justify-content: space-between; margin: 52px 0 20px; padding-bottom: 18px; border-bottom: 1px solid #ccd3cc; }
.result-number { color: var(--navy); font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.result-label { margin-left: 10px; color: #738079; font-size: 11px; }
.meta-aside { color: #9ba69e; font-size: 11px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 25px; }
.search-box { display: flex; align-items: center; gap: 11px; width: min(400px, 62%); min-height: 43px; padding: 0 12px 0 14px; border: 1px solid #d8ddd6; background: rgba(255,255,255,.58); transition: border-color .2s, box-shadow .2s; }
.search-box:focus-within { border-color: #c88669; box-shadow: 0 0 0 3px rgba(196,107,78,.1); }
.search-box .icon { width: 16px; height: 16px; color: #889791; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--navy); font-size: 11px; }
.search-box input::placeholder { color: #a3aba5; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.search-box kbd { flex: none; border: 1px solid #dfe1db; border-radius: 3px; padding: 3px 5px; color: #a6aea7; font-family: var(--sans); font-size: 9px; }
.sort-box { display: flex; align-items: center; gap: 8px; color: #8a968f; font-size: 11px; white-space: nowrap; }
.sort-box select { max-width: 140px; padding: 10px 26px 10px 10px; border: 1px solid #d8ddd6; border-radius: 0; color: #3e534f; background: #f9f8f4; cursor: pointer; font-weight: 600; font-size: 11px; }

/* Files */
.file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-content: start; }
.file-card { min-width: 0; overflow: hidden; border: 1px solid #dee0d9; background: #fffefa; box-shadow: 0 7px 24px rgba(40,60,54,.035); transition: transform .25s, box-shadow .25s, border-color .25s; animation: card-rise .35s both; }
.file-card:hover { transform: translateY(-4px); border-color: #c2cfc7; box-shadow: 0 17px 30px rgba(37,58,50,.08); }
@keyframes card-rise { from { opacity: 0; transform: translateY(11px); } to { opacity: 1; transform: translateY(0); } }
.file-visual { position: relative; display: flex; align-items: center; justify-content: center; height: 177px; overflow: hidden; background: #eaece5; }
.file-visual::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 24px, rgba(45,77,67,.03) 25px), repeating-linear-gradient(90deg, transparent 0 24px, rgba(45,77,67,.03) 25px); }
.file-visual.pdf { background: #eee6e0; }
.file-visual.excel { background: #e2eae3; }
.file-visual.blend { background: #ebe9df; }
.file-visual.image { background: #e2e8e4; }
.file-visual.image::before { display: none; }
.file-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-paper { position: relative; width: 96px; height: 123px; display: grid; place-items: center; background: #fffdf7; border: 1px solid rgba(34,59,55,.12); box-shadow: 7px 10px 16px rgba(33,63,53,.11); transform: rotate(-5deg); }
.file-paper::before { content: ""; position: absolute; top: 15px; left: 15px; width: 38px; height: 3px; background: currentColor; opacity: .35; }
.file-paper::after { content: ""; position: absolute; bottom: 17px; left: 15px; right: 15px; height: 14px; border-top: 1px solid #d8ded7; border-bottom: 1px solid #d8ded7; }
.file-paper span { margin-top: 5px; font-family: Georgia, serif; font-size: 24px; font-weight: 700; letter-spacing: -.04em; }
.file-visual.pdf .file-paper { color: #a35b4d; }
.file-visual.excel .file-paper { color: #4f7d62; }
.file-visual.blend .file-paper { color: #b57649; }
.file-type-badge { position: absolute; bottom: 12px; left: 13px; z-index: 1; padding: 5px 8px; background: rgba(255,253,248,.9); color: #51665f; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; backdrop-filter: blur(4px); }
.file-card-body { padding: 17px 18px 14px; }
.file-category { display: inline-block; max-width: 100%; color: #bd6f55; font-size: 10px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-name { display: block; width: 100%; margin: 8px 0 11px; border: 0; background: transparent; color: #253b3f; font-size: 14px; font-weight: 700; line-height: 1.45; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; }
.file-name:hover { color: var(--orange-deep); }
.file-meta { display: flex; justify-content: space-between; gap: 8px; color: #98a39b; font-size: 10px; font-variant-numeric: tabular-nums; }
.file-actions { display: flex; align-items: center; gap: 3px; border-top: 1px solid #e7e9e2; padding: 7px 11px; }
.file-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 35px; height: 30px; padding: 0 7px; border: 0; border-radius: 3px; background: transparent; color: #687e75; font-size: 10px; }
.file-action:hover { background: #eef2ec; color: var(--navy); }
.file-action.danger { margin-left: auto; color: #aa746e; }
.file-action.danger:hover { background: #fbebea; color: var(--danger); }
.file-action .icon { width: 15px; height: 15px; }
.file-action.primary-action { color: var(--orange-deep); font-weight: 700; }
.file-action.primary-action:hover { background: #f7e9e2; }
.empty-state, .list-error { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 65px 20px 75px; background: rgba(255,255,255,.34); border: 1px dashed #ced7cf; }
.empty-art { width: 79px; height: 79px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: #e8eee9; color: #7d9990; }
.empty-art .icon { width: 33px; height: 33px; stroke-width: 1.2; }
.empty-kicker { margin: 0; color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.empty-state h2 { margin: 10px 0 7px; font-family: var(--serif); font-size: 24px; color: var(--navy); }
.empty-state > p:not(.empty-kicker), .list-error p { margin: 0 0 23px; color: #8b9a91; font-size: 12px; line-height: 1.8; }
.list-error { padding: 42px; }
.main-footer { display: flex; justify-content: space-between; gap: 20px; padding: 23px clamp(28px, 5vw, 78px); border-top: 1px solid #e2e5de; color: #9daaa1; font-size: 9px; letter-spacing: .13em; }

/* Dialogs */
.modal-overlay { position: fixed; z-index: 60; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15,36,42,.62); backdrop-filter: blur(5px); animation: overlay-show .17s ease-out both; }
@keyframes overlay-show { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(100%, 580px); max-height: min(92vh, 920px); overflow-y: auto; padding: 29px 32px 31px; background: #fffdfa; border: 1px solid #e7e5de; box-shadow: 0 27px 80px rgba(5,25,30,.23); animation: modal-show .24s ease-out both; }
@keyframes modal-show { from { transform: translateY(13px) scale(.99); opacity: .8; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-small { width: min(100%, 470px); }
.modal-head, .preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.modal-kicker { margin: 0 0 6px; color: var(--orange); font-size: 9px; letter-spacing: .2em; font-weight: 800; }
.modal h2 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: 25px; font-weight: 600; }
.icon-button { width: 33px; height: 33px; display: grid; place-items: center; flex: none; border: 1px solid #dce2db; background: transparent; color: #667a71; }
.icon-button:hover { background: #edf1ec; color: var(--navy); }
.icon-button .icon { width: 17px; height: 17px; }
.modal-intro { margin: 14px 0 22px; color: #849188; line-height: 1.7; font-size: 12px; }
.modal .field-label { margin-top: 22px; }
.modal-input, .modal-select { width: 100%; height: 43px; padding: 0 13px; border: 1px solid #cbd5cd; background: #fff; color: var(--navy); border-radius: 0; outline: 0; }
.modal-input:focus, .modal-select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(196,107,78,.1); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.modal-actions .button { min-width: 100px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 225px; padding: 25px 14px; border: 1px dashed #aebfb1; background: #f4f7f1; text-align: center; color: var(--navy); transition: background .2s, border-color .2s; }
.drop-zone.drag-over { background: #e8f0e7; border-color: var(--orange); }
.drop-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid #bfd0c2; border-radius: 50%; color: var(--orange); }
.drop-icon .icon { width: 22px; height: 22px; }
.drop-zone strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.drop-zone > span { margin-top: 7px; color: #7f9188; font-size: 11px; }
.drop-zone small { margin-top: 16px; color: #99a79c; line-height: 1.6; font-size: 10px; }
.upload-selection { margin-top: 19px; }
.selection-head { display: flex; justify-content: space-between; margin-bottom: 9px; color: #42574f; font-size: 11px; }
.selection-list { max-height: 160px; overflow-y: auto; border-top: 1px solid #e5e9e2; }
.selection-item { display: flex; align-items: center; gap: 9px; padding: 8px 2px; border-bottom: 1px solid #e5e9e2; color: #51645a; font-size: 11px; }
.selection-item .icon { width: 15px; height: 15px; color: var(--orange); }
.selection-item span { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.selection-item small { color: #98a69b; font-size: 10px; white-space: nowrap; }
.selection-remove { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: #a28a83; }
.selection-remove:hover { color: var(--danger); }
.selection-remove .icon { color: inherit; }
.upload-progress { margin-top: 22px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; color: #638175; font-size: 11px; }
.progress-track { height: 5px; background: #e0e8e0; }
.progress-fill { height: 100%; width: 0; background: var(--orange); transition: width .15s; }
.confirm-message { margin: 19px 0 8px; color: #66776f; line-height: 1.9; font-size: 12px; }
.modal-preview { width: min(96vw, 1100px); height: min(91vh, 890px); display: flex; flex-direction: column; overflow: hidden; padding: 18px 22px 22px; }
.preview-head { align-items: center; flex: none; padding-bottom: 15px; }
.preview-head h2 { max-width: min(65vw, 640px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); font-size: 15px; }
.preview-actions { display: flex; align-items: center; gap: 9px; }
.preview-actions .button { min-height: 34px; padding: 0 12px; }
.preview-actions .button .icon { width: 15px; height: 15px; }
.preview-content { min-height: 0; flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; background: #e5eae5; }
.preview-content img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-content iframe { width: 100%; height: 100%; border: 0; background: white; }
.pdf-preview-note { flex: none; margin: 11px 0 0; color: #71857a; text-align: center; font-size: 11px; line-height: 1.5; }
.toast-region { position: fixed; z-index: 100; bottom: 24px; right: 24px; display: grid; gap: 9px; width: min(350px, calc(100vw - 40px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; color: #fffefa; background: var(--navy); box-shadow: 0 12px 34px rgba(7,33,37,.22); font-size: 12px; line-height: 1.6; pointer-events: auto; animation: toast-in .2s ease-out both; }
.toast.error { background: #8e453e; }
.toast::before { content: ""; display: block; width: 6px; height: 6px; margin-top: 6px; background: #d7a17e; border-radius: 50%; flex: none; }
.toast.error::before { background: #f0b6a8; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1290px) { .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 990px) { .workspace { grid-template-columns: 218px minmax(0, 1fr); } .sidebar-head { padding-left: 22px; } .content-wrap { padding-left: 34px; padding-right: 34px; } .topbar { padding-left: 34px; padding-right: 34px; } .main-footer { padding-left: 34px; padding-right: 34px; } .auth-visual { padding: 35px; } }
@media (max-width: 760px) {
  .auth-screen { display: block; min-height: 100vh; background: var(--paper); }
  .auth-visual { min-height: 215px; height: 215px; padding: 27px; }
  .auth-art { width: 220px; height: 180px; top: 43%; right: -10%; opacity: .5; }
  .auth-visual-copy p { font-size: 25px; margin: 7px 0 0; }
  .auth-visual-copy .eyebrow, .visual-caption { display: none; }
  .auth-panel { min-height: calc(100vh - 215px); padding: 38px 27px 45px; align-items: flex-start; }
  .auth-panel h1 { margin-top: 18px; font-size: 36px; }
  .auth-description { margin-bottom: 30px; }
  .auth-foot { margin-top: 50px; }
  .workspace { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(82vw, 285px); height: 100dvh; min-height: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 12px 0 35px rgba(13,36,39,.15); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 24; inset: 0; display: block; background: rgba(8,32,35,.47); }
  .category-more { opacity: 1; }
  .topbar { height: 62px; padding: 0 22px; }
  .mobile-menu { display: grid; place-items: center; width: 30px; height: 30px; margin-left: -6px; border: 0; background: transparent; color: var(--navy); }
  .mobile-menu .icon { width: 22px; height: 22px; }
  .topbar-private, .today-label { display: none; }
  .content-wrap { padding: 40px 22px 66px; }
  .collection-header h1 { font-size: 42px; }
  .collection-meta { margin-top: 42px; }
  .main-footer { padding: 22px; }
}
@media (max-width: 560px) {
  .collection-header { align-items: flex-start; flex-direction: column; gap: 19px; }
  .collection-header h1 { margin-top: 12px; font-size: 39px; }
  .upload-open-button { margin: 0; }
  .collection-meta { margin-top: 38px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .sort-box { justify-content: flex-end; }
  .file-grid { grid-template-columns: 1fr; }
  .file-visual { height: 180px; }
  .file-card-body { padding: 16px 18px 13px; }
  .main-footer span:last-child { display: none; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92dvh; padding: 25px 22px 28px; }
  .modal-preview { width: 100%; height: 96dvh; max-height: none; padding: 14px; }
  .preview-head h2 { max-width: 46vw; font-size: 12px; }
  .preview-actions .button { min-width: 35px; padding: 0 8px; }
  .preview-actions .button span { display: none; }
  .toast-region { right: 15px; bottom: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
