:root {
  color-scheme: dark;
  --bg: #0a0d0c;
  --bg-soft: #0e1210;
  --surface: #111512;
  --surface-raised: #151a16;
  --text: #f2ece2;
  --text-soft: #c8c0b5;
  --muted: #8f918a;
  --gold: #d7ab72;
  --gold-bright: #efc98f;
  --line: rgba(215, 171, 114, .25);
  --line-soft: rgba(255, 255, 255, .085);
  --shadow: 0 28px 80px rgba(0, 0, 0, .36);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --mood-wash: rgba(122, 135, 132, .1);
  --mood-glow: rgba(218, 208, 190, .12);
  --wallpaper-filter: saturate(.86) contrast(1.02);
}

body[data-atmosphere="ember"] { --mood-wash: rgba(173, 71, 25, .18); --mood-glow: rgba(244, 149, 63, .22); --wallpaper-filter: saturate(.96) contrast(1.06); }
body[data-atmosphere="jade"] { --mood-wash: rgba(31, 108, 88, .2); --mood-glow: rgba(113, 202, 166, .17); --wallpaper-filter: saturate(.82) hue-rotate(4deg) contrast(1.04); }
body[data-atmosphere="indigo"] { --mood-wash: rgba(45, 47, 112, .24); --mood-glow: rgba(119, 119, 205, .19); --wallpaper-filter: saturate(.8) hue-rotate(10deg) contrast(1.07); }
body[data-atmosphere="copper"] { --mood-wash: rgba(135, 72, 35, .21); --mood-glow: rgba(221, 143, 88, .2); --wallpaper-filter: sepia(.1) saturate(.93) contrast(1.05); }
body[data-atmosphere="moon"] { --mood-wash: rgba(70, 91, 113, .2); --mood-glow: rgba(181, 205, 219, .16); --wallpaper-filter: saturate(.64) contrast(1.08) brightness(.94); }
body[data-atmosphere="moss"] { --mood-wash: rgba(74, 96, 45, .2); --mood-glow: rgba(160, 181, 106, .15); --wallpaper-filter: saturate(.76) hue-rotate(-5deg) contrast(1.04); }
body[data-atmosphere="rosewood"] { --mood-wash: rgba(111, 43, 49, .23); --mood-glow: rgba(198, 105, 103, .18); --wallpaper-filter: saturate(.82) sepia(.06) contrast(1.06); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 74px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; overflow-x: hidden; }
body.menu-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: #15120e; background: var(--gold-bright); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 300; top: 8px; left: 8px; padding: 9px 14px; color: #17130e; background: var(--gold-bright); transform: translateY(-150%); transition: transform .2s; }
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.scroll-progress { position: fixed; z-index: 160; inset: 0 auto auto 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--gold), #f1d3a3); }
.site-header { position: fixed; z-index: 100; inset: 0 0 auto; height: 72px; padding: 0 clamp(28px, 4vw, 66px); display: flex; align-items: center; gap: 48px; border-bottom: 1px solid rgba(255, 255, 255, .1); transition: height .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease); }
.site-header.scrolled { height: 64px; background: rgba(8, 11, 10, .84); border-color: var(--line-soft); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--gold-bright); white-space: nowrap; }
.brand strong { font: 500 24px/1 var(--serif); letter-spacing: .1em; }
.brand > span { color: rgba(238, 202, 146, .45); font: 400 12px/1 Georgia, serif; }
.brand small { font: 500 10px/1.2 Georgia, serif; letter-spacing: .24em; }
.desktop-nav { display: flex; justify-content: center; gap: clamp(24px, 3vw, 46px); margin-left: auto; }
.desktop-nav a { position: relative; padding: 26px 0 22px; color: rgba(240, 233, 222, .68); font: 400 14px/1 var(--serif); letter-spacing: .08em; transition: color .2s; }
.desktop-nav a::after { content: ""; position: absolute; right: 50%; bottom: 12px; left: 50%; height: 1px; background: var(--gold); transition: inset .25s var(--ease); }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); }
.desktop-nav a:hover::after, .desktop-nav a.active::after { right: 0; left: 0; }
.header-admin { display: none; padding: 8px 14px; border: 1px solid var(--line); color: var(--gold-bright); font-size: 12px; }
.menu-button { display: none; width: 40px; height: 40px; padding: 11px 8px; border: 0; background: transparent; cursor: pointer; }
.menu-button span { display: block; width: 24px; height: 1px; margin: 5px auto; background: var(--text); transition: transform .25s, margin .25s; }
.menu-button[aria-expanded="true"] span:first-child { margin-bottom: -1px; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] span:last-child { margin-top: 0; transform: rotate(-45deg); }
.mobile-menu { display: none; }

.hero { position: relative; min-height: 520px; height: min(55svh, 600px); display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid rgba(218, 183, 128, .22); }
.hero-media { position: absolute; inset: -3%; background: url('./assets/hero-desk.jpg') center 48% / cover no-repeat; filter: var(--wallpaper-filter); transform: scale(1.035); animation: heroBreathe 18s ease-in-out infinite alternate; }
.hero-atmosphere { position: absolute; inset: 0; background: radial-gradient(circle at 72% 24%, var(--mood-glow), transparent 34%), linear-gradient(120deg, var(--mood-wash), transparent 56%); mix-blend-mode: screen; opacity: .9; animation: atmosphereDrift 12s ease-in-out infinite alternate; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 8, 7, .94) 0%, rgba(5, 8, 7, .75) 34%, rgba(5, 8, 7, .18) 72%, rgba(5, 8, 7, .08) 100%), linear-gradient(0deg, rgba(7, 10, 9, .74), transparent 56%); }
.hero-content { position: relative; z-index: 2; width: min(900px, 86vw); margin-left: clamp(44px, 5.6vw, 88px); padding-top: 56px; animation: riseIn .9s var(--ease) both; }
.hero h1 { max-width: 810px; margin: 0 0 24px; font: 400 clamp(43px, 3.9vw, 60px)/1.28 var(--serif); letter-spacing: .055em; text-wrap: balance; text-shadow: 0 5px 35px rgba(0, 0, 0, .35); }
.hero p { margin: 0 0 26px; color: rgba(237, 225, 210, .77); font: 400 clamp(15px, 1.3vw, 18px)/1.85 var(--serif); letter-spacing: .08em; }
.primary-button, .outline-button, .quiet-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 18px; padding: 11px 22px; border: 1px solid transparent; cursor: pointer; transition: transform .22s var(--ease), background .22s, border-color .22s, color .22s; }
.primary-button { color: #1c1711; background: linear-gradient(135deg, #f0d3a8, #dcb27a); box-shadow: 0 12px 32px rgba(0, 0, 0, .2); }
.primary-button:hover { transform: translateY(-2px); background: linear-gradient(135deg, #f6dfbd, #e5bd87); }
.outline-button { color: var(--gold-bright); background: transparent; border-color: rgba(215, 171, 114, .58); }
.outline-button:hover { transform: translateY(-1px); border-color: var(--gold-bright); background: rgba(215, 171, 114, .08); }
.quiet-button { padding-inline: 12px; color: var(--text-soft); background: transparent; border-color: transparent; }
.quiet-button:hover { color: var(--gold-bright); }
.primary-button svg, .outline-button svg, .text-link svg, .back-home svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wallpaper-credit { position: absolute; z-index: 3; bottom: 20px; left: clamp(44px, 5.6vw, 88px); display: grid; max-width: min(520px, 70vw); color: rgba(237, 225, 210, .56); font: 400 10px/1.45 var(--sans); transition: color .2s; }
.wallpaper-credit:hover { color: rgba(244, 223, 191, .82); }
.wallpaper-credit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallpaper-credit small { color: rgba(237, 225, 210, .4); }

.section-shell { width: min(1400px, calc(100% - clamp(40px, 7vw, 112px))); margin: 0 auto; }
.latest-section { position: relative; padding: 34px 0 62px; background: radial-gradient(circle at 12% 5%, rgba(216, 172, 112, .055), transparent 32%), var(--bg); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 0 0 22px; }
.section-heading h2 { margin: 0; font: 400 30px/1.25 var(--serif); letter-spacing: .08em; }
.section-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-bright); font-size: 12px; white-space: nowrap; }
.text-link:hover { color: #f6dab0; }
.text-link svg { width: 15px; }
.library-panel { overflow: hidden; min-height: 286px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(135deg, rgba(17, 21, 18, .95), rgba(12, 16, 14, .95)); box-shadow: 0 25px 80px rgba(0, 0, 0, .16); }
.filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px) minmax(160px, 190px) auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.search-field, .select-field { position: relative; height: 40px; display: flex; align-items: center; border: 1px solid rgba(216, 172, 112, .24); background: rgba(7, 10, 9, .48); transition: border-color .2s; }
.search-field:focus-within, .select-field:focus-within { border-color: rgba(239, 201, 143, .75); }
.search-field svg { width: 17px; height: 17px; margin-left: 13px; fill: none; stroke: #9c907e; stroke-width: 1.5; }
.search-field input, .select-field select { width: 100%; height: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.search-field input { padding: 0 12px 0 10px; }
.search-field input::placeholder { color: #777b75; }
.select-field select { padding: 0 36px 0 13px; color: var(--text-soft); appearance: none; cursor: pointer; background: linear-gradient(45deg, transparent 50%, #9b8b74 50%) calc(100% - 17px) 17px / 5px 5px no-repeat, linear-gradient(135deg, #9b8b74 50%, transparent 50%) calc(100% - 12px) 17px / 5px 5px no-repeat; }
.select-field option { color: var(--text); background: #111512; }
.filter-reset { min-width: 86px; border: 0; color: #9c9b94; background: transparent; font-size: 12px; cursor: pointer; }
.filter-reset:hover { color: var(--gold-bright); }
.content-area { min-height: 230px; }
.loading-state, .share-loading { min-height: 230px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.loading-state p, .share-loading p { margin: 0; }
.loading-mark { width: 26px; height: 26px; border: 1px solid rgba(215, 171, 114, .28); border-top-color: var(--gold-bright); border-radius: 50%; animation: spin .9s linear infinite; }
.file-table-wrap { overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table th { padding: 12px 16px; color: #9d978e; border-bottom: 1px solid var(--line-soft); font: 400 11px/1.3 var(--sans); text-align: left; letter-spacing: .04em; }
.file-table th:first-child { width: 35%; }
.file-table th:nth-child(2) { width: 13%; }
.file-table th:nth-child(3) { width: 13%; }
.file-table th:nth-child(4) { width: 10%; }
.file-table th:nth-child(5) { width: 10%; }
.file-table th:last-child { width: 19%; text-align: right; }
.file-table td { padding: 11px 16px; color: #b7b3ab; border-bottom: 1px solid rgba(255, 255, 255, .065); font-size: 11px; vertical-align: middle; }
.file-table tbody tr { transition: background .2s; }
.file-table tbody tr:hover { background: rgba(215, 171, 114, .035); }
.file-table tbody tr:last-child td { border-bottom: 0; }
.file-title { min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--text); }
.file-title > span:last-child { min-width: 0; display: grid; }
.file-title strong { overflow: hidden; color: #ded7cc; font: 400 13px/1.45 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.file-title small { overflow: hidden; margin-top: 1px; color: #737871; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-title:hover strong { color: var(--gold-bright); }
.file-type-mark { flex: 0 0 32px; width: 32px; height: 38px; display: grid; place-items: center; color: #e7c28d; border: 1px solid rgba(215, 171, 114, .38); background: rgba(215, 171, 114, .055); font: 700 8px/1 var(--sans); letter-spacing: -.02em; clip-path: polygon(0 0, 73% 0, 100% 22%, 100% 100%, 0 100%); }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.row-actions a, .row-actions button { min-height: 32px; padding: 6px 12px; border: 1px solid rgba(215, 171, 114, .58); color: var(--gold-bright); background: transparent; font-size: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.row-actions a:hover, .row-actions button:hover { border-color: var(--gold-bright); background: rgba(215, 171, 114, .08); }
.mobile-file-list { display: none; }
.content-empty { min-height: 230px; display: grid; grid-template-columns: 120px minmax(220px, 1fr) auto; align-items: center; gap: 30px; padding: 35px clamp(28px, 5vw, 70px); }
.empty-upload { width: 92px; height: 92px; display: grid; place-items: center; color: var(--gold-bright); border: 1px solid rgba(215, 171, 114, .42); border-radius: 50%; font: 400 26px/1 Georgia, serif; box-shadow: 0 0 0 9px rgba(215, 171, 114, .025); }
.empty-upload svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.content-empty h3 { margin: 0 0 5px; font: 400 22px/1.35 var(--serif); letter-spacing: .06em; }
.content-empty p { margin: 0; color: var(--muted); font-size: 12px; }
.content-empty .outline-button { justify-self: end; font-size: 12px; }
.compact-empty { min-height: 230px; }

.category-section { padding: 68px 0 78px; border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, #0d110f, #0a0d0c); }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.category-card { position: relative; min-height: 200px; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 20px; border: 1px solid rgba(215, 171, 114, .24); border-radius: 8px; color: var(--text); background-image: linear-gradient(0deg, rgba(5, 8, 7, .95) 0%, rgba(5, 8, 7, .55) 58%, rgba(5, 8, 7, .2) 100%), var(--category-cover, radial-gradient(circle at 75% 20%, #29352e, #111512 70%)); background-position: center; background-size: cover; text-align: left; cursor: pointer; isolation: isolate; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.category-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(130deg, transparent, var(--mood-glow)); opacity: .38; transition: opacity .3s; }
.category-card:hover { transform: translateY(-5px); border-color: rgba(239, 201, 143, .62); box-shadow: var(--shadow); }
.category-card:hover::after { opacity: .8; }
.category-count { margin-bottom: 5px; color: #aaa59c; font-size: 10px; }
.category-card strong { max-width: calc(100% - 48px); font: 400 22px/1.3 var(--serif); letter-spacing: .08em; }
.category-arrow { position: absolute; right: 18px; bottom: 18px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--gold-bright); border: 1px solid var(--line); border-radius: 50%; }
.category-arrow svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.category-loading, .category-empty { grid-column: 1 / -1; min-height: 160px; display: grid; place-items: center; padding: 30px; color: var(--muted); border: 1px dashed var(--line); font-size: 12px; text-align: center; }

.about-section { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: clamp(50px, 9vw, 160px); width: min(1400px, calc(100% - clamp(40px, 11vw, 176px))); margin: 0 auto; padding: 82px 0 92px; }
.about-rule { position: absolute; top: 0; left: 0; width: 72px; height: 1px; background: var(--gold); }
.about-copy h2 { margin: 0 0 24px; color: var(--gold-bright); font: 400 30px/1.3 var(--serif); letter-spacing: .08em; }
.about-copy p { max-width: 760px; margin: 8px 0; color: #aaa69e; font: 400 14px/2 var(--serif); }
.about-action { align-self: center; padding-left: clamp(24px, 4vw, 60px); border-left: 1px solid var(--line); }
.about-action p { margin: 0 0 16px; color: var(--text-soft); font: 400 17px/1.5 var(--serif); }
.about-action .outline-button { font-size: 12px; }
.site-footer { min-height: 94px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; padding: 20px clamp(28px, 5vw, 76px); border-top: 1px solid var(--line-soft); background: #0d100e; }
.footer-brand { justify-self: start; transform: scale(.88); transform-origin: left center; }
.site-footer p { color: #73776f; font-size: 10px; letter-spacing: .16em; }
.site-footer > a:last-child { justify-self: end; color: #8f928a; font-size: 11px; }
.site-footer > a:last-child:hover { color: var(--gold-bright); }

.toast { position: fixed; z-index: 250; right: 24px; bottom: 24px; max-width: min(360px, calc(100vw - 36px)); padding: 11px 16px; color: #18130d; background: var(--gold-bright); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(16px); transition: opacity .25s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: none; }

/* Share page */
.share-page { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: #080b0a; }
.share-page::before { content: ""; position: fixed; z-index: -1; inset: 0; background: radial-gradient(circle at 75% 20%, var(--mood-glow), transparent 40%), linear-gradient(135deg, var(--mood-wash), transparent 55%); }
.share-backdrop { position: fixed; z-index: -2; inset: -3%; background: url('./assets/hero-desk.jpg') center / cover no-repeat; filter: var(--wallpaper-filter) brightness(.52); transform: scale(1.04); }
.share-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 7, 6, .94), rgba(5, 8, 7, .7) 52%, rgba(5, 8, 7, .84)), linear-gradient(0deg, rgba(4, 7, 6, .9), transparent 55%); }
.share-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 0 clamp(24px, 5vw, 72px); border-bottom: 1px solid rgba(255, 255, 255, .1); background: rgba(7, 10, 9, .44); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.back-home { display: inline-flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: 12px; }
.back-home:hover { color: var(--gold-bright); }
.share-main { width: min(1000px, calc(100% - 40px)); margin: 0 auto; padding: clamp(48px, 7vw, 90px) 0; display: grid; align-items: center; }
.share-card { min-height: 500px; padding: clamp(36px, 6vw, 76px); border: 1px solid rgba(215, 171, 114, .3); background: linear-gradient(135deg, rgba(14, 18, 15, .94), rgba(9, 13, 11, .9)); box-shadow: 0 36px 110px rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.share-loading { min-height: 350px; }
.share-content { position: relative; }
.shared-file-mark { width: 58px; height: 68px; display: grid; place-items: center; margin-bottom: 34px; color: var(--gold-bright); border: 1px solid rgba(215, 171, 114, .48); background: rgba(215, 171, 114, .05); font: 700 11px/1 var(--sans); clip-path: polygon(0 0, 72% 0, 100% 20%, 100% 100%, 0 100%); }
.share-category { margin: 0 0 12px; color: var(--gold); font-size: 11px; letter-spacing: .12em; }
.share-content h1 { max-width: 780px; margin: 0; font: 400 clamp(34px, 4.5vw, 56px)/1.3 var(--serif); letter-spacing: .035em; text-wrap: balance; }
.share-description { max-width: 720px; margin: 20px 0 0; color: #aaa79f; font: 400 14px/1.95 var(--serif); }
.share-meta { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 0; margin: 42px 0 34px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.share-meta div { min-width: 0; padding: 17px 20px; border-left: 1px solid var(--line-soft); }
.share-meta div:first-child { padding-left: 0; border-left: 0; }
.share-meta dt { color: #71766f; font-size: 10px; }
.share-meta dd { overflow: hidden; margin: 4px 0 0; color: #c9c3b8; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.share-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-actions .primary-button, .share-actions .outline-button, .share-actions .quiet-button { min-height: 42px; font-size: 12px; }
.share-error { min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.share-error > span { width: 62px; height: 62px; display: grid; place-items: center; color: var(--gold-bright); border: 1px solid var(--line); border-radius: 50%; font: 300 30px/1 var(--sans); }
.share-error h1 { margin: 22px 0 7px; font: 400 28px/1.4 var(--serif); }
.share-error p { margin: 0 0 24px; color: var(--muted); font-size: 12px; }
.share-error .outline-button { font-size: 12px; }
.share-footer { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px clamp(24px, 5vw, 72px); color: rgba(216, 211, 202, .48); border-top: 1px solid rgba(255, 255, 255, .08); font-size: 10px; }
.share-footer p { margin: 0; }
.share-footer a { max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-footer a:hover { color: var(--gold-bright); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes heroBreathe { from { transform: scale(1.035); } to { transform: scale(1.075) translate3d(-.4%, -.3%, 0); } }
@keyframes atmosphereDrift { from { opacity: .65; transform: translate3d(-1%, 0, 0); } to { opacity: 1; transform: translate3d(1%, -1%, 0); } }

@media (max-width: 1080px) {
  .desktop-nav { gap: 22px; }
  .desktop-nav a { font-size: 13px; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .file-table th:first-child { width: 31%; }
  .file-table th:last-child { width: 22%; }
  .file-table td, .file-table th { padding-inline: 11px; }
  .row-actions a, .row-actions button { padding-inline: 9px; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 62px; }
  .site-header { height: 62px; padding: 0 20px; }
  .site-header.scrolled { height: 58px; }
  .brand strong { font-size: 21px; }
  .brand small { font-size: 8px; }
  .desktop-nav { display: none; }
  .header-admin { display: inline-flex; margin-left: auto; }
  .menu-button { display: block; }
  .mobile-menu { position: fixed; z-index: 90; inset: 62px 0 auto; display: grid; padding: 15px 20px 20px; background: rgba(8, 11, 10, .96); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
  .mobile-menu a { padding: 13px 4px; color: var(--text-soft); border-bottom: 1px solid var(--line-soft); font: 400 15px/1.3 var(--serif); }
  .mobile-menu a:last-child { color: var(--gold-bright); border-bottom: 0; }
  .hero { min-height: 680px; height: min(86svh, 760px); align-items: flex-end; }
  .hero-media { inset: -2%; background-position: 60% center; }
  .hero-shade { background: linear-gradient(180deg, rgba(5, 8, 7, .22) 0%, rgba(5, 8, 7, .5) 35%, rgba(5, 8, 7, .95) 80%, rgba(5, 8, 7, .99) 100%); }
  .hero-content { width: 100%; margin: 0; padding: 90px 24px 105px; }
  .hero h1 { max-width: 650px; font-size: clamp(39px, 8.8vw, 54px); line-height: 1.32; letter-spacing: .025em; }
  .hero p { font-size: 14px; }
  .wallpaper-credit { right: 24px; bottom: 20px; left: 24px; max-width: none; }
  .section-shell { width: calc(100% - 36px); }
  .latest-section { padding-top: 38px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filter-reset { grid-column: 1 / -1; min-height: 32px; }
  .file-table-wrap { display: none; }
  .mobile-file-list { display: grid; }
  .mobile-file-card { padding: 18px; border-bottom: 1px solid var(--line-soft); }
  .mobile-file-card:last-child { border-bottom: 0; }
  .mobile-file-card .file-title strong { white-space: normal; }
  .mobile-file-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
  .mobile-file-card dl div { min-width: 0; }
  .mobile-file-card dt { color: #6f746e; font-size: 9px; }
  .mobile-file-card dd { overflow: hidden; margin: 3px 0 0; color: #aaa69e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-file-card .row-actions { justify-content: flex-start; }
  .content-empty { grid-template-columns: 1fr; justify-items: center; gap: 20px; padding-block: 45px; text-align: center; }
  .content-empty .outline-button { justify-self: center; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-section { grid-template-columns: 1fr; gap: 34px; }
  .about-action { padding: 28px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .share-meta { grid-template-columns: 1fr 1fr; }
  .share-meta div:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line-soft); border-left: 0; }
  .share-meta div:nth-child(4) { border-top: 1px solid var(--line-soft); }
}

@media (max-width: 520px) {
  .site-header { gap: 8px; }
  .header-admin { padding: 7px 10px; font-size: 10px; }
  .brand { gap: 7px; }
  .brand strong { font-size: 19px; }
  .brand small { display: none; }
  .hero { min-height: 650px; height: 84svh; }
  .hero-content { padding: 90px 20px 104px; }
  .hero h1 { margin-bottom: 19px; font-size: clamp(35px, 10vw, 43px); line-height: 1.34; }
  .hero p { margin-bottom: 22px; line-height: 1.8; }
  .primary-button, .outline-button { gap: 12px; padding-inline: 18px; }
  .section-shell { width: calc(100% - 28px); }
  .latest-section { padding: 34px 0 46px; }
  .section-heading { align-items: flex-start; gap: 12px; }
  .section-heading h2 { font-size: 27px; }
  .section-heading p { max-width: 230px; }
  .text-link { padding-top: 6px; }
  .library-panel { border-radius: 8px; }
  .filter-bar { grid-template-columns: 1fr; gap: 9px; padding: 12px; }
  .search-field, .filter-reset { grid-column: auto; }
  .mobile-file-card { padding: 16px 14px; }
  .mobile-file-card dl { grid-template-columns: 1fr 1fr; }
  .mobile-file-card dl div:nth-child(3) { grid-column: 1 / -1; }
  .category-section { padding: 54px 0 62px; }
  .category-grid { display: flex; gap: 10px; overflow-x: auto; margin-right: -14px; padding: 2px 14px 10px 0; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .category-grid::-webkit-scrollbar { display: none; }
  .category-card { flex: 0 0 76vw; min-height: 210px; scroll-snap-align: start; }
  .category-empty, .category-loading { flex: 0 0 calc(100vw - 28px); }
  .about-section { width: calc(100% - 40px); padding: 66px 0 72px; }
  .about-copy h2 { font-size: 27px; }
  .site-footer { grid-template-columns: 1fr auto; min-height: 78px; padding: 16px 20px; }
  .site-footer p { display: none; }
  .footer-brand { transform: none; }
  .toast { right: 18px; bottom: 18px; }

  .share-header { min-height: 62px; padding: 0 18px; }
  .back-home { font-size: 11px; }
  .share-main { width: calc(100% - 24px); padding: 28px 0; }
  .share-card { min-height: 520px; padding: 32px 22px; }
  .shared-file-mark { margin-bottom: 27px; }
  .share-content h1 { font-size: 34px; }
  .share-description { font-size: 13px; }
  .share-meta { grid-template-columns: 1fr; margin-block: 32px 26px; }
  .share-meta div, .share-meta div:first-child, .share-meta div:nth-child(3) { padding: 12px 0; border-top: 1px solid var(--line-soft); border-left: 0; }
  .share-meta div:first-child { border-top: 0; }
  .share-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .share-actions .primary-button, .share-actions .outline-button, .share-actions .quiet-button { width: 100%; padding-inline: 11px; }
  .share-actions .quiet-button { grid-column: 1 / -1; }
  .share-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding: 14px 18px; }
  .share-footer a { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
