/* src/index.css */
:root {
  --bg: #eef1f0;
  --surface: #ffffff;
  --soft: #f4f6f5;
  --text: #15201d;
  --muted: #68746f;
  --border: #d8dfdc;
  --border-strong: #b9c5c0;
  --accent: #1f7a8c;
  --accent-strong: #155866;
  --sans:
    Inter,
    ui-sans-serif,
    system-ui,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
}
button:hover:not(:disabled) {
  border-color: var(--accent);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button.primary,
.search-form button {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
button.primary:hover:not(:disabled),
.search-form button:hover:not(:disabled) {
  background: var(--accent-strong);
}
button.secondary {
  background: var(--soft);
}
button.active-soft {
  border-color: var(--accent);
  color: var(--accent-strong);
}
label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  text-transform: uppercase;
}
input,
select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  min-height: 42px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}
input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid rgba(31, 122, 140, 0.35);
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.05;
}
h2 {
  font-size: 19px;
  line-height: 1.2;
}
img {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111614;
    --surface: #18211e;
    --soft: #202b27;
    --text: #edf3f0;
    --muted: #a9b4af;
    --border: #2c3934;
    --border-strong: #40514b;
    --accent: #4fb1bf;
    --accent-strong: #3f99a6;
  }
}
:root[data-card-vault-skin=vault] {
  color-scheme: dark;
  --bg: #111614;
  --surface: #18211e;
  --soft: #202b27;
  --text: #edf3f0;
  --muted: #a9b4af;
  --border: #2c3934;
  --border-strong: #40514b;
  --accent: #4fb1bf;
  --accent-strong: #3f99a6;
}
:root[data-card-vault-skin=mana] {
  color-scheme: dark;
  --bg: #111419;
  --surface: #1b211f;
  --soft: #242c27;
  --text: #f2f4ed;
  --muted: #b5bba8;
  --border: #39443d;
  --border-strong: #596556;
  --accent: #d8b85f;
  --accent-strong: #997c32;
}
:root[data-card-vault-skin=pokemon] {
  color-scheme: light;
  --bg: #eef4fb;
  --surface: #ffffff;
  --soft: #e6f0fb;
  --text: #162136;
  --muted: #5a6980;
  --border: #cbd9ea;
  --border-strong: #91aacb;
  --accent: #2d72d9;
  --accent-strong: #f0b429;
}
:root[data-card-vault-skin=binder] {
  color-scheme: light;
  --bg: #f1ede4;
  --surface: #fffaf0;
  --soft: #f7efdf;
  --text: #2b241c;
  --muted: #756a5b;
  --border: #d7c9b4;
  --border-strong: #aa9678;
  --accent: #8a5a33;
  --accent-strong: #5f3b21;
}
:root[data-card-vault-skin=arcade] {
  color-scheme: dark;
  --bg: #090914;
  --surface: #15162a;
  --soft: #1f2140;
  --text: #f8f7ff;
  --muted: #b7b8de;
  --border: #373a66;
  --border-strong: #565a8f;
  --accent: #ff58c7;
  --accent-strong: #2dd4ff;
}
:root[data-card-vault-skin=parchment] {
  color-scheme: light;
  --bg: #eee2c4;
  --surface: #fbf0d2;
  --soft: #f4e2b9;
  --text: #2f2613;
  --muted: #6f5e39;
  --border: #d1b678;
  --border-strong: #9f803b;
  --accent: #7e4f1d;
  --accent-strong: #4b2e10;
}
:root[data-card-vault-skin=midnight] {
  color-scheme: dark;
  --bg: #080d10;
  --surface: #101a1d;
  --soft: #172529;
  --text: #ecfffb;
  --muted: #9fc7be;
  --border: #254247;
  --border-strong: #35676f;
  --accent: #52f0c8;
  --accent-strong: #2b8a7a;
}

/* src/App.css */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 24px;
}
.desktop-shell {
  background-color: var(--bg);
  isolation: isolate;
  overflow-x: hidden;
  position: relative;
}
.desktop-shell > * {
  position: relative;
  z-index: 1;
}
.app-body {
  align-items: start;
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  grid-template-columns: 84px minmax(0, 1360px) 84px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1548px;
  width: 100%;
}
.app-content {
  min-width: 0;
  width: 100%;
}
.scan-results-empty {
  display: none;
}
.desktop-shell .scan-results-empty {
  display: none !important;
}
.topbar,
.workspace,
.button-row,
.search-form,
.panel-heading,
.collection-heading,
.stats-strip,
.icon-actions,
.item-title-row,
.scan-output-header {
  display: flex;
}
.topbar {
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto 14px;
  max-width: 1360px;
  width: 100%;
}
.brand-heading {
  align-items: center;
  display: flex;
  gap: 13px;
}
.brand-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.brand-title-row .brand-badge {
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}
.brand-title-row .version-badge {
  border-color: var(--line);
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}
.brand-icon {
  border-radius: 8px;
  flex: 0 0 auto;
  height: 58px;
  width: 58px;
}
.topbar-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}
.desktop-shell .topbar {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.desktop-shell .brand-heading {
  align-self: end;
  margin-top: 22px;
  min-width: 0;
}
.desktop-shell .topbar-actions {
  align-self: start;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  max-width: min(48vw, 430px);
}
.skin-picker {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  padding: 6px 8px;
}
.skin-picker span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.skin-picker select {
  background: var(--soft);
  min-height: 31px;
  min-width: 142px;
  padding: 4px 28px 4px 8px;
}
:root[data-card-vault-skin=vault] {
  --brand-symbol-blend: soft-light;
  --brand-symbol-filter: saturate(0.95) contrast(1.08);
  --brand-symbol-opacity: 0.42;
  --skin-scatter: none;
  --skin-scatter-position: 18px 12px;
  --skin-scatter-size: 230px 230px;
  --skin-scatter-opacity: 0;
  --skin-glow:
    radial-gradient(
      circle at 12% 18%,
      rgba(79, 177, 191, 0.18),
      transparent 27%),
    radial-gradient(
      circle at 90% 78%,
      rgba(63, 153, 166, 0.14),
      transparent 31%);
}
:root[data-card-vault-skin=mana] {
  --brand-symbol-blend: screen;
  --brand-symbol-filter: saturate(0.82) sepia(0.1) contrast(1.05);
  --brand-symbol-opacity: 0.34;
  --skin-scatter: none;
  --skin-scatter-position: 18px 18px;
  --skin-scatter-size: 360px 280px;
  --skin-scatter-opacity: 0;
  --skin-glow:
    radial-gradient(
      circle at 14% 20%,
      rgba(216, 184, 95, 0.18),
      transparent 28%),
    radial-gradient(
      circle at 86% 66%,
      rgba(122, 166, 111, 0.15),
      transparent 31%);
}
:root[data-card-vault-skin=pokemon] {
  --brand-symbol-blend: luminosity;
  --brand-symbol-filter: saturate(1.18) contrast(1.05);
  --brand-symbol-opacity: 0.32;
  --skin-scatter: none;
  --skin-scatter-position: 10px 18px;
  --skin-scatter-size: 210px 210px;
  --skin-scatter-opacity: 0;
  --skin-glow:
    radial-gradient(
      circle at 18% 14%,
      rgba(45, 114, 217, 0.18),
      transparent 28%),
    radial-gradient(
      circle at 84% 18%,
      rgba(240, 180, 41, 0.18),
      transparent 25%),
    radial-gradient(
      circle at 78% 82%,
      rgba(45, 114, 217, 0.12),
      transparent 32%);
}
:root[data-card-vault-skin=binder] {
  --brand-symbol-blend: multiply;
  --brand-symbol-filter: saturate(0.75) sepia(0.28) contrast(1.02);
  --brand-symbol-opacity: 0.22;
  --skin-scatter: none;
  --skin-scatter-position: 12px 0;
  --skin-scatter-size: 230px 230px;
  --skin-scatter-opacity: 0;
  --skin-glow:
    radial-gradient(
      circle at 15% 18%,
      rgba(138, 90, 51, 0.12),
      transparent 28%),
    radial-gradient(
      circle at 86% 70%,
      rgba(215, 201, 180, 0.22),
      transparent 33%);
}
:root[data-card-vault-skin=arcade] {
  --brand-symbol-blend: screen;
  --brand-symbol-filter: saturate(1.5) hue-rotate(10deg) contrast(1.12);
  --brand-symbol-opacity: 0.5;
  --skin-scatter: none;
  --skin-scatter-position: 14px 8px;
  --skin-scatter-size: 360px 260px;
  --skin-scatter-opacity: 0;
  --skin-glow:
    radial-gradient(
      circle at 20% 10%,
      rgba(255, 88, 199, 0.18),
      transparent 28%),
    radial-gradient(
      circle at 80% 12%,
      rgba(45, 212, 255, 0.17),
      transparent 30%),
    radial-gradient(
      circle at 70% 82%,
      rgba(255, 88, 199, 0.1),
      transparent 32%);
}
:root[data-card-vault-skin=parchment] {
  --brand-symbol-blend: multiply;
  --brand-symbol-filter: sepia(0.58) saturate(0.76) contrast(0.95);
  --brand-symbol-opacity: 0.24;
  --skin-scatter: none;
  --skin-scatter-position: 20px 16px;
  --skin-scatter-size: 240px 240px;
  --skin-scatter-opacity: 0;
  --skin-glow:
    radial-gradient(
      circle at 15% 18%,
      rgba(126, 79, 29, 0.13),
      transparent 30%),
    radial-gradient(
      circle at 88% 70%,
      rgba(159, 128, 59, 0.16),
      transparent 36%);
}
:root[data-card-vault-skin=midnight] {
  --brand-symbol-blend: screen;
  --brand-symbol-filter: saturate(0.95) hue-rotate(22deg) contrast(1.08);
  --brand-symbol-opacity: 0.36;
  --skin-scatter: none;
  --skin-scatter-position: 22px 20px;
  --skin-scatter-size: 210px 210px;
  --skin-scatter-opacity: 0;
  --skin-glow:
    radial-gradient(
      circle at 20% 18%,
      rgba(82, 240, 200, 0.16),
      transparent 27%),
    radial-gradient(
      circle at 82% 76%,
      rgba(53, 103, 111, 0.2),
      transparent 35%);
}
:root[data-card-vault-skin=arcade] .desktop-shell .collection-panel,
:root[data-card-vault-skin=arcade] .desktop-shell .tool-panel,
:root[data-card-vault-skin=arcade] .desktop-shell .tabbar {
  box-shadow: 0 0 0 1px rgba(255, 88, 199, 0.08), 0 18px 44px rgba(4, 5, 18, 0.26);
}
:root[data-card-vault-skin=binder] .desktop-shell .collection-panel,
:root[data-card-vault-skin=binder] .desktop-shell .tool-panel {
  background:
    linear-gradient(
      90deg,
      rgba(138, 90, 51, 0.06) 0 1px,
      transparent 1px 100%),
    var(--surface);
  background-size: 22px 100%;
}
:root[data-card-vault-skin=parchment] .desktop-shell .collection-panel,
:root[data-card-vault-skin=parchment] .desktop-shell .tool-panel {
  box-shadow: inset 0 0 0 1px rgba(126, 79, 29, 0.06);
}
.account-button {
  align-items: center;
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  max-width: 210px;
}
.account-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-button {
  max-width: 128px;
}
.account-backdrop {
  align-items: center;
  background: rgba(5, 10, 9, 0.82);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 91;
}
.account-dialog {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: 16px;
  max-height: 92svh;
  max-width: 430px;
  overflow: auto;
  padding: 18px;
  width: 100%;
}
.purchase-dialog {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: 14px;
  max-height: 92svh;
  max-width: min(94vw, 820px);
  overflow: auto;
  padding: 18px;
  position: relative;
  width: 100%;
}
.purchase-heading,
.purchase-product-heading,
.purchase-product-footer,
.purchase-balance,
.purchase-costs {
  align-items: center;
  display: flex;
}
.purchase-heading {
  gap: 11px;
  padding-right: 42px;
}
.purchase-heading h2,
.purchase-heading p,
.purchase-product h3,
.purchase-product p {
  margin: 0;
}
.purchase-balance {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 11px 12px;
}
.purchase-balance span {
  color: var(--text);
  font-weight: 800;
}
.purchase-products {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.purchase-product {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  min-height: 154px;
  padding: 13px;
}
.purchase-product.subscription {
  border-color: var(--accent);
}
.purchase-product-heading {
  align-items: flex-start;
  gap: 10px;
  justify-content: space-between;
}
.purchase-product-heading p {
  color: var(--muted);
  font-size: 13px;
}
.purchase-product-heading span {
  background: rgba(31, 122, 140, 0.1);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}
.purchase-product-footer {
  align-self: end;
  gap: 10px;
  justify-content: space-between;
}
.purchase-product-footer strong {
  font-size: 18px;
}
.purchase-costs {
  color: var(--muted);
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
}
.purchase-costs span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 8px;
}
.purchase-status {
  margin-top: 0;
}
.account-dialog form {
  display: grid;
  gap: 13px;
}
.account-dialog label {
  display: grid;
  gap: 6px;
}
.account-heading,
.account-loading,
.account-profile-row,
.account-actions,
.account-remember {
  align-items: center;
  display: flex;
}
.account-heading {
  gap: 11px;
}
.account-heading h2,
.account-heading p {
  margin: 0;
}
.account-loading {
  color: var(--muted);
  gap: 9px;
  min-height: 91px;
  justify-content: center;
}
.account-mode {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}
.account-mode button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.account-mode button.active {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.account-profile-row {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  justify-content: space-between;
  padding: 13px;
}
.account-profile-row div {
  display: grid;
  gap: 3px;
}
.account-profile-row span,
.account-note,
.account-status {
  color: var(--muted);
}
.account-note,
.account-status {
  font-size: 13px;
  margin: 0;
}
.account-status {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px;
}
.account-remember {
  gap: 9px !important;
  grid-template-columns: auto 1fr;
}
.account-remember input {
  height: 18px;
  margin: 0;
  width: 18px;
}
.account-actions {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  width: 100%;
}
.account-actions button {
  justify-content: center;
  min-width: 0;
}
.feedback-dialog {
  position: relative;
}
.feedback-dialog textarea {
  min-height: 112px;
  resize: vertical;
}
.feedback-kind-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.feedback-kind-row button {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  min-width: 0;
}
.feedback-kind-row button.selected,
.feedback-nudge-actions button.selected {
  background: #1e3a8a;
  border-color: #2563eb;
  color: #ffffff;
}
.android-app-button {
  overflow: hidden;
  white-space: nowrap;
}
.android-app-panel {
  background:
    linear-gradient(
      135deg,
      rgba(79, 177, 191, 0.1),
      transparent 40%),
    var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 13px;
}
.android-app-panel-heading {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.android-app-panel-heading h3,
.android-app-panel-heading p,
.android-app-panel > p {
  margin: 0;
}
.android-app-panel-heading button {
  background: transparent;
  min-height: 32px;
  padding: 6px;
  width: 34px;
}
.android-app-panel > p {
  color: var(--muted);
  font-size: 13px;
}
.android-app-qr {
  background: #050807;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  justify-self: center;
  max-width: min(100%, 280px);
  width: 100%;
}
.android-app-store-link {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  text-decoration: none;
}
.android-app-store-link:hover,
.android-app-store-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.account-policy-links {
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 18px;
  justify-content: center;
  padding-top: 13px;
}
.account-policy-links a {
  color: var(--muted);
}
.account-policy-links a:hover,
.account-policy-links a:focus-visible {
  color: var(--accent);
}
.tabbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 4px;
  position: sticky;
  top: 14px;
  width: 100%;
}
.tabbar button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 12px;
  gap: 5px;
  justify-content: flex-start;
  min-height: 44px;
  padding-inline: 5px;
  white-space: nowrap;
}
.tabbar button.active {
  background: var(--soft);
  border-color: var(--border-strong);
  color: var(--text);
}
.eyebrow,
.muted,
.status,
.scan-output-header,
.candidate p,
.collection-item p {
  color: var(--muted);
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.stats-strip {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 14px;
  padding: 10px 14px;
}
.stats-strip span {
  display: grid;
  gap: 2px;
  min-width: 82px;
}
.stats-strip strong {
  color: var(--text);
  font-size: 18px;
}
.workspace {
  align-items: flex-start;
  flex: 1 1 auto;
  gap: 18px;
  margin: 0 auto;
  max-width: 1360px;
  width: 100%;
}
.scan-workspace {
  justify-content: center;
}
.scan-workspace .tool-panel {
  flex-basis: 520px;
  max-width: 520px;
  width: 100%;
}
.desktop-shell .scan-workspace .tool-panel {
  display: grid;
  gap: 14px;
}
.desktop-shell .scan-workspace .tool-panel > .panel-heading {
  margin-bottom: 0;
  order: 1;
}
.desktop-shell .scan-workspace .tool-panel > .search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  order: 2;
}
.desktop-shell .scan-workspace .tool-panel > .search-form button {
  min-height: 38px;
  padding: 7px 12px;
  white-space: nowrap;
  width: auto;
}
.desktop-shell .scan-workspace .tool-panel > .scanner-station {
  order: 3;
}
.desktop-shell .scan-workspace .tool-panel > .scan-output {
  order: 4;
}
.desktop-shell .scan-workspace .tool-panel > .scan-results {
  order: 5;
}
.desktop-shell .scan-workspace .tool-panel > .more-results-pull {
  order: 6;
}
.tool-panel,
.collection-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 0;
}
.tool-panel {
  flex: 0 0 430px;
  padding: 16px;
}
.collection-panel {
  flex: 1 1 auto;
  padding: 16px;
  position: relative;
}
.game-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.panel-heading {
  align-items: start;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-heading h2,
.panel-heading h3 {
  margin: 0;
}
.status {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  max-width: 210px;
  overflow: hidden;
  padding: 5px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scanner-station {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}
.segmented {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, 1fr);
  padding: 4px;
}
.segmented button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.segmented button.active {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.scan-game-picker {
  display: none;
}
.sports-review {
  display: grid;
  gap: 10px;
}
.sports-scan-reference {
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
}
.camera-frame {
  align-items: center;
  aspect-ratio: 2.5 / 3.5;
  background:
    linear-gradient(
      135deg,
      rgba(31, 122, 140, 0.14),
      transparent 44%),
    #111827;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  max-height: min(620px, 66svh);
  max-width: 100%;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  justify-self: center;
  width: min(100%, 340px);
}
.camera-frame video {
  height: 100%;
  object-fit: cover;
  visibility: hidden;
  width: 100%;
}
.camera-frame video.active {
  visibility: visible;
}
.captured-frame {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}
.camera-empty {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 11px;
  justify-items: center;
  position: absolute;
}
.camera-empty img {
  border-radius: 18px;
  box-shadow: 0 14px 31px rgba(0, 0, 0, 0.32);
  height: 111px;
  opacity: 0.76;
  width: 111px;
}
.camera-empty span {
  font-size: 15px;
  font-weight: 700;
}
.hidden-empty {
  display: none;
}
.scan-guide {
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  aspect-ratio: 2.5 / 3.5;
  height: 96%;
  pointer-events: none;
  position: absolute;
}
.scan-border-hint {
  align-items: center;
  justify-content: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 7px;
  justify-self: center;
  line-height: 1.35;
  padding: 0 2px;
  text-align: center;
  width: min(100%, 340px);
}
.scan-border-hint svg {
  color: var(--accent);
  flex: 0 0 auto;
}
.hidden-canvas {
  display: none;
}
.button-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.button-row button {
  min-width: 0;
}
.scanner-status {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  min-height: 38px;
  overflow: hidden;
  padding: 8px 10px;
}
.scanner-status {
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-scan-button {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  width: 100%;
}
.report-scan-button:disabled {
  color: var(--muted);
}
.feedback-nudge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  padding: 10px;
}
.feedback-nudge-title,
.feedback-nudge-copy {
  margin: 0;
}
.feedback-nudge-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
.feedback-nudge-copy {
  color: var(--muted);
  font-size: 12px;
}
.feedback-nudge textarea {
  min-height: 48px;
  resize: vertical;
}
.feedback-nudge-error {
  color: #ffb4a8;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}
.feedback-nudge-actions {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
}
.feedback-nudge-actions button {
  min-height: 34px;
  min-width: 0;
  padding: 6px 8px;
}
.search-form {
  align-items: end;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.search-form label {
  flex: 1 1 auto;
  min-width: 0;
}
.search-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.scan-output {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 12px;
  padding: 10px;
}
.scan-results {
  margin-top: 14px;
  scroll-margin-top: 18px;
}
.more-results-pull {
  align-items: center;
  background: var(--soft);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: 12px;
  padding: 12px;
  text-align: center;
}
.more-results-pull button {
  width: 100%;
}
.more-results-pull span {
  font-size: 12px;
}
.scan-output-header {
  font-size: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}
.term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.term-list button {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 8px;
}
.candidate-list,
.collection-list {
  display: grid;
  gap: 10px;
}
.candidate,
.collection-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.candidate {
  align-items: center;
  cursor: pointer;
  grid-template-columns: 54px 1fr 42px;
  padding: 10px;
}
.candidate-main {
  min-width: 0;
}
.candidate:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(31, 122, 140, 0.3);
  outline-offset: 2px;
}
.candidate:hover {
  border-color: var(--accent);
}
.candidate img,
.collection-item img {
  background: var(--soft);
  border-radius: 6px;
  height: 74px;
  object-fit: cover;
  width: 54px;
}
.candidate h3,
.collection-item h3,
.empty-state h3 {
  color: var(--text);
  font-size: 15px;
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.candidate p,
.collection-item p {
  font-size: 13px;
  margin: 0;
}
.card-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-pill {
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 6px;
  text-transform: uppercase;
}
.game-pill.mtg {
  background: #8f3d2a;
}
.game-pill.pokemon {
  background: #1f6b4d;
}
.collection-heading {
  align-items: flex-start;
}
.collection-summary {
  display: grid;
  gap: 2px;
}
.collection-card-count {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.collection-heading-side {
  align-items: end;
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  justify-items: end;
  padding-top: 44px;
}
.collection-heading-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}
.collection-search {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  width: clamp(170px, 24vw, 270px);
}
.collection-search:focus-within {
  border-color: var(--accent);
}
.collection-search input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  min-height: 38px;
  min-width: 0;
  outline: 0;
  padding: 8px 0;
  text-transform: none;
  width: 100%;
}
.collection-coach-button {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  min-height: 40px;
  padding-inline: 12px;
}
.collection-coach-button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
}
.collection-deck-button {
  background: #166534;
  border-color: #14532d;
  border-radius: 999px;
  color: #ffffff;
  min-height: 37px;
  padding: 7px 14px;
  position: absolute;
  right: 16px;
  top: 12px;
}
.collection-deck-button:hover:not(:disabled) {
  background: #14532d;
  border-color: #052e16;
}
.game-menu {
  position: relative;
}
.game-menu > button {
  width: 40px;
}
.game-menu-popover {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(10, 20, 18, 0.2);
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
}
.game-menu-popover button {
  background: transparent;
  border-color: transparent;
  justify-content: flex-start;
  min-height: 38px;
  width: 100%;
}
.game-menu-popover button:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--border);
}
.collection-controls {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
  padding: 10px;
}
.collection-list-tabs {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}
.collection-list-tabs button {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
}
.collection-list-tabs button.active {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  border-color: var(--accent);
  color: var(--text);
}
.sports-price-queue {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  border-radius: 0.85rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
}
.sports-price-queue > div {
  display: grid;
  gap: 0.2rem;
}
.sports-price-queue span {
  color: var(--muted);
  font-size: 0.86rem;
}
.sports-price-queue button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.4rem;
}
.sports-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sports-card-details span {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}
.sports-price-details {
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}
.sports-price-details summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
}
.sports-price-details > div {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.sports-price-details a {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--text);
  display: grid;
  gap: 0.2rem;
  grid-template-columns: 1fr auto;
  padding: 0.55rem 0.65rem;
  text-decoration: none;
}
.sports-price-details small {
  color: var(--muted);
  grid-column: 1 / -1;
}
.preview-menu.sports-hidden {
  display: none;
}
.collection-game-list {
  display: grid;
  gap: 18px;
}
.collection-game-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}
.collection-game-heading {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}
.collection-game-heading h3 {
  color: var(--text);
  font-size: 17px;
  margin-bottom: 2px;
}
.collection-game-heading span {
  color: var(--muted);
  font-size: 13px;
}
.collection-game-heading > span {
  white-space: nowrap;
}
.section-heading-actions {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}
.section-heading-actions > span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.section-heading-actions button {
  min-height: 36px;
  padding: 7px;
  width: 36px;
}
.grouped-collection,
.collection-group {
  display: grid;
  gap: 12px;
}
.collection-subgroups,
.collection-subgroup {
  display: grid;
  gap: 10px;
}
.collection-subgroups {
  padding-left: 18px;
}
.subgroup-heading {
  padding-left: 2px;
}
.subgroup-heading .group-title strong {
  font-size: 14px;
}
.group-heading {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0;
  display: flex;
  color: var(--text);
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: 4px 2px 8px;
  width: 100%;
}
.group-heading:hover:not(:disabled) {
  background: transparent;
  border-color: var(--border);
}
.group-title {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
}
.group-title strong {
  color: var(--text);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-heading span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.icon-actions {
  align-items: center;
  gap: 8px;
}
.icon-actions a,
.icon-actions button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  padding: 8px;
  text-decoration: none;
  width: 38px;
}
.icon-actions a:hover {
  border-color: var(--accent);
}
.collection-item {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 158px;
  padding: 12px;
}
.collection-preview-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  gap: 12px;
  grid-template-columns: 60px minmax(0, 1fr);
  justify-content: stretch;
  min-height: 74px;
  min-width: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}
.collection-preview-trigger:hover:not(:disabled) {
  background: transparent;
  border-color: transparent;
}
.collection-preview-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.item-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.item-meta,
.item-notes {
  color: var(--muted);
  font-size: 13px;
}
.item-notes {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-price {
  display: grid;
  gap: 4px;
  justify-items: end;
}
.item-price strong {
  color: var(--text);
}
.deck-usage {
  position: relative;
}
.deck-usage summary {
  align-items: center;
  background: #173d32;
  border: 1px solid #2d7d63;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  user-select: none;
}
.deck-usage-label {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-usage summary::-webkit-details-marker {
  display: none;
}
.deck-usage summary::marker {
  content: "";
}
.deck-usage-popover {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(10, 20, 18, 0.28);
  display: grid;
  gap: 7px;
  min-width: 190px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 12;
}
.deck-usage-popover div {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}
.deck-usage-popover span {
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-usage-popover strong {
  color: var(--accent);
  font-size: 13px;
}
.collection-item-menu {
  position: relative;
}
.collection-item-menu > button {
  min-height: 38px;
  padding: 8px;
  width: 38px;
}
.collection-item-menu-popover {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  box-shadow: 0 14px 34px rgba(10, 20, 18, 0.24);
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
}
.collection-item-menu-popover a,
.collection-item-menu-popover button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  display: flex;
  font: inherit;
  gap: 9px;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
  text-decoration: none;
  width: 100%;
}
.collection-item-menu-popover a:hover,
.collection-item-menu-popover button:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--border);
}
.collection-quantity-stepper {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 34px 38px 34px;
}
.collection-quantity-stepper button {
  min-height: 34px;
  padding: 6px;
  width: 34px;
}
.collection-quantity-stepper output {
  color: var(--text);
  font-weight: 700;
  text-align: center;
}
.empty-state {
  align-items: center;
  background: var(--soft);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  justify-items: center;
  min-height: 260px;
  padding: 24px;
  text-align: center;
}
.mini-empty-state {
  align-items: center;
  background: var(--soft);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  padding: 14px;
}
.card-thumb {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  display: grid;
  font-size: 20px;
  font-weight: 800;
  height: 74px;
  object-fit: cover;
  place-items: center;
  width: 54px;
}
.card-thumb.missing {
  background:
    linear-gradient(
      135deg,
      rgba(31, 122, 140, 0.1),
      transparent),
    linear-gradient(#ffffff1a, #00000008),
    var(--soft);
}
.bottom-summary {
  margin: 18px auto 0;
  max-width: 1360px;
  width: 100%;
}
.bottom-summary .stats-strip {
  justify-content: flex-end;
  margin-left: auto;
  width: fit-content;
}
.save-toast {
  align-items: center;
  background: #173d32;
  border: 1px solid #2d7d63;
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 12px 28px rgba(10, 20, 18, 0.28);
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  left: 50%;
  max-width: min(92vw, 520px);
  padding: 12px 14px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 40;
}
.card-preview-backdrop {
  align-items: center;
  background: rgba(5, 10, 9, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  overscroll-behavior: none;
  z-index: 50;
}
.card-preview-backdrop.coach-card-preview {
  z-index: 71;
}
.card-preview-backdrop.save-deck-backdrop {
  z-index: 81;
}
.card-preview {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 360px) minmax(220px, 320px);
  max-height: 92svh;
  max-width: min(92vw, 760px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  position: relative;
  touch-action: pan-y;
}
.preview-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 40px;
  z-index: 1;
}
.preview-menu {
  position: absolute;
  right: 58px;
  top: 10px;
  z-index: 3;
}
.preview-menu-trigger {
  padding: 8px;
  width: 40px;
}
.preview-menu-popover {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(10, 20, 18, 0.28);
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 46px;
}
.preview-menu-popover button {
  background: transparent;
  border-color: transparent;
  justify-content: flex-start;
  min-height: 38px;
  white-space: nowrap;
}
.preview-menu-popover button:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--border);
}
.preview-image-shell {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 320px;
  padding: 10px;
  position: relative;
}
.preview-navigation {
  align-items: center;
  background: rgba(10, 20, 18, 0.86);
  border-color: rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  height: 43px;
  justify-content: center;
  padding: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 43px;
  z-index: 2;
}
.preview-navigation.previous {
  left: 9px;
}
.preview-navigation.next {
  right: 9px;
}
.preview-navigation:disabled {
  opacity: 0.28;
}
.preview-image {
  aspect-ratio: 2.5 / 3.5;
  border-radius: 8px;
  max-height: min(70svh, 520px);
  max-width: 100%;
  object-fit: contain;
}
.preview-image.missing {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 48px;
  font-weight: 800;
  justify-content: center;
  min-height: 320px;
  width: min(100%, 300px);
}
.deck-popout,
.save-deck-popout,
.scan-issue-popout {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  display: grid;
  gap: 16px;
  max-width: min(92vw, 560px);
  padding: 18px;
  position: relative;
  width: 100%;
}
.deck-popout {
  max-height: 92svh;
  overflow: auto;
}
.deck-detail-popout {
  max-width: min(94vw, 780px);
}
.scan-issue-popout {
  max-height: 92svh;
  overflow: auto;
}
.scan-issue-image {
  aspect-ratio: 2.5 / 3.5;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  justify-self: center;
  max-height: 300px;
  max-width: min(100%, 220px);
  object-fit: contain;
  width: 100%;
}
.scan-report-context {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 10px;
}
.save-choice {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}
.save-choice button {
  background: var(--soft);
  border-color: var(--border);
  color: var(--muted);
  min-height: 44px;
}
.save-choice button.active {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #ffffff;
}
.save-quantity-row {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}
.save-quantity-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.save-quantity-stepper {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 36px 42px 36px;
}
.save-quantity-stepper button {
  min-height: 36px;
  padding: 7px;
  width: 36px;
}
.save-quantity-stepper output {
  color: var(--text);
  font-weight: 800;
  text-align: center;
}
.deck-save-fields,
.deck-list {
  display: grid;
  gap: 10px;
}
.deck-row {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}
.deck-row:hover:not(:disabled) {
  border-color: var(--accent);
}
.deck-row h3 {
  color: var(--text);
  font-size: 16px;
}
.deck-row-count {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  gap: 5px;
  white-space: nowrap;
}
.deck-row-count strong {
  color: var(--text);
}
.deck-list-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-right: 38px;
}
.deck-list-heading > div {
  min-width: 0;
}
.deck-add-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px;
  width: 40px;
}
.deck-create-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
}
.deck-create-row button {
  min-height: 40px;
  padding: 8px;
  width: 40px;
}
.deck-detail-heading,
.deck-title-row,
.deck-name-editor {
  align-items: center;
  display: flex;
  gap: 10px;
}
.deck-detail-heading {
  padding-right: 36px;
}
.deck-detail-heading > div {
  min-width: 0;
}
.deck-back-button,
.deck-title-row button,
.deck-name-editor button {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  padding: 6px;
  width: 34px;
}
.deck-title-row h2 {
  overflow: hidden;
  text-overflow: ellipsis;
}
.deck-title-row .deck-delete-button {
  border-color: #8d3f43;
  color: #ff9ba0;
}
.deck-delete-backdrop {
  z-index: 93;
}
.deck-delete-popout {
  max-width: min(92vw, 430px);
}
.deck-delete-heading,
.deck-delete-actions,
.danger-action {
  align-items: center;
  display: flex;
}
.deck-delete-heading {
  gap: 11px;
  padding-right: 36px;
}
.deck-delete-heading h2,
.deck-delete-heading p,
.deck-delete-popout > p {
  margin: 0;
}
.deck-delete-actions {
  gap: 9px;
  justify-content: flex-end;
}
.danger-action {
  background: #9b3037;
  border-color: #bc4d54;
  color: #ffffff;
  gap: 8px;
  justify-content: center;
}
.danger-action:hover:not(:disabled) {
  background: #b43a42;
  border-color: #d35b62;
}
.deck-name-editor input {
  min-width: 0;
}
.deck-stats {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.deck-stats span {
  color: var(--muted);
  display: grid;
  gap: 3px;
  padding: 10px;
}
.deck-stats span + span {
  border-left: 1px solid var(--border);
}
.deck-stats strong {
  color: var(--text);
  font-size: 17px;
}
.deck-category-list {
  display: grid;
  gap: 12px;
  max-height: 58svh;
  overflow: auto;
  padding-right: 2px;
}
.deck-category {
  display: grid;
  gap: 10px;
}
.deck-category-heading {
  position: sticky;
  top: 0;
  z-index: 1;
}
.deck-card-list {
  max-height: none;
  overflow: visible;
}
.deck-card-image-button {
  background: transparent;
  border: 0;
  min-height: 0;
  padding: 0;
  width: 60px;
}
.deck-card-image-button .card-thumb {
  width: 60px;
}
.deck-card-actions {
  align-items: end;
  display: grid;
  gap: 7px;
  justify-items: end;
}
.deck-quantity-stepper {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 34px 38px 34px;
}
.deck-quantity-stepper button {
  min-height: 34px;
  padding: 6px;
  width: 34px;
}
.deck-quantity-stepper output {
  color: var(--text);
  font-weight: 700;
  text-align: center;
}
.deck-card-item {
  grid-template-columns: 60px minmax(0, 1fr) 136px;
}
.coach-launch-button {
  align-items: center;
  align-self: start;
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  width: 132px;
}
.coach-launch-button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
}
.coach-backdrop {
  z-index: 61;
}
.coach-popout {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: 16px;
  max-height: 94svh;
  max-width: min(96vw, 920px);
  overflow: auto;
  padding: 18px;
  position: relative;
  width: 100%;
}
.coach-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  padding-right: 92px;
}
.coach-credit-strip {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
  justify-content: space-between;
  margin: -4px 0 4px;
  padding: 8px 10px;
}
.coach-credit-strip span:first-child {
  color: var(--text);
  font-weight: 800;
}
.coach-credit-list-button {
  min-height: 32px;
  padding: 5px 9px;
}
.coach-credit-action {
  min-height: 32px;
  padding: 5px 9px;
}
.coach-credit-list-panel {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 11px;
  margin-top: -8px;
  padding: 12px;
}
.coach-credit-list-panel header,
.coach-credit-list-rows div {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.coach-credit-list-panel header strong,
.coach-credit-list-panel header span,
.coach-credit-list-rows span {
  display: grid;
  gap: 2px;
}
.coach-credit-list-panel header span,
.coach-credit-list-rows small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.coach-credit-list-panel header button {
  background: transparent;
  min-height: 32px;
  padding: 6px;
  width: 34px;
}
.coach-credit-list-rows {
  display: grid;
  gap: 9px;
}
.coach-credit-list-rows div {
  border-top: 1px solid var(--border);
  padding-top: 9px;
}
.coach-credit-list-rows b {
  color: var(--text);
  flex: 0 0 auto;
  font-size: 13px;
}
.coach-thread-clear {
  padding: 8px;
  position: absolute;
  right: 58px;
  top: 10px;
  width: 40px;
  z-index: 1;
}
.coach-build-wait {
  align-items: center;
  animation: coach-build-wait-in 180ms ease-out;
  background: #3b171a;
  border: 1px solid #8f343b;
  border-radius: 7px;
  color: #ffd9dc;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 9px;
  padding: 9px 11px;
}
.coach-build-wait svg {
  flex: 0 0 auto;
}
.coach-build-wait-chat {
  bottom: 4px;
  justify-self: end;
  max-width: min(100%, 390px);
  position: sticky;
  width: fit-content;
  z-index: 2;
}
@keyframes coach-build-wait-in {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.coach-mark {
  align-items: center;
  background: #172554;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: #bfdbfe;
  display: flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  width: 44px;
}
.coach-controls,
.coach-results {
  display: grid;
  gap: 14px;
}
.coach-chat {
  display: grid;
  gap: 12px;
  max-height: 44svh;
  min-height: 170px;
  overflow-y: auto;
  padding: 4px 2px;
}
.coach-message {
  align-items: flex-start;
  display: grid;
  gap: 8px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-width: 0;
}
.coach-message.user {
  display: flex;
  justify-content: flex-end;
}
.coach-message-mark {
  align-items: center;
  background: #172554;
  border: 1px solid #2563eb;
  border-radius: 7px;
  color: #bfdbfe;
  display: flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.coach-message-body {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  max-width: 690px;
  min-width: 0;
  padding: 11px 12px;
  width: 100%;
}
.coach-message.user .coach-message-body {
  background: #1e3a8a;
  border-color: #2563eb;
  color: #ffffff;
  max-width: min(82%, 690px);
  width: auto;
}
.coach-message-body > p {
  margin: 0;
}
.coach-inline-card-name {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #2563eb;
  display: inline;
  font-weight: 700;
  min-height: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.coach-inline-card-name:hover:not(:disabled) {
  color: #1d4ed8;
}
.coach-message.assistant .coach-message-body > p {
  color: var(--muted);
}
.coach-save-deck-action {
  display: flex;
}
.coach-save-deck-button {
  align-items: center;
  background: #17613f;
  border-color: #25845a;
  color: #ffffff;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  min-height: 38px;
  padding: 8px 11px;
}
.coach-save-deck-button:hover:not(:disabled) {
  background: #1d744c;
  border-color: #36a16f;
}
.coach-message.thinking .coach-message-body {
  min-width: 240px;
}
.coach-answer-cards {
  display: grid;
  gap: 7px;
}
.coach-answer-cards article {
  border-left: 3px solid #2563eb;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 6px 8px;
}
.coach-answer-cards article > p,
.coach-answer-details {
  color: var(--muted);
  margin: 0;
}
.coach-owned-matches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.coach-result-groups,
.coach-result-group {
  display: grid;
  gap: 8px;
}
.coach-result-group-heading {
  min-width: 0;
  padding-bottom: 7px;
}
.coach-result-group-heading .group-title {
  min-width: 0;
}
.coach-result-group-heading > span:last-child {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coach-owned-group-matches {
  padding: 0 2px 4px 25px;
}
.coach-owned-matches button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  min-height: 32px;
  padding: 5px 7px;
}
.coach-owned-matches button:hover:not(:disabled),
.coach-card-name-row button:hover:not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}
.coach-card-name-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.coach-card-name-row span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}
.coach-card-name-row i {
  color: var(--muted);
  font-style: normal;
}
.coach-card-name-row button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #2563eb;
  font-weight: 700;
  min-height: 28px;
  padding: 2px 0;
  text-align: left;
}
.coach-answer-details {
  border-top: 1px solid var(--border);
  padding-top: 7px;
}
.coach-answer-details summary,
.coach-full-analysis > summary {
  cursor: pointer;
  font-weight: 700;
}
.coach-answer-details ul {
  margin: 7px 0 0;
  padding-left: 20px;
}
.coach-answer-points {
  color: var(--muted);
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}
.coach-synergy-tier {
  background: #153f2d;
  border: 1px solid #2b7655;
  border-radius: 999px;
  color: #d8f4e5;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
  padding: 3px 8px;
}
.coach-quick-section {
  display: grid;
  gap: 7px;
}
.coach-quick-toggle {
  background: var(--soft);
  border-color: var(--border-strong);
  color: var(--text);
  justify-content: space-between;
  min-height: 39px;
  width: 100%;
}
.coach-quick-toggle svg {
  transition: transform 160ms ease;
}
.coach-quick-toggle svg.is-open {
  transform: rotate(180deg);
}
.coach-quick-prompts {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.coach-quick-prompts button {
  background: var(--soft);
  border-color: var(--border-strong);
  color: var(--text);
  justify-content: flex-start;
  min-height: 40px;
  text-align: left;
}
.coach-quick-prompts button:hover:not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}
.coach-combo-refinement {
  background: var(--soft);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  display: grid;
  gap: 13px;
  padding: 12px;
}
.coach-combo-refinement header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.coach-combo-refinement header > div {
  display: grid;
  gap: 2px;
}
.coach-combo-refinement header span {
  color: var(--muted);
  font-size: 13px;
}
.coach-combo-refinement header > button {
  background: transparent;
  min-height: 34px;
  padding: 6px;
  width: 34px;
}
.coach-combo-refinement fieldset {
  border: 0;
  display: grid;
  gap: 7px;
  margin: 0;
  min-width: 0;
  padding: 0;
}
.coach-combo-refinement legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
  text-transform: uppercase;
}
.coach-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.coach-filter-chips button {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  min-height: 36px;
  padding: 7px 10px;
}
.coach-filter-chips button.active {
  background: #1e3a8a;
  border-color: #2563eb;
  color: #ffffff;
}
.coach-build-commander {
  display: grid;
  gap: 7px;
  margin-top: 3px;
  max-width: 561px;
}
.coach-commander-label-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 9px;
  justify-content: space-between;
  text-transform: uppercase;
}
.coach-commander-label-row button {
  align-items: center;
  background: #17613f;
  border-color: #25845a;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  min-height: 33px;
  padding: 6px 9px;
  text-transform: none;
}
.coach-build-commander input {
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  min-height: 40px;
  text-transform: none;
}
.coach-commander-suggestions {
  display: grid;
  gap: 7px;
}
.coach-commander-suggestions article {
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 7px;
}
.coach-commander-preview {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  display: grid;
  gap: 9px;
  grid-template-columns: 37px minmax(0, 1fr);
  min-height: 53px;
  padding: 0;
  text-align: left;
}
.coach-commander-preview img {
  aspect-ratio: 5 / 7;
  border-radius: 3px;
  object-fit: cover;
  width: 37px;
}
.coach-commander-preview > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.coach-commander-preview strong,
.coach-commander-preview small {
  overflow-wrap: anywhere;
}
.coach-commander-preview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.coach-use-commander {
  align-items: center;
  align-self: center;
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
  min-height: 35px;
  padding: 7px 9px;
}
.coach-filter-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}
.coach-filter-actions button {
  min-height: 42px;
}
.coach-filter-actions .primary {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}
.coach-composer {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 48px;
}
.coach-composer textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  min-height: 58px;
  padding: 9px 10px;
  resize: vertical;
  width: 100%;
}
.coach-composer textarea:focus {
  border-color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}
.coach-composer button {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  min-height: 48px;
  padding: 8px;
}
.coach-composer button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
}
.coach-full-analysis {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding-top: 10px;
}
.coach-full-analysis[open] {
  display: grid;
  gap: 12px;
}
.coach-full-analysis .coach-results {
  color: var(--text);
}
.coach-mode-tabs {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}
.coach-mode-tabs button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  min-height: 42px;
  padding: 8px;
}
.coach-mode-tabs button + button {
  border-left: 1px solid var(--border);
}
.coach-mode-tabs button.active {
  background: #2563eb;
  color: #ffffff;
}
.coach-format-bar {
  align-items: end;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 177px) minmax(0, 1fr);
  padding: 10px;
}
.coach-format-bar label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  text-transform: uppercase;
}
.coach-format-bar input,
.coach-format-bar select {
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  min-height: 40px;
  text-transform: none;
}
.coach-analyze-button {
  align-items: center;
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
}
.coach-analyze-button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
}
.coach-loading {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 120px;
  text-align: center;
}
.coach-alert {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 9px;
  padding: 11px 12px;
}
.coach-alert.error,
.coach-legality {
  background: #2f1c1d;
  border-color: #714044;
  color: #ffd4d7;
}
.coach-alert.success {
  background: #173d32;
  border-color: #2d7d63;
  color: #b9f5df;
}
.coach-alert.warning {
  background: #332711;
  border-color: #8f6a22;
  color: #ffe3a8;
}
.coach-result-heading {
  align-items: start;
  display: flex;
  justify-content: space-between;
}
.coach-result-heading h3 {
  font-size: 18px;
  margin-top: 7px;
}
.coach-status {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}
.coach-status.ready {
  background: #173d32;
  border-color: #2d7d63;
  color: #b9f5df;
}
.coach-status.partial {
  background: #243329;
  border-color: #58705e;
  color: #d8eadc;
}
.coach-status.busy,
.coach-status.unavailable {
  background: #332b19;
  border-color: #716238;
  color: #f2dda3;
}
.coach-scope-note {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0 0;
}
.coach-metrics {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  overflow: hidden;
}
.coach-metrics span {
  color: var(--muted);
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 9px;
}
.coach-metrics span + span {
  border-left: 1px solid var(--border);
}
.coach-metrics strong {
  color: var(--text);
  font-size: 17px;
}
.coach-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.coach-section {
  display: grid;
  gap: 10px;
}
.coach-section > h3 {
  align-items: center;
  display: flex;
  font-size: 15px;
  gap: 7px;
}
.coach-section ul,
.coach-notes ul {
  color: var(--muted);
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}
.coach-list {
  display: grid;
  gap: 9px;
}
.coach-empty-result {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px;
}
.coach-empty-result span {
  color: var(--muted);
}
.coach-list article {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 12px;
}
.coach-list article > p {
  color: var(--muted);
  margin: 0;
}
.coach-confidence {
  color: var(--muted);
  font-size: 12px;
}
.coach-change-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.coach-change-grid > div {
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 8px;
}
.coach-change-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.coach-change-grid b {
  overflow-wrap: anywhere;
}
.coach-apply-button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  justify-self: start;
  min-height: 38px;
}
.coach-missing .coach-list article {
  border-style: dashed;
}
.coach-notes {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding-top: 10px;
}
.coach-notes summary {
  cursor: pointer;
  font-weight: 700;
}
.edit-popout {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  display: grid;
  gap: 16px;
  max-height: 92svh;
  max-width: min(94vw, 780px);
  overflow: auto;
  padding: 18px;
  position: relative;
  width: 100%;
}
.edit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wide-field {
  grid-column: 1 / -1;
}
.edit-actions {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  padding-top: 14px;
}
.preview-details {
  align-content: center;
  display: grid;
  gap: 10px;
  padding-right: 28px;
}
.preview-details h2 {
  font-size: 24px;
}
.preview-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
}
.preview-actions a {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  text-decoration: none;
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 980px) {
  .app-shell {
    padding: 14px;
  }
  .topbar,
  .workspace {
    align-items: stretch;
    flex-direction: column;
  }
  .scan-workspace {
    align-items: center;
  }
  .tool-panel {
    flex-basis: auto;
  }
  .game-workspace {
    grid-template-columns: 1fr;
  }
}
@media (orientation: landscape) and (min-width: 1120px) and (max-height: 900px) {
  .app-shell {
    padding: 14px 20px;
  }
  .topbar {
    align-items: center;
    flex-direction: row;
  }
  .workspace {
    align-items: flex-start;
    flex-direction: row;
  }
  .desktop-shell .scan-workspace .tool-panel {
    align-items: start;
    display: grid;
    gap: 14px 18px;
    grid-template-areas: "heading heading" "search search" "station output" "station results" "station more";
    grid-template-columns: minmax(340px, 0.9fr) minmax(320px, 1.1fr);
    max-width: 1180px;
  }
  .desktop-shell .scan-workspace .tool-panel > .panel-heading {
    grid-area: heading;
    margin-bottom: 0;
  }
  .desktop-shell .scan-workspace .tool-panel > .scanner-station {
    grid-area: station;
  }
  .desktop-shell .scan-workspace .tool-panel > .search-form {
    grid-area: search;
  }
  .desktop-shell .scan-workspace .tool-panel > .scan-output {
    grid-area: output;
    margin-top: 0;
  }
  .desktop-shell .scan-workspace .tool-panel > .scan-results {
    grid-area: results;
    margin-top: 0;
  }
  .desktop-shell .scan-workspace .tool-panel > .more-results-pull {
    grid-area: more;
    margin-top: 0;
  }
  .scan-results.empty {
    align-items: center;
    min-height: min(48svh, 420px);
  }
  .scan-results-empty {
    align-items: center;
    display: grid;
    height: 100%;
    justify-items: center;
    min-height: 240px;
  }
  .scan-results-empty img {
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
    opacity: 0.48;
    width: min(48%, 230px);
  }
  .camera-frame {
    max-height: min(590px, 64svh);
    min-height: 0;
  }
  .collection-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deck-popout:not(.deck-detail-popout) {
    max-width: min(90vw, 760px);
  }
  .deck-popout:not(.deck-detail-popout) .deck-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .coach-popout {
    align-items: start;
    grid-template-areas: "heading heading" "format chat" "prompts chat" "composer chat" "error error" "analysis analysis";
    grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
    max-width: min(96vw, 1100px);
  }
  .coach-heading {
    grid-area: heading;
  }
  .coach-format-bar {
    grid-area: format;
  }
  .coach-chat {
    grid-area: chat;
    height: min(68svh, 610px);
    max-height: none;
    min-height: 0;
  }
  .coach-quick-section,
  .coach-combo-refinement {
    grid-area: prompts;
  }
  .coach-composer {
    grid-area: composer;
  }
  .coach-popout > .coach-alert {
    grid-area: error;
  }
  .coach-full-analysis {
    grid-area: analysis;
  }
}
@media (max-width: 640px) {
  .app-shell {
    padding: 10px;
  }
  .app-shell:not(.desktop-shell) {
    min-height: 100dvh;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .app-body {
    display: block;
  }
  .topbar {
    gap: 9px;
    margin-bottom: 10px;
  }
  .app-shell:not(.desktop-shell) .topbar {
    align-items: start;
    column-gap: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
  }
  .brand-heading {
    gap: 9px;
    min-width: 0;
  }
  .app-shell:not(.desktop-shell) .brand-heading {
    align-items: flex-start;
    grid-column: 1 / -1;
    grid-row: 1 / span 2;
    padding-right: 136px;
  }
  .brand-icon {
    height: 42px;
    width: 42px;
  }
  .brand-title-row {
    gap: 5px;
  }
  .brand-title-row h1 {
    font-size: clamp(25px, 7vw, 34px);
    line-height: 1;
  }
  .app-shell:not(.desktop-shell) .brand-title-row h1 {
    font-size: clamp(24px, 6.7vw, 31px);
  }
  .brand-title-row .brand-badge {
    font-size: 9px;
    padding: 4px 6px;
  }
  .eyebrow {
    font-size: 11px;
  }
  .account-button {
    align-self: flex-start;
    max-width: 100%;
    min-height: 38px;
    padding: 7px 10px;
  }
  .topbar-actions {
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }
  .app-shell:not(.desktop-shell) .topbar-actions {
    align-items: flex-start;
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    justify-self: end;
    margin-top: 1px;
    width: auto;
    z-index: 2;
  }
  .app-shell:not(.desktop-shell) .account-button {
    max-width: 128px;
    min-height: 36px;
    padding: 6px 9px;
    width: 128px;
  }
  .tabbar {
    gap: 3px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 8px;
    padding: 3px;
    position: sticky;
    top: max(6px, env(safe-area-inset-top, 0px));
    width: 100%;
    z-index: 80;
  }
  .tabbar button {
    font-size: 11px;
    gap: 4px;
    justify-content: center;
    min-height: 34px;
    padding: 4px 3px;
  }
  .app-shell:not(.desktop-shell) .tabbar {
    z-index: 80;
  }
  .workspace {
    gap: 10px;
  }
  .tool-panel,
  .collection-panel {
    padding: 12px;
  }
  .panel-heading {
    gap: 8px;
    margin-bottom: 10px;
  }
  .panel-heading h2 {
    font-size: 20px;
  }
  .scan-workspace .tool-panel {
    max-width: 100%;
  }
  .scanner-station > .segmented {
    display: none;
  }
  .scan-game-picker {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .scan-game-picker span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }
  .scan-game-picker select {
    min-height: 34px;
    padding: 5px 30px 5px 9px;
  }
  .stats-strip,
  .search-form,
  .collection-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .collection-controls {
    display: grid;
    grid-template-columns: 1fr;
  }
  .stats-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bottom-summary .stats-strip {
    width: 100%;
  }
  .app-shell:not(.desktop-shell) .bottom-summary {
    margin-bottom: env(safe-area-inset-bottom, 0px);
  }
  .stats-strip span {
    min-width: 0;
  }
  .tool-panel,
  .collection-panel {
    width: 100%;
  }
  .camera-frame {
    max-height: min(72svh, 520px);
    min-height: 0;
  }
  .camera-empty img {
    height: 86px;
    width: 86px;
  }
  .scanner-station {
    gap: 8px;
    padding: 8px;
  }
  .scan-border-hint {
    font-size: 11px;
  }
  .button-row {
    gap: 7px;
  }
  .scanner-status {
    min-height: 34px;
    padding: 6px 8px;
  }
  .collection-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .collection-preview-trigger {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .card-preview {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .preview-details {
    padding-right: 0;
  }
  .preview-actions {
    grid-template-columns: 1fr;
  }
  .edit-grid,
  .edit-actions {
    grid-template-columns: 1fr;
  }
  .collection-item img {
    height: 70px;
    width: 50px;
  }
  .deck-card-image-button,
  .deck-card-image-button .card-thumb {
    width: 50px;
  }
  .deck-stats strong {
    font-size: 15px;
  }
  .item-price {
    border-top: 1px solid var(--border);
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: start;
    padding-top: 10px;
  }
  .collection-quantity-stepper {
    grid-column: 1;
  }
  .deck-usage {
    grid-column: 1;
  }
  .deck-usage-popover {
    left: 0;
    right: auto;
  }
  .collection-item-menu {
    align-self: center;
    grid-column: 2;
    grid-row: 1 / span 4;
  }
  .collection-item-menu-popover {
    right: 0;
  }
  .collection-game-heading {
    align-items: flex-start;
  }
  .collection-heading {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }
  .collection-heading-actions {
    align-items: center;
    flex: 1 1 100%;
    width: 100%;
  }
  .collection-heading-side {
    flex: 1 1 100%;
    padding-top: 0;
    width: 100%;
  }
  .collection-heading > div:first-child {
    padding-right: 145px;
  }
  .collection-search {
    flex: 1 1 auto;
    width: auto;
  }
  .section-heading-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }
  .coach-popout {
    padding: 14px;
  }
  .purchase-products {
    grid-template-columns: 1fr;
  }
  .coach-format-bar,
  .coach-summary-grid,
  .coach-change-grid {
    grid-template-columns: 1fr;
  }
  .coach-chat {
    max-height: 48svh;
  }
  .coach-message:not(.user) .coach-message-body {
    max-width: none;
  }
  .coach-message.user .coach-message-body {
    max-width: 88%;
  }
  .coach-quick-prompts {
    grid-template-columns: 1fr;
  }
  .coach-commander-label-row {
    align-items: stretch;
    flex-direction: column;
  }
  .coach-commander-label-row button {
    justify-content: center;
  }
  .coach-commander-suggestions article {
    grid-template-columns: 1fr;
  }
  .coach-use-commander {
    justify-content: center;
    width: 100%;
  }
  .coach-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .coach-mode-tabs button + button {
    border-left: 0;
  }
  .coach-mode-tabs button:nth-child(even) {
    border-left: 1px solid var(--border);
  }
  .coach-mode-tabs button:nth-child(n+3) {
    border-top: 1px solid var(--border);
  }
  .coach-metrics span + span {
    border-left: 0;
  }
}
@media (max-width: 460px) {
  .app-shell {
    padding: 8px;
  }
  .topbar {
    align-items: stretch;
  }
  .brand-heading {
    align-items: flex-start;
  }
  .brand-icon {
    height: 38px;
    width: 38px;
  }
  .brand-title-row h1 {
    font-size: 25px;
  }
  .brand-title-row .brand-badge:not(.version-badge) {
    display: none;
  }
  .tabbar {
    gap: 3px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 8px;
    padding: 3px;
  }
  .tabbar button {
    font-size: 11px;
    gap: 4px;
    justify-content: center;
    min-height: 34px;
    padding: 4px 3px;
  }
  .tool-panel,
  .collection-panel {
    padding: 10px;
  }
  .search-form button {
    width: 100%;
  }
  .segmented button,
  .button-row button {
    font-size: 13px;
    padding-inline: 8px;
  }
  .camera-empty img {
    height: 72px;
    width: 72px;
  }
  .candidate {
    gap: 9px;
    grid-template-columns: 46px minmax(0, 1fr) 36px;
    padding: 8px;
  }
  .candidate img {
    height: 63px;
    width: 46px;
  }
}
/*# sourceMappingURL=main.css.map */
