:root {
  color-scheme: light;
  --ink: #12161f;
  --muted: #647084;
  --line: rgba(20, 31, 49, 0.14);
  --paper: #f5f1e6;
  --panel: #fffdf7;
  --navy: #101a2b;
  --navy-soft: #17253b;
  --blue: #3778c8;
  --yellow: #f5ca3b;
  --accent: #5c9d50;
  --accent-dark: #2f6836;
  --accent-soft: #dfeccd;
  --ui: "Aptos", "Segoe UI", Arial, sans-serif;
  --display: "Arial Black", "Franklin Gothic Heavy", Impact, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 4%, rgba(55, 120, 200, 0.14), transparent 26rem),
    linear-gradient(135deg, #e7e1d2, #f9f7f0 48%, #e5ebf0);
  color: var(--ink);
  font-family: var(--ui);
}

button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  min-height: 100vh;
}

.control-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 22px 32px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.045), transparent 36%),
    var(--navy);
  color: #f8fbff;
  border-right: 1px solid rgba(255,255,255,0.1);
  box-shadow: 14px 0 44px rgba(15, 25, 42, 0.14);
}

.brand-block {
  padding: 22px;
  border: 1px solid rgba(245, 202, 59, 0.32);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 4%, rgba(245, 202, 59, 0.18), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.eyebrow, .section-kicker {
  margin: 0 0 7px;
  color: #f6d96d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow--dark { color: #4870a0; }

.brand-block h1 {
  margin: 0;
  color: white;
  font-family: var(--display);
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #244e85;
}

.brand-block > p:last-child {
  margin: 18px 0 0;
  color: rgba(240, 246, 255, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.control-section {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 20px;
  background: rgba(255,255,255,0.045);
}

.section-heading, .workspace-header, .art-browser__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2, .art-browser h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.section-kicker { color: #73a5df; }

.count-badge {
  display: inline-flex;
  min-width: 32px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid rgba(245, 202, 59, 0.36);
  border-radius: 999px;
  background: rgba(245, 202, 59, 0.1);
  color: #ffe274;
  font-weight: 800;
}

.field-label {
  display: block;
  margin: 17px 0 7px;
  color: rgba(240, 246, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.text-input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 13px;
  padding: 11px 13px;
  outline: none;
  background: rgba(5, 12, 23, 0.48);
  color: white;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
  border-color: #7fb2eb;
  box-shadow: 0 0 0 3px rgba(85, 144, 211, 0.18);
}

.pokemon-list {
  display: grid;
  gap: 5px;
  max-height: 280px;
  margin-top: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.pokemon-list::-webkit-scrollbar, .control-panel::-webkit-scrollbar, .art-carousel::-webkit-scrollbar { width: 8px; height: 8px; }
.pokemon-list::-webkit-scrollbar-thumb, .control-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 999px; }
.art-carousel::-webkit-scrollbar-thumb { background: rgba(25, 43, 68, 0.22); border-radius: 999px; }

.pokemon-option {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 8px 9px;
  background: transparent;
  color: rgba(244, 248, 255, 0.82);
  text-align: left;
}

.pokemon-option:hover { background: rgba(255,255,255,0.065); }
.pokemon-option.is-active {
  border-color: rgba(115, 165, 223, 0.45);
  background: linear-gradient(90deg, rgba(55,120,200,0.25), rgba(55,120,200,0.08));
  color: white;
}

.pokemon-option__number { color: #8aa3c1; font: 700 11px/1 var(--ui); }
.pokemon-option__name { font-size: 13px; font-weight: 750; }
.pokemon-option__cr { color: #f1d66c; font-size: 10px; font-weight: 800; }

.help-copy, .printing-status, .toggle-row small, .empty-note {
  color: rgba(237, 244, 255, 0.62);
  font-size: 12px;
  line-height: 1.5;
}

.printing-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(0,0,0,0.18);
}

.printing-status.is-error { color: #ffaaa2; }

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
}

.toggle-row input { margin-top: 3px; accent-color: #f5ca3b; }
.toggle-row strong { display: block; font-size: 13px; }
.toggle-row small { display: block; margin-top: 2px; }

.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.action-button, .round-button, .view-switch__button {
  border: 1px solid rgba(255,255,255,0.17);
  border-radius: 11px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.07);
  color: white;
  font-size: 12px;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.action-button:hover, .round-button:hover { transform: translateY(-1px); background: rgba(255,255,255,0.12); }
.action-button--primary { border-color: #f1cf56; background: #f1ca38; color: #1a2230; }
.action-button--primary:hover { background: #ffe16a; }
.action-button--quiet { grid-column: 1 / -1; padding: 7px; color: rgba(255,255,255,0.64); }
.action-button:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }

.deck-list { display: grid; gap: 6px; margin-top: 12px; }
.deck-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
  font-size: 12px;
}
.deck-item span { color: rgba(255,255,255,0.72); }
.deck-item button { border: 0; background: none; color: #ffaaa2; font-weight: 900; }

.workspace { min-width: 0; padding: 30px clamp(20px, 4vw, 58px) 54px; }
.workspace-header { max-width: 1180px; margin: 0 auto 22px; }
.workspace-header h2 { margin: 0; font-family: var(--display); font-size: clamp(23px, 3vw, 38px); letter-spacing: -0.035em; }

.view-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,0.68);
}

.view-switch__button { border: 0; padding: 8px 14px; background: transparent; color: #5a6575; }
.view-switch__button.is-active { background: #17253b; color: white; box-shadow: 0 4px 12px rgba(17, 31, 50, 0.18); }

.preview-layout {
  display: grid;
  grid-template-columns: minmax(330px, 460px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.card-stage {
  display: grid;
  justify-items: center;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid rgba(23, 37, 59, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.9), rgba(244,241,231,0.68) 58%, rgba(214,220,227,0.72)),
    repeating-linear-gradient(45deg, transparent 0 11px, rgba(15,35,62,0.025) 11px 12px);
  box-shadow: 0 24px 70px rgba(30, 43, 61, 0.14);
}

#cardMount { width: min(100%, 390px); perspective: 1200px; }
.card-hint { max-width: 360px; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }

.pokemon-card {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  overflow: hidden;
  border: clamp(7px, 1.8vw, 11px) solid #e8c83e;
  border-radius: 5.2% / 3.8%;
  background: #b7c98a;
  color: #111820;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.72) inset,
    0 0 0 2px rgba(63, 49, 7, 0.34),
    0 24px 38px rgba(19, 28, 42, 0.27);
  isolation: isolate;
}

.pokemon-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 18%, rgba(255,255,255,0.18) 33%, transparent 48%);
  mix-blend-mode: screen;
  opacity: 0.52;
}

.pokemon-card__scan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.pokemon-card--template {
  border: 0;
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(28, 30, 25, 0.35), 0 24px 38px rgba(19, 28, 42, 0.27);
}

.template-card__defence {
  position: absolute;
  z-index: 2;
  top: 3.1%;
  right: 14.4%;
  width: 29%;
  height: 5.7%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2.5%;
  padding: 0 1%;
  background: color-mix(in srgb, var(--accent-soft) 94%, white);
  color: #111820;
  box-shadow: 0 0 3px 2px color-mix(in srgb, var(--accent-soft) 88%, transparent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(6px, 1.25vw, 8px);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.template-card__defence strong { font-size: clamp(12px, 2.85vw, 18px); letter-spacing: -0.06em; }
.template-card__stat-divider { margin-inline: 1%; color: rgba(0,0,0,0.4); }

.template-card__rules {
  position: absolute;
  z-index: 2;
  top: 54.5%;
  left: 6.2%;
  right: 6.2%;
  bottom: 8.7%;
  display: flex;
  flex-direction: column;
  padding: 3.2% 3.5% 2.7%;
  overflow: hidden;
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.26), transparent 35%),
    color-mix(in srgb, var(--accent-soft) 95%, white);
  color: #111820;
  box-shadow: 0 0 7px 5px color-mix(in srgb, var(--accent-soft) 92%, transparent);
}

.template-card__stamp {
  margin-top: auto;
  padding-top: 1.2%;
  border-top: 1px solid rgba(0,0,0,0.22);
  font-size: clamp(5.5px, 1.15vw, 7px);
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.attack-row__full { display: none; }

.pokemon-card--expanded .template-card__rules {
  top: 42%;
  bottom: 6.8%;
  padding: 2.8% 3.5% 2.4%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0.16) 30%, rgba(255,255,255,0.09)),
    color-mix(in srgb, var(--accent-soft) 28%, transparent);
  border: 1px solid rgba(255,255,255,0.34);
  box-shadow: 0 2px 8px rgba(15,20,24,0.14), 0 0 1px rgba(255,255,255,0.65) inset;
  -webkit-backdrop-filter: blur(2.4px) saturate(0.88) brightness(1.08);
  backdrop-filter: blur(2.4px) saturate(0.88) brightness(1.08);
  text-shadow: 0 1px 1px rgba(255,255,255,0.92), 0 0 3px rgba(255,255,255,0.75);
}

.pokemon-card--expanded .trait-line__label {
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  text-shadow: none;
}

.pokemon-card--art-forward .template-card__rules {
  -webkit-backdrop-filter: blur(0.65px) saturate(0.94) brightness(1.05);
  backdrop-filter: blur(0.65px) saturate(0.94) brightness(1.05);
}

.pokemon-card--expanded .attack-row { padding-block: 1.6%; }
.pokemon-card--expanded .attack-row__full {
  display: inline;
  font-size: clamp(6.4px, 1.32vw, 8.5px);
  font-weight: 650;
  line-height: 1.18;
}
.pokemon-card--expanded .attack-row__short { display: none; }
.pokemon-card--expanded.is-shorthand .attack-row__full { display: none; }
.pokemon-card--expanded.is-shorthand .attack-row__short { display: inline; }
.pokemon-card--expanded.is-shorthand .template-card__rules { top: 48%; }

.pokemon-card--template.pokemon-card--dense .template-card__rules { padding-top: 2%; }
.pokemon-card--template.pokemon-card--dense .attack-row { padding-block: 1.6%; }
.pokemon-card--template.pokemon-card--dense .attack-row__name { font-size: clamp(8px, 1.85vw, 11px); }
.pokemon-card--template.pokemon-card--dense .attack-row__rules { font-size: clamp(6px, 1.25vw, 7.8px); }
.pokemon-card--template.pokemon-card--very-dense .template-card__rules { padding: 1.6% 2.6%; }
.pokemon-card--template.pokemon-card--very-dense .attack-row { padding-block: 0.8%; }
.pokemon-card--template.pokemon-card--very-dense .attack-row__name { font-size: clamp(7px, 1.55vw, 9.5px); }
.pokemon-card--template.pokemon-card--very-dense .attack-row__rules { font-size: clamp(5.3px, 1.08vw, 6.8px); }

.pokemon-card__fallback-art {
  position: absolute;
  inset: 9% 6% 41%;
  width: 88%;
  height: 50%;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,0.24));
}

.pokemon-card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--accent-soft) 92%, white) 0 13%,
    transparent 14% 52%,
    color-mix(in srgb, var(--accent-soft) 94%, white) 55% 100%);
}

.pokemon-card__header {
  position: absolute;
  z-index: 2;
  inset: 2.8% 4.5% auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
  min-height: 8.8%;
  padding: 1.5% 2.5% 1.8%;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), color-mix(in srgb, var(--accent-soft) 76%, white));
  box-shadow: 0 2px 5px rgba(0,0,0,0.32);
}

.pokemon-card__stage {
  align-self: center;
  padding: 3px 7px;
  border: 1px solid rgba(0,0,0,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  font-size: clamp(7px, 1.5vw, 10px);
  font-weight: 950;
  font-style: italic;
  text-transform: uppercase;
}

.pokemon-card__name {
  overflow: hidden;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(16px, 4.2vw, 25px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-card__defence {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  font-size: clamp(8px, 1.8vw, 11px);
  font-weight: 900;
}

.pokemon-card__defence strong { font-size: clamp(15px, 3.7vw, 23px); }
.pokemon-card__defence .defence-separator { color: rgba(0,0,0,0.34); }

.pokemon-card__art-frame {
  position: absolute;
  z-index: 1;
  inset: 14.5% 6% auto;
  height: 38.5%;
  border: 3px solid rgba(229,231,219,0.92);
  outline: 1px solid rgba(18, 28, 40, 0.7);
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-soft) 68%, white);
  box-shadow: 0 4px 8px rgba(0,0,0,0.34);
}

.pokemon-card__art-crop {
  position: absolute;
  inset: -26% -7% -58%;
  width: 114%;
  height: 184%;
  object-fit: cover;
}

.pokemon-card__art-fallback { inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 3%; background: rgba(255,255,255,0.2); }

.pokemon-card__species-strip {
  position: absolute;
  z-index: 3;
  top: 52.1%;
  left: 7%;
  right: 7%;
  overflow: hidden;
  padding: 1.3% 3%;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9faf8, #c8ced1 55%, #f3f4ee);
  box-shadow: 0 2px 4px rgba(0,0,0,0.32);
  font-size: clamp(7px, 1.45vw, 9px);
  font-weight: 750;
  letter-spacing: 0.055em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.pokemon-card__rules {
  position: absolute;
  z-index: 2;
  inset: 57% 6% 8%;
  display: flex;
  flex-direction: column;
  padding: 3% 3.5% 2.5%;
  border: 1px solid rgba(0,0,0,0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.54), rgba(255,255,255,0.12)),
    color-mix(in srgb, var(--accent-soft) 88%, white);
  box-shadow: 0 1px 4px rgba(255,255,255,0.7) inset;
}

.trait-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 13%;
  margin-bottom: 2%;
  color: #8f2630;
  font-size: clamp(7px, 1.65vw, 10px);
  font-weight: 900;
}

.trait-line__label {
  padding: 2px 5px;
  border-radius: 999px;
  background: #a7353d;
  color: white;
  font-size: 0.72em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.attack-list { display: grid; align-content: start; gap: 1%; min-height: 0; }

.attack-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  padding: 2.5% 1%;
  border-top: 1px solid rgba(26, 44, 42, 0.22);
}

.attack-row:first-child { border-top: 0; }
.attack-row__name { font-family: var(--display); font-size: clamp(9px, 2.25vw, 14px); line-height: 1; }
.attack-row__rules { font-size: clamp(6.5px, 1.5vw, 9.2px); font-weight: 700; line-height: 1.15; }
.attack-row__kind { color: rgba(0,0,0,0.48); font-size: 0.78em; text-transform: uppercase; }

.pokemon-card__footer {
  position: absolute;
  z-index: 3;
  inset: auto 7% 2.4%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 1.2%;
  border-top: 1px solid rgba(0,0,0,0.3);
  font-size: clamp(6px, 1.35vw, 8.4px);
  font-weight: 800;
  text-transform: uppercase;
}

.pokemon-card-back {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  overflow: hidden;
  border: clamp(7px, 1.8vw, 11px) solid #e8c83e;
  border-radius: 5.2% / 3.8%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(21,68,133,0.25) 18.5% 20%, transparent 20.5% 29%, rgba(62,130,205,0.44) 30% 35%, transparent 36%),
    repeating-radial-gradient(ellipse at 52% 48%, #1f5bac 0 7%, #174587 7.5% 11%, #2b73c2 12% 17%);
  color: #f5cf38;
  box-shadow: 0 0 0 2px rgba(36, 28, 8, 0.35), 0 24px 38px rgba(19, 28, 42, 0.27);
}

.pokemon-card-back::before, .pokemon-card-back::after {
  content: "POKéMON";
  position: absolute;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%) rotate(-7deg);
  font-family: var(--display);
  font-size: clamp(32px, 9vw, 58px);
  letter-spacing: -0.08em;
  text-shadow: -3px 0 #2e5da8, 3px 0 #2e5da8, 0 3px #2e5da8, 0 6px 0 #102d5d;
}
.pokemon-card-back::before { top: 9%; }
.pokemon-card-back::after { content: "FIELD CARD"; top: auto; bottom: 7%; font-size: clamp(19px, 5.4vw, 34px); letter-spacing: -0.04em; }

.pokemon-card--dense .pokemon-card__rules { padding-top: 2%; }
.pokemon-card--dense .attack-row { padding-block: 1.8%; }
.pokemon-card--dense .attack-row__name { font-size: clamp(8px, 1.9vw, 12px); }
.pokemon-card--dense .attack-row__rules { font-size: clamp(6px, 1.3vw, 8px); }
.pokemon-card--very-dense .pokemon-card__rules { padding: 1.8% 2.8%; }
.pokemon-card--very-dense .trait-line { min-height: 9%; margin-bottom: 1%; }
.pokemon-card--very-dense .attack-row { padding-block: 1.1%; }
.pokemon-card--very-dense .attack-row__name { font-size: clamp(7px, 1.65vw, 10px); }
.pokemon-card--very-dense .attack-row__rules { font-size: clamp(5.4px, 1.14vw, 7px); }

.card-back-ball {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-10deg);
  border: 8px solid #f3f4e9;
  border-radius: 50%;
  background: linear-gradient(to bottom, #d33b37 0 45%, #141b26 45% 55%, #f1f0e7 55% 100%);
  box-shadow: 0 0 0 5px #122a5a, 0 10px 24px rgba(0,0,0,0.4);
}
.card-back-ball::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 27%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 6px solid #151d29;
  border-radius: 50%;
  background: #f9faf4;
}

.art-browser {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(23,37,59,0.12);
  border-radius: 26px;
  background: rgba(255,253,247,0.75);
  box-shadow: 0 20px 50px rgba(30,43,61,0.09);
}
.art-browser h3 { font-size: 23px; }
.carousel-actions { display: flex; gap: 7px; }
.round-button { width: 38px; height: 38px; padding: 0; border-color: rgba(23,37,59,0.14); border-radius: 50%; background: white; color: #16263d; font-size: 18px; }
.round-button:disabled { cursor: not-allowed; opacity: 0.35; }

.art-carousel {
  display: flex;
  gap: 13px;
  min-height: 205px;
  margin-top: 18px;
  padding: 5px 4px 13px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  outline: none;
}

.art-option {
  position: relative;
  flex: 0 0 122px;
  scroll-snap-align: center;
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background: #d8dde4;
  box-shadow: 0 7px 16px rgba(30,42,60,0.14);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.art-option:hover { transform: translateY(-3px); }
.art-option.is-active { border-color: #e9bd22; box-shadow: 0 0 0 2px #17335d, 0 11px 24px rgba(30,42,60,0.2); }
.art-option img { display: block; width: 100%; aspect-ratio: 2.5 / 3.5; object-fit: cover; }
.art-option__fallback { display: grid; place-items: center; width: 100%; aspect-ratio: 2.5 / 3.5; background: linear-gradient(135deg, #d9e6f4, #f4e4a7); color: #29486e; font-weight: 900; }

.carousel-empty {
  display: grid;
  flex: 1 0 100%;
  place-items: center;
  min-height: 190px;
  border: 1px dashed rgba(23,37,59,0.2);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.printing-meta {
  min-height: 58px;
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #edf1f5;
  color: #4e5d70;
  font-size: 12px;
  line-height: 1.45;
}
.printing-meta strong { display: block; color: #162338; font-size: 14px; }

.print-root { display: none; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .control-panel { position: relative; height: auto; }
  .preview-layout { grid-template-columns: 1fr; }
  #cardMount { max-width: 400px; }
}

@media (max-width: 560px) {
  .workspace { padding: 22px 12px 38px; }
  .workspace-header { align-items: flex-end; }
  .workspace-header h2 { font-size: 23px; }
  .preview-layout { gap: 18px; }
  .card-stage, .art-browser { border-radius: 20px; padding: 16px; }
  .art-option { flex-basis: 105px; }
}

@page { size: A4 portrait; margin: 7mm; }

@media print {
  body { background: white !important; }
  .app-shell { display: none !important; }
  .print-root { display: block !important; }
  .print-sheet {
    display: grid;
    grid-template-columns: repeat(3, 63.5mm);
    grid-auto-rows: 88.9mm;
    justify-content: center;
    align-content: start;
    gap: 2mm;
    width: 196mm;
    min-height: 283mm;
    break-after: page;
    page-break-after: always;
  }
  .print-sheet:last-child { break-after: auto; page-break-after: auto; }
  .print-card-slot { width: 63.5mm; height: 88.9mm; overflow: hidden; }
  .print-card-slot .pokemon-card, .print-card-slot .pokemon-card-back { width: 63.5mm; height: 88.9mm; box-shadow: none; }
  .print-sheet--backs { direction: rtl; }
  .print-sheet--backs .print-card-slot { direction: ltr; }
}
