:root {
  color-scheme: dark;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #080b0d;
  color: #e6eee8;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #080b0d; }
body { user-select: none; }
button, select { font: inherit; }
button { border: 1px solid #b7c2bd; background: #e5ece8; color: #0a0d0c; font-weight: 800; padding: 12px 17px; cursor: pointer; letter-spacing: .025em; }
button:hover, button:focus-visible { filter: brightness(1.1); outline: 2px solid #8fe0a5; outline-offset: 2px; }
button:active { transform: translateY(1px); }

#app { position: relative; width: 100%; height: 100%; }
#game { display: block; width: 100%; height: 100%; cursor: crosshair; background: #0b1012; }
.overlay { position: absolute; inset: 0; display: none; place-items: center; padding: 22px; overflow: auto; background: rgba(2, 4, 5, .76); backdrop-filter: blur(5px); }
.overlay.visible { display: grid; }
.panel { width: min(720px, 100%); border: 1px solid #5e6d66; background: rgba(10, 15, 16, .97); padding: 30px; box-shadow: 0 18px 80px rgba(0, 0, 0, .55); }
.panel-wide { width: min(1140px, 100%); }
.compact { width: min(490px, 100%); }
.eyebrow { color: #8fb3a0; font-size: 12px; letter-spacing: .16em; }
h1 { margin: 8px 0 13px; font-size: clamp(31px, 6vw, 62px); line-height: .92; letter-spacing: -.045em; }
p { color: #b7c2bd; max-width: 64ch; line-height: 1.55; }
.muted { color: #819089; font-size: 12px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button-secondary { color: #d7e0da; background: transparent; border-color: #65736c; }

.command { min-height: min(720px, calc(100vh - 44px)); display: flex; flex-direction: column; }
.command-header { display: flex; justify-content: space-between; gap: 22px; align-items: start; border-bottom: 1px solid #34413b; padding-bottom: 20px; }
.command-header h1 { margin-bottom: 0; }
.rank-box { display: grid; gap: 5px; min-width: 180px; padding: 13px; border: 1px solid #60786b; background: rgba(84, 119, 99, .15); }
.rank-box b { color: #a9e8c4; font-size: 18px; }
.rank-box span { color: #b5c1ba; font-size: 11px; }
.board-layout { display: grid; grid-template-columns: 1.24fr .76fr; gap: 20px; flex: 1; padding: 20px 0; min-height: 450px; }
.europe-map { position: relative; overflow: hidden; min-height: 420px; border: 1px solid #43564c; background: radial-gradient(ellipse at 44% 45%, rgba(110, 145, 102, .22), transparent 45%), linear-gradient(130deg, #182321 0 29%, #27342c 29% 30%, #192421 30% 58%, #2b332c 58% 60%, #17221e 60%); }
.europe-map::before { content: ""; position: absolute; inset: 7% 12%; border: 1px dashed rgba(163, 198, 172, .22); clip-path: polygon(31% 0, 56% 8%, 73% 30%, 96% 43%, 83% 65%, 71% 64%, 62% 97%, 42% 84%, 29% 62%, 3% 62%, 16% 44%, 2% 28%); background: rgba(107, 142, 105, .16); }
.europe-map::after { content: "EUROPEAN THEATRE"; position: absolute; right: 14px; bottom: 12px; color: rgba(211, 231, 216, .34); font-size: 11px; letter-spacing: .18em; }
.map-label { position: absolute; z-index: 2; top: 12px; left: 14px; color: #bfd8c7; font-size: 11px; letter-spacing: .13em; }
.map-pin { position: absolute; z-index: 3; width: 13px; height: 13px; min-width: 0; padding: 0; border: 2px solid #e4efe8; border-radius: 50%; background: #75c99a; box-shadow: 0 0 0 4px rgba(117, 201, 154, .18); }
.map-pin span { position: absolute; top: 14px; left: 7px; width: max-content; color: #e4eee8; font-size: 10px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.map-pin i { position: absolute; top: -13px; left: -3px; color: #ffdc9c; font-size: 9px; font-style: normal; }
.map-pin.difficulty-3 { background: #ed7f77; box-shadow: 0 0 0 4px rgba(237, 127, 119, .18); }
.map-pin.difficulty-2 { background: #e9c87b; box-shadow: 0 0 0 4px rgba(233, 200, 123, .18); }
.mission-list { display: grid; gap: 9px; align-content: start; }
.mission-card { display: grid; gap: 5px; text-align: left; padding: 13px 14px; background: rgba(20, 29, 27, .95); color: #e5eee8; border-color: #53655c; }
.mission-card:hover { background: rgba(52, 73, 62, .95); }
.mission-card .mission-location { color: #92b6a1; font-size: 11px; letter-spacing: .1em; }
.mission-card b { font-size: 15px; }
.mission-card small { color: #b0beb6; font-size: 11px; }
.mission-card.difficulty-3 { border-left: 4px solid #ed7f77; }
.mission-card.difficulty-2 { border-left: 4px solid #e9c87b; }
.mission-card.difficulty-1 { border-left: 4px solid #75c99a; }
.command-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #34413b; padding-top: 16px; color: #9daaa3; font-size: 12px; }

.briefing dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.briefing dl div { padding: 11px; border: 1px solid #43534c; background: rgba(33, 45, 40, .42); }
dt { color: #8ca896; font-size: 10px; letter-spacing: .11em; } dd { margin: 5px 0 0; color: #e7eee9; font-size: 13px; }
.loadout-label { display: grid; gap: 7px; color: #95aa9e; font-size: 12px; letter-spacing: .1em; }
select { color: #e8efea; background: #17201d; border: 1px solid #66766d; padding: 11px; }
.result-rank { display: grid; gap: 4px; margin: 24px 0; padding: 18px; border: 1px solid #5a7868; background: rgba(82, 126, 94, .15); color: #a7e2ba; font-size: 28px; font-weight: 800; }
.result-rank span { color: #c2d0c6; font-size: 12px; font-weight: 400; letter-spacing: .08em; }
.unlock { color: #ffe0a0; border-left: 3px solid #ffe0a0; padding-left: 11px; }
.armory-section { margin-top: 24px; }
.armory-section h2 { font-size: 14px; color: #a8c7b1; letter-spacing: .12em; }
.armory-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 8px; }
.armory-item { display: grid; gap: 5px; min-height: 94px; padding: 12px; border: 1px solid #53655c; background: rgba(29, 41, 36, .6); }
.armory-item span, .armory-item small { font-size: 10px; color: #aab8b0; }
.armory-item.locked { opacity: .52; border-color: #4a4f4b; }
.armory-item.unlocked b { color: #b6edc9; }

@media (max-width: 760px) {
  .overlay { padding: 0; align-items: stretch; }
  .panel, .panel-wide { width: 100%; min-height: 100%; padding: 22px; border: 0; }
  .command-header, .command-footer { align-items: stretch; flex-direction: column; }
  .board-layout { grid-template-columns: 1fr; }
  .europe-map { min-height: 300px; }
  .briefing dl { grid-template-columns: 1fr; }
}
