/* ============================================================
   BUNKER — The Game · VRChat  |  Design System
   Concrete/steel dark base · amber+red hazard accents · IBM Plex
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Condensed:wght@500;600;700&display=swap');

:root {
  /* --- Surfaces (warm concrete dark) --- */
  --void:      #0a0b0c;
  --base:      #121316;
  --panel:     #191b1f;
  --panel-2:   #20232800;
  --raised:    #23272c;
  --inset:     #0d0e10;
  --overlay:   #2b2f35;

  /* --- Lines --- */
  --line:        #2a2f35;
  --line-soft:   #21252a;
  --line-strong: #3a4047;

  /* --- Text --- */
  --ink:       #f2efe9;  /* painted-concrete off-white */
  --ink-2:     #c6cace;
  --ink-dim:   #8b9198;
  --ink-faint: #5c636b;

  /* --- Hazard accents --- */
  --amber:      #f5b417;
  --amber-2:    #ffc83d;
  --amber-deep: #c9920a;
  --red:        #e2483d;
  --red-2:      #ff6155;
  --red-deep:   #a82a22;
  --green:      #46c07d;   /* success */
  --blue:       #57a8e0;   /* info */

  /* --- Card type colors (0–9), порядок = typeIndex игры (PLAN.md) --- */
  --t0: #4f93d9;  /* Профессия      */
  --t1: #8f7fd6;  /* Хобби          */
  --t2: #46b8a0;  /* Здоровье       */
  --t3: #5fb36b;  /* Биология       */
  --t4: #c9923f;  /* Багаж          */
  --t5: #7e93a6;  /* Доп. информация*/
  --t6: #c563b0;  /* Спец. условие  */
  --t7: #e2483d;  /* Катастрофа     */
  --t8: #9aa3ad;  /* Бункер         */
  --t9: #ef8b3a;  /* Угроза         */

  /* --- Radii --- */
  --r-xs: 2px;
  --r-sm: 3px;
  --r:    5px;
  --r-lg: 8px;
  --r-xl: 12px;
  --pill: 999px;

  /* --- Shadows --- */
  --sh-1: 0 1px 2px rgba(0,0,0,.5);
  --sh-2: 0 6px 22px rgba(0,0,0,.45);
  --sh-3: 0 20px 60px rgba(0,0,0,.55);
  --glow-amber: 0 0 0 1px rgba(245,180,23,.5), 0 6px 24px rgba(245,180,23,.18);

  /* --- Fonts --- */
  --f-display: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  --f-sans:    "IBM Plex Sans", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1320px;
}

/* ============================================================ Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-sans);
  background: var(--base);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(245,180,23,.3); color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* concrete texture on the page */
body.concrete {
  background-color: var(--base);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.022), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(0,0,0,.4), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

/* ============================================================ Type */
h1,h2,h3,h4 { font-family: var(--f-display); color: var(--ink); line-height: 1.05; font-weight: 600; }
.mono { font-family: var(--f-mono); }
.tnum { font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}
.h-display {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--ink);
}

/* ============================================================ Hazard stripes */
.hazard {
  background-image: repeating-linear-gradient(-45deg,
    var(--amber) 0 13px, #16130a 13px 26px);
}
.hazard-redamber {
  background-image: repeating-linear-gradient(-45deg,
    var(--amber) 0 13px, var(--red) 13px 26px);
}
.hazard-bar { height: 6px; width: 100%; }
.hazard-edge { box-shadow: inset 0 3px 0 var(--amber); }

/* ============================================================ Layout shell */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }

/* ---- Top nav ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--void) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  height: 62px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--ink); color: var(--void);
  font-family: var(--f-display); font-weight: 700; font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}
.brand__mark::after {
  content:""; position:absolute; inset:0 0 auto 0; height:5px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 5px, #16130a 5px 10px);
}
.brand__txt { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--f-display); font-weight: 700; font-size: 19px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.brand__sub {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .2em;
  color: var(--ink-dim); text-transform: uppercase; margin-top: 3px;
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 13px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
  color: var(--ink-dim); transition: .14s; position: relative; white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after {
  content:""; position:absolute; left:13px; right:13px; bottom:-1px; height:2px; background: var(--amber);
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang {
  display: flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
}
.lang button { padding: 5px 9px; color: var(--ink-dim); letter-spacing: .08em; }
.lang button.is-on { background: var(--raised); color: var(--ink); }

/* ============================================================ Buttons */
.btn {
  --bg: var(--raised); --fg: var(--ink); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-sm);
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-weight: 600; font-size: 14px; letter-spacing: .01em; white-space: nowrap;
  transition: transform .04s, background .14s, border-color .14s, box-shadow .14s;
}
.btn:hover { background: color-mix(in srgb, var(--bg) 80%, #fff 8%); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn--lg { height: 46px; padding: 0 22px; font-size: 15.5px; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn--ghost:hover { background: var(--panel); color: var(--ink); }
.btn--quiet { background: transparent; border-color: transparent; color: var(--ink-dim); }
.btn--quiet:hover { background: var(--panel); color: var(--ink); }
.btn--primary {
  background: var(--amber); color: #1a1304; border-color: var(--amber-deep);
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
}
.btn--primary:hover { background: var(--amber-2); box-shadow: 0 4px 18px rgba(245,180,23,.28); }
.btn--danger { background: transparent; border-color: color-mix(in srgb, var(--red) 55%, var(--line)); color: var(--red-2); }
.btn--danger:hover { background: color-mix(in srgb, var(--red) 16%, transparent); border-color: var(--red); }
.btn--icon { width: 36px; height: 36px; padding: 0; }
.btn--icon.btn--sm { width: 30px; height: 30px; }

/* hazard-edged CTA */
.btn--cta {
  background: var(--amber); color: #1a1304; border: none; height: 48px; padding: 0 26px;
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  font-size: 16px; position: relative; overflow: hidden; border-radius: var(--r-sm);
}
.btn--cta::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:10px;
  background: repeating-linear-gradient(-45deg, #1a1304 0 5px, transparent 5px 10px); opacity:.55;
}
.btn--cta:hover { background: var(--amber-2); box-shadow: 0 6px 26px rgba(245,180,23,.34); }

/* ============================================================ Panels / cards */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.panel--inset { background: var(--inset); }
.panel__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.panel__title {
  font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--ink);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.panel__body { padding: 18px; }
.panel__icon { color: var(--ink-dim); display: grid; place-items: center; }
.panel__icon svg { width: 18px; height: 18px; }

/* section label with index, control-panel style */
.slug {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); display: inline-flex; align-items: center; gap: 8px;
}
.slug::before { content:""; width: 18px; height: 1px; background: var(--line-strong); }

/* ============================================================ Form fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.label {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-dim); display: flex; align-items: center; gap: 6px;
}
.label .req { color: var(--amber); }
.input, .select, .textarea {
  width: 100%; background: var(--inset); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 10px 12px; color: var(--ink); font-size: 14.5px;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,180,23,.14); background: #0f1012; outline: none;
}
.textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9198' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field__hint { font-size: 12px; color: var(--ink-faint); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: 38px; }
.input-group__icon { position: absolute; left: 12px; color: var(--ink-faint); pointer-events: none; }
.input-group__icon svg { width: 16px; height: 16px; }

/* checkbox */
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.check__box {
  width: 20px; height: 20px; border-radius: var(--r-xs); border: 1.5px solid var(--line-strong);
  background: var(--inset); display: grid; place-items: center; flex: none; margin-top: 1px; transition: .14s;
}
.check__box svg { width: 13px; height: 13px; opacity: 0; color: #1a1304; }
.check.is-on .check__box { background: var(--amber); border-color: var(--amber); }
.check.is-on .check__box svg { opacity: 1; }
.check__txt { font-size: 14px; color: var(--ink-2); }
.check__txt b { color: var(--ink); font-weight: 600; }

/* segmented / chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--panel);
  font-size: 13px; font-weight: 500; color: var(--ink-dim); transition: .14s; white-space: nowrap; flex: none;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip.is-on { color: var(--ink); background: var(--raised); border-color: var(--ink-faint); }
.chip__dot { width: 9px; height: 9px; border-radius: 2px; }

/* ============================================================ Type badge */
.type-badge {
  --c: var(--t0);
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px 0 7px;
  border-radius: var(--r-xs); font-size: 12.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 17%, var(--panel));
  color: color-mix(in srgb, var(--c) 72%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
}
.type-badge__n {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
  background: color-mix(in srgb, var(--c) 30%, #000); color: color-mix(in srgb, var(--c) 60%, #fff);
  padding: 2px 4px; border-radius: var(--r-xs); line-height: 1;
}
.type-badge svg { width: 14px; height: 14px; }
.type-badge--lg { height: 30px; font-size: 14px; padding: 0 12px 0 9px; }
[data-type="0"] { --c: var(--t0);} [data-type="1"] { --c: var(--t1);}
[data-type="2"] { --c: var(--t2);} [data-type="3"] { --c: var(--t3);}
[data-type="4"] { --c: var(--t4);} [data-type="5"] { --c: var(--t5);}
[data-type="6"] { --c: var(--t6);} [data-type="7"] { --c: var(--t7);}
[data-type="8"] { --c: var(--t8);} [data-type="9"] { --c: var(--t9);}

.type-dot { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; }

/* ============================================================ Status badge */
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px;
  border-radius: var(--pill); font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; font-family: var(--f-mono);
}
.status::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--draft    { color: var(--ink-dim); background: color-mix(in srgb, var(--ink-dim) 15%, transparent); }
.status--review   { color: var(--amber);   background: color-mix(in srgb, var(--amber) 15%, transparent); }
.status--approved { color: var(--green);    background: color-mix(in srgb, var(--green) 15%, transparent); }
.status--rejected { color: var(--red-2);    background: color-mix(in srgb, var(--red) 17%, transparent); }

/* priority flag */
.flag-prio {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--amber); font-family: var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
}
.flag-prio svg { width: 13px; height: 13px; }

/* ============================================================ Type distribution bar */
.dist { display: flex; height: 7px; border-radius: var(--pill); overflow: hidden; background: var(--inset); }
.dist span { height: 100%; }
.dist-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.dist-legend__item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-dim); }
.dist-legend__item .tnum { color: var(--ink-2); font-weight: 600; }

/* ============================================================ Save string (code well) */
.codewell {
  background: var(--inset); border: 1px solid var(--line-strong); border-radius: var(--r);
  font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); position: relative;
  overflow: hidden;
}
.codewell__bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px;
  border-bottom: 1px solid var(--line-soft); background: var(--panel);
}
.codewell__bar .eyebrow { font-size: 10px; }
.codewell__code { padding: 13px 14px; line-height: 1.7; word-break: break-all; max-height: 130px; overflow: auto; }
.codewell__code .sep { color: var(--amber); }
.codewell__code .field-sep { color: var(--ink-faint); }

/* ============================================================ In-game card preview */
.game-card {
  --c: var(--t5);
  width: 230px; height: 322px; border-radius: 10px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1c1f24, #141619);
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-2), inset 0 0 0 1px rgba(255,255,255,.02);
  display: flex; flex-direction: column; user-select: none;
}
.game-card__top {
  background: color-mix(in srgb, var(--c) 88%, #000 12%);
  color: #0c0d0e; padding: 11px 13px 12px; position: relative;
}
.game-card__top::after {
  content:""; position:absolute; left:0; right:0; bottom:0; height:4px;
  background: repeating-linear-gradient(-45deg, rgba(0,0,0,.5) 0 6px, transparent 6px 12px);
}
.game-card__type {
  font-family: var(--f-display); font-weight: 700; font-size: 18px; text-transform: uppercase;
  letter-spacing: .03em; line-height: 1; display:flex; align-items:center; justify-content:space-between;
}
.game-card__type .n { font-family: var(--f-mono); font-size: 12px; opacity: .65; font-weight: 600; }
.game-card__mid {
  flex: 1; display: grid; place-items: center; padding: 16px; text-align: center; position: relative;
}
.game-card__icon { color: color-mix(in srgb, var(--c) 60%, #fff); opacity: .9; }
.game-card__icon svg { width: 78px; height: 78px; }
.game-card__desc {
  font-size: 14px; line-height: 1.45; color: var(--ink); font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.game-card__name {
  padding: 13px 14px; text-align: center; border-top: 1px solid var(--line-soft);
  background: rgba(0,0,0,.25);
}
.game-card__name b {
  font-family: var(--f-display); font-weight: 700; font-size: 19px; color: var(--ink);
  text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; display: block;
  text-wrap: balance;
}
.game-card__name .ph { color: var(--ink-faint); font-weight: 600; }
/* corner code */
.game-card__corner {
  position: absolute; top: 9px; right: 11px; font-family: var(--f-mono); font-size: 9px;
  color: rgba(0,0,0,.45); letter-spacing: .1em; z-index: 2;
}

/* ============================================================ Pack card (catalog) */
.pack-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  display: flex; flex-direction: column; overflow: hidden; transition: .16s; position: relative;
}
.pack-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--sh-2); }
.pack-card__top { padding: 16px 17px 14px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.pack-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pack-card__name { font-family: var(--f-display); font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: .01em; line-height: 1.08; }
.pack-card__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); flex-wrap: wrap; }
.pack-card__meta .by { color: var(--ink-2); font-weight: 600; }
.pack-card__count {
  font-family: var(--f-mono); font-weight: 600; font-size: 12px; color: var(--ink-2);
  background: var(--inset); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 3px 7px; line-height: 1;
}
.pack-card__foot {
  padding: 11px 17px; border-top: 1px solid var(--line-soft); display: flex; align-items: center;
  justify-content: space-between; gap: 10px; background: color-mix(in srgb, var(--inset) 55%, transparent);
}
.pack-card__date { font-family: var(--f-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .04em; }

/* ============================================================ Stat tiles */
.stat-grid { display: grid; gap: 8px; }
.stat {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-sm);
  background: var(--inset); border: 1px solid var(--line-soft);
}
.stat__bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,.04); border-radius: var(--pill); overflow: hidden; }
.stat__bar { height: 100%; border-radius: var(--pill); background: var(--c, var(--ink-dim)); }
.stat__n { font-family: var(--f-mono); font-weight: 600; font-size: 13px; color: var(--ink); min-width: 22px; text-align: right; }
.stat__label { font-size: 13px; color: var(--ink-2); min-width: 96px; display: flex; align-items: center; gap: 7px; }

/* ============================================================ Promo blocks */
.promo {
  display: flex; align-items: center; gap: 15px; padding: 16px 18px; border-radius: var(--r-lg);
  border: 1px solid var(--line); position: relative; overflow: hidden; transition: .16s;
}
.promo:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.promo__icon { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; flex: none; }
.promo__icon svg { width: 24px; height: 24px; }
.promo__txt { display: flex; flex-direction: column; gap: 2px; }
.promo__title { font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--ink); text-transform: uppercase; letter-spacing: .02em; }
.promo__sub { font-size: 12.5px; color: var(--ink-dim); }
.promo__arrow { margin-left: auto; color: var(--ink-faint); transition: .16s; }
.promo:hover .promo__arrow { color: var(--ink); transform: translateX(3px); }
.promo--boosty { background: linear-gradient(100deg, color-mix(in srgb, #f15f2c 14%, var(--panel)), var(--panel)); }
.promo--boosty .promo__icon { background: #f15f2c; color: #fff; }
.promo--discord { background: linear-gradient(100deg, color-mix(in srgb, #5865f2 16%, var(--panel)), var(--panel)); }
.promo--discord .promo__icon { background: #5865f2; color: #fff; }

/* ============================================================ Toast */
.toast {
  display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: var(--r);
  background: var(--overlay); border: 1px solid var(--line-strong); box-shadow: var(--sh-2);
  font-size: 14px; color: var(--ink); min-width: 280px; border-left: 3px solid var(--ink-dim);
}
.toast svg { width: 19px; height: 19px; flex: none; }
.toast--success { border-left-color: var(--green); } .toast--success svg { color: var(--green); }
.toast--error   { border-left-color: var(--red); }   .toast--error svg { color: var(--red-2); }
.toast--info    { border-left-color: var(--blue); }  .toast--info svg { color: var(--blue); }
.toast__close { margin-left: auto; color: var(--ink-faint); }

/* ============================================================ Modal */
.scrim { position: fixed; inset: 0; background: rgba(6,7,8,.72); backdrop-filter: blur(3px); z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal {
  width: 100%; max-width: 540px; background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--r-xl); box-shadow: var(--sh-3); overflow: hidden;
}
.modal__head { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; }
.modal__head h3 { font-size: 18px; text-transform: uppercase; letter-spacing: .04em; }
.modal__x { margin-left: auto; color: var(--ink-dim); width: 30px; height: 30px; border-radius: var(--r-xs); display: grid; place-items: center; }
.modal__x:hover { background: var(--raised); color: var(--ink); }
.modal__body { padding: 20px; color: var(--ink-2); }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; background: var(--inset); }
.modal--danger .modal__head { border-bottom-color: color-mix(in srgb, var(--red) 30%, var(--line)); }

/* ============================================================ Empty state */
.empty { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty__icon {
  width: 76px; height: 76px; border-radius: var(--r-lg); display: grid; place-items: center;
  background: var(--inset); border: 1px dashed var(--line-strong); color: var(--ink-faint);
}
.empty__icon svg { width: 34px; height: 34px; }
.empty h3 { font-size: 19px; text-transform: uppercase; letter-spacing: .04em; }
.empty p { color: var(--ink-dim); max-width: 380px; font-size: 14px; }

/* ============================================================ Pack icon + category tag */
.pack-icon {
  --c: var(--amber); width: 46px; height: 46px; border-radius: var(--r); flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 15%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  color: color-mix(in srgb, var(--c) 70%, #fff);
}
.pack-icon svg { width: 25px; height: 25px; }
.pack-icon--lg { width: 58px; height: 58px; }
.pack-icon--lg svg { width: 31px; height: 31px; }

.cat-tag {
  --c: var(--amber); display: inline-flex; align-items: center; gap: 6px; height: 21px; padding: 0 9px;
  border-radius: var(--pill); font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  color: color-mix(in srgb, var(--c) 72%, #fff); background: color-mix(in srgb, var(--c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.cat-tag svg { width: 12px; height: 12px; }

/* icon picker (editor) */
.ed-iconpick { position: relative; display: flex; flex-direction: column; gap: 7px; }
.ed-iconpick .pack-icon--btn { cursor: pointer; transition: .14s; }
.ed-iconpick .pack-icon--btn:hover { border-color: var(--amber); color: var(--amber-2); }
.ed-iconpick__pop {
  position: absolute; top: 100%; left: 0; margin-top: 8px; z-index: 30; background: var(--overlay);
  border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--sh-2);
  padding: 8px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 318px;
}
.ed-iconpick__pop[hidden] { display: none; }
.ed-iconpick__opt {
  width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--inset); border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; transition: .12s;
}
.ed-iconpick__opt:hover { border-color: var(--amber); color: var(--amber); }
.ed-iconpick__opt.is-on { border-color: var(--amber); color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, var(--inset)); }
.ed-iconpick__opt svg { width: 21px; height: 21px; }

/* ============================================================ Misc utils */
.divider { height: 1px; background: var(--line-soft); border: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.gap-6{gap:6px;} .gap-8{gap:8px;} .gap-10{gap:10px;} .gap-12{gap:12px;} .gap-14{gap:14px;} .gap-16{gap:16px;} .gap-20{gap:20px;} .gap-24{gap:24px;}
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt-auto { margin-top: auto; }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.tooltip-tag {
  font-family: var(--f-mono); font-size: 10px; letter-spacing:.1em; color: var(--ink-faint);
  text-transform: uppercase;
}
.kbd {
  font-family: var(--f-mono); font-size: 11px; padding: 2px 6px; border-radius: var(--r-xs);
  background: var(--inset); border: 1px solid var(--line-strong); color: var(--ink-2);
}

/* ============================================================ Help tooltip «(?)» */
.help-q {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--inset); color: var(--ink-dim);
  font-family: var(--f-mono); font-size: 11px; font-weight: 600; line-height: 1;
  cursor: help; position: relative; vertical-align: middle; flex: none; transition: .14s;
}
.help-q:hover, .help-q:focus-visible { color: var(--amber); border-color: var(--amber); outline: none; }
.help-q__pop {
  position: absolute; bottom: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 260px; padding: 10px 12px; border-radius: var(--r-sm); z-index: 60;
  background: var(--overlay); border: 1px solid var(--line-strong); box-shadow: var(--sh-2);
  color: var(--ink-2); font-family: var(--f-sans); font-size: 12.5px; font-weight: 400; line-height: 1.5;
  letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
  opacity: 0; visibility: hidden; transition: opacity .14s, transform .14s, visibility .14s; pointer-events: none;
}
.help-q__pop::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--line-strong);
}
.help-q:hover .help-q__pop, .help-q:focus-visible .help-q__pop {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}

/* scrollbar */
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: var(--inset); }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 3px solid var(--inset); }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }
