body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
header {
  height: 57px;
  flex-shrink: 0;
  padding: 0 22px;
}
.brand {
  font-size: 21px;
}
.brand-mark {
  height: 35px;
  width: 34px;
  font-size: 24px;
}
.brand small {
  font-size: 7px;
}
.edition {
  font-size: 8px;
}
.ticker {
  height: 25px;
  flex-shrink: 0;
  padding: 0 22px;
}
.ticker p {
  margin: 0;
}
main {
  width: 100%;
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 20px 15px;
}
.command {
  margin-bottom: 10px;
  flex-shrink: 0;
  min-height: 40px;
}
.command .eyebrow {
  display: none;
}
.command h1 {
  font-size: 23px;
  margin: 0;
}
.clock {
  gap: 12px;
}
.clock small {
  font-size: 9px;
}
.clock strong {
  font-size: 12px;
}
.speeds button {
  padding: 6px 10px;
}
.stats {
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.stat {
  padding: 8px 12px;
}
.stat-top {
  font-size: 8px;
  letter-spacing: 0.8px;
}
.stat strong {
  font-size: 20px;
  margin: 5px 0 2px;
}
.stat small {
  font-size: 8px;
}
.stat .bar {
  margin-top: 5px;
  height: 2px;
}
.time-status {
  margin: 0 0 8px;
  padding: 8px 12px;
  gap: 14px;
  min-height: 39px;
  flex-shrink: 0;
}
.time-status span,
.time-status small {
  font-size: 9px;
  margin-top: 2px;
}
.time-status b,
.time-status strong {
  font-size: 10px;
}
.time-status .time-rule {
  max-width: none;
}
.game-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 9px;
  flex-shrink: 0;
}
.game-toolbar > button,
.view-switch button {
  font-size: 11px;
  padding: 8px 12px;
  min-height: 33px;
}
.game-toolbar b {
  font-size: 9px;
  border-radius: 10px;
  padding: 2px 5px;
  background: #405249;
  color: #f2d896;
  margin-left: 4px;
}
.view-switch {
  display: flex;
  margin-right: auto;
}
.view-switch button {
  border-radius: 0;
}
.view-switch button:first-child {
  border-radius: 5px 0 0 5px;
}
.view-switch button:last-child {
  border-radius: 0 5px 5px 0;
}
.view-switch .active {
  background: var(--gold);
  color: #172923;
  border-color: var(--gold);
}
#open-card {
  border-color: var(--faction);
  color: var(--faction);
}
.workspace {
  flex: 1;
  min-height: 0;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 320px;
}
.map-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.map-panel > .panel-top {
  height: 43px;
  flex-shrink: 0;
  padding: 8px 14px;
}
.map-panel > .panel-top .eyebrow {
  display: none;
}
.map-panel > .panel-top h2 {
  font-size: 18px;
  margin: 0;
}
.map-panel .map-tabs button {
  padding: 5px 8px;
}
.map-panel .map-bottom {
  order: 5;
  flex-shrink: 0;
  padding: 9px 13px;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  background: #14292b;
}
.map-panel > .country-strip {
  order: 4;
  padding: 7px 12px;
  background: #192f30;
  flex-shrink: 0;
}
.country-strip select {
  font-size: 11px;
  padding: 5px 9px;
}
.country-strip label {
  font-size: 8px;
}
#map-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #43b9c4;
}
.map-wrap {
  height: 100%;
  border: 0;
}
#map {
  height: 100%;
  width: 100%;
  min-height: 0;
}
.map-caption {
  bottom: 12px;
  left: 12px;
  font-size: 8px;
  max-width: 75%;
}
.map-zoom {
  bottom: 9px;
}
.map-wrap {
  background: #143841;
}
#map > rect:first-of-type {
  fill: #246174;
}
#map > rect:nth-of-type(2) {
  opacity: 0.3;
}
#land path {
  stroke: #28554d;
  stroke-width: 0.6;
}
#land path:hover {
  filter: brightness(1.15);
}
#map .ocean-label {
  fill: #91c5c8;
  font-size: 8px;
}
.map-marker text {
  font-size: 8px;
}
.city-panel {
  height: 100%;
  border: 0;
  position: relative;
  background: #3eb6c2;
  overflow: hidden;
}
.city-heading {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  padding: 8px 12px;
  z-index: 2;
  background: #123d42de;
  border: 1px solid #a9d5b34d;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}
.city-heading .eyebrow {
  font-size: 8px;
  color: #afd9c6;
}
.city-heading h2 {
  font-size: 18px;
  margin-top: 4px;
}
.city-heading button {
  background: #235056;
  border-color: #6b9690;
  font-size: 10px;
  padding: 7px;
}
#city {
  height: 100%;
  width: 100%;
  aspect-ratio: auto;
  touch-action: pan-y;
}
#city-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  background: #16454bdd;
  color: #d5e6cc;
  font-size: 10px;
  padding: 8px;
  pointer-events: none;
}
.country-bubbles {
  position: absolute;
  top: 83px;
  left: 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 3;
  max-width: 165px;
}
.scene-offer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid var(--faction);
  border-radius: 20px;
  background: #163d42ed;
  box-shadow: 0 5px 15px #16484922;
  color: #edf0de;
  font-size: 10px;
}
.scene-offer > b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--faction);
  color: #163536;
  font-size: 16px;
}
.scene-offer small {
  display: block;
  color: #c4dcd1;
  font-size: 8px;
  margin-top: 3px;
}
.scene-offer span {
  white-space: nowrap;
}
body[data-view='world'] #city-panel {
  display: none;
}
body[data-view='country'] .map-wrap {
  display: none;
}
body[data-view='country'] .map-tabs {
  visibility: hidden;
}
.map-panel > #country-detail,
.map-panel > #foreign,
.lower,
footer {
  display: none;
}
.decision-panel {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.decision-panel > .panel-top {
  padding: 13px 15px;
}
.decision-panel > .panel-top h2 {
  font-size: 18px;
}
.decision-panel > .panel-top .eyebrow {
  font-size: 8px;
  letter-spacing: 1px;
}
.decision-panel .pill {
  font-size: 8px;
  padding: 4px;
}
.dossier {
  margin: 0 12px 12px;
  border-top: 3px solid var(--faction, var(--gold));
  width: auto;
  max-width: none;
}
.portrait {
  height: 95px;
}
.person {
  padding: 10px 12px;
}
.person strong {
  font-size: 17px;
}
.person small {
  font-size: 9px;
}
.person .loyalty {
  font-size: 8px;
}
.card-content {
  padding: 12px;
}
.card-content h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
.card-content p {
  font-size: 11px;
  line-height: 1.6;
}
.card-hint {
  font-size: 9px !important;
  margin-top: 9px !important;
}
.choices {
  margin: 0 12px 12px;
  gap: 7px;
}
.choices button {
  padding: 8px;
  font-size: 10px;
}
.choices button span {
  display: inline;
  margin-right: 5px;
  font-size: 12px;
}
.swipe-help {
  font-size: 8px;
  margin-bottom: 10px;
}
.decision-panel > #press-panel {
  display: none;
}
.waiting {
  padding: 22px 20px;
}
.waiting .seal {
  font-size: 35px;
  margin-bottom: 10px;
}
.waiting h3 {
  font-size: 22px;
}
.offer-pin circle,
.offer-pin path {
  fill: var(--faction, #43c7bb);
}
.offer-pin circle {
  stroke: #fff0d6;
  stroke-width: 2;
  filter: drop-shadow(0 2px 3px #142f4080);
}
.offer-pin text {
  fill: #18312e;
}
.offer-pin:hover circle {
  fill: var(--faction);
  stroke: #fff;
  stroke-width: 4;
}
.offer-row {
  border-color: var(--faction);
}
.offer-row > b {
  color: var(--faction);
}
.faction-key i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--faction);
  margin-right: 4px;
}
.faction-key {
  font-size: 9px;
  color: #bacbbd;
}
.faction-modal > .notice-seal {
  color: var(--faction);
}
.expiring {
  animation: offer-pulse 1.4s ease-in-out infinite;
}
@keyframes offer-pulse {
  50% {
    filter: brightness(1.25);
    opacity: 0.7;
  }
}
#drawer {
  width: min(920px, calc(100% - 30px));
  max-width: 920px;
  padding: 20px;
  max-height: 88dvh;
}
#drawer::backdrop {
  background: #05141ac2;
  backdrop-filter: blur(4px);
}
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.drawer-top h2 {
  font-size: 26px;
  margin: 0;
}
.drawer-top button {
  padding: 9px 13px;
}
#drawer-content > .projects-panel,
#drawer-content > .journal-panel,
#drawer-content > .decision-panel {
  display: block;
}
#drawer-content .project-grid {
  grid-template-columns: repeat(3, 1fr);
}
#drawer-content .project p {
  min-height: 44px;
}
#drawer-content .panel-top {
  display: none;
}
#drawer-content > .press-panel {
  margin: 0;
  border: 0;
  padding: 0;
}
#drawer-content > #foreign {
  display: block;
  border: 0;
  padding: 0;
}
#drawer-content .foreign-heading {
  display: none;
}
#drawer-content .offer-row {
  min-width: 200px;
}
#drawer-content .journal-panel {
  padding-top: 15px;
}
#drawer-content .decision-panel {
  max-width: 420px;
  margin: auto;
}
#drawer-content .decision-panel .portrait {
  height: 130px;
}
/* Osobné výsledky hráča (7.5): skóre, počítadlá, mesiace a časová os. */
.end-player {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.end-player h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.end-score {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  font-size: 13px;
}
.end-score small,
.end-legend,
.end-months {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.end-parts {
  margin: 8px 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.end-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
}
.end-stats b {
  color: var(--gold);
}
.end-months {
  margin: 8px 0 0;
  font-size: 11px;
}
.end-timelapse {
  width: 100%;
  height: 46px;
  margin-top: 6px;
}
.end-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin: 0 3px 0 8px;
  vertical-align: middle;
}
.difficulty.ľahká {
  color: var(--green);
}
.difficulty.stredná {
  color: var(--gold);
}
.difficulty.ťažká {
  color: var(--red);
}
.difficulty-note b {
  font-size: 12px;
}
@media (max-width: 800px) {
  .end-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.end-fiscal {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgb(224 101 92 / 55%);
  border-radius: 8px;
  background: rgb(224 101 92 / 8%);
}
.end-fiscal h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--red);
}
.end-fiscal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 12px;
}
.end-fiscal-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.end-fiscal-why {
  margin: 10px 0 2px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.end-fiscal ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.45;
}
.end-fiscal-advice {
  margin: 8px 0 0;
  font-size: 12px;
}
@media (max-width: 800px) {
  .end-fiscal-grid {
    grid-template-columns: 1fr;
  }
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 15px 0;
}
.result-table th,
.result-table td {
  text-align: left;
  border-bottom: 1px solid #3b5248;
  padding: 9px 6px;
}
.result-table th {
  color: var(--muted);
  font-weight: 400;
  width: 80px;
}
.end-joke {
  font:
    italic 18px Georgia,
    serif !important;
  color: var(--gold) !important;
  margin: 0 0 10px !important;
}
.history-chart {
  width: 100%;
  display: block;
  margin-top: 12px;
}
.history-chart text {
  fill: #a8bcb0;
  font:
    10px 'Segoe UI',
    sans-serif;
}
.chart-legend {
  display: flex;
  gap: 18px;
  font-size: 10px;
}
.history-note {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 8px;
}
.graph-tabs {
  display: flex;
  gap: 7px;
}
.graph-tabs button {
  font-size: 10px;
  padding: 7px 10px;
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .portrait {
    height: 135px;
  }
  .card-content p {
    font-size: 12px;
  }
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 285px;
  }
  .game-toolbar > button,
  .view-switch button {
    padding: 7px 8px;
    font-size: 10px;
  }
  .command h1 {
    font-size: 20px;
  }
  .edition {
    display: none;
  }
  .time-status .time-rule {
    display: none;
  }
}
@media (max-width: 700px) {
  header {
    height: 47px;
    padding: 0 12px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
    letter-spacing: 4px;
  }
  .brand-mark {
    height: 28px;
    width: 28px;
    font-size: 20px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 3px;
  }
  .header-actions button {
    font-size: 9px;
    padding: 6px;
  }
  .ticker {
    height: 22px;
    padding: 0 12px;
  }
  .ticker > span:first-child {
    font-size: 7px;
  }
  main {
    padding: 8px;
    min-height: 0;
  }
  .command {
    min-height: 35px;
    margin-bottom: 7px;
  }
  .command h1 {
    display: none;
  }
  .command > div:first-child {
    display: none;
  }
  .clock {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .clock small {
    display: inline;
    margin-left: 10px;
  }
  .clock strong {
    font-size: 11px;
  }
  .stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 6px;
  }
  .stat {
    padding: 7px 5px;
  }
  .stat-top {
    font-size: 6px;
    letter-spacing: 0;
    min-height: 16px;
  }
  .stat-top b {
    display: none;
  }
  .stat strong {
    font-size: 13px;
    white-space: nowrap;
  }
  .stat small {
    display: none;
  }
  .stat .bar {
    margin-top: 4px;
  }
  .time-status {
    padding: 6px 8px;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: nowrap;
    min-height: 36px;
  }
  .time-status > div:first-child {
    min-width: 95px;
    max-width: 145px;
  }
  .time-status b,
  .time-status strong {
    font-size: 8px;
  }
  .time-status span {
    font-size: 8px;
  }
  .time-status small {
    display: none;
  }
  .month-meter {
    width: 28px;
    flex-shrink: 0;
  }
  .game-toolbar {
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
  }
  .game-toolbar > button,
  .view-switch button {
    font-size: 9px;
    padding: 6px 7px;
    min-height: 30px;
  }
  .view-switch {
    margin-right: 0;
  }
  .game-toolbar b {
    font-size: 8px;
    margin-left: 1px;
    padding: 1px 4px;
  }
  #open-journal {
    display: none;
  }
  .workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .workspace > .decision-panel {
    display: none;
  }
  .map-panel > .panel-top {
    height: 33px;
    padding: 6px 10px;
  }
  .map-panel > .panel-top h2 {
    font-size: 15px;
  }
  .map-tabs button {
    font-size: 8px;
  }
  .map-panel > .country-strip {
    padding: 5px 8px;
  }
  .country-strip select {
    font-size: 10px;
    padding: 4px;
  }
  .country-strip > span {
    font-size: 8px;
  }
  .map-panel .map-bottom {
    gap: 8px;
    padding: 7px 5px;
  }
  .faction-key {
    font-size: 7px;
  }
  .faction-key i {
    width: 5px;
    height: 5px;
    margin-right: 2px;
  }
  .city-heading {
    top: 6px;
    left: 6px;
    right: 6px;
    padding: 6px 8px;
    gap: 5px;
    flex-wrap: nowrap;
  }
  .city-heading .eyebrow {
    display: none;
  }
  .city-heading h2 {
    font-size: 14px;
    margin: 0;
  }
  .city-heading button {
    font-size: 8px;
    padding: 6px;
  }
  .city-heading > div:last-child {
    gap: 4px;
  }
  #city-build {
    display: none;
  }
  .country-bubbles {
    left: 7px;
    top: 49px;
    gap: 5px;
    max-width: 130px;
  }
  .scene-offer {
    font-size: 8px;
    padding: 5px 7px;
    gap: 5px;
  }
  .scene-offer > b {
    width: 19px;
    height: 19px;
    font-size: 12px;
  }
  .scene-offer small {
    font-size: 7px;
  }
  #city-caption {
    font-size: 8px;
    padding: 6px;
  }
  .map-caption {
    font-size: 7px;
  }
  .offer-pin circle {
    stroke-width: 2;
  }
  #drawer {
    padding: 14px;
  }
  .drawer-top h2 {
    font-size: 21px;
  }
  #drawer-content .project-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 9px 12px;
  }
  #drawer-content .project {
    padding: 11px;
  }
  .result-table {
    font-size: 11px;
  }
  dialog h2 {
    font-size: 27px;
  }
  #drawer-content .decision-panel {
    max-width: none;
  }
  .bribe-options p {
    font-size: 10px;
  }
}
/* Reserve the bulk of the viewport for the playable map. */
@media (min-width: 701px) {
  .stat {
    height: 67px;
    padding: 7px 11px;
  }
  .stat strong {
    line-height: 23px;
    margin: 3px 0 1px;
  }
  .stat small {
    display: none;
  }
  .stat-top {
    line-height: 15px;
  }
  .stat .bar {
    margin-top: 4px;
  }
  .command {
    min-height: 30px;
    margin-bottom: 7px;
  }
  .time-status {
    padding: 6px 12px;
    min-height: 34px;
  }
  .game-toolbar > button,
  .view-switch button {
    padding: 7px 9px;
    font-size: 10px;
  }
}
body[data-view='country'] .map-panel > .panel-top {
  display: none;
}
.map-wrap {
  background: #246174;
}
.view-switch button.active:hover {
  background: var(--gold);
  color: #172923;
}
.map-panel > .country-strip {
  min-height: 34px;
}
#drawer-content > #country-detail {
  display: flex;
  flex-wrap: wrap;
  padding: 15px 0;
  gap: 20px;
}
#drawer-content .country-actions {
  flex-wrap: wrap;
}
#modal:has(.result-table) {
  padding: 24px;
}
#modal:has(.result-table) h2 {
  font-size: 29px;
  margin: 10px 0;
}
#modal:has(.result-table) .result-table {
  margin: 10px 0;
}
#modal:has(.result-table) th,
#modal:has(.result-table) td {
  padding: 6px;
}
#modal:has(.result-table) .history-chart {
  max-height: 150px;
}
#modal:has(.result-table) .primary {
  margin-top: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .expiring {
    animation: none;
  }
}
