:root {
  --bg: #0e0e0f;
  --panel: #161617;
  --panel-2: #1c1c1e;
  --line: #262628;
  --line-soft: #202022;
  --text: #ececee;
  --text-2: #b9b9be;
  --muted: #7d7d84;
  --green: #3ecf6e;
  --green-dim: #2ea55a;
  --red: #f9171b;
  --red-deep: #8b0405;
  --amber: #e5a93b;
  --radius: 8px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 13px/1.45 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.upper { text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { flex: none; vertical-align: -2px; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line-soft); background: #0b0b0c; position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark { font-weight: 700; letter-spacing: .22em; font-size: 15px; color: #fff; }
.brand-mark::after { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--red); border-radius: 50%; margin-left: 6px; vertical-align: 2px; }
.brand-sub { font-size: 10.5px; letter-spacing: .22em; color: var(--muted); font-weight: 600; }
.brand-lg { flex-direction: column; align-items: center; gap: 2px; margin-bottom: 18px; }
.brand-lg .brand-mark { font-size: 26px; }
.topbar-user { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.topbar-user img { border-radius: 50%; background: var(--panel-2); }
.topbar-user form { margin: 0; }
.tag { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; background: rgba(249, 23, 27, .14); color: #ff6b6e; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }

/* layout */
.wrap { max-width: 1680px; margin: 0 auto; padding: 20px 12px 48px; }
.wrap.narrow { max-width: 980px; }
.page-title { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.card.pad { padding: 20px; }
.card h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 14px; }
.card h3 { font-size: 12px; color: var(--muted); font-weight: 600; margin: 18px 0 6px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: 500 13px Inter, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #3a3a3e; background: #232326; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: #fff; color: #0e0e0f; border-color: #fff; }
.btn-primary:hover { background: #e4e4e7; border-color: #e4e4e7; }
.btn-ghost { background: transparent; }
.btn-danger { color: #ff7a7c; border-color: rgba(249, 23, 27, .35); background: rgba(249, 23, 27, .08); }
.btn-danger:hover { background: rgba(249, 23, 27, .16); border-color: rgba(249, 23, 27, .55); }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; height: 42px; width: 100%; font-size: 14px; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }
.btn-link { background: none; border: 0; padding: 0; color: var(--text-2); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: #fff; }

/* toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select select, .search input, .field input, .field select, .field textarea, .copy-pick select {
  height: 32px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 0 10px; font: 13px Inter, sans-serif; outline: none;
}
.select select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237d7d84' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; min-width: 76px; }
.search { position: relative; display: inline-flex; align-items: center; }
.search svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 30px; width: 280px; }
select:focus, input:focus, textarea:focus { border-color: #4a4a50; box-shadow: 0 0 0 3px rgba(255, 255, 255, .05); }

/* table */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; min-width: 1100px; }
.grid th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 13px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: inherit; }
.th-sort:hover, .th-sort.is-active, .th-copies .th-sort { color: var(--text); }
.th-sort svg { opacity: .7; }
.grid td { padding: 0 14px; height: 52px; border-bottom: 1px solid var(--line-soft); color: var(--text); white-space: nowrap; }
.grid tbody tr { cursor: pointer; transition: background .12s; }
.grid tbody tr:hover { background: #1b1b1d; }
.grid tbody tr:last-child td { border-bottom: 0; }
.c-owner, .c-car { font-weight: 500; }
.tebex { color: var(--green); }
.copy-btn { border: 0; background: none; color: var(--muted); padding: 2px 4px; margin-left: 2px; cursor: pointer; border-radius: 4px; opacity: 0; transition: opacity .12s; }
tr:hover .copy-btn, .details .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: #fff; background: #2a2a2d; }
.thumbs { display: flex; gap: 6px; }
.thumbs img { width: 56px; height: 32px; object-fit: cover; border-radius: 4px; border: 1px solid #2c2c30; background: var(--panel-2); display: block; }
.thumb-empty { width: 56px; height: 32px; border: 1px dashed #2f2f33; border-radius: 4px; display: grid; place-items: center; color: #4a4a50; }
.link-view { display: inline-flex; align-items: center; gap: 5px; color: var(--green); text-decoration: none; font-weight: 500; }
.link-view:hover { color: #6ee396; }
.th-actions, .c-actions { width: 100px; }
.empty { text-align: center; color: var(--muted); height: 120px !important; cursor: default; }
.empty a { color: var(--green); }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 12px; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager a, .pager span { min-width: 26px; height: 26px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 5px; text-decoration: none; color: var(--text-2); }
.pager a:hover { background: var(--panel-2); color: #fff; }
.pager .current { background: #2a2a2d; color: #fff; }
.pager .disabled, .pager .gap { color: #4a4a50; }

/* view */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; margin-bottom: 12px; }
.back:hover { color: #fff; }
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.view-head .page-title { font-size: 22px; }
.head-actions { display: flex; gap: 8px; }
.chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chip { font-size: 11.5px; padding: 3px 8px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); }
.chip-tier { background: rgba(62, 207, 110, .1); border-color: rgba(62, 207, 110, .3); color: var(--green); font-weight: 600; }
.view-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.side { display: grid; gap: 16px; min-width: 0; }
.gallery-card { padding: 12px; }
.hero { display: block; width: 100%; padding: 0; border: 0; background: #0a0a0b; border-radius: 6px; overflow: hidden; cursor: zoom-in; position: relative; }
.hero img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.hero-label, .strip-item span { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 4px; }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.strip-item { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--panel-2); cursor: zoom-in; aspect-ratio: 16 / 9; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-item span { left: 4px; bottom: 4px; font-size: 10px; }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line-soft); }
.file-list li { display: flex; gap: 14px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.file-list .file-name { font-weight: 500; min-width: 90px; }
.file-list a { color: var(--green); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.file-list a:hover { text-decoration: underline; }
.file-list .muted { flex: 1; }
.no-images { display: grid; place-items: center; gap: 8px; padding: 64px 0; color: var(--muted); }
.no-images p { margin: 0; }
.details { display: grid; grid-template-columns: 100px 1fr; gap: 10px 12px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; word-break: break-word; }
.notes { margin: 0; color: var(--text-2); white-space: normal; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.slots li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--panel-2); border: 1px solid transparent; }
.slots li.is-current { border-color: rgba(62, 207, 110, .4); }
.slots li.is-free { background: transparent; border: 1px dashed var(--line); }
.slot-n { font-size: 11px; color: var(--muted); width: 54px; flex: none; }
.slots a { color: var(--text); text-decoration: none; font-weight: 500; }
.slots a:hover { color: var(--green); }
.slots .mono { margin-left: auto; }
.slots .slot-add { margin-left: auto; color: var(--green); font-weight: 500; font-size: 12px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 360px; overflow-y: auto; }
.history li { overflow-wrap: anywhere; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.h-who { color: var(--text); font-weight: 600; }
.history time { display: block; font-size: 11px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(4, 4, 5, .94); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 92vw; max-height: calc(92vh - 40px); object-fit: contain; }
.lightbox figcaption { display: flex; gap: 14px; align-items: center; font-size: 12px; }
.lightbox figcaption a { color: var(--green); text-decoration: none; }
.lb-close, .lb-prev, .lb-next { position: absolute; background: rgba(255, 255, 255, .06); border: 0; color: #fff; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .14); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field em { font-style: normal; font-weight: 400; }
.field input, .field textarea { width: 100%; height: 36px; }
.field textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.field .mono, .field input.mono { font-family: var(--mono); font-size: 12.5px; }
.span-2 { grid-column: span 2; }
.copy-pick { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.copy-pick select { height: 36px; min-width: 90px; }
.err { color: #ff7a7c; font-size: 11.5px; }
.err:empty { display: none; }
.hint { color: var(--muted); font-size: 11.5px; }
.hint:empty { display: none; }
.hint.warn { color: var(--amber); }
.field.has-err input, .field.has-err select { border-color: rgba(249, 23, 27, .6); }
.alert { background: rgba(249, 23, 27, .1); border: 1px solid rgba(249, 23, 27, .35); color: #ffb3b4; padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; }
.card .section-title { font-size: 12px; margin: 30px 0 6px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.dropzone { margin-top: 12px; border: 1.5px dashed #34343a; border-radius: 8px; padding: 26px 16px; display: grid; place-items: center; gap: 6px; text-align: center; color: var(--text-2); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.over { border-color: var(--green-dim); background: rgba(62, 207, 110, .04); outline: none; }
.dropzone svg { color: var(--muted); }
.url-row { display: flex; gap: 8px; margin-top: 10px; }
.url-input { flex: 1; }
.url-input input { width: 100%; height: 36px; }
.url-row .btn { height: 36px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.tiles:empty { display: none; }
.tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 8px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.tile-img { display: block; aspect-ratio: 16 / 9; background: #0a0a0b; border-radius: 4px; overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-fallback { display: grid; place-items: center; height: 100%; padding: 8px; text-align: center; font-size: 11px; color: var(--muted); }
.tile-label { height: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; color: var(--text); padding: 0 8px; font: 12px Inter, sans-serif; outline: none; }
.tile-meta { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-actions { display: flex; gap: 4px; align-items: center; }
.tile-actions button { border: 1px solid var(--line); background: var(--panel); color: var(--text-2); border-radius: 5px; height: 26px; min-width: 28px; display: grid; place-items: center; cursor: pointer; }
.tile-actions button:hover { color: #fff; border-color: #3a3a3e; }
.tile-actions .danger { margin-left: auto; }
.tile-actions .danger:hover { color: #ff7a7c; border-color: rgba(249, 23, 27, .5); }
.badge { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--green); }
.tile-status { display: none; font-size: 11px; color: var(--text-2); }
.tile.is-uploading .tile-status, .tile.is-done .tile-status, .tile.is-failed .tile-status { display: block; }
.tile-status .bar { height: 3px; background: #2a2a2d; border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.tile-status .bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.tile.is-failed { border-color: rgba(249, 23, 27, .6); }
.tile.is-failed .tile-status { color: #ff9a9c; }
.tile.is-failed .bar i { background: var(--red); width: 100% !important; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, rgba(139, 4, 5, .25), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 32px 28px; text-align: center; }
.login-card h1 { font-size: 18px; margin: 0 0 6px; }
.login-card p { margin: 0 0 22px; }

/* toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: #f4f4f5; color: #0e0e0f; padding: 8px 14px; border-radius: 6px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .18s; z-index: 200; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #ff6b6e; color: #1a0000; }

@media (max-width: 1100px) {
  .view-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar { padding: 10px 14px; }
  .topbar-user span { display: none; }
  .wrap { padding: 16px 12px 40px; }
  .toolbar-right { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .file-list li { flex-wrap: wrap; gap: 6px 12px; }
}

/* access */
.wrap.mid { max-width: 1180px; }
.sub { margin: 6px 0 0; }
.nav-link { color: var(--text-2); text-decoration: none; padding: 5px 10px; border-radius: 6px; margin-right: 6px; display: inline-flex; align-items: center; gap: 6px; }
.nav-link:hover, .nav-link.is-active { background: var(--panel-2); color: #fff; }
.count { font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--red); color: #fff; border-radius: 9px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; letter-spacing: 0; }
.card h2 .count { vertical-align: 1px; margin-left: 4px; }
.tag.lvl-1 { background: rgba(255, 255, 255, .08); color: var(--text-2); }
.tag.lvl-2 { background: rgba(62, 207, 110, .12); color: var(--green); }
.lvl { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.lvl-1 { background: rgba(255, 255, 255, .08); color: var(--text-2); }
.lvl-2 { background: rgba(62, 207, 110, .12); color: var(--green); }
.lvl-3 { background: rgba(249, 23, 27, .14); color: #ff6b6e; }
.levels-key { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; font-size: 12px; }
.levels-key > div { display: flex; gap: 8px; align-items: center; }
.notice { background: rgba(62, 207, 110, .08); border: 1px solid rgba(62, 207, 110, .3); color: #b6f0c9; padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; text-align: left; }
.section-gap { margin-top: 16px; }
.pad-x { padding: 20px 20px 4px; }
.pad-x p { margin: 0 0 12px; }
.page-access .grid { min-width: 640px; }
.page-access .grid tbody tr, .grid tr.no-link { cursor: default; }
.page-access .grid td { height: 50px; }
.rules .id { margin-left: 8px; font-size: 10.5px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.role-dot { width: 9px; height: 9px; border-radius: 50%; background: #99aab5; display: inline-block; }
.role-list { display: flex; gap: 4px; flex-wrap: wrap; white-space: normal !important; padding: 6px 0; }
.lvl-select { height: 30px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 0 8px; font: 13px Inter, sans-serif; }
.icon-btn { border: 1px solid transparent; background: none; color: var(--muted); border-radius: 6px; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: #ff7a7c; border-color: rgba(249, 23, 27, .4); }
.people { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--panel-2); border-radius: 7px; }
.people img { border-radius: 50%; flex: none; }
.person-main { flex: 1; min-width: 0; }
.person-actions { display: flex; gap: 6px; align-items: center; }
.person-actions select { height: 30px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 0 8px; }
.person-inline { display: inline-flex; align-items: center; gap: 8px; }
.person-inline img { border-radius: 50%; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.rule-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.rule-form .field { min-width: 200px; }
.rule-form .field input, .rule-form .field select { width: 100%; height: 36px; }
.rule-fields { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.rule-fields[hidden] { display: none; }
.rule-form .btn { height: 36px; }
.or { color: var(--muted); padding-bottom: 9px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; height: 36px; }
.seg label { display: flex; align-items: center; padding: 0 14px; cursor: pointer; color: var(--text-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: #2a2a2d; color: #fff; }
.help { margin: 14px 0 0; }
.opt { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; }
.steps { margin: 0 0 14px; padding-left: 18px; color: var(--text-2); display: grid; gap: 4px; }
.steps a, .card p a { color: var(--green); }
.bot-form { display: flex; gap: 8px; max-width: 560px; }
.bot-form input { flex: 1; height: 36px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 0 10px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.warn-text { color: var(--amber); }
@media (max-width: 720px) {
  .people li { flex-wrap: wrap; }
  .person-actions { width: 100%; }
  .nav-link { margin-right: 0; }
}
.count.neutral { background: #2a2a2d; color: var(--text-2); }

/* player links & page */
a.plink { color: inherit; text-decoration: none; border-bottom: 1px dashed transparent; }
a.plink:hover { color: var(--green); border-bottom-color: currentColor; }
.slot-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--green); text-decoration: none; font-size: 12px; font-weight: 500; }
.slot-more:hover { text-decoration: underline; }
.reuse { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; padding: 10px 12px; border-radius: 6px; background: rgba(62, 207, 110, .06); border: 1px solid rgba(62, 207, 110, .25); color: var(--text-2); cursor: pointer; }
.reuse input { accent-color: var(--green); width: 16px; height: 16px; }
.player-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.player-avatar { width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(135deg, var(--red-deep), #2a0203); display: grid; place-items: center; font-weight: 700; font-size: 19px; letter-spacing: .02em; color: #fff; flex: none; }
.aka { margin: 4px 0 0; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 16px; }
.stat { padding: 14px 16px; }
.stat b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.car-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden; transition: border-color .12s, transform .12s; }
.car-card:hover { border-color: #3a3a3e; transform: translateY(-1px); }
.car-img { aspect-ratio: 16 / 9; background: #0a0a0b; display: grid; place-items: center; color: #3a3a3e; position: relative; }
.car-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-img .chip { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.car-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.car-body strong { font-size: 14px; font-weight: 600; }
.car-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12px; }
.car-meta .tebex { font-family: var(--mono); font-size: 11px; }
.car-others { font-size: 11.5px; }
.toolbar-inline { display: flex; gap: 8px; align-items: center; }
.eyebrow { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.mono-title { font-family: var(--mono); font-size: 20px; letter-spacing: .02em; display: flex; align-items: center; gap: 4px; }
a.chip-link { text-decoration: none; }
a.chip-link:hover { border-color: rgba(62, 207, 110, .45); color: var(--green); }
a.plink.strong { font-weight: 600; color: var(--text); }
a.plink.green { color: var(--green); }
.char-group { margin-top: 22px; }
.char-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.char-head h2 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: baseline; gap: 6px; }
.char-head .mono { font-size: 13px; }
.csn-pick { background: none; border: 1px solid var(--line); color: var(--text-2); border-radius: 4px; font: 11px var(--mono); padding: 1px 6px; cursor: pointer; margin-left: 2px; }
.csn-pick:hover { color: var(--green); border-color: rgba(62, 207, 110, .45); }

/* tags */
.tag-chip { --tag: #8a8a93; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 7px; border-radius: 11px; font-size: 11.5px; font-weight: 500; color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--tag) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tag) 45%, transparent); white-space: nowrap; }
.tag-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--tag); flex: none; }
a.tag-chip:hover { background: color-mix(in srgb, var(--tag) 28%, transparent); }
.tag-chip.sm { height: 18px; font-size: 10.5px; padding: 0 6px 0 5px; gap: 4px; }
.tag-chip.sm i { width: 6px; height: 6px; }
.c-car { line-height: 1.3; }
.c-car > span:first-child { display: block; }
.row-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.car-body .row-tags { margin-top: 0; }
.clear-filter { color: var(--muted); margin-left: 4px; }
.tags-field { margin-top: 20px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-opt { --tag: #8a8a93; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); cursor: pointer; font-size: 12.5px; user-select: none; transition: background .12s, border-color .12s; }
.tag-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tag-opt i { width: 8px; height: 8px; border-radius: 50%; background: var(--tag); opacity: .55; }
.tag-opt:hover { border-color: #3a3a3e; color: var(--text); }
.tag-opt:has(input:checked) { background: color-mix(in srgb, var(--tag) 20%, transparent); border-color: color-mix(in srgb, var(--tag) 60%, transparent); color: #fff; }
.tag-opt:has(input:checked) i { opacity: 1; }
.tag-opt:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.tag-opt.is-new { --tag: var(--green); }
.tag-new { height: 28px; width: 140px; border-radius: 14px; border: 1px dashed #3a3a3e; background: transparent; color: var(--text); padding: 0 12px; font: 12.5px Inter, sans-serif; outline: none; }
.tag-new:focus { border-style: solid; border-color: var(--green-dim); }
.tag-table td { height: 54px; }
.tag-name { height: 32px; width: 100%; max-width: 220px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 0 10px; font: 13px Inter, sans-serif; outline: none; }
.tag-name:focus { border-color: #4a4a50; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.swatch.is-on { border-color: #fff; }
.tag-actions { width: 120px; white-space: nowrap; }
.tag-actions .icon-btn { display: inline-grid; }
.icon-btn.plain:hover { color: #fff; border-color: var(--line); }
.tag-add { display: flex; gap: 8px; }
.tag-add input { flex: 1; height: 36px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 0 10px; font: 13px Inter, sans-serif; }
.page-tags .grid { min-width: 600px; }
.field input.tag-new { width: 140px; height: 28px; border-radius: 14px; }
.hint.block { display: block; color: #ffb3b4; background: rgba(249, 23, 27, .08); border: 1px solid rgba(249, 23, 27, .35); padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.5; }
.hint.block a, .alert a { color: #fff; font-weight: 600; }
