body.modal-open .app-frame {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* --- HUB --- */
.hub-level {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 0.35rem;
  overflow: visible;
}

.hub-footer {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.45rem;
}

.hub-guides {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 5.5rem;
  padding: 0 0.15rem;
  pointer-events: none;
  z-index: 2;
}

.hub-guide {
  display: block;
  max-height: 110px;
  width: auto;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 10px 16px rgba(40, 120, 150, 0.25));
  animation: floatHada 4s ease-in-out infinite alternate;
  opacity: 0.95;
}

.hub-guide-left { width: min(120px, 18vw); }
.hub-guide-right {
  width: min(100px, 15vw);
  animation-delay: 0.6s;
}

.world-map {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.world-gate {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(220, 245, 255, 0.42) 55%,
      rgba(200, 235, 245, 0.38) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 12px 28px rgba(30, 70, 90, 0.1);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.world-gate:hover,
.world-gate:focus-visible {
  outline: none;
  transform: translateY(-3px);
  border-color: rgba(90, 200, 220, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 16px 34px rgba(40, 140, 160, 0.18);
}

.world-gate-orb {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 14px rgba(40, 120, 150, 0.22));
  animation: orbFloat 4.5s ease-in-out infinite alternate;
}

.world-gate-orb--salud {
  background-image: url('../img/areas/planet-salud.png');
}

.world-gate-orb--social {
  background-image: url('../img/areas/planet-social.png');
}

.world-gate-orb--art {
  background-image: url('../img/areas/planet-art.png');
}

.hub-scan .progress-bar.is-empty { width: 0%; }

.list-alpha { list-style-type: lower-alpha; }
.link-on-dark { color: var(--aqua-deep); }

@keyframes orbFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.world-gate-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.world-gate-code {
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--aqua-deep);
}

.world-gate-copy strong {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.4vw, 1.12rem);
  color: var(--ink);
  line-height: 1.25;
}

.world-gate-status {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 0.2rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.world-gate-status.is-open {
  color: #0a3a40;
  background: linear-gradient(90deg, #c8f6ef, #8ee0d0);
}

.world-gate-status.is-locked {
  color: #6a5a48;
  background: rgba(255, 230, 200, 0.55);
  border: 1px solid rgba(210, 170, 120, 0.35);
}

.world-gate-go {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #8ee0ef, #45c4c8 55%, #3aa8b8);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 16px rgba(40, 150, 170, 0.25);
}

.world-gate.locked {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.45);
}

.world-gate.locked .world-gate-go {
  background: rgba(120, 140, 150, 0.25);
  color: rgba(40, 60, 70, 0.55);
  box-shadow: none;
}

.hub-scan {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 0.85rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 22px rgba(30, 70, 90, 0.08);
}

.hub-scan-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.hub-scan .progress {
  height: 9px;
  background: rgba(30, 80, 100, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.hub-scan .progress-bar {
  background: linear-gradient(90deg, #7ad7e8, #5fd4b3, #8bb8f0);
  background-size: 200% 100%;
  animation: liquidSheen 4s ease infinite alternate;
  box-shadow: 0 0 10px rgba(80, 200, 220, 0.35);
}

@media (min-width: 769px) {
  .world-gate {
    grid-template-columns: 100px 1fr auto;
    padding: 0.95rem 1.1rem;
  }
  .world-gate-orb {
    width: 88px;
    height: 88px;
  }
}

/* --- AREA MODALS --- */
#area2Modal .modal-dialog,
#area3Modal .modal-dialog,
#area4Modal .modal-dialog {
  margin: 0;
  max-width: 100%;
  height: 100%;
}

#area2Modal .modal-content,
#area3Modal .modal-content,
#area4Modal .modal-content {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  padding: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

.modal-background {
  position: absolute;
  z-index: 0;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(1.05) contrast(1.02) saturate(1.08);
  transform-origin: center center;
  will-change: transform;
  animation: exploreLand 48s ease-in-out infinite alternate;
}

.modal-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.28) 0%,
      rgba(200, 235, 245, 0.08) 40%,
      rgba(10, 40, 55, 0.18) 100%
    );
  pointer-events: none;
}

@keyframes exploreLand {
  0% { transform: scale(1.08) translate3d(0, 0, 0); }
  25% { transform: scale(1.16) translate3d(-2.5%, 1.8%, 0); }
  50% { transform: scale(1.12) translate3d(2.2%, -1.4%, 0); }
  75% { transform: scale(1.18) translate3d(-1.2%, -2.2%, 0); }
  100% { transform: scale(1.14) translate3d(2%, 1.2%, 0); }
}

#area2Modal .modal-content > .btn-close,
#area3Modal .modal-content > .btn-close,
#area4Modal .modal-content > .btn-close {
  z-index: 50;
  filter: none;
  opacity: 1 !important;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(20, 60, 80, 0.2);
}

.modal-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

#area2Modal .modal-background {
  background-image: url('../img/areas/ciencias-salud.png');
  animation-duration: 52s;
}

#area3Modal .modal-background {
  background-image: url('../img/areas/ciencias-sociales.png');
  animation-duration: 46s;
  animation-direction: alternate-reverse;
}

#area4Modal .modal-background {
  background-image: url('../img/areas/artes.png');
  animation-duration: 54s;
}

@media (prefers-reduced-motion: reduce) {
  .modal-background {
    animation: none;
    transform: scale(1.08);
  }
}

.area-shell {
  --hud-pad-x: clamp(0.75rem, 2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0.9rem var(--hud-pad-x) 0.8rem;
  gap: 0.75rem;
}

.area-intro {
  width: 100%;
  margin: 0;
  padding: 0.95rem 1.25rem 1rem;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1.4fr);
  gap: 0.75rem 2rem;
  align-items: center;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 28px rgba(20, 60, 80, 0.12);
}

.area-intro h2,
.area-intro h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  margin: 0;
  color: var(--ink);
  text-shadow: none;
}

.area-intro .area-lead {
  margin: 0;
  font-size: clamp(0.9rem, 1.35vw, 1.02rem);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: none;
}

.area-intro .area-challenge { display: none; }

.area-homescreen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.85rem;
  padding: clamp(0.85rem, 2vh, 1.35rem) clamp(0.9rem, 2vw, 1.4rem);
  overflow: auto;
  width: 100%;
  isolation: isolate;
  border-radius: 24px;
  background:
    linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.5) 0%,
      rgba(220, 245, 255, 0.28) 45%,
      rgba(255, 255, 255, 0.22) 100%
    );
  backdrop-filter: blur(10px) saturate(1.25);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 16px 36px rgba(20, 50, 70, 0.14);
}

.area-homescreen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0.08) 22%,
      transparent 48%
    );
}

.area-homescreen::after { display: none; }

.area-homescreen > * {
  position: relative;
  z-index: 1;
}

.career-deck,
.career-deck:has(#area2-grid),
.career-deck:has(#area3-grid),
.career-deck:has(#area4-grid) {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.career-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: stretch;
  justify-items: center;
  align-content: center;
  gap: clamp(1rem, 2.2vh, 1.6rem) clamp(0.75rem, 1.5vw, 1.4rem);
  width: 100%;
  margin: 0;
  padding: 0.25rem 0;
}

#area2-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
  margin-inline: auto;
  gap: 2rem 3rem;
}

#area3-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#area4-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.career-app {
  width: auto;
  text-align: center;
  cursor: pointer;
  padding: 0.2rem;
  transition: transform 0.18s ease;
}

.career-app:hover { transform: translateY(-4px); }

.career-app.active .career-icon {
  border-color: rgba(70, 200, 210, 0.8);
  box-shadow:
    0 0 0 3px rgba(120, 220, 230, 0.35),
    0 12px 24px rgba(40, 150, 170, 0.28);
}

.career-icon {
  width: clamp(100px, 9vw, 128px);
  height: clamp(100px, 9vw, 128px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 2.4vw, 2.55rem);
  color: #fff;
  position: relative;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(140, 210, 230, 0.9), rgba(70, 160, 180, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 22px rgba(30, 80, 100, 0.22);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.career-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.career-icon i {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 40, 50, 0.25));
}

.career-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.career-icon.visited {
  border-color: rgba(90, 220, 190, 0.9);
  filter: saturate(1.15);
  box-shadow:
    0 0 0 3px rgba(120, 230, 200, 0.3),
    0 12px 24px rgba(40, 160, 140, 0.28);
}

.bg-psy { background: linear-gradient(160deg, #8b7cd9, #5a4aab); }
.bg-nurse { background: linear-gradient(160deg, #5eb4d8, #2f7fa8); }
.bg-admin { background: linear-gradient(160deg, #e0b45a, #b8892e); }
.bg-soc { background: linear-gradient(160deg, #d478a0, #a04870); }
.bg-int { background: linear-gradient(160deg, #4fc4a0, #2a8a6e); }
.bg-comm { background: linear-gradient(160deg, #5aa4d8, #2f6fa0); }
.bg-socwork { background: linear-gradient(160deg, #d48868, #a05838); }
.bg-admin2 { background: linear-gradient(160deg, #9080d8, #5a4aa0); }
.bg-infor { background: linear-gradient(160deg, #4eb8c8, #2a8090); }
.bg-cont { background: linear-gradient(160deg, #d4b050, #a08028); }
.bg-law { background: linear-gradient(160deg, #7a8898, #4a5868); }
.bg-eco { background: linear-gradient(160deg, #58b878, #2e8050); }
.bg-geo { background: linear-gradient(160deg, #48b0c0, #287888); }
.bg-ped { background: linear-gradient(160deg, #d070b0, #983078); }
.bg-arch { background: linear-gradient(160deg, #d09858, #986030); }
.bg-lang { background: linear-gradient(160deg, #6880d0, #4050a0); }
.bg-design { background: linear-gradient(160deg, #c070d0, #883098); }
.bg-lib { background: linear-gradient(160deg, #c8a850, #907828); }
.bg-phil { background: linear-gradient(160deg, #c8b848, #908828); }
.bg-hist { background: linear-gradient(160deg, #988878, #685848); }
.bg-lit { background: linear-gradient(160deg, #6890c8, #385890); }
.bg-lit2 { background: linear-gradient(160deg, #c86880, #903848); }

.career-detail {
  display: none;
  width: 100%;
  margin: 0;
  text-align: left;
  flex-shrink: 0;
}

.career-detail.is-open { display: block; }

.career-detail-inner {
  width: 100%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 0.95rem 1.25rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(20, 60, 80, 0.12);
  animation: fadeIn 0.28s ease;
  box-sizing: border-box;
  color: var(--ink);
}

.career-detail-title {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.4rem;
  color: var(--aqua-deep);
}

.career-detail-body {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.career-detail-body p { margin-bottom: 0.5rem; }
.career-detail-body ul { margin-bottom: 0; }

.career-detail-body li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.4rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 220, 0.25);
  background: rgba(255, 255, 255, 0.45);
}

.career-detail-body .btn {
  white-space: nowrap;
  margin-left: auto;
  border-radius: 999px;
}

.unlock-dock {
  width: 100%;
  margin: 0;
  flex-shrink: 0;
}

.power-console {
  width: 100%;
  position: relative;
  z-index: 2;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 24px rgba(20, 60, 80, 0.1);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.power-console-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
}

.power-status {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.power-led {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #c5d0d6;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.power-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.power-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.power-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(160, 180, 190, 0.45);
  background: rgba(200, 210, 220, 0.55);
  color: #6b737a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  cursor: not-allowed;
  transition: all 0.3s ease;
}

.power-console.is-off .power-btn {
  filter: grayscale(0.4);
  opacity: 0.75;
}

.power-console.is-on {
  border-color: rgba(90, 210, 200, 0.7);
  background: rgba(220, 250, 245, 0.72);
  box-shadow:
    0 0 24px rgba(80, 200, 190, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.power-console.is-on .power-led {
  background: #3ecf9a;
  box-shadow: 0 0 12px rgba(62, 207, 154, 0.65);
  animation: ledPulse 1.2s ease-in-out infinite alternate;
}

.power-console.is-on .power-title {
  color: var(--aqua-deep);
}

.power-console.is-on .power-hint {
  color: var(--ink);
}

.power-console.is-on .power-btn {
  cursor: pointer;
  filter: none;
  opacity: 1;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, #8ee0ef, #45c4c8 50%, #3aa8b8);
  box-shadow: 0 10px 20px rgba(40, 150, 170, 0.3);
  animation: btnPulse 1.6s ease-in-out infinite alternate;
}

.power-console.is-on .power-btn:hover {
  transform: translateY(-1px) scale(1.02);
}

.btn-next {
  background: linear-gradient(135deg, #8ee0ef, #45c4c8);
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 10px 25px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(40, 150, 170, 0.28);
}

@keyframes btnPulse {
  from { box-shadow: 0 8px 16px rgba(40, 150, 170, 0.22); }
  to { box-shadow: 0 12px 26px rgba(40, 150, 170, 0.4); }
}

@keyframes ledPulse {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-close {
  z-index: 9999 !important;
  transition: transform 0.2s ease;
  opacity: 1 !important;
}

.btn-close:hover { transform: scale(1.12); }

.btn-close-white {
  filter: none;
}

/* Mobile hub + area */
@media (max-width: 768px) {
  .hub-level {
    gap: 0.65rem;
    padding-bottom: 0.25rem;
  }

  .hub-level > .stage-copy,
  .hub-level > .hub-lead {
    margin: 0;
  }

  .world-map {
    flex: none;
    gap: 0.6rem;
    margin-top: 0.15rem;
  }

  .hub-footer {
    margin-top: 0.35rem;
    gap: 0.15rem;
    padding-top: 0;
  }

  .hub-guides {
    min-height: 3.75rem;
  }

  .hub-guide {
    max-height: 72px;
    opacity: 0.88;
  }

  .hub-guide-left { width: 66px; }
  .hub-guide-right { width: 56px; }

  .world-gate {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas: "orb copy action";
    align-items: center;
    gap: 0.45rem 0.55rem;
    padding: 0.65rem 0.7rem;
    min-height: 0;
    border-radius: 16px;
  }

  .world-gate-orb {
    grid-area: orb;
    width: 52px;
    height: 52px;
  }

  .world-gate-copy { grid-area: copy; gap: 0.1rem; }
  .world-gate-copy strong { font-size: 0.9rem; line-height: 1.2; }
  .world-gate-code { font-size: 0.56rem; }
  .world-gate-status {
    margin-top: 0.12rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.6rem;
  }

  .world-gate-go {
    grid-area: action;
    justify-self: end;
    align-self: center;
    padding: 0.4rem 0.7rem;
    font-size: 0.66rem;
  }

  .hub-scan {
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
  }

  .hub-scan-label { font-size: 0.66rem; }

  .area-shell {
    padding:
      max(0.5rem, env(safe-area-inset-top))
      0.55rem
      max(0.5rem, env(safe-area-inset-bottom));
    gap: 0.5rem;
  }

  .area-intro {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.8rem 0.85rem;
    padding-right: 2.75rem;
    border-radius: 16px;
  }

  .area-intro h2,
  .area-intro h3 {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .area-intro .area-lead {
    font-size: 0.88rem;
    line-height: 1.42;
  }

  .modal-content > .btn-close {
    top: 0.55rem !important;
    right: 0.55rem !important;
    width: 2.15rem;
    height: 2.15rem;
    margin: 0 !important;
  }

  .area-homescreen {
    justify-content: flex-start;
    padding: 0.75rem 0.55rem 1rem;
    border-radius: 16px;
  }

  .career-grid,
  #area2-grid,
  #area3-grid,
  #area4-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 0.4rem;
    max-width: none;
  }

  #area2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 300px;
    margin-inline: auto;
    gap: 1.1rem;
  }

  .career-icon {
    width: 88px;
    height: 88px;
    font-size: 1.7rem;
    border-radius: 22px;
  }

  .career-app {
    min-height: 48px;
    padding: 0.35rem 0.2rem;
  }

  .career-detail-inner {
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
  }

  .career-detail-title { font-size: 0.98rem; }
  .career-detail-body {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .career-detail-body li {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.7rem;
  }

  .career-detail-body .btn {
    margin-left: 0;
    width: 100%;
    min-height: 48px;
  }

  .power-console-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.9rem 0.95rem;
    gap: 0.8rem;
  }

  .power-btn {
    width: 100%;
    min-height: 52px;
    font-size: 0.82rem;
  }

  .power-title { font-size: 0.76rem; }
  .power-hint { font-size: 0.84rem; line-height: 1.38; }

  .modal-background {
    animation-duration: 120s;
    filter: brightness(1.02) contrast(1.02) saturate(1.05);
  }
}

@media (max-width: 576px) {
  .world-gate {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    padding: 0.7rem 0.65rem;
    gap: 0.45rem 0.55rem;
  }

  .world-gate-orb {
    width: 52px;
    height: 52px;
  }

  .world-gate-copy strong { font-size: 0.86rem; }
  .world-gate-go {
    padding: 0.38rem 0.68rem;
    font-size: 0.64rem;
  }

  .career-grid,
  #area3-grid,
  #area4-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem 0.3rem;
  }

  .career-icon {
    width: 78px;
    height: 78px;
    font-size: 1.5rem;
  }

  .hub-guide-left,
  .hub-guide-right {
    opacity: 0.7;
    pointer-events: none;
  }
}

@media (max-width: 390px) {
  .career-icon {
    width: 70px;
    height: 70px;
    font-size: 1.35rem;
  }

  .hub-guide-left,
  .hub-guide-right {
    display: none;
  }
}
