/* Inline panels open directly below the command bar. */
#drawer {
  position: relative;
  inset: auto;
  margin: 0 0 9px;
  width: 100%;
  max-width: none;
  max-height: 38dvh;
  flex-shrink: 0;
  padding: 12px 16px;
  border: 1px solid #486c64;
  background: #162e30;
  overflow: auto;
  box-shadow: 0 8px 20px #03151922;
}
#drawer:not([open]) {
  display: none;
}
#drawer .drawer-top {
  margin: 0 0 8px;
}
#drawer .drawer-top h2 {
  font:
    600 15px 'Segoe UI',
    sans-serif;
}
#drawer .drawer-top button {
  padding: 3px 8px;
}
#drawer #drawer-content .project-grid {
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  overflow-x: auto;
  gap: 9px;
  padding: 0;
}
#drawer .project {
  padding: 10px;
}
#drawer .project h3 {
  font-size: 13px;
}
#drawer .project p {
  min-height: 0;
  font-size: 10px;
}
#drawer .project .icon {
  font-size: 20px;
  margin-bottom: 5px;
}
#drawer .project button {
  font-size: 10px;
}
#drawer-content .decision-panel {
  max-width: 650px;
}
#drawer-content .journal-panel {
  padding: 0;
}
#drawer-content #journal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
#drawer-content .log-entry {
  padding: 5px;
}
.offer-command {
  border-left: 3px solid var(--faction, #86b994);
  padding-left: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.offer-command h3 {
  font-size: 18px;
  margin: 0 0 7px;
}
.offer-command p {
  font-size: 12px;
  margin: 5px 0;
}
.offer-command small {
  color: #b0c6b8;
  font-size: 10px;
}
.inline-actions {
  display: flex;
  gap: 8px;
}
.inline-actions button {
  min-width: 96px;
}
.inline-actions small,
.choices small,
.ignore-choice small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
  font-weight: 400;
}
.choice-good {
  border: 1px solid #81bb8c !important;
  background: #264438 !important;
  color: #d7f0d4 !important;
}
.choice-bad {
  border: 1px solid #dc776b !important;
  background: #493332 !important;
  color: #ffe0d2 !important;
}
.choice-neutral {
  border: 1px solid #899ca0 !important;
}
.choice-good:hover {
  background: #365b44 !important;
}
.choice-bad:hover {
  background: #664039 !important;
}
button:disabled {
  opacity: 0.43;
  cursor: not-allowed;
}
.quick-card .role-heading {
  display: flex;
  gap: 10px;
  padding: 13px 12px;
  border-bottom: 1px solid #ffffff12;
  background: color-mix(in srgb, var(--faction) 12%, #172c2c);
}
.role-heading > b {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--faction);
  color: #17332f;
  font-size: 24px;
  flex-shrink: 0;
}
.role-heading strong {
  display: block;
  font:
    600 13px 'Segoe UI',
    sans-serif;
  color: var(--faction);
}
.role-heading small {
  display: block;
  font-size: 9px;
  margin-top: 6px;
  color: #bdcabd;
}
.quick-card .card-content {
  padding: 12px;
}
.quick-card .card-content h3 {
  font-size: 21px;
  margin: 0 0 8px;
}
.quick-card .card-content p {
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}
.quick-card .choices {
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0 12px 8px;
}
.quick-card .choices button {
  font-size: 12px;
  text-align: left;
  padding: 9px 11px;
}
.quick-card .choices small {
  font-size: 9px;
  line-height: 1.4;
}
.ignore-choice {
  color: #c6b8a0;
  border-color: #7e7161;
}
.quick-card > .ignore-choice {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px;
  padding: 7px 10px;
  font-size: 11px;
  text-align: left;
}
.decision-key {
  padding: 9px 12px;
  font-size: 8px;
  color: #afbcac;
}
.good-dot {
  color: #81bb8c;
}
.bad-dot {
  color: #dc776b;
  margin-left: 8px;
}
.bribe-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 2px 12px 10px;
}
.bribe-inline > small {
  grid-column: 1/-1;
  color: #b8c5b5;
  font-size: 9px;
}
.bribe-inline button {
  padding: 8px;
  font-size: 11px;
  text-align: left;
}
.bribe-inline button small {
  display: block;
  margin-top: 4px;
  font-size: 8px;
}
.compact-wait {
  padding: 22px 15px;
}
.compact-wait p {
  font-size: 12px;
}
.compact-wait h3 {
  font-size: 23px;
}
.compact-wait .seal {
  font-size: 29px;
}
.decision-panel > .panel-top {
  padding: 9px 13px;
}
.decision-panel > .panel-top .eyebrow {
  display: none;
}
.decision-panel > .panel-top h2 {
  font-size: 16px;
}
.quick-card {
  margin-bottom: 8px;
}
.intel-briefing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.intel-block h4 {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.intel-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.intel-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgb(255 255 255 / 4%);
  font-size: 11px;
  line-height: 1.35;
}
.intel-item[data-intel-target] {
  cursor: pointer;
}
.intel-item[data-intel-target]:hover {
  background: rgb(255 255 255 / 9%);
}
.intel-item b {
  display: block;
  font-size: 11px;
}
.intel-item span {
  opacity: 0.85;
}
.intel-context {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 10px;
  opacity: 0.75;
}
.intel-context b {
  display: inline;
  font-size: 10px;
  color: #f0ce94;
}
.intel-item small {
  opacity: 0.6;
  font-size: 9px;
  white-space: nowrap;
}
.intel-item i,
.intel-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  background: #7fbf8a;
  box-shadow: 0 0 6px #7fbf8a88;
}
.intel-item.warn i,
.intel-legend i.warn {
  background: #e3bd5c;
  box-shadow: 0 0 6px #e3bd5c88;
}
.intel-item.threat i,
.intel-legend i.threat {
  background: #e0655c;
  box-shadow: 0 0 6px #e0655c88;
}
.intel-count.threat {
  color: #f08a80;
}
.intel-count.warn {
  color: #e9c96f;
}
.intel-legend {
  margin: 0 0 8px;
  font-size: 10px;
  opacity: 0.7;
}
.intel-legend i {
  margin: 0 3px 0 8px;
  vertical-align: middle;
}
.intel-top {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 11px;
}
.intel-top select {
  font-size: 11px;
  margin-left: 8px;
  padding: 5px;
}
.intel-top button {
  margin-left: auto;
  font-size: 10px;
}
.intel-top label {
  white-space: nowrap;
}
#operation-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.operation {
  text-align: left;
  padding: 10px;
}
.operation b {
  display: block;
  font-size: 12px;
  color: #d6c397;
}
.operation span {
  display: block;
  font-size: 10px;
  margin-top: 6px;
}
.operation small {
  display: block;
  color: #b6c4b2;
  font-size: 9px;
  line-height: 1.4;
  margin-top: 5px;
}
.operation-confirm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #52645a;
  margin-top: 10px;
  padding-top: 10px;
  font-size: 11px;
}
.operation-confirm > small {
  color: #e7b49b;
}
.operation-confirm button {
  margin-left: auto;
  font-size: 11px;
}
#notice-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  padding: 9px 12px;
  margin: 0 0 8px;
  border: 1px solid #81744e;
  background: #383c2d;
  font-size: 11px;
}
#notice-bar[hidden] {
  display: none;
}
#notice-bar b {
  color: #e0c891;
  white-space: nowrap;
}
#notice-bar span {
  line-height: 1.4;
}
#notice-bar button {
  margin-left: auto;
  padding: 6px 10px;
  font-size: 10px;
  flex-shrink: 0;
}
#preview-usa {
  color: #ebd49f;
  border-color: #716948;
}
#preview-usa.active {
  background: #514c33;
}
.scene-offer {
  border-width: 2px;
}
.country-bubbles {
  max-width: 185px;
}
.scene-offer span {
  white-space: normal;
  font-weight: 600;
}
.scene-offer small {
  font-weight: 400;
}
.city-heading {
  background: #163c3de8;
}
.city-heading .eyebrow {
  font-size: 7px;
}
.city-heading h2 {
  font-size: 16px;
}
.city-panel {
  background: #578f82;
}
.workspace:not(:has(> .decision-panel)) {
  grid-template-columns: 1fr;
}
#city {
  touch-action: none;
}
.inline-history {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.inline-history .graph-tabs {
  flex-direction: column;
}
.inline-history #graph-area {
  flex: 1;
}
.inline-history .history-chart {
  height: 130px;
  margin: 0;
}
.inline-history .history-note {
  margin: 4px 0;
}
.inline-history .chart-legend {
  justify-content: center;
}
#strike-cinema {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #091e3233;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
#strike-cinema svg {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.cinema-label,
.cinema-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  padding: 10px 14px;
  background: #182c35eb;
  border: 1px solid #ab9168;
  border-radius: 6px;
  color: #f1d6a6;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cinema-label {
  top: 12px;
}
.cinema-label button {
  padding: 4px 8px;
  font-size: 10px;
}
.cinema-caption {
  bottom: 12px;
}
.missile {
  filter: drop-shadow(0 0 5px #ffd6a2);
}
body:has(#strike-cinema) main > :not(.workspace),
body:has(#strike-cinema) header,
body:has(#strike-cinema) .workspace > .decision-panel {
  pointer-events: none;
}
body:has(#strike-cinema) .map-panel > *:not(#map-stage) {
  pointer-events: none;
}
@media (max-width: 1100px) {
  .game-toolbar {
    flex-wrap: wrap;
  }
  .view-switch {
    margin-right: 0;
  }
  .game-toolbar > button {
    padding: 6px 8px;
  }
  #drawer #drawer-content .project-grid {
    grid-template-columns: repeat(7, 155px);
  }
}
@media (max-width: 700px) {
  #drawer {
    padding: 9px 10px;
    max-height: 43dvh;
    margin-bottom: 6px;
  }
  #drawer .drawer-top h2 {
    font-size: 13px;
  }
  .offer-command {
    flex-wrap: wrap;
    gap: 10px;
  }
  .inline-actions {
    width: 100%;
  }
  .inline-actions button {
    min-width: 0;
    flex: 1;
    padding: 7px;
    font-size: 10px;
  }
  .intel-briefing {
    grid-template-columns: 1fr;
  }
  .intel-top {
    gap: 8px;
    flex-wrap: wrap;
  }
  .intel-top button {
    margin: 0;
    width: 100%;
    padding: 6px;
  }
  .intel-top select {
    max-width: 160px;
  }
  #operation-list {
    grid-template-columns: repeat(5, 130px);
    overflow-x: auto;
  }
  .operation {
    padding: 8px;
  }
  .operation-confirm {
    font-size: 10px;
  }
  .quick-card .role-heading {
    padding: 8px;
  }
  .quick-card .card-content {
    padding: 8px;
  }
  .quick-card .card-content h3 {
    font-size: 18px;
  }
  .quick-card .choices {
    grid-template-columns: 1fr 1fr;
  }
  .quick-card .choices button {
    font-size: 10px;
    padding: 7px;
  }
  .quick-card .choices small {
    font-size: 8px;
  }
  #notice-bar {
    font-size: 10px;
    gap: 6px;
    flex-wrap: wrap;
  }
  #notice-bar span {
    flex: 1;
    min-width: 180px;
  }
  .game-toolbar {
    gap: 3px;
  }
  .game-toolbar > button,
  .view-switch button {
    font-size: 9px;
    padding: 5px 6px;
    min-height: 28px;
  }
  .country-bubbles {
    max-width: 135px;
    top: 48px;
  }
  .scene-offer {
    padding: 5px;
    font-size: 8px;
  }
  .scene-offer small {
    font-size: 7px;
  }
  .city-heading h2 {
    font-size: 13px;
  }
  .cinema-label,
  .cinema-caption {
    font-size: 10px;
    padding: 8px;
  }
  .decision-key {
    font-size: 8px;
  }
}

/* Shallow heading leaves the northern cities visible. */
.city-heading {
  padding: 7px 10px;
  top: 7px;
  left: 8px;
  right: 8px;
}
.city-heading .eyebrow {
  display: none;
}
.city-heading h2 {
  margin: 0;
}
.city-heading button {
  padding: 5px 8px;
}
.country-bubbles {
  top: 58px;
}
.quick-card .card-content h3 {
  font-size: 19px;
}
.quick-card .role-heading {
  padding: 9px 11px;
}
.quick-card .card-content {
  padding: 9px 11px;
}
.quick-card .choices button {
  padding: 7px 9px;
}
.quick-card .ignore-choice {
  padding: 6px 9px;
}
.quick-card .choices small {
  margin-top: 3px;
}
.quick-card .decision-key {
  padding: 7px 11px;
}
@media (max-width: 700px) {
  .country-bubbles {
    top: 43px;
  }
  .quick-card .card-content h3 {
    font-size: 17px;
  }
  .city-heading h2 {
    font-size: 12px;
  }
}

.hostile-note {
  font-size: 9px;
  color: #edb59a;
  margin: 0 12px 8px;
}
.reaction-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.reaction-queue span {
  border: 1px solid #936e5b;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 10px;
  color: #e6ba9c;
}
.relationship-line {
  font-size: 11px;
  color: #dbc796;
  margin: 0;
}

.intel-road-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px;
}
.intel-road-head small {
  color: #9cb2b6;
}
.intel-road {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
}
.intel-road li {
  padding: 12px;
  border: 1px solid #476069;
  border-radius: 10px;
  background: #14282e;
  display: grid;
  gap: 7px;
}
.intel-road li > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #324951;
}
.intel-road li small {
  color: #a6bbbe;
  font-size: 11px;
}
.intel-road .done {
  border-color: #63bc9a;
}
.intel-road .ready {
  border-color: #d6b56d;
  background: #303528;
}
.intel-road .locked {
  opacity: 0.65;
}
.intel-road-note {
  font-size: 12px;
  color: #aec2bf;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .intel-road {
    grid-template-columns: 1fr;
  }
  .intel-road li {
    grid-template-columns: 25px 1fr;
    align-items: center;
  }
  .intel-road li small {
    grid-column: 2;
  }
}
.research-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #263d3d;
  border: 1px solid #b8995b;
  border-radius: 10px;
}
.research-summary small {
  color: #b7c9c5;
}
.research-summary progress {
  width: 100%;
  accent-color: #d9ba79;
}
.research-branch h3 {
  color: #e7c98a;
  margin: 20px 0 10px;
}
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.research-node {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1px solid #3e5b64;
  border-radius: 10px;
  background: #14282e;
}
.research-node.done {
  border-color: #65bc9b;
}
.research-node.running {
  border-color: #e5c075;
}
.research-node p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.research-node small {
  font-size: 11px;
  color: #a6bbc1;
}
.research-node > button {
  margin-top: auto;
}
.research-missing {
  color: #e0b898;
}
.research-buildings {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.research-buildings button {
  font-size: 11px;
  padding: 6px;
}

.finance-grid {
  display: grid;
  gap: 10px;
}
.finance-grid article {
  border: 1px solid #2c4a46;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.finance-grid small {
  opacity: 0.8;
}
.tax-row {
  display: flex;
  gap: 8px;
}
.grievance-list {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 12px;
  opacity: 0.85;
}
.agenda-line {
  font-style: italic;
  opacity: 0.75;
  margin: 2px 0;
}
/* Prepojenia výstavby a výskumu: „Najprv: …“ (✓ hotové / ○ chýba) a „Odomkne: …“. */
.needs,
.unlocks,
.lock-line {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
}
.needs i {
  font-style: normal;
  opacity: 0.6;
  margin-right: 4px;
}
.needs i.ok {
  opacity: 1;
  color: #8fd39c;
}
.needs i.todo {
  opacity: 1;
  color: #f0b0a8;
}
.unlocks {
  color: #9ad0f5;
}
.lock-line {
  color: #e9c96f;
}
.research-node .state {
  float: right;
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
}
.research-node.status-ready .state {
  color: #8fd39c;
  opacity: 1;
}
.research-node.status-active .state {
  color: #f0ce94;
  opacity: 1;
}
/* Mini panel pokladnice pri hrozbe bankrotu — krátko: stav, bilancia, mesiace, dôvody, rada. */
#fiscal-mini {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e3bd5c88;
  background: rgb(227 189 92 / 8%);
  font-size: 11px;
}
#fiscal-mini[data-level='threat'] {
  border-color: #e0655c;
  background: rgb(224 101 92 / 10%);
}
#fiscal-mini .fiscal-title {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}
#fiscal-mini[data-level='threat'] .fiscal-title {
  color: #f08a80;
}
.fiscal-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fiscal-cells small {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}
.fiscal-reasons {
  margin: 6px 0 0;
  padding-left: 16px;
  line-height: 1.4;
}
.fiscal-advice {
  margin: 4px 0 0;
  color: #f0ce94;
}
