/* =====================================================================
   Foro de GTA Legacy — blanco y negro, letra Inter (misma estética que el UCP).
   Botones blancos con texto negro; rojo solo para borrar o suspender.
   Animaciones suaves (se desactivan si el sistema pide "reducir movimiento").
   ===================================================================== */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/static/fonts/Inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/static/fonts/Inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/static/fonts/Inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/static/fonts/Inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url('/static/fonts/Inter-800.woff2') format('woff2'); }

:root {
    color-scheme: dark;
    --bg: #0b0b0b;
    --top: #111111;
    --card: #151515;
    --card-2: #1c1c1c;
    --card-3: #242424;
    --line: #262626;
    --line-soft: #1e1e1e;
    --text: #e6e6e6;
    --muted: #8a8a8a;
    --faint: #555555;
    --white: #ffffff;
    --red: #c4524f;
    --font: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    --mono: ui-monospace, Consolas, 'Cascadia Mono', Menlo, monospace;
    --r: 10px;
    --w: 1280px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --soft: cubic-bezier(.22, 1, .36, 1); /* salida muy suave */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--white); text-decoration: none; transition: color .15s, opacity .15s; }
a:hover { color: #bdbdbd; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #fff; color: #000; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.ico { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.white { color: #fff; }
.mt { margin-top: 10px; }
.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 22px; }
.page { flex: 1; padding-top: 26px; padding-bottom: 50px; }
.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; color: #fff; line-height: 1.2; }
.h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: #fff; margin-bottom: 6px; }
.h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.empty { padding: 26px 22px; color: var(--muted); text-align: center; }
.empty.big { display: grid; gap: 8px; justify-items: center; padding: 46px 20px; }
.empty.big .ico { width: 34px; height: 34px; color: #fff; }

/* ---------------- Animaciones ---------------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.28); } 80%, 100% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } }
@keyframes menu { from { opacity: 0; transform: translateY(-4px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes shake { 25% { transform: translateX(-2px); } 50% { transform: translateX(2px); } 75% { transform: translateX(-1px); } }

/* Todo entra con un fundido corto hacia arriba, escalonado y sin prisas */
.rise { animation: rise .7s var(--soft) both; }
.page > .rise:nth-child(2), .col > .rise:nth-child(2), .side > .rise:nth-child(2), .posts > .rise:nth-child(2) { animation-delay: .06s; }
.page > .rise:nth-child(3), .col > .rise:nth-child(3), .side > .rise:nth-child(3), .posts > .rise:nth-child(3) { animation-delay: .12s; }
.page > .rise:nth-child(4), .col > .rise:nth-child(4), .posts > .rise:nth-child(4) { animation-delay: .18s; }
.col > .rise:nth-child(5), .posts > .rise:nth-child(5) { animation-delay: .22s; }
.col > .rise:nth-child(n+6), .posts > .rise:nth-child(n+6) { animation-delay: .26s; }
.rows > li { animation: fade .6s var(--soft) both; }
.rows > li:nth-child(2) { animation-delay: .04s; } .rows > li:nth-child(3) { animation-delay: .08s; } .rows > li:nth-child(4) { animation-delay: .12s; }
.rows > li:nth-child(5) { animation-delay: .16s; } .rows > li:nth-child(n+6) { animation-delay: .2s; }
.alert.err { animation: shake .45s ease both; }
.pop { animation: pop .7s var(--soft) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------------- Barra superior ---------------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(17,17,17,.86); backdrop-filter: saturate(150%) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; font-size: 13px; }
.brand img { height: 40px; display: block; transition: transform .5s var(--soft); }
.brand:hover { color: #fff; }
.brand:hover img { transform: scale(1.03); }
.brand span { padding: 3px 8px; border: 1px solid #fff; border-radius: 6px; }
.mainnav { display: flex; gap: 2px; }
.mainnav a { position: relative; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.mainnav a:hover { color: #fff; background: var(--card-2); }
.mainnav a.on { color: #fff; }
.mainnav a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 2px; background: #fff; border-radius: 2px; animation: fade .6s var(--soft) both; }
.search { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 12px; height: 38px; width: 240px; background: var(--card-2); border: 1px solid transparent; border-radius: 10px; color: var(--muted); transition: width .45s var(--soft), border-color .3s; }
.search:focus-within { width: 300px; border-color: #3a3a3a; color: #fff; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font-size: 13.5px; }
.userbar { display: flex; align-items: center; gap: 10px; }
.lnk-top { color: var(--text); font-weight: 600; font-size: 13.5px; padding: 8px 10px; }
.navtoggle { display: none; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
.banbar { background: #2a1717; border-bottom: 1px solid #4a2727; color: #f0b3b0; font-size: 13px; padding: 9px 0; }
.banbar .ico { margin-right: 8px; }

.umenu { position: relative; }
.umenu > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.umenu > summary::-webkit-details-marker { display: none; }
.umenu > summary:hover, .umenu[open] > summary { background: var(--card-2); }
.umenu-name { font-weight: 600; font-size: 13.5px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 14px; height: 14px; color: var(--muted); transition: transform .4s var(--soft); }
details[open] > summary .caret { transform: rotate(180deg); }
.menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; min-width: 230px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.6); display: grid; gap: 2px; animation: menu .3s var(--soft) both; transform-origin: top right; }
.menu.wide { min-width: 290px; }
.menu-head { padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); display: grid; }
.menu-head small { color: var(--muted); }
.menu a, .menu button:not(.btn) { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 13.5px; }
.menu a:hover, .menu button:not(.btn):hover { background: var(--card-2); color: #fff; }
.menu button.danger { color: #ec8c88; }
.menu form { margin: 0; display: grid; }
.menu .ico { color: var(--muted); }
.menu-row { display: flex !important; gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.menu-row.col { flex-direction: column; }
.menu-row select, .menu-row input { flex: 1; min-width: 0; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }

/* ---------------- Botones ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border: 0; border-radius: 10px; background: #fff; color: #0b0b0b; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: transform .3s var(--soft), background .25s, box-shadow .3s; }
.btn:hover { color: #0b0b0b; background: #ececec; box-shadow: 0 4px 16px rgba(255,255,255,.05); }
.btn:active { transform: scale(.985); }
.btn.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--card-3); color: #fff; box-shadow: none; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #d4625f; }
.btn.block { width: 100%; padding: 12px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-xs { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.lnk { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; transition: color .15s; }
.lnk:hover { color: #fff; }
.lnk.danger:hover { color: #ec8c88; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions.center { justify-content: center; margin-top: 18px; }

/* ---------------- Tarjetas ---------------- */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.card + .card { margin-top: 16px; }
.card-in { padding: 22px 24px; }
.card.narrow { max-width: 560px; margin: 40px auto; }
.card.center { text-align: center; }
.big-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; }
.big-ic .ico { width: 30px; height: 30px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.hero > div:first-child { max-width: 760px; }
.hero .muted { margin-top: 6px; }
.hero .muted a { color: var(--text); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }
.col > .card + .card { margin-top: 0; }
.side { display: grid; gap: 16px; position: sticky; top: 84px; }
.side > .card + .card { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid2 > .card + .card { margin-top: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: #fff; }
.crumbs .sep { color: var(--faint); }
.crumbs .cur { color: var(--text); }

.alert { padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); font-size: 13.5px; animation: rise .6s var(--soft) both; }
.alert.ok { border-color: #3a3a3a; color: #fff; }
.alert.ok::before { content: '✓'; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 10px; border-radius: 50%; background: #fff; color: #000; font-size: 11px; font-weight: 800; }
.alert.err { background: #221414; border-color: #4a2626; color: #f0b3b0; }
.alert.warn { background: #1d1b15; border-color: #3a3526; color: #e9dcb6; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--muted); font-size: 11.5px; font-weight: 600; vertical-align: 1px; }
.chip .ico { width: 12px; height: 12px; vertical-align: 0; }
.chip.solid { background: #fff; color: #000; border-color: #fff; }
.chip.warn { color: #f0b3b0; border-color: #4a2626; background: #221414; }
.prefix { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fff; color: #000; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

/* ---------------- Rangos (blanco y negro por nivel) ---------------- */
.rank { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border: 1px solid #3a3a3a; color: var(--muted); }
.rank.lv8, .rank.lv7 { background: #fff; border-color: #fff; color: #000; }
.rank.lv6, .rank.lv5 { border-color: #fff; color: #fff; }
.rank.lv4, .rank.lv3 { border-color: #8a8a8a; color: #e6e6e6; }
.rank.lv2, .rank.lv1 { border-color: #3a3a3a; color: #bdbdbd; }
.rank.member { border-style: dashed; }
.uname { color: var(--text); font-weight: 600; }
.uname:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.uname.staff { color: #fff; font-weight: 800; }

/* ---------------- Avatares ---------------- */
.av { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg, #2c2c2c, #191919); border: 1px solid #333; color: #fff; font-weight: 700; font-size: 16px; text-transform: uppercase; vertical-align: middle; transition: transform .45s var(--soft), border-color .3s; }
.av img { width: 100%; height: 100%; object-fit: cover; }
a:hover > .av, .av:hover { border-color: #fff; }
.av.sm { width: 30px; height: 30px; font-size: 12.5px; }
.av.md { width: 42px; height: 42px; font-size: 17px; }
.av.lg { width: 92px; height: 92px; font-size: 36px; border-radius: 22px; }
.av.xl { width: 116px; height: 116px; font-size: 46px; border-radius: 26px; border: 4px solid var(--card); }

/* ---------------- Categorías y foros ---------------- */
.cat > details > summary { list-style: none; cursor: pointer; }
.cat > details > summary::-webkit-details-marker { display: none; }
.cat-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.cat-h h2 { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.cat-h .toggle { width: 18px; height: 18px; color: var(--muted); transition: transform .45s var(--soft); }
.cat details:not([open]) .toggle { transform: rotate(-90deg); }
.cat details:not([open]) .cat-h { border-bottom: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.frow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 72px 82px 250px; gap: 16px; align-items: center; padding: 16px 22px; transition: background .4s var(--soft); }
.frow + .frow, .trow + .trow { border-top: 1px solid var(--line-soft); }
.frow:hover, .trow:hover { background: #181818; }
.frow.redirect { grid-template-columns: 44px minmax(0, 1fr) 90px; }
.f-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); color: var(--faint); transition: transform .5s var(--soft), background .3s; }
.f-ic .ico { width: 20px; height: 20px; vertical-align: 0; }
.f-ic.unread { background: #fff; border-color: #fff; color: #000; animation: pulse 3.2s ease-out infinite; }
.f-ic.link { color: var(--text); }
.frow:hover .f-ic { transform: translateY(-1px); }
.f-title { font-size: 15px; font-weight: 700; color: #fff; margin-right: 6px; }
.f-title:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.f-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.f-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.f-subs a { padding: 3px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 500; }
.f-subs a:hover { background: #fff; color: #000; border-color: #fff; }
.f-count { text-align: center; line-height: 1.25; }
.f-count b { display: block; color: #fff; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.f-count span { color: var(--muted); font-size: 11.5px; }
.f-count.wide { text-align: right; }
.last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.last.none { color: var(--faint); font-size: 12.5px; }
.last-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; font-size: 12.5px; }
.last-title { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.last-txt .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark-all { display: flex; justify-content: flex-end; }

/* ---------------- Temas ---------------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line-soft); }
.bar.end { border-top: 1px solid var(--line-soft); border-bottom: 0; }
.bar-r { display: flex; align-items: center; gap: 16px; }
.bar form { margin: 0; }
.sort select, .filters select, .filters input { background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input { width: 240px; }
.trow { display: grid; grid-template-columns: 42px minmax(0, 1fr) 80px 70px 190px; gap: 16px; align-items: center; padding: 14px 22px; transition: background .4s var(--soft); }
.trow.is-pinned { background: #171717; }
.trow.is-hidden { opacity: .5; }
.t-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.t-title { color: #d9d9d9; font-weight: 600; font-size: 14.5px; }
.trow.is-unread .t-title { color: #fff; font-weight: 800; }
.t-title:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 3s ease-out infinite; }
.t-meta { font-size: 12.5px; margin-top: 3px; }
.t-meta a { color: var(--text); }
.t-pages { display: inline-flex; gap: 4px; margin-left: 8px; }
.t-pages a { min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.t-pages a:hover { background: #fff; color: #000; }
.t-stats { text-align: center; line-height: 1.25; }
.t-stats b { display: block; color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-stats span { font-size: 11px; color: var(--muted); }
.t-flags { display: flex; gap: 6px; margin-bottom: 8px; }
.t-flags:empty { display: none; }

.pager { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0; }
.pg { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 13px; transition: background .15s, color .15s; }
a.pg:hover { background: var(--card-3); color: #fff; }
.pg.cur { background: #fff; color: #000; border-color: #fff; font-weight: 800; }
.pg.gap { background: none; border: 0; }

/* ---------------- Mensajes ---------------- */
.posts { display: grid; gap: 14px; }
.posts > .card + .card { margin-top: 0; }
.post { display: grid; grid-template-columns: 210px minmax(0, 1fr); scroll-margin-top: 84px; transition: border-color .3s; }
.post:target { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.post.is-hidden { opacity: .55; border-style: dashed; }
.author { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px; background: linear-gradient(180deg, #181818, #141414); border-right: 1px solid var(--line-soft); text-align: center; }
.post.by-staff .author { background: linear-gradient(180deg, #1e1e1e, #151515); }
.author-av { display: block; margin-bottom: 4px; }
.author-av:hover .av { transform: scale(1.02); }
.author .uname { font-size: 15px; word-break: break-word; }
.a-stats { width: 100%; margin: 8px 0 0; display: grid; gap: 4px; font-size: 12px; }
.a-stats > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.03); }
.a-stats dt { color: var(--muted); white-space: nowrap; }
.a-stats dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.p-col { display: flex; flex-direction: column; min-width: 0; }
.p-head { display: flex; justify-content: space-between; gap: 10px; padding: 14px 24px; border-bottom: 1px solid var(--line-soft); }
.p-head a.muted:hover { color: #fff; }
.p-body { flex: 1; padding: 18px 24px; font-size: 14.5px; line-height: 1.75; word-break: break-word; }
.p-edited { padding: 0 24px 12px; color: var(--faint); font-size: 12px; font-style: italic; }
.p-sig { margin: 0 24px 14px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; max-height: 140px; overflow: hidden; }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 24px 16px; }
.p-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.p-actions form { margin: 0; }
.likes form { margin: 0; }
.like { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .35s var(--soft), color .35s, border-color .35s; }
.like .ico { width: 14px; height: 14px; vertical-align: 0; transition: transform .45s var(--soft); }
.like:hover { color: #fff; border-color: #444; }
.like:hover .ico { transform: scale(1.08); }
.like.on { background: #fff; color: #000; border-color: #fff; }
.like.on .ico { animation: pop .7s var(--soft); }
.like.static { cursor: default; }

.reply { margin-top: 16px; scroll-margin-top: 84px; }
.cta { padding: 30px 24px; text-align: center; display: grid; gap: 6px; }
.cta h3 { font-size: 18px; color: #fff; }

/* ---------------- Formularios ---------------- */
.form { margin: 0; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > span { color: #fff; font-weight: 600; font-size: 13px; }
.field.grow { flex: 1; min-width: 220px; }
.field.narrow { width: 180px; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number], .form input[type=search], .form select, .form textarea, .cat-form input {
    width: 100%; padding: 11px 13px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; color: #fff; transition: border-color .15s, box-shadow .2s, background .15s;
}
.form input:focus, .form select:focus, .form textarea:focus, .cat-form input:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.08); background: #1f1f1f; }
.form input[readonly] { color: var(--muted); }
.form textarea { resize: vertical; line-height: 1.6; }
.form-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 6px; }
.form-foot.spread { justify-content: space-between; }
.form-foot .muted { margin-right: auto; }
.hint { color: var(--muted); font-size: 12px; }
.compose .hint { margin: -6px 0 4px; }
.sect { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 10px 0 12px; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; cursor: pointer; font-size: 13.5px; }
.check input { width: 18px; height: 18px; accent-color: #fff; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.strength { height: 4px; border-radius: 4px; background: var(--card-3); overflow: hidden; margin: -6px 0 16px; }
.strength i { display: block; height: 100%; width: 0; background: #fff; transition: width .6s var(--soft), opacity .5s; opacity: .4; }
.strength.s1 i { width: 25%; } .strength.s2 i { width: 50%; opacity: .6; } .strength.s3 i { width: 75%; opacity: .8; } .strength.s4 i { width: 100%; opacity: 1; }

.editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color .15s, box-shadow .2s; }
.editor:focus-within { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.editor textarea { display: block; width: 100%; min-height: 140px; padding: 13px 15px; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none; background: var(--card-2); color: #fff; font: 14px/1.65 var(--font); resize: vertical; }
.editor textarea::placeholder { color: var(--faint); }
.ed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; background: #131313; border-bottom: 1px solid var(--line); }
.ed-tools button { padding: 5px 9px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; transition: background .15s, color .15s; }
.ed-tools button:hover { background: var(--card-3); color: #fff; }
.ed-tools .sep { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }
.form .ed-tools select, .ed-tools select { width: auto; flex: none; margin-left: auto; background: var(--card-2); border: 0; border-radius: 6px; padding: 4px 6px; color: var(--muted); font-size: 12px; }

.auth { max-width: 470px; margin: 30px auto; }
.auth .card-in > .muted { margin-bottom: 18px; }
.auth-alt { text-align: center; margin-top: 16px; }
.auth-alt a, .auth .small { color: #fff; }
.resend { margin: -6px 0 16px; }
.demo { margin-top: 14px; padding: 10px; border: 1px dashed #444; border-radius: 8px; font-size: 12.5px; color: var(--muted); }
.demo a { text-decoration: underline; }

/* ---------------- "Revisa tu correo" (como en el UCP) ---------------- */
@keyframes reg-spin { to { transform: rotate(360deg); } }
@keyframes rw-draw { to { stroke-dashoffset: 0; } }
@keyframes rw-pop { 0% { transform: scale(1); } 40% { transform: scale(.85); } 100% { transform: scale(1); } }
@keyframes rw-dot { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@keyframes ring-green { from { box-shadow: 0 0 0 0 rgba(34,197,94,.45); } to { box-shadow: 0 0 0 20px rgba(34,197,94,0); } }
.reg-wait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 16px 0 18px; }
.reg-wait p { max-width: 400px; margin: 0 auto; line-height: 1.7; }
.reg-wait .h2 { margin-bottom: 8px; }
.rw-hint { margin-top: 10px !important; color: var(--muted) !important; font-weight: 400; }
.reg-wait-ic { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #262626; color: #fff; transition: background-color .45s ease, box-shadow .45s ease; }
.reg-wait-ic .ico { width: 24px; height: 24px; vertical-align: 0; }
.reg-wait-ic::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; border-top-color: #fff; animation: reg-spin 1.1s linear infinite; }
.reg-wait-ic .rw-mail { display: grid; place-items: center; transition: opacity .25s, transform .35s var(--ease); }
.reg-wait-ic .rw-check { position: absolute; width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; }
.rw-done { display: none; }
.reg-wait.done .reg-wait-ic { background: #22c55e; animation: rw-pop .5s cubic-bezier(.34, 1.56, .64, 1), ring-green 1.6s ease-out .3s; }
.reg-wait.done .reg-wait-ic::after { border-top-color: #22c55e; inset: -7px; }
.reg-wait.done .rw-mail { opacity: 0; transform: scale(.4); }
.reg-wait.done .rw-check { animation: rw-draw .45s ease-out .25s forwards; }
.reg-wait.done [data-wait-text] { display: none; }
.reg-wait.done .rw-done { display: block; animation: rise .6s var(--soft); }
.rw-dots i { font-style: normal; animation: rw-dot 1.2s infinite; }
.rw-dots i:nth-child(2) { animation-delay: .2s; }
.rw-dots i:nth-child(3) { animation-delay: .4s; }
.wait-foot { display: flex; justify-content: center; gap: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); transition: opacity .4s; }
.wait-foot form { margin: 0; }
.wait-foot.gone { opacity: 0; pointer-events: none; }

/* ---------------- Perfil ---------------- */
.profile { margin-bottom: 20px; }
.cover { position: relative; aspect-ratio: 4 / 1; min-height: 120px; max-height: 320px; width: 100%; background: radial-gradient(1200px 300px at 20% 0%, #2a2a2a, #121212 60%), #121212; overflow: hidden; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(21,21,21,.9)); }
.cover img { width: 100%; height: 100%; object-fit: cover; animation: fade 1s var(--soft) both; }
.cover:not(.has)::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px); }
.mini-profile .cover { max-height: 220px; }
.pr-in { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 20px; padding: 0 26px 18px; margin-top: -58px; flex-wrap: wrap; }
.pr-who { flex: 1; min-width: 200px; padding-bottom: 6px; }
.pr-who .h1 { display: flex; align-items: center; gap: 10px; }
.pr-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pr-stats { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.pr-stats li { padding: 14px 24px; display: grid; }
.pr-stats li + li { border-left: 1px solid var(--line-soft); }
.pr-stats b { color: #fff; font-size: 16px; }
.pr-stats span { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.live { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 3s ease-out infinite; }
.person-av .live { position: absolute; right: 4px; bottom: 4px; border: 2px solid var(--card); }

.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; width: fit-content; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .35s var(--soft), color .35s; }
.tabs a:hover { color: #fff; }
.tabs a.on { background: #fff; color: #000; }
.img-edit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.img-edit > div { display: grid; gap: 10px; }
.upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.drop { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px dashed #444; border-radius: 10px; color: var(--text); cursor: pointer; font-size: 13px; transition: border-color .2s, background .2s; max-width: 260px; }
.drop:hover, .drop.has-file { border-color: #fff; background: var(--card-2); }
.drop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cover-prev { aspect-ratio: 4 / 1; border-radius: 10px; margin-bottom: 14px; overflow: hidden; background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 2px, transparent 2px 14px), #121212; border: 1px solid var(--line); }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.kv { display: grid; gap: 2px; margin: 0 0 14px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: #fff; text-align: right; word-break: break-all; }

/* Personas (miembros y staff) */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.people > .card + .card { margin-top: 0; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 18px; text-align: center; transition: transform .5s var(--soft), border-color .4s; }
.person:hover { transform: translateY(-2px); border-color: #333; }
.person-cover { width: 100%; height: 64px; background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 2px, transparent 2px 14px), #121212; overflow: hidden; }
.person-cover img { width: 100%; height: 100%; object-fit: cover; }
.person-av { position: relative; margin-top: -46px; margin-bottom: 4px; }
.person-av .av.lg { border: 4px solid var(--card); }
.staff-group + .staff-group { margin-top: 30px; }
.staff-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; }

/* Lateral */
.widget { padding: 0 0 6px; }
.w-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.card-in > .w-h { padding: 0 0 12px; }
.count { padding: 1px 8px; border-radius: 999px; background: #fff; color: #000; font-size: 11px; letter-spacing: 0; }
.widget > :not(.w-h) { padding-left: 20px; padding-right: 20px; }
.feed { list-style: none; margin: 0; padding-bottom: 12px !important; display: grid; gap: 14px; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 11px; }
.feed-t { color: #fff; font-weight: 700; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-x { color: var(--muted); font-size: 12.5px; margin: 2px 0 3px; word-break: break-word; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 14px !important; }
.stats > div { padding: 12px; border-radius: 10px; background: var(--card-2); display: grid; }
.stats b { color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 11.5px; }
.newest { display: flex; align-items: center; gap: 10px; padding-bottom: 14px !important; }
.newest > div { display: grid; }
.online { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px !important; }
.online-u { display: block; transition: transform .4s var(--soft); }
.online-u:hover { transform: translateY(-1px); }
.widget > p.small { padding-bottom: 12px; }
.mini { list-style: none; margin: 0; padding-bottom: 14px !important; display: grid; gap: 10px; }
.mini li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mini li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini small { white-space: nowrap; }
.mini code, .perm-help dt { font: 12px var(--mono); color: #fff; }
.perm-help { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 16px; font-size: 12.5px; }
.perm-help dd { margin: 0; color: var(--muted); }

/* Elegir foro, búsqueda */
.choose { list-style: none; margin: 0; padding: 8px; }
.choose a, .choose .off { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; transition: background .15s; }
.choose a:hover { background: var(--card-2); color: #fff; }
.choose a > span, .choose .off > span { flex: 1; display: grid; }
.choose small { color: var(--muted); font-size: 12px; }
.choose .go { transform: rotate(-90deg); color: var(--muted); transition: transform .4s var(--soft); }
.choose a:hover .go { transform: rotate(-90deg) translateY(2px); color: #fff; }
.choose .off { color: var(--faint); }
.choose li.d1 { padding-left: 22px; } .choose li.d2 { padding-left: 44px; } .choose li.d3 { padding-left: 66px; }
.search-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.search-form .field { margin-bottom: 0; }
.result-count { margin: 18px 0 10px; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 16px 24px; display: grid; gap: 4px; }
.results li + li { border-top: 1px solid var(--line-soft); }
.r-title { color: #fff; font-weight: 700; }
.results p { color: var(--text); font-size: 13px; }
.more { padding: 14px; text-align: center; border-top: 1px solid var(--line-soft); font-size: 13px; }

/* Administración */
.cat-form { display: flex; gap: 8px; align-items: center; margin: 0; padding: 14px 22px; border-bottom: 1px solid var(--line-soft); }
.cat-form input[type=number] { width: 82px; }
.cat-form input[type=text] { flex: 1; font-weight: 700; }
.admin-tree { list-style: none; margin: 0; padding: 0; }
.admin-tree li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 22px; }
.admin-tree li + li { border-top: 1px solid var(--line-soft); }
.admin-tree li.d1 { padding-left: 46px; } .admin-tree li.d2 { padding-left: 70px; } .admin-tree li.d3 { padding-left: 94px; }
.perms { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.perms b { font: 11.5px var(--mono); color: var(--text); }
.row-act { display: flex; gap: 6px; flex: none; }
.ulist { list-style: none; margin: 0; padding: 0; }
.ulist li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 22px; }
.ulist li + li { border-top: 1px solid var(--line-soft); }
.ulist li.is-banned { background: #1a1414; }
.u-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.u-who > div { display: grid; gap: 3px; min-width: 0; }
.u-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.u-act { display: flex; align-items: center; gap: 8px; flex: none; }
.inline { display: flex; gap: 6px; margin: 0; }
.inline select { background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; }

/* ---------------- BBCode ---------------- */
.bb strong { color: #fff; }
.bb a { color: #fff; text-decoration: underline; text-decoration-color: #8a8a8a; text-underline-offset: 3px; }
.bb a:hover { text-decoration-color: #fff; }
.bb .bb-img { max-width: 100%; max-height: 560px; display: block; margin: 8px 0; border-radius: 8px; }
.bb .bb-quote { margin: 12px 0; padding: 12px 16px; background: var(--card-2); border-left: 3px solid #fff; border-radius: 0 10px 10px 0; }
.bb .bb-quote cite { display: block; font-style: normal; font-weight: 700; font-size: 12px; color: #fff; margin-bottom: 4px; }
.bb .bb-quote .bb-quote { background: var(--card-3); }
.bb .bb-code { margin: 12px 0; padding: 12px 16px; background: #080808; border: 1px solid var(--line); border-radius: 10px; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-x: auto; }
.bb .bb-list { margin: 8px 0; padding-left: 24px; }
.bb .bb-h { font-size: 17px; color: #fff; margin: 14px 0 6px; }
.bb .bb-hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.bb .bb-center { text-align: center; }
.bb .bb-right { text-align: right; }
.bb .bb-spoiler { margin: 10px 0; padding: 8px 14px; background: var(--card-2); border-radius: 10px; }
.bb .bb-spoiler summary { cursor: pointer; font-weight: 700; font-size: 12.5px; color: #fff; }
.bb .bb-video { position: relative; max-width: 640px; aspect-ratio: 16 / 9; margin: 10px 0; }
.bb .bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.bb .bb-mention { padding: 1px 6px; border-radius: 6px; background: #fff; color: #000; font-weight: 700; }
.bb-c-red { color: #e2716c; } .bb-c-orange { color: #e89a52; } .bb-c-yellow { color: #e8cf5a; } .bb-c-green { color: #6fcf97; }
.bb-c-blue { color: #6fa8ff; } .bb-c-purple { color: #c38cff; } .bb-c-gray { color: #9a9ba3; } .bb-c-white { color: #fff; }

/* ---------------- Pie ---------------- */
.foot { border-top: 1px solid var(--line); background: var(--top); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 22px; color: var(--faint); font-size: 12.5px; }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: #fff; }

/* ---------------- Pantallas pequeñas ---------------- */
@media (max-width: 1150px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .side { position: static; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .frow { grid-template-columns: 44px minmax(0, 1fr) 72px 82px; }
    .frow > .last { grid-column: 2 / -1; }
    .trow { grid-template-columns: 42px minmax(0, 1fr) 80px 70px; }
    .trow > .last { display: none; }
    .search { width: 180px; }
    .search:focus-within { width: 220px; }
}
@media (max-width: 860px) {
    .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
    .navtoggle { display: block; margin-left: auto; }
    .mainnav, .search { display: none; width: 100%; }
    .top.open .mainnav { display: flex; flex-wrap: wrap; order: 5; }
    .top.open .search { display: flex; order: 6; }
    .mainnav a.on::after { display: none; }
    .grid2 { grid-template-columns: 1fr; }
    .post { grid-template-columns: 1fr; }
    .author { flex-direction: row; flex-wrap: wrap; text-align: left; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 14px 18px; }
    .author .av.lg { width: 44px; height: 44px; font-size: 18px; border-radius: 50%; }
    .a-stats { display: none; }
    .frow { grid-template-columns: 40px minmax(0, 1fr); }
    .frow > .f-count { display: none; }
    .trow { grid-template-columns: 36px minmax(0, 1fr); }
    .trow > .t-stats { display: none; }
    .pr-stats { grid-template-columns: repeat(2, 1fr); }
    .ulist li { flex-direction: column; align-items: flex-start; }
    .umenu-name { display: none; }
}

/* Vista previa de enlaces: vídeos de YouTube (y shorts en vertical) e imágenes */
.bb .bb-embed { display: block; position: relative; max-width: 640px; aspect-ratio: 16 / 9; margin: 10px 0; border-radius: 10px; overflow: hidden; background: #000; animation: fade .8s var(--soft) both; }
.bb .bb-embed.short { max-width: 300px; aspect-ratio: 9 / 16; }
.bb .bb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bb .bb-imglink { display: block; width: fit-content; text-decoration: none; }
.bb .bb-imglink .bb-img { transition: opacity .3s; }
.bb .bb-imglink:hover .bb-img { opacity: .9; }
.bb a { word-break: break-all; }

/* ---------------- Editor de foto de perfil y banner ---------------- */
.js-only { display: none !important; }
.js .js-only { display: inline-flex !important; }
.js .no-js { display: none !important; }
.img-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.img-actions form { margin: 0; }
.img-actions.row-actions { margin-bottom: 6px; }
.img-edit .av.xl { border-color: #333; }

@keyframes cr-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes cr-bg { from { opacity: 0; } to { opacity: 1; } }
.cropper { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.7); overflow: auto; }
.cropper[open] { animation: cr-in .45s var(--soft) both; }
.cropper::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); animation: cr-bg .4s var(--soft) both; }
.cr-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.cr-head h3 { font-size: 15px; color: #fff; }
.cr-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; transition: background .3s, color .3s; }
.cr-x:hover { background: var(--card-2); color: #fff; }
.cr-body { padding: 20px; display: grid; gap: 16px; justify-items: center; }

.cr-stage { position: relative; overflow: hidden; touch-action: none; user-select: none; cursor: grab; background: #050505; border-radius: 12px; outline: none; }
.cr-stage.dragging { cursor: grabbing; }
.cr-stage:focus-visible { box-shadow: 0 0 0 2px #fff; }
.cr-avatar .cr-stage { width: min(340px, 78vw); aspect-ratio: 1; }
.cr-cover .cr-stage { width: min(660px, 86vw); aspect-ratio: 4 / 1; }
.cr-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.cr-mask { position: absolute; inset: 0; pointer-events: none; }
.cr-avatar .cr-mask::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); outline: 2px solid rgba(255,255,255,.85); outline-offset: -1px; }
.cr-cover .cr-mask::after { content: ''; position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
.cr-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s var(--soft); }
.cr-stage.dragging .cr-grid { opacity: 1; }
.cr-grid i { position: absolute; background: rgba(255,255,255,.35); }
.cr-grid i:nth-child(1) { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.cr-grid i:nth-child(2) { left: 66.66%; top: 0; bottom: 0; width: 1px; }
.cr-grid i:nth-child(3) { top: 33.33%; left: 0; right: 0; height: 1px; }
.cr-grid i:nth-child(4) { top: 66.66%; left: 0; right: 0; height: 1px; }

.cr-zoom { display: flex; align-items: center; gap: 10px; width: min(420px, 100%); }
.cr-zoom input[type=range] { flex: 1; accent-color: #fff; height: 4px; cursor: pointer; }
.cr-zbtn { width: 30px; height: 30px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; transition: background .3s; }
.cr-zbtn:hover { background: var(--card-3); }

.cr-previews { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.cr-prev-avatar, .cr-prev-cover { display: none; align-items: center; gap: 12px; }
.cr-avatar .cr-prev-avatar, .cr-cover .cr-prev-cover { display: flex; }
.cr-previews canvas { background: #111; border: 1px solid #333; }
.cr-previews .p-lg { width: 92px; height: 92px; border-radius: 22px; }
.cr-previews .p-md { width: 42px; height: 42px; border-radius: 50%; }
.cr-previews .p-sm { width: 30px; height: 30px; border-radius: 50%; }
.cr-previews .p-cover { width: min(320px, 70vw); aspect-ratio: 4 / 1; height: auto; border-radius: 8px; }
.hint.center { text-align: center; }
.cr-body .alert { margin: 0; width: 100%; }
.cr-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading::before { content: ''; width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); border-top-color: #000; animation: reg-spin .7s linear infinite; }
.img-edit > .img-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
