@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@500;600;700;800&display=swap');

:root {
  --paper: #f7f2eb;
  --surface: #fffdfa;
  --ink: #282731;
  --muted: #7c7882;
  --border: #e9dfd9;
  --accent: #d65359;
  --accent-dark: #af343d;
  --rose: #f6dee0;
  --lilac: #e5e0f1;
  --gold: #b5906d;
  --gold2: #f8edda;
  --tx: var(--ink);
  --tx2: var(--muted);
  --line: var(--border);
  --font-sans: 'DM Sans', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font: 400 14px/1.7 var(--font-sans); }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 98% 0%, rgba(246,210,219,.48), transparent 35%),
    radial-gradient(ellipse at 0% 64%, rgba(223,219,244,.37), transparent 43%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.hidden { display: none !important; }
.accent { color: var(--accent); }
.eyebrow { color: var(--accent-dark); font: 700 11px/1.4 'DM Sans', sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.signal { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(214,83,89,.11); margin-right: 8px; vertical-align: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Masthead */
.nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 78px; padding: 0 max(32px, calc((100vw - 1380px)/2)); background: rgba(255,253,250,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; font: 800 19px/1.15 var(--font-serif); letter-spacing: -.055em; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; color: white; background: var(--ink); font: 700 24px var(--font-serif); transform: rotate(-7deg); box-shadow: 4px 4px 0 var(--rose); }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.brand-text small { font: 700 8px/1 'DM Sans', sans-serif; letter-spacing: .21em; color: var(--accent); }
.nav-links, #authArea { display: flex; align-items: center; gap: 26px; }
.nav-links { font-weight: 600; font-size: 13px; }
.nav-links > a:not(.nav-admin) { padding: 26px 4px; border-bottom: 2px solid transparent; }
.nav-links > a.on { color: var(--accent-dark); border-color: var(--accent); }
.nav-links a:hover { color: var(--accent-dark); }
.nav-admin { padding: 8px 14px; border: 1px solid var(--border); border-radius: 30px; font-size: 12px; }
#authArea { gap: 12px; }
#authArea .ghost { padding: 9px 17px; border-radius: 30px; border: 1px solid var(--ink); background: var(--ink); color: white; font-size: 12px; white-space: nowrap; }
#authArea .ghost:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: white; }
.nav-links button { font-weight: 600; }
.u-name { font-family: var(--font-serif); font-weight: 700; white-space: nowrap; }
.nsfw-sw { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid var(--border); border-radius: 20px; background: transparent; color: var(--ink); font-size: 11px; white-space: nowrap; }
.nsfw-sw .dot { width: 8px; height: 8px; border-radius: 50%; background: #b1adb5; }
.nsfw-sw.on { background: #fff1f0; border-color: #eeb0ae; color: var(--accent-dark); }
.nsfw-sw.on .dot { background: var(--accent); }
.admin-indicator { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }

/* Hero / editorial opening */
.hero { overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1fr 46%; align-items: stretch; max-width: 1440px; min-height: 490px; margin: auto; }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 66px 35px 65px max(32px, calc((100vw - 1380px)/2)); }
.hero h1 { margin: 24px 0; font: 800 clamp(45px, 5vw, 76px)/1.35 var(--font-serif); letter-spacing: -.065em; }
.hero-sub { margin: 0; color: #68616d; font-size: 14px; line-height: 2.1; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; margin-top: 31px; }
.hero-actions .btn { display: inline-flex; align-items: center; gap: 20px; }
.text-link { font-weight: 700; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }
.hero-date { display: flex; align-items: center; width: min(100%, 420px); gap: 12px; margin-top: 51px; color: var(--muted); font: 700 10px 'DM Sans', sans-serif; letter-spacing: .14em; white-space: nowrap; }
.hero-date-line { height: 1px; flex: 1; background: var(--border); }
.hero-art { position: relative; isolation: isolate; overflow: hidden; min-height: 450px; background: linear-gradient(132deg, #e9d3d3 0%, #eddee5 45%, #dad6e9 100%); }
.hero-art-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .34; filter: saturate(.75); }
.hero-art::before { content: ''; position: absolute; z-index: 1; inset: -15%; background: radial-gradient(ellipse at 70% 25%, rgba(255,250,237,.63), transparent 38%), radial-gradient(ellipse at 18% 72%, rgba(213,147,172,.35), transparent 42%); animation: drift 14s ease-in-out infinite alternate; }
.hero-art::after { content: ''; position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.72); pointer-events: none; }
.hero-orbit { position: absolute; z-index: 1; border: 1px solid rgba(117,100,129,.32); border-radius: 50%; transform: rotate(-26deg); }
.orbit-one { width: 530px; height: 210px; left: 2%; top: 24%; }
.orbit-two { width: 420px; height: 145px; left: 9%; top: 30%; transform: rotate(30deg); }
.hero-moon { position: absolute; z-index: 1; top: 13%; right: 17%; width: 150px; height: 150px; border-radius: 50%; background: linear-gradient(145deg, #fffdf6, #efb8a7); box-shadow: 0 0 75px rgba(255,249,230,.83); }
.hero-art-title { position: absolute; z-index: 2; left: 14%; top: 41%; color: #5c455d; font: 700 clamp(50px, 5.6vw, 90px)/.96 'DM Sans', sans-serif; letter-spacing: -.075em; transform: rotate(-7deg); text-shadow: 4px 4px 0 rgba(255,255,255,.55); }
.hero-art-note { position: absolute; z-index: 2; left: 14%; bottom: 13%; color: #765f75; font: 700 10px/1.6 'DM Sans', sans-serif; letter-spacing: .25em; }
.hero-spark { position: absolute; z-index: 2; color: var(--accent); }
.spark-one { right: 11%; top: 38%; font-size: 60px; }
.spark-two { left: 10%; top: 13%; font-size: 31px; }
.hero-stamp { position: absolute; z-index: 2; right: 12%; bottom: 15%; display: grid; place-items: center; width: 76px; height: 76px; border: 1px solid #a75a65; border-radius: 50%; color: #a75a65; font: 700 15px/1.5 var(--font-serif); text-align: center; transform: rotate(13deg); }
@keyframes drift { from { transform: translateX(-2%) scale(1); } to { transform: translateX(2%) scale(1.09); } }

/* Shared sections */
main { width: min(1380px, calc(100% - 64px)); margin: 0 auto; }
section { scroll-margin-top: 96px; }
.rank-section { padding: 85px 0 105px; }
.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-intro h2 { margin: 11px 0 0; font: 800 clamp(28px, 3vw, 40px)/1.3 var(--font-serif); letter-spacing: -.05em; }
.section-intro p { margin: 0 0 4px; color: var(--muted); }
.sec-note { color: var(--muted); font-size: 12px; }
.ranking-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 25px 0; padding: 8px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--border); }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.tab { border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 11px 19px; font-weight: 700; font-size: 13px; transition: color .2s, background .2s, transform .2s; }
.tab span { margin-left: 6px; font: 700 9px 'DM Sans', sans-serif; letter-spacing: .09em; opacity: .6; }
.tab:hover { color: var(--accent-dark); background: #fce9e8; }
.tab.on { color: #fff; background: var(--ink); box-shadow: 3px 3px 0 var(--rose); }
.gallery-heading { display: flex; justify-content: space-between; gap: 12px; margin: 48px 0 19px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 12px; font-weight: 700; }
.gallery-heading > span:first-child { letter-spacing: .15em; color: var(--ink); font-family: 'DM Sans', sans-serif; }
.gallery-heading > span:last-child span { color: var(--accent); }
.view-all { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 32px; padding: 19px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-weight: 700; }
.view-all:hover { color: var(--accent-dark); border-color: var(--accent); }

/* Artwork cards */
.card { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 13px; color: var(--ink); background: var(--surface); text-align: left; overflow: hidden; cursor: zoom-in; transition: transform .28s, box-shadow .28s, border-color .28s; animation: reveal .5s both; }
.card-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: zoom-in; }
.fav-btn { position: absolute; z-index: 4; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(78,49,55,.12); border-radius: 7px; background: rgba(255,253,250,.94); color: var(--accent-dark); font-size: 23px; line-height: 1; box-shadow: 0 4px 12px rgba(36,25,30,.13); }
.fav-btn:hover, .fav-btn.saved { background: var(--accent); color: white; }
.card.nsfw .fav-btn { top: 49px; }
.card:hover { transform: translateY(-5px); border-color: #e2c7c8; box-shadow: 0 18px 42px rgba(66,37,51,.12); }
.card-visual { position: relative; overflow: hidden; }
.card-media { position: relative; overflow: hidden; aspect-ratio: 1 / var(--ratio); background: linear-gradient(110deg, #e7dfe0 25%, #f5edf0 50%, #e7dfe0 75%); background-size: 200% 100%; animation: shimmer 1.8s linear infinite; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .65s cubic-bezier(.2,.8,.2,1); }
.card-media img.ld { opacity: 1; }
.card:hover img { transform: scale(1.045); }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.rank { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; justify-content: center; min-width: 35px; height: 35px; padding: 0 9px; border-radius: 6px; background: var(--surface); color: var(--accent-dark); box-shadow: 0 4px 12px rgba(36,25,30,.13); font: 800 13px 'DM Sans', sans-serif; z-index: 2; }
.nsfw-badge { position: absolute; z-index: 3; top: 12px; right: 12px; padding: 5px 8px; border-radius: 5px; color: white; background: #af4457; font: 700 10px 'DM Sans', sans-serif; }
.card-caption { padding: 14px 16px 17px; }
.card-caption-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 15px/1.5 var(--font-serif); }
.card-caption-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.card-caption-bottom span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-caption-bottom span:last-child { flex: none; color: var(--accent); font-size: 18px; line-height: 1; }
.spot .big { min-height: 430px; padding: 10px; border-radius: 16px; background: #f2dfe1; }
.spot .big .card-open { display: grid; grid-template-columns: 37% 63%; min-height: 410px; }
.spot .fav-btn { top: 20px; right: 20px; }
.spot .card.nsfw .fav-btn { top: 56px; }
.spot .feature-side { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding: clamp(22px, 4vw, 66px); }
.feature-kicker { font: 700 10px 'DM Sans', sans-serif; letter-spacing: .14em; color: var(--accent-dark); }
.feature-number { display: block; margin: 32px 0 5px; font: 700 clamp(62px, 8vw, 120px)/1 'DM Sans', sans-serif; letter-spacing: -.09em; color: var(--ink); }
.feature-number span { font-size: 12px; letter-spacing: .07em; color: var(--accent-dark); vertical-align: middle; }
.feature-rule { display: block; width: 42px; height: 2px; background: var(--accent); margin-bottom: 23px; }
.feature-title { width: 100%; font: 700 clamp(22px, 2.6vw, 34px)/1.45 var(--font-serif); letter-spacing: -.06em; overflow-wrap: anywhere; }
.feature-author { display: block; margin-top: 13px; color: #736571; font-size: 12px; }
.feature-more { display: inline-flex; align-items: center; gap: 20px; margin-top: 35px; font-weight: 700; font-size: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 5px; }
.spot .card-visual, .spot .card-media { height: 100%; min-height: 410px; border-radius: 9px; }
.spot .card-media { aspect-ratio: auto; }
.spot .rank { top: 19px; left: 19px; height: 38px; color: var(--ink); letter-spacing: .08em; }
.daily-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.daily-row .card-media { aspect-ratio: 1.28; }
.daily-row .card:nth-child(2), .daily-row .card:nth-child(5), .daily-row .card:nth-child(8) { animation-delay: .08s; }
.daily-row .card:nth-child(3), .daily-row .card:nth-child(6), .daily-row .card:nth-child(9) { animation-delay: .16s; }
.empty { padding: 85px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: 14px; }

/* Archive */
.pool-hero { background: #e9dadd; border-bottom: 1px solid #e4cbd1; overflow: hidden; }
.pool-hero-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1380px; min-height: 265px; margin: auto; padding: 44px 32px; }
.pool-hero-inner::after { content: ''; position: absolute; width: 410px; height: 410px; right: 11%; top: -100px; border: 1px solid rgba(154,103,122,.2); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.08), 0 0 0 142px rgba(255,255,255,.09); pointer-events: none; }
.pool-hero h1 { margin: 10px 0 8px; font: 800 clamp(36px, 4vw, 57px)/1.4 var(--font-serif); letter-spacing: -.06em; }
.pool-hero p { margin: 0; color: #6d5d68; }
.pool-seal { z-index: 1; display: grid; place-items: center; width: 90px; height: 90px; border: 2px solid #ab6269; border-radius: 50%; color: #9b4c56; font: 700 20px/1.05 var(--font-serif); text-align: center; transform: rotate(14deg); }
.pool-seal span { color: var(--accent); font: 16px/1 var(--font-sans); }
.pool-section { padding: 55px 0 100px; }
#favGate .btn { margin-top: 16px; }
#favEmpty a { color: var(--accent-dark); text-decoration: underline; }
#favEmpty span { color: var(--muted); font-size: 12px; }
.filter-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 25px 0 28px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 25px rgba(71,47,48,.03); }
.search-box { display: flex; align-items: center; gap: 7px; width: min(310px, 100%); padding: 0 12px; border: 1px solid var(--border); background: var(--paper); border-radius: 7px; color: var(--accent-dark); }
.search-box > span { font-size: 23px; line-height: 1; }
.search-box .inp { width: 100%; border: 0; background: transparent; margin: 0; padding-left: 0; }
.filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-controls .inp { width: auto; min-width: 110px; margin: 0; background: var(--paper); }
.masonry { columns: 4 245px; column-gap: 18px; }
.masonry .card { margin: 0 0 18px; break-inside: avoid; }
.masonry .card-media { aspect-ratio: 1 / var(--ratio); }

/* Forms, buttons, account dialogs */
.inp { display: block; width: 100%; min-height: 42px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--ink); outline: none; font-size: 13px; }
.inp::placeholder { color: #aaa2a3; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(214,83,89,.1); }
.field-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #675c64; }
.btn, .abtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 42px; padding: 10px 21px; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: white; font-size: 12px; font-weight: 700; white-space: nowrap; transition: background .2s, border-color .2s, transform .2s; }
.btn:hover, .abtn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); }
.btn.sm { min-height: 39px; padding: 9px 16px; }
.btn.ghost, .abtn.ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn.ghost:hover, .abtn.ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn.danger { color: var(--accent-dark); border-color: #eed4d2; background: #fff3f1; }
.btn.danger:hover { color: white; background: var(--accent-dark); }
.btn:disabled { cursor: wait; opacity: .65; }
.err { min-height: 12px; margin: 5px 0; color: var(--accent-dark); font-size: 12px; }
.login-card { position: relative; z-index: 2; width: min(440px, calc(100vw - 32px)); margin: 100px auto; padding: 42px; border: 1px solid #ecd8d7; border-radius: 15px; background: var(--surface); box-shadow: 0 25px 75px rgba(69,41,52,.12); }
.login-card h2 { font: 800 30px/1.4 var(--font-serif); margin: 14px 0 23px; }
.login-card .inp { margin-bottom: 15px; }
.login-card .btn { width: 100%; margin-top: 10px; }
.login-card p { color: var(--muted); font-size: 12px; margin: 17px 0 0; line-height: 1.7; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: center; padding: 20px; }
.lb-back { position: absolute; inset: 0; background: rgba(31,26,35,.88); backdrop-filter: blur(14px); }
.lb-fig { position: relative; z-index: 1; width: min(1100px, 87vw); margin: 0; }
.lb-stage { position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.lb-fig img { display: block; max-width: 100%; max-height: 75vh; width: auto; margin: auto; object-fit: contain; box-shadow: 0 25px 70px rgba(0,0,0,.3); border-radius: 5px; transition: filter .22s ease, opacity .22s ease; }
.lb-stage.loading img { filter: blur(7px); }
.lb-status { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: rgba(25,22,30,.78); border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 12px; letter-spacing: .02em; pointer-events: none; opacity: 0; transition: opacity .18s ease; }
.lb-status::before { content: ''; width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(255,255,255,.32); border-top-color: #fff; animation: lbspin .75s linear infinite; }
.lb-stage.loading .lb-status, .lb-stage.loading-orig .lb-status { opacity: 1; }
@keyframes lbspin { to { transform: rotate(360deg); } }
.lb-fig figcaption { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 14px; padding: 14px 18px; border-radius: 9px; color: var(--ink); background: var(--surface); }
.lb-acts button:disabled { opacity: .58; cursor: default; transform: none; }
.lb-info { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 14px; }
.lb-info b { font: 700 16px var(--font-serif); }
.lb-info span { font-size: 11px; color: var(--muted); }
.lb-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-nav, .lb-close { position: absolute; z-index: 2; display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.12); color: white; font-size: 26px; line-height: 1; }
.lb-nav:hover, .lb-close:hover { background: var(--accent); }
.lb-nav.prev { left: 25px; top: 50%; transform: translateY(-50%); }
.lb-nav.next { right: 25px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 25px; top: 22px; font-size: 16px; }

/* Studio */
.admin-wrap { width: min(1260px, calc(100% - 64px)); margin: 0 auto; padding: 0 0 100px; }
.admin-intro { display: flex; justify-content: space-between; align-items: center; padding: 50px 0 35px; }
.admin-intro h1 { margin: 12px 0 5px; font: 800 clamp(32px, 4vw, 50px)/1.3 var(--font-serif); letter-spacing: -.06em; }
.admin-intro p { margin: 0; color: var(--muted); }
.admin-intro-mark { color: #ead9d7; font-size: 105px; line-height: 1; }
.admin-section-label { display: flex; align-items: center; gap: 16px; margin: 24px 0 15px; font: 700 11px 'DM Sans', var(--font-sans); letter-spacing: .13em; color: var(--accent-dark); }
.section-line { height: 1px; flex: 1; background: var(--border); }
.stat-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 102px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.stat:nth-child(1) { background: var(--ink); border-color: var(--ink); }
.stat b { color: var(--accent-dark); font: 700 29px/1.1 'DM Sans', sans-serif; }
.stat:nth-child(1) b, .stat:nth-child(1) span { color: #fff; }
.stat span { color: var(--muted); font-size: 11px; }
.mgmt-head { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 35px 0 22px; padding-bottom: 15px; border-bottom: 1px solid var(--ink); }
.mgmt-tabs { gap: 9px; }
.mgmt-tabs .tab { padding: 13px 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; }
.mgmt-tabs .tab.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.mgmt-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.upzone { padding: 25px; border: 1px dashed #d9bcc0; border-radius: 12px; background: rgba(255,253,250,.88); }
.upzone.drag { border-color: var(--accent); background: #fff4f3; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 21px; }
.panel-heading h2 { margin: 7px 0 3px; font: 700 21px var(--font-serif); }
.panel-heading p { margin: 0; font-size: 12px; color: var(--muted); }
.admin-api-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.admin-api-controls label { flex: 1 1 125px; min-width: 0; }
.admin-api-controls label:nth-child(2) { flex: 3 1 280px; }
.admin-api-controls .inp { width: 100%; }
.admin-api-hint { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.admin-api-output { margin: 12px 0 0; max-height: 360px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 12px; }
.upload-label { cursor: pointer; }
.upload-fields { display: grid; grid-template-columns: 1.4fr 1.2fr .7fr; gap: 12px; }
.upload-link { display: flex; gap: 9px; margin-top: 13px; }
.upload-link .inp { flex: 1; min-width: 0; }
.admin-filters { margin: 0 0 18px; }
.mgmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.mgmt-item { position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.mgmt-item img { display: block; width: 100%; aspect-ratio: 1.24; object-fit: cover; background: var(--rose); }
.mgmt-item .im-body { padding: 13px 14px 15px; }
.mgmt-item .im-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 13px var(--font-serif); }
.mgmt-item .im-m { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 5px; color: var(--muted); font-size: 11px; }
.badge-auto { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 4px 7px; border-radius: 5px; background: rgba(255,253,250,.96); color: var(--ink); font: 700 10px 'DM Sans', var(--font-sans); }
.mgmt-item .im-del { position: absolute; z-index: 2; top: 8px; right: 8px; padding: 5px 9px; border: 0; border-radius: 5px; background: rgba(40,39,49,.9); color: white; font-size: 11px; }
.mgmt-item .im-del:hover { background: var(--accent-dark); }
.user-fields { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
.user-fields .btn { margin-bottom: 0; }
.utable { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
.utable th, .utable td { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: left; }
.utable th { color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.utable tr:last-child td { border-bottom: 0; }

footer { padding: 0 32px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; max-width: 1380px; margin: auto; min-height: 102px; color: var(--muted); font-size: 11px; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--accent-dark); text-decoration: underline; }
.footer-logo { color: var(--ink); font: 700 18px var(--font-serif); }
.footer-logo span { color: var(--accent); }
.footer-inner > span:last-child { font: 700 10px 'DM Sans', sans-serif; letter-spacing: .1em; }

/* ---- Tag Filter Bar (图片池 / 美图广场 / 个人中心) ---- */
.tag-filter-box { margin: -12px 0 26px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 25px rgba(71,47,48,.03); }
.tag-filter-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.tag-filter-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--ink); }
.tag-filter-title small { font-weight: 400; font-size: 12px; color: var(--muted); }
.tag-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tag-mode-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 20px; background: var(--paper); font-size: 11px; }
.tag-mode-switch button { border: 0; background: transparent; color: var(--muted); padding: 4px 10px; border-radius: 16px; font-size: 11px; font-weight: 600; }
.tag-mode-switch button.on { background: var(--ink); color: #fff; }
.tag-action-btn { border: 1px solid var(--border); background: var(--paper); color: var(--ink); border-radius: 20px; padding: 5px 12px; font-size: 11.5px; font-weight: 600; transition: all .18s; }
.tag-action-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.tag-selected-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 9px 12px; margin-bottom: 11px; border-radius: 8px; background: #fff4f3; border: 1px dashed #e6b8ba; }
.tag-selected-label { font-size: 11.5px; font-weight: 700; color: var(--accent-dark); }
.tag-chip-active { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.tag-chip-active button { border: 0; background: rgba(255,255,255,.24); color: #fff; width: 16px; height: 16px; border-radius: 50%; padding: 0; font-size: 10px; line-height: 1; display: grid; place-items: center; }
.tag-chip-active button:hover { background: rgba(255,255,255,.45); }
.tag-chips-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 20px; background: var(--paper); color: var(--ink); font-size: 12px; transition: all .18s; }
.tag-chip:hover { border-color: var(--accent); color: var(--accent-dark); background: #fff4f3; }
.tag-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.tag-chip .cnt { font-size: 10.5px; opacity: .62; }
.tag-drawer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 11px; }
.tag-drawer-group { display: flex; align-items: flex-start; gap: 12px; }
.tag-drawer-label { flex: none; width: 66px; padding-top: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); }

/* Card tags & delete button */
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.card-tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--border); border-radius: 20px; background: var(--paper); color: var(--muted); font-size: 10.5px; line-height: 1.5; transition: all .15s; cursor: pointer; }
.card-tag:hover { border-color: var(--accent); color: var(--accent-dark); background: #fff4f3; }
.card-manage { position: absolute; z-index: 4; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 5px; max-width: calc(100% - 62px); }
.card-manage button { min-height: 28px; padding: 5px 8px; border: 0; border-radius: 6px; background: rgba(40,39,49,.86); color: #fff; font-size: 11px; font-weight: 600; transition: background .18s; }
.card-manage button:hover { background: var(--accent-dark); }
.plaza-badge { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 4px 9px; border-radius: 6px; background: rgba(255,253,250,.94); color: var(--accent-dark); font: 700 11px var(--font-sans); box-shadow: 0 4px 12px rgba(36,25,30,.12); }

/* ---- Pagination Bar (翻页组件) ---- */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--border); }
.pg-btn { min-width: 38px; height: 38px; padding: 0 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; transition: all .18s; }
.pg-btn:hover:not(:disabled):not(.on) { border-color: var(--accent); color: var(--accent-dark); background: #fff4f3; }
.pg-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--rose); }
.pg-btn:disabled { opacity: .38; cursor: not-allowed; }
.pg-ellipsis { padding: 0 4px; color: var(--muted); }
.pg-jump { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; color: var(--muted); }
.pg-jump input { width: 54px; height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--ink); text-align: center; font-size: 12.5px; outline: none; }
.pg-jump input:focus { border-color: var(--accent); }
.pg-info { font-size: 12px; color: var(--muted); margin-right: 6px; }

/* ---- Personal Center & Quick Upload ---- */
.profile-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 28px 30px; margin-bottom: 22px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: 0 10px 30px rgba(71,47,48,.04); }
.profile-user-wrap { display: flex; align-items: center; gap: 20px; }
.profile-avatar { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 18px; background: var(--ink); color: #fff; font: 800 28px var(--font-serif); box-shadow: 5px 5px 0 var(--rose); flex: none; }
.profile-meta h2 { margin: 0 0 6px; font: 800 26px/1.2 var(--font-serif); }
.profile-stats { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12.5px; }
.profile-stats strong { color: var(--accent-dark); font-size: 16px; font-family: 'DM Sans', sans-serif; margin-right: 4px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-drop-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px 26px; margin-bottom: 28px; border: 2px dashed #dbb9bd; border-radius: 14px; background: linear-gradient(135deg, #fffdfa 0%, #fcf1f1 100%); cursor: pointer; transition: all .2s; }
.quick-drop-card:hover, .quick-drop-card.drag { border-color: var(--accent); background: #fff2f1; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(214,83,89,.1); }
.quick-drop-left { display: flex; align-items: center; gap: 16px; }
.quick-drop-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--rose); color: var(--accent-dark); font-size: 22px; flex: none; }
.quick-drop-copy b { display: block; font: 700 15px var(--font-serif); margin-bottom: 2px; }
.quick-drop-copy span { font-size: 12px; color: var(--muted); }

/* ---- Upload Modal (拖入窗口 + 多选预设标签) ---- */
.upload-card { position: relative; z-index: 2; width: min(940px, calc(100vw - 28px)); max-height: 90vh; overflow-y: auto; padding: 30px 32px; border: 1px solid #ecd8d7; border-radius: 16px; background: var(--surface); box-shadow: 0 25px 75px rgba(45,25,35,.22); }
.upload-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.upload-card-head h2 { margin: 6px 0 4px; font: 800 24px/1.3 var(--font-serif); }
.upload-card-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.upload-close { border: 1px solid var(--border); background: var(--paper); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; display: grid; place-items: center; flex: none; }
.upload-close:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.upload-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; }
.upload-drop { min-height: 230px; padding: 20px; border: 2px dashed #d8b8bc; border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: all .18s; }
.upload-drop:hover, .upload-drop.drag { border-color: var(--accent); background: #fff2f1; box-shadow: 0 0 0 4px rgba(214,83,89,.1); }
.upload-drop-ico { font-size: 36px; margin-bottom: 8px; }
.upload-drop-title { font: 700 15px var(--font-serif); color: var(--ink); margin-bottom: 4px; }
.upload-drop-sub { font-size: 12px; color: var(--muted); }
.upload-drop-sub b { color: var(--accent-dark); text-decoration: underline; }
.upload-preview { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-preview img { max-width: 100%; max-height: 215px; border-radius: 8px; object-fit: contain; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.upload-preview-meta { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.upload-form-row { margin-top: 12px; }
.upload-form-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin-top: 12px; }
.upload-tag-panel { display: flex; flex-direction: column; gap: 10px; }
.upload-tag-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; }
.upload-tag-count { padding: 2px 10px; border-radius: 20px; background: var(--rose); color: var(--accent-dark); font-size: 11.5px; }
.upload-selected-wrap { min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.upload-tag-tools { display: flex; gap: 8px; }
.upload-tag-tools .inp { min-height: 36px; padding: 6px 11px; font-size: 12.5px; }
.upload-custom-row { display: flex; gap: 6px; flex: none; }
.upload-custom-row .inp { width: 125px; }
.upload-preset-scroll { max-height: 270px; overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--paper); display: grid; gap: 12px; }
.upload-preset-group-title { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: .05em; }
.upload-card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.upload-foot-note { font-size: 12px; color: var(--muted); }
.upload-foot-btns { display: flex; gap: 10px; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; width: 100%; }
.lb-tags .card-tag { font-size: 11px; }
.toast-msg { position: fixed; right: 24px; bottom: 24px; z-index: 400; padding: 12px 20px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 12px 32px rgba(24,20,28,.26); animation: reveal .22s ease; }
.toast-msg.ok { background: #265947; }
.toast-msg.err { background: var(--accent-dark); }

/* ---- Navbar User Avatar Entry (点击头像进入个人中心) ---- */
.u-entry { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); transition: all .18s; }
.u-entry:hover { border-color: var(--accent); background: #fff4f3; transform: translateY(-1px); }
.u-entry.on { border-color: var(--accent); background: #fff4f3; box-shadow: 0 0 0 2px rgba(214,83,89,.14); }
.u-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 13px var(--font-serif); flex: none; border: 1.5px solid rgba(40,39,49,.08); }
.u-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.u-entry .u-name { font-size: 13px; color: var(--ink); max-width: min(11em, 24vw); overflow: hidden; text-overflow: ellipsis; }
.u-entry.on .u-name { color: var(--accent-dark); }

/* ---- Profile Big Avatar Button & Picker Modal ---- */
.profile-avatar-btn { position: relative; padding: 0; border: 2px solid var(--border); border-radius: 50%; width: 78px; height: 78px; overflow: hidden; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.profile-avatar-btn:hover { border-color: var(--accent); transform: scale(1.03); box-shadow: 0 8px 22px rgba(214,83,89,.22); }
.profile-avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
#profAvatarInner { width: 100%; height: 100%; display: grid; place-items: center; }
.profile-meta { min-width: 0; overflow-wrap: anywhere; }
.profile-avatar-edit { position: absolute; inset: auto 0 0 0; padding: 4px 0 5px; background: rgba(31,26,35,.76); color: #fff; font: 600 10.5px var(--font-sans); text-align: center; opacity: 0; transition: opacity .18s; }
.profile-avatar-btn:hover .profile-avatar-edit { opacity: 1; }
.avatar-modal-card { width: min(760px, calc(100vw - 28px)); }
.profile-edit-fields { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); }
.profile-edit-fields .u-avatar { width: 56px; height: 56px; font-size: 20px; }
.profile-edit-fields .field-label { margin-top: 0; }
.profile-edit-fields p { margin-top: 5px; }
.profile-edit-avatar-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.profile-edit-avatar-head h3 { margin-bottom: 3px; font-size: 15px; }
.avatar-modal-card .upload-card-foot { justify-content: flex-end; }
.avatar-modal-card .err { flex: 1 1 180px; margin: 0; }
.avatar-modal-card .err:empty { display: none; }
.avatar-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; max-height: 34dvh; overflow-y: auto; padding: 4px 2px; }
.avatar-pick-grid > .empty { grid-column: 1 / -1; padding: 16px 10px; }
.avatar-pick-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); cursor: pointer; transition: all .18s; text-align: center; }
.avatar-pick-item:hover { border-color: var(--accent); background: #fff4f3; transform: translateY(-2px); }
.avatar-pick-item.current { border-color: var(--accent); background: #fff4f3; box-shadow: 0 0 0 2px rgba(214,83,89,.18); }
.avatar-pick-thumb { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(36,25,30,.12); background: var(--rose); }
.avatar-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-pick-title { width: 100%; font-size: 11.5px; color: var(--ink); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.avatar-pick-badge { display: none; position: absolute; top: 7px; right: 7px; padding: 2px 7px; border-radius: 20px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; }
.avatar-pick-item.current .avatar-pick-badge { display: block; }
.set-avatar-btn { position: absolute; z-index: 4; top: 12px; left: 12px; padding: 5px 10px; border: 1px solid rgba(78,49,55,.14); border-radius: 20px; background: rgba(255,253,250,.94); color: var(--ink); font-size: 11px; font-weight: 700; box-shadow: 0 4px 12px rgba(36,25,30,.12); transition: all .18s; }
.set-avatar-btn:hover, .set-avatar-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (max-width: 780px) {
  .upload-grid { grid-template-columns: 1fr; }
  .upload-card { padding: 20px 18px; }
  .tag-drawer-group { flex-direction: column; gap: 6px; }
  .upload-tag-tools { flex-direction: column; }
  .upload-custom-row .inp { flex: 1; width: auto; }
}

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 55% 45%; }
  .hero-art-title { font-size: 62px; }
  .daily-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nav { height: auto; min-height: 68px; padding: 10px 18px; flex-wrap: wrap; gap: 10px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 35px; height: 35px; font-size: 19px; }
  .nav-links { width: 100%; gap: 15px; flex-wrap: wrap; font-size: 12px; }
  .nav-links > a:not(.nav-admin) { padding: 4px; }
  #authArea { margin-left: auto; }
  .nav-admin, .admin-indicator { display: none; }
  main, .admin-wrap { width: calc(100% - 36px); }
  .hero-inner { display: flex; flex-direction: column; }
  .hero-copy { padding: 50px 22px 36px; }
  .hero h1 { font-size: clamp(42px, 10vw, 58px); }
  .hero-date { margin-top: 35px; }
  .hero-art { min-height: 235px; }
  .hero-art-title { top: 35%; font-size: 58px; }
  .hero-moon { width: 100px; height: 100px; }
  .hero-art-note { bottom: 9%; }
  .hero-stamp { bottom: 12%; width: 55px; height: 55px; font-size: 12px; }
  .rank-section { padding: 48px 0 72px; }
  .section-intro { align-items: flex-start; }
  .section-intro p { display: none; }
  .ranking-toolbar { align-items: flex-start; flex-direction: column; }
  .tab { padding: 10px 12px; }
  .tab span { display: none; }
  .spot .big { min-height: 0; padding: 8px; }
  .spot .big .card-open { display: flex; flex-direction: column-reverse; min-height: 0; }
  .spot .card-visual, .spot .card-media { min-height: 0; height: 255px; }
  .spot .feature-side { padding: 16px 18px 20px; }
  .feature-number, .feature-rule, .feature-kicker { display: none; }
  .feature-title { font-size: 21px; }
  .feature-more { margin-top: 14px; }
  .gallery-heading { margin-top: 33px; }
  .daily-row { gap: 11px; }
  .daily-row .card-media { aspect-ratio: .82; }
  .card-caption { padding: 10px; }
  .card-caption-title { font-size: 12px; }
  .pool-hero-inner { min-height: 205px; padding: 35px 22px; }
  .pool-seal { display: none; }
  .pool-section { padding: 40px 0 70px; }
  .filter-panel { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .filter-controls { display: grid; grid-template-columns: repeat(2, 1fr); }
  .filter-controls .inp { width: 100%; min-width: 0; }
  .masonry { columns: 2 140px; column-gap: 11px; }
  .masonry .card { margin-bottom: 11px; }
  .lb { padding: 12px; }
  .lb-fig { width: 100%; }
  .lb-fig img { max-height: 66vh; }
  .lb-nav { top: auto !important; bottom: 14px; transform: none !important; }
  .lb-nav.prev { left: 12px; }
  .lb-nav.next { right: 12px; }
  .lb-fig figcaption { padding: 11px; margin-bottom: 42px; }
  .lb-close { right: 14px; top: 14px; }
  .admin-intro { padding: 35px 0 20px; }
  .admin-intro-mark { display: none; }
  .stat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 83px; padding: 13px; }
  .stat b { font-size: 23px; }
  .mgmt-head { align-items: stretch; }
  .mgmt-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .mgmt-tabs .tab { padding: 12px 8px; }
  .mgmt-tools { width: 100%; }
  .upzone { padding: 18px; }
  .upload-fields, .user-fields { grid-template-columns: 1fr; }
  .upload-link { flex-wrap: wrap; }
  .upload-link .btn, .user-fields .btn { width: 100%; }
  .mgmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .mgmt-item .im-del { top: auto; bottom: 5px; }
  .utable th, .utable td { padding: 10px; font-size: 11px; }
  footer { padding: 0 18px; }
  .footer-inner { padding: 25px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
