/* A Realm of Dragons v19.0.0 — Sovereign Hexgrid */
:root{
  --v19-grid:#050505;
  --v19-grid-land-width:1;
  --v19-grid-sea-width:.58;
}

/* Version 19 replaces the broad v18 polygons and legacy parcels. */
.hexgrid-v19 #v18HexPoliticalLayer,
.hexgrid-v19 #v18MarchRouteLayer,
body.v19-hex-authority #parcelLayer,
body.v19-hex-authority #claimLayer,
body.v19-hex-authority #territoryLayer,
body.v19-hex-authority .parcel-layer,
body.v19-hex-authority .territory-layer{
  display:none!important;
}

#v19HexGridLayer,
#v19HexPoliticalLayer,
#v19HexSelectionLayer,
#v19MarchRouteLayer{
  pointer-events:none!important;
}

.v19-grid-cell{
  vector-effect:non-scaling-stroke;
  fill:none;
  stroke:var(--v19-grid);
  stroke-linejoin:round;
  stroke-linecap:round;
  opacity:1;
  shape-rendering:geometricPrecision;
}
.v19-grid-cell.land{
  stroke-width:var(--v19-grid-land-width);
  stroke-opacity:1;
}
.v19-grid-cell.sea{
  stroke-width:var(--v19-grid-sea-width);
  stroke-opacity:1;
  stroke-dasharray:3 3;
}
.v19-grid-cell.overview.land{stroke-width:.82;stroke-opacity:1}
.v19-grid-cell.overview.sea{stroke-width:.48;stroke-opacity:1;stroke-dasharray:5 4}

.v19-political-cell{
  vector-effect:non-scaling-stroke;
  fill:var(--hex-owner,#7b684c);
  fill-opacity:var(--hex-strength,.9);
  stroke:#050505;
  stroke-width:1.35;
  stroke-opacity:1;
  stroke-linejoin:round;
  shape-rendering:geometricPrecision;
}
.v19-political-cell.status-contested{stroke:#f0bc47;stroke-width:2.15;stroke-dasharray:4 2}
.v19-political-cell.status-occupied{stroke:#8c0f19;stroke-width:2.15}
.v19-political-cell.status-besieged{stroke:#cf1d27;stroke-width:2.5;stroke-dasharray:2 2}
.v19-political-cell.status-devastated{filter:saturate(.7) brightness(.72)}
.v19-political-cell.status-protected{stroke:#f6df9a;stroke-width:2}
.v19-selected-cell{
  pointer-events:none;
  vector-effect:non-scaling-stroke;
  fill:rgba(255,232,149,.12);
  stroke:#fff0b3;
  stroke-width:3;
  stroke-linejoin:round;
  filter:drop-shadow(0 0 5px rgba(255,225,129,.9));
}
.v19-march-route{
  pointer-events:none;
  vector-effect:non-scaling-stroke;
  fill:none;
  stroke:#ffe397;
  stroke-width:3;
  stroke-dasharray:9 7;
  stroke-linecap:round;
  filter:drop-shadow(0 0 3px #050505);
}

.v19-hex-mode-banner{
  position:absolute;
  z-index:64;
  left:50%;
  top:calc(env(safe-area-inset-top,0px) + 10px);
  transform:translateX(-50%);
  width:min(680px,calc(100% - 28px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 12px 11px 16px;
  border:1px solid rgba(240,210,135,.65);
  border-radius:16px;
  background:rgba(8,8,7,.96);
  box-shadow:0 12px 35px rgba(0,0,0,.48),inset 0 0 0 1px rgba(255,255,255,.035);
  color:#f7e9bd;
  backdrop-filter:blur(10px);
}
.v19-hex-mode-banner[hidden]{display:none!important}
.v19-hex-mode-banner div{min-width:0;display:grid;gap:2px}
.v19-hex-mode-banner strong{font-family:Georgia,serif;font-size:15px;letter-spacing:.02em}
.v19-hex-mode-banner span{color:#cbbf9f;font-size:12px;line-height:1.35}
body.v19-hex-mode #atlasSvg{cursor:crosshair;touch-action:none}

.v19-locked-setting{display:block;color:#f5df9e;font-size:15px;margin-top:6px}
.field>.v19-locked-setting+small{display:block;color:#a99f88;font-size:11px;margin-top:4px}

.v19-stat-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:4px 0 14px;
}
.v19-stat-grid article{
  min-width:0;
  border:1px solid rgba(218,190,122,.22);
  border-radius:14px;
  padding:13px;
  background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012));
}
.v19-stat-grid small,.v19-cost-preview small{display:block;color:#bcae8d;font-size:10px;letter-spacing:.13em;margin-bottom:5px}
.v19-stat-grid strong{display:block;color:#f6e3aa;font-size:18px;overflow-wrap:anywhere}
.v19-stat-grid p{margin:5px 0 0;color:#a89e87;font-size:12px;line-height:1.38}

.v19-army-office{display:grid;gap:14px}
.v19-army-office>header{
  display:flex;
  align-items:center;
  gap:14px;
  padding:15px;
  border:1px solid color-mix(in srgb,var(--house,#7b684c) 68%,#d9bd76 32%);
  border-radius:17px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--house,#7b684c) 30%,#090908 70%),rgba(10,10,9,.96));
}
.v19-army-office>header>span{width:58px;height:58px;display:grid;place-items:center;flex:0 0 auto}
.v19-army-office>header>span img{max-width:100%;max-height:100%;object-fit:contain}
.v19-army-office>header small{color:#c8b98e;text-transform:uppercase;letter-spacing:.12em}
.v19-army-office>header h2{margin:2px 0;color:#f8e9ba;font-family:Georgia,serif}
.v19-army-office>header p{margin:3px 0 0;color:#c9c0aa;font-size:12px}
.v19-force-list{display:grid;gap:9px;max-height:42vh;overflow:auto;padding-right:2px}
.v19-force-list article{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 13px;
  border:1px solid rgba(220,192,124,.2);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}
.v19-force-list article>div:first-child{min-width:0}
.v19-force-list small{display:block;color:#b6a981;text-transform:uppercase;letter-spacing:.08em;font-size:9px}
.v19-force-list strong{display:block;color:#f1dfaa;font-family:Georgia,serif;font-size:15px;margin-top:3px}
.v19-force-list p{margin:4px 0 0;color:#aaa18d;font-size:11px;line-height:1.35}
.v19-force-list .button-row{flex:0 0 auto}
.v19-cost-preview{
  border:1px solid rgba(225,190,101,.3);
  border-radius:14px;
  padding:13px;
  background:rgba(201,154,55,.06);
}
.v19-cost-preview strong{display:block;color:#f7dc8c;font-size:20px}
.v19-cost-preview span{display:block;color:#aaa18b;font-size:11px;margin-top:4px}

.v19-slot-review{display:grid;gap:8px;margin-top:10px}
.v19-slot-review article{border:1px solid rgba(207,180,110,.22);border-radius:13px;padding:11px;background:rgba(255,255,255,.02)}
.v19-slot-review strong{color:#edd9a4}.v19-slot-review p{margin:4px 0;color:#aaa18d;font-size:11px}.v19-slot-review small{color:#8f8878}

@media(max-width:680px){
  .v19-stat-grid{grid-template-columns:1fr}
  .v19-force-list article{align-items:flex-start;flex-direction:column}
  .v19-force-list .button-row{width:100%;justify-content:flex-end}
  .v19-hex-mode-banner{top:10px}
}
