/* Re:Zero SP — admin panel. Warm dark theme with a vanilla accent. */
:root {
  --bg: #0f0e0c;
  --bg-elev: #141310;
  --surface: #1a1915;
  --surface-2: #211f1a;
  --surface-3: #2a2821;
  --line: rgba(243, 226, 179, .07);
  --line-2: rgba(243, 226, 179, .14);
  --line-3: rgba(243, 226, 179, .24);
  --text: #f4efe3;
  --muted: #a9a293;
  --dim: #716b5e;
  --vanilla: #f3e2b3;
  --vanilla-2: #e6cf96;
  --vanilla-deep: #b8995c;
  --vanilla-ink: #1c1810;
  --vanilla-soft: rgba(243, 226, 179, .10);
  --vanilla-glow: rgba(243, 226, 179, .22);
  --rose: #eba696;
  --red: #ee8080;
  --green: #a3d9a5;
  --blue: #a2c5e4;
  --amber: #e8c27c;
  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 22px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -20px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar: 248px;
  --tabbar: 0px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
html { scrollbar-gutter: stable; }
body {
  background: var(--bg); color: var(--text);
  font: 450 14px/1.5 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
svg.i { flex: none; display: block; }
::selection { background: var(--vanilla-glow); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(243, 226, 179, .10); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(243, 226, 179, .2); }
:focus-visible { outline: 2px solid var(--vanilla); outline-offset: 2px; border-radius: 6px; }

.bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(900px 520px at 100% -10%, rgba(243, 226, 179, .055), transparent 60%),
              radial-gradient(700px 500px at -10% 110%, rgba(232, 165, 120, .04), transparent 60%); }
#app { position: relative; z-index: 1; }

/* ---------- Logo ---------- */
.logo { --s: 40px; position: relative; width: var(--s); height: var(--s); flex: none; border-radius: 30%; overflow: hidden;
  display: grid; place-items: center; background: linear-gradient(140deg, var(--vanilla) 0%, var(--vanilla-deep) 100%);
  box-shadow: 0 6px 18px -8px rgba(243, 226, 179, .45); }
.logo-mono { font-weight: 800; font-size: calc(var(--s) * .36); color: var(--vanilla-ink); letter-spacing: -.04em; }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none;
  transition: background .18s, border-color .18s, transform .12s, box-shadow .2s, color .18s, opacity .18s;
}
.btn:hover { background: var(--surface-3); border-color: var(--line-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--vanilla); border-color: transparent; color: var(--vanilla-ink); box-shadow: 0 8px 22px -10px var(--vanilla-glow); }
.btn.primary:hover { background: #f8ead0; box-shadow: 0 10px 28px -8px rgba(243, 226, 179, .4); }
.btn.spoiler { background: var(--surface-2); }
.btn.gold { color: var(--amber); }
.btn.danger { color: var(--red); border-color: rgba(238, 128, 128, .25); background: rgba(238, 128, 128, .06); }
.btn.danger:hover { background: rgba(238, 128, 128, .12); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 10px; gap: 6px; }
.btn.lg { height: 48px; font-size: 15px; border-radius: 14px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }

/* ---------- Inputs ---------- */
.input, .select, .textarea {
  height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); outline: none; transition: border-color .18s, box-shadow .18s, background .18s; min-width: 0;
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:hover, .select:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--vanilla-2); box-shadow: 0 0 0 4px var(--vanilla-soft); }
.textarea { height: auto; min-height: 110px; padding: 12px; resize: vertical; width: 100%; line-height: 1.55; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a9a293' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--surface-2); }
input[type=search]::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.4); }
input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.85) sepia(.4); cursor: pointer; }

.chips { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; flex: none; }
.chip { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 12.5px; transition: background .2s, color .2s; white-space: nowrap; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 2px 8px -2px rgba(0, 0, 0, .5); }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-weight: 600; font-size: 13px; color: var(--muted); flex: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 36px; height: 21px; border-radius: 21px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .25s var(--ease), border-color .25s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background .25s; }
.switch input:checked + .track { background: var(--vanilla); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(15px); background: var(--vanilla-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--vanilla); outline-offset: 2px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); padding: 40px 32px 30px; border-radius: 26px; text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: rise .6s var(--ease) both; }
.login-card .logo { margin: 0 auto 20px; }
.login h1 { font-size: 26px; font-weight: 750; letter-spacing: -.03em; margin: 0 0 4px; }
.login p { color: var(--muted); margin: 0 0 28px; }
.tg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 48px; border-radius: 14px;
  background: #2aabee; color: #fff; font-weight: 650; font-size: 15px; text-decoration: none;
  box-shadow: 0 12px 30px -14px rgba(42, 171, 238, .9); transition: filter .2s, transform .15s; }
.tg-btn:hover { filter: brightness(1.07); }
.tg-btn:active { transform: scale(.98); }
.tg-btn svg { width: 20px; height: 20px; }
.login .err { margin: -8px 0 18px; padding: 11px 14px; border-radius: 12px; background: rgba(238, 128, 128, .08); border: 1px solid rgba(238, 128, 128, .25); color: #f3b0b0; font-size: 13px; }
.login .foot { margin-top: 18px; color: var(--dim); font-size: 12.5px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 14px;
  background: var(--bg-elev); border-right: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; z-index: 60; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; text-decoration: none; }
.brand-name { font-weight: 750; font-size: 15.5px; letter-spacing: -.02em; line-height: 1.2; }
.brand-name small { display: block; font-weight: 500; font-size: 12px; color: var(--dim); letter-spacing: 0; }
.nav-label { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 18px 12px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 11px; color: var(--muted);
  text-decoration: none; font-weight: 550; transition: background .18s, color .18s; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.on { background: var(--vanilla-soft); color: var(--vanilla); }
.nav-item .count { margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 20px; min-width: 24px; text-align: center; }
.nav-item.on .count { background: rgba(243, 226, 179, .18); color: var(--vanilla); }
.nav-item .count.hot { background: var(--red); color: #1a0f0f; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.me .who { min-width: 0; flex: 1; line-height: 1.3; }
.me .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: var(--dim); }
.scrim { display: none; }

.avatar { position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(140deg, #3a352a, #26231c); color: var(--vanilla); font-weight: 700; font-size: 13px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.avatar.sys { background: var(--vanilla-soft); color: var(--vanilla); }

.main { min-width: 0; padding: 0 32px 56px; }
.main.enter > :not(.topbar) { animation: rise .45s var(--ease) both; }
.main.enter > *:nth-child(2) { animation-delay: .04s; }
.main.enter > *:nth-child(3) { animation-delay: .08s; }
.main.enter > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 32px 12px; margin: 0 -32px 4px;
  background: rgba(15, 14, 12, .82); backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px); }
.page-title { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -.03em; display: flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap; }
.page-title .sub { font-size: 13px; font-weight: 500; color: var(--dim); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.mobile-only { display: none; }
.search { position: relative; display: flex; align-items: center; width: min(320px, 100%); }
.search svg { position: absolute; left: 12px; color: var(--dim); pointer-events: none; }
.search .input { width: 100%; padding-left: 36px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.toolbar .switch { margin-left: auto; padding: 0 4px; }
.toolbar .select { max-width: 260px; }

/* ---------- Category ribbon ---------- */
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 16px; scrollbar-width: none; margin-bottom: 2px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 20px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .2s, color .2s, border-color .2s; }
.cat:hover { color: var(--text); border-color: var(--line-2); background: var(--surface); }
.cat b { font-size: 11.5px; font-weight: 600; color: var(--dim); }
.cat.on { background: var(--vanilla); border-color: transparent; color: var(--vanilla-ink); }
.cat.on b { color: rgba(28, 24, 16, .6); }
.cat.on.nsfw { background: var(--rose); }

/* ---------- Banner ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; margin-bottom: 16px;
  background: var(--vanilla-soft); border: 1px solid var(--line-2); animation: rise .35s var(--ease); flex-wrap: wrap; }
.banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vanilla); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(243, 226, 179, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(243, 226, 179, 0); } }

/* ---------- Feed ---------- */
.grid { display: flex; align-items: flex-start; gap: 14px; }
.mcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card { position: relative; border-radius: var(--r); overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform .3s var(--ease), border-color .25s, box-shadow .3s; animation: rise .5s var(--ease) both; }
.card:hover { transform: translateY(-3px); border-color: var(--line-3); box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .85), 0 0 0 1px rgba(243, 226, 179, .06); }
.card .thumb { position: relative; overflow: hidden; background: var(--surface-2); }
.card .thumb img { width: 100%; height: auto; min-height: 120px; object-fit: cover; transition: transform .7s var(--ease), filter .35s; }
.card:hover .thumb img { transform: scale(1.03); }
.card.veiled .thumb img { filter: blur(28px) saturate(1.1) brightness(.75); transform: scale(1.12); }
.nsfw-veil { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; color: #fff; pointer-events: none; }
.nsfw-veil b { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.nsfw-veil span { font-size: 12px; color: rgba(255, 255, 255, .75); }
.noimg { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 22px; color: var(--muted); font-size: 13px; text-align: center; line-height: 1.5;
  background: radial-gradient(circle at 30% 20%, rgba(243, 226, 179, .08), transparent 60%), var(--surface-2); }
.badges { position: absolute; top: 9px; left: 9px; right: 9px; display: flex; gap: 5px; flex-wrap: wrap; pointer-events: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  background: rgba(15, 14, 12, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #f4efe3; border: 1px solid rgba(255, 255, 255, .06); }
.badge.cat-b { color: var(--vanilla); }
.badge.red { background: rgba(235, 166, 150, .92); color: #2a120c; border-color: transparent; }
.badge.gold { color: var(--amber); }
.badge.right { margin-left: auto; }
.claim { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 14, 12, .55); backdrop-filter: blur(2px); }
.claim span { padding: 7px 13px; border-radius: 20px; background: rgba(15, 14, 12, .85); border: 1px solid rgba(232, 194, 124, .4); color: var(--amber); font-weight: 600; font-size: 12px; }
.card .body { padding: 11px 13px 13px; }
.author { display: flex; align-items: center; gap: 8px; min-width: 0; }
.author img { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.author b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author span { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .txt { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.metrics { display: flex; align-items: center; gap: 12px; margin-top: 9px; font-size: 12px; font-weight: 600; color: var(--muted); }
.metrics .likes { display: inline-flex; align-items: center; gap: 4px; color: var(--rose); }
.metrics .t { margin-left: auto; color: var(--dim); font-weight: 500; white-space: nowrap; }
.quick { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 28px 9px 9px;
  background: linear-gradient(180deg, transparent, rgba(15, 14, 12, .85)); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .3s var(--ease); }
.card:hover .quick { opacity: 1; transform: none; }
.quick .btn { height: 34px; font-size: 12.5px; background: rgba(33, 31, 26, .92); backdrop-filter: blur(8px); }
.quick .btn.primary { flex: 1; background: var(--vanilla); }
.quick .btn.icon { width: 34px; }
.state-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.state-line a { margin-left: auto; color: var(--vanilla); text-decoration: none; font-weight: 600; white-space: nowrap; }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); animation: rise .5s var(--ease); }
.empty-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); color: var(--vanilla); }
.empty .big { font-size: 18px; font-weight: 700; color: var(--text); margin: 18px 0 6px; }
.loader { display: flex; justify-content: center; padding: 30px; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--surface-3); border-top-color: var(--vanilla); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- Overlay / viewer ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: flex; background: rgba(8, 7, 6, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: fade .2s ease; }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 420px; width: 100%; height: 100%; }
.stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage-main { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 28px 76px 10px; }
.stage-main img, .stage-main video { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); animation: pop .35s var(--ease); }
.stage-main.blur img, .stage-main.blur video { filter: blur(40px) brightness(.7); }
.stage-nav { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(26, 25, 21, .85);
  display: grid; place-items: center; color: var(--text); transition: background .2s, transform .2s var(--ease); }
.stage-nav:hover { background: var(--surface-3); transform: scale(1.06); }
.stage-nav.prev { left: 16px; } .stage-nav.next { right: 16px; }
.close-x { position: absolute; top: 16px; left: 16px; z-index: 3; background: rgba(26, 25, 21, .85); }
.counter { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 2; font-weight: 600; font-size: 12px; color: var(--muted);
  background: rgba(26, 25, 21, .85); padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line); }
.strip { display: flex; gap: 8px; padding: 10px 24px 20px; justify-content: center; overflow-x: auto; }
.strip .th { position: relative; width: 66px; height: 66px; flex: none; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: .55; transition: opacity .2s, border-color .2s; background: var(--surface-2); }
.strip .th img { width: 100%; height: 100%; object-fit: cover; }
.strip .th:hover { opacity: .85; }
.strip .th.on { border-color: var(--vanilla); opacity: 1; }
.strip .th.off img { filter: grayscale(1) brightness(.4); }
.strip .th .tgl { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800;
  background: var(--vanilla); color: var(--vanilla-ink); }
.strip .th.off .tgl { background: rgba(15, 14, 12, .8); border: 1px solid var(--line-3); }

.side { display: flex; flex-direction: column; min-height: 0; background: var(--bg-elev); border-left: 1px solid var(--line); animation: slidein .35s var(--ease); }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } }
.side-scroll { flex: 1; overflow-y: auto; padding: 20px 20px 12px; overscroll-behavior: contain; }
.composer-head { margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.side .tweet-text { white-space: pre-wrap; color: var(--text); font-size: 13.5px; line-height: 1.55; margin: 12px 0 0; word-break: break-word; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.stat span { font-size: 11.5px; color: var(--dim); }
.stat.likes b { color: var(--rose); }
.note { margin-top: 12px; padding: 11px 13px; border-radius: 12px; background: var(--vanilla-soft); border: 1px solid var(--line-2); font-size: 13px; color: var(--text); }
.note::before { content: 'Заметка · '; font-weight: 700; color: var(--vanilla); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--surface-2); color: var(--muted); font-weight: 500; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.actions { display: grid; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); background: var(--bg-elev); }
.actions .row .btn { flex: 1; }
.lock { padding: 11px 13px; border-radius: 12px; background: rgba(232, 194, 124, .07); border: 1px solid rgba(232, 194, 124, .25); color: var(--amber); font-weight: 550; font-size: 13px; }
.done-box { padding: 12px 13px; border-radius: 12px; background: rgba(163, 217, 165, .07); border: 1px solid rgba(163, 217, 165, .25); color: var(--green); font-weight: 550; font-size: 13px; }
.done-box a { color: var(--green); }
.err-box { padding: 11px 13px; border-radius: 12px; background: rgba(238, 128, 128, .07); border: 1px solid rgba(238, 128, 128, .25); color: #f3b0b0; font-size: 13px; }
.source { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.source summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: center; user-select: none; }
.source summary::-webkit-details-marker { display: none; }
.source summary::before { content: ''; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
.source[open] summary::before { transform: rotate(45deg); }
.source summary .dim { margin-left: auto; color: var(--rose); font-weight: 600; }

/* ---------- Channel post preview ---------- */
.tg-chat { padding: 14px; border-radius: 18px; background: #0e1621; border: 1px solid rgba(255, 255, 255, .05); }
.tg-channel { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tg-channel b { display: block; font-size: 14px; font-weight: 600; color: #fff; }
.tg-channel span { font-size: 12px; color: #6c7883; }
.tg-ava { position: relative; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--vanilla), var(--vanilla-deep)); }
.tg-ava .logo-mono { font-size: 13px; }
.tg-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tg-post { background: #182533; border-radius: 16px 16px 16px 6px; overflow: hidden; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .8); }
.tg-media { position: relative; display: grid; gap: 2px; grid-template-columns: 1fr 1fr; background: #0e1621; }
.tg-media.n1 { grid-template-columns: 1fr; }
.tg-media.n3 .tg-m:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.tg-media.nx { grid-template-columns: repeat(3, 1fr); }
.tg-m { position: relative; overflow: hidden; background: #0e1621; aspect-ratio: 1; }
.tg-media.n1 .tg-m { aspect-ratio: auto; max-height: 360px; }
.tg-m img { width: 100%; height: 100%; object-fit: cover; transition: filter .35s, transform .35s; }
.tg-media.n1 .tg-m img { height: auto; max-height: 360px; object-fit: contain; margin: 0 auto; }
.tg-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; color: #fff; font-size: 15px; }
.tg-spoil-lbl { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; padding: 7px 14px; border-radius: 20px; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 600; font-size: 13px; backdrop-filter: blur(6px); }
.tg-media.spoil .tg-m img, .tg-media.nsfwblur .tg-m img { filter: blur(22px) brightness(.8); transform: scale(1.1); }
.tg-media.spoil .tg-m::after { content: ''; position: absolute; inset: 0; opacity: .45; background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1.2px); background-size: 7px 7px; animation: dust 2.5s linear infinite; }
@keyframes dust { to { background-position: 7px 14px; } }
.tg-media.spoil .tg-spoil-lbl { display: block; }
.tg-body { padding: 9px 12px 7px; color: #f5f5f5; font-size: 14.5px; line-height: 1.45; }
.tg-cap { display: block; width: calc(100% + 16px); min-height: 34px; margin: 0 -8px 8px; padding: 6px 8px; border: 1px dashed rgba(106, 179, 243, .35); border-radius: 10px;
  background: rgba(106, 179, 243, .04); resize: none; overflow: hidden; color: #f5f5f5; font: inherit; line-height: 1.45; outline: none; transition: border-color .2s, background .2s; }
.tg-cap::placeholder { color: #6ab3f3; opacity: .8; }
.tg-cap:hover { border-color: rgba(106, 179, 243, .6); }
.tg-cap:focus { border-style: solid; border-color: #6ab3f3; background: rgba(106, 179, 243, .07); }
.tg-text { white-space: pre-wrap; word-break: break-word; margin-bottom: 8px; }
.tg-sig { color: #6ab3f3; text-decoration: none; }
.tg-sig:hover { text-decoration: underline; }
.tg-meta { display: flex; justify-content: flex-end; gap: 10px; font-size: 11.5px; color: #6d8094; margin-top: 2px; }
.tg-len { margin-right: auto; }
.tg-len.over { color: var(--red); font-weight: 700; }
.tg-hint { margin-top: 10px; font-size: 12px; color: #6c7883; text-align: center; }

/* ---------- Popover / dialog / toasts ---------- */
.backdrop { position: fixed; inset: 0; z-index: 150; }
.popover { position: fixed; z-index: 200; width: 336px; padding: 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); animation: pop .22s var(--ease); }
.popover h4 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.popover input[type=datetime-local] { width: 100%; }
.quick-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.quick-times .btn { height: 34px; font-size: 12.5px; padding: 0 6px; }
.dialog { margin: auto; width: min(440px, calc(100% - 32px)); padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); animation: pop .25s var(--ease); }
.dialog h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.dialog p { color: var(--muted); margin: 0 0 20px; }
.dialog .row { justify-content: flex-end; }
.dialog.wide { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
.dialog.wide h3 { margin-bottom: 14px; }
.dialog .tg-media.n1 .tg-m, .dialog .tg-media.n1 .tg-m img { max-height: 260px; }
.dialog .tg-m { max-height: 200px; }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 8px; }
.toast { display: flex; gap: 10px; align-items: flex-start; min-width: 240px; max-width: 380px; padding: 13px 15px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); font-weight: 550; animation: toast .35s var(--ease); }
@keyframes toast { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.toast > span { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-3); }
.toast.ok > span { background: var(--green); color: #102012; }
.toast.err { border-color: rgba(238, 128, 128, .35); }
.toast.err > span { background: var(--red); color: #200f0f; }
.toast a { color: var(--vanilla); }

/* ---------- Queue ---------- */
.day { margin: 6px 0 26px; }
.day-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.day-head b { font-size: 16px; font-weight: 700; }
.day-head span { color: var(--dim); font-size: 13px; }
.q-item { display: grid; grid-template-columns: 64px 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; margin-bottom: 8px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; animation: rise .4s var(--ease) both; }
.q-item:hover { border-color: var(--line-2); }
.q-item .time { font-size: 18px; font-weight: 700; color: var(--vanilla); letter-spacing: -.02em; line-height: 1.2; }
.q-item .time small { display: block; font-size: 11.5px; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.q-item .qt { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.q-item .qt img { width: 100%; height: 100%; object-fit: cover; }
.q-item .info { min-width: 0; }
.q-item .info .cap { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item .acts { display: flex; gap: 6px; }
.q-item.failed { border-color: rgba(238, 128, 128, .35); }
.q-item .badge { background: var(--surface-2); }

/* ---------- Stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; overflow: hidden; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.kpi span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.kpi b { display: block; font-size: 30px; font-weight: 750; line-height: 1.15; margin-top: 6px; letter-spacing: -.03em; }
.kpi small { color: var(--dim); font-size: 12px; }
.panels { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.panel { min-width: 0; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.panel h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.panel h3 small { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--dim); }
.span-2 { grid-column: span 2; }
.lb-row { display: grid; grid-template-columns: 24px 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-row .pos { font-weight: 700; color: var(--dim); text-align: center; font-size: 13px; }
.lb-row:nth-child(1) .pos { color: var(--vanilla); }
.lb-row .nm { min-width: 0; }
.lb-row .nm b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .nm small { color: var(--dim); font-size: 12px; }
.bar { height: 5px; border-radius: 5px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--vanilla); transform-origin: left; animation: grow .8s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.lb-row .num { text-align: right; }
.lb-row .num b { font-size: 18px; font-weight: 700; }
.lb-row .num small { display: block; color: var(--dim); font-size: 11px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { fill: var(--dim); font-size: 10px; font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 36px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.hbar .bar { margin: 0; height: 8px; }
.hbar .v { text-align: right; color: var(--muted); }
.dot-on { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-left: 6px; vertical-align: 1px; }

/* ---------- Activity ---------- */
.act { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 44px; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 12px; transition: background .2s; }
.act:hover { background: var(--surface-2); }
.act .what { color: var(--muted); min-width: 0; }
.act .what b { color: var(--text); font-weight: 600; }
.act .when { color: var(--dim); font-size: 12px; white-space: nowrap; }
.act .ath { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.act .ath img { width: 100%; height: 100%; object-fit: cover; }
.pill { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; margin-right: 6px; background: var(--surface-3); color: var(--muted); }
.pill.publish { background: rgba(163, 217, 165, .12); color: var(--green); }
.pill.spoiler { background: var(--vanilla-soft); color: var(--vanilla); }
.pill.schedule { background: rgba(232, 194, 124, .12); color: var(--amber); }
.pill.ingest { background: rgba(162, 197, 228, .12); color: var(--blue); }
.pill.bad { background: rgba(238, 128, 128, .12); color: var(--red); }

/* ---------- Import / settings ---------- */
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: start; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; padding: 11px 13px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); word-break: break-all; color: var(--vanilla); }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; align-items: center; }
.kv > span { color: var(--muted); font-size: 13px; }
.batch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.batch:last-child { border-bottom: 0; }
.batch small { color: var(--dim); }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.ok { color: var(--green); } .bad { color: var(--red); }
.mt { margin-top: 14px; }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .viewer { grid-template-columns: minmax(0, 1fr) 380px; }
  .panels, .two { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
}
@media (max-width: 900px) {
  :root { --tabbar: 64px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: 30px 0 60px rgba(0, 0, 0, .6); }
  .sidebar.open { transform: none; }
  .sidebar.open + .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .5); animation: fade .2s; }
  .main { padding: 0 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
  .topbar { margin: 0 -16px 2px; padding: 10px 16px; min-height: 60px; gap: 10px; flex-wrap: wrap; }
  .mobile-only { display: flex; }
  .page-title { font-size: 19px; }
  .page-title .sub { display: none; }
  .search { order: 5; width: 100%; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; margin: 2px -16px 10px; padding: 2px 16px; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex: none; }
  .toolbar .switch { margin-left: 0; }
  .cats { margin: 0 -16px 2px; padding: 2px 16px 14px; }
  .grid, .mcol { gap: 10px; }
  .card { border-radius: 14px; }
  .card:hover { transform: none; }
  .card .body { padding: 9px 10px 10px; }
  .card .txt { display: none; }
  .metrics { gap: 8px; font-size: 11.5px; }
  .metrics > span:nth-child(3) { display: none; }
  .metrics .t, .card .author span { display: none; }
  .metrics { gap: 10px; flex-wrap: nowrap; white-space: nowrap; }
  .quick { display: none; }
  .badge { height: 21px; font-size: 10.5px; padding: 0 6px; }

  .tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(20, 19, 16, .92); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-top: 1px solid var(--line); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none;
    color: var(--dim); text-decoration: none; font-size: 10.5px; font-weight: 600; transition: color .2s; }
  .tab.on { color: var(--vanilla); }
  .tab i { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--vanilla); color: var(--vanilla-ink);
    font-style: normal; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

  .overlay { align-items: stretch; }
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-y: auto; height: 100%; overscroll-behavior: contain; }
  .stage { min-height: auto; }
  .stage-main { padding: 60px 12px 6px; }
  .stage-main img, .stage-main video { max-height: 52vh; border-radius: 12px; }
  .stage-nav { display: none; }
  .strip { justify-content: flex-start; padding: 6px 12px 12px; }
  .strip .th { width: 56px; height: 56px; }
  .side { border-left: 0; border-top: 1px solid var(--line); animation: rise .35s var(--ease); }
  .side-scroll { overflow: visible; padding: 16px; }
  .actions { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(20, 19, 16, .96); backdrop-filter: blur(14px); }
  .actions .row:last-child .dim { display: none; }
  .close-x { position: fixed; top: 12px; left: 12px; }
  .counter { display: none; }

  .q-item { grid-template-columns: 54px 52px minmax(0, 1fr); gap: 10px; }
  .q-item .qt { width: 52px; height: 52px; }
  .q-item .acts { grid-column: 1 / -1; }
  .q-item .acts .btn { flex: 1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 24px; }
  .panel { padding: 16px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 4px 0; }
  .kv > span { margin-top: 8px; }
  .act { grid-template-columns: 34px minmax(0, 1fr) 44px; }
  .act .when { grid-column: 2; grid-row: 2; margin-top: -6px; }
  .act .ath { grid-row: 1 / span 2; grid-column: 3; }
  .popover { left: 12px !important; right: 12px; width: auto; }
  #toasts { left: 12px; right: 12px; bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}
@media (max-width: 380px) {
  .grid, .mcol { gap: 8px; }
}
@media (hover: none) {
  .card:hover { transform: none; }
  .card:hover .thumb img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Scroll to top ---------- */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(33, 31, 26, .92); color: var(--text); backdrop-filter: blur(10px); box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .25s, transform .3s var(--ease), background .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--surface-3); }

/* ---------- Personal posting ---------- */
.drop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; padding: 20px; margin: 4px 0 16px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(243, 226, 179, .08), rgba(243, 226, 179, .02) 60%), var(--surface); border: 1px solid var(--line-2); }
.drop-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--vanilla); color: var(--vanilla-ink); }
.drop-text b { display: block; font-size: 16px; font-weight: 700; }
.drop-text span { color: var(--muted); font-size: 13px; }
.drop-row { grid-column: 1 / -1; display: flex; gap: 8px; }
.drop-row .input { flex: 1; height: 46px; font-size: 15px; border-radius: 14px; }
.drop-row .btn { height: 46px; padding: 0 22px; border-radius: 14px; }
.spin.sm { width: 16px; height: 16px; border-width: 2px; border-color: rgba(28, 24, 16, .25); border-top-color: var(--vanilla-ink); }
.manual-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.mini { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); text-align: left;
  transition: transform .25s var(--ease), border-color .2s; animation: rise .4s var(--ease) both; }
.mini:hover { transform: translateY(-2px); border-color: var(--line-3); }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini .badge { position: absolute; top: 7px; right: 7px; }
.mini-txt { display: block; padding: 12px; font-size: 12px; color: var(--muted); }
.mini-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 7px; font-size: 11.5px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.recent:last-child { border-bottom: 0; }
.recent .qt { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.recent .qt img { width: 100%; height: 100%; object-fit: cover; }
.recent .info { min-width: 0; }
.recent .info b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent .info small { color: var(--dim); }
.hint-empty { color: var(--dim); font-size: 13px; padding: 6px 0; }
@media (max-width: 1180px) { .manual-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .to-top { right: 16px; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); }
  .drop { padding: 16px; gap: 12px; }
  .drop-row { flex-direction: column; }
  .drop-row .input { flex: none; width: 100%; }
  .drop-row .btn { width: 100%; }
  .mini-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}
