.goldfish-page-shell {
  max-width: 1440px;
  /* The shared --text-2 muted purple-gray reads low-contrast against this
     page's denser control layout, so brighten it locally rather than
     touching the value other pages rely on. */
  --text-2: #a5a1c2;
}

/* Several state containers below set their own `display: grid/flex`, which
   otherwise wins over the UA [hidden] rule once an author style targets the
   same element. Keep [hidden] authoritative for every element in this tool
   so JS-toggled states never render two panels at once. */
.goldfish-tool-shell [hidden] {
  display: none !important;
}

/* Chromium renders a built-in dropdown affordance inside inputs with a
   populated list="" attribute, which makes the field look like a <select>
   and eats into the typed text. Suggestions should just drop down below
   the field while typing, so hide that inline indicator. */
#cedh-goldfish-target-card::-webkit-calendar-picker-indicator,
#cedh-goldfish-target-card::-webkit-list-button {
  display: none !important;
  -webkit-appearance: none !important;
}

.goldfish-tool-shell {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  display: grid;
  gap: 24px;
  padding: 24px;
  box-sizing: border-box;
}

/* Restrained card shell for this page: shallower radius, lighter shadow,
   no backdrop blur. Scoped to this page only. */
.goldfish-tool-shell .tool-card {
  border-radius: 12px;
  backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 18px;
}

.goldfish-page-shell .tool-input,
.goldfish-page-shell .tool-select {
  min-height: 52px;
}

/* ---------- Import ---------- */

.goldfish-import-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.goldfish-import-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.goldfish-import-url {
  flex: 1 1 240px;
  min-width: 200px;
}

.goldfish-btn-primary,
.goldfish-btn-secondary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.goldfish-btn-primary {
  background: linear-gradient(135deg, #efd58b 0%, #c39532 100%);
  border: 1px solid rgba(201,168,76,0.3);
  color: #1a130a;
  box-shadow: 0 6px 14px rgba(201,168,76,0.14);
}

.goldfish-btn-primary:hover,
.goldfish-btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(201,168,76,0.2);
}

.goldfish-btn-secondary {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2);
}

.goldfish-btn-secondary:hover,
.goldfish-btn-secondary:focus-visible {
  color: var(--text-1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.goldfish-btn-primary:disabled,
.goldfish-btn-secondary:disabled,
.goldfish-segment:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.goldfish-file-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.goldfish-file-label:hover,
.goldfish-file-label:focus-within {
  color: var(--text-1);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.goldfish-file-label input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.goldfish-file-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goldfish-games-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 52px;
}

.goldfish-games-stat strong {
  color: var(--accent-soft);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.goldfish-games-stat small {
  color: var(--text-2);
  font-size: 0.82rem;
}

.goldfish-status {
  margin: 0;
  color: var(--text-2);
  font-size: 0.88rem;
}

.goldfish-status.is-error {
  color: var(--red-text);
}

.goldfish-status.is-success {
  color: var(--accent-soft);
}

.goldfish-deck-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.goldfish-deck-summary[hidden] {
  display: none;
}

.goldfish-deck-summary-name {
  color: var(--text-1);
  font-weight: 700;
  font-size: 0.92rem;
  margin-right: 2px;
}

/* ---------- Shared panel chrome ---------- */

.goldfish-panel-heading,
.goldfish-panel-head,
.goldfish-panel-meta,
.goldfish-progress-head,
.goldfish-chart-labels,
.goldfish-detail-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.goldfish-panel-heading {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.goldfish-panel-head {
  justify-content: space-between;
}

.goldfish-panel-meta {
  margin-left: auto;
  color: var(--text-2);
  font-size: 0.84rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.goldfish-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 0.7rem;
  font-weight: 700;
}

.goldfish-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-2);
  font-size: 0.7rem;
  font-style: italic;
  font-weight: 700;
  cursor: help;
}

.goldfish-info:hover,
.goldfish-info:focus-visible {
  color: var(--text-1);
  border-color: rgba(255, 255, 255, 0.3);
}

.goldfish-subheading {
  margin: 0 0 8px;
  color: var(--text-1);
  font-size: 0.92rem;
  font-weight: 700;
}

.goldfish-note {
  margin: 0;
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.5;
}

.goldfish-inline-action {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-2);
  cursor: pointer;
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
  transition:
    color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.goldfish-inline-action:hover,
.goldfish-inline-action:focus-visible {
  color: var(--text-1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* ---------- Main grid: 12 columns desktop ---------- */

.goldfish-main-grid {
  display: grid;
  gap: 24px;
}

/* The shared Current Deck panel is inserted immediately before the setup form.
   Keep it full-width when the desktop shell becomes a 12-column grid. */
.goldfish-main-grid > .deck-workspace {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.goldfish-configure-panel,
.goldfish-results-panel,
.goldfish-decklist-panel {
  min-width: 0;
}

/* ---------- Simulation Setup ---------- */

.goldfish-settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.goldfish-settings-grid .tool-field {
  display: grid;
  gap: 6px;
}

.goldfish-field-wide {
  grid-column: 1 / -1;
}

.goldfish-slider-field input[type="range"] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--accent);
}

.goldfish-slider-value {
  color: var(--accent-soft);
  font-size: 0.9rem;
}

.goldfish-engine-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.goldfish-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.goldfish-segment {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font: inherit;
}

.goldfish-segment.is-active {
  background: var(--accent);
  color: #111;
}

.goldfish-run-cta {
  width: 100%;
  margin-top: 16px;
}

.goldfish-textarea {
  min-height: 220px;
  max-height: 360px;
  resize: vertical;
}

.goldfish-deck-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

/* ---------- Results panel (single panel, four states) ---------- */

.goldfish-empty-state,
.goldfish-console-empty {
  margin: 0;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.015);
  padding: 18px;
  min-height: 220px;
}

.goldfish-results-loading {
  display: grid;
  gap: 12px;
  min-height: 220px;
  align-content: center;
}

.goldfish-progress {
  display: grid;
  gap: 8px;
}

.goldfish-progress[hidden] {
  display: none;
}

.goldfish-progress-head {
  justify-content: space-between;
  color: var(--text-2);
  font-size: 0.86rem;
}

.goldfish-progress-track,
.goldfish-bar-track,
.goldfish-hit-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.goldfish-progress-fill,
.goldfish-bar-fill,
.goldfish-hit-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}

.goldfish-results-complete {
  display: grid;
  gap: 14px;
}

.goldfish-summary-hero {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.goldfish-hero-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.goldfish-summary-hero strong {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--accent-soft);
}

.goldfish-summary-hero.is-strong strong {
  color: #8fe0b4;
}

.goldfish-summary-hero.is-medium strong {
  color: #f0c467;
}

.goldfish-summary-hero.is-weak strong {
  color: #f29a9a;
}

.goldfish-confidence-pill {
  align-self: center;
}

.goldfish-summary-hero.is-strong .goldfish-confidence-pill {
  background: rgba(104,181,136,0.18);
  color: #9ad9b3;
}

.goldfish-summary-hero.is-medium .goldfish-confidence-pill {
  background: rgba(232,168,56,0.18);
  color: #f0c467;
}

.goldfish-summary-hero.is-weak .goldfish-confidence-pill {
  background: rgba(220,60,60,0.18);
  color: #ffd4d4;
}

.goldfish-summary-hero p {
  margin: 0;
  color: var(--text-1);
  font-size: 0.96rem;
  font-weight: 700;
}

.goldfish-hit-bar {
  margin-top: 2px;
}

.goldfish-summary-hero.is-strong .goldfish-hit-bar-fill {
  background: linear-gradient(90deg, #68b588, #8fe0b4);
}

.goldfish-summary-hero.is-medium .goldfish-hit-bar-fill {
  background: linear-gradient(90deg, #c98a2c, #f0c467);
}

.goldfish-summary-hero.is-weak .goldfish-hit-bar-fill {
  background: linear-gradient(90deg, #c94f4f, #f29a9a);
}

.goldfish-summary-hero small {
  margin: 0;
  color: var(--text-2);
  font-size: 0.86rem;
}

.goldfish-insight-line {
  margin: 0;
  color: var(--text-1);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---------- Multi-target chips (Simulation Setup) ---------- */

.goldfish-target-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.goldfish-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px 5px 11px;
  border: 1px solid rgba(201, 168, 76, 0.32);
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--text-1);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
}

.goldfish-target-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goldfish-target-chip-remove {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.goldfish-target-chip-remove:hover,
.goldfish-target-chip-remove:focus-visible {
  background: rgba(220, 60, 60, 0.38);
  color: #fff;
}

.goldfish-target-help {
  color: var(--text-2);
  font-size: 0.76rem;
  line-height: 1.4;
}

/* ---------- Any-of per-target hit split ---------- */

.goldfish-target-split {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.goldfish-summary-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.goldfish-summary-card,
.goldfish-detail-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
}

.goldfish-summary-card strong {
  color: var(--accent-soft);
  font-size: 1.3rem;
  line-height: 1;
}

.goldfish-summary-card small,
.goldfish-detail-card p,
.goldfish-detail-card small {
  color: var(--text-2);
}

.goldfish-summary-card.is-muted strong,
.goldfish-summary-card.is-subtle strong {
  color: var(--text-1);
}

.goldfish-eyebrow {
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- More detail (collapsed by default) ---------- */

.goldfish-more-detail {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 12px;
}

.goldfish-more-detail-body {
  display: grid;
  gap: 18px;
  padding-top: 14px;
}

.goldfish-detail-block {
  display: grid;
  gap: 8px;
}

.goldfish-bar-list {
  display: grid;
  gap: 8px;
}

.goldfish-bar-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 60px;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
}

.goldfish-bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Top cards in winning lines ---------- */

.goldfish-card-bar-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.goldfish-card-bar-row {
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr) 52px;
}

.goldfish-card-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-1);
}

.goldfish-card-bar-row .goldfish-bar-fill {
  background: var(--accent);
}

.goldfish-card-bar-row:first-child .goldfish-bar-fill {
  background: var(--accent-soft);
}

.goldfish-chart-shell {
  min-height: 220px;
}

.goldfish-chart {
  width: 100%;
  height: 220px;
  display: block;
}

.goldfish-chart-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.goldfish-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.goldfish-chart-labels {
  justify-content: space-between;
  color: var(--text-2);
  font-size: 0.82rem;
}

.goldfish-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.goldfish-detail-card-head {
  justify-content: space-between;
  flex-wrap: wrap;
}

.goldfish-unresolved-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
}

.goldfish-lines {
  display: grid;
  gap: 8px;
}

.goldfish-lines details {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
  padding: 10px 12px;
}

.goldfish-lines summary {
  cursor: pointer;
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.goldfish-lines p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 0.88rem;
}

/* ---------- Winning lines console ---------- */

.goldfish-console {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.goldfish-console .goldfish-console-entry summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  list-style: none;
}

.goldfish-console .goldfish-console-entry summary::-webkit-details-marker {
  display: none;
}

.goldfish-console .goldfish-console-entry summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 0.72rem;
  transition: transform var(--transition);
}

.goldfish-console .goldfish-console-entry[open] summary::before {
  transform: rotate(90deg);
}

.goldfish-console-body {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.9;
}

.goldfish-console-hand {
  display: block;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--text-1);
}

.goldfish-console-hand strong {
  color: var(--accent-soft);
}

.goldfish-console-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.goldfish-console-tag {
  flex: none;
  min-width: 34px;
  color: var(--text-2);
  font-weight: 700;
}

.goldfish-console-tag.is-keep {
  color: var(--accent-soft);
}

.goldfish-console-tag.is-mulligan {
  color: var(--red-text);
}

.goldfish-console-verb {
  color: var(--accent-soft);
  font-weight: 700;
}

.goldfish-console-detail {
  color: var(--text-1);
}

/* The whole summary row reads as one interactive card: gold-tinted border,
   circular chevron that rotates on open, content tags previewing what's
   inside, and an explicit Show/Hide pill. */
.goldfish-trace-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.02));
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.goldfish-trace-summary:hover,
.goldfish-trace-summary:focus-visible {
  border-color: rgba(201, 168, 76, 0.5);
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.12), rgba(201, 168, 76, 0.04));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.goldfish-more-detail[open] .goldfish-trace-summary {
  border-color: rgba(201, 168, 76, 0.4);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  transform: none;
}

.goldfish-trace-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.16);
  color: var(--accent-soft);
  transition: transform var(--transition), background var(--transition);
}

.goldfish-trace-summary:hover .goldfish-trace-chevron {
  background: rgba(201, 168, 76, 0.28);
}

.goldfish-more-detail[open] .goldfish-trace-chevron {
  transform: rotate(90deg);
}

.goldfish-trace-summary-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.goldfish-trace-summary-title {
  color: var(--accent-soft);
  font-weight: 700;
  font-size: 0.94rem;
}

.goldfish-trace-summary-hint {
  color: var(--text-2);
  font-weight: 400;
  font-size: 0.78rem;
}

.goldfish-trace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.goldfish-trace-tag {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.goldfish-trace-toggle {
  flex-shrink: 0;
  padding: 5px 14px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 999px;
  color: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.goldfish-trace-toggle::after {
  content: "Show";
}

.goldfish-more-detail[open] .goldfish-trace-toggle::after {
  content: "Hide";
}

.goldfish-trace-summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 719px) {
  .goldfish-trace-tags {
    display: none;
  }
}

@media (min-width: 1040px) {
  .goldfish-page-shell .related-tool-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
  }
}

/* ---------- Desktop: 12-column grid, 5 / 7 split ---------- */

@media (min-width: 1024px) {
  .goldfish-main-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }

  .goldfish-configure-panel {
    grid-column: 1 / span 5;
    grid-row: 1;
  }

  .goldfish-results-panel {
    grid-column: 6 / span 7;
    grid-row: 1 / span 2;
  }

  .goldfish-decklist-panel {
    grid-column: 1 / span 5;
    grid-row: 2;
  }
}

@media (max-width: 1023px) {
  .goldfish-main-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  .goldfish-tool-shell {
    gap: 16px;
    padding: 16px;
  }

  .goldfish-main-grid {
    gap: 16px;
  }

  .goldfish-page-shell .tool-input,
  .goldfish-page-shell .tool-select,
  .goldfish-btn-primary,
  .goldfish-btn-secondary,
  .goldfish-file-label,
  .goldfish-games-stat {
    min-height: 48px;
  }

  .goldfish-import-row > * {
    flex: 1 1 auto;
  }

  .goldfish-panel-head {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 14px;
  }

  .goldfish-panel-meta {
    margin-left: 0;
    justify-content: flex-start;
  }

  .goldfish-deck-stats,
  .goldfish-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .goldfish-tool-shell {
    padding: 14px;
  }

  .goldfish-settings-grid,
  .goldfish-deck-stats,
  .goldfish-detail-grid,
  .goldfish-summary-grid {
    grid-template-columns: 1fr;
  }

  .goldfish-bar-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .goldfish-bar-value {
    text-align: left;
  }
}
