.mar-partida {
  --mar-fondo:#fcf5e5; --mar-tinta:#153c45; --mar-borde:#a2b7aa;
  box-sizing:border-box; width:min(680px,calc(100vw - 20px)); max-width:100%; max-height:calc(100dvh - 20px);
  margin:auto; padding:0; overflow:auto; overscroll-behavior:contain; color:var(--mar-tinta); background:var(--mar-fondo);
  border:2px solid #25464b; border-radius:12px; box-shadow:0 18px 64px #001e2b88;
  font:500 15px/1.3 system-ui,-apple-system,sans-serif; text-align:left; color-scheme:light;
}
.mar-partida::backdrop {background:#052733b5}
.mar-partida [hidden] {display:none!important}
.mar-partida *, .mar-partida *::before, .mar-partida *::after {box-sizing:border-box}
.mar-cab {display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 18px;background:#153c45;color:#fff7df}
.mar-identidad {min-width:0}
.mar-anio,.mar-cuenta,.mar-medidor,.mar-partida kbd {font:650 .77rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums}
.mar-anio {color:#ffd188}
.mar-partida h2.mar-titulo {margin:.16em 0 0;color:inherit;font:italic 700 clamp(1.3rem,4.5vw,2rem)/1.07 Georgia,serif}
.mar-partida button {min-height:44px;min-width:44px;margin:0;padding:8px 12px;border:1px solid var(--mar-tinta);border-radius:6px;background:#fffaf0;color:var(--mar-tinta);cursor:pointer;touch-action:manipulation;font-family:inherit;font-size:.92rem;line-height:1.16;font-weight:650}
.mar-partida button:focus-visible {outline:3px solid #f07538;outline-offset:2px}
.mar-partida button:disabled {opacity:.47;cursor:default}
.mar-partida button:active:enabled {filter:brightness(.91)}
.mar-partida .mar-salir {max-width:8rem;flex-shrink:0;background:transparent;border-color:#85a6a0;color:#fff6e4}
.mar-visor {position:relative;background:#5fafa9;isolation:isolate}
.mar-mar {display:block;width:100%;height:auto;aspect-ratio:2.12;max-height:35dvh}
.mar-cuenta {position:absolute;left:10px;top:9px;padding:5px 8px;border:1px solid #e3eee0b3;border-radius:4px;color:#fff8dc;background:#153c45e8;text-transform:capitalize;pointer-events:none}
.mar-cuerpo {display:grid;gap:8px;padding:12px 17px 15px}
.mar-cuerpo p {margin:0}
.mar-instruccion {font-size:.91rem;line-height:1.34}
.mar-lectura {font-weight:730;line-height:1.28}
.mar-medidor {display:flex;align-items:center;gap:10px}
.mar-medidor progress {height:9px;flex:1;accent-color:#116d75;border:0;border-radius:8px;overflow:hidden;background:#c5d3c3}
.mar-medidor progress::-webkit-progress-bar {background:#c5d3c3}
.mar-medidor progress::-webkit-progress-value {background:#116d75}
.mar-ordenes,.mar-pie {display:flex;align-items:stretch;gap:6px;flex-wrap:wrap}
.mar-ordenes .mar-mando {display:flex;gap:6px;flex:1 0 auto;align-items:center;justify-content:center;border-color:#8ea89d;box-shadow:0 2px 0 #a5b5a2}
.mar-mando kbd {color:#43676a;background:#edf1e5;border:1px solid #b7c6bc;padding:1px 4px;border-radius:3px}
.mar-ordenes [data-mar-accion=hacer],.mar-partida .mar-empezar {color:#fff9ed;background:#145963;border-color:#145963}
.mar-ordenes [data-mar-accion=hacer] kbd {color:#ecf6ea;background:#327780;border-color:#6d9e9e}
.mar-pie {justify-content:flex-end}
.mar-pie .mar-empezar {min-width:10rem}
.mar-aviso {color:#345d56;font-size:.9rem}
.mar-aviso:empty {display:none}
.mar-aviso[data-tono=fallo] {color:#8f3f24}
.mar-partida[data-estado=fin] .mar-lectura {font:700 1.42rem/1.18 Georgia,serif}
@media (max-width:480px) {
 .mar-cab,.mar-cuerpo {padding:10px 12px}
 .mar-ordenes .mar-mando {flex-basis:28%;min-height:46px}
 .mar-mar {aspect-ratio:1.83}
}
@media (pointer:coarse) and (hover:none) { .mar-mando kbd {display:none} }
@media (max-height:490px) and (orientation:landscape) {
 .mar-partida {width:min(800px,calc(100vw - 12px))}
 .mar-partida[open] {display:grid;grid-template-columns:minmax(0, .95fr) minmax(0,1.05fr)}
 .mar-cab {grid-column:1/-1;padding:6px 10px}
 .mar-cuerpo {padding:7px 10px;gap:5px}
 .mar-visor {align-content:center}
 .mar-mar {max-height:62dvh}
}
