:root {
  --ink: #05275a;
  --paper: #fbf8ea;
  --white: #fffdf2;
  --violet: #174fc4;
  --violet-dark: #031f4d;
  --violet-soft: #dce6ff;
  --coral: #ff773d;
  --yellow: #ffd438;
  --green: #4f9e6b;
  --muted: #77717f;
  --line: #d8d0c7;
  --shadow: 8px 8px 0 var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  display: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button, a, input, textarea { min-height: 44px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.screen {
  display: none;
  min-height: 100vh;
}

.screen.active { display: flex; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--violet);
  font: 500 12px/1.4 "Inter", monospace;
  letter-spacing: .12em;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; }
h1 { font-size: clamp(45px, 6vw, 88px); line-height: .98; letter-spacing: -.06em; }
h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.06; letter-spacing: -.04em; }
h3 { font-size: 26px; letter-spacing: -.03em; }
.lede { max-width: 650px; color: #57515d; font-size: clamp(17px, 2vw, 21px); line-height: 1.6; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: 54px;
  border: 2px solid var(--ink);
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.button.primary { color: var(--ink); background: var(--yellow); }
.button.secondary { background: var(--yellow); }
.button.full { width: 100%; }
.button span { font-size: 22px; }

.text-button, .icon-button {
  border: 0;
  background: none;
  cursor: pointer;
  font-weight: 600;
}

.landing {
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 9vw, 140px);
  overflow: hidden;
  padding: 7vw;
  color: white;
  background-color: #031f4d;
  background-image: none;
}

.landing-copy { max-width: 720px; position: relative; z-index: 2; }
.landing h1 span { position: relative; color: var(--yellow); }
.landing .eyebrow { color: var(--yellow); }
.landing .lede { color: #e3eaf7; }
.landing .button { margin-top: 24px; }
.microcopy { margin: 16px 0 0; color: #b7c8ea; font: 12px "Inter", monospace; }

.landing-card { position: relative; width: min(420px, 35vw); min-width: 320px; transform: rotate(2deg); }
.pixel-window { border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.window-bar { display: flex; gap: 7px; border-bottom: 3px solid var(--ink); padding: 9px; }
.window-bar i { width: 10px; height: 10px; background: var(--coral); border: 2px solid var(--ink); }
.mini-office { position: relative; height: 310px; background: url("assets/fondo-oficina.jpg") 49% center/cover; overflow: hidden; animation: miniOfficeDrift 15s ease-in-out infinite alternate; }
@keyframes miniOfficeDrift {
  from { background-position: 49% 50%; }
  to { background-position: 51% 49.5%; }
}
.mini-desk { position: absolute; width: 220px; height: 70px; left: 86px; top: 130px; transform: skewY(-20deg); border: 3px solid var(--ink); background: #d99c5b; box-shadow: 0 45px 0 -30px var(--ink); }
.mini-avatar { position: absolute; left: 170px; top: 190px; width: 38px; height: 54px; background: var(--violet); border: 3px solid var(--ink); }
.mini-avatar:before { content: ""; position: absolute; width: 26px; height: 26px; left: 3px; top: -25px; background: #a66d50; border: 3px solid var(--ink); }
.speech-pixel { position: absolute; right: 25px; top: 35px; padding: 12px; border: 3px solid var(--ink); background: white; font: 12px/1.5 "Inter", monospace; box-shadow: 4px 4px 0 var(--ink); }
.bubble-label { display:block; margin-bottom:4px; color:var(--violet); font:500 9px "Inter",monospace; letter-spacing:.12em; }
.context-label { margin: 0 0 8px; }
.level-stamp { position: absolute; right: -24px; bottom: -35px; width: 96px; padding: 12px; color: white; background: var(--coral); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font: 12px "Inter", monospace; transform: rotate(-5deg); }
.level-stamp b { display: block; font-size: 36px; }

.setup { align-items: center; justify-content: center; padding: 16px; background: linear-gradient(rgba(3,31,77,.38),rgba(3,31,77,.62)),url("assets/fondo-seleccion-personaje.jpg") center/cover; }
.setup-card { width: min(550px, 100%); border: 2px solid var(--ink); border-radius: 18px; background: rgba(255,251,239,.96); padding: clamp(14px, 2vw, 22px); box-shadow: var(--shadow); }
.setup-card h2 { margin: 0 0 9px; }
.back { margin: -2px 0 7px; color: var(--muted); }
.field-label, legend { display: block; margin: 12px 0 7px; font-size: 13px; font-weight: 600; }
.text-input, textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 15px;
  color: var(--ink);
  background: white;
  outline: none;
}
.text-input:focus, textarea:focus { box-shadow: 4px 4px 0 var(--violet); }
fieldset { border: 0; padding: 0; margin: 0; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, minmax(54px, 64px)); justify-content: center; gap: 7px; }
.avatar-option { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border: 3px solid transparent; border-radius: 14px; padding: 0; background: white; cursor: pointer; }
.avatar-option img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.avatar-option:hover { transform: translateY(-2px); border-color: var(--violet); }
.avatar-option:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.avatar-option.selected { border-color: var(--ink); background: var(--violet-soft); box-shadow: 4px 4px 0 var(--ink); }

.form-error { min-height: 20px; margin: 9px 0; color: #b5302c; font-size: 13px; font-weight: 600; }

.game { position: relative; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden; background: #dcd6cf; }
.game-header { display: flex; align-items: center; gap: 30px; min-height: 72px; padding: 10px 26px; border-bottom: 3px solid var(--ink); background: var(--white); z-index: 4; }
.player-identity { display: flex; align-items: center; gap: 10px; min-width: 148px; color: white; }
.player-identity img { width: 42px; height: 42px; flex: 0 0 42px; object-fit: cover; border: 2px solid var(--yellow); border-radius: 11px; background: white; image-rendering: pixelated; }
.player-identity strong { max-width: 128px; overflow: hidden; font: 600 14px/1.2 "Inter", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.status-strip { display: flex; align-items: center; justify-content: center; flex: 1; gap: clamp(25px, 6vw, 90px); }
.status-strip div { display: flex; flex-direction: column; }
.status-strip span { color: var(--muted); font: 10px "Inter", monospace; }
.status-strip strong { font: 500 14px "Inter", monospace; }
.status-strip .lives { color: var(--coral); letter-spacing: 4px; }
.music-button { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; color: var(--yellow); background: transparent; cursor: pointer; transition: opacity .18s ease, transform .18s ease; }
.music-button svg { width: 38px; height: 38px; overflow: visible; }
.music-button .megaphone-body { fill: currentColor; }
.music-button .megaphone-wave, .music-button .mute-slash { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.music-button .mute-slash { display: none; stroke-width: 3.5; }
.music-button.muted .megaphone-wave { display: none; }
.music-button.muted .mute-slash { display: block; }
.music-button:hover { transform: scale(1.1); }
.music-button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 8px; }
.music-button.muted { opacity: .62; }
.sound-controls { display: flex; align-items: center; gap: 7px; }
.volume-control { display: flex; align-items: center; gap: 7px; color: white; font: 600 11px/1 "Inter", sans-serif; }
.volume-control input { width: 86px; accent-color: var(--yellow); cursor: pointer; }
.volume-control input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.volume-control output { width: 34px; color: var(--yellow); white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.career-track { display: flex; min-height: 48px; background: var(--ink); color: #77717f; overflow-x: auto; z-index: 3; }
.career-node { display: flex; align-items: center; gap: 7px; min-width: max-content; padding: 0 16px; font: 11px "Inter", monospace; }
.career-node:before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; }
.career-node.done { color: var(--violet-soft); }
.career-node.done:before { background: var(--violet-soft); }
.career-node.current { color: white; background: var(--violet); }
.career-node.current:before { background: var(--yellow); border-color: var(--yellow); }

.office-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #eee7dd; }
.office-stage > img { width: 100%; height: 100%; object-fit: cover; object-position: center; image-rendering: pixelated; }
.office-welcome { position: absolute; inset: 0; display: grid; place-items: center; padding: 32px; color: white; background: #031f4d; visibility: hidden; opacity: 0; z-index: 6; }
.office-welcome.active { visibility: visible; opacity: 1; }
.office-welcome.leaving { animation: welcomeExit .7s cubic-bezier(.55,0,.85,.4) forwards; }
.office-welcome h1 { max-width: 1050px; margin: 0; font: 600 clamp(38px, 6.5vw, 92px)/1.05 "Inter", sans-serif; letter-spacing: -.055em; text-align: center; }
.office-welcome h1 span { display: inline-block; opacity: 0; transform: translateY(28px); animation: welcomeWord .48s cubic-bezier(.2,.8,.2,1) forwards; }
.office-welcome h1 span:nth-child(2) { animation-delay: .12s; }
.office-welcome h1 span:nth-child(3) { animation-delay: .24s; }
.office-welcome h1 span:nth-child(4) { color: var(--yellow); animation-delay: .36s; }
.office-welcome h1 span:nth-child(5) { animation-delay: .48s; }
.office-welcome h1 span:nth-child(6) { color: var(--yellow); animation-delay: .60s; }
@keyframes welcomeWord { to { opacity: 1; transform: translateY(0); } }
@keyframes welcomeExit { to { opacity: 0; transform: scale(1.035); visibility: hidden; } }
.office-instructions { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; visibility: hidden; opacity: 0; background: rgba(3,31,77,.82); backdrop-filter: blur(5px); z-index: 6; transition: opacity .28s ease; }
.office-instructions.active { visibility: visible; opacity: 1; }
.instructions-card { width: min(650px, 100%); padding: clamp(24px, 4vw, 42px); color: var(--ink); background: var(--white); border: 3px solid var(--yellow); border-radius: 20px; box-shadow: 10px 10px 0 #001333; animation: instructionsIn .38s cubic-bezier(.2,.8,.2,1) both; }
.instructions-card h2 { margin-bottom: 18px; font-size: clamp(28px, 4vw, 42px); }
.instructions-card p:not(.eyebrow) { margin-bottom: 13px; color: #454e5d; line-height: 1.55; }
.instructions-card .button { margin-top: 8px; }
@keyframes instructionsIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.visitor-sprite { position: absolute; left: 39%; top: 49%; width: 48px; height: 68px; border: 0; background: none; cursor: pointer; animation: bob 1.3s steps(2) infinite; }
.visitor-sprite.awaiting { visibility: hidden; opacity: 0; pointer-events: none; }
.visitor-head { position: absolute; left: 12px; top: 3px; width: 24px; height: 24px; background: #754c3d; border: 3px solid var(--ink); }
.visitor-body { position: absolute; left: 7px; top: 25px; width: 34px; height: 38px; background: var(--yellow); border: 3px solid var(--ink); }
.visitor-sprite em { position: absolute; right: -8px; top: -15px; display: grid; place-items: center; width: 25px; height: 30px; color: white; background: var(--coral); border: 3px solid var(--ink); font: 600 17px "Inter", monospace; font-style: normal; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.mission-card { position: absolute; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 18px; width: min(580px, calc(100% - 48px)); padding: 14px 16px; border: 3px solid var(--ink); border-radius: 16px; background: var(--white); box-shadow: var(--shadow); z-index: 4; }
.mission-cluster { position: absolute; right: 24px; bottom: 24px; width: min(580px, calc(100% - 48px)); z-index: 4; }
.mission-cluster .mission-card { position: relative; right: auto; bottom: auto; width: 100%; }
.mission-cluster .visitor-sprite { left: 18px !important; top: auto !important; bottom: calc(100% + 12px); }
.mission-card.awaiting { visibility: hidden; opacity: 0; transform: translateY(24px); pointer-events: none; }
.mission-card.arriving { animation: missionArrival .5s cubic-bezier(.18,.9,.25,1.2) both; }
@keyframes missionArrival { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.mission-card > div { flex: 1; }
.mission-card .eyebrow { margin-bottom: 6px; }
.mission-card h2 { margin: 0 0 3px; font-size: 19px; }
.mission-card p:last-child { margin-bottom: 0; color: var(--muted); font-size: 13px; }

.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 20; padding: 20px; background: rgba(23,21,29,.72); backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.dialog { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 3px solid var(--ink); border-radius: 18px; background: var(--white); box-shadow: 10px 10px 0 var(--ink); padding: clamp(24px, 4vw, 44px); }
.dialog-topline { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 28px; font: 11px "Inter", monospace; }
.scenario-number { color: var(--muted); }
.competency-chip { padding: 5px 8px; color: var(--violet-dark); background: var(--violet-soft); }
.character-line { display: grid; grid-template-columns: 65px 1fr; gap: 18px; align-items: start; padding-bottom: 24px; border-bottom: 2px solid var(--line); }
.character-line p { margin: 7px 0 0; font-size: 18px; line-height: 1.5; }
.npc-portrait { position: relative; width: 54px; height: 58px; margin-top: 6px; border: 3px solid var(--ink); background: var(--yellow); }
.npc-portrait:before { content: ""; position: absolute; width: 28px; height: 28px; left: 10px; top: 7px; background: #8d5b45; border: 3px solid var(--ink); }
.npc-portrait i { position: absolute; width: 31px; height: 9px; left: 9px; top: 4px; background: var(--ink); z-index: 2; }
.prompt { margin: 24px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.5; }
.approach-fieldset legend { margin-top: 18px; }
.approach-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.approach { min-height: 70px; padding: 10px; border: 2px solid var(--line); background: white; cursor: pointer; font-size: 12px; line-height: 1.35; }
.approach.selected { border-color: var(--violet); background: var(--violet-soft); }
textarea { resize: vertical; min-height: 145px; line-height: 1.5; }
.answer-tools { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font: 11px "Inter", monospace; }
.answer-tools .text-button { padding: 0; color: var(--violet); font-size: 11px; }
.answer-tools .text-button.listening { color: var(--coral); animation: pulse .8s infinite; }
.voice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 13px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: 600 12px/1 "Inter", sans-serif;
  cursor: pointer;
  transition: color .18s, background .18s, transform .18s, box-shadow .18s;
}
.voice-button svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }
.voice-button:hover { transform: translateY(-1px); box-shadow: 2px 2px 0 var(--ink); }
.voice-button.listening { color: var(--ink); background: var(--yellow); animation: voicePulse 1.1s ease-in-out infinite; }
.voice-button.has-recording:not(.listening) { background: #fff4b7; }
.voice-button-dark { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.voice-button-dark:hover { box-shadow: 2px 2px 0 #fff; }
.negotiation-tools { align-items: center; margin: 8px 0 12px; color: #b8c8e2; }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes voicePulse { 50% { box-shadow: 0 0 0 7px rgba(255,212,56,.18); transform: translateY(-1px); } }
.button.busy { gap: 11px; cursor: wait; }
.button-spinner { width: 19px; height: 19px; flex: 0 0 19px; border: 3px solid rgba(3,31,77,.28); border-top-color: var(--violet-dark); border-radius: 50%; animation: buttonSpin .72s linear infinite; }
.button .busy-label { min-width: 0; overflow: hidden; font-size: inherit; text-overflow: ellipsis; white-space: nowrap; }
@keyframes buttonSpin { to { transform: rotate(360deg); } }
.feedback-state { text-align: center; padding-top: 12px; }
.feedback-mark { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 22px; border: 3px solid var(--ink); color: white; background: var(--green); box-shadow: 5px 5px 0 var(--ink); font-size: 36px; }
.feedback-state.failed .feedback-mark { background: var(--coral); }
.feedback-state:not(.failed) .feedback-mark { color: #245c42; background: #dcecdf; border-color: #6e9b80; border-radius: 8px; box-shadow: 4px 4px 0 #426e55; }
.feedback-checklist { width: 43px; height: 43px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.feedback-state.celebrate { animation: rewardReveal .42s cubic-bezier(.2,.8,.2,1) both; }
.feedback-state.celebrate .feedback-mark { animation: rewardPop .62s cubic-bezier(.18,.9,.3,1.35) both; }
.feedback-state p:not(.eyebrow) { color: #57515d; line-height: 1.6; }
.signal-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 24px 0; }
.signal { padding: 6px 9px; background: #ece7df; font: 10px "Inter", monospace; }
.signal.found { color: #1f6338; background: #dceedd; }
.signal.missing { color: #8d2c2c; background: #f4dcd6; }

.path-dialog { text-align: center; }
.path-dialog > p:not(.eyebrow) { color: var(--muted); }
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.path-option { min-height: 180px; border: 3px solid var(--ink); background: white; cursor: pointer; padding: 24px; }
.path-option:hover { background: var(--violet-soft); box-shadow: 6px 6px 0 var(--ink); transform: translate(-2px,-2px); }
.path-icon { display: block; margin-bottom: 15px; color: var(--violet); font-size: 35px; }
.path-option strong, .path-option small { display: block; }
.path-option small { margin-top: 8px; color: var(--muted); }

.gate { align-items: center; justify-content: center; padding: 6vw; }
.gate-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 8vw, 120px); width: min(1150px, 100%); align-items: center; }
.gate h1 { font-size: clamp(44px, 5vw, 72px); }
.score-teaser { width: 220px; border: 2px solid var(--ink); background: white; padding: 18px; box-shadow: 5px 5px 0 var(--ink); }
.score-teaser span, .score-teaser small { display: block; color: var(--muted); font: 10px "Inter", monospace; }
.blur-score { margin: 8px 0; filter: blur(7px); font: 500 30px "Inter", monospace; user-select: none; }
.visible-score { margin: 8px 0 2px; font: 500 30px "Inter", monospace; }
.visible-compensation { margin-bottom: 8px; color: var(--violet); font: 500 13px "Inter", monospace; }
.email-card { border: 3px solid var(--ink); background: var(--white); padding: 32px; box-shadow: var(--shadow); }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 5px; color: #57515d; font-size: 12px; line-height: 1.5; }
.consent input { margin-top: 3px; accent-color: var(--violet); }
.privacy-note { display: block; margin-top: 14px; color: var(--muted); line-height: 1.5; }

.results { justify-content: center; padding: 6vw; }
.results-wrap { width: min(1180px, 100%); }
.results-header { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; padding-bottom: 35px; }
.results-header h1 { margin-bottom: 10px; font-size: clamp(40px, 5vw, 66px); }
.results-header p { max-width: 720px; color: var(--muted); }
.result-score { flex: 0 0 155px; border: 3px solid var(--ink); padding: 18px; background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); }
.result-score span { display: block; font: 10px "Inter", monospace; }
.result-score strong { font: 500 43px "Inter", monospace; }
.result-score small { font: 12px "Inter", monospace; }
.results-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; }
.panel { border: 2px solid var(--ink); background: var(--white); padding: 28px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--line); padding-bottom: 15px; }
.panel-title h2 { margin: 0; font-size: 25px; }
.panel-title span { color: var(--muted); font: 10px "Inter", monospace; }
.competency-row { display: grid; grid-template-columns: 190px 1fr 30px; gap: 15px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.competency-row:last-child { border-bottom: 0; }
.competency-name { font-size: 13px; font-weight: 600; }
.bar { height: 12px; border: 2px solid var(--ink); background: #eee9e2; }
.bar i { display: block; height: 100%; background: var(--violet); }
.competency-row strong { font: 13px "Inter", monospace; }
.next-step-panel { background: var(--violet-dark); color: white; }
.next-step-panel .eyebrow { color: var(--yellow); }
.next-step-panel > p:not(.eyebrow) { color: #d8d2ef; line-height: 1.6; }
.next-action { margin: 28px 0; border: 1px solid #7569b3; padding: 16px; }
.next-action span { color: var(--yellow); font: 10px "Inter", monospace; }
.next-action p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; }
.restart { display: block; margin: 28px auto 0; }

.game-over { align-items: center; justify-content: center; padding: 20px; background: var(--ink); }
.game-over-card { width: min(620px, 100%); text-align: center; color: white; }
.game-over-card h1 { font-size: clamp(45px, 7vw, 76px); }
.game-over-card > p:not(.eyebrow) { color: #c9c3ce; font-size: 18px; line-height: 1.7; }
.broken-heart { color: var(--coral); font-size: 70px; transform: rotate(-8deg); }

.promotion-dialog { width: min(1080px, 100%); max-height: min(620px, calc(100dvh - 24px)); display: grid; grid-template-columns: 1.05fr .95fr; padding: 0; overflow: hidden; border-color: var(--yellow); }
.modal.open .promotion-dialog { animation: promotionReveal .5s cubic-bezier(.18,.8,.2,1) both; }
.promotion-mail { padding: clamp(28px, 5vw, 58px); background: var(--white); }
.mail-bar { display: flex; justify-content: space-between; gap: 20px; margin: -20px -20px 42px; padding: 12px 16px; color: #9fb1d0; background: var(--violet-dark); font: 10px "Inter", monospace; }
.promotion-mail h2 { max-width: 620px; }
.promotion-mail > p:last-child { color: var(--muted); line-height: 1.65; }
.promotion-stamp { display: inline-block; margin: 4px 0 24px; padding: 10px 14px; color: var(--ink); background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font: 600 15px "Inter", monospace; transform: rotate(-1.5deg); }
.modal.open .promotion-stamp { animation: stampArrival .65s .18s cubic-bezier(.18,.9,.3,1.35) both; }
.negotiation-panel { padding: clamp(28px, 5vw, 50px); color: white; background: var(--violet-dark); }
.negotiation-panel .eyebrow { color: var(--yellow); }
.negotiation-panel > p:not(.eyebrow) { color: #d9e3f4; line-height: 1.6; }
.negotiation-panel > p strong { color: var(--yellow); }
.negotiation-panel .field-label { color: white; }
.negotiation-panel textarea { min-height: 160px; }
.final-offer { display: flex; flex-direction: column; justify-content: flex-start; gap: 0; padding: clamp(24px, 3.2vw, 36px); }
.final-offer[hidden] { display: none; }
.offer-number { display: block; color: var(--yellow); font: 600 clamp(42px, 6vw, 72px)/1 "Inter", sans-serif; letter-spacing: -.06em; }
.final-offer.celebrate .offer-number { animation: salaryCount .55s cubic-bezier(.18,.9,.3,1.25) both; }
.final-offer > span { margin: 8px 0 16px; color: white; font: 500 15px "Inter", monospace; }
.final-offer #offerFeedback { margin: 0 0 16px; color: #d9e3f4; line-height: 1.45; }
.leave-offer { margin-top: 10px; color: white; background: transparent; border-color: #9fb1d0; box-shadow: none; }
.leave-offer:hover { color: var(--ink); background: white; border-color: white; }
@keyframes rewardReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rewardPop { 0% { opacity: 0; transform: scale(.55) rotate(-8deg); } 70% { transform: scale(1.08) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes promotionReveal { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes stampArrival { from { opacity: 0; transform: scale(1.35) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(-1.5deg); } }
@keyframes salaryCount { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }

.celebration { position: relative; align-items: center; justify-content: center; overflow: hidden; padding: 5vw; color: white; text-align: center; background: radial-gradient(circle at 50% 35%, #174fc4 0, var(--violet-dark) 56%, #001333 100%); }
.celebration-card { position: relative; z-index: 2; width: min(1000px, 100%); }
.celebration .eyebrow { color: var(--yellow); }
.celebration h1 { margin-bottom: 34px; }
.recognition-badge { display: inline-flex; flex-direction: column; gap: 8px; margin-bottom: 38px; padding: 20px 30px; color: var(--ink); background: var(--yellow); border: 4px solid white; box-shadow: 10px 10px 0 #001333; transform: rotate(-1deg); }
.recognition-badge span { font: 10px "Inter", monospace; }
.recognition-badge strong { font-size: clamp(20px, 3vw, 34px); }
.career-totals { display: grid; grid-template-columns: repeat(3,1fr); margin: 0 auto 38px; border: 2px solid #5579ba; background: rgba(0,19,51,.6); }
.career-totals div { padding: 22px 16px; border-right: 1px solid #5579ba; }
.career-totals div:last-child { border: 0; }
.career-totals span,.career-totals strong { display: block; }
.career-totals span { margin-bottom: 8px; color: #9fb7df; font: 10px "Inter", monospace; }
.career-totals strong { color: var(--yellow); font-size: clamp(16px,2vw,24px); }
.confetti,.confetti:before,.confetti:after { position: absolute; inset: 0; content:""; pointer-events:none; background-image:radial-gradient(circle at 10% 20%,var(--yellow) 0 4px,transparent 5px),radial-gradient(circle at 80% 15%,var(--coral) 0 4px,transparent 5px),radial-gradient(circle at 24% 76%,#fff 0 3px,transparent 4px),radial-gradient(circle at 72% 68%,var(--yellow) 0 4px,transparent 5px); animation:confettiFloat 7s ease-in-out infinite alternate; }
.confetti:before { transform: translate(8%,12%) rotate(30deg); animation-delay:-2s; }
.confetti:after { transform: translate(-7%,-8%) rotate(-20deg); animation-delay:-4s; }
@keyframes confettiFloat { from { transform:translateY(-12px);opacity:.45 } to { transform:translateY(16px);opacity:.9 } }

@media (max-width: 850px) {
  .landing { flex-direction: column; text-align: center; }
  .landing .lede { margin-left: auto; margin-right: auto; }
  .landing-card { display: none; }
  .status-strip { gap: 18px; }
  .status-strip div:nth-child(3) { display: none; }
  .office-stage > img { object-position: 45% center; }
  .gate-layout, .results-grid { grid-template-columns: 1fr; }
  .promotion-dialog { grid-template-columns: 1fr; max-height: calc(100dvh - 24px); overflow: hidden; }
  .promotion-mail { padding: 22px; }
  .promotion-mail .mail-bar { margin: -10px -10px 22px; }
  .promotion-mail h2 { font-size: 30px; }
  .final-offer { padding: 22px; }
  .final-offer .offer-number { font-size: clamp(42px, 10vw, 58px); }
  .results-header { align-items: flex-start; }
}

@media (max-width: 600px) {
  .game { min-height: 0; height: 100dvh; }
  .game-header { padding: 10px 14px; gap: 14px; }
  .player-identity { min-width: 54px; }
  .player-identity strong { display: none; }
  .status-strip { justify-content: flex-end; }
  .mission-card { right: 12px; bottom: 12px; width: calc(100% - 24px); gap: 12px; }
  .mission-cluster { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .mission-cluster .mission-card { right: auto; bottom: auto; width: 100%; }
  .mission-card .button { min-height: 45px; padding: 0 12px; }
  .approach-options, .avatar-grid, .path-grid { grid-template-columns: 1fr; }
  .avatar-grid { grid-template-columns: repeat(4, minmax(48px, 58px)); justify-content: center; gap: 6px; }
  .dialog { padding: 22px 18px; }
  .character-line { grid-template-columns: 48px 1fr; }
  .npc-portrait { transform: scale(.8); transform-origin: left top; }
  .results-header { display: block; }
  .result-score { margin-top: 20px; }
  .competency-row { grid-template-columns: 125px 1fr 25px; gap: 8px; }
  .career-totals { grid-template-columns: 1fr; }
  .career-totals div { border-right: 0; border-bottom: 1px solid #5579ba; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
  .office-welcome h1 span { opacity: 1; transform: none; }
}

/* Pixeless art direction */

.game-header {
  color: white;
  background: var(--violet-dark);
  border-color: var(--yellow);
}

.status-strip span { color: #8fa8d4; }
.status-strip strong { color: white; }
.status-strip .lives { color: var(--yellow); }
.career-track { background: #061a3c; }
.career-node.current { color: var(--ink); background: var(--yellow); }
.career-node.current:before { background: var(--violet); border-color: var(--violet); }

.office-stage { background: var(--violet-dark); }
.office-stage > img {
  width: 102%;
  height: 102%;
  margin: -1%;
  animation: officePan 16s ease-in-out infinite alternate;
  transform-origin: center;
}

.game.camera-zoom .office-stage > img {
  animation-play-state: paused;
  transform: scale(1.18) translate3d(-3%, -2%, 0);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}

@keyframes officePan {
  0% { transform: scale(1.01) translate3d(-.35%, -.2%, 0); }
  100% { transform: scale(1.055) translate3d(.45%, .3%, 0); }
}

.sun-glow {
  position: absolute;
  inset: -30%;
  pointer-events: none;
  opacity: .16;
  background: linear-gradient(110deg, transparent 35%, #fff7b0 48%, transparent 61%);
  mix-blend-mode: screen;
  animation: sunPass 13s ease-in-out infinite alternate;
}

@keyframes sunPass {
  from { transform: translateX(-10%); opacity: .08; }
  to { transform: translateX(12%); opacity: .22; }
}

.pixel-dust { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pixel-dust i { position: absolute; width: 4px; height: 4px; background: var(--yellow); box-shadow: 7px 0 var(--yellow), 0 7px rgba(255,212,56,.55); opacity: .45; animation: dustFloat 7s steps(6) infinite; }
.pixel-dust i:nth-child(1) { left: 18%; top: 61%; animation-delay: -2s; }
.pixel-dust i:nth-child(2) { left: 43%; top: 29%; animation-delay: -5s; }
.pixel-dust i:nth-child(3) { left: 71%; top: 52%; animation-delay: -1s; }
.pixel-dust i:nth-child(4) { left: 87%; top: 21%; animation-delay: -4s; }
@keyframes dustFloat { 0% { transform: translateY(12px); opacity: 0; } 30%,70% { opacity: .45; } 100% { transform: translateY(-16px); opacity: 0; } }

.mission-card {
  color: white;
  background: var(--violet-dark);
  border-color: var(--yellow);
  box-shadow: 8px 8px 0 rgba(3,31,77,.7);
}
.mission-card .eyebrow { color: var(--yellow); }
.mission-card p:last-child { color: #b8c9e5; }

.modal { background: rgba(1,18,45,.9); }
.situation-dialog {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
  width: min(1240px, 100%);
  height: min(620px, calc(100vh - 24px));
  height: min(620px, calc(100dvh - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border-color: var(--yellow);
  background: var(--white);
  box-shadow: 12px 12px 0 #001333;
  animation: dialogueIn .45s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes dialogueIn {
  from { opacity: 0; transform: scale(.93) translateY(18px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.conversation-scene {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--violet-dark);
  border-right: 3px solid var(--yellow);
}

.conversation-scene > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--scene-x, 52%) var(--scene-y, 50%);
  image-rendering: pixelated;
  animation: closeupBreathe 8s ease-in-out infinite alternate;
  will-change: object-position;
}

@keyframes closeupBreathe {
  from { transform: scale(1.04) translate(-.5%, 0); }
  to { transform: scale(1.085) translate(.5%, -.5%); }
}

.scene-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 64% 33%, rgba(255,224,108,.25), transparent 29%);
  animation: lampPulse 3.8s ease-in-out infinite alternate;
}
@keyframes lampPulse { to { opacity: .55; } }

.cutscene-player {
  position: absolute;
  left: 27%;
  bottom: 15%;
  width: 42px;
  height: 62px;
  z-index: 3;
  border: 4px solid #031634;
  background: var(--violet);
  filter: drop-shadow(7px 8px 0 rgba(1,13,31,.45));
  animation: seatedIdle 1.7s steps(2) infinite;
}
.cutscene-player:before { content: ""; position: absolute; left: 1px; top: -34px; width: 32px; height: 32px; border: 4px solid #031634; background: #a9684d; }
.cutscene-player i { position: absolute; left: -3px; top: -40px; width: 39px; height: 13px; z-index: 2; border: 4px solid #031634; border-bottom: 0; background: #031634; }
.cutscene-player.avatar-fem { background: #f05b3f; }
.cutscene-player.avatar-fem i { height: 23px; border-bottom: 4px solid #031634; }
.cutscene-player.avatar-neutral { background: #19a88a; }
@keyframes seatedIdle { 50% { transform: translateY(-3px); } }

.cutscene-visitor {
  position: absolute;
  right: 13%;
  bottom: 22%;
  width: 54px;
  height: 83px;
  z-index: 3;
  filter: drop-shadow(7px 8px 0 rgba(1,13,31,.4));
  animation: visitorTalk 1.25s steps(2) infinite;
}
.cutscene-visitor .visitor-head { left: 10px; top: 0; width: 34px; height: 34px; border-width: 4px; }
.cutscene-visitor .visitor-body { left: 3px; top: 34px; width: 48px; height: 49px; border-width: 4px; background: var(--yellow); }
@keyframes visitorTalk { 50% { transform: translateY(-3px) rotate(.7deg); } }

.speech-bubble {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 5;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  color: var(--ink);
  background: var(--white);
  border: 4px solid #031634;
  box-shadow: 7px 7px 0 #031634;
}
.speech-bubble:before { content: ""; position: absolute; right: 16%; top: -17px; width: 24px; height: 24px; background: var(--white); border-left: 4px solid #031634; border-top: 4px solid #031634; transform: rotate(45deg); }
.speech-bubble strong { font: 600 12px "Inter", monospace; }
.speech-bubble p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; }
.bubble-face { position: relative; width: 48px; height: 48px; border: 3px solid var(--ink); background: var(--yellow); }
.bubble-face:before { content: ""; position: absolute; left: 9px; top: 9px; width: 23px; height: 24px; border: 3px solid var(--ink); background: #8d5b45; }
.bubble-face i { position: absolute; left: 9px; top: 6px; width: 29px; height: 10px; z-index: 2; background: var(--ink); }

/* Retratos oficiales de los personajes */
.visitor-sprite {
  width: 66px;
  height: 66px;
  padding: 0;
  overflow: visible;
  border: 3px solid var(--yellow);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
}
.visitor-sprite img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  image-rendering: pixelated;
}
.visitor-sprite em { right: -13px; top: -17px; border-radius: 10px; }
.visitor-head, .visitor-body { display: none; }
.cutscene-visitor {
  right: 7%;
  bottom: 8%;
  width: clamp(92px, 10vw, 126px);
  height: clamp(92px, 10vw, 126px);
  overflow: hidden;
  border: 4px solid var(--yellow);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 8px 8px 0 #031634;
}
.cutscene-visitor img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 17px;
  image-rendering: pixelated;
}
.bubble-face {
  overflow: hidden;
  border-radius: 13px;
  background: var(--white);
}
.bubble-face:before, .bubble-face i { display: none; }
.bubble-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.dialog-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(16px, 2vw, 24px);
  background:
    radial-gradient(circle at 1px 1px, rgba(23,79,196,.15) 1px, transparent 1.5px) calc(100% - 28px) 28px/12px 12px no-repeat,
    var(--white);
}
.dialog-topline { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #d8d9dc; }
.competency-chip { color: var(--violet-dark); background: var(--yellow); }
.prompt { font-size: clamp(19px, 2vw, 25px); line-height: 1.35; letter-spacing: -.025em; }
.prompt:after { content: ""; display: block; width: 72px; height: 6px; margin-top: 12px; background: var(--yellow); transform: rotate(-2deg); }
.text-input, textarea { border-color: var(--ink); background: #fffef7; }
textarea:focus, .text-input:focus { outline: 3px solid var(--yellow); outline-offset: 0; box-shadow: none; }
.answer-tools .text-button { color: var(--violet); }
.feedback-mark { color: var(--ink); background: var(--yellow); }
.feedback-state.failed .feedback-mark { color: white; background: var(--coral); }

.setup-card, .email-card, .panel { border-color: var(--ink); box-shadow: 8px 8px 0 var(--violet); }
.avatar-option.selected { background: #fff4b7; box-shadow: 4px 4px 0 var(--violet); }
.path-dialog { border-color: var(--yellow); }
.path-option:hover { background: #fff4b7; }
.gate { background: linear-gradient(118deg, var(--paper) 0 64%, var(--yellow) 64%); }
.result-score { background: var(--yellow); }
.next-step-panel { background: var(--violet-dark); }

/* Tipografía, accesibilidad y superficies */
.landing { background-color: #031f4d !important; background-image: none !important; }
.button { border-radius: 999px; padding-inline: 28px; }
.setup-card, .email-card, .panel, .mission-card, .score-teaser, .result-score,
.promotion-mail, .negotiation-panel, .career-totals { border-radius: 16px; }
.promotion-dialog, .situation-dialog { border-radius: 20px; }
.competency-chip, .promotion-stamp, .recognition-badge { border-radius: 10px; }
.status-strip span, .dialog-topline, .answer-tools { font-size: 12px; }
.lede, .prompt, .scene-context p, .speech-bubble p { font-weight: 400; }
.player-identity strong, .field-label, legend, .speech-bubble strong, .offer-number { font-weight: 600; }
.status-strip span { color: #b8c8e2; }
.competency-chip { line-height: 1.35; text-align: right; }

/* Ilustración y contexto a la izquierda; pregunta y respuesta a la derecha */
.situation-dialog { grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr); }
.conversation-scene { order: 1; border-right: 3px solid var(--yellow); border-left: 0; }
.dialog-content { order: 2; }
.dialog-content { display: flex; flex-direction: column; justify-content: flex-start; min-height: 0; }
.dialog-topline { flex: 0 0 auto; }
.speech-bubble {
  position: relative;
  inset: auto;
  margin: 0 0 14px;
  padding: 12px 15px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: none;
  background: #f4f7ff;
}
.speech-bubble:before { display: none; }
.speech-bubble p { font-size: 16px; line-height: 1.55; }
.speech-bubble strong { font-size: 13px; }
#answerState {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
}
#answerState[hidden], #feedbackState[hidden] { display: none !important; }
#feedbackState:not([hidden]) {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}
#feedbackState:not([hidden]) #continueButton { margin-top: 18px; }
#answerState .field-label { margin: 8px 0 6px; }
#answerState textarea {
  height: clamp(92px, 15dvh, 125px);
  min-height: 96px;
  resize: none;
}
#answerState .answer-tools { margin-top: 4px; }
#answerState .form-error { margin: 4px 0; }
#answerState .button { flex: 0 0 50px; min-height: 50px; }
.response-actions { display: grid; grid-template-columns: 1fr; grid-auto-rows: 52px; gap: 9px; width: 100%; max-width: 100%; }
.response-actions .button { width: 100%; padding-inline: 18px; }
.response-actions .button { min-height: 52px; font-size: 16px; }
.office-return-button { color: var(--ink); background: #fffdf2; line-height: 1.25; white-space: nowrap; }
.office-return-button:hover { background: #eef3ff; }
.scene-context {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 136px;
  bottom: auto;
  z-index: 5;
  max-height: calc(100% - 158px);
  overflow: visible;
  padding: 18px 20px;
  color: white;
  background: rgba(3,31,77,.94);
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,12,35,.35);
}
.context-visitor { position: absolute; left: 22px; top: 22px; z-index: 5; width: 96px; height: 96px; overflow: hidden; border: 3px solid var(--yellow); border-radius: 16px; background: white; box-shadow: 5px 5px 0 #001333; animation: contextVisitorTalk 1.65s steps(2) infinite; }
.context-visitor img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
@keyframes contextVisitorTalk { 50% { transform: translateY(-2px) rotate(.6deg); } }
.scene-context span { display: block; margin-bottom: 8px; color: var(--yellow); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.scene-context p { margin: 0; font-size: 15px; line-height: 1.6; }
.field-label { font-size: 14px; }
textarea { font-size: 16px; }

.setup-card > fieldset { margin-top: 14px; }
.setup-card fieldset legend { margin: 0 0 7px; }
.difficulty-fieldset { margin-top: 14px !important; }
.difficulty-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.difficulty-option { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 4px 7px; color: var(--ink); background: #f4f7ff; border: 2px solid #b8c8e2; border-radius: 9px; cursor: pointer; }
.difficulty-option:has(input:checked) { border-color: var(--violet); background: #e8edff; box-shadow: 3px 3px 0 var(--violet); }
.difficulty-option input { accent-color: var(--violet); }
.difficulty-option span { display: block; }
.difficulty-option strong { font: 600 16px/1.1 "Inter", sans-serif; }
.setup-card #enterOfficeButton { margin-top: 0; }

.message-modal { align-items: center; justify-content: center; padding: 20px; }
.message-dialog { width: min(620px, 100%); padding: clamp(26px, 5vw, 52px); color: var(--ink); background: var(--white); border: 3px solid var(--violet); box-shadow: 8px 8px 0 var(--ink); }
.message-dialog h2 { margin: 8px 0 18px; }
.message-dialog > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.compact-totals { margin: 24px 0; }
.compact-totals div { padding: 16px 10px; }
.compact-totals strong { font-size: 16px; }
.confirm-actions { display: flex; gap: 10px; margin-top: 24px; }
.confirm-actions .button { flex: 1; }
.city-modal { background: linear-gradient(rgba(3,31,77,.76), rgba(3,31,77,.76)), url("assets/fondo-seleccion-personaje.jpg") center/cover; }
.city-modal .message-dialog { background: #fffdf2; }
.farewell-dialog { text-align: center; }

@media (max-width: 780px) {
  .modal { align-items: flex-start; overflow-y: auto; }
  .situation-dialog { grid-template-columns: 1fr; width: 100%; height: auto; max-height: none; overflow: visible; }
  .dialog-content { order: 1; min-height: 0; overflow: visible; }
  .conversation-scene { order: 2; min-height: 38vh; border-left: 0; border-right: 0; border-top: 3px solid var(--yellow); border-bottom: 0; }
  .speech-bubble { inset: auto; }
  .cutscene-player { left: 22%; bottom: 21%; transform: scale(.78); }
  .cutscene-visitor { right: 11%; bottom: 29%; transform: scale(.78); }
}

@media (min-width: 781px) and (max-height: 720px) {
  .situation-dialog { height: min(620px, calc(100dvh - 16px)); max-height: calc(100dvh - 16px); }
  .dialog-content { padding: 16px 20px; }
  .dialog-topline { margin-bottom: 10px; padding-bottom: 8px; }
  .speech-bubble { margin-bottom: 8px; padding: 9px 12px; }
  .speech-bubble p { font-size: 14px; line-height: 1.4; }
  #answerState textarea { height: clamp(88px, 15dvh, 120px); min-height: 88px; }
  #answerState .field-label { margin-top: 5px; }
  #answerState .button { min-height: 46px; flex-basis: 46px; }
}

@media (max-width: 600px) {
  .landing { background-color: #031f4d; background-image: none; }
  .conversation-scene { min-height: 34vh; }
  .speech-bubble { inset: auto; grid-template-columns: 40px 1fr; padding: 11px; }
  .bubble-face { width: 38px; height: 38px; transform: scale(.9); transform-origin: left center; }
  .speech-bubble p { font-size: 12px; }
  .cutscene-player, .cutscene-visitor { display: none; }
  .response-actions { grid-template-columns: 1fr; width: 100%; }
  .office-return-button { white-space: normal; }
  .instructions-card { padding: 22px; }
  .volume-control { gap: 3px; }
  .volume-control input { width: 58px; }
  .volume-control output { display: none; }
}
