/* Terminal State chargen / sheet extras. Layout chrome lives in chargen.css. */

.trm-chargen .cpr-method {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(100, 80, 130, 0.45);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.trm-chargen .cpr-method.is-on {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.45);
}
.trm-chargen .cpr-method p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted, #b7a8c9);
}
.trm-subblock {
  margin-top: 8px;
}
.trm-status-box {
  padding: 12px 14px;
  border: 1px solid rgba(232, 121, 249, 0.28);
  border-radius: 12px;
  background: rgba(12, 6, 18, 0.45);
}
.trm-chargen .check-inline {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 0.9rem;
}
.trm-chargen .wizard-panel .stack-form {
  margin-top: 4px;
}
.trm-chargen .wizard-panel label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: var(--text-muted, #8fa3bd);
}
.trm-chargen .wizard-panel label > input:not([type="checkbox"]):not([type="radio"]),
.trm-chargen .wizard-panel label > select,
.trm-chargen .wizard-panel label > textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid var(--border, #2a3d5c);
  background: var(--bg-deep, #070b12);
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}
.trm-chargen .wizard-panel .check-inline {
  display: flex;
  color: inherit;
  font-size: 0.9rem;
}
.trm-chargen .wizard-panel .check-inline > input {
  width: auto;
  margin: 3px 0 0;
  padding: 0;
}
/* Downtime / Advancement award: .stack-form gives inputs width 100%, which centres the checkbox far from its text */
.upgrade-award .check-inline > input[type="checkbox"] {
  width: auto;
  flex: none;
  margin: 0;
}
.trm-chargen .wizard-panel .row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 14px;
}
.trm-chargen .wizard-panel .row-actions .muted {
  min-height: 1.2em;
}
.trm-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}
@media (min-width: 640px) {
  .trm-field-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.trm-chargen .pick-card {
  min-height: 152px;
  align-items: stretch;
}
.trm-chargen .pick-card-art {
  min-height: 152px;
}
.trm-chargen .pick-card .pick-card-body {
  align-self: stretch;
}
.trm-chargen .pick-card-art-zoom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.trm-chargen .trm-skill-table .row-actions,
.trm-chargen .trm-stat .row-actions,
.trm-chargen .trm-contact-card .row-actions {
  margin: 0;
}
.trm-chargen .pick-card-sum {
  -webkit-line-clamp: 4;
}
.trm-chargen .cpr-method {
  width: 100%;
}

.trm-sheet .sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trm-meter {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(100, 80, 130, 0.25);
}
.trm-meter:last-child {
  border-bottom: 0;
}
.trm-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.trm-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(100, 80, 130, 0.45);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}
.trm-stat.is-key {
  border-color: rgba(45, 212, 191, 0.55);
}
.trm-stat strong {
  font-size: 1.25rem;
}
.trm-suggests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.trm-suggest {
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(100, 80, 130, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  cursor: pointer;
}
.trm-suggest.is-on {
  border-color: #2dd4bf;
  color: #2dd4bf;
}
.trm-skill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.trm-skill-table .row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.trm-skill-table .btn-step {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
}
.trm-skill-cat td {
  padding-top: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #b7a8c9);
  border-bottom: 0;
}
.trm-skill-table tr.is-required strong {
  color: var(--accent, #2dd4bf);
}
.trm-skill-table td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.trm-path-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin-bottom: 12px;
}
.trm-kit-row {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(100, 80, 130, 0.35);
  border-radius: 12px;
}
.trm-kit-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.trm-kit-opt {
  text-align: left;
  font: inherit;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(100, 80, 130, 0.45);
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  cursor: pointer;
}
.trm-kit-opt.is-on {
  border-color: #2dd4bf;
  color: #2dd4bf;
}
.trm-inv {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trm-inv li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(100, 80, 130, 0.2);
}
.trm-skill-table th,
.trm-skill-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(100, 80, 130, 0.25);
}
.trm-skill-table th {
  color: var(--muted, #b7a8c9);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.trm-over {
  color: #fb7185;
}
.trm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.trm-tab {
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(100, 80, 130, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  cursor: pointer;
}
.trm-tab.is-on {
  border-color: #2dd4bf;
  color: #2dd4bf;
}
.trm-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.trm-contact-card {
  padding: 12px 14px;
  border: 1px solid rgba(100, 80, 130, 0.4);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}
.trm-contact-card.is-on {
  border-color: rgba(45, 212, 191, 0.55);
}
.trm-contact-card.is-blocked {
  opacity: 0.72;
}
.trm-contact-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.trm-rank {
  margin-left: auto;
  font-size: 0.8rem;
  color: #2dd4bf;
}
.trm-quote {
  margin: 6px 0;
  font-style: italic;
  color: var(--muted, #b7a8c9);
}
.trm-sheet .sheet-equip-group {
  margin: 0 0 14px;
}
.trm-sheet .sheet-equip-group h4 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #b7a8c9);
}

.trm-chargen .wizard-nav.upgrade-inner #trm-prev,
.trm-chargen .wizard-nav.upgrade-inner #trm-next,
.trm-chargen .wizard-nav.upgrade-inner #trm-finalize,
.trm-chargen .wizard-nav.upgrade-inner #trm-view-sheet {
  display: none !important;
}
.chargen-page[data-upgrade="xp-attrs"] .wizard-steps,
.chargen-page[data-upgrade="xp-abilities"] .wizard-steps,
.chargen-page[data-upgrade="shop-contacts"] .wizard-steps {
  display: none !important;
}
.chargen-page[data-upgrade="xp-talents"] .wizard-steps,
.chargen-page[data-upgrade="xp-talents"] .wizard-layout {
  display: none !important;
}

/* ── Chargen redesign, slice 1 (T-071): to-do, live sheet, plain lines + ⓘ, Blue, glossary, phone bar ── */
/* B1: the label display:block rule must not beat [hidden] (Fabricant chassis field) */
.trm-chargen [hidden] {
  display: none !important;
}
/* B8: "+ D8" stays on one line */
.trm-skill-table .btn-step,
.trm-skill-table .row-actions {
  white-space: nowrap;
}
.trm-chargen .trm-detail {
  margin: -4px 0 12px;
  font-size: 0.84rem;
}

/* Finished steps */
.trm-chargen .wizard-step.is-done::before {
  content: "✓ ";
  color: var(--ok, #4ade80);
}

/* Plain one-liner on a card; the book text behind ⓘ */
.trm-chargen .trm-plain {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text, #e6eef8);
}
.trm-chargen .trm-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 6px;
  border-radius: 50%;
  border: 1px solid var(--border, #2a3d5c);
  color: var(--link, #67e8f9);
  font-size: 0.95rem;
  cursor: help;
}
.trm-chargen .trm-info-btn[aria-expanded="true"] {
  background: rgba(103, 232, 249, 0.14);
}
.trm-chargen .trm-book {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 2px solid rgba(103, 232, 249, 0.45);
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-muted, #8fa3bd);
  text-align: left;
}

/* Still to do (under the nav) */
.trm-todo {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 12px;
  background: rgba(30, 20, 4, 0.35);
}
.trm-todo-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold, #fbbf24);
}
.trm-todo ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trm-todo-done {
  margin: 0;
  color: var(--ok, #4ade80);
}
.trm-todo-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}
.trm-todo-item:hover {
  border-color: var(--gold, #fbbf24);
}
.trm-todo-item.is-soft {
  border-style: dashed;
  color: var(--text-muted, #8fa3bd);
}
.trm-todo-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.2);
  color: var(--gold, #fbbf24);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Live sheet in the rail */
.trm-live-who {
  margin: 10px 0 8px;
  font-size: 0.86rem;
  color: var(--text-muted, #8fa3bd);
}
.trm-live-attrs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.trm-live-tile,
.trm-live-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 4px;
  border: 1px solid var(--border, #2a3d5c);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}
.trm-live-tile span,
.trm-live-chip span {
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted, #8fa3bd);
  text-align: center;
}
.trm-live-tile strong {
  font-size: 1.15rem;
}
.trm-live-tile.is-key {
  border-color: rgba(232, 121, 249, 0.6);
}
.trm-live-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.trm-live-chip {
  cursor: help;
}
.trm-live-chip strong {
  font-size: 1.02rem;
}
.trm-live-chip em {
  font-style: normal;
  font-size: 0.66rem;
  color: var(--text-dim, #5c708a);
}
.trm-live-req {
  margin: 10px 0 0;
  font-size: 0.86rem;
}
.trm-live-next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
}
.trm-live-next > span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold, #fbbf24);
}
.trm-live-delta {
  position: absolute;
  top: -8px;
  right: 2px;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  pointer-events: none;
  animation: trm-delta 1.1s ease-out forwards;
}
.is-up > .trm-live-delta {
  color: var(--ok, #4ade80);
}
.is-down > .trm-live-delta {
  color: var(--danger, #f87171);
}
.trm-live-tile.is-up,
.trm-live-chip.is-up {
  animation: trm-flash-up 0.9s ease-out;
}
.trm-live-tile.is-down,
.trm-live-chip.is-down {
  animation: trm-flash-down 0.9s ease-out;
}
@keyframes trm-flash-up {
  0% { box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.85); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
@keyframes trm-flash-down {
  0% { box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.85); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}
@keyframes trm-delta {
  0% { opacity: 0; transform: translateY(6px); }
  20% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* Blue, the assistant */
.trm-blue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
}
.trm-blue-face {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid rgba(45, 212, 191, 0.6);
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.trm-blue-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.trm-blue-bubble {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 12px;
  background: rgba(4, 30, 28, 0.45);
}
.trm-blue-say {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.trm-blue-say strong {
  color: var(--accent, #2dd4bf);
}
.trm-blue.is-hidden .trm-blue-bubble {
  display: none;
}
.trm-blue.is-hidden .trm-blue-face {
  width: 40px;
  height: 40px;
  opacity: 0.8;
}
.trm-gloss-btn {
  margin-top: 8px;
}
.trm-gloss {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 60vh;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--border, #2a3d5c);
  border-radius: 12px;
  background: var(--bg-panel, #111a28);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.trm-gloss-title {
  margin: 0 0 8px;
  font-weight: 700;
}
.trm-gloss dl {
  margin: 0;
}
.trm-gloss dt {
  margin-top: 8px;
  font-weight: 700;
  color: var(--accent, #2dd4bf);
}
.trm-gloss dd {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted, #8fa3bd);
}

/* B6: contact requirement once, with a chip */
.trm-req-line {
  margin: 6px 0;
}
.trm-req {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.trm-req.is-ok {
  background: rgba(74, 222, 128, 0.14);
  color: var(--ok, #4ade80);
}
.trm-req.is-no {
  background: rgba(248, 113, 113, 0.14);
  color: var(--danger, #f87171);
}
.trm-req.is-crew {
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold, #fbbf24);
}

/* Phone: chip bar at the bottom; tap opens the rail as a sheet */
.trm-mini,
.trm-rail-close {
  display: none;
}
@media (max-width: 700px) {
  .trm-chargen {
    padding-bottom: 76px;
  }
  .trm-chargen .sheet-preview {
    display: none;
  }
  body.trm-rail-open .trm-chargen .sheet-preview {
    display: block;
    position: fixed;
    z-index: 70;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 86vh;
    overflow: auto;
    margin: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
  }
  body.trm-rail-open .trm-rail-close {
    display: inline-flex;
    float: right;
  }
  .trm-mini:not([hidden]) {
    display: block;
    position: fixed;
    z-index: 60;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border, #2a3d5c);
    background: rgba(7, 11, 18, 0.96);
  }
  body.trm-rail-open .trm-mini {
    display: none;
  }
  .trm-mini-open {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    width: 100%;
    padding: 4px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
  }
  .trm-mini-open span {
    position: relative;
    white-space: nowrap;
  }
  .trm-mini-open em {
    font-style: normal;
    color: var(--text-muted, #8fa3bd);
  }
  .trm-mini-more {
    margin-left: auto;
    color: var(--accent, #2dd4bf);
    font-size: 0.78rem;
  }
  .trm-blue-face {
    width: 44px;
    height: 44px;
  }
  .trm-blue-say {
    font-size: 0.86rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trm-live-tile.is-up,
  .trm-live-tile.is-down,
  .trm-live-chip.is-up,
  .trm-live-chip.is-down,
  .trm-live-delta {
    animation: none;
  }
}

/* Slice 2: 🎲 per step, whole operator, rolled dice chips, quick start, ★ recommended */
.trm-dicebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.trm-dicebar .muted {
  font-size: 0.85rem;
}
.trm-rolls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.trm-roll-chip {
  display: inline-block;
  max-width: 100%;
  line-height: 1.6;
  padding: 3px 10px;
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 999px;
  background: rgba(4, 30, 28, 0.45);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.trm-roll-what {
  color: var(--text-muted, #8fa3bd);
  white-space: nowrap;
}
.trm-roll-chip strong {
  white-space: nowrap;
}
.trm-die {
  display: inline-block;
  white-space: nowrap;
  min-width: 2.2em;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.18);
  color: #5eead4;
  font-weight: 700;
  text-align: center;
}
.trm-die.is-tumble {
  animation: trm-tumble 0.6s ease-out;
}
@keyframes trm-tumble {
  0% { transform: rotate(-200deg) scale(0.6); opacity: 0.3; }
  60% { transform: rotate(20deg) scale(1.15); opacity: 1; }
  100% { transform: rotate(0) scale(1); }
}
.trm-quick {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(45, 212, 191, 0.4);
  border-radius: 12px;
}
.trm-quick-title {
  margin: 0 0 8px;
}
.trm-quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 700px) {
  .trm-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.trm-quick-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.trm-quick-card:hover,
.trm-quick-card:focus-visible {
  border-color: rgba(45, 212, 191, 0.7);
}
.trm-quick-card img {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 15%;
}
.trm-quick-card > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.trm-quick-tag {
  font-size: 0.8rem;
  color: #5eead4;
}
.trm-rec {
  color: var(--gold, #fbbf24);
}
.trm-rec-legend {
  margin: 6px 0;
  font-size: 0.82rem;
}
@media (prefers-reduced-motion: reduce) {
  .trm-die.is-tumble {
    animation: none;
  }
}

/* T-094 #3: compact live sheet on desktop so the writeup of the tapped card stays above the fold */
.trm-chargen .trm-live-head {
  margin: 0 0 6px;
}
.trm-chargen .trm-pick-head {
  margin-top: 14px;
}
@media (min-width: 701px) {
  .trm-chargen .trm-live-who {
    margin: 0 0 6px;
  }
  .trm-chargen .trm-live-attrs {
    gap: 4px;
  }
  .trm-chargen .trm-live-tile {
    padding: 3px 2px;
  }
  .trm-chargen .trm-live-tile strong {
    font-size: 1rem;
  }
  .trm-chargen .trm-live-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-top: 4px;
  }
  .trm-chargen .trm-live-chip {
    padding: 3px 2px;
  }
  .trm-chargen .trm-live-chip span {
    font-size: 0.6rem;
  }
  .trm-chargen .trm-live-chip strong {
    font-size: 0.92rem;
  }
  .trm-chargen .trm-live-req {
    margin-top: 6px;
  }
  .trm-chargen .trm-live-next {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
  }
}

/* T-094 #8: the ✓ sits on the pill's corner, so done pills keep their width */
.trm-chargen .wizard-step {
  position: relative;
}
.trm-chargen .wizard-step.is-done::before {
  content: "✓";
  position: absolute;
  top: -7px;
  left: 8px;
  padding: 1px 4px;
  border-radius: 999px;
  background: #062a1c;
  font-size: 0.68rem;
  line-height: 1.2;
}
/* T-094 #7: "+ N more · show all" in the to-do box */
.trm-todo-more {
  padding: 4px 10px;
  border: 1px dashed rgba(251, 191, 36, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--gold, #fbbf24);
  font-size: 0.82rem;
  cursor: pointer;
}
/* T-094 #10: book tags (Cyke, Modbod, Juvie, SEC…) and kit specs as small badges */
.trm-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
  color: #5eead4;
}

/* ── Slice 3: picture tiles (status, crew, lifestyle / dress / home, chrome path + chrome cards) ── */
.trm-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}
@media (min-width: 700px) {
  .trm-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.trm-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border, #2a3d5c);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.trm-tile[hidden] {
  display: none;
}
.trm-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.trm-tile-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 9px 9px;
}
.trm-tile-body strong {
  font-size: 0.92rem;
  line-height: 1.2;
}
.trm-tile-badge {
  align-self: flex-start;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: var(--gold, #fbbf24);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
.trm-tile-sub {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text-muted, #8fa3bd);
}
.trm-tile-tag {
  font-size: 0.74rem;
  color: #5eead4;
}
.trm-tile:hover:not(:disabled),
.trm-tile:focus-visible {
  border-color: rgba(45, 212, 191, 0.7);
}
.trm-tile.is-on {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 1px #2dd4bf, 0 0 18px rgba(45, 212, 191, 0.25);
}
.trm-tile.is-locked {
  opacity: 0.5;
  cursor: default;
}
.trm-tile.is-on.is-locked {
  opacity: 1;
}
.trm-sub-pic {
  display: block;
  width: 100%;
  max-height: 120px;
  margin-bottom: 6px;
  border-radius: 8px;
  object-fit: cover;
}
.trm-stat.has-pic img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 4px;
  border-radius: 6px;
  object-fit: cover;
}
/* Lifestyle budget stays in view while scrolling the tiles */
.trm-chargen #trm-life-meter {
  position: sticky;
  top: 52px;
  z-index: 2;
  padding: 6px 10px;
  border: 1px solid var(--border, #2a3d5c);
  border-radius: 8px;
  background: rgba(10, 14, 24, 0.94);
  color: var(--text, #e6eef8);
}
/* Chrome slots */
.trm-slot {
  margin: 10px 0 14px;
  padding: 10px;
  border: 1px solid var(--border, #2a3d5c);
  border-radius: 10px;
}
.trm-slot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.trm-slot-head .btn {
  margin-left: auto;
}
.trm-slot-q {
  width: 100%;
  margin-top: 8px;
}
/* Contact deck */
.trm-deck-row {
  padding: 8px 10px;
}
.trm-deck-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.trm-deck-line {
  flex: 1 0 100%;
  font-size: 0.84rem;
  color: var(--text-muted, #8fa3bd);
}
.trm-deck-row.is-dim {
  opacity: 0.55;
}
.trm-deck-more {
  margin-top: 6px;
}
.trm-show-locked {
  margin: 4px 0 8px;
}
/* Review */
.trm-review-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  margin: 0 0 12px;
}
.trm-review-list dt {
  color: var(--text-muted, #8fa3bd);
  font-size: 0.86rem;
}
.trm-review-list dd {
  margin: 0;
}
@media (max-width: 700px) {
  .trm-review-list {
    grid-template-columns: 1fr;
  }
  .trm-review-list dd {
    margin-bottom: 6px;
  }
}
.trm-review-sheet {
  margin: 10px 0;
}
.trm-register {
  margin-top: 16px;
  text-align: center;
}
.trm-register-btn {
  min-width: 260px;
  padding: 14px 24px;
  font-size: 1.1rem;
}
.trm-chargen .trm-once {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted, #8fa3bd);
}

/* T-101 #3: phone — less chrome above the step (banner, Blue and the dice bar take less height) */
@media (max-width: 700px) {
  .trm-chargen .cg-step-banner {
    height: 72px;
    margin-bottom: 10px;
  }
  .trm-chargen .cg-step-banner-copy #mode-hint,
  .trm-chargen .cg-kicker {
    display: none;
  }
  .trm-chargen .cg-step-banner-copy h2 {
    font-size: 1.25rem;
  }
  .trm-chargen .wizard-steps {
    margin-bottom: 8px;
  }
  .trm-chargen .trm-blue {
    gap: 8px;
    margin-bottom: 8px;
  }
  .trm-chargen .trm-blue-face {
    width: 40px;
    height: 40px;
  }
  .trm-chargen .trm-blue-bubble {
    padding: 6px 10px;
  }
  .trm-chargen .trm-blue-say {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 0.86rem;
  }
  .trm-chargen .trm-gloss-btn {
    min-height: 0;
    padding: 2px 10px;
    font-size: 0.78rem;
  }
  .trm-chargen .trm-dicebar {
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 8px;
  }
  .trm-chargen .trm-dicebar .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .trm-chargen #trm-dice-note:empty {
    display: none;
  }
}

/* In-page dialog (re-roll question, payoff card) */
.trm-choice {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 4, 10, 0.72);
}
.trm-choice[hidden] {
  display: none;
}
.trm-choice-card {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(45, 212, 191, 0.5);
  border-radius: 14px;
  background: #0c1220;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.trm-choice-card h3 {
  margin: 0 0 8px;
}
.trm-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.trm-pay-who {
  font-weight: 700;
}
.trm-pay-left {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* T-106: the EN / ES switch stays a small pill on phones (style.css stretches .lib-switch, made for the book switcher) */
@media (max-width: 900px) {
  .lib-switch.trmnl-lang {
    flex: 0 0 auto;
    margin-right: 8px;
  }
}

/* Sheet: where they come from and where they live (origin + home district badges) */
.trm-place-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}
.trm-place {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--lk-line-strong, rgba(255, 255, 255, 0.18));
  border-left: 3px solid var(--lk-accent, #2dd4bf);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  text-decoration: none;
}
a.trm-place:hover {
  border-color: var(--lk-accent, #2dd4bf);
}
.trm-place-home {
  border-left-color: var(--lk-fire, #f97316);
}
.trm-place-k {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lk-dim, #94a3b8);
}
.trm-place strong {
  font-size: 0.98rem;
  line-height: 1.25;
}
.trm-place-sub {
  font-size: 0.78rem;
  color: var(--lk-dim, #94a3b8);
}

/* Sheet: lifestyle as three pictures + budget meter */
.trm-life-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
}
.trm-life-tile {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--lk-line, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
}
.trm-life-tile img,
.trm-life-noart {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.trm-life-noart {
  display: grid;
  place-items: center;
  color: var(--lk-dim, #94a3b8);
}
.trm-life-tile figcaption {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px 8px;
}
.trm-life-kind {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lk-dim, #94a3b8);
}
.trm-life-tile strong {
  font-size: 0.88rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.trm-life-tile figcaption {
  min-width: 0;
}
.trm-life-cost {
  font-size: 0.75rem;
  color: var(--lk-accent, #2dd4bf);
}
.trm-life-tile.is-empty {
  opacity: 0.55;
}
.trm-budget {
  margin-top: 12px;
  --trm-ok: #22c55e;
  --trm-bad: #ef4444;
}
.trm-budget-bar {
  position: relative;
  display: flex;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.trm-budget-fill {
  background: var(--trm-ok);
}
.trm-budget.is-over .trm-budget-fill {
  background: #eab308;
}
.trm-budget-over {
  background: repeating-linear-gradient(135deg, var(--trm-bad) 0 6px, #b91c1c 6px 12px);
}
.trm-budget-mark {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  background: #fff;
}
.trm-budget-line {
  margin: 6px 0 0;
  font-size: 0.86rem;
}
.trm-budget.is-over .trm-budget-line strong {
  color: var(--trm-bad);
}
.trm-budget.is-under .trm-budget-line strong {
  color: var(--trm-ok);
}
@media print {
  .trm-life-tile img,
  .trm-life-noart {
    aspect-ratio: 16 / 9;
  }
}

/* Sheet: crew badge with its picture */
.trm-place-crew.has-pic {
  display: grid;
  grid-template-columns: 40px auto;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  border-left-color: var(--lk-violet, #a78bfa);
}
.trm-place-crew.has-pic img {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

/* Sheet: Harm — Health / Resolve boxes, Conditions, BROKEN stamp */
.trm-harm {
  position: relative;
  overflow: hidden;
}
.trm-track,
.trm-conds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 10px;
}
.trm-track-lbl {
  min-width: 108px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lk-dim, #94a3b8);
}
.trm-track-lbl strong {
  color: var(--lk-title, #fff);
  font-size: 1.05rem;
}
.trm-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.trm-box {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid var(--trm-track, #ef4444);
  border-radius: 5px;
  background: transparent;
  cursor: default;
}
button.trm-box {
  cursor: pointer;
}
.trm-box.is-on {
  background: var(--trm-track, #ef4444);
  box-shadow: 0 0 10px var(--trm-glow, rgba(239, 68, 68, 0.55));
}
.trm-box:not(.is-on)::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: linear-gradient(45deg, transparent 45%, var(--trm-track, #ef4444) 45% 55%, transparent 55%);
  opacity: 0.6;
}
.trm-track-health {
  --trm-track: #ef4444;
  --trm-glow: rgba(239, 68, 68, 0.55);
}
.trm-track-resolve {
  --trm-track: #a78bfa;
  --trm-glow: rgba(167, 139, 250, 0.55);
}
.trm-cond {
  padding: 5px 10px;
  border: 1px solid var(--lk-line-strong, rgba(255, 255, 255, 0.2));
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--lk-text, #e2e8f0);
  font: inherit;
  font-size: 0.85rem;
}
button.trm-cond {
  cursor: pointer;
}
.trm-cond small {
  color: var(--lk-dim, #94a3b8);
}
.trm-cond.is-on {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}
.trm-harm-foot {
  margin: 4px 0 0;
  font-size: 0.82rem;
}
.trm-harm-stamp {
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 4px 14px;
  border: 3px solid #ef4444;
  border-radius: 6px;
  color: #ef4444;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  transform: rotate(-12deg) scale(1.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}
.trm-harm.is-broken .trm-harm-stamp {
  opacity: 0.9;
  transform: rotate(-12deg) scale(1);
}

/* Dice drawn as their shape */
.trm-die-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.trm-die {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: linear-gradient(160deg, var(--lk-accent, #2dd4bf), #0f766e);
  color: #04121a;
  font-weight: 800;
  font-size: 0.95rem;
}
.trm-d6 {
  border-radius: 10px;
}
.trm-d8 {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.trm-d10 {
  clip-path: polygon(50% 0, 100% 42%, 50% 100%, 0 42%);
}
.trm-d12 {
  clip-path: polygon(50% 0, 98% 36%, 80% 96%, 20% 96%, 2% 36%);
}
.trm-d0 {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--lk-dim, #94a3b8);
}
.trm-die-lbl {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lk-dim, #94a3b8);
}

/* Rep ladder: 1–4 D6 · 5–9 D8 · 10–14 D10 · 15+ D12 */
.trm-rep {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.trm-rep-ladder {
  display: flex;
  flex: 1 1 300px;
  gap: 6px;
}
.trm-rep-band {
  flex: 4 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
}
.trm-rep-band.trm-rep-d8,
.trm-rep-band.trm-rep-d10 {
  flex-grow: 5;
}
.trm-rep-band.trm-rep-d12 {
  flex-grow: 1.4;
}
.trm-rep-band.is-here {
  opacity: 1;
}
.trm-rep-cells {
  display: flex;
  gap: 3px;
  width: 100%;
}
.trm-rep-cells span {
  flex: 1;
  height: 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}
.trm-rep-d6 .trm-rep-cells span.is-on { background: #38bdf8; }
.trm-rep-d8 .trm-rep-cells span.is-on { background: #2dd4bf; }
.trm-rep-d10 .trm-rep-cells span.is-on { background: #f59e0b; }
.trm-rep-d12 .trm-rep-cells span.is-on { background: #f43f5e; }
.trm-rep-die {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lk-dim, #94a3b8);
}
.trm-rep-band.is-here .trm-rep-die {
  color: var(--lk-title, #fff);
}
.trm-rep-dice {
  display: flex;
  gap: 16px;
}

/* Meters: Augmentation Limit (one segment per implant) and Encumbrance */
.trm-gauge {
  margin: 0 0 12px;
}
.trm-gauge-bar {
  position: relative;
  display: flex;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.trm-gauge-fill {
  background: var(--lk-accent, #2dd4bf);
}
.trm-gauge.is-over .trm-gauge-fill {
  background: #eab308;
}
.trm-gauge-over {
  background: repeating-linear-gradient(135deg, #ef4444 0 6px, #b91c1c 6px 12px);
}
.trm-gauge-mark {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  background: #fff;
}
.trm-al-seg {
  display: flex;
  align-items: center;
  min-width: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.55);
  background: var(--lk-accent, #2dd4bf);
  color: #04121a;
  font-size: 0.66rem;
  font-weight: 700;
  overflow: hidden;
}
.trm-al-seg > span {
  padding: 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trm-al-datalink { background: #38bdf8; }
.trm-al-cyber { background: #2dd4bf; }
.trm-al-bio,
.trm-al-biomorphic { background: #84cc16; }
.trm-al-cosmetic { background: #f0abfc; }
.trm-gauge.is-over .trm-al-seg { background: #ef4444; color: #fff; }
.trm-gauge-line {
  margin: 6px 0 0;
  font-size: 0.86rem;
}
.trm-gauge.is-over .trm-gauge-line strong {
  color: #ef4444;
}

/* Contacts as a small deck: kind colour, rank pips */
.trm-ct-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.trm-ct {
  padding: 10px 12px;
  border: 1px solid var(--lk-line, rgba(255, 255, 255, 0.12));
  border-top: 4px solid var(--trm-ct, #2dd4bf);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.trm-ct-general { --trm-ct: #2dd4bf; }
.trm-ct-pro { --trm-ct: #38bdf8; }
.trm-ct-vip { --trm-ct: #f59e0b; }
.trm-ct-faction { --trm-ct: #f43f5e; }
.trm-ct-corp { --trm-ct: #a78bfa; }
.trm-ct-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.trm-ct-kind {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--trm-ct, #2dd4bf);
}
.trm-ct-pips {
  color: var(--trm-ct, #2dd4bf);
  letter-spacing: 2px;
}
.trm-ct-name {
  display: block;
  line-height: 1.25;
}
.trm-ct-fn {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--lk-dim, #94a3b8);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trm-job-tiles {
  margin-bottom: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 200px));
}

/* Full-body side art: stands in the page gutters on wide screens, follows the scroll; never on phones or print */
.trm-side-art {
  display: none;
}
@media (min-width: 1240px) {
  .trm-side-art {
    display: block;
    position: fixed;
    top: 70px;
    bottom: 0;
    width: min(420px, calc((100vw - 920px) / 2 - 20px));
    z-index: 0;
    pointer-events: none;
  }
  .trm-side-art[hidden] {
    display: none;
  }
  .trm-side-left {
    left: 8px;
  }
  .trm-side-right {
    right: 8px;
  }
  .trm-side-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
  }
}
.trm-side-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.trm-side-slot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.trm-side-thumb {
  width: 56px;
  height: 84px;
  border: 1px dashed var(--lk-line-strong, rgba(255, 255, 255, 0.2));
  border-radius: 8px;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.06) 0 25%, transparent 0 50%) 0 0 / 12px 12px;
}
.trm-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media print {
  .trm-side-art,
  .trm-side-card,
  .trm-harm-foot {
    display: none !important;
  }
}
@media (max-width: 600px) {
  .trm-harm-stamp {
    top: 12px;
    right: 12px;
    padding: 2px 8px;
    border-width: 2px;
    font-size: 0.9rem;
  }
}

/* Sheet: foldable sections (Apps) — state remembered in localStorage by trmnl_sheet.js */
.trm-fold-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.trm-fold-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
}
.trm-fold-arrow {
  margin-left: auto;
  transition: transform 0.2s;
}
.trm-fold.is-folded .trm-fold-arrow {
  transform: rotate(-90deg);
}
.trm-fold.is-folded .trm-fold-body {
  display: none;
}
@media print {
  .trm-fold.is-folded .trm-fold-body {
    display: block;
  }
  .trm-fold-arrow {
    display: none;
  }
}

/* Sheet: apps as cards, coloured by app type */
.trm-app-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.trm-app {
  padding: 10px 12px;
  border: 1px solid var(--lk-line, rgba(255, 255, 255, 0.12));
  border-top: 4px solid var(--trm-ct, #2dd4bf);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.trm-app-basic { --trm-ct: #2dd4bf; }
.trm-app-decoder { --trm-ct: #38bdf8; }
.trm-app-hijacker { --trm-ct: #f59e0b; }
.trm-app-puppeteer { --trm-ct: #f43f5e; }
.trm-app-bpl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--trm-ct, #2dd4bf);
}
.trm-app-stats {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--lk-dim, #94a3b8);
}
.trm-app-text {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ── Linked to a live table: the shared look (assets/css/link/live.css) in Terminal State's colours ── */
body[data-lk-skin="trmnl"] { --lk-accent: #f97316; --lk-accent-ink: #fed7aa; --lk-accent-soft: #fdba74; --lk-edge: rgba(234, 88, 12, 0.55);
  --lk-chip: #f97316; --lk-chip-ink: #fed7aa; --lk-panel: rgba(12, 12, 16, 0.97); }
.trm-crits { margin-top: 10px; }
.trm-crits ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.trm-crits li { display: grid; gap: 1px; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(249, 115, 22, 0.35); }
.trm-crits li.is-lethal { border-color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.trm-crits small, .trm-crits .muted { font-size: 0.78rem; }
