.snf-tr-root,
.snf-tr-root * {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.snf-tr-root input { -webkit-user-select: text; user-select: text; }
.snf-tr-root button,
.snf-tr-root input { font: inherit; }
.snf-tr-root button { touch-action: manipulation; }
.snf-tr-root [hidden] { display: none !important; }
.snf-tr-root {
  --snf-red: #b5121b;
  --snf-red-dark: #65070d;
  --snf-gold: #d6a84b;
  --snf-cream: #f7ebc7;
  --snf-ink: #110b0b;
  width: min(100%, 1040px);
  margin: 20px auto;
  color: var(--snf-cream);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.snf-tr-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 280px;
  color: #f7ebc7;
  background: #160204;
  border: 4px solid #4b070a;
  border-radius: 26px;
}
.snf-tr-loading-ball {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d6a84b;
  animation: snfTrLoad .75s ease-in-out infinite alternate;
}
@keyframes snfTrLoad { to { transform: translateY(-8px); } }

/* Exact Hawk Hunt cabinet geometry and treatment. */
.snf-tr-cabinet {
  position: relative;
  padding: clamp(14px, 2vw, 24px);
  overflow: hidden;
  border: 4px solid #4b070a;
  border-radius: 34px 34px 22px 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.11), transparent 28%),
    linear-gradient(180deg, #d71d27 0%, var(--snf-red) 48%, #790b12 100%);
  box-shadow:
    0 28px 60px rgba(0,0,0,.38),
    inset 0 0 0 4px rgba(255,255,255,.07),
    inset 0 -20px 30px rgba(0,0,0,.18);
}
.snf-tr-cabinet::before,
.snf-tr-cabinet::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  opacity: .22;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.15) 0 7px, transparent 7px 18px);
}
.snf-tr-cabinet::before { left: 5px; }
.snf-tr-cabinet::after { right: 5px; }
.snf-tr-marquee {
  position: relative;
  z-index: 2;
  max-width: 84%;
  margin: 0 auto 14px;
  padding: 12px 18px 14px;
  color: #fff5d8;
  text-align: center;
  border: 3px solid #f1d485;
  border-radius: 18px 18px 10px 10px;
  background:
    radial-gradient(circle at 50% 15%, rgba(255,244,186,.28), transparent 55%),
    linear-gradient(180deg, #3c0407, #160204);
  box-shadow: 0 0 24px rgba(255,207,88,.25), inset 0 0 18px rgba(255,203,88,.12);
  letter-spacing: .06em;
  text-shadow: 0 2px 0 #5b070c, 0 0 12px rgba(255,224,145,.45);
}
.snf-tr-marquee strong {
  display: block;
  font-size: clamp(25px, 5vw, 58px);
  line-height: .95;
}
.snf-tr-marquee-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--snf-gold);
  font: 700 clamp(10px, 1.5vw, 15px)/1.1 Arial, sans-serif;
  letter-spacing: .18em;
}
.snf-tr-screen-shell {
  position: relative;
  z-index: 2;
  padding: clamp(10px, 1.8vw, 19px);
  border: 5px solid #170607;
  border-radius: 32px;
  background: linear-gradient(145deg, #3b3030, #0a0808 70%);
  box-shadow: inset 0 0 0 2px #625354, inset 0 12px 22px rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.35);
}
.snf-tr-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid #020202;
  border-radius: 38px / 30px;
  background: #07120e;
  box-shadow: inset 0 0 48px rgba(0,0,0,.95), inset 0 0 9px rgba(153,255,179,.12), 0 0 0 2px #2a2d29;
}
.snf-tr-hud {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 8px 10px;
  color: #fff1c8;
  background: linear-gradient(180deg, rgba(10,5,4,.98), rgba(18,7,7,.9));
  border-bottom: 2px solid rgba(214,168,75,.45);
  text-align: center;
}
.snf-tr-hud div { min-width: 0; padding: 3px 5px; }
.snf-tr-hud span {
  display: block;
  margin-bottom: 2px;
  color: var(--snf-gold);
  font: 700 clamp(8px, 1.5vw, 12px)/1 Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.snf-tr-hud strong {
  display: block;
  overflow: hidden;
  font-size: clamp(16px, 3.1vw, 31px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.snf-tr-field-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #cbb99e;
}
.snf-tr-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: pointer;
  touch-action: none;
}
.snf-tr-crt,
.snf-tr-glass,
.snf-tr-scanlines {
  position: absolute;
  z-index: 30;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.snf-tr-crt,
.snf-tr-scanlines {
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0 1px, rgba(0,0,0,.032) 1px 3px);
  opacity: .38;
}
.snf-tr-glass {
  background:
    linear-gradient(118deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.025) 18%, transparent 31%),
    radial-gradient(ellipse at center, transparent 54%, rgba(0,0,0,.34) 100%);
  mix-blend-mode: screen;
  opacity: .65;
}
.snf-tr-game-controls {
  position: relative;
  z-index: 6;
  padding: 6px 9px 10px;
  color: #fff1c8;
  background: linear-gradient(180deg, #120707, #050303);
  border-top: 1px solid rgba(214,168,75,.25);
}
.snf-tr-feedback {
  position: relative;
  min-height: 27px;
  margin-bottom: 5px;
  overflow: hidden;
  color: #f0cf7b;
  font: 800 clamp(9px, 1.5vw, 12px)/1.15 "Courier New", monospace;
  letter-spacing: .05em;
  text-align: center;
}
.snf-tr-toast,
.snf-tr-announcement {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 3px 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .14s ease, transform .14s ease;
}
.snf-tr-toast.is-visible,
.snf-tr-announcement.is-visible { opacity: 1; transform: translateY(0); }
.snf-tr-announcement strong { color: #fff4cf; }
.snf-tr-toast[data-tone="good"], .snf-tr-announcement[data-tone="good"] { color: #bdecc2; }
.snf-tr-toast[data-tone="bad"], .snf-tr-announcement[data-tone="bad"] { color: #ffb1b9; }
.snf-tr-patient-guide {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 7px 9px;
  border: 1px solid rgba(214,168,75,.46);
  border-radius: 9px;
  background: rgba(20,8,8,.76);
}
.snf-tr-guide-copy {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
}
.snf-tr-guide-label {
  color: var(--snf-gold);
  font: 800 clamp(7px, 1.2vw, 10px)/1 Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.snf-tr-patient-guide strong {
  min-width: 0;
  overflow: hidden;
  color: #fff6d8;
  font: 900 clamp(11px, 1.9vw, 16px)/1.1 Arial, sans-serif;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.snf-tr-patient-guide [data-guide-steps] {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #e7d7c2;
  font: 800 clamp(9px, 1.5vw, 12px)/1.2 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.snf-tr-patient-guide[data-state="diagnose"],
.snf-tr-patient-guide[data-state="treat"] { border-color: #d6a84b; background: rgba(82,8,13,.78); }
.snf-tr-patient-guide[data-state="recovering"] { border-color: rgba(115,190,120,.72); }
.snf-tr-utility-buttons { display: flex; gap: 5px; }
.snf-tr-utility-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(240,209,140,.6);
  border-radius: 9px;
  color: #fff4d1;
  background: linear-gradient(180deg, #312121, #140c0d);
  cursor: pointer;
}
.snf-tr-utility-btn:disabled { opacity: .35; cursor: default; }
.snf-tr-action-deck {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 7px;
  padding-top: 7px;
}
.snf-tr-action-btn {
  min-width: 0;
  min-height: 58px;
  padding: 5px 3px;
  border: 2px solid rgba(240,209,140,.58);
  border-radius: 9px;
  color: #fff4d1;
  background: linear-gradient(180deg, #3d2c2c, #1b1112);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 0 #0d0809;
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(54,0,0,.75);
}
.snf-tr-action-btn:first-child { background: linear-gradient(180deg, #c71924, #710910); }
.snf-tr-action-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #0d0809; }
.snf-tr-action-btn:disabled { opacity: .29; cursor: default; filter: grayscale(.45); }
.snf-tr-action-btn.is-next {
  opacity: 1;
  border-color: #fff0a6;
  box-shadow: inset 0 0 12px rgba(255,220,112,.2), 0 0 0 2px #d6a84b, 0 4px 0 #0d0809;
  animation: snfTrNextPulse .9s ease-in-out infinite alternate;
}
@keyframes snfTrNextPulse { to { filter: brightness(1.3); } }
.snf-tr-action-icon { display: block; font-size: clamp(16px, 2.4vw, 23px); line-height: 1; }
.snf-tr-action-label { display: block; margin-top: 2px; font: 900 clamp(8px, 1.2vw, 11px)/1 Arial, sans-serif; letter-spacing: .04em; }
.snf-tr-action-key { display: block; margin-top: 2px; color: var(--snf-gold); font: 800 8px/1 Arial, sans-serif; }

/* In-screen states, matching Hawk Hunt rather than resizing the cabinet. */
.snf-tr-overlay {
  position: absolute;
  z-index: 24;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(7px, 2vw, 18px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(159,25,34,.30), transparent 44%),
    rgba(7,2,3,.91);
}
.snf-tr-panel {
  width: min(94%, 640px);
  max-height: calc(100% - 4px);
  overflow: hidden;
  padding: clamp(12px, 2.5vw, 23px);
  color: #fff0c4;
  text-align: center;
  border: 3px solid #d6a84b;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(83,8,13,.97), rgba(21,4,5,.98));
  box-shadow: inset 0 0 20px rgba(255,214,109,.08), 0 10px 28px rgba(0,0,0,.55);
}
.snf-tr-panel h2 {
  margin: 3px 0 7px;
  color: #fff4d1;
  font-size: clamp(27px, 5vw, 50px);
  line-height: .95;
  letter-spacing: .035em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #7f0b12;
}
.snf-tr-panel p { margin: 5px auto; }
.snf-tr-eyebrow {
  display: block;
  color: var(--snf-gold);
  font: 800 clamp(8px, 1.4vw, 12px)/1 Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.snf-tr-attract-mark {
  display: grid;
  place-items: center;
  width: clamp(38px, 7vw, 62px);
  height: clamp(38px, 7vw, 62px);
  margin: 7px auto 2px;
  border: 3px solid #f0d18c;
  border-radius: 50%;
  color: #fff4d1;
  background: #b5121b;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1;
  box-shadow: 0 4px 0 #65070d;
}
.snf-tr-tagline { color: #e8dcc0; font: 800 clamp(11px, 1.8vw, 15px)/1.2 Arial, sans-serif; }
.snf-tr-member-status {
  min-height: 1.2em;
  color: #dbc98e;
  font: 800 clamp(9px, 1.5vw, 12px)/1.25 Arial, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.snf-tr-member-status a { color: #fff0a6; }
.snf-tr-title-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  margin: 9px auto 7px;
  max-width: 560px;
}
.snf-tr-title-actions .snf-tr-primary-button { grid-column: 1 / -1; }
.snf-tr-primary-button,
.snf-tr-secondary-button,
.snf-tr-panel button,
.snf-tr-dialog button {
  min-height: 45px;
  padding: 7px 12px;
  border: 2px solid #f0d18c;
  border-radius: 9px;
  color: #fff4d1;
  background: linear-gradient(180deg, #d01c25, #7f0a11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 4px 0 #4a060a;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(54,0,0,.75);
}
.snf-tr-secondary-button,
.snf-tr-panel .snf-tr-secondary-button,
.snf-tr-dialog .snf-tr-secondary-button {
  border-color: #8c7341;
  color: #e8dcc0;
  background: linear-gradient(180deg, #443638, #211719);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 0 #0d0809;
}
.snf-tr-primary-button:active,
.snf-tr-secondary-button:active { transform: translateY(2px); }
.snf-tr-title-flash {
  color: #f4d37f;
  font: 900 clamp(9px, 1.4vw, 12px)/1 Arial, sans-serif;
  letter-spacing: .18em;
  animation: snfTrBlink 1s steps(2,end) infinite;
}
@keyframes snfTrBlink { 50% { opacity: .25; } }
.snf-tr-recovery {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(214,168,75,.62);
  border-radius: 8px;
  color: #f8e3b0;
  background: rgba(0,0,0,.35);
  font: 800 9px/1.2 Arial, sans-serif;
}
.snf-tr-recovery button { min-height: 32px; padding: 4px 8px; font-size: 10px; }
.snf-tr-menu-subpanel h2 { margin-bottom: 9px; }
.snf-tr-how-list {
  max-width: 500px;
  margin: 0 auto 10px;
  text-align: left;
}
.snf-tr-how-list p { margin: 0 0 6px; color: #e8dcc0; font: 700 clamp(10px, 1.7vw, 14px)/1.22 Arial, sans-serif; }
.snf-tr-how-list strong { color: #f0cf7b; }
.snf-tr-subpanel-actions,
.snf-tr-panel-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.snf-tr-panel--simple { max-width: 540px; }
.snf-tr-panel--simple p { color: #e8dcc0; font: 700 clamp(11px, 1.8vw, 15px)/1.3 Arial, sans-serif; }
.snf-tr-final-score {
  margin: 4px 0 7px;
  color: #ffe9a8;
  font-size: clamp(40px, 8vw, 74px);
  line-height: .9;
  text-shadow: 0 4px 0 #7f0b12;
}
.snf-tr-result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 6px;
  max-width: 520px;
  margin: 8px auto;
}
.snf-tr-result-summary span {
  padding: 6px 4px;
  color: #d6a84b;
  border: 1px solid rgba(214,168,75,.35);
  border-radius: 8px;
  background: rgba(0,0,0,.27);
  font: 800 9px/1.1 Arial, sans-serif;
  letter-spacing: .06em;
}
.snf-tr-result-summary strong { display: block; margin-bottom: 3px; color: #fff4d1; font: 900 clamp(16px, 3vw, 25px)/1 "Courier New", monospace; }
.snf-tr-save-state { min-height: 18px; color: #e8dcc0; font: 800 clamp(9px, 1.5vw, 12px)/1.2 Arial, sans-serif; }
.snf-tr-save-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
  max-width: 460px;
  margin: 6px auto 8px;
}
.snf-tr-save-proof > div { padding: 5px; border: 1px solid rgba(214,168,75,.35); border-radius: 8px; background: rgba(0,0,0,.25); }
.snf-tr-save-proof span { display: block; color: #d6a84b; font: 800 8px/1 Arial, sans-serif; letter-spacing: .08em; }
.snf-tr-save-proof strong { display: block; margin-top: 3px; color: #fff4d1; font: 900 13px/1.1 "Courier New", monospace; }
.snf-tr-save-proof[data-state="confirmed"] > div:first-child { border-color: rgba(122,210,130,.7); }
.snf-tr-save-proof[data-state="error"] > div:first-child { border-color: rgba(255,100,112,.75); }
.snf-tr-panel-actions--results { max-width: 520px; margin: 0 auto; }
.snf-tr-start-leaderboard { max-width: 520px; margin: 6px auto 8px; }
.snf-tr-leaderboard { width: 100%; border-collapse: collapse; color: #fff0c4; }
.snf-tr-leaderboard th,
.snf-tr-leaderboard td { padding: 3px 5px; border-bottom: 1px solid rgba(214,168,75,.20); text-align: left; }
.snf-tr-leaderboard th { color: #d6a84b; font: 800 8px/1 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.snf-tr-leaderboard td { font: 800 clamp(9px, 1.4vw, 12px)/1.05 "Courier New", monospace; }
.snf-tr-leader-member { display: flex; align-items: center; gap: 5px; min-width: 0; }
.snf-tr-leader-avatar { width: 24px; height: 28px; flex: 0 0 auto; image-rendering: pixelated; }
.snf-tr-leader-name { overflow: hidden; font-family: Arial, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.snf-tr-current-row { background: rgba(214,168,75,.12); }

.snf-tr-control-deck {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 78px 1fr 90px;
  align-items: center;
  gap: 14px;
  max-width: 90%;
  min-height: 76px;
  margin: 14px auto 0;
  padding: 14px 20px;
  color: #fce8b6;
  border: 3px solid #4b070a;
  border-radius: 12px 12px 22px 22px;
  background: linear-gradient(180deg, #e3222d, #8b0c14);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.12), 0 9px 0 #4b070a;
}
.snf-tr-speaker {
  width: 72px;
  height: 46px;
  border-radius: 8px;
  background: radial-gradient(circle, #1d1112 0 2px, transparent 2.5px) 0 0 / 9px 9px;
  opacity: .85;
}
.snf-tr-deck-copy {
  overflow: hidden;
  font: 800 clamp(10px, 1.8vw, 15px)/1.1 Arial, sans-serif;
  letter-spacing: .12em;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 2px 0 #65070d;
  white-space: nowrap;
}
.snf-tr-deck-copy[data-tone="good"] { color: #e4ffd9; }
.snf-tr-deck-copy[data-tone="bad"] { color: #ffe0e4; }
.snf-tr-cabinet-buttons { display: flex; justify-content: flex-end; gap: 11px; }
.snf-tr-cabinet-buttons i {
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid #3e0609;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff2bb, #d7a840 45%, #755116 100%);
  box-shadow: 0 4px 0 #3e0609;
}

/* Upgrade selection: all choices visible, no scrolling. */
.snf-tr-dialog {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8,5,4,.84);
}
.snf-tr-upgrade-panel {
  width: min(720px, 100%);
  padding: 16px;
  color: #fff0c4;
  text-align: center;
  border: 3px solid #d6a84b;
  border-radius: 16px;
  background: linear-gradient(180deg, #50080d, #150405);
  box-shadow: 0 20px 70px rgba(0,0,0,.6);
}
.snf-tr-upgrade-panel h2 { margin: 4px 0; font-size: clamp(27px, 5vw, 44px); }
.snf-tr-upgrade-panel p { margin: 4px auto 10px; color: #e8dcc0; font: 700 12px/1.25 Arial, sans-serif; }
.snf-tr-upgrade-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.snf-tr-choice-btn {
  min-height: 126px;
  padding: 9px 6px;
  border: 2px solid rgba(240,209,140,.65);
  border-radius: 10px;
  color: #fff4d1;
  background: linear-gradient(180deg, #3c2929, #160d0e);
  cursor: pointer;
}
.snf-tr-choice-icon { display: block; font-size: 27px; }
.snf-tr-choice-btn strong { display: block; margin-top: 4px; font: 900 13px/1.05 Arial, sans-serif; text-transform: uppercase; }
.snf-tr-choice-btn small { display: block; margin-top: 4px; color: #e4d1b8; font: 700 10px/1.2 Arial, sans-serif; }

/* Trainer creator: compact, fixed preview, only option list scrolls. */
body.snf-tr-modal-open { overflow: hidden !important; }
.snf-tr-dialog-card {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(82dvh, 720px);
  overflow: hidden;
  padding: 14px;
  color: #f7ebc7;
  border: 2px solid #d6a84b;
  border-radius: 17px;
  background: #241715;
  box-shadow: 0 25px 80px rgba(0,0,0,.55);
}
.snf-tr-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; margin-bottom: 9px; }
.snf-tr-dialog-head h2 { margin: 0; font-size: clamp(23px, 4vw, 38px); text-transform: uppercase; }
.snf-tr-dialog-close {
  min-width: 38px;
  min-height: 38px;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 22px;
}
.snf-tr-customizer {
  display: grid;
  grid-template-columns: 180px minmax(0,1fr);
  gap: 14px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.snf-tr-preview-wrap {
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 8px;
  border: 1px solid rgba(214,168,75,.28);
  border-radius: 12px;
  background: #101711;
}
.snf-tr-preview { width: 165px; height: 190px; image-rendering: pixelated; }
.snf-tr-fields {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 5px;
  overscroll-behavior: contain;
}
.snf-tr-field label { display: block; margin-bottom: 5px; color: #d6a84b; font: 900 10px/1 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.snf-tr-field-help { display: block; margin: -2px 0 5px; color: #cdbda7; font: 700 9px/1.2 Arial, sans-serif; }
.snf-tr-field input[type="text"] {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  color: #fff;
  border: 1px solid rgba(214,168,75,.4);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
}
.snf-tr-options { display: flex; flex-wrap: wrap; gap: 6px; }
.snf-tr-model-field .snf-tr-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.snf-tr-option-btn {
  min-width: 39px;
  min-height: 36px;
  padding: 5px 7px !important;
  border: 1px solid rgba(214,168,75,.3) !important;
  border-radius: 8px !important;
  color: #fff4d1;
  background: rgba(255,255,255,.055) !important;
  box-shadow: none !important;
  font: 800 11px/1.05 Arial, sans-serif;
  text-transform: none !important;
  text-shadow: none !important;
}
.snf-tr-option-btn[aria-pressed="true"] { outline: 2px solid #d6a84b; background: rgba(214,168,75,.18) !important; }
.snf-tr-swatch { display: block; width: 22px; height: 22px; border: 1px solid rgba(255,255,255,.28); border-radius: 5px; }
.snf-tr-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex: 0 0 auto; margin-top: 10px; }
.snf-tr-dialog-actions button { min-height: 42px; }

@media (max-width: 620px) {
  .snf-tr-root { margin: 8px auto; }
  .snf-tr-cabinet { padding: 10px; border-width: 3px; border-radius: 22px 22px 15px 15px; }
  .snf-tr-marquee { max-width: 94%; margin-bottom: 8px; padding: 9px 10px 10px; border-radius: 12px 12px 7px 7px; }
  .snf-tr-marquee strong { font-size: clamp(26px, 8vw, 38px); }
  .snf-tr-marquee-kicker { margin-bottom: 3px; font-size: 8px; }
  .snf-tr-screen-shell { padding: 7px; border-width: 3px; border-radius: 21px; }
  .snf-tr-screen { border-radius: 22px / 18px; }
  .snf-tr-hud { padding: 5px 2px; }
  .snf-tr-hud div { padding: 2px 1px; }
  .snf-tr-hud span { font-size: clamp(6px, 1.8vw, 9px); letter-spacing: .07em; }
  .snf-tr-hud strong { font-size: clamp(12px, 4vw, 20px); }
  .snf-tr-game-controls { padding: 4px 6px 7px; }
  .snf-tr-feedback { min-height: 23px; margin-bottom: 3px; font-size: 9px; }
  .snf-tr-patient-guide { min-height: 45px; padding: 5px 6px; }
  .snf-tr-guide-copy { gap: 1px 5px; }
  .snf-tr-guide-label { font-size: 6px; }
  .snf-tr-patient-guide strong { font-size: 10px; }
  .snf-tr-patient-guide [data-guide-steps] { font-size: 8px; }
  .snf-tr-utility-btn { width: 31px; height: 31px; font-size: 13px; }
  .snf-tr-action-deck { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; padding-top: 5px; }
  .snf-tr-action-btn { min-height: 45px; padding: 3px 2px; border-radius: 7px; }
  .snf-tr-action-icon { font-size: 15px; }
  .snf-tr-action-label { font-size: 8px; }
  .snf-tr-action-key { display: none; }
  .snf-tr-overlay { padding: 5px; }
  .snf-tr-panel { width: 96%; max-height: calc(100% - 2px); padding: 9px 10px; border-width: 2px; border-radius: 12px; }
  .snf-tr-panel h2 { margin: 2px 0 5px; font-size: clamp(24px, 7vw, 34px); }
  .snf-tr-eyebrow { font-size: 8px; }
  .snf-tr-attract-mark { width: 38px; height: 38px; margin: 4px auto 1px; border-width: 2px; font-size: 31px; }
  .snf-tr-tagline { margin: 3px auto !important; font-size: 10px; }
  .snf-tr-member-status { margin: 3px auto !important; font-size: 8px; }
  .snf-tr-title-actions { gap: 5px; margin: 6px auto 4px; }
  .snf-tr-title-actions button { min-height: 38px; padding: 4px 3px; font-size: 10px; }
  .snf-tr-title-flash { font-size: 8px; }
  .snf-tr-recovery { grid-template-columns: 1fr auto; font-size: 7px; }
  .snf-tr-recovery strong { grid-column: 1 / -1; }
  .snf-tr-how-list p { margin-bottom: 4px; font-size: 9px; }
  .snf-tr-subpanel-actions button,
  .snf-tr-panel-actions button { min-height: 38px; padding: 4px 9px; font-size: 10px; }
  .snf-tr-final-score { font-size: clamp(37px, 12vw, 54px); }
  .snf-tr-result-summary { margin: 5px auto; gap: 4px; }
  .snf-tr-result-summary span { padding: 4px 2px; font-size: 7px; }
  .snf-tr-result-summary strong { font-size: 15px; }
  .snf-tr-save-state { margin: 3px auto !important; font-size: 8px; }
  .snf-tr-save-proof { margin: 4px auto 5px; }
  .snf-tr-save-proof span { font-size: 6px; }
  .snf-tr-save-proof strong { font-size: 10px; }
  .snf-tr-leaderboard th, .snf-tr-leaderboard td { padding: 2px 3px; }
  .snf-tr-leaderboard th { font-size: 6px; }
  .snf-tr-leaderboard td { font-size: 8px; }
  .snf-tr-leader-avatar { width: 18px; height: 21px; }
  .snf-tr-start-leaderboard .snf-tr-leaderboard th:nth-child(4),
  .snf-tr-start-leaderboard .snf-tr-leaderboard td:nth-child(4) { display: none; }
  .snf-tr-control-deck { grid-template-columns: 1fr; min-height: 44px; margin-top: 8px; padding: 9px 12px; }
  .snf-tr-speaker, .snf-tr-cabinet-buttons { display: none; }
  .snf-tr-deck-copy { font-size: 9px; }

  .snf-tr-dialog { align-items: flex-end; padding: 8px; }
  .snf-tr-upgrade-panel { width: 100%; padding: 10px; border-radius: 13px; }
  .snf-tr-upgrade-panel h2 { font-size: 27px; }
  .snf-tr-upgrade-panel p { font-size: 9px; }
  .snf-tr-upgrade-grid { gap: 5px; }
  .snf-tr-choice-btn { min-height: 108px; padding: 6px 3px !important; }
  .snf-tr-choice-icon { font-size: 21px; }
  .snf-tr-choice-btn strong { font-size: 10px; }
  .snf-tr-choice-btn small { font-size: 8px; }

  .snf-tr-dialog-card {
    width: 100%;
    max-height: min(72dvh, 650px);
    padding: 10px;
    border-radius: 14px 14px 10px 10px;
  }
  .snf-tr-dialog-head { margin-bottom: 6px; }
  .snf-tr-dialog-head h2 { font-size: 22px; }
  .snf-tr-dialog-close { min-width: 34px; min-height: 34px; }
  .snf-tr-customizer { grid-template-columns: 92px minmax(0,1fr); gap: 8px; }
  .snf-tr-preview-wrap { min-height: 126px; padding: 3px; }
  .snf-tr-preview { width: 88px; height: 102px; }
  .snf-tr-fields { gap: 8px; padding-right: 3px; }
  .snf-tr-field label { font-size: 8px; }
  .snf-tr-field-help { font-size: 7px; }
  .snf-tr-field input[type="text"] { min-height: 36px; padding: 5px 7px; font-size: 13px; }
  .snf-tr-options { gap: 4px; }
  .snf-tr-option-btn { min-width: 32px; min-height: 32px; padding: 4px 5px !important; font-size: 9px; }
  .snf-tr-swatch { width: 18px; height: 18px; }
  .snf-tr-dialog-actions { margin-top: 7px; }
  .snf-tr-dialog-actions button { min-height: 37px; padding: 4px 10px; font-size: 10px; }
}

@media (max-width: 390px) {
  .snf-tr-title-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .snf-tr-title-actions .snf-tr-primary-button { grid-column: 1 / -1; }
  .snf-tr-title-actions .snf-tr-secondary-button:last-child { grid-column: 1 / -1; }
  .snf-tr-action-btn { min-height: 42px; }
  .snf-tr-feedback { min-height: 20px; }
  .snf-tr-patient-guide { min-height: 42px; }
}


/* v0.2.8: member-locked trainer identity, centered mobile editor, inline upgrades. */
.snf-tr-upgrade-inline {
  min-height: 142px;
  padding: 7px;
  border: 1px solid rgba(214,168,75,.62);
  border-radius: 10px;
  color: #fff0c4;
  background: linear-gradient(180deg, rgba(82,8,13,.98), rgba(20,4,5,.98));
  box-shadow: inset 0 0 18px rgba(255,214,109,.07);
}
.snf-tr-upgrade-head {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  text-align: left;
}
.snf-tr-upgrade-head > strong {
  overflow: hidden;
  color: #fff4d1;
  font: 900 14px/1 Arial, sans-serif;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.snf-tr-upgrade-head > span:last-child {
  color: #d7c7af;
  font: 700 9px/1 Arial, sans-serif;
  white-space: nowrap;
}
.snf-tr-upgrade-inline .snf-tr-upgrade-grid { gap: 6px; }
.snf-tr-upgrade-inline .snf-tr-choice-btn {
  min-height: 91px;
  padding: 5px 4px;
}
.snf-tr-upgrade-inline .snf-tr-choice-btn:disabled { opacity: .72; cursor: wait; }
.snf-tr-root.is-upgrading .snf-tr-feedback,
.snf-tr-root.is-upgrading .snf-tr-patient-guide,
.snf-tr-root.is-upgrading .snf-tr-action-deck { display: none; }
.snf-tr-game-controls { min-height: 152px; }

.snf-tr-dialog-head {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 38px;
  align-items: center;
}
.snf-tr-dialog-head::before { content: ''; width: 38px; height: 1px; }
.snf-tr-dialog-head h2 { grid-column: 2; text-align: center; }
.snf-tr-dialog-close { grid-column: 3; }
.snf-tr-fields,
.snf-tr-field,
.snf-tr-options { min-width: 0; }
.snf-tr-profile-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(214,168,75,.28);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.snf-tr-profile-name span {
  color: #d6a84b;
  font: 900 9px/1 Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.snf-tr-profile-name strong {
  overflow: hidden;
  color: #fff4d1;
  font: 900 12px/1 Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.snf-tr-option-btn { max-width: 100%; overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .snf-tr-game-controls { min-height: 169px; }
  .snf-tr-upgrade-inline {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 160px;
    padding: 6px;
  }
  .snf-tr-upgrade-head { gap: 5px; margin-bottom: 5px; }
  .snf-tr-upgrade-head .snf-tr-eyebrow { font-size: 7px; }
  .snf-tr-upgrade-head > strong { font-size: 11px; }
  .snf-tr-upgrade-head > span:last-child { display: none; }
  .snf-tr-upgrade-inline .snf-tr-choice-btn { min-height: 112px; padding: 5px 2px; }
  .snf-tr-upgrade-inline .snf-tr-choice-icon { font-size: 20px; }
  .snf-tr-upgrade-inline .snf-tr-choice-btn strong { font-size: 9px; }
  .snf-tr-upgrade-inline .snf-tr-choice-btn small { font-size: 7px; line-height: 1.15; }

  .snf-tr-dialog { align-items: center; justify-content: center; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
  .snf-tr-dialog-card {
    width: min(96vw, 560px);
    max-height: min(78dvh, 650px);
    margin: 0 auto;
    border-radius: 14px;
  }
  .snf-tr-dialog-head { grid-template-columns: 34px minmax(0,1fr) 34px; }
  .snf-tr-dialog-head::before { width: 34px; }
  .snf-tr-dialog-head h2 { font-size: 20px; }
  .snf-tr-customizer {
    grid-template-columns: 1fr;
    grid-template-rows: 94px minmax(0,1fr);
    gap: 7px;
  }
  .snf-tr-preview-wrap {
    min-height: 0;
    height: 94px;
    padding: 2px;
  }
  .snf-tr-preview { width: 76px; height: 88px; }
  .snf-tr-fields { gap: 7px; padding: 0 3px 2px 0; }
  .snf-tr-profile-name { padding: 6px 7px; }
  .snf-tr-model-field .snf-tr-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .snf-tr-options { align-items: stretch; }
  .snf-tr-option-btn { flex: 1 1 auto; min-width: 30px; }
}

/* v0.3.0 trainer palette and sprite refinements. */
