/* Diálogo de la guía: papel, tinta y ámbar solo en lo elegido. */

.dg { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; color: var(--fg); background: var(--papel); border: 0; }
.dg[open] { display: flex; animation: ficha-entra var(--dur-lenta) var(--ease-entrada); }
.dg::backdrop { background: var(--velo); }
.dg-form { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.dg-cabeza { position: relative; flex: none; padding: 18px 58px 12px 22px; }
.dg-sup { color: var(--acento); font: 700 .74rem/1.2 var(--text); letter-spacing: .13em; text-transform: uppercase; }
.dg-cabeza h2 { margin-top: 9px; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); line-height: 1.12; }
.dg-cuerpo { flex: 1; min-height: 0; padding: 0 22px 8px; overflow-y: auto; overscroll-behavior: contain; }
.dg-bloque { min-width: 0; margin: 0; padding: 12px 0 14px; border: 0; border-top: 1px solid var(--linea); }
.dg-bloque legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; font: 400 1.04rem/1.2 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.dg-bloque legend + * { clear: both; }
.dg-atajos { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.dg-casillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 0 18px; }
.dg-casilla { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: .98rem; font-weight: 600; line-height: 1.15; cursor: pointer; }
.dg-casilla input { flex: none; width: 20px; height: 20px; margin: 0; background: var(--papel-claro); box-shadow: inset 0 0 0 2px var(--tinta); appearance: none; cursor: pointer; }
.dg-casilla input:checked { background: var(--tinta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.4 3.4L15 6.6' fill='none' stroke='%23f6ad1f' stroke-width='2.4'/%3E%3C/svg%3E") center / 100% no-repeat; }
.dg-casilla input:disabled { box-shadow: inset 0 0 0 2px var(--linea-2); opacity: .55; cursor: default; }
.dg-casilla:has(input:disabled) { color: var(--muted); cursor: default; }
.dg-nombre { min-width: 0; }
.dg-n { margin-left: auto; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.dg-bloque > .dg-casilla .dg-n { margin-left: 2px; }
.dg-nota { margin: 0 0 4px 28px; color: var(--muted); font-size: .9rem; }
.dg-opciones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.dg-opcion { position: relative; cursor: pointer; }
.dg-opcion input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dg-opcion span { display: block; padding: 9px 4px; font: 400 1.04rem/1.1 var(--display); letter-spacing: .04em; text-align: center; text-transform: uppercase; background: var(--papel-2); transition: background-color var(--dur-rapida-salida) var(--ease-salida); }
.dg-opcion:hover span { background: var(--ambar-2); transition-duration: var(--dur-rapida); }
.dg-opcion input:checked + span { color: var(--crema); background: var(--tinta); box-shadow: inset 0 -4px 0 var(--ambar); }
.dg-opcion input:focus-visible + span { outline: 3px solid var(--acento); outline-offset: 2px; }
.dg-pie { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 22px 14px; background: var(--papel-2); }
.dg-cuenta { min-width: 0; font-size: .98rem; font-weight: 600; line-height: 1.3; font-variant-numeric: lining-nums tabular-nums; }
.dg-cuenta.vacio-aviso { color: var(--coral-oscuro); }
.dg-pie .boton { flex: none; }

@media (max-width: 520px) {
  .dg-cabeza { padding: 14px 52px 10px 16px; }
  .dg-cuerpo { padding: 0 16px 6px; }
  .dg-casillas { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 12px; }
  .dg-pie { flex-direction: column; align-items: stretch; padding: 10px 16px 12px; }
}
