
body.nfc-edition {
  --nfc-good: #50d890;
  --nfc-warn: #f7c85b;
  --nfc-bad: #ff7a88;
}
body.nfc-edition .nfc-legacy-page,
body.nfc-edition #voiceDock { display: none !important; }
body.nfc-edition .nfc-nav {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
body.nfc-edition .nfc-nav .app-nav-button { justify-content: center; }
body.nfc-edition .setup-import-grid { align-items: stretch; }
body.nfc-edition .setup-hero-actions,
body.nfc-edition #fullDataImportCard { display: none !important; }

.nfc-progress-summary {
  min-width: 108px; padding: 14px 18px; border: 1px solid #2c3a4b;
  border-radius: 16px; background: #111720; text-align: center;
}
.nfc-progress-summary strong { display: block; font-size: 1.6rem; }
.nfc-progress-summary span {
  display: block; color: #8fa1b4; font-size: .78rem; margin-top: 3px;
  text-transform: uppercase; letter-spacing: .08em;
}
.nfc-platform-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  margin: 0 0 16px; border: 1px solid #2a3b4d; border-radius: 14px;
  background: rgba(56, 189, 248, .05);
}
.nfc-platform-note strong { flex: 0 0 auto; color: var(--accent); }
.nfc-platform-note span { color: #aab7c5; line-height: 1.45; }
.nfc-link-card, .nfc-empty-card {
  border: 1px solid #2a3646; border-radius: 20px; background: #111720;
  padding: clamp(18px, 4vw, 28px); box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.nfc-empty-card { display: grid; gap: 10px; max-width: 660px; }
.nfc-empty-card span { color: #91a0af; }
.nfc-empty-card button { width: fit-content; margin-top: 6px; }
.nfc-unit-position {
  color: #728397; font-size: .76rem; font-weight: 900; letter-spacing: .1em;
}
.nfc-current-unit { margin: 10px 0 18px; }
.nfc-current-unit > span, .nfc-current-unit > small { display: block; color: #8fa0b1; }
.nfc-current-unit h2 {
  margin: 5px 0; font-size: clamp(2rem, 7vw, 4.2rem);
  line-height: .98; letter-spacing: -.035em;
}
.nfc-link-state {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 16px;
  border: 1px solid #34465c; border-radius: 14px; background: #0e141c;
}
.nfc-link-state strong { font-size: 1rem; }
.nfc-link-state span { color: #8f9eae; }
.nfc-link-state.linked {
  border-color: rgba(80,216,144,.45); background: rgba(80,216,144,.06);
}
.nfc-link-state.linked strong { color: var(--nfc-good); }
.nfc-link-state.skipped { border-color: rgba(247,200,91,.35); }
.nfc-link-state.skipped strong { color: var(--nfc-warn); }
.nfc-link-actions {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px; margin-top: 14px;
}
.nfc-link-actions:has(> :only-child) { grid-template-columns: 1fr; }
.nfc-code-link { margin-top: 18px; padding-top: 18px; border-top: 1px solid #273344; }
.nfc-code-link label {
  display: block; margin-bottom: 7px; color: #8697a8; font-size: .78rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
}
.nfc-code-link > div {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px;
}
.nfc-code-link input, .nfc-play-fallback input {
  width: 100%; min-width: 0; padding: 12px 13px; border: 1px solid #34455a;
  border-radius: 12px; background: #0b1017; color: #edf3f8;
  font: inherit; outline: none;
}
.nfc-code-link input:focus, .nfc-play-fallback input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,.1);
}
.nfc-status-line {
  min-height: 24px; margin-top: 12px; color: #91a1b3; line-height: 1.45;
}
.nfc-status-line[data-kind="good"] { color: var(--nfc-good); }
.nfc-status-line[data-kind="bad"] { color: var(--nfc-bad); }
.nfc-status-line[data-kind="busy"] { color: var(--accent); }
.nfc-step-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.nfc-step-actions .danger { color: #ff9aa5; }
.nfc-unit-list-heading {
  display: flex; justify-content: space-between; align-items: end; gap: 12px;
  margin: 26px 0 10px;
}
.nfc-unit-list-heading > div { display: grid; gap: 2px; }
.nfc-unit-list-heading span { color: #8494a6; font-size: .82rem; }
.nfc-unit-link-list { display: grid; gap: 8px; }
.nfc-unit-link-row {
  width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) auto;
  align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #283548;
  border-radius: 13px; background: #10161f; color: #e9f0f6; text-align: left;
}
.nfc-unit-link-row:hover, .nfc-unit-link-row.active {
  border-color: #3c6d83; background: rgba(56,189,248,.05);
}
.nfc-unit-link-row.linked .nfc-unit-state { color: var(--nfc-good); }
.nfc-unit-link-row.skipped .nfc-unit-state { color: var(--nfc-warn); }
.nfc-unit-row-copy { display: grid; min-width: 0; }
.nfc-unit-row-copy strong, .nfc-unit-row-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nfc-unit-row-copy small { margin-top: 2px; color: #8191a3; }
.nfc-unit-tag { color: #8293a5; font-size: .76rem; text-align: right; }
.nfc-play-wrap { min-height: calc(100svh - 190px); }
.nfc-play-hero {
  min-height: calc(100svh - 230px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  max-width: 650px; margin: 0 auto; padding: 24px 0 60px;
}
.nfc-play-hero h1 {
  margin: 7px 0 10px; font-size: clamp(2.5rem, 10vw, 5.8rem);
  line-height: .92; letter-spacing: -.05em;
}
.nfc-play-hero > p:not(.eyebrow) {
  max-width: 520px; color: #95a5b5; line-height: 1.55;
}
.nfc-play-count {
  margin: 12px 0 18px; padding: 7px 11px; border: 1px solid #2d3b4d;
  border-radius: 999px; color: #9aabba; font-size: .8rem;
}
.nfc-scan-toggle { min-width: min(320px, 100%); margin-top: 8px; }
.nfc-play-status { min-height: 24px; margin-top: 16px; color: #899aaa; }
.nfc-play-status[data-kind="bad"] { color: var(--nfc-bad); }
.nfc-play-fallback {
  width: min(430px, 100%); margin-top: 24px; text-align: left;
  border-top: 1px solid #263344; padding-top: 14px; color: #8292a4;
}
.nfc-play-fallback summary { cursor: pointer; text-align: center; }
.nfc-play-fallback > div {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 8px; margin-top: 12px;
}
.nfc-scan-rings {
  width: 128px; height: 128px; position: relative; display: grid;
  place-items: center; margin-bottom: 22px;
}
.nfc-scan-rings span {
  position: absolute; inset: 0; border: 1px solid rgba(56,189,248,.35);
  border-radius: 50%; animation: nfcPulse 2.6s ease-out infinite;
}
.nfc-scan-rings span:nth-child(2) { animation-delay: 1.3s; }
.nfc-scan-rings strong {
  width: 72px; height: 72px; display: grid; place-items: center;
  border: 1px solid #3b7189; border-radius: 50%;
  background: rgba(56,189,248,.08); color: var(--accent); font-size: 1.8rem;
}
@keyframes nfcPulse {
  0% { transform: scale(.5); opacity: 0; }
  20% { opacity: .9; }
  100% { transform: scale(1.2); opacity: 0; }
}
.nfc-play-detail { max-width: 1180px; margin: 0 auto; }
.nfc-back-button { margin-bottom: 12px; }
#nfcDatasheetHost #detailCard { display: block; min-height: auto; }
body.nfc-edition #nfcDatasheetHost .detail-panel { min-height: auto; }

@media (max-width: 760px) {
  body.nfc-edition .app-shell { padding-bottom: 28px; }
  body.nfc-edition .nfc-nav {
    grid-template-columns: repeat(3, minmax(0,1fr)); position: sticky;
    top: 0; z-index: 35; max-width: none;
  }
  .nfc-setup-hero { align-items: flex-start; }
  .nfc-progress-summary { min-width: 86px; padding: 10px 12px; }
  .nfc-platform-note { display: grid; gap: 5px; }
  .nfc-link-actions { grid-template-columns: 1fr; }
  .nfc-current-unit h2 { font-size: clamp(2rem, 11vw, 3.6rem); }
  .nfc-unit-link-row { grid-template-columns: 24px minmax(0,1fr); }
  .nfc-unit-tag { grid-column: 2; text-align: left; }
  .nfc-play-wrap { min-height: calc(100svh - 140px); }
  .nfc-play-hero { min-height: calc(100svh - 170px); padding-bottom: 30px; }
}


/* NFC edition owns its navigation layout completely.
   Keep these selectors deliberately specific so legacy Tabletop Voice
   desktop/mobile nav rules cannot squeeze the three-stage flow. */
body.nfc-edition nav#appNav.nfc-nav {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 max(16px, calc((100vw - 900px) / 2)) !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
}

body.nfc-edition nav#appNav.nfc-nav > .app-nav-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: .76rem !important;
  white-space: nowrap !important;
  border-radius: 0 !important;
}

@media (max-width: 760px) {
  body.nfc-edition nav#appNav.nfc-nav {
    padding: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.nfc-edition nav#appNav.nfc-nav > .app-nav-button {
    min-height: 52px !important;
    padding: 4px 6px !important;
    flex-direction: column !important;
    gap: 2px !important;
    font-size: .62rem !important;
  }
}


/* === Minimal Smart Tokens v3 === */
body.nfc-edition #gameSystemModal,
body.nfc-edition #firstRunModal,
body.nfc-edition .buy-coffee-header,
body.nfc-edition #welcome .setup-hero,
body.nfc-edition #welcome .setup-system-strip,
body.nfc-edition #welcome .setup-import-grid,
body.nfc-edition #welcome .setup-loaded-lists,
body.nfc-edition #welcome .full-data-army-section,
body.nfc-edition #welcome .setup-footer-actions {
  display: none !important;
}

body.nfc-edition .topbar {
  min-height: 58px;
  padding: 10px clamp(14px, 3vw, 28px);
}

body.nfc-edition .brand-mark { width: 34px; height: 34px; }
body.nfc-edition .brand small { font-size: .58rem; }

body.nfc-edition .app-main {
  width: min(900px, 100%);
  padding: clamp(14px, 3vw, 26px);
}

.nfc-home {
  min-height: calc(100svh - 110px);
  display: grid;
  align-content: center;
  gap: 26px;
}
.nfc-home-title {
  width: min(620px, 100%);
  margin: 0 auto;
  text-align: center;
}
.nfc-beta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  margin-bottom: 10px;
  border: 1px solid rgba(120, 215, 162, .42);
  border-radius: 999px;
  background: rgba(120, 215, 162, .08);
  color: #78d7a2;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .11em;
}
.nfc-home h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(2.2rem, 7vw, 4rem);
  letter-spacing: -.045em;
}
.nfc-product-copy {
  margin: 7px auto 0;
  color: #c1ced7;
  font-size: clamp(.9rem, 3vw, 1.05rem);
  font-weight: 700;
}
.nfc-beta-copy {
  max-width: 560px;
  margin: 12px auto 0;
  color: #8fa0af;
  font-size: clamp(.78rem, 2.8vw, .92rem);
  line-height: 1.5;
}
.nfc-home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.nfc-home-actions button {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #2e3b49;
  background: #111820;
  color: #eef5f8;
  cursor: pointer;
}
.nfc-home-actions button:hover { border-color: var(--accent-strong); background: #14202a; }
.nfc-home-actions button > span { color: var(--accent); font-size: 2rem; }
.nfc-home-actions button strong { font-size: 1.25rem; }
.nfc-home-actions button small { min-height: 1em; color: #748596; font-size: .72rem; }

.nfc-minimal-import,
.nfc-setup-minimal,
.nfc-setup-done,
.nfc-simple-empty,
.nfc-play-minimal {
  width: min(620px, 100%);
  margin: 0 auto;
}

.nfc-simple-page-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.nfc-simple-page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.6rem);
  letter-spacing: -.04em;
}
.nfc-simple-page-head > span {
  margin-left: auto;
  color: #7f90a1;
  font-weight: 800;
}
.nfc-home-back {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #9aabba;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.nfc-home-back:hover { color: var(--accent); }

.nfc-game-select {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.nfc-game-select span {
  color: #77899b;
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nfc-game-select select,
.nfc-simple-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #344454;
  border-radius: 2px;
  background: #0e141b;
  color: #edf4f7;
  padding: 12px 14px;
  font: inherit;
}
textarea.nfc-simple-input { min-height: 100px; resize: vertical; }
.nfc-simple-import-card {
  display: grid;
  gap: 9px;
  padding-top: 6px;
}
.nfc-simple-import-card .large { min-height: 54px; }
.nfc-import-or {
  color: #647586;
  text-align: center;
  font-size: .72rem;
  text-transform: uppercase;
}
.nfc-imported-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #283541;
  color: #78d7a2;
}
.nfc-clear-link,
.nfc-text-button {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: transparent;
  color: #718293;
  padding: 7px;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
}
.nfc-clear-link:hover,
.nfc-text-button:hover { color: var(--accent); }

.nfc-setup-minimal {
  min-height: calc(100svh - 180px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nfc-unit-name { text-align: center; margin: 12px 0 28px; }
.nfc-unit-name small { color: #708294; }
.nfc-unit-name h1 {
  margin: 6px 0 0;
  font-size: clamp(2.6rem, 10vw, 5.5rem);
  line-height: .92;
  letter-spacing: -.055em;
}
.nfc-main-link-button {
  width: min(360px, 100%);
  min-height: 60px;
  margin: 0 auto;
}
.nfc-linked-badge,
.nfc-skipped-badge {
  align-self: center;
  margin: -12px auto 18px;
  font-size: .8rem;
  font-weight: 850;
}
.nfc-linked-badge { color: var(--nfc-good); }
.nfc-skipped-badge { color: var(--nfc-warn); }
.nfc-status-line {
  min-height: 22px;
  text-align: center;
  margin-top: 12px;
  font-size: .8rem;
}
.nfc-manual-link {
  width: min(420px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
}
.nfc-minimal-step-actions {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  width: min(360px,100%);
  margin: 22px auto 0;
}
.nfc-minimal-step-actions button {
  min-height: 42px;
  border: 1px solid #2d3a47;
  background: #10161d;
  color: #8798a8;
  cursor: pointer;
}
.nfc-minimal-step-actions button:hover { border-color: #4b6577; color: #dce9ef; }

.nfc-setup-done,
.nfc-simple-empty,
.nfc-play-minimal {
  min-height: calc(100svh - 180px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.nfc-setup-done .nfc-home-back,
.nfc-simple-empty .nfc-home-back,
.nfc-play-minimal .nfc-home-back {
  position: absolute;
  top: 88px;
  left: max(16px, calc((100vw - 620px) / 2));
}
.nfc-done-mark {
  color: var(--nfc-good);
  font-size: 3rem;
  margin-bottom: 8px;
}
.nfc-setup-done h1,
.nfc-simple-empty h1,
.nfc-play-minimal h1 {
  margin: 0 0 22px;
  font-size: clamp(2.4rem, 9vw, 5rem);
  letter-spacing: -.05em;
}
.nfc-setup-done .large,
.nfc-simple-empty .large { min-width: 220px; }

.nfc-play-minimal .nfc-scan-rings { margin-bottom: 20px; }
.nfc-play-minimal .nfc-play-status { min-height: 20px; margin-top: 12px; }
.nfc-play-minimal .nfc-manual-link { margin-top: 12px; }

@media (max-width: 620px) {
  .nfc-home-actions { grid-template-columns: 1fr; }
  .nfc-home-actions button {
    min-height: 112px;
    grid-template-columns: 42px 1fr auto;
    align-content: center;
    justify-items: start;
    padding: 18px;
    text-align: left;
  }
  .nfc-home-actions button > span { grid-row: 1 / 3; }
  .nfc-home-actions button strong { align-self: end; }
  .nfc-home-actions button small { align-self: start; }
  body.nfc-edition .nfc-nav > .app-nav-button {
    flex-direction: row !important;
    font-size: .68rem !important;
  }
}

body.nfc-edition #appNav:not(.nfc-nav) { display:none !important; }


/* === Functional minimal import v5 === */
body.nfc-edition #welcome .setup-import-grid.nfc-real-import-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: min(620px, 100%) !important;
  margin: 14px auto 0 !important;
}

body.nfc-edition #welcome .setup-import-grid.nfc-real-import-grid .setup-import-card {
  width: 100% !important;
}

body.nfc-edition #welcome .setup-import-grid.nfc-real-import-grid .setup-import-card:not(.hidden) {
  display: grid !important;
}

body.nfc-edition #welcome .setup-import-grid.nfc-real-import-grid .setup-import-card.hidden {
  display: none !important;
}

body.nfc-edition #welcome .setup-import-card.nfc-real-import-card {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 8px !important;
}

body.nfc-edition #welcome .setup-import-card.nfc-real-import-card > .section-label,
body.nfc-edition #welcome .setup-import-card.nfc-real-import-card > h2,
body.nfc-edition #welcome .setup-import-card.nfc-real-import-card > p,
body.nfc-edition #welcome .setup-import-card.nfc-real-import-card > small {
  display: none !important;
}

body.nfc-edition #welcome .setup-import-card.nfc-real-import-card .setup-main-action,
body.nfc-edition #welcome .setup-import-card.nfc-real-import-card .primary-button.large,
body.nfc-edition #welcome .setup-import-card.nfc-real-import-card .ghost-button.large {
  min-height: 54px !important;
  width: 100% !important;
}

body.nfc-edition #welcome .opr-import-controls,
body.nfc-edition #welcome .dnd-beyond-import-controls,
body.nfc-edition #welcome .necromunda-import-controls,
body.nfc-edition #welcome .li-community-import-controls {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
}

body.nfc-edition #welcome .opr-import-actions,
body.nfc-edition #welcome .li-community-import-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

body.nfc-edition #welcome .opr-import-controls textarea,
body.nfc-edition #welcome .opr-import-controls input,
body.nfc-edition #welcome .dnd-beyond-import-controls input,
body.nfc-edition #welcome .necromunda-import-controls input,
body.nfc-edition #welcome .li-community-import-controls textarea {
  width: 100% !important;
  min-height: 50px !important;
}

body.nfc-edition #welcome .setup-loaded-lists.nfc-real-loaded-lists {
  display: block !important;
  width: min(620px,100%) !important;
  margin: 18px auto 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid #26313b !important;
}

body.nfc-edition #welcome .setup-loaded-lists.nfc-real-loaded-lists > .section-label {
  display: none !important;
}

body.nfc-edition #welcome .setup-loaded-lists.nfc-real-loaded-lists .data-roster-summary {
  margin: 0 !important;
}

body.nfc-edition #welcome .setup-loaded-lists.nfc-real-loaded-lists .data-summary-row {
  padding: 10px 12px !important;
}

body.nfc-edition #welcome .setup-loaded-lists.nfc-real-loaded-lists .data-summary-row small {
  display: none !important;
}

body.nfc-edition #welcome .setup-import-grid.nfc-real-import-grid { display:grid !important; }
body.nfc-edition #welcome .setup-loaded-lists.nfc-real-loaded-lists { display:block !important; }


/* === NFC list selection + linking workspace v6 === */
body.nfc-edition #welcome .setup-loaded-lists { display:none !important; }

.nfc-import-list-picker {
  width: min(620px, 100%);
  margin: 26px auto 0;
}
.nfc-import-list-title {
  margin-bottom: 10px;
  color: #8ca0b2;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nfc-import-system-group + .nfc-import-system-group { margin-top: 18px; }
.nfc-import-system-group h3 {
  margin: 0 0 7px;
  color: #718496;
  font-size: .74rem;
  font-weight: 800;
}
.nfc-imported-list-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 13px;
  border: 1px solid #2c3946;
  border-radius: 2px;
  background: #10171e;
  color: #e8eff3;
  text-align: left;
  cursor: pointer;
}
.nfc-imported-list-button + .nfc-imported-list-button { margin-top: 6px; }
.nfc-imported-list-button:hover {
  border-color: var(--accent-strong);
  background: #13202a;
}
.nfc-imported-list-button > span:first-child { min-width:0; display:grid; gap:2px; }
.nfc-imported-list-button strong,
.nfc-imported-list-button small {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.nfc-imported-list-button small { color:#748697; }
.nfc-imported-list-button > span:last-child { color:var(--accent); font-size:.78rem; }

.nfc-setup-workspace { width:min(720px,100%); margin:0 auto; padding-bottom:40px; }
.nfc-setup-selectors {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:14px;
}
.nfc-setup-selectors label { display:grid; gap:5px; }
.nfc-setup-selectors label > span {
  color:#728496;
  font-size:.62rem;
  font-weight:850;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.nfc-setup-selectors select {
  width:100%;
  min-height:46px;
  border:1px solid #344453;
  border-radius:2px;
  background:#0e141b;
  color:#edf4f7;
  padding:9px 11px;
  font:inherit;
}

.nfc-active-unit-card {
  position:relative;
  min-height:280px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:30px 18px;
  margin-bottom:24px;
  overflow:hidden;
  border:1px solid #31404e;
  background:#101820;
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}
.nfc-active-unit-card.found {
  border-color:rgba(80,216,144,.75);
  background:rgba(80,216,144,.08);
  transform:scale(1.008);
}
.nfc-active-unit-count {
  position:absolute;
  top:12px;
  right:14px;
  color:#718394;
  font-size:.72rem;
  font-weight:800;
}
.nfc-active-unit-card h2 {
  max-width:620px;
  margin:0;
  font-size:clamp(2.2rem,8vw,4.6rem);
  line-height:.95;
  letter-spacing:-.05em;
}
.nfc-active-unit-card p {
  margin:12px 0 14px;
  color:#91a3b4;
  font-size:1rem;
}
.nfc-active-unit-card.found p { color:var(--nfc-good); font-weight:800; }
.nfc-search-state {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#94a6b6;
  font-size:.82rem;
  font-weight:750;
}
.nfc-search-dot {
  width:8px; height:8px; border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 0 rgba(56,189,248,.35);
  animation:nfcSearchPulse 1.4s infinite;
}
@keyframes nfcSearchPulse {
  0% { box-shadow:0 0 0 0 rgba(56,189,248,.36); }
  70% { box-shadow:0 0 0 9px rgba(56,189,248,0); }
  100% { box-shadow:0 0 0 0 rgba(56,189,248,0); }
}
.nfc-found-tick {
  width:88px;
  height:88px;
  display:grid;
  place-items:center;
  margin-top:4px;
  border:2px solid var(--nfc-good);
  border-radius:50%;
  color:var(--nfc-good);
  font-size:3rem;
  font-weight:900;
  animation:nfcFoundPop .35s cubic-bezier(.2,.9,.3,1.35);
}
@keyframes nfcFoundPop {
  from { transform:scale(.4); opacity:0; }
  to { transform:scale(1); opacity:1; }
}
.nfc-start-linking { min-width:min(300px,100%); margin-top:8px; }
.nfc-write-blank { margin-top:2px; }
.nfc-linked-badge { margin-top:10px; }

.nfc-unit-categories { display:grid; gap:18px; }
.nfc-unit-category h3 {
  margin:0 0 7px;
  color:#8396a8;
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.nfc-category-units { display:grid; gap:5px; }
.nfc-setup-unit-row {
  width:100%;
  min-height:48px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 28px;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  border:1px solid #283642;
  border-radius:2px;
  background:#0f161d;
  color:#dce6ec;
  text-align:left;
  cursor:pointer;
}
.nfc-setup-unit-row:hover { border-color:#456172; }
.nfc-setup-unit-row.active {
  border-color:var(--accent-strong);
  background:rgba(56,189,248,.07);
}
.nfc-setup-unit-row.linked > span:last-child { color:var(--nfc-good); font-weight:900; }

@media (max-width:620px) {
  .nfc-setup-selectors { grid-template-columns:1fr; }
  .nfc-active-unit-card { min-height:240px; padding-inline:14px; }
  .nfc-active-unit-card h2 { font-size:clamp(2rem,12vw,3.5rem); }
}


/* === Setup copy + Play scanning v7 === */
.nfc-active-unit-card .nfc-tap-instruction {
  order: 0;
  margin: 0 0 10px;
  color: #8fa2b4;
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  font-weight: 650;
}
.nfc-active-unit-card h2 { order: 1; }
.nfc-active-unit-card .nfc-search-state-large {
  order: 2;
  margin-top: 24px;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.035em;
  color: #e9f3f7;
}
.nfc-active-unit-card .nfc-start-linking,
.nfc-active-unit-card .nfc-write-blank,
.nfc-active-unit-card .nfc-linked-badge,
.nfc-active-unit-card .nfc-status-line,
.nfc-active-unit-card [data-stop-linking],
.nfc-active-unit-card .nfc-found-tick {
  order: 3;
}
.nfc-active-unit-card.found .nfc-tap-instruction {
  color: var(--nfc-good);
}
.nfc-play-workspace {
  width: min(720px, 100%);
  margin: 0 auto;
}
.nfc-play-selectors { margin-bottom: 12px; }
.nfc-play-workspace .nfc-play-minimal {
  min-height: calc(100svh - 330px);
}
.nfc-play-workspace .nfc-play-minimal h1 {
  margin-bottom: 8px;
}
.nfc-play-retry {
  margin-top: 12px;
}


/* === Smart Tokens compact play pass v9 === */
body.nfc-edition .topbar {
  display: none !important;
}

body.nfc-edition[data-nfc-page="play"] nav#appNav.nfc-nav {
  display: none !important;
}

body.nfc-edition[data-nfc-page="play"] .app-main {
  width: min(900px, 100%);
  padding-top: 8px;
}

.nfc-play-toolbar {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin-bottom: 6px;
}

.nfc-play-toolbar .nfc-home-back {
  width: 36px;
  height: 44px;
  margin: 0;
}

.nfc-play-toolbar .nfc-play-selectors {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px;
  margin: 0;
}

.nfc-play-toolbar .nfc-play-selectors label {
  gap: 3px;
}

.nfc-play-toolbar .nfc-play-selectors label > span {
  font-size: .58rem;
}

.nfc-play-toolbar .nfc-play-selectors select {
  min-height: 40px;
  padding: 7px 9px;
}

.nfc-play-workspace .nfc-play-minimal {
  min-height: calc(100svh - 92px);
}

body.nfc-edition.nfc-detail-open .app-main {
  padding-top: 4px;
}

body.nfc-edition.nfc-detail-open #nfcBackToScanner {
  position: sticky;
  top: 4px;
  z-index: 20;
  min-height: 34px;
  margin: 0 0 6px;
  padding: 5px 10px;
  background: rgba(11, 13, 17, .92);
  backdrop-filter: blur(8px);
}

body.nfc-edition.nfc-detail-open #nfcDatasheetHost .unit-context-bar {
  margin-top: 0;
}

.detail-card.is-destroyed {
  background:
    linear-gradient(rgba(115, 16, 24, .22), rgba(115, 16, 24, .22)),
    var(--panel, #111720);
  border-color: rgba(255, 90, 105, .58) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 90, 105, .16);
}

.detail-card.is-destroyed .detail-heading,
.detail-card.is-destroyed .unit-health-tracker {
  background: rgba(150, 22, 34, .12);
}

.detail-card.is-destroyed #detailName {
  color: #ff9aa4;
}

@media (orientation: landscape) and (max-width: 1100px) {
  body.nfc-edition::before {
    content: "Rotate device to portrait";
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #0b0d11;
    color: #eef5f8;
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    font-weight: 800;
    text-align: center;
  }
  body.nfc-edition > * {
    visibility: hidden;
  }
}


/* === View List + focused Play datasheet v10 === */

/* Four primary Smart Token modes stay visible, including during Play. */
body.nfc-edition nav#appNav.nfc-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.nfc-edition[data-nfc-page="play"] nav#appNav.nfc-nav {
  display: grid !important;
}

/* View List reuses the original Tabletop Voice list browser and voice search. */
body.nfc-edition[data-nfc-page="view-list"] .app-main {
  width: min(1180px, 100%);
}

body.nfc-edition[data-nfc-page="view-list"] #voiceDock:not(.hidden) {
  display: block !important;
}

body.nfc-edition[data-nfc-page="view-list"] #pageDatasheets {
  padding-bottom: 110px;
}

/* Play datasheets: navigation first, then immediately the unit title. */
body.nfc-edition.nfc-detail-open #nfcDatasheetHost .unit-context-bar,
body.nfc-edition.nfc-detail-open #nfcDatasheetHost #focusButton,
body.nfc-edition.nfc-detail-open #nfcDatasheetHost #pinButton,
body.nfc-edition.nfc-detail-open #nfcDatasheetHost #detailType {
  display: none !important;
}

body.nfc-edition.nfc-detail-open #nfcDatasheetHost .detail-heading {
  margin-top: 0 !important;
  padding-top: 8px !important;
}

body.nfc-edition.nfc-detail-open #nfcDatasheetHost .detail-title-copy h2 {
  margin-top: 0 !important;
}

/* Footer state controls live with damage tracking, above Keywords. */
.nfc-play-status-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nfc-play-status-controls .unit-state-toggle {
  min-height: 38px;
}

.nfc-play-status-controls .unit-state-toggle.active {
  border-color: rgba(247, 200, 91, .65);
  background: rgba(247, 200, 91, .12);
  color: #ffe3a0;
}

@media (max-width: 760px) {
  body.nfc-edition nav#appNav.nfc-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.nfc-edition nav#appNav.nfc-nav > .app-nav-button {
    padding-inline: 3px !important;
    font-size: .58rem !important;
  }

  .nfc-home-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nfc-play-status-row {
    align-items: flex-start;
  }

  .nfc-play-status-controls {
    justify-content: flex-start;
  }
}

@media (min-width: 761px) {
  .nfc-home-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* === ArmyTag layout + game selector fixes v15 === */
.nfc-home {
  min-height: 0 !important;
  align-content: start !important;
  padding-top: clamp(34px, 6vh, 74px);
  padding-bottom: 48px;
}

.nfc-setup-page-head {
  padding-left: 0;
}

.nfc-view-list-controls {
  width: min(1180px, 100%);
  margin: 6px auto 22px;
}

.nfc-view-list-controls label {
  display: grid;
  gap: 6px;
  width: min(420px, 100%);
}

.nfc-view-list-controls label > span {
  color: #77899b;
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nfc-view-list-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #344454;
  border-radius: 2px;
  background: #0e141b;
  color: #edf4f7;
  padding: 10px 12px;
  font: inherit;
}

@media (max-width: 760px) {
  .nfc-home {
    padding-top: 28px;
  }
  .nfc-view-list-controls {
    margin-top: 0;
    margin-bottom: 16px;
  }
}


/* === Imported-game View List + universal Reset Game v16 === */
.nfc-view-list-select-row {
  display: flex;
  align-items: end;
  gap: 10px;
}

.nfc-view-list-select-row label {
  flex: 1 1 320px;
}

.nfc-reset-game-button {
  min-height: 48px;
  padding-inline: 18px;
  white-space: nowrap;
  border-color: rgba(220, 100, 100, .45) !important;
  color: #e4a0a0 !important;
}

.nfc-reset-game-button:hover {
  border-color: rgba(240, 120, 120, .8) !important;
  color: #ffd0d0 !important;
}

.nfc-play-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.nfc-no-imported-games {
  color: #8294a5;
  font-size: .85rem;
}

@media (max-width: 620px) {
  .nfc-view-list-select-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nfc-view-list-select-row label {
    flex-basis: auto;
  }

  .nfc-reset-game-button {
    width: 100%;
  }
}


/* === QR list sharing on Import v17 === */
.nfc-share-toggle {
  width: 100%;
  min-height: 48px;
  margin: 0 0 14px;
}

.nfc-import-share-host {
  width: min(620px, 100%);
  margin: 18px auto 28px;
}

.nfc-import-share-host.collapsed {
  display: none;
}

.nfc-import-share-card {
  width: 100%;
  margin: 0;
}

.nfc-import-share-card #removeShareRosterButton {
  display: none !important;
}

.nfc-import-share-card .share-roster-picker {
  grid-template-columns: 1fr !important;
}

.nfc-import-share-card .app-share-qr-panel {
  margin-top: 18px;
}

.nfc-import-share-card .app-share-qr-code {
  margin-inline: auto;
}

.nfc-share-received-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 215, 162, .38);
  background: rgba(120, 215, 162, .08);
  color: #91e3b5;
  font-weight: 800;
  font-size: .82rem;
}


/* === Persistent Play scanning + View List reset footer v18 === */
.nfc-play-actions {
  display: none !important;
}

.nfc-view-list-reset-footer {
  width: min(1180px, 100%);
  margin: 36px auto 110px;
  padding-top: 22px;
  border-top: 1px solid rgba(110, 130, 145, .22);
  display: grid;
  justify-items: start;
  gap: 8px;
}

.nfc-view-list-reset-footer .nfc-reset-game-button {
  min-width: 160px;
}

.nfc-view-list-reset-footer small {
  color: #748696;
  font-size: .74rem;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .nfc-view-list-reset-footer {
    margin-top: 28px;
    margin-bottom: 120px;
  }

  .nfc-view-list-reset-footer .nfc-reset-game-button {
    width: 100%;
  }
}


/* === Strict portrait fallback v20 === */
@media (orientation: landscape) and (max-width: 1100px) {
  html,
  body.nfc-edition {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
  }

  body.nfc-edition {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
  }

  body.nfc-edition::before {
    visibility: visible !important;
    pointer-events: all !important;
  }
}
