@font-face {
  font-family: "RedMark";
  src: url("fonts/desonanz.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0a0a0a;
  --ink: #141414;
  --panel: #1b1b1b;
  --panel-2: #242424;
  --line: #2c2c2c;
  --white: #f5f2ee;
  --mute: #a3a097;
  --red: #c8102e;
  --red-dim: #8a0a20;
  --red-glow: rgba(200,16,46,0.25);
  --focus: #ff4763;
  --shadow: 0 8px 24px rgba(0,0,0,0.55);
  --radius: 4px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  /* Fluid spacing + type scale */
  --pad-x: clamp(14px, 4vw, 34px);
  --h1: clamp(26px, 4.5vw + 6px, 42px);
  --h2: clamp(20px, 2.4vw + 8px, 26px);
  --h3: clamp(16px, 1vw + 12px, 19px);
  --body: clamp(14px, 0.25vw + 13px, 15px);

  --topbar-h: 56px;
}

/* ------------------------------------------------------------------
   Reset + base (mobile-first)
------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
@supports not (overflow-x: clip) {
  html { overflow-x: hidden; }
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--white); text-decoration: none; }
a:hover { color: var(--red); }

/* Only show hover color change on devices that actually hover */
@media (hover: none) {
  a:hover { color: var(--white); }
}

/* ------------------------------------------------------------------
   Top bar (mobile-first)
   Mobile: two rows — brand+hamburger, search. Tabs collapse behind toggle.
   Desktop: one row — brand, tabs, search.
------------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  max-width: 100%;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(6px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand toggle"
    "search search"
    "tabs  tabs";
  gap: 8px;
  padding: 10px 14px;
  padding-left: max(10px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}
.topbar-row { display: contents; }

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 1;
}
.brand-text {
  font-family: "RedMark", var(--serif);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand:hover { color: var(--white); }
.brand .accent { color: var(--red); }

.nav-toggle {
  grid-area: toggle;
  display: inline-flex;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
}
.nav-toggle:hover { border-color: var(--red); }

.search-wrap {
  grid-area: search;
  position: relative;
  min-width: 0;
  width: 100%;
}
#search {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 10px 12px;
  font-size: 14px;
  border-radius: var(--radius);
  outline: none;
}
#search:focus { border-color: var(--red); }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  max-height: 60vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  z-index: 60;
}
.search-results.hidden { display: none; }
.search-result {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--panel-2); }
.search-result .sr-type {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--red);
  text-transform: uppercase;
}
.search-result .sr-title { font-weight: 700; }
.search-result .sr-snippet { font-size: 12px; color: var(--mute); }

.tabs {
  grid-area: tabs;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
  width: 100%;
}
.tabs.open { max-height: 500px; }
.tabs a {
  display: block;
  padding: 12px 16px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
  min-height: 44px; /* touch target */
}
.tabs a:last-child { border-bottom: none; }
.tabs a:hover { color: var(--white); }
.tabs a.active {
  color: var(--white);
  background: var(--panel);
  border-left: 3px solid var(--red);
}

/* ------------------------------------------------------------------
   Main layout (mobile-first: single column)
------------------------------------------------------------------ */
main {
  flex: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.sidebar {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  overflow: auto;
}
.sidebar h4 {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 12px 14px 4px;
}
.sidebar a {
  display: block;
  padding: 8px 14px;
  color: var(--mute);
  font-size: 14px;
  border-left: 2px solid transparent;
  min-height: 36px;
}
.sidebar a:hover { color: var(--white); background: var(--panel); }
.sidebar a.active {
  color: var(--white);
  border-left-color: var(--red);
  background: var(--panel);
}

.content {
  padding: 20px var(--pad-x) 60px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* ------------------------------------------------------------------
   Typography
------------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
}
h1 { font-size: var(--h1); margin: 6px 0 14px; }
h1 .tag {
  color: var(--red);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  vertical-align: middle;
  margin-left: 10px;
  display: inline-block;
}
h2 { font-size: var(--h2); margin: 24px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
h3 { font-size: var(--h3); margin: 18px 0 8px; color: var(--red); }
h4 { font-size: 15px; margin: 14px 0 6px; letter-spacing: 0.05em; }
p { margin: 0 0 12px; }
.lede { color: var(--mute); font-size: 15px; margin-bottom: 16px; }
code, kbd, .mono { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; }
code { background: var(--panel); padding: 1px 5px; border-radius: 3px; color: var(--red); }

ul, ol { margin: 0 0 12px 22px; padding: 0; }
li { margin: 4px 0; overflow-wrap: break-word; }

blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--red);
  background: var(--panel);
  color: var(--mute);
  font-style: italic;
}

/* ------------------------------------------------------------------
   Tables — contained horizontal scroll on mobile
   Every <table> is wrapped visually via this overflow container.
------------------------------------------------------------------ */
.content table,
table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  table-layout: auto;
  max-width: 100%;
}

/* ------------------------------------------------------------------
   Horizontally-scrollable table wrapper
   Use: <div class="table-scroll"><table>...</table></div>
------------------------------------------------------------------ */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin: 10px 0 18px;
  scrollbar-color: var(--red-dim) var(--panel);
}
.table-scroll > table {
  margin: 0;
  border: none;
  border-radius: 0;
  max-width: none;
}
.table-scroll > table.skill-rubric-table {
  min-width: 720px;
}
.table-scroll > table.aspect-die-table {
  min-width: 520px;
}
thead th {
  background: var(--ink);
  text-align: left;
  padding: 8px 10px;
  font-weight: 700;
  color: var(--red);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
  white-space: nowrap;
}
tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:hover { background: var(--panel-2); }

/* ------------------------------------------------------------------
   Backstory pickers (character creation)
------------------------------------------------------------------ */
.backstory-h {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 15px;
}
.backstory-picked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 8px;
}
.backstory-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.backstory-row-body { flex: 1; min-width: 0; }
.backstory-row-name {
  font-weight: 700;
  color: var(--white);
  font-size: 13px;
}
.backstory-row-desc {
  color: var(--mute);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
}
.backstory-row .icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--mute);
  width: 28px; height: 28px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
}
.backstory-row .icon-btn:hover { color: var(--red); border-color: var(--red); }

.backstory-browse {
  margin: 4px 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.backstory-browse > summary {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.backstory-browse > summary::-webkit-details-marker { display: none; }
.backstory-browse > summary::before {
  content: "▸";
  font-size: 10px;
  color: var(--red);
  transition: transform 0.15s;
  display: inline-block;
}
.backstory-browse[open] > summary::before { transform: rotate(90deg); }
.backstory-browse > summary:hover { color: var(--white); }

.backstory-filter {
  width: calc(100% - 20px);
  margin: 0 10px 8px;
  padding: 6px 10px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--white);
  font-size: 12px;
}
.backstory-options {
  max-height: 300px;
  overflow-y: auto;
  padding: 0 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.backstory-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--white);
  font: inherit;
  cursor: pointer;
  line-height: 1.4;
}
.backstory-opt:hover:not(.is-picked) {
  background: var(--panel-2);
  border-color: var(--red-dim);
}
.backstory-opt-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--white);
}
.backstory-opt-name::after { content: " — "; color: var(--mute); font-weight: 400; }
.backstory-opt-desc {
  color: var(--mute);
  font-size: 12px;
}
.backstory-opt.is-picked {
  opacity: 0.4;
  cursor: default;
}
.backstory-opt.is-picked .backstory-opt-name { color: var(--red); }
.backstory-opt.is-picked .backstory-opt-name::after { content: " ✓ "; color: var(--red); }
tbody tr:last-child td { border-bottom: none; }

/* ------------------------------------------------------------------
   Cards and grids
------------------------------------------------------------------ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
}
.card.accent { border-left: 3px solid var(--red); }
.card h3 { margin-top: 0; }

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ------------------------------------------------------------------
   Home hero
------------------------------------------------------------------ */
.hero {
  padding: clamp(32px, 6vw, 60px) var(--pad-x) clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 20%, rgba(200,16,46,0.08), transparent 60%),
    linear-gradient(180deg, var(--ink), var(--black));
}
.hero h1 {
  font-size: clamp(34px, 6vw + 10px, 52px);
  letter-spacing: 0.02em;
}
.hero p.tagline {
  color: var(--mute);
  font-size: clamp(14px, 1vw + 12px, 16px);
  max-width: 560px;
}
.hero-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 20px;
}
@media (min-width: 540px) {
  .hero-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--radius);
  transition: border-color 120ms, transform 120ms;
}
.hero-card:hover { border-color: var(--red); transform: translateY(-1px); }
.hero-card h3 { margin: 0 0 6px; }
.hero-card p { color: var(--mute); margin: 0; font-size: 14px; }

/* ------------------------------------------------------------------
   Forms / creator (mobile-first single column)
------------------------------------------------------------------ */
.creator {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0;
}
.field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.field input, .field select, .field textarea {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 15px;
  width: 100%;
  min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
}

/* "two-field row" collapses to single column on very narrow screens */
.field.row-pair {
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(80px, 110px) 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.stat-row:last-child { border-bottom: none; }
.stat-row .name { font-weight: 700; letter-spacing: 0.05em; font-size: 13px; }
.stat-row .value {
  text-align: right;
  font-family: var(--mono);
  color: var(--red);
  font-weight: 700;
}
.stepper {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.stepper button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--white);
  width: 32px; height: 32px;
  border-radius: var(--radius);
  font-weight: 700;
  flex-shrink: 0;
}
.stepper button:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper .track {
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.stepper .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red-dim), var(--red));
  transition: width 120ms;
}
.stepper .dice-label {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 40px;
  text-align: center;
  color: var(--red);
  font-weight: 700;
  flex-shrink: 0;
}

.pool-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  margin: 10px 0;
  flex-wrap: wrap;
  gap: 8px;
}
.pool-bar .count {
  color: var(--red);
  font-weight: 700;
  font-size: 18px;
}
.pool-bar.over .count { color: var(--focus); animation: pulse 0.6s ease-out; }
@keyframes pulse {
  0% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.derived {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.derived .box {
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: var(--radius);
}
.derived .label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mute);
}
.derived .value {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--red);
  font-weight: 700;
}

/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------ */
.button,
a.button,
a.button:link,
a.button:visited {
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red);
  padding: 10px 16px;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 40px;
  line-height: 1;
}
.button:hover,
a.button:hover { background: #e81a3d; color: var(--white); border-color: #e81a3d; }

.button.secondary,
a.button.secondary,
a.button.secondary:link,
a.button.secondary:visited {
  background: var(--panel);
  color: var(--white);
  border: 1px solid var(--line);
}
.button.secondary:hover,
a.button.secondary:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--panel);
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

/* Touch devices: neutralize :hover artifacts to prevent red-on-red sticky state */
@media (hover: none) {
  .button:hover,
  a.button:hover {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
  }
  .button.secondary:hover,
  a.button.secondary:hover {
    color: var(--white);
    border-color: var(--line);
    background: var(--panel);
  }
}

/* ------------------------------------------------------------------
   GM Tools
------------------------------------------------------------------ */
.gm-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 14px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gm-tab {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--mute);
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  font-weight: 700;
  flex: 0 0 auto;
  white-space: nowrap;
}
.gm-tab:hover { color: var(--white); border-color: var(--red-dim); }
.gm-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.gm-tools[data-active="rolls"]    .tool:not([data-category="rolls"])    { display: none; }
.gm-tools[data-active="conflict"] .tool:not([data-category="conflict"]) { display: none; }
.gm-tools[data-active="state"]    .tool:not([data-category="state"])    { display: none; }
.gm-tools[data-active="oracle"]   .tool:not([data-category="oracle"])   { display: none; }
.gm-tools[data-active="npc"]      .tool:not([data-category="npc"])      { display: none; }

.tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
}
.dice-out {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--red);
  font-weight: 700;
  padding: 10px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.dice-out .pill {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--white);
  white-space: nowrap;
}
.dice-out .good { color: var(--red); border-color: var(--red); }
.dice-out .bad { color: var(--focus); border-color: var(--focus); }

.roll-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.roll-line label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  flex: 0 0 auto;
}
.roll-line input,
.roll-line select {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-family: var(--mono);
  flex: 1 1 120px;
  min-width: 0;
  max-width: 100%;
}
.roll-line select { flex: 0 1 auto; }

/* ------------------------------------------------------------------
   Misc
------------------------------------------------------------------ */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.pill-list span {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--mute);
}
.footbar {
  padding: 14px var(--pad-x);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--mute);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.dim { color: var(--mute); font-style: italic; }
.hl { color: var(--red); }
hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-dim); }

/* ------------------------------------------------------------------
   Archetype matrix — contained scroll, compact on mobile
------------------------------------------------------------------ */
.arch-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  width: 100%;
  max-width: 100%;
}
.arch-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  display: table;          /* override the global `table { display: block }` */
  overflow: visible;
}
.arch-table th,
.arch-table td {
  border: 1px solid var(--line);
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}
.arch-table thead th {
  background: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: var(--mute);
  white-space: nowrap;
}
.arch-table th.row-head {
  background: var(--ink);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--mute);
  text-align: left;
  padding-left: 10px;
  white-space: nowrap;
}
.arch-cell {
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.arch-cell:hover {
  background: var(--ink);
  color: var(--red);
}
.arch-cell.selected {
  background: var(--red);
  color: var(--white);
  box-shadow: inset 0 0 0 2px var(--white);
}
.arch-cell .arch-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 12px;
  line-height: 1.2;
}
.arch-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.arch-tags .pill {
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.arch-title {
  margin: 4px 0 2px;
  color: var(--red);
  letter-spacing: 0.02em;
}
.arch-tag {
  font-style: italic;
  color: var(--mute);
  margin: 0;
}
.arch-variants {
  font-size: 13px;
  margin-top: 6px;
}

/* ------------------------------------------------------------------
   Gear pack
------------------------------------------------------------------ */
.pack-items { margin: 6px 0 2px 18px; padding: 0; }
.pack-items li { font-size: 13px; color: var(--white); margin: 2px 0; }

/* Breakdown prompt */
.bd-prompt {
  flex-basis: 100%;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--white);
  font-style: italic;
  font-weight: 400;
  padding: 8px 0 0;
  line-height: 1.5;
}

#tool-heal .roll-line { gap: 6px; }
#tool-heal .button { padding: 8px 10px; font-size: 11px; }

#gp-level {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--ink);
  border: 1px solid var(--red);
  padding: 4px 14px;
  border-radius: 14px;
  min-width: 110px;
  text-align: center;
}

/* ------------------------------------------------------------------
   Keyword highlighting
------------------------------------------------------------------ */
.kw {
  color: var(--focus);
  font-weight: 600;
  border-bottom: 1px dotted rgba(255,71,99,0.35);
  padding-bottom: 1px;
}
.kw-skill  { color: #ff8a74; border-bottom-color: rgba(255,138,116,0.35); }
.kw-aspect { color: #c79cff; border-bottom-color: rgba(199,156,255,0.35); }
.kw-stat   { color: var(--red); border-bottom-color: rgba(200,16,46,0.35); }
.kw-mech   { color: #7dc4ff; border-bottom-color: rgba(125,196,255,0.35); }

/* ------------------------------------------------------------------
   Character list + sheet
------------------------------------------------------------------ */
.char-list {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin: 18px 0;
}
@media (min-width: 560px) {
  .char-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
.char-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: border-color 120ms, transform 120ms;
}
.char-card:hover { border-color: var(--red); transform: translateY(-1px); }
.char-card h3 { margin: 0 0 4px; color: var(--white); font-family: var(--serif); }
.char-card .arch { color: var(--red); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.char-card .meta { color: var(--mute); font-size: 13px; }
.char-card .card-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.char-card .card-actions button {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--mute);
  padding: 6px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  min-height: 32px;
}
.char-card .card-actions button:hover { color: var(--red); border-color: var(--red); }
.char-card .card-actions button.danger:hover { color: var(--focus); border-color: var(--focus); }

.char-empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--mute);
}

.sheet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.sheet-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}
.sheet-card h3 {
  margin-top: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.sheet-card.full-width { grid-column: 1 / -1; }

.tracker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  gap: 10px;
  flex-wrap: wrap;
}
.tracker-row:last-child { border-bottom: none; }
.tracker-row .label {
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: 1;
  min-width: 100px;
}
.tracker-row .controls { display: flex; align-items: center; gap: 6px; }
.tracker-row .value {
  font-family: var(--mono);
  color: var(--red);
  font-weight: 700;
  min-width: 62px;
  text-align: center;
  font-size: 16px;
}
.tracker-row button {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--white);
  width: 34px; height: 34px;
  border-radius: var(--radius);
  font-weight: 700;
}
.tracker-row button:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.tracker-row button:disabled { opacity: 0.35; cursor: not-allowed; }

.status-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.status-flag {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--mute);
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  letter-spacing: 0.05em;
  min-height: 32px;
}
.status-flag.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.sheet-notes {
  width: 100%;
  min-height: 80px;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 8px;
  font-family: var(--sans);
  border-radius: var(--radius);
  resize: vertical;
}

/* Faction tracker */
.faction-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.faction-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.faction-row.current {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red-glow) inset;
}
.faction-row.initiator .faction-name::after { content: " ★"; color: var(--red); }
.faction-row input {
  flex: 1 1 140px;
  background: transparent;
  border: none;
  color: var(--white);
  padding: 4px 0;
  min-width: 0;
}
.faction-row input:focus { outline: none; }
.faction-row .icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--mute);
  width: 32px; height: 32px;
  border-radius: var(--radius);
  font-size: 12px;
  flex-shrink: 0;
}
.faction-row .icon-btn:hover { color: var(--red); border-color: var(--red); }
.faction-row.current .icon-btn { color: var(--white); }
.faction-round {
  font-family: var(--mono);
  color: var(--red);
  font-weight: 700;
  font-size: 18px;
  margin: 8px 0;
}

/* Stats boxes */
.stats-boxes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 6px 0 4px;
}
@media (min-width: 560px) {
  .stats-boxes { grid-template-columns: 1.4fr 1fr; }
}
.stat-box {
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-box.tracker { border-color: var(--red-dim); }
.stat-box .label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mute);
}
.stat-box .value {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--red);
  font-weight: 700;
  line-height: 1.1;
}
.stat-box .controls { display: flex; gap: 4px; flex-wrap: wrap; }
.stat-box .controls button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 12px;
  font-family: var(--mono);
  min-width: 36px;
  min-height: 34px;
}
.stat-box .controls button:hover { border-color: var(--red); color: var(--red); }
.stat-box .recovery { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.stat-box .recovery button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--mute);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-family: var(--sans);
  min-height: 30px;
}
.stat-box .recovery button:hover { color: var(--red); border-color: var(--red); }
.stat-box .recovery-out {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  min-height: 14px;
}

/* Skills/Aspects sheet rows */
.kv-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  gap: 8px;
  flex-wrap: wrap;
}
.kv-row:last-child { border-bottom: none; }
.kv-label { font-weight: 600; letter-spacing: 0.03em; }
.kv-value { color: var(--red); font-weight: 700; }

.aspect-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.aspect-row:last-child { border-bottom: none; }
.aspect-points { display: flex; align-items: center; gap: 4px; }
.aspect-points .ap-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-right: 2px;
}
.aspect-points .ap-value {
  font-family: var(--mono);
  color: var(--red);
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}
.aspect-points button {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--white);
  width: 30px; height: 30px;
  border-radius: var(--radius);
  font-weight: 700;
}
.aspect-points button:hover { border-color: var(--red); color: var(--red); }

/* Manifestation/effect */
.manifestation-box,
.effect-box {
  background: var(--ink);
  border: 1px solid var(--red-dim);
  border-left: 3px solid var(--red);
  padding: 10px 12px;
  border-radius: var(--radius);
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
}
.manifestation-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.manifestation-tags .pill {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.05em;
}
.manifestation-tags .pill.good { color: var(--red); border-color: var(--red); }
.manifestation-text { font-family: var(--serif); font-style: italic; }

/* Gear rows */
.gear-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 4px 0;
  flex-wrap: wrap;
}
.gear-row .gear-name { flex: 1 1 140px; font-size: 14px; min-width: 0; }
.gear-row .icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--mute);
  width: 32px; height: 32px;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.gear-row .icon-btn:hover { color: var(--focus); border-color: var(--focus); }

/* Import textarea */
.import-area {
  width: 100%;
  min-height: 120px;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 8px;
  font-family: var(--mono);
  font-size: 12px;
  border-radius: var(--radius);
  resize: vertical;
}

/* ------------------------------------------------------------------
   Landing page
------------------------------------------------------------------ */
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 8vw, 60px) var(--pad-x) 40px;
  text-align: center;
  gap: clamp(20px, 4vw, 32px);
}
.landing-title {
  font-family: "RedMark", var(--serif);
  font-size: clamp(56px, 14vw, 180px);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--white);
  text-shadow: 0 0 40px var(--red-glow);
}
.landing-title .hl { color: var(--red); }
.landing-tag {
  margin: 0;
  color: var(--mute);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1vw + 12px, 17px);
  letter-spacing: 0.04em;
}
.newsletter-card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 28px) clamp(16px, 4vw, 24px);
  box-shadow: var(--shadow);
}
.newsletter-card h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(18px, 1vw + 16px, 22px);
  color: var(--white);
}
.newsletter-card p { margin: 0 0 18px; color: var(--mute); font-size: 14px; }
.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 10px 12px;
  font: inherit;
  border-radius: var(--radius);
  outline: none;
}
.newsletter-form input[type="email"]:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px var(--red-glow);
}
.newsletter-form button {
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red);
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  min-height: 42px;
}
.newsletter-form button:hover { background: var(--focus); border-color: var(--focus); }
.landing-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.landing-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  min-height: 40px;
}
.landing-links a:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--ink);
}
.landing-links svg { width: 18px; height: 18px; fill: currentColor; }

/* ------------------------------------------------------------------
   Landing media embeds (YouTube + Spotify)
------------------------------------------------------------------ */
.media-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
/* Larger, prominent player above the newsletter */
.media-video-lg {
  width: 100%;
  max-width: 960px;
}
/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
  .media-video { padding-top: 56.25%; height: 0; }
}
.media-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}
.media-spotify {
  width: 100%;
  max-width: 520px;
  border: none;
  border-radius: 12px;
  display: block;
}

/* ------------------------------------------------------------------
   Progressive enhancement: small tablets ≥ 560px
------------------------------------------------------------------ */
@media (min-width: 560px) {
  h2 { margin-top: 28px; }
  .field.row-pair > .field { flex: 1 1 0; }
}

/* ------------------------------------------------------------------
   Enhancement: tablets ≥ 720px — restore proper tables
------------------------------------------------------------------ */
@media (min-width: 720px) {
  .content table,
  table {
    font-size: 14px;
  }
}

/* ------------------------------------------------------------------
   Enhancement: desktop ≥ 900px
   Topbar goes horizontal; main gets sidebar layout; creator 2-column.
------------------------------------------------------------------ */
@media (min-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand tabs search";
    gap: 18px;
    padding: 10px 18px;
  }
  .brand-text { font-size: 26px; }
  .nav-toggle { display: none; }

  .tabs {
    flex-direction: row;
    gap: 4px;
    border-top: none;
    max-height: none;
    overflow: visible;
    align-items: center;
    justify-content: flex-start;
  }
  .tabs a {
    padding: 8px 14px;
    font-size: 13px;
    border-bottom: 2px solid transparent;
    border-left: none;
    background: none;
    min-height: auto;
  }
  .tabs a.active {
    background: none;
    border-left: none;
    border-bottom-color: var(--red);
  }

  .search-wrap { width: 260px; min-width: 220px; max-width: 320px; justify-self: end; }
  .search-results { left: auto; right: 0; width: 420px; max-width: 420px; }

  main {
    display: grid;
    grid-template-columns: 240px 1fr;
    max-width: 1400px;
  }
  main.no-sidebar { grid-template-columns: 1fr; }

  .sidebar {
    border-right: 1px solid var(--line);
    border-bottom: none;
    padding: 18px 0;
    position: sticky;
    top: var(--topbar-h);
    align-self: start;
    max-height: calc(100vh - var(--topbar-h));
    overflow: auto;
  }

  .content {
    padding: 28px 34px 80px;
  }

  .creator { grid-template-columns: 1fr 1fr; gap: 18px; }
  .sheet-grid { grid-template-columns: 1fr 1fr; }

  .derived { grid-template-columns: repeat(2, 1fr); }
  .derived .value { font-size: 24px; }
}

/* ------------------------------------------------------------------
   Enhancement: wide desktop ≥ 1200px
------------------------------------------------------------------ */
@media (min-width: 1200px) {
  main { grid-template-columns: 260px 1fr; }
}

/* ------------------------------------------------------------------
   Print
------------------------------------------------------------------ */
@media print {
  .topbar, .sidebar, .footbar, .gm-tabs, .button, .button-row { display: none !important; }
  body { background: white; color: black; }
  .card, .tool, .sheet-card { border-color: #aaa; }
}

/* ------------------------------------------------------------------
   Visual guide (Conflict "At a Glance")
------------------------------------------------------------------ */
.vg-h {
  font-family: "RedMark", var(--serif);
  letter-spacing: 0.5px;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--white);
}

.vg-flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.vg-step {
  flex: 1 1 180px;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  position: relative;
}
.vg-step-n {
  position: absolute;
  top: -10px; left: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--black);
}
.vg-step-t {
  font-weight: 700;
  color: var(--white);
  margin-top: 2px;
  margin-bottom: 4px;
}
.vg-step-d {
  font-size: 0.92em;
  color: var(--mute);
  line-height: 1.4;
}
.vg-arrow {
  align-self: center;
  color: var(--red);
  font-size: 18px;
  flex: 0 0 auto;
}
.vg-step-split {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 200px;
}
.vg-branch {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  position: relative;
}
.vg-branch.vg-ok { border-left-color: #4a8e4a; }
.vg-branch.vg-bad { border-left-color: var(--red); }
.vg-branch .vg-step-n { background: #4a8e4a; }
.vg-branch.vg-bad .vg-step-n { background: var(--red); }

@media (max-width: 640px) {
  .vg-arrow { transform: rotate(90deg); width: 100%; text-align: center; }
}

.vg-note {
  font-size: 0.92em;
  color: var(--mute);
  border-left: 2px solid var(--line);
  padding: 2px 0 2px 12px;
  margin: 10px 0;
}

.vg-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0;
}
@media (max-width: 720px) {
  .vg-cards { grid-template-columns: 1fr; }
}
.vg-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.vg-card ul { margin: 6px 0 0 0; padding-left: 18px; }
.vg-card li { margin: 4px 0; }
.vg-card-head {
  font-family: "RedMark", var(--serif);
  font-size: 1.15em;
  letter-spacing: 0.5px;
  color: var(--white);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.vg-card-sub {
  font-family: var(--sans);
  font-size: 0.65em;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 400;
}
.vg-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.vg-card-green { border-top-color: #4a8e4a; }
.vg-card-green .vg-dot { background: #4a8e4a; box-shadow: 0 0 8px rgba(74,142,74,0.6); }
.vg-card-red { border-top-color: var(--red); }
.vg-card-red .vg-dot { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }

.vg-example {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
}
.vg-scene {
  color: var(--mute);
  font-style: italic;
  border-left: 2px solid var(--red-dim);
  padding-left: 12px;
  margin: 0 0 12px 0;
}
.vg-turn { margin: 0; padding-left: 22px; }
.vg-turn li { margin: 8px 0; line-height: 1.5; }
.vg-tag {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 6px;
  vertical-align: 1px;
}
.vg-tag-green { background: rgba(74,142,74,0.18); color: #7dbf7d; border: 1px solid rgba(74,142,74,0.4); }
.vg-tag-red { background: var(--red-glow); color: #ff8699; border: 1px solid var(--red-dim); }

.vg-quick {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.vg-quick > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red-dim);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.94em;
}
.vg-k {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  color: var(--white);
}
