/* BALKANOPOLY — the design kit: the old-atlas look every screen (and any future game) shares:
   colours and fonts (the :root tokens), buttons, framed parchment cards, the hand-inked icons, thin brown scroll bars.
   Screen-specific styles live next to their screen: games/balkanopoly/css/ and shared/css/ (one file per feature). */
:root {
  --desk: #d9c59c;
  --paper: #f3e6c8;
  --paper2: #efe1bf;
  --paper3: #fbf4e2;
  --ink: #3b2d1d;
  --muted: #6b5539;
  --rule: #8a7553;
  --light: #c9b48c;
  --accent: #7a3e1d;
  --good: #2f6b3a;
  --bad: #9a2b1d;
  --gold: #c9a24a;
  --sea: #bdd0c6;
  --disp: 'IM Fell English SC', Georgia, 'Times New Roman', serif;
  --body: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --type: 'Special Elite', 'Courier New', monospace;
  /* typewriter numbers & labels (Mix 1 design kit, v8.1): money, timers, codes, small status lines */
  --mono: 'Courier Prime', 'Courier New', monospace;
  font-family: var(--body);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--desk);
  color: var(--ink);
  overflow: hidden;
}
body {
  background: var(--desk);
  box-shadow: inset 0 0 160px rgba(107, 85, 57, 0.45);
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.screen {
  position: absolute;
  inset: 0;
  overflow: auto;
}
b,
strong {
  font-weight: 700;
}

/* ----- buttons (design kit v8.1) -----
   one family: .main (sienna) and .good (forest) are rubber stamps — typewriter capitals with a double ink ring;
   every other button is a quiet book-type button; .danger is the dashed red one. Sizes: .sm · normal · .lg */
.btn {
  border: 1.5px solid var(--rule);
  border-radius: 2px;
  padding: 10px 16px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.01em;
  background: var(--paper3);
  color: var(--ink);
  transition:
    transform 0.08s,
    filter 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  line-height: 1.1;
}
.btn:hover:not(:disabled) {
  filter: brightness(1.06);
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn.main,
.btn.good {
  --stamp: var(--accent);
  background: var(--stamp);
  border: 2px solid var(--stamp);
  outline: 1.5px solid var(--stamp);
  outline-offset: 3px;
  border-radius: 3px;
  color: var(--paper3);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 4px;
}
.btn.good {
  --stamp: var(--good);
}
.btn.main:disabled,
.btn.good:disabled {
  outline-color: transparent;
}
.btn.danger {
  background: transparent;
  color: var(--bad);
  border: 2px dashed var(--bad);
}
.btn.ghost {
  background: transparent;
  border-color: var(--rule);
}
.btn.sm {
  padding: 5px 10px;
  font-size: 15px;
  min-height: 32px;
}
.btn.main.sm,
.btn.good.sm {
  font-size: 13px;
  letter-spacing: 0.08em;
  outline-offset: 2px;
  margin: 3px;
}
.btn.lg {
  min-height: 56px;
  font-size: 19px;
  padding: 14px 26px;
}
.btn.wide {
  width: 100%;
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.row > .btn.grow {
  flex: 1;
}

/* ----- framed parchment cards (home, lobby, side panels) ----- */
.card,
.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 5px var(--rule),
    0 8px 20px rgba(59, 45, 29, 0.25);
  padding: 16px 18px;
}
.card + .card {
  margin-top: 22px;
}
.card h3,
.panel h4 {
  font-family: var(--disp);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--ink);
}
label.f {
  display: block;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin: 10px 0 4px;
}
input[type='text'],
input[type='number'],
select,
textarea {
  width: 100%;
  background: var(--paper3);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 11px 12px;
  font: inherit;
  font-size: 17px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #7a3e1d33;
}
input::placeholder {
  color: #9a8664;
  font-style: italic;
}
.seg {
  display: flex;
  gap: 8px;
}
.seg button {
  flex: 1;
  padding: 9px 8px;
  border: 1px dashed var(--rule);
  background: var(--paper3);
  font-family: var(--disp);
  font-size: 19px;
  line-height: 1.1;
  color: var(--ink);
}
.seg button.on {
  border: 2px solid var(--accent);
  background: #f3dcc8;
  box-shadow: inset 0 0 0 3px var(--paper3);
}
.seg button:disabled {
  cursor: default;
}
.seg.pct button {
  font-size: 18px;
  padding: 7px 4px;
}
.hintline {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin-top: 5px;
}
.seg small {
  display: block;
  font-family: var(--body);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* hand-inked icons (js/ink.js) */
.ii {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  flex: none;
  display: inline-block;
}
.btn .ii {
  margin-right: 0.15em;
}
.tabs button .ii {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 2px;
}
#muteBtn .ii,
#musicBtn .ii {
  margin: 0;
  width: 20px;
  height: 20px;
}

/* ---- v9.4: thin brown scrollbars (instead of the grey browser ones) ----
   v9.6.1: only on devices with a mouse. Phones and tablets draw scroll bars ON TOP of the content, so a painted brown
   bar covered numbers at the right edge (iPhone); there the device's own faint indicator is used, which fades away. */
@media (pointer: fine) {
  * {
    scrollbar-width: thin;
    scrollbar-color: #7a3e1d transparent;
  }
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: #7a3e1d;
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #5e2f15;
    background-clip: padding-box;
    border: 2px solid transparent;
  }
}
