/* Inside grade. One overcast world: quiet type, no glow, no candy buttons. */
:root {
  --ui-dim: rgba(12, 14, 16, 0.28);
  --ui-card: rgba(18, 20, 22, 0.9);
  --ui-panel: rgba(16, 18, 20, 0.78);
  --ui-page: #14181a;
  --ui-text: #e6e4de;
  --ui-accent: #e6e4de;
  --ui-glow: transparent;
  --ui-soft: #a7a59e;
  --ui-gold: #cbbfa8;
  --ui-good: #d5ddd2;
  --ui-bad: #d0a8a0;
  --ui-btn-border: #4a4e50;
  --ui-btn: #1c2022;
  --ui-btn-hover: #2a2e30;
  --ui-go-top: #2e3436;
  --ui-go-bottom: #1c2022;
  --ui-go-border: #b7b3aa;
  --ui-go-glow: transparent;
  --ui-gift-top: #3a342c;
  --ui-gift-bottom: #241e18;
  --ui-gift-border: #8a7e6c;
  --ui-gift-text: #e6e0d4;
  --ui-border: #3a3e40;
  --ui-dot: #2a2e30;
  --ui-dot-text: #8a8e88;
  --ui-threat-name: #e6e4de;
  --ui-threat-text: #a7a59e;
  --ui-title-shadow: transparent;
  --ui-heading-glow: transparent;
  --ui-gold-glow: transparent;
  --ui-stars-glow: transparent;
  --ui-hint: #b7b3aa;
  --ui-icon-btn: rgba(14, 16, 18, 0.45);
  --ui-card-pic-top: #9aa09c;
  --ui-card-pic-bottom: #23282a;
  --ui-font: "Segoe UI", Helvetica, Arial, sans-serif;
}

html, body { background: #14181a; }

h1 {
  font-weight: 500;
  font-size: 2.15em;
  letter-spacing: 0.28em;
  text-shadow: none;
}
h2 {
  font-weight: 500;
  font-size: 1.55em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
}
h3 { font-weight: 500; letter-spacing: 0.06em; text-shadow: none; }

.big { font-weight: 500; }
.gold, .stars { text-shadow: none; }
.btn {
  border-radius: 2px;
  font-weight: 500;
  letter-spacing: 0.08em;
  box-shadow: none;
  text-transform: uppercase;
}
.btn:hover:not(:disabled) { transform: none; }
.btn.go {
  background: #24282a;
  box-shadow: none;
  color: #f2f0ea;
}
.btn.gift {
  background: #2c2824;
  box-shadow: none;
  color: var(--ui-gift-text);
}
.panel, .card, .intro canvas, .icon {
  border-radius: 2px;
  box-shadow: none;
}
.icon { backdrop-filter: blur(8px); }
.dots i { border-radius: 1px; }
.dots i.on { box-shadow: none; background: #cbbfa8; color: #1a1612; }
.card { border-width: 1px; }
.card canvas { background: linear-gradient(#8e948f, #23282a); }
.newtag { border-radius: 1px; letter-spacing: 0.08em; }

#menu { justify-content: flex-start; padding-top: 8%; background: linear-gradient(to bottom, rgba(20, 24, 26, 0.05), rgba(10, 12, 14, 0.45)); }
#badges, #depot { background: #141210; }
#badges { justify-content: flex-start; padding: 0.55em 0.5em 0.5em; gap: 0.28em; overflow: hidden; }
#badgeList { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; margin-bottom: 0.35em; }
#badges > .btn { flex: none; }
.badge { padding: 0.45em 0.6em 0.4em; border-radius: 2px; }
.card .name { font-size: 0.95em; letter-spacing: 0; white-space: nowrap; }
#toast {
  background: rgba(14, 16, 18, 0.82);
  color: #e6e4de;
  border: 1px solid #3a3e40;
  border-radius: 2px;
  padding: 0.4em 0.8em;
  letter-spacing: 0.04em;
}

svg.ico { display: inline-block; vertical-align: -0.2em; }

/* ---- 2026-11-24 readability pass ----------------------------------------
   Keep the quiet gray world, but give the player clear signals: the main
   action is green, money is gold, good news green, bad news red. */
:root {
  --ui-gold: #ffd25a;
  --ui-good: #7cf08a;
  --ui-bad: #ff7a68;
  --ui-go-border: #8fe0a0;
  --ui-gift-border: #ffd25a;
}
.btn.go { background: linear-gradient(#3a9e55, #22703a); border-color: #8fe0a0; color: #fff; }
.btn.go:hover:not(:disabled) { background: linear-gradient(#45b062, #287d42); }
.btn.gift { border-color: #ffd25a; color: #ffe9a8; }
.gold { color: var(--ui-gold); }
.dots i.on { background: #ffd25a; color: #241c10; }
/* every button in a row the same height (the speaker and menu buttons were shorter) */
.row, #mapui .bottom { align-items: stretch; }
.btn.small { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6em; }
/* Armory: price buttons line up at the bottom of every card; the last row is centered */
#shop { display: flex; flex-wrap: wrap; justify-content: center; max-width: 39.5em; }
#shop .card { width: 12.5em; box-sizing: border-box; }
.card .what { min-height: 3.45em; }
.card .have { min-height: 1.2em; }
.card .btn:not(.sell) { margin-top: auto; }
.card .btn.sell.none { visibility: hidden; }
/* Map: the gift and daily mission sit in the top bar, above the map, instead of covering the Northeast. */
#mapui .top { gap: 0.6em; }
#mapui .daily { width: auto; display: grid; grid-template-columns: auto auto; gap: 0.25em 0.5em; align-items: center; padding: 0.35em 0.5em; font-size: 0.82em; }
#mapui .daily .btn { width: auto; font-size: 0.95em; padding: 0.3em 0.8em; white-space: nowrap; }
#mapui .daily #dailyInfo { font-size: 0.85em; text-align: center; max-width: 17em; line-height: 1.15; }
/* Armory fits on one 960x540 screen */
#depot { gap: 0.2em; padding-top: 0.3em; padding-bottom: 0.3em; }
#depot h2 { font-size: 1.4em; margin: 0; }
#depotCoins { margin: 0; font-size: 1.05em; }
#shop { gap: 0.4em; }
.card { padding: 0.35em 0.45em; gap: 0.1em; }
.card canvas { height: 2.9em; }
.card .what { min-height: 3.2em; font-size: 0.8em; }
#btnDepotDone { font-size: 1.15em; padding: 0.35em 1.4em; }
/* Badges-unlocked popup: cards were squashed and cut off when two or more arrived at once. */
#rewardList { max-height: 70vh; }
.reward { flex-shrink: 0; }
/* Map bottom row holds up to five buttons once Last Stand opens: keep each on one line */
#mapui .bottom .btn { white-space: nowrap; padding: 0.45em 1em; font-size: 1.05em; }
#mapui .bottom .btn.go { font-size: 1.2em; }
#mapui .bottom .btn.small { padding: 0.45em 0.7em; }

/* ---- 2026-11-24 command-center UI pass: panels and buttons match the map (navy, cool glow, gold accents) ---- */
:root {
  --ui-card: rgba(9, 20, 36, 0.92);
  --ui-panel: rgba(8, 18, 32, 0.84);
  --ui-border: #2b4a6a;
  --ui-btn: #10223a;
  --ui-btn-hover: #17304f;
  --ui-btn-border: #3a6a94;
}
.panel, .card, .reward, .badge { border-color: var(--ui-border); box-shadow: 0 0 14px rgba(58, 160, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.btn { background: linear-gradient(#16304d, #0d1e33); border-color: var(--ui-btn-border); color: #e8f2ff; }
.btn:hover:not(:disabled) { background: linear-gradient(#1d3d61, #11263f); }
.btn.go { background: linear-gradient(#3fb860, #1f7a3a); border-color: #9af0b0; box-shadow: 0 0 14px rgba(80, 220, 120, 0.35); }
.btn.gift { background: linear-gradient(#5a4512, #33260a); }
#menu h1 {
  font-size: 3.1em; font-weight: 800; letter-spacing: 0.16em;
  background: linear-gradient(#fff4c8, #ffcf4a 55%, #e08a1a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(60, 25, 0, 0.85)) drop-shadow(0 0 18px rgba(255, 170, 40, 0.35));
}
#menu > .big { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); font-weight: 600; }
#depot, #badges, #rewards, #scores { background: radial-gradient(ellipse at 50% 30%, #102540, #060d18 75%); }
h2 { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); }
#resRead { background: var(--ui-panel) !important; border: 1px solid var(--ui-border); box-shadow: 0 0 18px rgba(58, 160, 255, 0.15); border-radius: 4px; }
#resTally { border: 1px solid var(--ui-border); border-radius: 4px; box-shadow: 0 0 18px rgba(58, 160, 255, 0.12); }
#resTitle { color: #fff4c8; text-shadow: 0 2px 0 rgba(60, 25, 0, 0.8), 0 0 14px rgba(255, 190, 60, 0.4); }
#lostTitle { color: #ffb0a0; text-shadow: 0 2px 0 rgba(40, 0, 0, 0.8), 0 0 14px rgba(255, 80, 60, 0.45); }
#menu > .big { font-size: 1.12em; }

/* Results: fits with breathing room under the green button (2026-11-24). */
#results { gap: 0.4em; padding: 0.5em 0 1.4em; box-sizing: border-box; }
#results #resTally { width: 27em; height: 10.55em; }
#results #resRead { padding: 0.55em 1.2em 0.6em; }
#results #resRead h2 { margin: 0.1em 0 0.15em; }
#results #resNote { font-size: 0.9em; gap: 0.18em; }
#results #resCoins { margin: 0.2em 0 0; }

/* The site's achievements popup and page (loadsofgames engine) keep their own look: this game's global heading
   colors and glow must not reach them (2026-11-25: an earned card's name was cream on cream). */
.lgach-page .lgach-item h3 { color: inherit; text-shadow: none; letter-spacing: normal; }
.lgach-page .lgach-item.is-off h3 { color: #d4dad6; }
#btnAccount { margin-top: 0.4em; opacity: 0.92; }
#btnAccount[hidden], .btn[hidden] { display: none; }
#btnAccount[disabled] { opacity: 0.8; cursor: default; }

/* High scores (2026-11-25) */
#scores { gap: 0.5em; }
#scoreTabs .btn.on { outline: 2px solid #f5c542; }
#scoreList { list-style: none; margin: 0.2em 0; padding: 0; width: min(92vw, 520px); max-height: 52vh; overflow: auto; }
#scoreList li { display: grid; grid-template-columns: 2.4em 1fr auto auto; gap: 0.8em; align-items: baseline; padding: 0.3em 0.7em; border-radius: 8px; }
#scoreList li:nth-child(odd) { background: rgba(255, 255, 255, 0.05); }
#scoreList li.you { background: rgba(245, 197, 66, 0.22); outline: 1px solid rgba(245, 197, 66, 0.6); }
#scoreList .rk { color: #f5c542; font-weight: 800; }
#scoreList .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
#scoreList .sc { font-weight: 800; }
#scoreList .ex { opacity: 0.75; font-size: 0.9em; }
#scoreHow, #scoreYou { max-width: min(92vw, 520px); text-align: center; }
#scoreYou a { color: #f5c542; font-weight: 700; }

/* The Armory: what an automatic gun shoots down, and what it never does (2026-11-26). */
.card .hits { font-size: 0.72em; line-height: 1.2; min-height: 2.5em; display: flex; flex-direction: column; gap: 0.1em; }
.card .hits .yes { color: #9be89b; font-weight: 700; }
.card .hits .no { color: #ffab96; }
.card .hits .rate { color: #cfe3ff; }
.card .hits .fee { color: #ffd25a; font-weight: 700; }

/* A fallen city: its words on their own dark card, readable over any battle (owner, 2026-11-26: "I can't see it
   against the background"). */
#lost .lostCard, #outofarms .lostCard { background: rgba(6, 10, 18, 0.9); border: 1px solid rgba(255, 140, 120, 0.35); border-radius: 0.8em;
  padding: 0.9em 1.6em 1.1em; max-width: 34em; box-shadow: 0 0.4em 2em rgba(0, 0, 0, 0.6); display: flex; flex-direction: column;
  align-items: center; gap: 0.5em; text-align: center; }
#lost .lostCard h2, #lost .lostCard p, #outofarms .lostCard h2, #outofarms .lostCard p { margin: 0; }
#oaTitle { color: #ffb0a0; }
#btnOaArmory[disabled] { opacity: 0.55; }
/* Armory, on any screen (owner, 2026-11-27: the button at the bottom "is barely visible in a lot of devices/browsers";
   measured: with five cards it ran off the bottom of every landscape phone and of a 1366x650 laptop). The title and
   money stay at the top, Done stays at the bottom, and the cards scroll between them when there is no room. */
#depot { justify-content: flex-start; box-sizing: border-box; height: 100%; overflow: hidden; }
#depot > h2, #depot > #depotCoins, #btnDepotDone { flex: none; }
#depot #shop { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  align-content: flex-start; max-width: min(66em, 100%); padding: 0.1em 0.3em 0.6em; box-sizing: border-box; }
/* A wide screen fits more cards a row (fewer rows to scroll). */
@media (min-aspect-ratio: 16/10) { #depot #shop { max-width: min(52em, 100%); } }
#btnDepotDone { margin-bottom: max(0.2em, env(safe-area-inset-bottom)); box-shadow: 0 -0.6em 1.2em rgba(6, 13, 24, 0.85), 0 0 14px rgba(80, 220, 120, 0.45); }

/* The title screen, play first (owner, 2026-11-29): Play big on its own line, the other buttons smaller under it. */
#menu .menu-play .btn.go { font-size: 1.45em; padding: 0.55em 2.6em; }
#menu .menu-more { margin-top: 0.7em; gap: 0.5em; }
#menu .menu-more .btn { font-size: 0.85em; padding: 0.45em 1.1em; }
#menu .menu-more .btn.small { font-size: 0.8em; }

/* Play glows (owner, 2026-11-30: "the play button doesn't stand out ... maybe the play button should have a glowing
   animated border outline"; the site's other games have the same): a ring of light turning round its edge and a soft
   breathing glow, in the sky's colours. The ring is masked to the edge, so the button keeps its own face in every skin.
   Still under prefers-reduced-motion. */
@property --play-turn { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
#menu .btn.go.play-glow { position: relative; animation: play-breathe 2.4s ease-in-out infinite; }
#menu .btn.go.play-glow::before { content: ''; position: absolute; inset: -4px; padding: 3px; border-radius: 6px; pointer-events: none;
  background: conic-gradient(from var(--play-turn), #eaffff, #7fe9ff, #3fb860, #ffd24a, #7fe9ff, #eaffff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: play-turn 3s linear infinite; }
@keyframes play-turn { to { --play-turn: 360deg; } }
@keyframes play-breathe { 0%, 100% { box-shadow: 0 0 10px rgba(80, 220, 120, 0.3); } 50% { box-shadow: 0 0 26px rgba(127, 233, 255, 0.85); } }
@media (prefers-reduced-motion: reduce) { #menu .btn.go.play-glow, #menu .btn.go.play-glow::before { animation: none; } }
/* All games, on the site: a link dressed as the small buttons beside it. */
#menu .menu-more a.btn:not([hidden]) { text-decoration: none; display: inline-flex; align-items: center; gap: 0.35em; }
