:root {
  --p: #f4e8d0;
  --pd: #e8d9b8;
  --ink: #3a2817;
  --il: #5c4328;
  --g: #b8860b;
  --gl: #d4a84b;
  --w: #6b4423;
  --wd: #3d2817;
  --gr: #4a6b3a;
  --rd: #b33a2a;
  --sh: rgba(58, 40, 23, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Inline resource icon — renderowana wszędzie przez RI z config.js */
.res-icon {
  width: 2.15em;
  height: 2.15em;
  vertical-align: -0.2em;
  object-fit: contain;
  image-rendering: auto;
}

html, body {
  height: 100%;
  font-family: 'Philosopher', serif;
  color: var(--ink);
  background: #1a2a10;
  font-size: 14px;
  overflow: hidden;  /* only inner containers scroll, not the page itself */
}

.game {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
  z-index: 2;
  min-height: 0;  /* allow flex children to shrink below content size */
}

.center {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Right army panel */
.ap {
  width: 230px;
  min-width: 230px;
  background: linear-gradient(180deg, rgba(61, 40, 23, 0.93), rgba(61, 40, 23, 0.97));
  border-left: 3px solid var(--g);
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apt {
  font-family: 'Almendra', serif;
  font-size: 17px;
  color: var(--gl);
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.4);
}

.au {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(244, 232, 208, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.25);
  border-radius: 3px;
  padding: 6px 8px;
}

.au-n {
  font-family: 'Almendra', serif;
  font-size: 14px;
  color: var(--p);
  display: flex;
  align-items: center;
  gap: 4px;
}

.au-c {
  font-size: 15px;
  font-weight: 700;
  color: var(--gl);
}

.au-s {
  display: flex;
  gap: 4px;
  font-size: 11px;
  color: rgba(244, 232, 208, 0.5);
}

.atot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(184, 134, 11, 0.4);
  text-align: center;
  font-size: 12px;
  color: var(--p);
}

.atot .v {
  font-size: 15px;
  font-weight: 700;
  color: var(--gl);
  display: block;
  margin-top: 2px;
}

.wi {
  background: rgba(244, 232, 208, 0.06);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 3px;
  padding: 6px;
  text-align: center;
  font-size: 12px;
  color: rgba(244, 232, 208, 0.6);
}

.wi .b {
  color: var(--gl);
  font-size: 14px;
  font-weight: 700;
}

.bonus-info {
  font-size: 11px;
  color: rgba(244, 232, 208, 0.4);
  text-align: center;
  padding: 3px;
}

.march-list { margin-top: 4px; }

.march-item {
  background: rgba(244, 232, 208, 0.06);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 3px;
  padding: 5px 7px;
  font-size: 12px;
  color: var(--p);
  margin-bottom: 3px;
}

.march-item .mt-type {
  font-weight: 700;
  color: var(--gl);
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--wd);
  color: var(--p);
  padding: 8px 18px;
  border: 2px solid var(--g);
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.5);
  z-index: 300;
  opacity: 0;
  transition: all 0.3s;
  text-align: center;
  max-width: 92%;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer with version info */
.game-footer {
  background: linear-gradient(180deg, var(--wd), #2a1a0e);
  border-top: 2px solid var(--g);
  padding: 4px 12px;
  font-size: 11px;
  color: rgba(244, 232, 208, 0.6);
  text-align: center;
  letter-spacing: 0.5px;
  font-family: 'Philosopher', serif;
  flex-shrink: 0;  /* prevent footer from being squeezed by flex */
}

.game-footer .v-tag {
  color: var(--gl);
  font-weight: 700;
}

.game-footer a {
  color: rgba(244, 232, 208, 0.8);
  text-decoration: none;
  margin-left: 10px;
}

.game-footer a:hover { color: var(--gl); }
