:root {
  --paper: #f6f4ef;
  --card: #ffffff;
  --card-hi: #efece4;
  --red: #861a22;
  --red-dim: #5b1217;
  --ink: #1b1b1b;
  --ink-dim: #5c5955;
  --ink-faint: #85817b;
  --border: #e3ded4;
  --radius: 14px;
  --success: #2e7d32;
  --warning: #b26a00;
  --danger: #b3261e;
  --sev-high: #b3261e;
  --sev-medium: #b26a00;
  --sev-low: #2e7d32;
  --brand-felder-bg: #00539f;
  --brand-felder-text: #ffffff;
  --brand-format4-bg: #0082c9;
  --brand-format4-text: #ffffff;
  --brand-hammer-bg: #f9dc06;
  --brand-hammer-text: #1b1b1b;
  --shadow-card: 0 1px 2px rgba(27,27,27,.04), 0 2px 8px rgba(27,27,27,.05);
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--paper);
}

a { color: var(--red); text-decoration: none; }
button { font-family: inherit; }
input { font-family: inherit; }

img, svg { display: block; }

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 5;
  border-bottom: 1px solid var(--border);
}

.app-header .brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.app-header .wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-transform: uppercase;
}

.app-header .tag {
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 500;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}

.back-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 2px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 44px;
}

.back-btn svg { color: var(--red); }

.back-btn:active { opacity: 0.6; }

/* ---------- Screen subtitle ---------- */
.screen-subtitle {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.5;
  margin-top: -6px;
}

/* ---------- Main content area ---------- */
.screen {
  flex: 1;
  padding: 6px 20px 110px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fade-item {
  animation: fade-up .35s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Bottom tab bar ---------- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 10;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 10px;
  min-height: 52px;
  justify-content: center;
}

.tab-btn svg { width: 22px; height: 22px; }

.tab-btn.active { color: var(--red); }

.tab-btn:active { background: var(--card-hi); transform: scale(0.96); }

/* ---------- Login ---------- */
.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  gap: 24px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  text-align: center;
}

.login-logo .mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
}

.login-logo .title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.login-logo .subtitle {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 260px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 16px;
  width: 100%;
  min-height: 52px;
}

.field input:focus {
  outline: none;
  border-color: var(--red);
}

.btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  min-height: 52px;
  transition: transform .08s ease;
}

.btn:active { background: var(--red-dim); transform: scale(0.98); }

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:active { background: var(--card-hi); }

.helper-text {
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.5;
}

.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 12px;
}

/* ---------- Search bar ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 52px;
  box-shadow: var(--shadow-card);
}

.search-bar svg { flex-shrink: 0; color: var(--ink-faint); width: 20px; height: 20px; }

.search-bar input {
  background: none;
  border: none;
  color: var(--ink);
  font-size: 16px;
  width: 100%;
}

.search-bar input::placeholder { color: var(--ink-faint); }

.search-bar input:focus { outline: none; }

/* ---------- Greeting ---------- */
.greeting {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--ink);
}

/* ---------- "What's in here" tile row ---------- */
.tile-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.info-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  min-height: 52px;
  transition: transform .08s ease;
}

.info-tile:active { background: var(--card-hi); transform: scale(0.97); }

.info-tile .icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(134, 26, 34, 0.08);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-tile .icon-wrap svg { width: 18px; height: 18px; }

.info-tile .count {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.info-tile .lbl {
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 500;
  line-height: 1.3;
}

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-strip .label-row {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 500;
}

.stat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-tile .num {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
}

.stat-tile .lbl {
  font-size: 11px;
  color: var(--ink-dim);
  font-weight: 500;
}

/* ---------- Section heading ---------- */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading h2 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ---------- Fault list item ---------- */
.fault-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fault-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  min-height: 52px;
  transition: transform .08s ease;
}

.fault-row:active { background: var(--card-hi); transform: scale(0.99); }

.code-chip {
  background: var(--paper);
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 8px;
  padding: 5px 9px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 46px;
  text-align: center;
}

.fault-row .info {
  flex: 1;
  min-width: 0;
}

.fault-row .title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
}

.fault-row .sub {
  font-size: 13px;
  color: var(--ink-dim);
  margin-top: 3px;
}

.sev-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sev-high { background: var(--sev-high); }
.sev-medium { background: var(--sev-medium); }
.sev-low { background: var(--sev-low); }

.chevron { color: var(--ink-faint); flex-shrink: 0; width: 18px; height: 18px; }

/* ---------- Machine tiles grid ---------- */
.machine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.machine-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  min-height: 52px;
  transition: transform .08s ease;
}

.machine-tile:active { background: var(--card-hi); transform: scale(0.98); }

.brand-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 6px;
  padding: 3px 8px;
}

.brand-badge.brand-felder { background: var(--brand-felder-bg); color: var(--brand-felder-text); }
.brand-badge.brand-format4 { background: var(--brand-format4-bg); color: var(--brand-format4-text); }
.brand-badge.brand-hammer { background: var(--brand-hammer-bg); color: var(--brand-hammer-text); }

.machine-tile .model {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.machine-tile .type {
  font-size: 12px;
  color: var(--ink-dim);
}

/* ---------- Machine detail ---------- */
.machine-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.machine-hero .model {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.machine-hero .type {
  font-size: 14px;
  color: var(--ink-dim);
}

.machine-hero .serial-note {
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 4px;
}

.vault-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  min-height: 52px;
}

.vault-link:active { background: var(--card-hi); }

/* ---------- Fault detail ---------- */
.fault-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fault-head h1 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
}

.symptom {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
}

/* ---------- Video card ---------- */
.video-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: #e8e5dd;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.play-glyph {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-glyph svg { width: 22px; height: 22px; margin-left: 3px; color: #fff; }

.video-frame .machine-name {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}

.video-caption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-dim);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  min-height: 52px;
}

.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Parts list ---------- */
.parts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.part-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14px;
  color: var(--ink);
}

.part-row .part-no {
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.empty-note {
  font-size: 14px;
  color: var(--ink-faint);
  font-style: italic;
}

/* ---------- Fault footer ---------- */
.fault-footer {
  font-size: 13px;
  color: var(--ink-dim);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  line-height: 1.5;
}

.action-row {
  display: flex;
  gap: 10px;
}

.action-row .btn { flex: 1; }

/* ---------- Vault / Passwords ---------- */
.vault-pin-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 32px 24px;
  text-align: center;
}

.vault-pin-screen .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  box-shadow: var(--shadow-card);
}

.vault-pin-screen .title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
}

.vault-pin-screen .lede {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 260px;
  margin-top: -8px;
}

.pin-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
}

.pin-dot.filled { background: var(--red); border-color: var(--red); }

.pin-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notice-banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}

.secret-group-label {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 4px 0 -8px;
}

.secret-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secret-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.secret-row .info { flex: 1; min-width: 0; }

.secret-row .label-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.secret-row .label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.type-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-dim);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  text-transform: uppercase;
}

.secret-row .value {
  font-size: 14px;
  color: var(--ink-dim);
  font-family: 'SFMono-Regular', Consolas, monospace;
  margin-top: 4px;
  cursor: pointer;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
}

.secret-row .value.revealed {
  color: var(--ink);
  background: #fdf1b8;
  font-weight: 600;
}

.secret-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.show-btn, .copy-btn {
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  min-width: 68px;
}

.show-btn:active, .copy-btn:active { background: var(--card-hi); }

.show-btn.is-shown { border-color: var(--red); color: var(--red); }

.access-log {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-log h2 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-dim);
  margin: 0 0 2px;
  text-transform: uppercase;
}

.access-log-entry {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- Search ---------- */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-group-label {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.empty-search {
  text-align: center;
  padding: 32px 12px;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.suggest-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(27,27,27,.25);
  z-index: 50;
  max-width: 90%;
  text-align: center;
}

.toast.show { animation: toast-in-out 2.2s ease forwards; }

@keyframes toast-in-out {
  0% { opacity: 0; transform: translateX(-50%) translateY(8px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

/* ---------- Misc ---------- */
.loading-state, .error-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 15px;
  padding: 40px;
  text-align: center;
}

/* ---------- Staggered fade-up on list render ---------- */
.fault-list .fault-row,
.machine-grid .machine-tile,
.secret-list .secret-row,
.tile-row .info-tile,
.steps li {
  animation: fade-up .35s ease both;
}

.fault-list .fault-row:nth-child(1), .machine-grid .machine-tile:nth-child(1), .secret-list .secret-row:nth-child(1), .tile-row .info-tile:nth-child(1), .steps li:nth-child(1) { animation-delay: 0ms; }
.fault-list .fault-row:nth-child(2), .machine-grid .machine-tile:nth-child(2), .secret-list .secret-row:nth-child(2), .tile-row .info-tile:nth-child(2), .steps li:nth-child(2) { animation-delay: 40ms; }
.fault-list .fault-row:nth-child(3), .machine-grid .machine-tile:nth-child(3), .secret-list .secret-row:nth-child(3), .tile-row .info-tile:nth-child(3), .steps li:nth-child(3) { animation-delay: 80ms; }
.fault-list .fault-row:nth-child(4), .machine-grid .machine-tile:nth-child(4), .secret-list .secret-row:nth-child(4), .steps li:nth-child(4) { animation-delay: 120ms; }
.fault-list .fault-row:nth-child(5), .machine-grid .machine-tile:nth-child(5), .secret-list .secret-row:nth-child(5), .steps li:nth-child(5) { animation-delay: 160ms; }
.fault-list .fault-row:nth-child(6), .machine-grid .machine-tile:nth-child(6), .secret-list .secret-row:nth-child(6), .steps li:nth-child(6) { animation-delay: 200ms; }
.fault-list .fault-row:nth-child(n+7), .machine-grid .machine-tile:nth-child(n+7), .secret-list .secret-row:nth-child(n+7), .steps li:nth-child(n+7) { animation-delay: 240ms; }

.btn:active, .tab-btn:active, .info-tile:active, .fault-row:active, .machine-tile:active, .suggest-chip:active, .show-btn:active, .copy-btn:active {
  transform: scale(0.97);
}

@media (min-width: 481px) {
  body { padding: 24px 0; }
  #app { min-height: calc(100vh - 48px); border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
  .tab-bar { border-radius: 0 0 20px 20px; }
}
