:root {
  --bg: #f6f7f9; --panel: #fff; --text: #111827; --muted: #5b6472; --line: #e5e7eb;
  --accent: #4f46e5; --radius: 14px; --side: max(1rem, calc((100% - 1200px) / 2));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding: 1.5rem var(--side) 3rem; }
a { color: var(--accent); text-decoration: none; }
h1, h2 { margin: 0 0 .5rem; }
h2 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-top: 1rem; min-width: 0; }
.btn { font: inherit; font-size: .9rem; padding: .45rem .9rem; border-radius: 9px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; cursor: pointer; }
.btn.ghost { background: var(--panel); color: var(--accent); }
.ib-top { display: flex; align-items: baseline; gap: 1rem; padding: 1rem var(--side); background: var(--panel); border-bottom: 1px solid var(--line); }
.ib-brand { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.ib-brand span { color: var(--accent); }
.ib-tag { color: var(--muted); font-size: .9rem; }
.ib-hero { margin: .5rem 0 1.5rem; }
.ib-hero h1 { font-size: 2rem; }
.ib-hero p { color: var(--muted); max-width: 46rem; margin: 0 0 1rem; }
.ib-tabs { display: inline-flex; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .2rem; }
.ib-tabs a { padding: .4rem .8rem; border-radius: 8px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.ib-tabs a.on { background: var(--accent); color: #fff; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.video-card { margin-top: 0; }
.video-card video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; }
.ib-title { font-size: 1rem; margin: .5rem 0 0; }
.video-card .small { margin: 0 0 .4rem; }
.video-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .4rem 0; }
.video-card .caption { width: 100%; font: inherit; font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: .5rem; resize: vertical; }
.ib-how { max-width: 46rem; }
.ib-how ol { padding-left: 1.2rem; margin: .4rem 0; }
footer { padding: 1.2rem var(--side) 1.6rem; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .ib-top { flex-direction: column; gap: 0; } .ib-hero h1 { font-size: 1.6rem; } }
/* Personal page (/for/...) */
.me-poster { width: 100%; max-height: 260px; object-fit: cover; object-position: top; border-radius: 10px; background: #000; }
.me-acc { border-top: 1px solid var(--line); padding: .6rem 0 .2rem; }
.me-name { font-size: .9rem; margin-bottom: .3rem; }
.me-wait { color: var(--accent); margin: .2rem 0 .4rem; }
.me-video { display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; background: #000; border-radius: 10px; }
.me-making { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
  background: linear-gradient(#0b1d3f, #1557b0); font-weight: 600; }
.me-showing { margin: .4rem 0 0; }
.me-section { font-size: 1.3rem; margin: 2rem 0 .8rem; }
.me-section .muted { font-weight: 500; font-size: 1rem; }
.me-tabs { position: sticky; top: 0; z-index: 2; margin: 0 0 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
/* Private stats page (/admin/stats on imgbuild.com) */
.st-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.st-kpis .card { margin: 0; }
.st-kpis span { color: var(--muted); font-size: .85rem; display: block; }
.st-kpis b { font-size: 1.8rem; display: block; }
.st-kpis small { color: var(--muted); font-size: .75rem; }
.st-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.st-table th, .st-table td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid var(--line); }
.st-table .r { text-align: right; }
.st-table .nowrap { white-space: nowrap; }
.st-barcell { width: 40%; }
.st-bar { display: block; height: .6rem; border-radius: 4px; background: var(--accent); min-width: 2px; }
.st-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 1rem; }
.small { font-size: .85rem; }
