@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Libre Baskerville";
  src: url("assets/fonts/LibreBaskerville-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Libre Baskerville";
  src: url("assets/fonts/LibreBaskerville-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --mo-font: "Inter", system-ui, sans-serif;
  --mo-serif: "Libre Baskerville", Georgia, serif;
  --mo-stage: #090c11;
  --mo-frame: #272b33;
  --mo-frame-edge: #555b66;
  --mo-screen: #d9dce2;
  --mo-screen-alt: #b8c3cf;
  --mo-ink: #171a20;
  --mo-ink-soft: #555c69;
  --mo-ink-faint: #7e8590;
  --mo-surface: rgba(250, 250, 252, 0.78);
  --mo-surface-solid: #f6f7f9;
  --mo-surface-soft: rgba(255, 255, 255, 0.5);
  --mo-hairline: rgba(33, 39, 49, 0.1);
  --mo-glass-border: rgba(255, 255, 255, 0.48);
  --mo-scrim: rgba(12, 14, 20, 0.42);
  --mo-green: #138a62;
  --mo-green-soft: #e2f6e9;
  --mo-red: #d5484f;
  --mo-red-soft: #fee9eb;
  --mo-amber: #bd7c0a;
  --mo-amber-soft: #fff1d3;
  --mo-orange: #ca6512;
  --mo-orange-soft: #ffeadb;
  --mo-blue: #356bd7;
  --mo-blue-soft: #e8efff;
  --mo-gray-soft: #eceef1;
  --mo-row-radius: 14px;
  --mo-card-radius: 16px;
  --mo-panel-radius: 30px;
  --mo-dock-radius: 28px;
  --mo-pill-radius: 999px;
  --mo-icon-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  --mo-card-shadow: 0 2px 10px rgba(20, 24, 30, 0.06);
  --mo-panel-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  --mo-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
  --mo-screen: #1a2029;
  --mo-screen-alt: #273241;
  --mo-ink: #f1f3f6;
  --mo-ink-soft: #b6bdc8;
  --mo-ink-faint: #8e96a4;
  --mo-surface: rgba(25, 30, 39, 0.82);
  --mo-surface-solid: #202630;
  --mo-surface-soft: rgba(32, 39, 50, 0.62);
  --mo-hairline: rgba(255, 255, 255, 0.1);
  --mo-glass-border: rgba(255, 255, 255, 0.15);
  --mo-green-soft: #183b2d;
  --mo-red-soft: #45252b;
  --mo-amber-soft: #463618;
  --mo-orange-soft: #482d1b;
  --mo-blue-soft: #1f3159;
  --mo-gray-soft: #313843;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body.ministeros-demo {
  margin: 0;
  overflow: hidden;
  background: var(--mo-stage);
  color: var(--mo-ink);
  font-family: var(--mo-font);
}

button,
input {
  font: inherit;
}

button {
  letter-spacing: 0;
}

.mo-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.mo-icon--light {
  filter: brightness(0) invert(1);
}

.mo-reviewbar {
  position: fixed;
  z-index: 20000;
  left: 50%;
  bottom: 14px;
  display: flex;
  gap: 4px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(14, 17, 23, 0.82);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px) saturate(140%);
}

.mo-reviewbar button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #d7dce5;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.mo-reviewbar button:hover,
.mo-reviewbar button:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

#ministeros-stage {
  display: grid;
  width: 100vw;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 18px 22px 58px;
  background: #090c11;
}

#ministeros-shell {
  position: relative;
  width: min(94vw, calc((100vh - 94px) * 4 / 3));
  aspect-ratio: 4 / 3;
  min-width: 760px;
  overflow: hidden;
  border: 1px solid var(--mo-frame-edge);
  border-radius: 46px;
  background: var(--mo-frame);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    inset 0 -2px rgba(0, 0, 0, 0.54),
    0 38px 80px rgba(0, 0, 0, 0.5);
}

#ministeros-shell::before {
  content: "";
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border: 2px solid #14171c;
  border-radius: 50%;
  background: #202631;
  box-shadow: 0 0 0 1px #343a45;
}

#ministeros-shell::after {
  content: "JUANWEI";
  position: absolute;
  z-index: 20;
  top: 7px;
  left: calc(50% + 15px);
  color: #aeb4bf;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.mo-screen {
  position: absolute;
  inset: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: var(--mo-screen);
  color: var(--mo-ink);
  container-type: inline-size;
  isolation: isolate;
}

.mo-wallpaper {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(125deg, transparent 0 47%, rgba(255, 255, 255, 0.2) 47% 48%, transparent 48% 100%),
    linear-gradient(160deg, var(--mo-screen) 0 48%, var(--mo-screen-alt) 100%);
}

.mo-wallpaper::before {
  content: "JW";
  position: absolute;
  right: -34px;
  bottom: -86px;
  color: rgba(255, 255, 255, 0.12);
  font-size: 300px;
  font-weight: 700;
  line-height: 1;
}

.mo-wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 42%, rgba(30, 36, 46, 0.08));
  pointer-events: none;
}

.mo-statusbar {
  position: relative;
  z-index: 30;
  display: grid;
  height: 44px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--mo-hairline);
  background: rgba(250, 250, 252, 0.54);
  backdrop-filter: blur(28px) saturate(150%);
  font-size: 12px;
  font-weight: 600;
}

[data-theme="dark"] .mo-statusbar {
  background: rgba(18, 20, 26, 0.52);
}

.mo-statusbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mo-jw-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: #1f5d54;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

.mo-statusbar__system {
  color: var(--mo-ink-soft);
  font-weight: 500;
}

.mo-statusbar__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: var(--mo-ink-soft);
}

.mo-statusbar__right .mo-icon {
  width: 16px;
  height: 16px;
  opacity: 0.78;
}

.mo-home {
  position: absolute;
  inset: 44px 0 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px 22px 16px;
  overflow: hidden;
  transition: filter 180ms var(--mo-ease), transform 180ms var(--mo-ease);
}

.has-overlay .mo-home {
  filter: blur(14px) saturate(78%);
  transform: scale(1.012);
}

.mo-homehead {
  display: flex;
  min-height: 46px;
  justify-content: space-between;
  align-items: flex-start;
}

.mo-homehead h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
}

.mo-homehead p {
  margin: 4px 0 0;
  color: var(--mo-ink-soft);
  font-size: 12px;
}

.mo-turn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 3px;
  color: var(--mo-ink-soft);
  font-size: 12px;
  font-weight: 500;
}

.mo-action-dots,
#acc-dots-big {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mo-action-dots span,
#acc-dots-big .dot-on,
#acc-dots-big .dot-off {
  width: 9px;
  height: 9px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--mo-green);
  color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

#acc-dots-big .dot-off {
  background: rgba(98, 106, 119, 0.28);
}

.mo-resource-widget,
#recursos {
  display: grid;
  min-height: 84px;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(150px, 1.35fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--mo-glass-border);
  border-radius: var(--mo-card-radius);
  background: var(--mo-surface);
  box-shadow: var(--mo-card-shadow);
  backdrop-filter: blur(30px) saturate(150%);
}

.mo-resource,
#recursos .recurso-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 8px;
  padding: 12px 13px;
  border-right: 1px solid var(--mo-hairline);
  background: transparent;
}

.mo-resource__icon {
  display: grid;
  width: 30px;
  height: 30px;
  grid-row: 1 / 3;
  place-items: center;
  align-self: center;
  border-radius: 9px;
  background: var(--mo-gray-soft);
  color: var(--mo-ink-soft);
}

.mo-resource__icon .mo-icon {
  width: 17px;
  height: 17px;
  opacity: 0.8;
}

.mo-resource__label,
#recursos .recurso-label {
  overflow: hidden;
  color: var(--mo-ink-soft);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-resource__value,
#recursos .recurso-val {
  color: var(--mo-ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.mo-scandal {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 11px 15px;
}

.mo-scandal__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--mo-ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.mo-scandal__head strong,
#escandalo-pct {
  color: var(--mo-ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.mo-scandal__track,
#escandalo-bar-bg {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: var(--mo-pill-radius);
  background: linear-gradient(90deg, #35a76d 0 40%, #d49a2b 40% 70%, #d5484f 70% 100%);
}

.mo-scandal__track::after {
  content: "";
  position: absolute;
  inset: 0;
  left: var(--scandal, 63%);
  background: rgba(225, 229, 235, 0.82);
}

#escandalo-bar {
  height: 100%;
  border-radius: inherit;
}

.mo-appspace {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.38fr) minmax(310px, 0.9fr);
  gap: 18px;
  overflow: hidden;
}

.mo-section {
  min-width: 0;
}

.mo-section__title {
  display: flex;
  height: 26px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: var(--mo-ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mo-section__title span {
  color: var(--mo-ink-faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.mo-module-grid,
#modulos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 18px;
  align-content: start;
}

.mo-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
}

.mo-app,
#modulos .modulo-btn {
  position: relative;
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 6px;
  padding: 3px 2px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--mo-ink);
  cursor: pointer;
  text-align: center;
  transition: background-color 120ms ease;
}

.mo-app:hover,
.mo-app:focus-visible,
#modulos .modulo-btn:hover,
#modulos .modulo-btn:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
}

.mo-app:active .mo-app__icon,
#modulos .modulo-btn:active .modulo-icon {
  transform: scale(0.94);
  transition-duration: 120ms;
}

.mo-app__icon,
#modulos .modulo-icon {
  position: relative;
  display: grid;
  width: 92px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 22%;
  background: #56657a;
  box-shadow: var(--mo-icon-shadow);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.mo-module-grid .mo-app__icon,
#modulos .modulo-icon {
  background: transparent;
}

.mo-app__icon > img,
#modulos .modulo-icon > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mo-app__icon > .mo-icon {
  width: 42%;
  height: 42%;
}

.mo-app__icon--phone { background: #257a5d; }
.mo-app__icon--message { background: #19a66f; }
.mo-app__icon--news { background: #bd3d36; }
.mo-app__icon--icarus { background: #5868cc; }
.mo-app__icon--fichajes { background: #c48722; }
.mo-app__icon--blackops { background: #262a31; }
.mo-app__icon--settings { background: #707884; }
.mo-app__icon--clock { background: #202832; }
.mo-app__icon--weather { background: #3194c3; }
.mo-app__icon--market { background: #247e73; }
.mo-app__icon--telegrano { background: #3378b8; }

.mo-app__label,
#modulos .modulo-nombre {
  width: 100%;
  max-width: 110px;
  overflow: hidden;
  color: var(--mo-ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-module-grid .mo-app__label,
#modulos .modulo-nombre {
  display: -webkit-box;
  min-height: 29px;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

#modulos .modulo-desc {
  display: none;
}

.mo-app__badge,
#movil-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  border: 2px solid var(--mo-screen);
  border-radius: var(--mo-pill-radius);
  background: var(--mo-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.mo-app__lock {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(15, 18, 24, 0.68);
  backdrop-filter: blur(8px);
}

.mo-app__lock .mo-icon {
  width: 13px;
  height: 13px;
  filter: brightness(0) invert(1);
}

.mo-device-column {
  min-width: 0;
}

.mo-device-column .mo-app__icon {
  width: 74px;
}

.mo-device-column .mo-app__label {
  font-size: 11px;
}

.mo-dock {
  display: flex;
  min-height: 84px;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 0 16px;
  padding: 8px 22px;
  border: 1px solid var(--mo-glass-border);
  border-radius: var(--mo-dock-radius);
  background: var(--mo-surface);
  box-shadow: var(--mo-card-shadow);
  backdrop-filter: blur(32px) saturate(155%);
}

.mo-dock .mo-app {
  padding: 0;
}

.mo-dock .mo-app__icon {
  width: 62px;
}

.mo-dock .mo-app__label {
  display: none;
}

.mo-scrim {
  position: absolute;
  z-index: 60;
  inset: 44px 0 0;
  visibility: hidden;
  background: var(--mo-scrim);
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.has-overlay .mo-scrim {
  visibility: visible;
  opacity: 1;
}

.mo-overlay,
#modulo-overlay,
#carta-overlay,
#evento-overlay,
#kodiario-overlay {
  position: absolute;
  z-index: 80;
  inset: 44px 0 0;
  display: grid;
  visibility: hidden;
  place-items: center;
  padding: 26px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 170ms ease, visibility 170ms ease;
}

.mo-overlay.visible,
#modulo-overlay.visible,
#carta-overlay.visible,
#evento-overlay.visible,
#kodiario-overlay.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Mensajes no forma parte de la lista de pausa de game.js. Mientras esta app
   está abierta usamos modulo-overlay como proxy invisible, sin tocar lógica. */
#modulo-overlay.mo-pause-proxy {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#modulo-overlay.mo-pause-proxy #modulo-modal {
  display: none !important;
}

.mo-panel,
#modulo-modal {
  display: grid;
  width: min(860px, calc(100% - 34px));
  max-height: 600px;
  overflow: hidden;
  border: 1px solid var(--mo-glass-border);
  border-radius: var(--mo-panel-radius);
  background: var(--mo-surface);
  box-shadow: var(--mo-panel-shadow);
  backdrop-filter: blur(40px) saturate(160%);
  transform: scale(0.96) translateY(8px);
  transition: transform 190ms var(--mo-ease);
}

.visible .mo-panel,
#modulo-overlay.visible #modulo-modal {
  transform: scale(1) translateY(0);
}

.mo-panel--module {
  grid-template-rows: 80px minmax(0, 1fr);
}

.mo-panel--messages {
  width: min(920px, calc(100% - 30px));
  height: min(580px, calc(100% - 34px));
  grid-template-rows: 80px minmax(0, 1fr);
}

.mo-panel--news {
  width: min(820px, calc(100% - 36px));
  height: min(600px, calc(100% - 34px));
  grid-template-rows: 74px minmax(0, 1fr);
}

.mo-panel__header,
#modulo-modal-header {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mo-hairline);
}

.mo-panel__identity,
#modulo-modal-titulo {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.mo-panel__appicon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 22%;
  background: #3aa48f;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
}

.mo-panel__appicon > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mo-panel__appicon .mo-icon {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.mo-panel__title {
  min-width: 0;
}

.mo-panel__title h2 {
  margin: 0;
  overflow: hidden;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-panel__title p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--mo-ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-panel__tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.mo-mini-stat {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: var(--mo-pill-radius);
  background: var(--mo-surface-soft);
  color: var(--mo-ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.mo-mini-stat .mo-icon {
  width: 15px;
  height: 15px;
}

.mo-close,
#modulo-modal-cerrar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mo-gray-soft);
  color: var(--mo-ink-soft);
  cursor: pointer;
  font-size: 0;
}

.mo-close:hover,
.mo-close:focus-visible,
#modulo-modal-cerrar:hover,
#modulo-modal-cerrar:focus-visible {
  outline: 2px solid rgba(53, 107, 215, 0.36);
  outline-offset: 2px;
}

.mo-close .mo-icon {
  width: 17px;
  height: 17px;
}

.mo-panel__body {
  min-height: 0;
  overflow: auto;
}

.mo-action-list,
#modulo-modal-acciones {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
  overflow: auto;
}

.mo-action-row,
.accion-card {
  display: grid;
  min-height: 54px;
  grid-template-columns: 10px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 11px;
  padding: 7px 12px;
  border: 1px solid var(--mo-hairline);
  border-radius: var(--mo-row-radius);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--mo-card-shadow);
  color: var(--mo-ink);
  cursor: pointer;
  text-align: left;
}

[data-theme="dark"] .mo-action-row,
[data-theme="dark"] .accion-card {
  background: rgba(35, 41, 52, 0.68);
}

.mo-action-row:hover,
.mo-action-row:focus-visible,
.accion-card:hover,
.accion-card:focus-visible {
  outline: none;
  border-color: rgba(19, 138, 98, 0.35);
  background: var(--mo-surface-solid);
}

.mo-action-row.is-locked,
.accion-card.bloqueada {
  cursor: not-allowed;
  opacity: 0.5;
}

.mo-action-row__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3eb7a1;
}

.mo-action-row__copy,
.accion-titulo-fila {
  min-width: 0;
}

.mo-action-row__copy strong,
.accion-nombre {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-action-row__copy span,
.accion-desc {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--mo-ink-soft);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-badges,
.accion-badges {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.mo-badge,
.accion-badge {
  padding: 4px 7px;
  border-radius: var(--mo-pill-radius);
  background: var(--mo-gray-soft);
  color: var(--mo-ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.mo-badge--good,
.b-positivo,
.b-escandalo-down { background: var(--mo-green-soft); color: #167448; }
.mo-badge--risk,
.b-escandalo-up { background: var(--mo-red-soft); color: #c53543; }
.mo-badge--loyalty,
.b-theone { background: var(--mo-amber-soft); color: #996206; }
.mo-badge--sewer,
.b-cloaca { background: var(--mo-orange-soft); color: #ad520d; }
.mo-badge--condition,
.b-condicion { background: var(--mo-gray-soft); color: var(--mo-ink-soft); font-style: italic; }
.b-covid { background: var(--mo-blue-soft); color: #2e5dbf; }

.mo-action-row__arrow {
  width: 14px;
  height: 14px;
  opacity: 0.42;
}

.mo-messages {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(250px, 34%) minmax(0, 1fr);
}

.mo-chat-list {
  overflow: auto;
  border-right: 1px solid var(--mo-hairline);
  background: rgba(248, 249, 251, 0.45);
}

.mo-search {
  display: flex;
  height: 56px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--mo-hairline);
}

.mo-search__field {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-radius: 11px;
  background: var(--mo-gray-soft);
  color: var(--mo-ink-faint);
  font-size: 12px;
}

.mo-search__field .mo-icon {
  width: 15px;
  height: 15px;
}

.mo-chat-item {
  display: grid;
  width: 100%;
  min-height: 70px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid var(--mo-hairline);
  background: transparent;
  color: var(--mo-ink);
  cursor: pointer;
  text-align: left;
}

.mo-chat-item.is-active {
  background: rgba(35, 159, 122, 0.14);
}

.mo-avatar {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: #9aa4b0;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.15);
}

.mo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mo-chat-item__copy {
  min-width: 0;
}

.mo-chat-item__copy strong,
.mo-chat-item__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-chat-item__copy strong {
  font-size: 13px;
}

.mo-chat-item__copy span {
  margin-top: 3px;
  color: var(--mo-ink-soft);
  font-size: 11px;
}

.mo-chat-item__meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--mo-ink-faint);
  font-size: 10px;
}

.mo-unread {
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: var(--mo-pill-radius);
  background: #1daf75;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.mo-conversation {
  display: grid;
  min-width: 0;
  grid-template-rows: 64px minmax(0, 1fr) 58px;
  background: rgba(238, 235, 231, 0.55);
}

[data-theme="dark"] .mo-conversation {
  background: rgba(16, 21, 29, 0.44);
}

.mo-conversation__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--mo-hairline);
  background: var(--mo-surface-soft);
}

.mo-conversation__head .mo-avatar {
  width: 40px;
  height: 40px;
}

.mo-conversation__head strong,
.mo-conversation__head span {
  display: block;
}

.mo-conversation__head strong {
  font-size: 14px;
}

.mo-conversation__head span {
  margin-top: 2px;
  color: var(--mo-green);
  font-size: 10px;
  font-weight: 600;
}

.mo-bubbles {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 18px;
}

.mo-bubble {
  width: fit-content;
  max-width: 76%;
  padding: 9px 12px 7px;
  border-radius: 13px 13px 13px 4px;
  background: var(--mo-surface-solid);
  box-shadow: var(--mo-card-shadow);
  font-size: 13px;
  line-height: 1.35;
}

.mo-bubble time {
  display: block;
  margin-top: 3px;
  color: var(--mo-ink-faint);
  font-size: 9px;
  text-align: right;
}

.mo-bubble.is-mine {
  justify-self: end;
  border-radius: 13px 13px 4px 13px;
  background: #d9f8c7;
  color: #18301f;
}

.mo-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 9px;
  padding: 9px 14px;
  border-top: 1px solid var(--mo-hairline);
  background: var(--mo-surface-soft);
}

.mo-composer input {
  min-width: 0;
  border: 1px solid var(--mo-hairline);
  border-radius: var(--mo-pill-radius);
  background: var(--mo-surface-solid);
  color: var(--mo-ink);
  padding: 0 14px;
}

.mo-composer button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #20b778;
  cursor: pointer;
}

.mo-composer button .mo-icon {
  width: 17px;
  filter: brightness(0) invert(1);
}

.mo-news {
  height: 100%;
  overflow: auto;
  padding: 0 26px 24px;
  background: #f7f6f3;
  color: #1a1a1a;
}

.mo-kodiario-head {
  padding: 12px 0 10px;
  border-bottom: 3px double #343434;
  text-align: center;
}

.mo-kodiario-head h2 {
  margin: 0;
  font-family: var(--mo-serif);
  font-size: 42px;
  line-height: 1;
}

.mo-kodiario-head p {
  margin: 5px 0 0;
  color: #777;
  font-family: var(--mo-serif);
  font-size: 12px;
  font-style: italic;
}

.mo-news__photo {
  position: relative;
  height: 220px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 12px;
  background: #292d34;
}

.mo-news__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.mo-exclusive {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 11px;
  border-radius: 6px;
  background: #d33d32;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.mo-news h3 {
  margin: 13px 0 6px;
  font-family: var(--mo-serif);
  font-size: 27px;
  line-height: 1.12;
  text-transform: uppercase;
}

.mo-news__subhead {
  margin: 0 0 14px;
  color: #666;
  font-family: var(--mo-serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1.4;
}

.mo-news__section-title {
  margin: 12px 0 4px;
  color: #777;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mo-news__line {
  padding: 8px 0;
  border-top: 1px solid #ddd;
  font-family: var(--mo-serif);
  font-size: 12px;
}

.mo-call-card {
  position: relative;
  width: min(430px, calc(100% - 30px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: #11151d;
  box-shadow: var(--mo-panel-shadow);
  color: #f4f6fa;
  transform-origin: center;
}

.visible .mo-call-card.is-ringing {
  animation: mo-ring 1.65s ease-in-out infinite;
}

@keyframes mo-ring {
  0%, 16%, 100% { transform: translateX(0) rotate(0); }
  3% { transform: translateX(-7px) rotate(-0.5deg); }
  6% { transform: translateX(7px) rotate(0.5deg); }
  9% { transform: translateX(-5px) rotate(-0.35deg); }
  12% { transform: translateX(5px) rotate(0.35deg); }
}

.mo-call-card__top {
  display: flex;
  min-height: 44px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: #171d27;
  color: #c8cfdb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mo-call-card__top span:last-child {
  padding: 4px 8px;
  border: 1px solid #9c6517;
  border-radius: var(--mo-pill-radius);
  color: #f0b04b;
}

.mo-call-card__portrait {
  height: 260px;
  overflow: hidden;
  background: #3b3f48;
}

.mo-call-card__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.mo-call-card__copy {
  padding: 13px 18px 17px;
  text-align: center;
}

.mo-call-card__copy h2 {
  margin: 0;
  font-size: 24px;
}

.mo-call-card__copy > span {
  display: block;
  margin-top: 3px;
  color: #9098a8;
  font-size: 11px;
}

.mo-call-card__copy > p {
  margin: 12px 0;
  color: #d7dbe3;
  font-size: 13px;
  line-height: 1.45;
}

.mo-swipe-hints {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #737d8f;
  font-size: 10px;
}

.mo-call-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mo-call-option {
  display: grid;
  min-height: 112px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid currentColor;
  border-radius: 17px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.mo-call-option--accept {
  background: rgba(19, 138, 98, 0.18);
  color: #56d39d;
}

.mo-call-option--decline {
  background: rgba(213, 72, 79, 0.18);
  color: #ff8e95;
}

.mo-call-option__phone {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
}

.mo-call-option__phone .mo-icon {
  width: 21px;
  height: 21px;
  filter: brightness(0) invert(1);
}

.mo-call-option small {
  color: #8992a1;
  font-size: 9px;
  font-weight: 500;
  text-transform: lowercase;
}

/* Puente con la carta que game.js genera dinámicamente. Conserva todos sus
   ganchos y transforma el contenido real en el arquetipo de llamada. */
#carta-modal.mo-call-card .cr-portrait {
  display: grid;
  background: #11151d;
  color: #f4f6fa;
}

#carta-modal.mo-call-card .cr-retrato {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #3b3f48;
}

#carta-modal.mo-call-card .cr-retrato img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

#carta-modal.mo-call-card .cr-min {
  padding: 13px 18px 17px;
}

#carta-modal.mo-call-card .cr-nameplate {
  margin-bottom: 10px;
  text-align: center;
}

#carta-modal.mo-call-card .cr-nm {
  display: block;
  margin: 0;
  color: #f4f6fa;
  font-size: 24px;
  font-weight: 700;
}

#carta-modal.mo-call-card .cr-av {
  color: #9098a8;
  font-size: 11px;
}

#carta-modal.mo-call-card .cr-dilema {
  margin: 10px 0 13px;
  color: #d7dbe3;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

#carta-modal.mo-call-card .cr-opciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#carta-modal.mo-call-card .cr-opt {
  display: grid;
  min-height: 104px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid currentColor;
  border-radius: 17px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

#carta-modal.mo-call-card .cr-oizq {
  background: rgba(19, 138, 98, 0.18);
  color: #56d39d;
}

#carta-modal.mo-call-card .cr-oder {
  background: rgba(213, 72, 79, 0.18);
  color: #ff8e95;
}

#carta-modal.mo-call-card .cr-dir,
#carta-modal.mo-call-card .cr-lbl {
  display: block;
}

#carta-modal.mo-call-card .cr-dir {
  color: #8992a1;
  font-size: 9px;
  font-weight: 500;
}

.mo-toast-stack {
  position: absolute;
  z-index: 120;
  top: 52px;
  left: 50%;
  display: grid;
  width: min(410px, calc(100% - 36px));
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.mo-toast {
  display: grid;
  min-height: 62px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--mo-glass-border);
  border-radius: 18px;
  background: rgba(250, 250, 252, 0.84);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  color: #171a20;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(30px) saturate(155%);
  animation: mo-toast-in 260ms var(--mo-ease) both;
}

.mo-toast__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #1da971;
}

.mo-toast__icon .mo-icon {
  filter: brightness(0) invert(1);
}

.mo-toast strong,
.mo-toast span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-toast strong {
  font-size: 12px;
}

.mo-toast span {
  margin-top: 3px;
  color: #5f6672;
  font-size: 11px;
}

.mo-toast time {
  color: #858c97;
  font-size: 9px;
}

@keyframes mo-toast-in {
  from { opacity: 0; transform: translateY(-18px) scale(0.97); }
  70% { transform: translateY(2px) scale(1); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mo-fake-bounce .mo-app__icon {
  animation: mo-bounce 420ms var(--mo-ease);
}

@keyframes mo-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-10px); }
  72% { transform: translateY(2px); }
}

.mo-contract-stubs,
.mo-hidden {
  display: none !important;
}

.ministeros-integrated #header,
.ministeros-integrated #panel-right,
.ministeros-integrated #footer {
  display: none;
}

.ministeros-integrated #game {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

.ministeros-integrated #main,
.ministeros-integrated #panel-left {
  display: contents;
}

.ministeros-integrated #estado-juego,
.ministeros-integrated #fin-turno-wrap,
.ministeros-integrated #reloj-mes-aviso {
  font-family: var(--mo-font);
}

@media (max-height: 820px) {
  #ministeros-shell {
    width: min(92vw, calc((100vh - 84px) * 4 / 3));
  }

  .mo-home {
    gap: 7px;
    padding: 13px 18px 12px;
  }

  .mo-homehead {
    min-height: 38px;
  }

  .mo-homehead h1 {
    font-size: 22px;
  }

  .mo-resource-widget,
  #recursos {
    min-height: 72px;
  }

  .mo-resource,
  #recursos .recurso-card {
    padding: 9px 10px;
  }

  .mo-app__icon,
  #modulos .modulo-icon {
    width: 76px;
  }

  .mo-device-column .mo-app__icon {
    width: 62px;
  }

  .mo-module-grid,
  #modulos {
    gap: 8px 14px;
  }

  .mo-app-grid {
    gap: 8px 12px;
  }

  .mo-dock {
    min-height: 68px;
  }

  .mo-dock .mo-app__icon {
    width: 50px;
  }

  .mo-news__photo {
    height: 178px;
  }

  .mo-call-card__portrait {
    height: 220px;
  }
}

@media (max-width: 900px) {
  body.ministeros-demo {
    overflow: auto;
  }

  #ministeros-stage {
    min-width: 760px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .visible .mo-call-card.is-ringing,
  .mo-fake-bounce .mo-app__icon {
    animation: none !important;
  }
}
