/* R6 Intel — tactical, quiet, fast. One accent (signal yellow) for actions and
   active state; orange/blue are reserved for Attack/Defense as in-game. */

:root {
  --bg: #12161b;
  --surface: #191e25;
  --surface-2: #20262f;
  --surface-3: #283039;
  --line: #2b323c;
  --line-strong: #3a434f;
  --text: #e6e9ee;
  --text-2: #b9c1cc;
  --muted: #8a95a4;
  --accent: #f0c04a;
  --accent-ink: #17140a;
  --accent-soft: rgba(240, 192, 74, .13);
  --atk: #e8823f;
  --atk-soft: rgba(232, 130, 63, .14);
  --def: #4f95e3;
  --def-soft: rgba(79, 149, 227, .14);
  --danger: #e5584f;
  --danger-soft: rgba(229, 88, 79, .13);
  --ok: #4cb782;
  --ok-soft: rgba(76, 183, 130, .14);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
h2 { font-size: 16px; line-height: 1.3; font-weight: 620; }
h3 { font-size: 15px; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }
kbd { font-family: var(--font-mono); }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.flip { transform: rotate(180deg); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.inline-form { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- shell ------------------------------------------------------------- */
.shell { min-height: 100vh; }
.main { min-width: 0; padding: 14px 16px calc(var(--tabbar-h) + var(--safe-b) + 28px); }
.page { max-width: 1180px; margin: 0 auto; }
.page--narrow { max-width: 640px; }
.page--form { max-width: 820px; }

.rail { display: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; text-decoration: none; }
.brand__mark { width: 22px; height: 22px; color: var(--accent); stroke-width: 1.6; }

.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(18, 22, 27, .96); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar > a, .tabbar summary {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: var(--muted); text-decoration: none; cursor: pointer; list-style: none; height: 100%;
}
.tabbar summary::-webkit-details-marker { display: none; }
.tabbar .ic { width: 22px; height: 22px; }
.tabbar > a[aria-current="page"] { color: var(--text); }
.tabbar > a[aria-current="page"] .ic { color: var(--accent); }
.tabbar__add .ic { width: 26px; height: 26px; }
.tabbar__add { color: var(--accent-ink) !important; }
.tabbar__add::before { content: ""; position: absolute; width: 46px; height: 46px; border-radius: 13px; background: var(--accent); z-index: -1; }
.tabbar__add { position: relative; isolation: isolate; }
.tabbar__more { position: static; }
.tabbar__more[open] summary { color: var(--text); }
.sheet--menu {
  position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: 6px; display: grid; gap: 2px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.sheet--menu a, .sheet--menu button {
  display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: var(--r-sm);
  text-decoration: none; background: none; border: 0; width: 100%; text-align: left; font-size: 15px; cursor: pointer;
}
.sheet--menu a:hover, .sheet--menu button:hover { background: var(--surface-3); }
.sheet--menu .ic { color: var(--muted); }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
  .tabbar { display: none; }
  .main { padding: 26px 32px 60px; }
  .rail {
    display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh;
    padding: 20px 14px 16px; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto;
  }
  .rail .brand { padding: 2px 10px 6px; }
  .rail__nav, .rail__foot { display: grid; gap: 1px; }
  .rail__nav a, .rail__foot a, .rail__logout {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm);
    color: var(--text-2); text-decoration: none; font-size: 14px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
  }
  .rail__nav a:hover, .rail__foot a:hover, .rail__logout:hover { background: var(--surface); color: var(--text); }
  .rail__nav a[aria-current="page"], .rail__foot a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
  .rail__nav a[aria-current="page"] .ic { color: var(--accent); }
  .rail__side { padding-left: 39px !important; position: relative; }
  .rail__side .dot { position: absolute; left: 15px; }
  .rail__gap { height: 12px; }
  .rail__add { margin: 0 2px; }
  .rail__foot { margin-top: auto; }
  .rail__logout .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.dot--attack { background: var(--atk); }
.dot--defense { background: var(--def); }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font-weight: 560; font-size: 14px;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-3); border-color: #4a5462; }
.btn .ic { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.btn--primary:hover { background: #f5cd66; border-color: #f5cd66; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn--danger { color: #f08a83; }
.btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger-solid:hover { background: #ee6b62; border-color: #ee6b62; }
.btn--sm { min-height: 34px; padding: 0 11px; font-size: 13px; }
.btn--block { width: 100%; min-height: 46px; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; font-size: 13px; }

/* ---- toasts / alerts ------------------------------------------------------ */
.toasts { position: fixed; z-index: 60; top: 12px; left: 50%; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 11px 8px 11px 14px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: 14px; animation: toast-in .18s ease-out;
}
.toast--ok { border-left: 3px solid var(--ok); }
.toast--error { border-left: 3px solid var(--danger); }
.toast--static { position: static; box-shadow: none; margin-bottom: 14px; animation: none; }
.toast__x { background: none; border: 0; color: var(--muted); padding: 4px; cursor: pointer; display: flex; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
.offline { position: fixed; z-index: 55; left: 0; right: 0; top: 0; padding: 8px 16px; background: var(--danger); color: #fff; font-size: 13px; text-align: center; }

.alert { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 14px; margin: 12px 0; }
.alert--error { border-color: rgba(229, 88, 79, .45); background: var(--danger-soft); }
.alert--warn { border-color: rgba(240, 192, 74, .4); background: var(--accent-soft); }
.alert--info { border-color: var(--line-strong); }
.alert a { color: var(--text); }
.alert .inline-form { margin: 8px 8px 0 0; }

/* ---- tags & badges ---------------------------------------------------------- */
.side { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.side--attack { color: #ffb27c; background: var(--atk-soft); box-shadow: inset 0 0 0 1px rgba(232, 130, 63, .35); }
.side--defense { color: #9cc6f5; background: var(--def-soft); box-shadow: inset 0 0 0 1px rgba(79, 149, 227, .35); }
.floor {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; padding: 0 4px;
  border: 1px solid var(--line-strong); border-radius: 4px; font-size: 11px; font-weight: 650; color: var(--text-2);
  margin-right: 5px; vertical-align: 1px; line-height: 1;
}
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); text-decoration: none; white-space: nowrap;
}
a.tag:hover { border-color: var(--line-strong); color: var(--text); }
.tag--ok { color: #8fdcb5; background: var(--ok-soft); border-color: rgba(76, 183, 130, .35); }
.tag--danger { color: #f5a29c; background: var(--danger-soft); border-color: rgba(229, 88, 79, .35); }
.tag--accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(240, 192, 74, .35); }
.tag--muted { color: var(--muted); }
.tag--easy { color: #8fdcb5; }
.tag--medium { color: var(--text-2); }
.tag--hard { color: #f5a29c; }
.tag--hash { color: var(--text-2); }
.badge-platform {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 650;
  background: rgba(10, 12, 15, .82); color: #fff; letter-spacing: .01em;
}
.badge-platform::before { content: ""; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.badge-platform--tiktok::before { background: #2de2e6; box-shadow: 2px 0 0 #fe2c55; }
.badge-platform--instagram::before { background: #e1306c; }
.badge-platform--youtube::before { background: #ff3b30; }
.n { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13px; }
.n::before { content: ""; width: 7px; height: 7px; border-radius: 2px; }
.n--attack::before { background: var(--atk); }
.n--defense::before { background: var(--def); }

/* ---- search / omni ----------------------------------------------------------- */
.omni__box {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
  transition: border-color .12s, background .12s;
}
.omni__box:focus-within { border-color: var(--accent); background: var(--surface-2); }
.omni__box .ic { width: 20px; height: 20px; color: var(--muted); }
.omni__box input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 17px; }
.omni__box input::placeholder { color: var(--muted); }
.omni__box input::-webkit-search-cancel-button { filter: invert(.6); }
.omni__kbd { display: none; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 12px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) and (min-width: 960px) { .omni__kbd { display: inline-block; } }
.omni__box--sm { height: 44px; max-width: 420px; margin-bottom: 18px; }
.omni__box--sm input { font-size: 16px; }

/* ---- dashboard ---------------------------------------------------------------- */
.dash-head { display: grid; gap: 10px; margin-bottom: 14px; }
.dash-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13.5px; }
.dash-add { display: none; }
@media (min-width: 960px) { .dash-add { display: inline-flex; } .dash-head { margin-bottom: 18px; } }
.side-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
.side-tile {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 84px; padding: 14px 16px;
  border-radius: var(--r-lg); text-decoration: none; border: 1px solid; transition: background .12s;
}
.side-tile__label { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.side-tile__count { font-size: 28px; font-weight: 300; line-height: 1; opacity: .9; }
.side-tile--attack { background: var(--atk-soft); border-color: rgba(232, 130, 63, .35); color: #ffc49b; }
.side-tile--attack:hover { background: rgba(232, 130, 63, .22); }
.side-tile--defense { background: var(--def-soft); border-color: rgba(79, 149, 227, .35); color: #b3d3f7; }
.side-tile--defense:hover { background: rgba(79, 149, 227, .22); }
@media (min-width: 700px) { .side-tile { min-height: 104px; padding: 18px 20px; } .side-tile__label { font-size: 24px; } .side-tile__count { font-size: 36px; } }

.dash-section { margin-bottom: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head__link { font-size: 13.5px; color: var(--text-2); }

.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .map-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .map-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.map-btn {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; min-height: 52px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .12s, background .12s;
}
.map-btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.map-btn__name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-btn__counts { display: flex; gap: 12px; font-size: 12.5px; }
@media (min-width: 600px) { .map-btn { padding: 11px 13px; min-height: 62px; gap: 4px; } }
.map-btn.is-empty .map-btn__name { color: var(--text-2); }

/* ---- cards ------------------------------------------------------------------------ */
.cards { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.card {
  position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 0 12px; align-items: start;
  padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .12s, background .12s;
}
.card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.card__side { position: absolute; left: 5px; top: 5px; }
.card__side .side { height: 19px; padding: 0 5px; font-size: 10.5px; background: rgba(12, 14, 18, .82); }
.card .badge-platform { position: absolute; left: 5px; bottom: 5px; height: 18px; font-size: 10.5px; padding: 0 5px; }
.card__body { min-width: 0; padding: 2px 0; display: grid; gap: 3px; }
.card__title { font-size: 15px; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__where { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--muted); }
.card__ops { color: var(--text-2); }
.card__fav { position: relative; z-index: 2; }
.card::before { content: ""; position: absolute; z-index: 3; left: -1px; top: -1px; bottom: -1px; width: 3px; border-radius: var(--r) 0 0 var(--r); background: var(--card-side, transparent); pointer-events: none; }
.card--attack { --card-side: var(--atk); }
.card--defense { --card-side: var(--def); }

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
  .card { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .card::before { left: -1px; right: -1px; top: -1px; bottom: auto; width: auto; height: 3px; border-radius: var(--r) var(--r) 0 0; }
  .card__media { aspect-ratio: 16 / 9; border-radius: var(--r) var(--r) 0 0; }
  .card__side { left: 8px; top: 10px; }
  .card__side .side { height: 21px; font-size: 11px; padding: 0 7px; }
  .card .badge-platform { left: 8px; bottom: 8px; }
  .card__body { padding: 11px 13px 13px; gap: 4px; }
  .card__fav { position: absolute; right: 6px; top: 6px; }
  .card__fav .fav { background: rgba(12, 14, 18, .72); }
}

/* placeholder art for missing/broken images: map name on a floor-plan grid */
.ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px 9px;
  background-color: var(--surface-2);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 18px 18px; background-position: -1px -1px;
}
.ph__map { font-weight: 700; font-size: 12px; color: var(--text-2); line-height: 1.15; background: var(--surface-2); align-self: flex-start; padding: 1px 4px 0 0; }
.ph__cat { font-size: 11px; color: var(--muted); background: var(--surface-2); align-self: flex-start; padding-right: 4px; }
.card__media .ph { padding-top: 30px; }
@media (max-width: 599px) { .card__media .ph__map, .card__media .ph__cat { display: none; } }
@media (min-width: 600px) { .ph__map { font-size: 15px; } .ph__cat { font-size: 12px; } .card__media .ph { padding: 10px 12px 34px; justify-content: flex-end; align-items: flex-end; } .card__media .ph__map, .card__media .ph__cat { align-self: flex-end; padding: 1px 0 0 4px; } }
.ph--mini { position: absolute; }
.img-failed img { display: none; }

.fav {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer; transition: color .12s, transform .12s;
}
.fav .ic { width: 20px; height: 20px; }
.fav:hover { color: var(--text); }
.fav.is-on { color: var(--accent); }
.fav.is-on .ic { fill: currentColor; }
.fav:active { transform: scale(.9); }
.fav--sm { width: 36px; height: 36px; }
.fav--lg { width: 46px; height: 46px; border: 1px solid var(--line-strong); }
.fav--lg .ic { width: 22px; height: 22px; }
.fav-form { display: contents; }

/* ---- library ---------------------------------------------------------------------- */
.lib-head { display: grid; gap: 6px; margin-bottom: 14px; }
.lib-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lib-head__stats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: 13.5px; }
.lib-head--plain { margin-bottom: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-size: 14px; margin: 0 0 10px -4px; padding: 6px 4px; }
.back:hover { color: var(--text); }
.lib-head .back { margin-bottom: 0; }

.searchbar { position: sticky; top: 0; z-index: 20; padding: 8px 0; margin: -8px 0 4px; background: var(--bg); }
.filterbar { display: grid; gap: 10px; margin-bottom: 10px; }
@media (min-width: 760px) { .filterbar { grid-template-columns: auto minmax(0, 1fr); align-items: center; } }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__opt > span {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 7px;
  font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: background .12s, color .12s;
}
.seg__n { font-weight: 500; font-size: 12.5px; opacity: .75; }
.seg__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.seg__opt input:checked + span { background: var(--surface-3); color: var(--text); }
.seg__opt--attack input:checked + span { background: var(--atk); color: #1c0f05; }
.seg__opt--defense input:checked + span { background: var(--def); color: #06121f; }
.seg--lg .seg__opt > span { height: 44px; font-size: 15px; }

.picks { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)) 46px; }
.picks--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)) 46px; }
.picks--n1 { grid-template-columns: minmax(0, 1fr) 46px; }
.pick__more-ic { display: none; }
@media (max-width: 519px) {
  .pick > summary { padding: 0 9px; gap: 5px; font-size: 13.5px; }
  .pick > summary > .ic:last-child { display: none; }
  .pick.is-set .pick__label { display: none; }
  .pick__label--more { display: none; }
  .pick .pick__more-ic { display: block; margin: 0 auto; width: 18px; height: 18px; color: var(--text-2); }
  .picks > .pick:last-child > summary { justify-content: center; padding: 0; }
}
@media (min-width: 520px) { .picks, .picks--n1, .picks--n2 { display: flex; flex-wrap: wrap; } }
.pick { position: relative; min-width: 0; }
.pick > summary {
  display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; list-style: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; color: var(--text-2);
  user-select: none; -webkit-user-select: none; transition: border-color .12s;
}
.pick > summary::-webkit-details-marker { display: none; }
.pick > summary:hover { border-color: var(--line-strong); }
.pick > summary .ic { width: 15px; height: 15px; margin-left: auto; color: var(--muted); transition: transform .15s; }
.pick[open] > summary .ic { transform: rotate(180deg); }
.pick__label { flex: none; }
.pick__val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); font-weight: 600; }
.pick.is-set > summary { border-color: rgba(240, 192, 74, .55); background: var(--accent-soft); color: var(--text); }
.pick.is-set .pick__label { color: var(--text-2); }
.pick__panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 320px; max-height: min(460px, 70vh); overflow-y: auto;
  padding: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  overscroll-behavior: contain;
}
.pick__panel--wide { width: 400px; }
.pick__title { font-size: 12.5px; color: var(--muted); margin: 2px 2px 8px; }
.pick__title:not(:first-child) { margin-top: 14px; }
.pick__filter { width: 100%; height: 40px; padding: 0 12px; margin-bottom: 10px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); outline: none; font-size: 16px; }
.pick__filter:focus { border-color: var(--accent); }
@media (max-width: 759px) {
  .pick[open]::before { content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(5, 7, 9, .55); }
  .pick__panel, .pick__panel--wide {
    position: fixed; z-index: 46; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; border-radius: var(--r-lg) var(--r-lg) 0 0;
    padding: 16px 14px calc(20px + var(--safe-b)); animation: sheet-in .16s ease-out;
  }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } }

.opts { display: grid; gap: 4px; }
.opts--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts--row { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px; border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent; }
.opts--row .opt { min-height: 36px; border-color: var(--line); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { background: var(--surface-3); }
.opt__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.opt__n { font-size: 12.5px; color: var(--muted); }
.opt.is-zero .opt__name { color: var(--muted); }
.opt:has(input:checked), .opt input:checked ~ .opt__name { color: var(--accent); }
.opt:has(input:checked) { background: var(--accent-soft); border-color: rgba(240, 192, 74, .4); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.opt--attack .opt__name::before, .opt--defense .opt__name::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 2px; margin-right: 7px; vertical-align: 2px; }
.opt--attack .opt__name::before { background: var(--atk); }
.opt--defense .opt__name::before { background: var(--def); }
.opt--check input { position: static; opacity: 1; pointer-events: auto; accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }

.site-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 2px 0 10px; }
.site-chips .chip { min-width: 0; min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.site-chips .chip__label { white-space: normal; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.site-chips .chip__n { margin-left: auto; }
@media (min-width: 640px) { .site-chips { display: flex; flex-wrap: wrap; } }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px; border-radius: 999px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 13.5px;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip .ic { width: 14px; height: 14px; }
.chip__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip__n { color: var(--muted); font-size: 12px; }
.chip.is-zero { opacity: .55; }
.chip.is-on { background: var(--accent-soft); border-color: rgba(240, 192, 74, .55); color: var(--text); }
.chip.is-on .floor { border-color: rgba(240, 192, 74, .55); color: var(--accent); }
.chip--site { border-radius: var(--r-sm); }
.chip--active { background: var(--accent-soft); border-color: rgba(240, 192, 74, .45); color: var(--text); min-height: 32px; }
.chip--attack { background: var(--atk-soft); border-color: rgba(232, 130, 63, .45); }
.chip--defense { background: var(--def-soft); border-color: rgba(79, 149, 227, .45); }

.activebar { margin-bottom: 12px; }
.activebar:empty, .activebar:not(:has(*)) { display: none; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 34px; }
.results-head .count { margin: 0; }
.active-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; min-width: 0; }
.clear-all { font-size: 13.5px; color: var(--text-2); padding: 6px 4px; }
.sort { position: relative; display: inline-flex; align-items: center; flex: none; margin-left: auto; color: var(--muted); }
.sort .ic { position: absolute; left: 9px; width: 15px; height: 15px; pointer-events: none; }
.sort select { appearance: none; -webkit-appearance: none; height: 34px; padding: 0 12px 0 30px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; cursor: pointer; }

.results { min-height: 200px; transition: opacity .12s; }
.results.is-loading { opacity: .55; }
.count { font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; }
.sort select { max-width: 170px; }
.more { display: flex; width: 100%; max-width: 320px; margin: 18px auto 0; }

.empty { padding: 34px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--text-2); }
.empty h1, .empty h2 { color: var(--text); margin-bottom: 8px; }
.empty p { max-width: 480px; margin: 0 auto; }
.empty__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px !important; }
.empty--hero { margin-bottom: 28px; text-align: left; padding: 22px; border-style: solid; background: var(--surface); }
.empty--hero p { margin: 0 0 16px; }

/* ---- maps / operators overview ------------------------------------------------------- */
.map-list { list-style: none; display: grid; gap: 6px; }
@media (min-width: 760px) { .map-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.map-row { display: flex; align-items: center; gap: 14px; padding: 0 14px; min-height: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.map-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.map-row__name { font-weight: 600; flex: 1; min-width: 0; }
.map-row__sites { font-size: 13px; }
.map-row__counts { display: flex; gap: 12px; min-width: 70px; justify-content: flex-end; }
.map-row .ic { color: var(--muted); width: 16px; height: 16px; }
.map-row.is-empty .map-row__name { color: var(--text-2); }

.op-columns { display: grid; gap: 22px; }
@media (min-width: 900px) { .op-columns { grid-template-columns: 1fr 1fr; } }
.op-col h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.op-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; }
.op-tile { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 550; }
.op-tile:hover { border-color: var(--line-strong); background: var(--surface-2); }
.op-col--attack .op-tile { box-shadow: inset 2px 0 0 var(--atk); }
.op-col--defense .op-tile { box-shadow: inset 2px 0 0 var(--def); }
.op-tile.is-empty { color: var(--text-2); font-weight: 450; }
.op-tile__n { font-size: 12.5px; color: var(--accent); font-weight: 650; }

/* ---- detail ------------------------------------------------------------------------- */
.page--detail { max-width: 1080px; }
.detail-head { display: grid; gap: 10px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-head__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.detail-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-head h1 { font-size: 23px; }
@media (min-width: 760px) { .detail-head h1 { font-size: 28px; } }
.detail-head__where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 15px; color: var(--text-2); }
.detail-head__where a { color: var(--text); font-weight: 560; text-decoration: none; }
.detail-head__where a:hover { text-decoration: underline; }
.where__sep { color: var(--line-strong); margin: 0 8px; }
.op-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.op { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; }
.op--attack { box-shadow: inset 2px 0 0 var(--atk); }
.op--defense { box-shadow: inset 2px 0 0 var(--def); }
.op:hover { border-color: var(--line-strong); }

.detail-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; } }
.detail-main > * + * { margin-top: 18px; }
.video-cta {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; border-radius: var(--r);
  background: var(--accent); color: var(--accent-ink); text-decoration: none; transition: background .12s;
}
.video-cta:hover { background: #f5cd66; }
.video-cta > .ic:first-child { width: 22px; height: 22px; fill: currentColor; }
.video-cta .ic:last-child { margin-left: auto; width: 18px; height: 18px; opacity: .7; }
.video-cta__text { display: grid; min-width: 0; }
.video-cta__label { font-weight: 700; font-size: 16px; }
.video-cta__sub { font-size: 13px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shot { position: relative; margin-left: 0; margin-right: 0; margin-bottom: 0; border-radius: var(--r); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); min-height: 180px; }
.shot .ph { padding: 14px; }
.shot .ph__map { font-size: 18px; }
.shot--empty { display: none; }
.shot__link { position: relative; display: block; z-index: 1; }
.shot img { width: 100%; max-height: 72vh; object-fit: contain; background: #0c0f13; color: transparent; }
.shot figcaption { position: relative; z-index: 1; padding: 8px 12px; font-size: 12.5px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); }
.shot.img-failed { display: none; }

.lede { font-size: 16.5px; line-height: 1.55; color: var(--text); max-width: 68ch; }
.block h2 { margin-bottom: 10px; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 8px; max-width: 70ch; }
.steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 46px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.steps li::before {
  content: counter(step); position: absolute; left: 10px; top: 9px; width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-3); color: var(--accent);
}
.prose p { max-width: 70ch; color: var(--text-2); }
.prose p + p { margin-top: 10px; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }

.detail-side { display: grid; gap: 18px; align-content: start; }
.block--note { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.block--note h2 { font-size: 14.5px; }
.block--note textarea { min-height: 90px; }
.meta { margin: 0; display: grid; gap: 8px; font-size: 13.5px; }
.meta div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; text-align: right; }
.actions { display: grid; gap: 6px; }
.actions form, .actions details { display: grid; }
.actions .btn { justify-content: flex-start; }
.report > summary { list-style: none; }
.report > summary::-webkit-details-marker { display: none; }
.report__form { margin-top: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.radio { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.radio input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }

/* ---- forms ---------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field__label { font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 0; }
.field__label .muted { font-weight: 400; }
.field__hint { font-size: 12.5px; color: var(--muted); }
.field-error { font-size: 13px; color: #f5a29c; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger) !important; }
input[type="text"], input[type="password"], input[type="url"], input[type="search"]:not(.omni__box input), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); outline: none; font-size: 16px; transition: border-color .12s;
}
textarea { resize: vertical; line-height: 1.45; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a95a4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
::placeholder { color: #6b7685; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; margin-top: 8px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }

.sform { display: grid; gap: 14px; margin-top: 14px; }
.sform__group { display: grid; gap: 16px; padding: 16px; margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.sform__group > legend { float: left; width: 100%; padding: 0; font-weight: 650; font-size: 15px; color: var(--text); }
.sform__group > legend + * { clear: both; }
.sform__group input[type="text"], .sform__group input[type="url"], .sform__group select, .sform__group textarea { background: var(--bg); }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.sform__bar {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 15; display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 0; margin-top: 4px; background: linear-gradient(transparent, var(--bg) 30%);
}
@media (min-width: 960px) { .sform__bar { bottom: 0; } }
.sform__bar .btn--primary { min-width: 180px; }

.vpreview { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.vpreview__thumb { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.vpreview__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vpreview__text { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.vpreview__title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.vpreview .badge-platform { background: var(--surface-3); }
.vpreview.is-loading .vpreview__title { color: var(--muted); }

.file { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--bg); color: var(--text-2); cursor: pointer; font-size: 14px; }
.file:hover { border-color: var(--muted); color: var(--text); }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.current-image { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.current-image img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }

.op-filter { margin-bottom: 2px; }
.op-picker { display: grid; gap: 12px; max-height: 300px; overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.op-picker__head { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.op-picker__list { display: flex; flex-wrap: wrap; gap: 6px; }
.opchip { position: relative; }
.opchip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opchip span { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--bg); font-size: 14px; transition: background .1s, border-color .1s; }
.opchip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.opchip--attack input:checked + span { background: var(--atk); border-color: var(--atk); color: #1c0f05; font-weight: 650; }
.opchip--defense input:checked + span { background: var(--def); border-color: var(--def); color: #06121f; font-weight: 650; }
.opchip.is-hidden { display: none; }

/* ---- auth ------------------------------------------------------------------------------ */
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 400px; }
.auth h1 { margin: 22px 0 6px; }
.auth > .muted { margin-bottom: 20px; }
.auth form { margin-top: 18px; }
.auth__brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; }
.auth__alt { margin-top: 18px; font-size: 14px; color: var(--text-2); }
.auth__alt + .auth__alt { margin-top: 6px; }

/* ---- community / settings / admin ------------------------------------------------------ */
.community-grid { display: grid; gap: 10px; }
@media (min-width: 960px) { .community-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; } }
.feed { list-style: none; display: grid; }
.feed__item { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.feed__title { font-weight: 600; text-decoration: none; }
.feed__title:hover { text-decoration: underline; }
.feed__meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13px; color: var(--text-2); }
.feed__meta .side { height: 18px; font-size: 10.5px; padding: 0 5px; }
.tally { list-style: none; display: grid; }
.tally li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tally li > span:first-child, .tally li > a { font-weight: 560; }
.tally__n { margin-left: auto; font-weight: 700; color: var(--accent); }
.tally--reports li { display: grid; gap: 2px; }

.panel { padding: 18px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.panel > h2 { margin-bottom: 14px; }
.panel > h2 + .muted { margin: -8px 0 14px; }
.panel--accent { border-color: rgba(240, 192, 74, .5); background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.panel input[type="text"], .panel input[type="password"], .panel select, .panel textarea { background: var(--bg); }
.sessions { list-style: none; display: grid; margin-bottom: 12px; }
.sessions li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sessions strong { font-weight: 560; word-break: break-word; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 10px 12px; margin-bottom: -1px; text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 560; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
@media (max-width: 519px) { .tabs { flex-wrap: nowrap; gap: 0; justify-content: space-between; } .tabs a { padding: 10px 6px; font-size: 13.5px; } }
.panel .muted + .small, .panel p.muted + p { margin-top: 8px; }
.filter-links { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13.5px; }
.filter-links a { color: var(--text-2); text-decoration: none; padding: 4px 0; }
.filter-links a[aria-current="true"] { color: var(--accent); }
.inline-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; }
.inline-fields .field { flex: 1 1 180px; }
.inline-fields .field--sm { flex: 0 1 140px; }
.inline-fields .field--xs { flex: 0 0 72px; }
.inline-fields .check { margin: 0 0 12px; }
.inline-fields--tight { margin-top: 8px; }
.inline-fields--tight input { flex: 1 1 200px; min-height: 34px; padding: 6px 10px; font-size: 14px; }
.codebox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 8px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line-strong); }
@media (max-width: 519px) { .codebox__code, .codebox__link { flex-basis: 100%; } .codebox__code { font-size: 20px; } }
.codebox__code { font-size: 22px; font-weight: 700; letter-spacing: .06em; color: var(--accent); flex: 1; word-break: break-all; }
.codebox__link { font-size: 13px; color: var(--text-2); flex: 1; word-break: break-all; }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 560; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t-right { text-align: right; }
@media (max-width: 640px) {
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { padding: 0; border: 0; }
  .table td:nth-child(1) { font-weight: 600; }
  .table td:nth-child(3) { grid-column: 1 / -1; }
  .table td:nth-child(6) { grid-row: 1; grid-column: 2; }
}
.user-list, .report-list { list-style: none; display: grid; }
.user-row, .report-row { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .user-row, .report-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.user-row.is-off strong { color: var(--muted); text-decoration: line-through; }
.user-row__actions { display: flex; flex-wrap: wrap; gap: 4px; }
.report-row.is-done { opacity: .6; }
.gd-grid { display: grid; gap: 0 16px; margin-top: 14px; }
@media (min-width: 1100px) { .gd-grid { grid-template-columns: 1fr 1fr; } }
.gd-list { list-style: none; display: grid; }
.gd-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gd-list li > a { font-weight: 560; flex: 1; text-decoration: none; }
.gd-list li.is-sel > a { color: var(--accent); }
.gd-list li.is-off { opacity: .5; }
.gd-actions { display: flex; gap: 2px; margin-left: auto; }
.gd-site-form { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.gd-site-form input[type="text"] { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.floor-input { max-width: 64px; text-transform: uppercase; }
.gd-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.opchip-static { height: 32px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; font-size: 13.5px; }
.opchip-static--attack { box-shadow: inset 2px 0 0 var(--atk); }
.opchip-static--defense { box-shadow: inset 2px 0 0 var(--def); }
.opchip-static.is-off { opacity: .4; text-decoration: line-through; }
