:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #14292d;
  background: #f2f6f3;
  line-height: 1.45;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(1080px, calc(100% - 32px)); margin: 32px auto 46px; }
h1 { font-size: clamp(32px, 5vw, 58px); line-height: 1.05; letter-spacing: -.035em; max-width: 15ch; margin: 7px 0 14px; }
h2 { margin: 0 0 13px; line-height: 1.16; }
header p { max-width: 55ch; margin: 0 0 17px; }
.brand { font-weight: 750; color: #245b56; }
nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 24px; }
a { color: #125852; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #a54b24; outline-offset: 3px; }
.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 14px; border: 1px solid #174c49; border-radius: 7px; color: #fff; background: #174c49; font: inherit; font-weight: 700; text-decoration: none; }
.secondary { min-height: 44px; padding: 7px 12px; border: 1px solid #174c49; border-radius: 7px; color: #174c49; background: #fff; font: inherit; font-weight: 700; }
button { cursor: pointer; }

.workspace { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 17px; align-items: start; }
.settings, .sheet { min-width: 0; border: 1px solid #c4d2ca; border-radius: 10px; background: #fff; padding: 15px; }
.settings label, legend { display: block; font-weight: 650; }
.settings select, .share-field input { display: block; width: 100%; min-height: 44px; padding: 5px 10px; margin-top: 3px; border: 1px solid #789591; border-radius: 5px; color: #14292d; background: #fff; font: inherit; }
fieldset { min-width: 0; margin: 16px 0; border: 1px solid #9aafa9; border-radius: 7px; padding: 8px 9px 10px; display: grid; gap: 8px; }
.muted { font-size: .92rem; margin: 9px 0 12px; color: #3d5458; }
.downloads { display: flex; flex-wrap: wrap; gap: 6px 12px; }
#copy-status:empty { margin: 0; }

.sheet h2 span, .tile .caption span { display: block; }
.sheet h2 span[lang="es"], .tile .caption span[lang="es"] { color: #2f4f52; }
.sheet h2 span + span { font-size: .78em; margin-top: 2px; }
.tiles { direction: ltr; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.tile { display: flex; min-width: 0; min-height: clamp(130px, 23vw, 235px); align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 8px; border: 2px solid #243d40; border-radius: 8px; text-align: center; overflow-wrap: anywhere; }
.tile img { width: clamp(62px, 12vw, 134px); height: clamp(62px, 12vw, 134px); object-fit: contain; }
.tile .caption { font-size: clamp(16px, 3.2vw, 28px); font-weight: 760; line-height: 1.16; }
.tile .caption span + span { font-size: .76em; margin-top: 3px; }
footer { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 10px; font-size: .76rem; overflow-wrap: anywhere; }
@media (max-width: 690px) {
  main { margin-top: 20px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@page { size: landscape; margin: 8mm; }
@media print {
  :root, body, .sheet { background: white; color: black; }
  .web-only { display: none !important; }
  main { width: auto; margin: 0; }
  .workspace { display: block; }
  .sheet { border: 0; padding: 0; border-radius: 0; }
  .sheet h2 { font-size: 20pt; margin: 0 0 4mm; }
  .tiles { height: 145mm; gap: 3mm; }
  .tile { min-height: 0; padding: 2mm; border-color: black; border-radius: 2mm; break-inside: avoid; }
  .tile img { width: 40mm; height: 40mm; }
  .tile .caption { color: black; font-size: 20pt; }
  .sheet h2 span[lang="es"], .tile .caption span[lang="es"] { color: black; }
  footer { margin-top: 3mm; font-size: 9pt; }
  a { color: black; }
}
