.bem-shell {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: hidden;
  color: #f1e9dc;
  background:
    radial-gradient(circle at 50% 12%, rgba(124, 91, 54, 0.18), transparent 36%),
    #121011;
  font-family: Pretendard, system-ui, sans-serif;
}

.bem-header {
  display: flex;
  flex: 0 0 auto;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: max(10px, env(safe-area-inset-top)) clamp(14px, 3vw, 32px) 10px;
  border-bottom: 1px solid rgba(225, 198, 148, 0.24);
  background: rgba(15, 12, 12, 0.94);
}

.bem-header h1 {
  margin: 2px 0 0;
  font: 600 clamp(1.05rem, 2vw, 1.45rem)/1.2 ui-serif, Georgia, serif;
  letter-spacing: 0.04em;
}

.bem-kicker {
  color: #bda77f;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}

.bem-floor-tabs {
  display: flex;
  gap: 8px;
}

.bem-header-controls,
.bem-move-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bem-floor-tabs button {
  min-height: 44px;
  border: 1px solid rgba(225, 198, 148, 0.36);
  border-radius: 999px;
  padding: 8px 14px;
  color: inherit;
  background: rgba(74, 55, 39, 0.44);
  touch-action: manipulation;
}

.bem-floor-tabs button[aria-pressed="true"] {
  border-color: #e6c98f;
  color: #191412;
  background: #e6c98f;
}

.bem-close,
.bem-move-controls button {
  min-height: 44px;
  border: 1px solid rgba(225, 198, 148, 0.36);
  border-radius: 999px;
  padding: 8px 16px;
  color: inherit;
  background: rgba(38, 31, 29, 0.9);
  touch-action: manipulation;
}

.bem-move-controls button.is-primary:not(:disabled) {
  border-color: #e6c98f;
  color: #191412;
  background: #e6c98f;
}

.bem-move-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.bem-workspace {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 14px;
  padding: 14px clamp(12px, 2.4vw, 28px);
  overflow: hidden;
}

.bem-map-panel,
.bem-status {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(225, 198, 148, 0.26);
  border-radius: 18px;
  background: rgba(27, 22, 21, 0.9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.bem-map-panel {
  position: relative;
  display: grid;
  place-items: center;
  overflow: auto hidden;
  scrollbar-color: rgba(225, 198, 148, 0.42) transparent;
}

.bem-pan-hint {
  display: none;
  position: sticky;
  right: 10px;
  bottom: 10px;
  align-self: end;
  justify-self: end;
  z-index: 3;
  border: 1px solid rgba(225, 198, 148, 0.24);
  border-radius: 999px;
  padding: 5px 9px;
  color: #d8c9b6;
  background: rgba(18, 16, 17, 0.86);
  font-size: 0.66rem;
  pointer-events: none;
}

.bem-map-panel svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

.bem-shell [hidden] {
  display: none !important;
}

.bem-edge {
  fill: none;
  stroke: rgba(210, 190, 157, 0.32);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke 160ms ease, stroke-width 160ms ease;
}

.bem-edge.is-route {
  stroke: #e8bd67;
  stroke-width: 16;
  filter: drop-shadow(0 0 8px rgba(232, 189, 103, 0.42));
}

.bem-room-shape,
.bem-connector-shape,
.bem-service-passage {
  fill: #272120;
  stroke: #7f6b56;
  stroke-width: 2;
}

.bem-room.is-available .bem-room-shape {
  fill: #302821;
  stroke: #c4a56d;
}

.bem-room.is-visited .bem-room-shape {
  fill: #38413a;
  stroke: #849d84;
}

.bem-room.is-current .bem-room-shape {
  fill: #77582f;
  stroke: #ffe0a0;
  stroke-width: 5;
  filter: drop-shadow(0 0 12px rgba(255, 214, 137, 0.55));
}

.bem-room.is-selected .bem-room-shape {
  fill: #674f2d;
  stroke: #f5c86f;
  stroke-width: 5;
  filter: drop-shadow(0 0 12px rgba(245, 200, 111, 0.52));
}

.bem-room.is-locked .bem-room-shape,
.bem-connector.is-locked .bem-connector-shape {
  fill: #1c1919;
  stroke: #554b48;
}

.bem-hit-region {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.bem-room,
.bem-connector {
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
}

.bem-room:focus-visible .bem-room-shape,
.bem-connector:focus-visible .bem-connector-shape {
  stroke: #fff3c7;
  stroke-width: 6;
  filter: drop-shadow(0 0 10px rgba(255, 243, 199, 0.72));
}

.bem-room-label,
.bem-connector-label,
.bem-floor-lock-label,
.bem-lock,
.bem-anchor text {
  fill: #f0e7d8;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  font-size: 17px;
  font-weight: 700;
}

.bem-connector-label {
  font-size: 11px;
}

.bem-lock {
  fill: #a5968e;
  font-size: 13px;
}

.bem-floor-lock-label {
  fill: #b8a89c;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.bem-anchor path {
  fill: none;
  stroke: #d3b16f;
  stroke-width: 7;
  stroke-linecap: round;
}

.bem-anchor text {
  fill: #b9a47d;
  font-size: 12px;
}

.bem-status {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 26px);
  overflow-y: auto;
}

.bem-debug {
  margin-top: auto;
  border-top: 1px solid rgba(225, 198, 148, 0.2);
  padding-top: 12px;
  color: #d6c8b6;
  font: 0.72rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bem-debug summary {
  cursor: pointer;
}

.bem-current span,
.bem-status dt {
  display: block;
  margin-bottom: 5px;
  color: #bda77f;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bem-current strong {
  font: 600 1.35rem/1.3 ui-serif, Georgia, serif;
}

.bem-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bem-focus-current {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid rgba(225, 198, 148, 0.36);
  border-radius: 999px;
  padding: 7px 12px;
  color: #eadcc3;
  background: rgba(74, 55, 39, 0.44);
  font-size: 0.72rem;
  touch-action: manipulation;
}

.bem-focus-current:focus-visible {
  outline: 2px solid #fff3c7;
  outline-offset: 2px;
}

.bem-status dl {
  margin: 0;
}

.bem-status dd {
  margin: 0 0 14px;
  overflow-wrap: anywhere;
  color: #e8ded1;
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bem-notice {
  margin: auto 0 0;
  border-left: 3px solid #c9a664;
  padding: 10px 12px;
  color: #eadcc3;
  background: rgba(201, 166, 100, 0.09);
}

.bem-shell.is-natural-explore .bem-notice {
  min-height: 2.9rem;
  box-sizing: border-box;
  visibility: visible;
}

.bem-shell.is-natural-explore .bem-notice:empty {
  visibility: hidden;
}

.bem-shell.is-real-map .bem-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px);
  gap: 10px;
  padding: 10px clamp(10px, 2vw, 20px);
}

.bem-shell.is-real-map .bem-map-panel {
  overflow: hidden;
  padding: 8px;
}

.bem-map-image-frame {
  position: relative;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 1672 / 941;
}

.bem-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.bem-hotspot-layer {
  position: absolute;
  inset: 0;
}

.bem-image-hotspot {
  position: absolute;
  z-index: 2;
  left: var(--hotspot-x);
  top: var(--hotspot-y);
  display: grid;
  min-width: 66px;
  min-height: 44px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(230, 201, 143, 0.82);
  border-radius: 999px;
  padding: 6px 10px;
  color: #f7eddd;
  background: rgba(24, 18, 15, 0.86);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.62);
  font: 700 clamp(0.58rem, 1.4vw, 0.78rem)/1.1 Pretendard, system-ui, sans-serif;
  white-space: nowrap;
  touch-action: manipulation;
}

.bem-shell.is-real-map button.bem-image-hotspot,
.bem-shell.is-real-map button.bem-image-hotspot.is-current,
.bem-shell.is-real-map button.bem-image-hotspot.is-selected,
.bem-shell.is-real-map button.bem-image-hotspot.is-visited,
.bem-shell.is-real-map button.bem-image-hotspot.is-locked {
  border: 0;
  color: #eadcc6;
  background: transparent;
  box-shadow: none;
}

.bem-image-hotspot.is-current {
  border: 2px solid #ffe0a0;
  color: #20160e;
  background: #ffe0a0;
  box-shadow: 0 0 0 4px rgba(255, 224, 160, 0.2), 0 4px 18px rgba(0, 0, 0, 0.7);
}

.bem-image-hotspot.is-selected {
  border: 2px solid #f5c86f;
  color: #21170e;
  background: #f5c86f;
  box-shadow: 0 0 0 4px rgba(245, 200, 111, 0.22), 0 4px 18px rgba(0, 0, 0, 0.7);
}

.bem-image-hotspot.is-visited {
  border-color: #99b99b;
  color: #e4f3e5;
  background: rgba(40, 67, 47, 0.9);
}

.bem-image-hotspot.is-locked {
  border-color: rgba(139, 127, 118, 0.62);
  border-style: solid;
  color: #a99e96;
  background: rgba(23, 20, 20, 0.78);
}

.bem-image-hotspot:focus-visible {
  outline: 3px solid #fff3c7;
  outline-offset: 3px;
}

.bem-shell.is-real-map .bem-status {
  gap: 12px;
  overflow: hidden;
  padding: clamp(12px, 2vw, 20px);
}

.bem-shell.is-real-map .bem-status dl {
  min-height: 7.2rem;
}

.bem-shell.is-real-map .bem-notice {
  min-height: 3.8rem;
  margin-top: auto;
}

.bem-move-slot {
  min-width: 74px;
}

.bem-move-slot [data-map-confirm]:disabled {
  visibility: hidden;
}

.bem-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 8px clamp(14px, 3vw, 32px) max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(225, 198, 148, 0.2);
  color: #cfc3b3;
  background: rgba(15, 12, 12, 0.96);
}

.bem-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow-x: hidden;
}

.bem-legend span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #8a7b6a;
  content: '';
}

.bem-legend .is-current::before { background: #ffe0a0; }
.bem-legend .is-selected::before { background: #f5c86f; }
.bem-legend .is-visited::before { background: #849d84; }
.bem-legend .is-available::before { background: #c4a56d; }
.bem-legend .is-locked::before { background: #554b48; }

@media (max-width: 600px) {
  .bem-header {
    min-height: 58px;
    gap: 8px;
    padding-inline: 12px;
  }

  .bem-kicker {
    display: none;
  }

  .bem-header h1 {
    font-size: 1rem;
  }

  .bem-floor-tabs button {
    min-height: 44px;
    padding: 7px 10px;
    font-size: 0.75rem;
  }

  .bem-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(280px, 1fr) auto;
    gap: 8px;
    padding: 8px;
  }

  .bem-map-panel {
    place-items: stretch start;
  }

  .bem-map-panel svg {
    width: auto;
    min-width: 680px;
    max-width: none;
    height: 100%;
  }

  .bem-map-panel[data-map-floor="2"] svg {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .bem-shell.is-natural-explore .bem-map-panel {
    place-items: center;
    overflow: hidden;
  }

  .bem-shell.is-real-map .bem-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(190px, 1fr) 122px;
    gap: 6px;
    padding: 6px;
  }

  .bem-shell.is-real-map .bem-map-panel {
    padding: 4px;
  }

  .bem-shell.is-real-map .bem-status {
    display: grid;
    max-height: 122px;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    grid-template-rows: auto minmax(36px, auto);
    gap: 6px 10px;
    padding: 8px 10px;
  }

  .bem-shell.is-real-map .bem-status dl {
    min-height: 0;
  }

  .bem-shell.is-real-map .bem-notice {
    min-height: 36px;
    margin: 0;
  }

  .bem-image-hotspot {
    min-width: 52px;
    min-height: 36px;
    padding: 4px 7px;
    font-size: clamp(0.52rem, 2.2vw, 0.65rem);
  }

  .bem-shell.is-natural-explore .bem-map-panel svg,
  .bem-shell.is-natural-explore .bem-map-panel[data-map-floor="2"] svg {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
  }

  .bem-pan-hint {
    display: block;
  }

  .bem-map-panel,
  .bem-status {
    border-radius: 12px;
  }

  .bem-status {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    max-height: 156px;
    padding: 10px 12px;
  }

  .bem-current strong {
    font-size: 1rem;
  }

  .bem-current {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .bem-focus-current {
    min-height: 40px;
    padding: 5px 9px;
    font-size: 0.66rem;
  }

  .bem-status dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
  }

  .bem-status dt,
  .bem-status dd {
    margin: 0;
    font-size: 0.66rem;
  }

  .bem-status dt:nth-of-type(n + 3),
  .bem-status dd:nth-of-type(n + 3) {
    display: none;
  }

  .bem-notice {
    grid-column: 1 / -1;
    margin: 0;
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  .bem-footer {
    gap: 8px;
    min-height: 48px;
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
  }

  .bem-legend {
    justify-content: space-between;
    gap: 6px;
    font-size: 0.64rem;
  }

  .bem-legend .is-visited,
  .bem-legend .is-available {
    display: none;
  }

  .bem-shell.is-natural-explore .bem-legend .is-available {
    display: inline-flex;
  }

  .bem-shell.is-real-map .bem-legend .is-visited {
    display: inline-flex;
  }

  .bem-move-controls button {
    min-height: 44px;
    padding: 6px 12px;
    font-size: 0.76rem;
  }
}

@media (max-height: 420px) {
  .bem-header {
    min-height: 44px;
    padding: 3px 10px;
  }

  .bem-header h1 {
    font-size: 0.88rem;
  }

  .bem-floor-tabs button {
    min-height: 38px;
    padding: 4px 9px;
    font-size: 0.68rem;
  }

  .bem-workspace {
    grid-template-columns: minmax(0, 1fr) 190px;
    grid-template-rows: minmax(0, 1fr);
    gap: 6px;
    padding: 5px 8px;
  }

  .bem-map-panel svg {
    min-width: 590px;
  }

  .bem-map-panel[data-map-floor="2"] svg {
    min-width: 100%;
  }

  .bem-status {
    display: block;
    max-height: none;
    padding: 8px 10px;
  }

  .bem-status dl {
    display: block;
    margin-top: 8px;
  }

  .bem-status dt,
  .bem-status dd {
    display: block !important;
    margin: 0;
    font-size: 0.6rem;
    line-height: 1.35;
  }

  .bem-status dt:nth-of-type(n + 2),
  .bem-status dd:nth-of-type(n + 2) {
    display: none !important;
  }

  .bem-current strong {
    font-size: 0.88rem;
  }

  .bem-current {
    align-items: flex-start;
  }

  .bem-focus-current {
    min-height: 36px;
    padding: 3px 7px;
    font-size: 0.58rem;
  }

  .bem-footer {
    min-height: 40px;
    padding: 2px 8px max(2px, env(safe-area-inset-bottom));
  }

  .bem-legend {
    font-size: 0.58rem;
  }

  .bem-move-controls button {
    min-height: 36px;
    padding: 3px 9px;
  }
}

/* Natural Exploration V2.3: a shrink-wrapped overview with room-scale interaction zones. */
.bem-shell.is-real-map .bem-header {
  position: relative;
  display: grid;
  min-height: 52px;
  grid-template-columns: minmax(70px, 1fr) auto auto;
  gap: 10px;
  padding: 4px clamp(8px, 2vw, 16px);
}

.bem-floor-title {
  overflow: hidden;
  color: #dfcda9;
  font: 600 clamp(0.82rem, 1.8vw, 1rem)/1.2 ui-serif, Georgia, serif;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bem-shell.is-real-map .bem-floor-tabs {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 198, 148, 0.32);
  border-radius: 999px;
  background: rgba(22, 17, 16, 0.82);
}

.bem-shell.is-real-map .bem-floor-tabs button {
  min-width: 48px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 6px 11px;
  color: #c9bca9;
  background: transparent;
  font-size: 0.75rem;
}

.bem-shell.is-real-map .bem-floor-tabs button[aria-pressed="true"] {
  color: #191412;
  background: #e6c98f;
  box-shadow: inset 0 0 0 1px rgba(255, 241, 208, 0.28);
}

.bem-map-legend {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1vw, 10px);
  color: #c9bdad;
  font-size: clamp(0.58rem, 1.15vw, 0.7rem);
  line-height: 1;
  white-space: nowrap;
}

.bem-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bem-map-legend i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 166, 108, 0.78);
  border-radius: 50%;
  background: rgba(77, 55, 39, 0.42);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.38);
}

.bem-map-legend [data-legend-state="current"] i {
  border: 2px solid #f7dfae;
  background: rgba(146, 96, 38, 0.9);
  box-shadow: 0 0 0 2px rgba(247, 223, 174, 0.17);
}

.bem-map-legend [data-legend-state="available"] i {
  background: rgba(148, 102, 47, 0.72);
}

.bem-map-legend [data-legend-state="visited"] i {
  border-color: rgba(142, 137, 112, 0.66);
  background: rgba(67, 61, 48, 0.5);
}

.bem-map-legend [data-legend-state="locked"] i {
  border-color: rgba(126, 113, 103, 0.58);
  background: rgba(29, 24, 22, 0.72);
  opacity: 0.72;
}

.bem-shell.is-real-map .bem-workspace {
  container-type: size;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  place-items: center;
  padding: clamp(4px, 1.2vw, 10px);
  overflow: hidden;
}

.bem-shell.is-real-map .bem-map-panel {
  container-type: size;
  display: grid;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  aspect-ratio: 1672 / 941;
  place-items: center;
  overflow: hidden;
  padding: 0;
}

@supports (width: 1cqw) {
  .bem-shell.is-real-map .bem-map-panel {
    width: min(100cqw, 177.6833156cqh);
    height: min(100cqh, 56.2799043cqw);
  }
}

.bem-map-image-frame {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1672 / 941;
}

@supports (width: 1cqw) {
  .bem-map-image-frame {
    width: min(100cqw, 177.6833156cqh);
    height: min(100cqh, 56.2799043cqw);
  }
}

.bem-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.bem-hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bem-image-hotspot {
  position: absolute;
  z-index: 2;
  left: calc(var(--hotspot-x-ratio) * 100%);
  top: calc(var(--hotspot-y-ratio) * 100%);
  display: grid;
  width: calc(var(--hit-width-ratio) * 100%);
  min-width: 0 !important;
  height: calc(var(--hit-height-ratio) * 100%);
  min-height: 0 !important;
  box-sizing: border-box;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: #eadcc6;
  background: transparent;
  box-shadow: none;
  font: 700 0.68rem/1.1 Pretendard, system-ui, sans-serif;
  pointer-events: auto;
  touch-action: manipulation;
}

.bem-room-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(201, 166, 108, 0.78);
  border-radius: 50%;
  background: rgba(77, 55, 39, 0.28);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(34, 24, 20, 0.3);
  pointer-events: none;
}

.bem-image-hotspot .bem-room-label {
  position: absolute;
  top: calc(50% + 8px);
  left: 50%;
  width: max-content;
  max-width: min(116px, 30vw);
  transform: translateX(-50%);
  border: 1px solid rgba(209, 177, 123, 0.32);
  border-radius: 999px;
  padding: 2px 5px;
  color: #f7eddd;
  background: rgba(20, 15, 14, 0.78);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  font-size: clamp(0.5rem, 1.35vw, 0.68rem);
  line-height: 1.1;
  opacity: 1;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000;
  transition: border-color 100ms linear, background 100ms linear, color 100ms linear;
  white-space: nowrap;
}

.bem-image-hotspot:not(.is-locked):hover {
  background: rgba(202, 158, 88, 0.1);
  box-shadow: inset 0 0 0 1px rgba(225, 190, 130, 0.28);
}

.bem-image-hotspot.is-current .bem-room-marker {
  width: 14px;
  height: 14px;
  border: 2px solid #f7dfae;
  background: rgba(116, 78, 37, 0.74);
  box-shadow: 0 0 0 3px rgba(247, 223, 174, 0.17), 0 2px 7px rgba(0, 0, 0, 0.55), inset 0 0 5px rgba(255, 234, 190, 0.34);
}

.bem-image-hotspot.is-current .bem-room-label {
  border-color: rgba(247, 223, 174, 0.78);
  color: #fff1cd;
  background: rgba(88, 57, 27, 0.9);
}

.bem-image-hotspot.is-selected {
  background: rgba(243, 198, 109, 0.1);
  box-shadow: inset 0 0 0 2px rgba(243, 198, 109, 0.52);
}

.bem-image-hotspot.is-selected .bem-room-marker {
  width: 15px;
  height: 15px;
  border: 2px solid #f3c66d;
  background: rgba(173, 113, 40, 0.82);
  box-shadow: 0 0 0 4px rgba(243, 198, 109, 0.2), 0 2px 8px rgba(0, 0, 0, 0.58), inset 0 0 5px rgba(255, 225, 162, 0.3);
}

.bem-image-hotspot.is-selected .bem-room-label {
  border-color: #f3c66d;
  color: #fff3d1;
  background: rgba(112, 68, 24, 0.94);
}

.bem-image-hotspot.is-visited .bem-room-marker {
  border-color: rgba(142, 137, 112, 0.58);
  background: rgba(67, 61, 48, 0.34);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.36);
}

.bem-image-hotspot.is-locked {
  cursor: not-allowed;
}

.bem-image-hotspot.is-locked .bem-room-marker {
  width: 8px;
  height: 8px;
  border-style: solid;
  border-color: rgba(126, 113, 103, 0.54);
  background: rgba(29, 24, 22, 0.46);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  opacity: 0.78;
}

.bem-image-hotspot.is-locked .bem-room-label {
  border-color: rgba(126, 113, 103, 0.28);
  color: #aaa097;
  background: rgba(18, 16, 16, 0.68);
}

.bem-map-annotation {
  position: absolute;
  z-index: 1;
  left: calc(var(--annotation-x-ratio) * 100%);
  top: calc(var(--annotation-y-ratio) * 100%);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(183, 157, 116, 0.22);
  border-radius: 999px;
  padding: 2px 5px;
  color: rgba(220, 205, 183, 0.7);
  background: rgba(17, 14, 13, 0.58);
  font-size: clamp(0.48rem, 1.2vw, 0.62rem);
  line-height: 1.1;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}

.bem-map-passage {
  position: absolute;
  z-index: 0;
  left: calc(var(--passage-x-ratio) * 100%);
  top: calc(var(--passage-y-ratio) * 100%);
  width: calc(var(--passage-width-ratio) * 100%);
  height: 2px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(207, 177, 126, 0.58), transparent);
  box-shadow: 0 0 4px rgba(207, 177, 126, 0.15);
  pointer-events: none;
}

.bem-image-hotspot:focus-visible {
  outline: 2px solid #fff3c7;
  outline-offset: -3px;
}

.bem-shell.is-real-map .bem-footer {
  display: flex;
  min-height: 64px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px clamp(10px, 2vw, 18px);
}

.bem-destination-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.bem-destination-copy strong {
  overflow: hidden;
  color: #f0dfbd;
  font: 600 0.9rem/1.25 ui-serif, Georgia, serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bem-destination-copy span {
  overflow: hidden;
  color: #bfb2a2;
  font-size: 0.7rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bem-current-location {
  font-size: 0.78rem !important;
  opacity: 0.78;
}

.bem-move-button {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 44px;
  border: 1px solid #e6c98f;
  border-radius: 999px;
  padding: 7px 16px;
  color: #191412;
  background: #e6c98f;
  touch-action: manipulation;
}

@media (max-width: 600px) {
  .bem-shell.is-real-map .bem-header {
    min-height: 50px;
    grid-template-columns: minmax(54px, 72px) minmax(0, 1fr) auto;
    gap: 5px;
    padding: 3px 7px;
  }

  .bem-map-legend {
    gap: 5px;
    font-size: 0.6rem;
  }

  .bem-map-legend span {
    gap: 2px;
  }

  .bem-map-legend i {
    width: 8px;
    height: 8px;
  }

  .bem-shell.is-real-map .bem-floor-tabs button {
    min-width: 46px;
    min-height: 44px;
    padding: 5px 9px;
  }

  .bem-shell.is-real-map .bem-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    place-items: center;
    padding: 4px;
  }

  .bem-shell.is-real-map .bem-map-panel {
    place-items: center;
    padding: 0;
  }

  .bem-shell.is-real-map .bem-footer {
    min-height: 60px;
    padding: 5px 8px;
  }

  .bem-move-button {
    min-height: 44px;
  }
}
