/* HEXplore It · Aventura interactiva — interfaz inspirada en RPG de fantasía.
   El arte que acompaña a los controles pertenece al material real del Volumen I.
   Solo se modifican capas de presentación: se conservan las mecánicas y la guía. */
:root {
  --ink: #0c1114;
  --panel: #182122;
  --edge: #586252;
  --line: #3e4a41;
  --text: #f3eee3;
  --muted: #c1c9c0;
  --gold: #d9b678;
  --gold-light: #f4dba2;
  --mint: #a9cebe;
  --blue: #bbd9e8;
  --lilac: #ccb9e6;
  --rose: #e9a7a1;
  --glass: rgba(14,25,24,.93);
  --rule: rgba(222,191,125,.42);
}
html {background:#0a1113}
body {
  position:relative;
  background:
    radial-gradient(ellipse at 54% -12%,#34463a 0,transparent 42vw),
    radial-gradient(ellipse at 100% 100%,#322b35 0,transparent 46vw),
    linear-gradient(135deg,#0b1216,#152019 57%,#090f13);
  isolation:isolate;
}
body::before {
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:url("https://www.hexploreit.com/wp-content/uploads/2020/12/Modular-Map-Graphic-VotDK-@025x_small.png")
    52% 46%/cover no-repeat;
  opacity:.075;filter:grayscale(.65) saturate(.35) contrast(1.2);
}
body::after {
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,#080e11a0,transparent 24%,transparent 75%,#080e11aa);
}
.topbar {
  z-index:5;position:relative;
  background:linear-gradient(180deg,#202b2beb,#101b1de7);
  border-bottom:1px solid #95774d;
  box-shadow:0 2px 0 #070d0b,0 9px 30px #0008;
  backdrop-filter:blur(14px);
}
.topbar::after {
  content:"";position:absolute;left:0;right:0;bottom:-2px;height:1px;
  background:linear-gradient(90deg,transparent,#d9bd7c99 18%,#d9bd7c33 82%,transparent);
  pointer-events:none;
}
.topbar-inner {min-height:57px}
.brand {gap:10px}
.brand > span:first-child {
  display:grid;place-items:center;width:36px;height:36px;
  color:#efcf8f;border:1px solid #9c8050;border-radius:9px;
  background:radial-gradient(circle at 50% 30%,#58664e,#1b2b25);
  box-shadow:0 0 0 3px #e7ca6b0c,inset 0 1px #f9e4a24a,0 2px 9px #060b09;
  font-size:21px;filter:none;
}
.brand-title {font:26px/1 var(--serif);color:#f8e7c6;text-shadow:0 2px 4px #0009}
.brand-caption {
  color:#bbc6ae;border-left-color:#816e4e;letter-spacing:.11em;font-size:10px;
}
.topbar-actions {gap:7px}
.topbar-actions .utility-button,.tutorial-language select {
  min-height:35px;height:35px;
  border:1px solid #61705e;border-radius:7px;
  background:linear-gradient(180deg,#26352d,#15241f);
  color:#f3ebdb;box-shadow:inset 0 1px #ffffff14,0 2px 6px #0004;
}
.topbar-actions .utility-button:hover,.tutorial-language select:hover {border-color:#d3b479;background:#2f3c31}
.tutorial-language select {width:116px;padding:3px 5px;font-size:12px}
.main {
  grid-template-rows:auto auto auto minmax(0,1fr);
  gap:clamp(7px,1.2vh,11px);
  padding-top:clamp(8px,1.6vh,16px);
  padding-bottom:max(clamp(8px,1.3vh,15px),env(safe-area-inset-bottom));
}
.intro {align-items:center;position:relative;gap:12px}
.intro h1 {font-size:clamp(29px,3.6vw,48px);line-height:1.01;letter-spacing:-.04em;color:#fcf3e0;text-shadow:0 2px 8px #000}
.intro h1 em {color:#e5c591;font-weight:400}
.title-rune {display:inline-block;margin-right:2px;font-size:.6em;color:#c8a86f;vertical-align:9%;text-shadow:0 0 22px #f3bc5a77}
.intro-campaign {margin:3px 0 0 24px;color:#c4d0bf;font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700}
.intro-eyebrow {margin:0 0 3px 25px;letter-spacing:.2em;color:#d3bb89}
.intro-eyebrow::before {width:14px}
.segment-progress {
  min-width:116px;margin-bottom:0;
  padding:7px 9px;border:1px solid #8b744f;border-radius:7px;
  background:linear-gradient(135deg,#292e28,#172424);
  box-shadow:inset 0 1px #e8c88525;
  color:#f0dfc2;
}
.segment-bars {gap:3px}
.segment-bars i {height:3px;background:#4a5547}
.segment-bars .filled {background:linear-gradient(90deg,#d7af62,#f3d69c);box-shadow:0 0 5px #d1a85c88}

/* El HUD utiliza los valores reales del personaje y progreso de la guía. */
.adventure-hud {
  display:grid;grid-template-columns:minmax(175px,1.15fr) minmax(130px,.92fr) minmax(305px,1.9fr);
  gap:clamp(7px,1vw,13px);align-items:center;
  min-height:66px;padding:8px 11px;
  border:1px solid #786747;border-radius:11px;
  box-shadow:0 7px 20px #0005,inset 0 1px 0 #e2d5a12d,inset 0 -1px #09130e;
  background:linear-gradient(115deg,#24332fe8,#1e2a26f5 42%,#172024ec);
  position:relative;overflow:hidden;
}
.adventure-hud::before {
  content:"";position:absolute;top:0;left:18px;right:18px;height:1px;
  background:linear-gradient(90deg,transparent,#e3c37caa 50%,transparent);
}
.adventure-hud::after {
  content:"";position:absolute;right:-40px;top:-75px;width:190px;height:190px;
  border-radius:50%;border:1px solid #d9bf7630;box-shadow:0 0 0 15px #d9bf7609,0 0 0 34px #d9bf7607;
  pointer-events:none;
}
.hud-chapter {display:flex;align-items:center;gap:10px;min-width:0}
.hud-chapter-emblem {
  flex:none;display:grid;place-items:center;width:42px;height:44px;
  color:#f2cf88;
  background:linear-gradient(155deg,#4f533c,#1d2e2b);
  border:1px solid #b79b63;border-radius:5px 14px 5px 14px;
  transform:rotate(-3deg);
  box-shadow:0 0 15px #e6b95b25,inset 0 1px #e3d1a080;
}
.hud-chapter-emblem svg {width:23px;height:23px;transform:rotate(3deg)}
.hud-chapter-copy {display:grid;gap:4px;min-width:0}
.hud-chapter-copy span,.hud-journey-label span {
  color:#cbbd9e;font-size:9px;font-weight:800;letter-spacing:.13em;line-height:1.1;
}
.hud-chapter-copy strong {color:#f8ead0;font:18px/1.11 var(--serif);min-width:0}
.hud-journey {display:grid;gap:9px;min-width:0;align-self:center}
.hud-journey-label {display:flex;align-items:center;justify-content:space-between;gap:6px}
.hud-journey-label strong {color:#f6dab0;font-size:11px;font-variant-numeric:tabular-nums}
.hud-journey-bar {height:8px;border-radius:20px;border:1px solid #60684b;background:#0d1915;overflow:hidden;padding:1px;box-shadow:inset 0 2px 4px #0007}
.hud-journey-bar span {
  display:block;height:100%;width:0;border-radius:20px;
  background:linear-gradient(90deg,#8a946e,#b6b67b,#e6c77e);
  box-shadow:0 0 13px #e2b5689c;
  transition:width .45s cubic-bezier(.2,.8,.2,1);
}
.hud-resources {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-width:0}
.hud-resource {
  min-width:0;display:flex;align-items:center;gap:6px;
  min-height:44px;padding:5px 7px 5px 5px;
  border:1px solid #435c50;border-radius:7px;
  background:linear-gradient(180deg,#131f1dfa,#24332cf0);
  box-shadow:inset 0 1px #b9c7a81c;
}
.hud-resource-symbol {
  flex:none;display:grid;place-items:center;width:26px;height:27px;
  border-radius:5px;background:#364138;color:#ded6a4;
}
.hud-resource-symbol svg {width:17px;height:17px}
.hud-resource.health .hud-resource-symbol {background:#44302e;color:#f3a49a}
.hud-resource.energy .hud-resource-symbol {background:#30354a;color:#b7c7f5}
.hud-resource.food .hud-resource-symbol {background:#344337;color:#bdd699}
.hud-resource.gold .hud-resource-symbol {background:#4b4127;color:#f0c779}
.hud-resource-content {display:grid;gap:2px;min-width:0;flex:1;line-height:1.05}
.hud-resource-content small {color:#bbc6b8;font-size:8px;font-weight:800;letter-spacing:.075em;white-space:nowrap}
.hud-resource-content strong {color:#fff3dd;font-size:14px;font-variant-numeric:tabular-nums}
.hud-resource-bar {height:3px;border-radius:8px;background:#0e1815;overflow:hidden;width:100%}
.hud-resource-bar b {display:block;height:100%;width:100%;border-radius:8px;transition:width .4s ease}
.health .hud-resource-bar b {background:linear-gradient(90deg,#9f554b,#e99a83)}
.energy .hud-resource-bar b {background:linear-gradient(90deg,#5f8bb5,#b2c9eb)}
.adventure-hud.hud-danger {border-color:#ad7565}
.hud-danger .hud-chapter-emblem {background:linear-gradient(155deg,#673b36,#291d21);color:#f3b4a3;border-color:#bc8374}
.hud-danger .hud-journey-bar span {background:linear-gradient(90deg,#b38563,#ecab79)}
.game-completed .adventure-hud {border-color:#b8a275}
.game-completed .hud-chapter-emblem {box-shadow:0 0 30px #b9c67655,inset 0 1px #e3d1a080}

/* Recorrido: nodos como objetivos desbloqueados de un RPG. */
.phase-panel {
  border:1px solid #52634f;
  border-radius:9px;
  background:linear-gradient(180deg,#202b25ee,#151f1ce9);
  box-shadow:inset 0 1px #d0ba7c20,0 4px 15px #0004;
}
.phase {min-height:42px;position:relative;border-right:1px solid #3d4a41;color:#bdc8ba;text-transform:uppercase;letter-spacing:.055em;font-size:11px}
.phase-icon {background:#26332e;border:1px solid #586a59;transform:rotate(-8deg);border-radius:6px 9px 6px 9px;box-shadow:inset 0 1px #ffffff16}
.phase-icon svg {transform:rotate(8deg)}
.phase.active {
  color:#ffe3aa;background:linear-gradient(180deg,#4a412eaa,#2e392e88);
  box-shadow:inset 0 -3px #cfaa6c,inset 0 1px #e6cb8033;
}
.phase.active .phase-icon {
  color:#f9db9e;background:linear-gradient(#645439,#44351f);
  border-color:#d0b77e;box-shadow:0 0 15px #e1b96855;
}
.phase.done .phase-icon {background:#2e5146;border-color:#6a987e;color:#c3e4cb}
.phase:not(.done):not(.active) {opacity:.82}

/* Caja de misión + visor: marcos tallados, no tarjetas de aplicación genéricas. */
.workspace {gap:8px 12px;grid-template-columns:minmax(0,1.47fr) minmax(345px,1fr)}
.work-tabs {gap:5px}
.tab {
  position:relative;overflow:hidden;min-height:38px;
  border:1px solid #506151;border-bottom-color:#3b4536;
  border-radius:9px 9px 4px 4px;
  background:linear-gradient(180deg,#2a3933,#18241f);
  box-shadow:inset 0 1px #c7d4ba16;
  color:#d5e0d2;
  letter-spacing:.045em;text-transform:uppercase;font-size:11px;
  transition:border-color .18s,background .18s,transform .18s;
}
.tab svg {color:#b6c9b4}
.tab[aria-pressed="true"] {
  border-color:#af915d;color:#fce3b3;
  background:linear-gradient(180deg,#4c4631,#302e25);
  box-shadow:inset 0 2px #e9ca8899,0 0 14px #c39b5523;
}
.tab[aria-pressed="true"]::after {content:"";position:absolute;left:14%;right:14%;bottom:0;height:2px;background:linear-gradient(90deg,transparent,#f2d390,transparent)}
.tab[aria-pressed="true"] svg {color:#f3d291}
.tab:hover {transform:translateY(-1px)}
.panel {
  border:1px solid #6c7359;border-radius:10px;
  background:linear-gradient(165deg,#1b2a27,#141e20);
  box-shadow:0 14px 40px #0008,inset 0 1px #ebd4a628,0 0 0 1px #060e10a8;
}
.guide-panel {
  position:relative;
  background:
    radial-gradient(ellipse at 100% 0%,#584b3655,transparent 45%),
    linear-gradient(160deg,#26352d 0%,#1b2924 35%,#142125 95%);
}
.guide-panel::before {
  inset:0 15% auto;height:2px;
  background:linear-gradient(90deg,transparent,#f1d099b0,transparent);
}
.guide-panel::after {
  content:"";position:absolute;bottom:4px;left:4px;right:4px;height:9px;pointer-events:none;
  border-bottom:1px solid #b7955340;border-radius:0 0 12px 12px;
}
.guide-header {
  min-height:41px;padding:1px 0 8px;
  border-bottom:1px solid #a48a5e61;gap:9px;
}
.guide-portrait {
  border-radius:6px 12px 6px 12px;border:1px solid #bca270;
  background:linear-gradient(#58604a,#26352a);box-shadow:0 0 0 3px #d9ae6515;
}
.guide-header strong {color:#f7deb1;letter-spacing:.05em;text-transform:uppercase;font-size:11px}
.guide-header div span {font-size:11px;color:#d5d9cc}
.scene-label {color:#f5dcae;background:#3c443478;border:1px solid #94754d4a;border-radius:12px;padding:3px 8px;font-size:10px}
.scene-label::before {width:6px;height:6px;box-shadow:0 0 6px #e7ba6488}
.guide-objective {
  display:flex;align-items:center;gap:9px;
  flex:none;margin:10px 0 0;
  color:#e2c488;letter-spacing:.19em;font-weight:800;font-size:9px;
}
.guide-objective-diamond {
  width:8px;height:8px;display:inline-block;flex:none;
  border:1px solid #ead59b;background:#927d50;transform:rotate(45deg);
  box-shadow:0 0 8px #e1bd6b44;
}
.guide-objective-rule {flex:1;height:1px;background:linear-gradient(90deg,#c4a6725c,transparent)}
.guide-panel h2 {
  margin:8px 0 12px;color:#fff0d8;
  font:clamp(27px,2.3vw,36px)/1.08 var(--serif);
  letter-spacing:-.025em;text-shadow:0 2px 8px #000b;
}
.guide-panel.quest-enter h2 {animation:quest-title .32s ease both}
@keyframes quest-title {from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.page-stack {gap:9px}
.body-copy {color:#f0ede4;font-size:15px;line-height:1.5}
.info-card,.check-card {
  padding:10px 11px;gap:10px;
  background:linear-gradient(120deg,#29382fdd,#192925e8);
  border:1px solid #5d745f;border-left:3px solid #b99b62;
  border-radius:5px 9px 9px 5px;
  box-shadow:inset 0 1px #e5ddad13,0 3px 10px #0002;
}
.info-card strong,.check-card strong {color:#f6e0bd}
.info-card p,.check-card p {color:#d8e2d4}
.info-icon {border:1px solid #8b9d83;border-radius:7px;background:linear-gradient(#465a49,#283c30);color:#f1d6aa}
.formula {
  background:linear-gradient(110deg,#1b2e31,#253c3d);
  border:1px solid #778e87;border-left:3px solid #b1c1a0;
  border-radius:6px;padding:10px 12px;
}
.formula strong {color:#e4f2d6}
.option,.quiz-option {
  position:relative;border:1px solid #72846e;border-radius:8px;
  background:linear-gradient(#283c30,#192d26);
  color:#f0ecdf;transition:background .16s,border-color .16s,box-shadow .16s;
}
.option[aria-pressed="true"] {border-color:#e0bd79;background:linear-gradient(#564936,#292e24);box-shadow:inset 0 1px #f9e5b35e,0 0 13px #d1a15b25}
.option:hover,.quiz-option:hover {border-color:#c9b27f;background:#40523e}
.guide-controls {border-top:1px solid #9c8d6d77;gap:7px;padding-top:10px}
.guide-controls .icon-button {
  background:linear-gradient(180deg,#35433b,#1b2b26);
  border:1px solid #75896d;box-shadow:inset 0 1px #ffffff17;
  border-radius:8px;min-width:40px;
}
.guide-controls .primary-button,.primary-button {
  position:relative;
  border:1px solid #f2d49b;border-radius:8px;
  color:#241b13;background:linear-gradient(180deg,#f9dea4,#d9ad69 55%,#c8944d);
  box-shadow:inset 0 1px #fff7dfaa,inset 0 -2px #96642e6d,0 3px 12px #0007;
  text-shadow:0 1px #ffe1a07c;
  letter-spacing:.015em;
  transition:filter .18s,transform .18s,box-shadow .18s;
}
.guide-controls .primary-button:hover:not(:disabled),.primary-button:hover:not(:disabled) {filter:brightness(1.09);transform:translateY(-1px);box-shadow:inset 0 1px #fff7dfaa,0 6px 15px #0009}
.guide-controls .primary-button:active:not(:disabled),.primary-button:active:not(:disabled) {transform:translateY(1px)}
.lesson-see-material {display:none;align-items:center;justify-content:center;gap:5px;border:1px solid #82927b;background:linear-gradient(#31463a,#1a3027)}
.lesson-see-material svg {height:15px;width:15px;color:#d4d5af}
.page-count {color:#e3d5bb;font-size:11px}

/* El material del juego ocupa el escenario, con fondo de tablero tenue. */
.companion {position:relative}
.pane-header {
  position:relative;z-index:1;min-height:56px;padding:8px 12px;
  border-bottom:1px solid #8c7b5d;
  background:linear-gradient(90deg,#25372f,#1c2b27 75%,#1b2425);
}
.pane-icon {
  width:36px;height:36px;
  border:1px solid #b5975e;border-radius:8px;
  background:linear-gradient(#51523e,#27352e);
  color:#f4d498;
}
.pane-heading h2 {font:17px/1.08 var(--serif);color:#f6e5c7}
.pane-heading p {font-size:10px;color:#becbb8;letter-spacing:.04em}
.pane-header-actions {gap:5px;align-items:center;flex-wrap:wrap}
.pane-header-actions .text-button {
  color:#e9d8b8;border:1px solid #826c4b;
  background:linear-gradient(#383d32,#212d28);
  box-shadow:inset 0 1px #ffffff1d;
  font-size:11px;min-height:30px;
}
.table-content {
  padding:8px;
  background:radial-gradient(ellipse at 50% 35%,#3244364d,#101b18 80%);
}
.component-stage {
  position:relative;isolation:isolate;overflow:hidden;
  padding:11px;gap:8px;
  border:1px solid #8d7852;border-radius:9px;
  background:
    radial-gradient(ellipse at 36% 44%,#384940,#152321 69%),
    linear-gradient(#1f302c,#101c1b);
  box-shadow:inset 0 0 0 1px #171f17,inset 0 1px #e0c68c2f,0 4px 15px #0005;
}
.component-stage::before {
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:
    url("https://www.hexploreit.com/wp-content/uploads/2020/12/Modular-Map-Graphic-VotDK-@025x_small.png")
    center/cover no-repeat;
  opacity:.095;filter:grayscale(.4) saturate(.55);
}
.component-stage::after {
  content:"";position:absolute;right:-34px;bottom:-65px;width:190px;height:190px;
  border:2px solid #d4bd8e11;border-radius:50%;box-shadow:0 0 0 15px #c2ae7910,0 0 0 37px #d5b97f07;
  z-index:-1;pointer-events:none;
}
.component-stage-head {
  flex:none;padding:1px 3px 7px;
  border-bottom:1px solid #8c91655d;
}
.component-stage-head span {
  color:#f1d39b;letter-spacing:.13em;font-size:10px;
}
.component-stage-head small {color:#c9d5c6;font-size:10px}
.component-stage-body {grid-template-columns:minmax(0,1fr) clamp(114px,27%,188px);gap:11px}
.component-stage-feature {
  border:1px solid #829072;border-radius:11px 11px 7px 7px;
  background:radial-gradient(ellipse at 50% 40%,#40564a,#17251e 72%);
  box-shadow:inset 0 0 60px #02090491,0 10px 20px #0007;
  overflow:hidden;
}
.component-stage-hero {
  position:relative;
  background:
    radial-gradient(ellipse at 50% 50%,#ffffff14,transparent 58%),
    radial-gradient(ellipse at 50% 80%,#d8bf9052,transparent 54%);
  border:0;min-height:0;padding:14px;
}
.component-stage-hero > .game-component-crop {
  filter:drop-shadow(0 14px 12px #000b);
  transform:rotate(-1deg) scale(.96);transition:transform .25s,filter .25s;
  animation:reveal-component .38s ease both;
}
.component-stage-hero:hover > .game-component-crop,.component-stage-hero:focus-visible > .game-component-crop {
  transform:rotate(0) scale(1.015);filter:drop-shadow(0 18px 15px #000d);
}
@keyframes reveal-component {
  from{opacity:.4;translate:0 8px;filter:blur(2px) drop-shadow(0 8px 12px #000a)}
  to{opacity:1;translate:0 0;filter:blur(0) drop-shadow(0 14px 12px #000b)}
}
.component-stage-magnify {
  width:29px;height:29px;right:9px;top:9px;
  border-color:#c8ad7b;border-radius:7px;
  background:#14221be0;box-shadow:0 2px 7px #0009;
  color:#f9e6c2;
}
.component-stage-hero-label {
  border-top:1px solid #ad956c;
  background:linear-gradient(90deg,#263428,#1d2b25);
  padding:9px 12px;
}
.component-stage-hero-label strong {font:16px/1.14 var(--serif);color:#f9e6c5}
.component-stage-hero-label span {font-size:10px;color:#c5d3c3}
.component-stage-tray {gap:7px;padding:3px 3px 3px 0}
.component-stage-piece {
  position:relative;min-height:76px;grid-template-columns:42% 1fr;gap:7px;
  padding:6px;border:1px solid #596e5d;border-radius:8px;
  background:linear-gradient(130deg,#2f4036,#1b2d28);
  box-shadow:inset 0 1px #ffffff19,0 3px 8px #0004;
  transition:background .18s,border-color .18s,transform .18s,box-shadow .18s;
}
.component-stage-piece::before {
  content:"";position:absolute;left:0;top:18%;bottom:18%;width:2px;
  background:transparent;border-radius:3px;
}
.component-stage-piece .game-component-crop {max-height:69px;filter:drop-shadow(0 2px 4px #0009)}
.component-stage-piece > span:last-child {font-size:11px;color:#d9e1cf}
.component-stage-piece.is-selected {
  background:linear-gradient(135deg,#4b5138,#283b31);
  border-color:#edc77f;transform:translateX(-2px);
  box-shadow:0 0 0 1px #edc77f25,0 0 16px #eac77836,inset 0 1px #ead5a13e;
}
.component-stage-piece.is-selected::before {background:#eac77d;box-shadow:0 0 9px #f2d18a}
.component-stage-piece:hover {border-color:#d4b782}
.component-stage-bottom {
  padding:7px 1px 0;border-top:1px solid #8a956753;gap:6px;
}
.component-stage-bottom p {color:#d8dfd0;font-size:10px;line-height:1.25}
.component-stage-bottom a {
  flex:none;color:#f4d496;font-size:10px;
  border-bottom:1px solid #f4d4965c;text-decoration:none;
}
.component-sheet-gallery button {
  background:radial-gradient(ellipse at center,#3b4c40,#1a2823);
  border-color:#8f8c65;box-shadow:inset 0 1px #ffffff1b;
}
.component-sheet-gallery small {color:#f2e0c0}
.component-sheet-disclaimer {color:#c8d6c6}
.map-board {background:radial-gradient(ellipse at center,#304538,#121e1d)}
.real-map-splash {border:0;background:radial-gradient(ellipse at center,#384b3b,#1a2c24);padding:10px}
.real-map-main-photo {
  background:linear-gradient(#22352b,#111f1b);
  border:1px solid #a5976f;box-shadow:0 7px 20px #0009;
}
.real-map-main-photo img {filter:drop-shadow(0 5px 9px #0006)}
.real-map-practice-button {
  background:linear-gradient(#37493d,#1e3228);border-color:#aa996e;color:#f3e0c1;
}
.map-surface {border-color:#8b9d77;background:#1d2c25}
.map-token {background:#162b24;border-color:#9cbb96;box-shadow:0 4px 12px #0009}
.map-token-label {background:#13221ef2;border-color:#94a986}
.real-image-dialog {border:1px solid #bca477;box-shadow:0 24px 85px #000f}
.real-image-toolbar {background:linear-gradient(#354538,#18251f);border-bottom:1px solid #a38a5a}
.real-image-viewport {background:radial-gradient(ellipse,#23382e,#0a100e)}
.real-image-source {background:#18251f}

/* Cuaderno de aventura. */
.journal-entry {border-left:2px solid #bc985e;background:linear-gradient(115deg,#29372e,#182723)}
.journal-entry strong {color:#ecdfc6}
.stat {background:linear-gradient(145deg,#27392f,#192822);border-color:#5d735e}
.stat-name {color:#e6d9bc}
.stat strong {color:#fff5e2}
.sheet-pane .hero-banner {background:linear-gradient(115deg,#314338,#172a26)!important}
.hero-banner h2 {color:#fff0d5;text-shadow:0 2px 4px #0008}
.pane-controls {border-top:1px solid #69765f;background:#1e2d26}
.dialog {
  background:linear-gradient(160deg,#23342b,#132221);
  border:1px solid #b9a071;box-shadow:0 24px 70px #000d;
}
.dialog-header {background:linear-gradient(90deg,#3a4b3d,#1e3029)}
.rule-select select {background:#1c2d28;color:#f1e7d4;border-color:#9f8c66}
.reset-dialog {background:linear-gradient(155deg,#2c3b32,#1b2925)}
.game-completed .guide-panel {border-color:#c5b47c;box-shadow:0 0 25px #e1cc7440}

/* iPhone: pantalla compacta, con espacio útil para las instrucciones. */
@media (max-width: 1010px) {
  .adventure-hud {grid-template-columns:minmax(145px,1fr) minmax(110px,.8fr) minmax(255px,1.55fr);padding:7px 8px;gap:7px}
  .hud-resource {padding:5px 4px;gap:3px}
  .hud-resource-symbol {width:21px;height:24px}
  .hud-resource-symbol svg {width:14px;height:14px}
  .hud-resource-content strong {font-size:13px}
  .hud-chapter-copy strong {font-size:15px}
  .workspace {grid-template-columns:minmax(0,1.25fr) minmax(310px,1fr)}
}
@media (max-width:760px) {
  .topbar-inner {min-height:48px}
  .main {
    grid-template-rows:auto auto auto minmax(0,1fr);
    gap:6px;
    padding-top:6px;
    padding-bottom:max(5px,env(safe-area-inset-bottom));
  }
  .intro {gap:7px}
  .intro h1 {font-size:clamp(23px,6.5vw,32px)}
  .intro-campaign {font-size:9px;margin:2px 0 0 15px}
  .intro-eyebrow {display:none}
  .title-rune {font-size:.55em}
  .segment-progress {padding:5px 6px;min-width:75px;font-size:10px}
  .segment-bars i {height:2px}
  .adventure-hud {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,.85fr);
    grid-template-areas:"chapter journey" "resources resources";
    gap:6px 9px;min-height:0;padding:6px 9px;border-radius:7px;
  }
  .hud-chapter {grid-area:chapter;gap:6px}
  .hud-chapter-emblem {width:28px;height:28px;border-radius:4px 10px 4px 10px}
  .hud-chapter-emblem svg {width:15px;height:15px}
  .hud-chapter-copy {gap:2px}
  .hud-chapter-copy span {font-size:8px}
  .hud-chapter-copy strong {font:14px/1.05 var(--serif)}
  .hud-journey {grid-area:journey;gap:4px}
  .hud-journey-label span {font-size:9px}
  .hud-journey-bar {height:6px}
  .hud-resources {grid-area:resources;gap:4px}
  .hud-resource {min-height:29px;padding:3px 5px;gap:5px}
  .hud-resource-symbol {width:22px;height:22px}
  .hud-resource-symbol svg {width:14px;height:14px}
  .hud-resource-content {gap:2px}
  .hud-resource-content strong {font-size:13px}
  .hud-resource-content small {font-size:8px}
  .hud-resource-bar {height:2px}
  .phase {min-height:33px;gap:4px;letter-spacing:0;font-size:10px}
  .phase-icon {width:22px;height:22px}
  .workspace {grid-template-columns:minmax(0,1fr);gap:5px}
  .tab {min-height:39px;font-size:11px;border-radius:6px}
  .guide-panel {padding:10px 12px 8px}
  .guide-header {min-height:34px;padding-bottom:5px}
  .guide-portrait {width:30px;height:30px}
  .guide-objective {margin-top:7px;font-size:8px}
  .guide-panel h2 {font-size:clamp(25px,6vw,30px);margin:5px 0 8px}
  .guide-controls {gap:5px;padding-top:5px;margin-top:5px}
  .guide-controls .icon-button {min-width:38px}
  .lesson-see-material {display:inline-flex;min-height:37px;padding:6px 8px;font-size:11px;white-space:nowrap}
  .guide-controls .primary-button {min-height:39px;flex:1}
  .page-count {font-size:10px}
  .body-copy {font-size:14px;line-height:1.4}
  .info-card,.check-card {padding:7px 8px}
  .component-stage {padding:5px;gap:4px}
  .component-stage-body {grid-template-columns:minmax(0,1fr) clamp(82px,27%,123px);gap:5px}
  .component-stage-head {padding:1px 2px 4px}
  .component-stage-head span {font-size:9px;letter-spacing:.04em}
  .component-stage-feature {border-radius:7px}
  .component-stage-hero {padding:7px}
  .component-stage-hero-label {padding:5px 7px}
  .component-stage-hero-label strong {font-size:12px}
  .component-stage-piece {min-height:64px;padding:4px;gap:4px}
  .component-stage-piece > span:last-child {font-size:9px}
  .component-stage-bottom {padding-top:4px}
  .component-stage-bottom p,.component-stage-bottom a {font-size:9px}
  .pane-header {min-height:44px;padding:5px 8px}
  .pane-heading h2 {font-size:15px}
  .pane-icon {width:29px;height:29px}
  .pane-header-actions .text-button {font-size:10px;padding:4px 6px}
}
@media (max-width:495px) {
  .brand-title {font-size:18px}
  .brand > span:first-child {width:28px;height:29px;font-size:17px}
  .topbar-actions {gap:4px}
  .topbar-actions .utility-button {min-height:32px;height:32px;padding:4px 6px}
  .tutorial-language select {min-height:32px;height:32px;width:94px;font-size:11px}
  .topbar-actions .restart-button {min-width:32px;padding:4px}
  .intro h1 {font-size:clamp(21px,6.1vw,28px)}
  .intro-campaign {font-size:8px}
  .phase {gap:3px;min-height:31px}
  .phase-icon {width:19px;height:19px}
  .phase-name {font-size:9px}
  .hud-chapter-copy strong {font-size:13px}
  .hud-resource-symbol {width:19px;height:21px}
  .hud-resource {gap:3px;padding-inline:3px}
  .hud-resource-content strong {font-size:12px}
  .guide-header strong {font-size:11px}
  .scene-label {font-size:9px;padding:2px 5px}
  .guide-panel h2 {font-size:24px}
  .lesson-see-material {padding:5px 6px;gap:3px;font-size:10px}
  .lesson-see-material svg {width:12px;height:12px}
}
@media (max-height:700px) {
  .intro-campaign {display:none}
  .guide-objective {margin-top:4px}
  .hud-journey {gap:3px}
  .adventure-hud {padding-block:4px}
  .hud-resources {gap:3px}
  .phase {min-height:27px}
  .guide-panel h2 {margin:4px 0 6px}
}
@media (max-height:535px) {
  .intro {display:none}
  .main {grid-template-rows:auto auto minmax(0,1fr)}
  .adventure-hud {min-height:0}
  .guide-header {display:none}
  .guide-objective {margin-top:1px}
  .guide-panel h2 {font-size:22px}
  .phase-icon {width:17px;height:17px}
  .tab {min-height:33px}
}
@media (max-width:360px) {
  .hud-resource-symbol {display:none}
  .component-stage-bottom a {font-size:8px}
  .guide-controls .primary-button {font-size:12px}
}
@media (prefers-reduced-motion:reduce) {
  .hud-journey-bar span,.hud-resource-bar b,.component-stage-hero > .game-component-crop,
  .component-stage-piece,.tab,.primary-button {transition:none!important;animation:none!important}
}
