/* Layout: phone-first field app. Top bar with leaf mark and a woven color band, one view at a time, bottom tab bar.
   Each group of the Mesa owns a color (selva, ámbar, río, flor, jacaranda) used on its cards and credencial. */
:root {
  --bg: #eef4ef;
  --surface: #ffffff;
  --sunk: #f5f8f5;
  --ink: #13241a;
  --muted: #56685c;
  --line: #d2ddd4;
  --hero: #134d31;
  --hero-ink: #ffffff;
  --hero-muted: #b9dcc7;
  --g1: #1f7a4d; --on-g1: #ffffff;   /* selva: Agroforestal de Chiapas */
  --g2: #d98a0c; --on-g2: #2b1a00;   /* ámbar: La Frontera */
  --g3: #0f7f8f; --on-g3: #ffffff;   /* río: Huleros de San José */
  --g4: #c22f6c; --on-g4: #ffffff;   /* flor: individual */
  --g5: #6a4bb5; --on-g5: #ffffff;   /* jacaranda: otro grupo */
  --accent: var(--g1); --on-accent: var(--on-g1);
  --latex: #f3e6c4;
  --warn: #b1401a; --warn-soft: #fae3d8;
  --pend: #8a5a00; --pend-soft: #fbedc9;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1410; --surface: #15211a; --sunk: #101a14; --ink: #e6efe8; --muted: #9fb3a6; --line: #2a3b31;
    --hero: #0f3322; --hero-ink: #ecf6ef; --hero-muted: #93c4a7;
    --g1: #4cc08a; --on-g1: #07170e; --g2: #f2ae3e; --on-g2: #1f1300; --g3: #3cc3d2; --on-g3: #04191c;
    --g4: #f2689f; --on-g4: #26050f; --g5: #a991f2; --on-g5: #150b2b;
    --latex: #3a3220; --warn: #f39470; --warn-soft: #3d2118; --pend: #f4c564; --pend-soft: #3a2d10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1410; --surface: #15211a; --sunk: #101a14; --ink: #e6efe8; --muted: #9fb3a6; --line: #2a3b31;
  --hero: #0f3322; --hero-ink: #ecf6ef; --hero-muted: #93c4a7;
  --g1: #4cc08a; --on-g1: #07170e; --g2: #f2ae3e; --on-g2: #1f1300; --g3: #3cc3d2; --on-g3: #04191c;
  --g4: #f2689f; --on-g4: #26050f; --g5: #a991f2; --on-g5: #150b2b;
  --latex: #3a3220; --warn: #f39470; --warn-soft: #3d2118; --pend: #f4c564; --pend-soft: #3a2d10;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.col { max-width: 760px; margin: 0 auto; }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--g3); outline-offset: 2px; }

/* top bar */
.topbar { background: var(--hero); color: var(--hero-ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; }
.topbar .col { display: flex; align-items: center; gap: 10px; padding-block: 10px; }
.mark { width: 36px; height: 36px; flex: none; }
.topbar .t { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.05; }
.topbar .s { font-size: 12px; color: var(--hero-muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.pill { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.12); padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hero-muted); }
.pill[data-s="ok"] .dot { background: #6be3a2; }
.pill[data-s="off"] .dot { background: #ffc24a; }
.weave { height: 7px; background:
  linear-gradient(135deg, transparent 50%, var(--hero) 50%) 0 0 / 14px 7px,
  repeating-linear-gradient(90deg, var(--g1) 0 28px, var(--g2) 28px 56px, var(--g3) 56px 84px, var(--g4) 84px 112px, var(--g5) 112px 140px); }

main { padding-block: 18px 24px; }
section.view { display: grid; gap: 16px; }
h1, h2 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(26px, 7vw, 36px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
.lead { color: var(--muted); margin: 0; }

/* inicio */
.hero { background: var(--hero); color: var(--hero-ink); border-radius: 20px; padding: 20px; display: grid; gap: 14px; overflow: hidden; position: relative; }
.hero .k { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-muted); font-weight: 700; }
.hero p { margin: 0; color: var(--hero-muted); max-width: 46ch; }
.hero .big-leaf { position: absolute; right: -24px; bottom: -30px; width: 150px; height: 150px; opacity: .22; pointer-events: none; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; position: relative; }
.counter { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.counter b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.counter span { font-size: 13px; color: var(--hero-muted); }
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
@media (max-width: 560px) { .tiles { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); } }
.tile { border: 0; border-radius: var(--r); padding: 16px; text-align: left; cursor: pointer; display: grid; gap: 6px; min-height: 104px; align-content: start; }
.tile .ic { width: 34px; height: 34px; }
.tile b { font-family: var(--font-display); font-size: 19px; font-weight: 800; }
.tile span { font-size: 14px; opacity: .85; }
.tile.t1 { background: var(--g1); color: var(--on-g1); }
.tile.t2 { background: var(--g3); color: var(--on-g3); }
.tile.t3 { background: var(--g2); color: var(--on-g2); }
.steps-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .steps-how { grid-template-columns: minmax(0, 1fr); } }
.how { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; font-size: 14px; }
.how b { font-size: 15px; }

.wa { --wa: #1f9e57; background: var(--surface); border: 2px solid color-mix(in srgb, var(--wa) 45%, var(--line)); border-radius: 18px; padding: 16px; display: grid; gap: 10px; }
.wa .wh { display: flex; gap: 10px; align-items: center; }
.wa .wh .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--wa); color: #fff; display: grid; place-items: center; flex: none; }
.wa .wh .ic svg { width: 24px; height: 24px; }
.wa p { margin: 0; color: var(--muted); font-size: 15px; }
.wa .btn.primary { background: var(--wa); border-color: var(--wa); color: #fff; }
.paste { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 240px; resize: vertical; }
.tpl { background: var(--sunk); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }
.banner { border-radius: var(--r); padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; font-size: 15px; }
.banner.pend { background: var(--pend-soft); color: var(--ink); }
.banner.warn { background: var(--warn-soft); }
.banner.edit { background: color-mix(in srgb, var(--g3) 16%, var(--surface)); }

/* buttons */
.btn { border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; min-height: 48px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.btn.danger { color: var(--warn); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: space-between; }

/* wizard */
.progress { display: grid; gap: 8px; }
.progress .bar { display: grid; grid-auto-flow: column; gap: 5px; }
.progress .bar i { height: 7px; border-radius: 4px; background: var(--line); }
.progress .bar i.done { background: var(--g1); }
.progress .bar i.now { background: var(--g2); }
.progress .lbl { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.stepcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 20px; }
.stephead { display: flex; gap: 12px; align-items: center; }
.stephead .ic { width: 44px; height: 44px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--g1) 15%, var(--surface)); color: var(--g1); display: grid; place-items: center; }
.stephead .ic svg { width: 26px; height: 26px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .field > .lab { font-weight: 700; font-size: 16px; }
.field .req { color: var(--warn); }
.field .hint { font-size: 14px; color: var(--muted); margin-top: -4px; }
.field input[type="text"], .field input[type="password"], .field input[type="tel"], .field input[type="number"], .field textarea, .search {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--sunk); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-width: 0; }
.field textarea { min-height: 88px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 99px; padding: 9px 16px; font-weight: 600; font-size: 15px; cursor: pointer; min-height: 44px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 480px) { .groups { grid-template-columns: minmax(0, 1fr); } }
.gcard { border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; text-align: left; cursor: pointer; display: flex; gap: 10px; align-items: center; min-height: 56px; }
.gcard .sw { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--gc); }
.gcard b { font-weight: 700; font-size: 15px; line-height: 1.25; }
.gcard[aria-pressed="true"] { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 16%, var(--surface)); box-shadow: inset 0 0 0 1px var(--gc); }
.stepper { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 8px; align-items: center; max-width: 340px; }
.stepper button { height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-size: 26px; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper input { text-align: center; font-weight: 700; font-size: 20px !important; font-variant-numeric: tabular-nums; }
.stepper .u { grid-column: 1 / -1; text-align: center; font-size: 13px; color: var(--muted); margin-top: -4px; }
.err { color: var(--warn); font-weight: 600; min-height: 1.5em; margin: 0; }
.review { display: grid; gap: 12px; }
.rgroup { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.rgroup .rh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rgroup .rh b { font-family: var(--font-display); font-size: 17px; }
.rgroup dl { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 15px; }
.rgroup dt { color: var(--muted); }
.rgroup dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.link { background: none; border: 0; color: var(--g3); font-weight: 700; cursor: pointer; padding: 4px; text-decoration: underline; }

/* credencial */
.cred { --gc: var(--g1); --on: var(--on-g1); border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px -18px rgba(0,0,0,.45); max-width: 460px; width: 100%; justify-self: center; }
.cred .band { background: var(--gc); color: var(--on); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.cred .band .mark { width: 40px; height: 40px; }
.cred .band small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.cred .band strong { font-family: var(--font-display); font-size: 17px; font-weight: 800; line-height: 1.15; }
.cred .w { height: 6px; background: repeating-linear-gradient(90deg, var(--g1) 0 18px, var(--g2) 18px 36px, var(--g3) 36px 54px, var(--g4) 54px 72px, var(--g5) 72px 90px); }
.cred .body { padding: 16px; display: grid; gap: 12px; }
.cred .nm { font-family: var(--font-display); font-size: 25px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.cred .place { color: var(--muted); font-size: 15px; }
.cred .nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cred .nums div { background: var(--sunk); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.cred .nums b { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cred .nums span { font-size: 12px; color: var(--muted); }
.cred .foot { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; flex-wrap: wrap; }
.cred .folio { font-weight: 700; color: var(--ink); letter-spacing: .05em; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.tag.pend { background: var(--pend-soft); color: var(--pend); }
.tag.ok { background: color-mix(in srgb, var(--g1) 16%, var(--surface)); color: var(--g1); }
.tag.no { background: var(--warn-soft); color: var(--warn); }
.done-hero { text-align: center; display: grid; gap: 6px; justify-items: center; }
.done-hero .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--g1); color: var(--on-g1); display: grid; place-items: center; }
.done-hero .ic svg { width: 36px; height: 36px; }

/* lista */
.search { background: var(--surface); }
.pcards { display: grid; gap: 10px; }
.pcard { --gc: var(--g1); border: 1px solid var(--line); border-left: 8px solid var(--gc); background: var(--surface); border-radius: 14px; padding: 12px 14px; text-align: left; cursor: pointer; display: grid; gap: 4px; width: 100%; }
.pcard .n { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.pcard .m { color: var(--muted); font-size: 14px; }
.pcard .f { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; align-items: center; }
.empty { background: var(--surface); border: 2px dashed var(--line); border-radius: 18px; padding: 26px 16px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.empty .mark { width: 56px; height: 56px; }
.empty p { margin: 0; color: var(--muted); max-width: 36ch; }

/* resumen */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 14px; min-width: 0; }
.bars { display: grid; gap: 12px; }
.brow { display: grid; gap: 4px; }
.brow .bl { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.brow .bl b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.brow .track { height: 14px; border-radius: 7px; background: var(--sunk); overflow: hidden; }
.brow .fill { height: 100%; border-radius: 7px; background: var(--gc); min-width: 4px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hint { font-size: 14px; color: var(--muted); }

/* bottom nav */
nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
nav.bottom .col { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
nav.bottom button { background: none; border: 0; padding: 8px 4px 9px; display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; min-height: 60px; }
nav.bottom button svg { width: 26px; height: 26px; }
nav.bottom button[aria-current="page"] { color: var(--g1); }
nav.bottom button.reg { color: var(--on-g2); }
nav.bottom button.reg .bub { background: var(--g2); border-radius: 14px; padding: 3px 14px; display: grid; place-items: center; }
nav.bottom button.reg span.l { color: var(--ink); }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; max-width: calc(100% - 32px); z-index: 9; }
[hidden] { display: none !important; }
/* login */
.login { min-height: calc(100vh - 120px); display: grid; align-content: center; gap: 18px; max-width: 420px; margin: 0 auto; }
.login .card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 16px; }
.login .pinrow input { letter-spacing: .5em; text-align: center; font-size: 24px !important; font-weight: 700; }
.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; font-size: 14px; }
.who b { font-size: 15px; }
.access { background: color-mix(in srgb, var(--g2) 18%, var(--surface)); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.access .big { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: .06em; }
.field select { font: inherit; font-size: 17px; color: var(--ink); background: var(--sunk); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }

.access input { font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--sunk); border-radius: 14px; padding: 14px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.consent input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--g1); }
.consent a, .how a, .login a { color: var(--g3); font-weight: 600; }

/* Registro Hulero: número de productor, CURP, GPS, venta formal, duplicados y registro propio */
.cred .numprod { display: grid; gap: 0; background: color-mix(in srgb, var(--gc) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gc) 35%, var(--line)); border-radius: 12px; padding: 8px 12px; }
.cred .numprod span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.cred .numprod b { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: .04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.msg { font-size: 14px; font-weight: 600; }
.msg.good { color: var(--g1); }
.msg.bad { color: var(--warn); }
.field input.mono { font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.field input[type="date"] { font: inherit; font-size: 17px; color: var(--ink); background: var(--sunk); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 52px; }
.stepcard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stepcard > * { grid-column: 1 / -1; }
.stepcard > .field.half { grid-column: auto; }
.gpsbox { display: grid; gap: 8px; border: 2px dashed var(--g3); border-radius: 14px; padding: 12px; background: color-mix(in srgb, var(--g3) 6%, var(--surface)); }
.gpsbox input { font: inherit; font-size: 17px; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0; }
.btn.gpsbtn { background: var(--g3); border-color: var(--g3); color: var(--on-g3); display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.gpsbtn .ic { width: 22px; height: 22px; display: grid; }
.btn.gpsbtn .ic svg { width: 22px; height: 22px; }
.field.formal { gap: 10px; }
.yn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--sunk); border-radius: 12px; padding: 8px 10px; }
.yn > span { flex: 1 1 140px; font-weight: 600; }
.yn .chip { min-height: 40px; padding: 6px 16px; }
.duppanel { display: grid; gap: 10px; border: 2px solid var(--pend); background: var(--pend-soft); border-radius: 14px; padding: 14px; }
.dupitem { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; background: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.dupitem > span { min-width: 0; flex: 1 1 200px; overflow-wrap: anywhere; }
.pinbox { display: grid; gap: 8px; background: color-mix(in srgb, var(--g4) 10%, var(--surface)); border: 2px solid color-mix(in srgb, var(--g4) 40%, var(--line)); border-radius: 14px; padding: 14px; }
.pinbox input { font: inherit; font-size: 22px; font-weight: 700; letter-spacing: .3em; text-align: center; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px; width: 100%; min-width: 0; flex: 1 1 120px; }
.selfcard { background: var(--g4); color: var(--on-g4); border-radius: 18px; padding: 16px; display: grid; gap: 10px; }
.selfcard h2 { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.15; }
.selfcard p { margin: 0; font-size: 15px; opacity: .95; }
.selfcard .btn { background: var(--on-g4); color: var(--g4); border-color: var(--on-g4); justify-self: start; }
.acctipo { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 360px) { .stepcard > .field.half { grid-column: 1 / -1; } }

/* hule para vender */
.mkt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.mk { border-radius: 12px; padding: 12px; background: var(--sunk); border-top: 4px solid var(--gc); display: grid; gap: 2px; min-width: 0; }
.mk b { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.1; }
.mk span { font-size: 13px; color: var(--ink); }
.mk small { font-size: 12px; color: var(--muted); }
.mktlist { display: grid; gap: 0; margin-top: 12px; }
.mktlist > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mktlist b { white-space: nowrap; }
@media (max-width: 380px) { .mkt { grid-template-columns: 1fr; } }

/* el marcador no va en mayúsculas aunque el campo sí */
input::placeholder { text-transform: none; }

/* Registro en dos partes: en casa (el formulario) y en la parcela (la ubicación, tomada ahí con el GPS, sin internet). */
.partes { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.parte { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.parte > .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pend-soft); color: var(--pend); }
.parte.ok > .ic { background: color-mix(in srgb, var(--g1) 15%, var(--surface)); color: var(--g1); }
.parte > .ic svg { width: 22px; height: 22px; }
.parte > div { display: grid; gap: 1px; min-width: 0; }
.parte > div b { font-family: var(--font-display); font-size: 16px; }
.parte > div span { font-size: 14px; color: var(--muted); line-height: 1.35; }
.pendcard .partes { background: var(--surface); }
.pendlist { display: grid; gap: 12px; }
.pendlist:empty { display: none; }
.pendcard { background: var(--pend-soft); border: 2px solid color-mix(in srgb, var(--pend) 40%, transparent); border-radius: 18px; padding: 14px; display: grid; gap: 8px; min-width: 0; }
.pendcard > b { font-family: var(--font-display); font-size: 18px; line-height: 1.2; }
.pendcard.ok { background: color-mix(in srgb, var(--g1) 12%, var(--surface)); border-color: color-mix(in srgb, var(--g1) 45%, transparent); }
.pendcard.bad { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.pendcard .bignum { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: .05em; }
.pendcard .btn.small { justify-self: start; }
.parwho { display: grid; gap: 2px; background: var(--sunk); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.parwho b { font-size: 17px; }
.parwho span { color: var(--muted); font-size: 14px; }
.parsteps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.parsteps li::marker { font-weight: 800; color: var(--g3); }
.btn.gpsbtn.big { min-height: 64px; font-size: 18px; }
.gpsq { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 17px; }
.gpsq i { width: 14px; height: 14px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); }
.gpsq.q1 i { background: var(--g1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g1) 22%, transparent); }
.gpsq.q2 i { background: var(--g2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g2) 22%, transparent); }
.gpsq span { font-weight: 700; color: var(--muted); }
.gpswait { display: flex; gap: 10px; align-items: center; }
.spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--g3) 28%, transparent); border-top-color: var(--g3); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.coordtxt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; color: var(--ink); }
.parok { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; background: color-mix(in srgb, var(--g1) 12%, var(--surface)); border-radius: 14px; padding: 14px; }
.parok > .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--g1); color: var(--on-g1); display: grid; place-items: center; }
.parok > .ic svg { width: 26px; height: 26px; }
.parok > div { display: grid; gap: 2px; min-width: 0; }
details.manual summary { cursor: pointer; color: var(--g3); font-weight: 700; }
details.manual input { font: inherit; font-size: 17px; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0; }
.tag.par { background: color-mix(in srgb, var(--g3) 14%, var(--surface)); color: var(--g3); }
.rev { border: 2px solid color-mix(in srgb, var(--warn) 45%, var(--line)); }
.rev .revitem { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; min-width: 0; }
