/* Botanical folio: live interface. The historical design gallery keeps its own type. */
@font-face {
  font-family: 'EB Garamond';
  src: url('/src/design-lab/assets/eb-garamond.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/src/design-lab/assets/eb-garamond-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/src/design-lab/assets/dm-sans.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
/* Arabic glyphs join the same families, so every existing font stack covers Arabic.
   Browsers fetch these files only when Arabic text is on the page. */
@font-face {
  font-family: 'DM Sans';
  src: url('/src/design-lab/assets/noto-sans-arabic.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/src/design-lab/assets/noto-naskh-arabic.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: Fraunces;
  src: url('/src/design-lab/assets/noto-naskh-arabic.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
/* Letter spacing breaks the joins between Arabic letters. */
:lang(ar) * {
  letter-spacing: normal !important;
}

:root {
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --ink: #f0ecdd;
  --muted: #c1c9b9;
  --quiet: #aeb9a7;
  --paper: #eee7d3;
  --paper-ink: #263b32;
  --accent: #ddc99d;
  --line: #52624d;
  --text-caption: 0.8125rem;
  --text-control: 0.9375rem;
  --text-body: 1rem;
  font-family: var(--sans);
  font-size: 16px;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  text-wrap: pretty;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.04;
}
h2 {
  font-size: 36px;
  line-height: 1.12;
}
h3 {
  font-size: 28px;
  line-height: 1.18;
}
button,
input,
select,
textarea {
  font-family: var(--sans);
}
button {
  transition:
    background-color 120ms ease,
    color 120ms ease,
    border-color 120ms ease;
}
::selection {
  background: var(--accent);
  color: var(--paper-ink);
}
.eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.6;
}
.experience {
  max-width: 1480px;
}
.experience::before {
  opacity: 0.11;
}
.test-mode-bar {
  padding: 9px 36px;
  background: #142c23;
  color: var(--muted);
  border-bottom: 1px solid #52624d70;
  font-size: 12px;
  letter-spacing: 0;
}
.test-mode-bar > span:first-child {
  font-weight: 400;
  letter-spacing: 0;
}
.game-header {
  margin-inline: 52px;
  padding-block: 28px;
  gap: 28px;
}
.brand {
  gap: 14px;
}
.brand b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 31px;
  letter-spacing: 0.1em;
}
.brand small {
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: 0.025em;
  text-align: start;
}
.game-header nav {
  gap: 24px;
}
.game-header nav button {
  font-family: var(--serif);
  font-size: 22px;
  min-width: 0;
  padding: 10px 2px;
  color: var(--muted);
}
.game-header nav button.active {
  color: var(--paper);
  border-color: var(--paper);
}
.wallet {
  gap: 20px;
}
.wallet-value {
  font-size: 15px;
  gap: 7px;
}
.wallet-value small {
  font-size: 12px;
}
.wallet-value strong {
  font-variant-numeric: tabular-nums;
}
.profile-button {
  width: 44px;
  height: 44px;
  font-family: var(--serif);
  font-size: 24px;
  border-radius: 50%;
}
.experience main {
  padding: 46px 52px 0;
}
.primary,
.secondary,
.button-link {
  border-radius: 2px;
  min-height: 48px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 400;
  gap: 14px;
  line-height: 1.4;
}
.primary {
  font-family: var(--serif);
  font-size: 21px;
  background: var(--paper);
  border-color: var(--paper);
  color: var(--paper-ink);
}
.primary:hover:not(:disabled) {
  background: #fff5df;
  border-color: #fff5df;
  filter: none;
}
.secondary {
  background: transparent;
  border-color: #829078;
}
.secondary:hover:not(:disabled) {
  background: #edf1de09;
  border-color: var(--paper);
}
.text-button {
  min-height: 44px;
  padding: 10px 2px;
  font-size: 14px;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: #aeb9a780;
}
.text-button:hover:not(:disabled),
a:hover {
  text-decoration-color: currentColor;
}

/* Cover spread: an opening page and one complete specimen plate. */
.garden-cover {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(50px, 8vw, 130px);
  padding: 12px 24px 68px;
}
.cover-copy {
  padding-block: 26px;
}
.cover-copy h1 {
  font-size: clamp(76px, 8vw, 116px);
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.cover-copy h1 em {
  display: block;
  font-weight: 400;
  margin-inline-start: 0.18em;
}
.cover-intro {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
  max-width: 37ch;
  margin: 34px 0 28px;
  color: var(--ink);
}
.cover-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}
.cover-actions .primary {
  min-height: 52px;
}
.cover-footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 25px;
}
.cover-plate {
  margin: 0;
  padding: 24px 30px 28px;
  color: var(--paper-ink);
  background: var(--paper);
  position: relative;
  box-shadow: 10px 12px 0 #071c1640;
}
.plate-topline {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-family: var(--serif);
  font-size: 16px;
  border-bottom: 1px solid #75836b66;
  padding-bottom: 13px;
}
.plate-topline > span:last-child {
  font-style: italic;
}
.cover-specimen-button {
  display: block;
  width: 100%;
  padding: 10px 0 0;
  background: transparent;
  color: inherit;
}
.cover-specimen {
  width: 100%;
  aspect-ratio: 1;
  max-width: 340px;
  margin-inline: auto;
}
.cover-plate figcaption {
  text-align: center;
  padding-top: 4px;
}
.plate-family {
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.cover-plate h2 {
  font-size: 38px;
  font-style: italic;
  margin: 7px 0 5px;
}
.cover-plate figcaption p {
  font-size: 13px;
  line-height: 1.6;
}

/* The starter decks are a contents list, with the action next to its subject. */
.deck-choice {
  padding: 0;
  scroll-margin-top: 30px;
  outline-offset: 8px;
}
.catalogue-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.catalogue-heading h2 {
  font-size: 39px;
}
.catalogue-heading > p {
  max-width: 28ch;
  color: var(--muted);
  font-size: 14px;
}
.preset-grid {
  display: block;
  margin: 0;
}
.deck-panel {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 23px 0;
  border: 0;
  border-top: 1px solid #52624d9e;
  border-radius: 0;
  background: none;
  overflow: visible;
}
.deck-panel::before {
  display: none;
}
.deck-panel .deck-emblem {
  width: 104px;
  height: 104px;
  margin: 0;
}
.deck-description .eyebrow {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}
.deck-description h3 {
  font-size: 32px;
  margin-bottom: 9px;
}
.deck-description > p:last-child {
  font-size: 15px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.65;
}
.deck-panel > .secondary {
  white-space: nowrap;
  justify-self: end;
}
.catalogue-bottom {
  display: flex;
  justify-content: flex-end;
  gap: 30px;
  padding-block: 13px 24px;
  border-top: 1px solid var(--line);
}
.duel-tools {
  margin-block: 24px;
  border-block: 1px solid #52624d80;
}
.duel-tools summary {
  cursor: pointer;
  width: fit-content;
  min-height: 48px;
  padding-block: 14px;
  font-size: 14px;
  color: var(--muted);
}
.duel-tools[open] summary {
  color: var(--paper);
}
.duel-tools .game-toolbar {
  margin: 0 0 20px;
  gap: 12px 24px;
}
.game-toolbar .text-button,
.game-toolbar .secondary {
  font-size: 14px;
}
.pool-choice {
  font-size: 14px;
  margin: 0;
}

/* Titles and catalogue tabs share the same editorial hierarchy. */
.battle-heading,
.collection-heading,
.shop-heading {
  align-items: end;
  margin-bottom: 34px;
  gap: 30px;
}
.collection-heading > div:first-child > p:last-child,
.shop-heading > div:first-child > p:last-child {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 49ch;
  margin-top: 19px;
}
.collection-count {
  font-family: var(--serif);
}
.collection-count strong {
  font-weight: 400;
  font-size: 54px;
}
.collection-count span,
.collection-count small {
  font-size: 14px;
}
.catalogue-tools {
  align-items: center;
  gap: 24px;
  margin-bottom: 34px;
}
.filters {
  gap: 25px;
  flex-wrap: wrap;
}
.filters button {
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  font-size: 15px;
  background: transparent;
  color: var(--muted);
}
.filters button.active {
  border-bottom-color: var(--paper);
  background: transparent;
  color: var(--paper);
}
.catalogue-tools input {
  font-size: 16px;
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

/* Specimens: one quiet paper surface, enough space to read the actual rules. */
.live-collection-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 35px 26px;
}
.botanical-card,
.live-collection-grid .botanical-card {
  border-radius: 2px;
  background: var(--paper);
  border: 1px solid #baae93;
  padding: 24px 18px 18px;
  box-shadow: 0 2px 4px #071b1829;
  transform: none;
  min-height: 378px;
}
.botanical-card::after {
  display: none;
}
.botanical-card:hover {
  transform: none;
  border-color: var(--accent);
  box-shadow: 0 4px 12px #0003;
}
.specimen-number {
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: #546349;
  pointer-events: none;
}
.botanical-card .card-cost {
  top: 16px;
  left: 15px;
  font-size: 14px;
}
.botanical-card .card-family {
  top: 17px;
  right: 15px;
}
.botanical-card .card-art,
.live-collection-grid .card-art {
  margin: 16px auto 0;
  width: 100%;
  max-width: 180px;
}
.botanical-card .card-name,
.live-collection-grid .card-name {
  font-size: 27px;
  font-weight: 500;
  line-height: 1.08;
  min-height: 58px;
  margin: 7px 0 12px;
  letter-spacing: -0.02em;
}
.botanical-card .card-rule,
.live-collection-grid .card-rule {
  font-size: 14px;
  line-height: 1.6;
  color: #405440;
  min-height: 68px;
  max-width: none;
  padding: 0;
  margin-bottom: 16px;
}
.botanical-card .card-power {
  width: 100%;
  justify-content: center;
  border-top: 1px solid #75836b66;
  padding-top: 10px;
  font-size: 27px;
}
.botanical-card .card-power small {
  font-family: var(--sans);
  font-size: 12px;
  color: #405440;
}
.botanical-card.selected {
  outline: 2px solid var(--accent);
  box-shadow:
    0 0 0 4px #10251f,
    0 0 0 5px var(--accent);
}
.collection-specimen > p,
.collection-specimen > .text-button {
  font-size: 13px;
}
.copy-stepper {
  margin-block: 12px 0;
}
.copy-stepper button {
  border-radius: 2px;
}
.deck-actions {
  padding-block: 0 25px;
  border-bottom: 1px solid var(--line);
}
.deck-actions p {
  font-size: 14px;
}
.locked-specimen .botanical-card {
  background: #ddd9c6;
}

/* The board remains a night garden; its surrounding text is a working notebook. */
.battle-heading h1 {
  font-size: 52px;
}
.battle-heading .eyebrow {
  font-size: 12px;
}
.match-score small {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.match-score strong {
  font-size: 42px;
  font-variant-numeric: tabular-nums;
}
.connection-note {
  font-size: 13px;
  max-width: 80ch;
  line-height: 1.6;
}
.page-garden:not(.cover-page) .duel-tools {
  margin-block: 0 20px;
}
.garden-board {
  border-radius: 100px 100px 3px 3px;
}
.garden-caption {
  font-size: 14px;
  line-height: 1.6;
  padding-top: 16px;
}
.grove-title small,
.side-caption {
  font-size: 11px;
  letter-spacing: 0.08em;
}
.live-battle-layout .control-line > span,
.control-line .control-name {
  font-size: 11px;
}
.live-battle-layout .unit-age {
  font-size: 11px;
}
.live-battle-layout .hand-heading h2 {
  font-size: 32px;
}
.live-battle-layout .hand-heading > span:not(.deck-back) {
  font-size: 13px;
}
.live-battle-layout .hand-slot .botanical-card {
  padding: 25px 12px 14px;
  min-height: 310px;
}
.live-battle-layout .hand-slot .card-art {
  margin-top: 10px;
  max-width: 105px;
}
.live-battle-layout .hand-slot .card-name {
  font-size: 23px;
  min-height: 48px;
}
.live-battle-layout .hand-slot .card-rule {
  font-size: 13px;
  line-height: 1.6;
  min-height: 62px;
  max-height: 63px;
}
.card-info {
  font-size: 13px;
  min-height: 44px;
}
.hand-cards:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.hand-section .plan-actions {
  border-radius: 2px;
  padding: 15px;
}
.live-battle-layout .plan-actions .primary {
  font-size: 21px;
}
.live-battle-layout .plan-actions .secondary,
.live-battle-layout .plan-actions .text-button {
  font-size: 13px;
}
.live-battle-layout .energy-meter,
.live-battle-layout .energy-meter > span {
  font-size: 13px;
}
.lesson-panel,
.result-panel,
.reveal-strip {
  border-radius: 2px;
  box-shadow: none;
}
.lesson-panel > p,
.result-panel > p,
.reveal-strip {
  font-size: 14px;
  line-height: 1.65;
}
.reveal-strip strong {
  font-size: 15px;
}
.reveal-strip {
  display: block;
  background: transparent;
  border: 0;
  border-block: 1px solid var(--line);
  padding: 0 14px;
}
.reveal-strip summary {
  min-height: 44px;
  padding-block: 11px;
  cursor: pointer;
  color: var(--accent);
  font-size: 14px;
  line-height: 1.6;
}
.reveal-details {
  display: grid;
  gap: 10px;
  padding-block: 3px 18px;
}
.reveal-details p {
  font-size: 14px;
  line-height: 1.65;
}
.round-journal summary {
  font-size: 28px;
}
.round-journal ol {
  font-size: 14px;
  line-height: 1.8;
}

/* Shop as a nursery catalogue, with explicit test prices and ownership. */
.shop-promise {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 22ch;
}
.shop-feature {
  border-radius: 2px;
  box-shadow: none;
  border-color: var(--line);
  margin-block: 0 36px;
}
.feature-copy {
  padding: 40px;
}
.shop-feature h2 {
  font-size: clamp(36px, 3.8vw, 53px);
  max-width: 17ch;
}
.feature-copy > p:not(.eyebrow) {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  margin-block: 20px;
  max-width: 40ch;
}
.feature-facts {
  gap: 26px;
  margin-block: 26px;
}
.feature-facts span {
  font-size: 13px;
}
.feature-facts b {
  font-size: 32px;
  font-weight: 400;
}
.feature-copy small {
  font-size: 13px;
  line-height: 1.6;
}
.product-actions {
  gap: 12px;
}
.product-actions .primary {
  font-family: var(--sans);
  font-size: 14px;
  padding-inline: 15px;
}
.product-actions .secondary {
  font-size: 14px;
}
.shop-grid {
  gap: 42px 30px;
}
.shop-product {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.product-image-button {
  border-radius: 2px;
}
.product-copy {
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.product-copy h2 {
  font-size: 35px;
}
.product-copy .eyebrow {
  font-size: 12px;
  margin-bottom: 10px;
}
.shop-product .product-copy > p:not(.eyebrow) {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin-block: 13px;
}
.collection-fact,
.owned-label {
  font-size: 13px;
}
.product-copy > small {
  font-size: 13px;
  line-height: 1.6;
}
.set-seal {
  border-radius: 2px;
  font-family: var(--serif);
}
.set-seal small,
.feature-art .set-seal small {
  font-size: 10px;
  letter-spacing: 0.025em;
}
.garden-product > span {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.back-wordmark {
  font-size: 10px;
}
.shop-principles {
  border-block: 1px solid var(--line);
  padding-block: 30px;
  gap: 40px;
}
.shop-principles h3 {
  font-size: 27px;
}
.shop-principles p {
  font-size: 14px;
  line-height: 1.7;
}
.shop-principles .icon {
  display: none;
}

/* Dialogs and the colophon inherit the same typography, without display copy. */
.live-dialog {
  border-radius: 2px;
  padding: 34px;
  border-color: #7d8a70;
}
.live-dialog h2 {
  font-size: 39px;
}
.live-dialog > p,
.live-dialog .specimen-detail p {
  font-size: 16px;
  line-height: 1.65;
}
.live-dialog .dialog-lead {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.4;
}
.live-dialog .primary {
  font-size: 21px;
}
.live-dialog .secondary {
  font-size: 15px;
}
.live-dialog .hint,
.hint {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
}
.live-dialog .purchase-note,
.live-dialog .dialog-kicker {
  font-size: 14px;
  line-height: 1.6;
}
.live-dialog .dialog-close {
  border-radius: 2px;
}
.account-form label {
  font-size: 14px;
}
.account-form input,
.live-dialog > input,
.live-dialog textarea {
  border-radius: 2px;
}
.receipt p {
  font-size: 14px;
}
.receipt-id {
  font-size: 12px;
}
.receipt-details summary {
  padding-block: 10px;
  min-height: 44px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.card-roster .roster-card summary small {
  font-size: 13px;
}
.card-roster .roster-card p {
  font-size: 15px;
}
.game-footer {
  margin: 55px 52px 0;
  padding-block: 25px 30px;
  color: var(--muted);
  font-size: 13px;
  gap: 25px;
}
.game-footer > span {
  font-family: var(--serif);
  font-size: 18px;
}
.footer-links a,
.footer-links .text-button {
  font-size: 13px;
}
.notice-tray {
  border-radius: 2px;
}

@media (min-width: 1101px) {
  .experience:has(.live-battle-layout) .game-header {
    padding-block: 16px;
  }
  .experience main:has(.live-battle-layout) {
    padding-top: 24px;
  }
  .page-garden:has(.live-battle-layout) .battle-heading {
    margin-bottom: 18px;
  }
  .page-garden:has(.live-battle-layout) .battle-heading h1 {
    font-size: 42px;
  }
  .page-garden:has(.live-battle-layout) .duel-tools {
    margin-bottom: 12px;
  }
  .page-garden:has(.live-battle-layout) .duel-tools summary {
    min-height: 40px;
    padding-block: 10px;
  }
  .page-garden:has(.live-battle-layout) .connection-note {
    margin-bottom: 16px;
  }
  .live-battle-layout:not(:has(.opening-note)) {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-heading {
    margin: 0 2px 12px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-cards {
    max-height: clamp(370px, calc(100dvh - 480px), 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 4px 8px 8px;
    margin-bottom: 14px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .botanical-card {
    min-height: 270px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-rule {
    font-size: 13px;
    line-height: 1.6;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions {
    position: static;
    gap: 8px;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .primary {
    grid-column: auto;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .secondary {
    padding-inline: 8px;
  }
}
@media (min-width: 1600px) {
  .live-collection-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .game-header {
    margin-inline: 30px;
    gap: 22px;
  }
  .game-header nav {
    gap: 20px;
  }
  .game-header nav button {
    font-size: 20px;
  }
  .experience main {
    padding-inline: 30px;
  }
  .garden-cover {
    padding-inline: 0;
    gap: 50px;
  }
  .cover-copy h1 {
    font-size: 89px;
  }
  .cover-intro {
    font-size: 22px;
  }
  .cover-plate {
    padding: 20px;
  }
  .live-collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .deck-panel {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    gap: 20px;
  }
  .deck-panel .deck-emblem {
    width: 80px;
    height: 80px;
  }
  .deck-description h3 {
    font-size: 28px;
  }
  .feature-copy {
    padding: 28px;
  }
  .game-footer {
    margin-inline: 30px;
  }
}
@media (max-width: 800px) {
  .game-header {
    flex-wrap: wrap;
    padding-block: 22px 15px;
  }
  .game-header nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 22px;
  }
  .game-header nav button {
    font-size: 22px;
    min-width: 0;
    padding-inline: 0;
  }
  .experience main {
    padding-top: 35px;
  }
  .garden-cover {
    gap: 35px;
    padding-bottom: 48px;
  }
  .cover-copy h1 {
    font-size: 74px;
  }
  .cover-intro {
    font-size: 21px;
    margin-block: 24px;
  }
  .cover-actions {
    gap: 8px 22px;
  }
  .cover-footnote {
    font-size: 12px;
    margin-top: 18px;
  }
  .cover-plate {
    padding: 20px 16px;
  }
  .plate-topline {
    font-size: 14px;
  }
  .cover-plate h2 {
    font-size: 32px;
  }
  .deck-panel {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 16px;
  }
  .deck-panel .deck-emblem {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .deck-description {
    grid-column: 2;
  }
  .deck-panel > .secondary {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }
  .catalogue-heading {
    align-items: start;
  }
  .catalogue-heading h2 {
    font-size: 34px;
  }
  .collection-heading > div:first-child > p:last-child,
  .shop-heading > div:first-child > p:last-child {
    font-size: 21px;
  }
  .live-collection-grid {
    gap: 28px 18px;
  }
  .live-collection-grid .botanical-card {
    padding-inline: 14px;
  }
  .live-collection-grid .card-name {
    font-size: 25px;
  }
  .live-collection-grid .card-rule {
    font-size: 13px;
  }
  .shop-grid {
    gap: 32px 24px;
  }
  .shop-heading h1,
  .collection-heading h1 {
    font-size: 54px;
  }
  .shop-promise {
    max-width: 18ch;
  }
  .live-dialog .specimen-detail p {
    font-size: 15px;
  }
}
@media (max-width: 580px) {
  .test-mode-bar {
    display: flex;
    padding: 8px 20px;
    font-size: 11px;
    gap: 16px;
  }
  .test-mode-bar span {
    display: inline;
  }
  .test-mode-bar > span:last-child {
    text-align: end;
  }
  .game-header {
    margin-inline: 20px;
    gap: 18px;
  }
  .brand b {
    font-size: 25px;
  }
  .brand small {
    display: none;
  }
  .brand > .icon svg {
    width: 25px;
  }
  .brand {
    gap: 9px;
  }
  .wallet {
    gap: 12px;
  }
  .wallet-value {
    gap: 5px;
  }
  .wallet-value small {
    display: none;
  }
  .wallet-value strong {
    font-size: 15px;
  }
  .profile-button {
    width: 44px;
    height: 44px;
  }
  .experience main {
    padding: 32px 20px 0;
  }
  .garden-cover {
    display: grid;
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 0 0 40px;
  }
  .cover-copy {
    padding: 8px 0 0;
  }
  .cover-copy h1 {
    font-size: clamp(75px, 20vw, 100px);
  }
  .cover-copy h1 em {
    margin-inline-start: 0.38em;
  }
  .cover-intro {
    font-size: 22px;
    line-height: 1.45;
    margin-block: 25px;
    max-width: 30ch;
  }
  .cover-actions {
    gap: 22px;
  }
  .cover-actions .primary {
    font-size: 20px;
    padding-inline: 18px;
  }
  .cover-footnote {
    margin-top: 20px;
    max-width: 30ch;
  }
  .cover-plate {
    margin: 0 16px 0 0;
    padding: 22px;
  }
  .cover-specimen {
    max-width: 260px;
  }
  .plate-topline {
    font-size: 16px;
  }
  .cover-plate h2 {
    font-size: 36px;
  }
  .catalogue-heading {
    display: block;
    padding-block: 24px;
  }
  .catalogue-heading h2 {
    font-size: 34px;
  }
  .catalogue-heading > p {
    margin-top: 15px;
    max-width: none;
  }
  .deck-panel {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px 13px;
    padding-block: 24px;
  }
  .deck-panel .deck-emblem {
    width: 70px;
    height: 70px;
    max-width: none;
    margin-inline-start: -5px;
  }
  .deck-description .eyebrow {
    font-size: 12px;
  }
  .deck-description h3 {
    font-size: 28px;
    line-height: 1.08;
  }
  .deck-description > p:last-child {
    font-size: 14px;
  }
  .deck-panel > .secondary {
    font-size: 14px;
    padding: 11px 13px;
    gap: 10px;
  }
  .catalogue-bottom {
    justify-content: space-between;
    gap: 20px;
  }
  .duel-tools .game-toolbar {
    gap: 10px 20px;
  }
  .game-toolbar .text-button,
  .game-toolbar .secondary {
    font-size: 14px;
  }
  .pool-choice {
    font-size: 14px;
    line-height: 1.5;
  }
  .shop-heading,
  .collection-heading {
    display: block;
    margin-bottom: 28px;
  }
  .shop-heading h1,
  .collection-heading h1 {
    font-size: 51px;
  }
  .collection-heading > div:first-child > p:last-child,
  .shop-heading > div:first-child > p:last-child {
    font-size: 22px;
    margin-top: 17px;
  }
  .collection-count {
    margin-top: 22px;
    align-items: baseline;
    gap: 10px;
  }
  .collection-count strong {
    font-size: 43px;
  }
  .collection-count small {
    font-size: 13px;
  }
  .catalogue-tools {
    gap: 20px;
  }
  .filters {
    gap: 20px;
  }
  .filters button {
    font-size: 14px;
  }
  .live-collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 12px;
  }
  .live-collection-grid .botanical-card {
    padding: 28px 11px 14px;
    min-height: 355px;
  }
  .live-collection-grid .card-name {
    font-size: 24px;
    min-height: 52px;
  }
  .live-collection-grid .card-rule {
    font-size: 13px;
    line-height: 1.55;
    min-height: 81px;
  }
  .live-collection-grid .card-art {
    margin-top: 10px;
  }
  .collection-specimen > p,
  .collection-specimen > .text-button {
    font-size: 12px;
  }
  .specimen-number {
    font-size: 13px;
  }
  .botanical-card .card-cost {
    left: 10px;
    font-size: 13px;
  }
  .botanical-card .card-family {
    right: 10px;
  }
  .battle-heading h1 {
    font-size: 42px;
  }
  .experience:has(.live-battle-layout) .game-header {
    padding-block: 12px;
  }
  .experience main:has(.live-battle-layout) {
    padding-top: 22px;
  }
  .page-garden:has(.live-battle-layout) .battle-heading {
    margin-bottom: 20px;
  }
  .page-garden:has(.live-battle-layout) .duel-tools {
    margin-bottom: 10px;
  }
  .mobile-grove-tabs button {
    font-family: var(--serif);
    font-size: 17px;
    border-radius: 2px;
  }
  .mobile-grove-tabs small {
    font-family: var(--sans);
    font-size: 12px;
  }
  .battle-heading .eyebrow {
    font-size: 11px;
  }
  .match-score {
    gap: 12px;
  }
  .match-score small {
    font-size: 11px;
  }
  .match-score strong {
    font-size: 34px;
  }
  .live-battle-layout .hand-heading h2 {
    font-size: 32px;
  }
  .live-battle-layout .hand-heading > span:not(.deck-back) {
    font-size: 13px;
    line-height: 1.6;
  }
  .live-battle-layout .hand-slot .botanical-card {
    min-height: 310px;
    padding: 25px 10px 12px;
  }
  .live-battle-layout .hand-slot .card-name {
    font-size: 24px;
  }
  .live-battle-layout .hand-slot .card-rule {
    font-size: 13px;
    line-height: 1.6;
  }
  .live-battle-layout .plan-actions .primary {
    font-size: 21px;
  }
  .live-battle-layout .plan-actions .secondary,
  .live-battle-layout .plan-actions .text-button {
    font-size: 13px;
  }
  .experience:has(.plan-actions) {
    padding-bottom: calc(var(--plan-bar-height, 140px) + 32px);
  }
  .notice-tray {
    width: calc(100% - 32px);
    max-width: 440px;
  }
  body:has(.plan-actions) .notice-tray {
    bottom: calc(var(--plan-bar-height, 140px) + 16px);
  }
  .hand-section .plan-actions {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    z-index: 10;
    box-shadow: 0 -5px 20px #071b1833;
  }
  .live-battle-layout .plan-actions .primary {
    grid-column: auto;
  }
  .live-battle-layout .control-line > span {
    font-size: 11px;
  }
  .shop-promise {
    margin-top: 22px;
    max-width: none;
  }
  .feature-copy {
    padding: 26px 23px;
  }
  .shop-feature h2 {
    font-size: 39px;
  }
  .feature-copy > p:not(.eyebrow) {
    font-size: 22px;
  }
  .feature-facts {
    gap: 22px;
  }
  .feature-facts span {
    font-size: 12px;
  }
  .feature-facts b {
    font-size: 30px;
  }
  .shop-grid {
    gap: 35px;
  }
  .product-copy h2 {
    font-size: 35px;
  }
  .shop-principles {
    gap: 28px;
  }
  .shop-principles p {
    font-size: 14px;
  }
  .live-dialog {
    padding: 26px 22px;
  }
  .live-dialog h2 {
    font-size: 35px;
  }
  .live-dialog > p:not(.dialog-kicker) {
    font-size: 15px;
  }
  .live-dialog .dialog-lead {
    font-size: 22px;
  }
  .live-dialog .primary {
    font-size: 20px;
  }
  .live-dialog .secondary {
    font-size: 14px;
  }
  .game-footer {
    margin: 38px 20px 0;
    gap: 20px;
  }
  .game-footer > span {
    font-size: 18px;
  }
  .footer-links {
    gap: 14px 22px;
    justify-content: start;
  }
  .footer-links a,
  .footer-links .text-button {
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .game-header {
    margin-inline: 15px;
    gap: 10px;
  }
  .brand b {
    font-size: 22px;
  }
  .wallet {
    gap: 7px;
  }
  .game-header nav {
    gap: 18px;
  }
  .game-header nav button {
    font-size: 21px;
  }
  .experience main {
    padding-inline: 15px;
  }
  .test-mode-bar {
    padding-inline: 15px;
    font-size: 10px;
  }
  .cover-copy h1 {
    font-size: 76px;
  }
  .cover-copy h1 em {
    margin-inline-start: 0.22em;
  }
  .cover-actions {
    gap: 14px;
  }
  .cover-actions .text-button {
    font-size: 13px;
  }
  .cover-plate {
    margin-inline-end: 8px;
    padding: 20px;
  }
  .deck-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px 17px;
  }
  .deck-panel .deck-emblem {
    display: none;
  }
  .deck-description,
  .deck-panel > .secondary {
    grid-column: 1;
  }
  .live-collection-grid .botanical-card {
    padding-inline: 9px;
  }
  .live-collection-grid .card-name {
    font-size: 22px;
  }
  .live-collection-grid .card-rule {
    font-size: 13px;
  }
  .shop-heading h1,
  .collection-heading h1 {
    font-size: 46px;
  }
  .game-footer {
    margin-inline: 15px;
  }
}
/* Individual items and one-payment basket. */
.single-product-art {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  display: grid;
  place-items: center;
  min-height: 280px;
}
.single-product-art .shop-specimen-art {
  width: 80%;
  height: auto;
  aspect-ratio: 1;
  max-width: 260px;
}
.product-plate-number {
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
}
.shop-search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.4fr);
  gap: 24px;
  margin: 24px 0;
}
.shop-search-tools label {
  display: grid;
  gap: 9px;
  font-size: 14px;
}
.shop-search-tools input,
.shop-search-tools select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #10251f;
  color: var(--ink);
}
.basket-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 12px;
  z-index: 5;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: #142c23;
  box-shadow: 0 5px 18px #071b1830;
  margin: 22px 0;
}
.basket-summary strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
}
.basket-summary p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.basket-summary .primary {
  flex-shrink: 0;
}
.shop-count {
  color: var(--muted);
  font-size: 14px;
  margin: 22px 0;
  scroll-margin-top: 130px;
}
.shop-product .product-actions {
  gap: 10px;
}
.shop-product .product-actions .primary,
.shop-product .product-actions .secondary {
  padding-inline: 16px;
}
.basket-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.basket-line .basket-plant {
  width: 54px;
  height: 64px;
}
.basket-line h3 {
  font-size: 25px;
}
.basket-line small,
.checkout-item small {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 4px;
}
.basket-item-icon {
  display: grid;
  place-items: center;
  color: var(--accent);
}
.checkout-item {
  min-width: 0;
}
.basket-line p {
  font-size: 15px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.checkout-lines {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.checkout-lines li {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.6;
}
.checkout-lines li > span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.shop-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin: 40px 0;
}
.shop-empty {
  padding: 50px 0;
}
.shop-empty p {
  margin: 18px 0;
}
@media (max-width: 580px) {
  .shop-search-tools {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .basket-summary {
    padding: 14px;
    gap: 10px;
    top: 0;
  }
  .basket-summary strong {
    font-size: 23px;
  }
  .basket-summary .primary {
    font-size: 18px;
    padding: 10px 12px;
  }
  .basket-summary p {
    font-size: 12px;
  }
  .basket-line {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .basket-line .basket-plant {
    width: 40px;
    height: 50px;
  }
  .basket-line h3 {
    font-size: 23px;
  }
  .basket-line .text-button {
    font-size: 13px;
  }
  .shop-pagination {
    gap: 10px;
    flex-wrap: wrap;
  }
  .shop-pagination .secondary {
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .cover-plate,
  .botanical-card,
  .primary,
  .secondary {
    border: 1px solid CanvasText;
  }
}

/* Four 44px plant targets need one grove per row on small tablets too. */
@media (max-width: 720px) {
  .live-battle-layout .mobile-grove-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
    scroll-margin-top: 15px;
  }
  .live-battle-layout .mobile-grove-tabs button {
    background: var(--panel);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: var(--serif);
    font-size: 17px;
    padding: 10px 4px;
    min-height: 64px;
  }
  .live-battle-layout .mobile-grove-tabs small {
    display: block;
    font-family: var(--sans);
    font-size: 12px;
    margin-top: 6px;
  }
  .live-battle-layout .mobile-grove-tabs button.active {
    color: var(--accent);
    border-color: var(--accent);
  }
  .live-battle-layout .groves {
    display: block;
    padding: 23px 16px 15px;
  }
  .live-battle-layout .grove {
    display: none;
    padding: 0;
  }
  .live-battle-layout .grove.active-grove {
    display: block;
  }
  .live-battle-layout .plant-places {
    gap: 6px;
  }
  .live-battle-layout .control-name {
    display: inline;
  }
  .live-battle-layout .hand-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-battle-layout .plan-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .live-battle-layout .plan-actions .primary {
    grid-column: 1 / -1;
  }
}

.planning-help {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 16px;
}

.catalogue-result {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.page-deck .deck-actions {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg);
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
#deck-summary-count {
  font-size: 16px;
  white-space: nowrap;
}
.deck-tools {
  margin-block: 24px;
}
.selected-deck-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
}
.selected-deck-filter input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
/* Smaller laptops keep the hand beside the board, narrower, so the duel still fits the
   window; each grove keeps over 200px for its four 44px plant targets. */
@media (min-width: 1101px) and (max-width: 1280px) {
  .live-battle-layout:not(:has(.opening-note)) {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
  }
}

/* Rival picker on the garden cover. */
.rival-picker {
  display: grid;
  gap: 18px;
  margin-block: 32px;
}
.rival-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}
.rival-option {
  display: grid;
  gap: 4px;
  text-align: start;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #aeb9a780;
  border-radius: 3px;
  background: transparent;
  color: inherit;
}
.rival-option span {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.8;
}
.rival-option.active {
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}

/* Challenges page and the goal banner inside a challenge duel. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.challenges-intro {
  max-width: 720px;
  margin-block: 24px 32px;
}
.challenge-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  padding: 0;
  list-style: none;
}
.challenge-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
  border: 1px solid #aeb9a780;
  border-radius: 3px;
}
.challenge-card h2 {
  margin: 0;
}
.challenge-card p {
  margin: 0;
}
.challenge-chapter,
.challenge-lesson {
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.challenge-goals {
  display: grid;
  gap: 6px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.5;
}
.challenge-goals li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  opacity: 0.8;
}
.challenge-goals li.met {
  opacity: 1;
}
.goal-mark {
  display: inline-flex;
  justify-content: center;
}
.challenge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.challenge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.challenge-banner {
  display: grid;
  gap: 8px;
  margin-block: 12px 4px;
  padding: 14px 18px;
  border: 1px solid #aeb9a780;
  border-radius: 3px;
}
.challenge-banner p {
  margin: 0;
}

/* Five menu entries no longer fit one row on the narrowest phones: let them wrap. */
@media (max-width: 520px) {
  .game-header nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 20px;
    row-gap: 2px;
  }
  .game-header nav button {
    flex: none;
    font-size: 19px;
  }
}

/* Card mastery finishes (cosmetic) and the account progress summary. */
.botanical-card.mastery-inscribed .card-name::after {
  content: ' ✒';
  font-size: 0.8em;
  opacity: 0.75;
}
.botanical-card.mastery-framed,
.botanical-card.mastery-moonfoil {
  box-shadow:
    inset 0 0 0 1px #d8c38a,
    inset 0 0 0 4px #d8c38a33;
}
.botanical-card.mastery-framed .card-name::after,
.botanical-card.mastery-moonfoil .card-name::after {
  content: ' ✒';
  font-size: 0.8em;
  opacity: 0.75;
}
.botanical-card.mastery-moonfoil .card-art {
  position: relative;
}
.botanical-card.mastery-moonfoil .card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    #e8f2ff33 45%,
    #f4e3b544 55%,
    transparent 70%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}
.progress-summary {
  display: grid;
  gap: 6px;
  margin-block: 10px 6px;
}
.progress-summary p {
  margin: 0;
}
.progress-summary progress {
  width: 100%;
  height: 6px;
  accent-color: #d8c38a;
}
.mastery-note {
  margin: 0;
}

/* Private-duel invitation panel. */
.invite-panel {
  display: grid;
  gap: 10px;
}
.invite-panel p {
  margin: 0;
}
.invite-panel input {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 14px;
}

/* Story chapters, locked challenges and the daily garden. */
.story-chapter {
  display: grid;
  gap: 14px;
  margin-block: 36px 8px;
}
.chapter-title {
  margin: 0;
}
.locked-challenge {
  opacity: 0.55;
}
.daily-card {
  max-width: 720px;
  margin-block: 8px 12px;
  border-color: #d8c38a99;
}
.daily-card h2,
.daily-card p {
  margin: 0;
}

/* The board keeps its left-to-right geometry in Arabic: card rules name the left,
   centre and right grove, and plants sit in the same slots for both players. Each
   label still reads in its own direction. */
[dir='rtl'] .groves,
[dir='rtl'] .groves *,
[dir='rtl'] .mobile-grove-tabs,
[dir='rtl'] .mobile-grove-tabs * {
  direction: ltr;
  unicode-bidi: plaintext;
}
/* Arrows point the way the text reads. */
[dir='rtl'] .icon-arrow svg {
  transform: scaleX(-1);
}
/* The crawlable game summary under the app is English; Arabic pages come later. */
:root:lang(ar) #site-info {
  display: none;
}

/* Compact, readable game footer. */
.game-footer {
  align-items: center;
}
.game-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.footer-links {
  align-items: center;
  gap: 8px 22px;
}
.footer-links a,
.footer-links .text-button:not(.sound-toggle) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 600px) {
  .game-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 32px 20px 0;
    padding-block: 24px;
    gap: 12px;
  }
  .footer-links {
    justify-content: flex-start;
    gap: 2px 20px;
  }
}

/* Wide screens and landscape tablets: a duel fits the window, so nobody scrolls to finish a night. The header
   and heading are compact, Duel options opens as a menu beside the score, the play area
   takes the height left below its top (--duel-top, measured in router.js), the hand
   scrolls inside its column with the plan bar pinned beneath it, and the board scales
   to the remaining room (--board-zoom). The opening exchange keeps its own layout. */
@media (min-width: 1101px), (min-width: 721px) and (orientation: landscape) {
  .experience:has(.live-battle-layout) {
    max-width: 2000px;
  }
  .experience:has(.live-battle-layout) .game-header {
    padding-block: 10px;
  }
  .experience main:has(.live-battle-layout) {
    padding-top: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 28px;
    align-items: end;
  }
  .experience main:has(.live-battle-layout) > * {
    grid-column: 1 / -1;
  }
  .page-garden:has(.live-battle-layout) .battle-heading {
    grid-column: 1;
    margin-bottom: 10px;
  }
  .page-garden:has(.live-battle-layout) .battle-heading h1 {
    font-size: 34px;
    line-height: 1.1;
  }
  .page-garden:has(.live-battle-layout) .duel-tools {
    grid-column: 2;
    position: relative;
    margin: 0 0 10px;
    border-block: 0;
  }
  .page-garden:has(.live-battle-layout) .duel-tools summary {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
  }
  .page-garden:has(.live-battle-layout) .duel-tools .game-toolbar {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    width: min(560px, 80vw);
    margin: 0;
    padding: 16px 18px;
    background: #14261f;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px #0009;
  }
  .live-battle-layout:not(:has(.opening-note)) {
    height: max(400px, calc(100dvh - var(--duel-top, 200px) - 16px));
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }
  .live-battle-layout:not(:has(.opening-note)) .garden-and-hand {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .live-battle-layout:not(:has(.opening-note)) .garden-board {
    flex: none;
    zoom: var(--board-zoom, 1);
  }
  .live-battle-layout:not(:has(.opening-note)) .garden-caption {
    padding-top: 8px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  /* Cards keep their own height; only a short window makes them scroll. */
  .live-battle-layout:not(:has(.opening-note)) .hand-cards {
    flex: 0 1 auto;
    align-content: start;
    min-height: 120px;
    max-height: none;
    margin-bottom: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  /* In the column flow, below the cards, never floating over them. */
  .live-battle-layout:not(:has(.opening-note)) .plan-actions {
    position: static;
    flex: none;
    padding: 12px;
    box-shadow: none;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .energy-meter {
    white-space: nowrap;
  }
}
/* Landscape tablets and small laptops: the hand sits beside the board, narrower. */
@media (min-width: 721px) and (max-width: 1100px) and (orientation: landscape) {
  .live-battle-layout:not(:has(.opening-note)) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-section {
    margin: 0;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  /* Two compact rows: energy and Clear plan, then Suggest and Lock side by side. */
  .live-battle-layout:not(:has(.opening-note)) .plan-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .energy-meter,
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .energy-meter > span {
    font-size: 12px;
    white-space: nowrap;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .primary {
    grid-column: auto;
    font-size: 15px;
    padding-inline: 8px;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .secondary,
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .text-button {
    font-size: 12px;
    padding-inline: 6px;
  }
}
/* Short screens (most laptops): smaller hand cards so two rows stay in view. */
@media (min-width: 1101px) and (max-height: 1000px),
  (min-width: 721px) and (max-height: 1000px) and (orientation: landscape) {
  .live-battle-layout:not(:has(.opening-note)) .hand-heading {
    margin-bottom: 6px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-heading h2 {
    font-size: 26px;
  }
  .live-battle-layout:not(:has(.opening-note)) .planning-help {
    margin-block: 0 6px;
    font-size: 13px;
    line-height: 1.45;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .botanical-card {
    min-height: 0;
    padding: 14px 10px 10px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-art {
    margin-top: 4px;
    max-width: 62px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-name {
    font-size: 19px;
    min-height: 0;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-rule {
    font-size: 12px;
    line-height: 1.45;
    min-height: 0;
    max-height: 36px;
    overflow: hidden;
  }
  .live-battle-layout:not(:has(.opening-note)) .card-info {
    min-height: 30px;
  }
}
/* Very short windows: slimmer header, heading and results strip, so even the night
   after a comparison fits. */
@media (min-width: 1101px) and (max-height: 700px),
  (min-width: 721px) and (max-height: 700px) and (orientation: landscape) {
  .experience:has(.live-battle-layout) .game-header {
    padding-block: 6px;
  }
  .experience:has(.live-battle-layout) .game-header .brand small {
    display: none;
  }
  .page-garden:has(.live-battle-layout) .battle-heading .eyebrow {
    display: none;
  }
  .page-garden:has(.live-battle-layout) .battle-heading h1 {
    font-size: 28px;
  }
  .page-garden:has(.live-battle-layout) .reveal-strip {
    margin-block: 0 8px;
  }
  .page-garden:has(.live-battle-layout) .reveal-strip summary {
    min-height: 32px;
    padding-block: 6px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-cards {
    min-height: 96px;
  }
}
/* Phones and portrait tablets: a night plays without scrolling. The menu is one sideways row, Night, score and
   Duel options share a line, the grove is shorter (plant spaces stay 44px for touch), and
   while a plan is being made the hand is a sideways strip that stays above the plan bar.
   Picking a card already scrolls the grove tabs to the top, so tabs, grove, hand and Lock
   plan are all in view. Portrait tablets use the same tray and plan bar under their
   three-grove board. The opening exchange and the result keep their own layout. */
@media (max-width: 720px), (max-width: 1100px) and (orientation: portrait) {
  .experience:has(.live-battle-layout) .game-header {
    padding-block: 8px 4px;
    row-gap: 2px;
  }
  .experience:has(.live-battle-layout) .game-header .brand small {
    display: none;
  }
  /* On every game page all five items, Shop included, stay visible on one row. */
  .experience .game-header nav {
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .experience .game-header nav button {
    flex: none;
    min-height: 40px;
    font-size: 16px;
  }
  .experience main:has(.live-battle-layout) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: center;
    padding-top: 6px;
  }
  .experience main:has(.live-battle-layout) > * {
    grid-column: 1 / -1;
  }
  .page-garden:has(.live-battle-layout) .battle-heading {
    grid-column: 1;
    margin-bottom: 6px;
    align-items: center;
  }
  .page-garden:has(.live-battle-layout) .battle-heading .eyebrow {
    display: none;
  }
  .page-garden:has(.live-battle-layout) .battle-heading h1 {
    font-size: 30px;
  }
  .page-garden:has(.live-battle-layout) .duel-tools {
    grid-column: 2;
    position: relative;
    margin: 0 0 6px;
    border-block: 0;
  }
  .page-garden:has(.live-battle-layout) .duel-tools summary {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-size: 13px;
  }
  .page-garden:has(.live-battle-layout) .duel-tools .game-toolbar {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    width: min(340px, calc(100vw - 32px));
    margin: 0;
    padding: 14px;
    background: #14261f;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px #0009;
  }
  /* The grove tabs stay at the top while you scroll, so switching grove is one tap. */
  .live-battle-layout .mobile-grove-tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    gap: 6px;
    margin-bottom: 8px;
    padding-block: 6px;
    background: #10251f;
  }
  .live-battle-layout .mobile-grove-tabs button {
    min-height: 48px;
    padding: 4px 6px;
    font-size: 15px;
    line-height: 1.15;
  }
  .live-battle-layout .mobile-grove-tabs small {
    font-size: 11px;
  }
  .live-battle-layout .grove-title h2 {
    font-size: 24px;
  }
  .live-battle-layout .plant-places {
    height: 96px;
  }
  .live-battle-layout .garden-unit {
    height: 92px;
  }
  .live-battle-layout .control-line {
    margin-top: 6px;
    padding-block: 5px;
  }
  .live-battle-layout:not(:has(.opening-note)) .garden-caption {
    display: none;
  }
  .live-battle-layout .active-grove .own-side {
    scroll-margin-bottom: calc(var(--plan-bar-height, 104px) + var(--hand-tray-height, 0px) + 8px);
  }
  /* The hand strip stays above the fixed plan bar while a plan is being made. */
  .live-battle-layout .hand-section:has(.plan-actions) {
    position: sticky;
    bottom: var(--plan-bar-height, 104px);
    z-index: 5;
    /* A panel the width of the content: a negative-margin bleed widens the page, and a
       clip-path would also clip the fixed plan bar inside it. */
    margin: 10px 0 0;
    padding: 6px 8px 8px;
    background: #10251f;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-heading {
    margin: 0 0 4px;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-heading h2 {
    display: none;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-heading > span:not(.deck-back) {
    font-size: 12px;
  }
  /* Still announced to screen readers; the selected card and the grove already show it. */
  .live-battle-layout .hand-section:has(.plan-actions) .planning-help {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 116px;
    grid-template-columns: none;
    gap: 8px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 2px 2px 4px;
    margin: 0;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-slot {
    scroll-snap-align: start;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-slot .botanical-card {
    min-height: 0;
    padding: 8px 6px 6px;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-slot .card-art {
    max-width: 52px;
    margin: 2px auto 0;
  }
  /* One line per name; Read card shows it in full. */
  .live-battle-layout .hand-section:has(.plan-actions) .hand-slot .card-name {
    max-width: 100%;
    margin-top: 4px;
    font-size: 15px;
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-slot .card-rule {
    margin-top: 2px;
    font-size: 10.5px;
    line-height: 1.35;
    min-height: 0;
    max-height: 28px;
    overflow: hidden;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .hand-slot .card-power {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 20px;
  }
  .live-battle-layout .hand-section:has(.plan-actions) .card-info {
    min-height: 28px;
    height: 28px;
    padding-block: 0;
    font-size: 12px;
  }
  /* Pinned to the bottom on every phone; two rows: energy with Clear plan, then Suggest
     and Lock side by side. */
  .experience:has(.plan-actions) {
    padding-bottom: calc(var(--plan-bar-height, 104px) + 24px);
  }
  .hand-section .plan-actions {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 -5px 20px #071b1833;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4px 8px;
    padding: 6px 16px calc(6px + env(safe-area-inset-bottom));
  }
  .live-battle-layout .plan-actions .text-button {
    min-height: 36px;
    justify-self: end;
  }
  .live-battle-layout .plan-actions .primary {
    grid-column: auto;
    min-height: 44px;
    font-size: 17px;
  }
  .live-battle-layout .plan-actions .secondary {
    min-height: 44px;
  }
  /* Messages sit at the very top (over the logo row at first), clear of the menu, the
     hand and the plan bar; while one shows, the sticky grove tabs sit just below it. */
  body:has(.plan-actions) .notice-tray {
    top: 4px;
    bottom: auto;
    padding: 4px 6px 4px 12px;
    font-size: 13px;
  }
  body:has(.plan-actions):has(#notice:not(:empty)) .live-battle-layout .mobile-grove-tabs {
    top: var(--notice-height, 56px);
  }
}
/* Short phones (iPhone SE and similar): slightly shorter plant rows and grove title. */
@media (max-width: 720px) and (max-height: 700px) {
  .live-battle-layout .grove-title h2 {
    font-size: 20px;
  }
  .live-battle-layout .plant-places {
    height: 84px;
  }
  .live-battle-layout .garden-unit {
    height: 80px;
  }
}
/* Small tablets and narrow windows: the menu takes its own row, so the account links are
   not pushed past the right edge. */
@media (min-width: 721px) and (max-width: 940px) {
  .game-header {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .game-header nav {
    order: 3;
    flex-basis: 100%;
  }
}
/* Phones held sideways: the fit layout with only one line of chrome above the duel. */
@media (min-width: 721px) and (max-height: 500px) and (orientation: landscape) {
  .experience:has(.live-battle-layout) .game-header {
    flex-wrap: nowrap;
    padding-block: 2px;
    gap: 14px;
  }
  .experience:has(.live-battle-layout) .game-header .brand span:not(.icon) {
    display: none;
  }
  .experience:has(.live-battle-layout) .game-header nav {
    order: 0;
    flex-basis: auto;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .experience:has(.live-battle-layout) .game-header nav button {
    flex: none;
    min-height: 36px;
    font-size: 15px;
  }
  .experience main:has(.live-battle-layout) {
    padding-top: 0;
  }
  .page-garden:has(.live-battle-layout) .battle-heading {
    margin-bottom: 4px;
  }
  .page-garden:has(.live-battle-layout) .battle-heading h1 {
    font-size: 22px;
  }
  .page-garden:has(.live-battle-layout) .duel-tools summary {
    min-height: 32px;
    padding-block: 4px;
  }
  .live-battle-layout:not(:has(.opening-note)) {
    height: max(220px, calc(100dvh - var(--duel-top, 120px) - 6px));
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 12px;
  }
  .live-battle-layout:not(:has(.opening-note)) .garden-caption,
  .live-battle-layout:not(:has(.opening-note)) .hand-heading h2 {
    display: none;
  }
  .live-battle-layout:not(:has(.opening-note)) .planning-help {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-heading {
    margin: 0 0 4px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-heading > span:not(.deck-back) {
    font-size: 12px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-cards {
    min-height: 80px;
    gap: 6px;
  }
  /* Compact cards: cost, art, name and power; Read card has the ability. */
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .botanical-card {
    padding: 6px 6px 4px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-art {
    max-width: 44px;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-rule {
    display: none;
  }
  .live-battle-layout:not(:has(.opening-note)) .hand-slot .card-power {
    margin-top: 2px;
    padding-top: 2px;
    font-size: 16px;
  }
  .live-battle-layout:not(:has(.opening-note)) .card-info {
    min-height: 26px;
    height: 26px;
    font-size: 11px;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4px 6px;
    padding: 6px 8px;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .energy-meter,
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .energy-meter > span {
    font-size: 12px;
    white-space: nowrap;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .text-button {
    min-height: 28px;
    padding-inline: 0;
    font-size: 11px;
    justify-self: end;
  }
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .primary,
  .live-battle-layout:not(:has(.opening-note)) .plan-actions .secondary {
    grid-column: auto;
    min-width: 0;
    min-height: 36px;
    padding: 4px;
    font-size: 12px;
    line-height: 1.2;
  }
}
/* Small phones held sideways keep the hand in the page: a sticky tray would leave no
   room for the grove. */
@media (max-width: 720px) and (orientation: landscape) {
  .live-battle-layout .hand-section:has(.plan-actions) {
    position: static;
  }
}
/* The shop and the herbarium on phones. The page heading and tools are shorter, so the
   first items show on the first screen, and each shop item is a row (picture beside its
   name, price and buttons), a quarter of the height of the full-width tile. */
.product-price {
  flex: none;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink);
  margin: 0;
}
/* In the item dialog the card-minimum note takes its own line above price and buttons. */
.product-actions > .hint {
  flex-basis: 100%;
}
.herbarium-more {
  display: block;
  margin: 32px auto 0;
}
/* Short family names (Leaf, Tree) still get a finger-sized target. */
.shop-tools .filters button,
.catalogue-tools .filters button {
  min-width: 44px;
}
/* Phones and tablets: each shop item is a compact row, its picture beside the name,
   price and buttons, so a screen shows several items instead of one tall picture.
   Tablets get two columns; the phone rules below narrow it to one. */
@media (max-width: 1100px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
  }
  .shop-product {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
  }
  .shop-product .product-art {
    height: 176px;
    min-height: 0;
  }
  .shop-product .product-plate-number {
    top: 6px;
    left: 8px;
    font-size: 12px;
  }
  /* Card backs and profile frames are drawn at a fixed size; shrink them to the picture. */
  .shop-product .cardback,
  .shop-product .ornate-frame {
    scale: 0.85;
  }
  .shop-product .garden-product {
    padding: 8px;
  }
  .shop-product .garden-product > span {
    padding: 6px 8px;
  }
  .shop-product .product-copy {
    padding: 0;
    border-top: 0;
    gap: 4px;
  }
  .shop-product .product-copy .eyebrow {
    margin: 0;
    font-size: 11px;
  }
  .shop-product .product-copy h2 {
    font-size: 25px;
    line-height: 1.15;
  }
  /* Long abilities stop at three lines; the picture opens the full description. */
  .shop-product .product-copy > p:not(.eyebrow):not(.product-price) {
    margin: 2px 0;
    font-size: 14px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  .shop-product .collection-fact {
    padding: 0;
    font-size: 12px;
  }
  .product-price {
    font-size: 22px;
  }
  .shop-product .product-actions {
    padding-top: 6px;
    gap: 6px 12px;
  }
  .shop-product .product-actions .primary,
  .shop-product .product-actions .secondary {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .shop-product .product-actions .text-button {
    min-height: 40px;
    font-size: 14px;
  }
}
@media (max-width: 720px) {
  .shop-heading,
  .collection-heading {
    margin-bottom: 14px;
  }
  .shop-heading h1,
  .collection-heading h1 {
    font-size: 38px;
  }
  .shop-heading > div:first-child > p:last-child,
  .collection-heading > div:first-child > p:last-child {
    font-size: 17px;
    margin-top: 8px;
  }
  .collection-count {
    margin-top: 10px;
  }
  .collection-count strong {
    font-size: 32px;
  }
  /* Categories scroll sideways on one line instead of wrapping. */
  .shop-tools {
    margin-top: 0;
    gap: 8px;
  }
  .shop-tools .filters,
  .catalogue-tools .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }
  .shop-tools .filters button,
  .catalogue-tools .filters button {
    flex: none;
  }
  /* The placeholder and the chosen order say what each box does, so their labels are
     read by screen readers but not shown. */
  .shop-search-tools {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 10px 0;
  }
  .shop-search-tools label {
    gap: 0;
    font-size: 0;
  }
  .shop-search-tools input,
  .shop-search-tools select {
    min-height: 44px;
    padding: 8px 10px;
  }
  .basket-summary {
    padding: 8px 12px;
    margin: 10px 0;
  }
  .basket-summary strong {
    font-size: 19px;
  }
  .basket-summary p {
    margin-top: 2px;
    line-height: 1.35;
  }
  .basket-summary .primary {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 16px;
  }
  .shop-count {
    margin: 12px 0 0;
    scroll-margin-top: 90px;
  }
  /* Phones: one column, a smaller picture and type. */
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .shop-product {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0;
  }
  .shop-product .product-art {
    height: 136px;
  }
  .shop-product .cardback,
  .shop-product .ornate-frame {
    scale: 0.7;
  }
  .shop-product .product-copy .eyebrow {
    font-size: 10px;
  }
  .shop-product .product-copy h2 {
    font-size: 22px;
  }
  .shop-product .product-copy > p:not(.eyebrow):not(.product-price) {
    font-size: 13px;
  }
  .product-price {
    font-size: 20px;
  }
  .shop-product .product-actions .primary,
  .shop-product .product-actions .secondary {
    padding: 8px 12px;
    font-size: 13px;
  }
  .shop-product .product-actions .text-button {
    font-size: 13px;
  }
}
/* Phones held sideways: the sticky basket bar stays one slim line. */
@media (orientation: landscape) and (max-height: 500px) {
  .basket-summary {
    padding: 6px 14px;
    margin: 10px 0;
  }
  .basket-summary strong {
    font-size: 18px;
  }
  .basket-summary p {
    margin-top: 0;
  }
  .basket-summary .primary {
    min-height: 40px;
    padding: 6px 14px;
    font-size: 15px;
  }
}
