.wd-scene {
  --wd-paper: #eee6d1;
  --wd-ink: #2c312a;
  --wd-muted: #c5bc9d;
  --wd-red: #963e2c;
  background: #a6ab94;
  color: var(--wd-paper);
  container-type: inline-size;
  height: 100%;
  isolation: isolate;
  min-height: 350px;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.wd-canvas {
  cursor: grab;
  display: block;
  height: 100%;
  inset: 0;
  position: absolute;
  touch-action: none;
  width: 100%;
}
.wd-canvas:focus { outline: none; }
.wd-canvas:focus-visible { outline: 2px solid #dbbea0; outline-offset: -3px; }
.wd-dragging .wd-canvas { cursor: grabbing; }
.wd-scene button { font: inherit; }
.wd-scene button:focus-visible { outline: 2px solid #f6d08c; outline-offset: 3px; }
.wd-hotspots { inset: 0; pointer-events: none; position: absolute; z-index: 2; }
.wd-hotspot {
  align-items: center;
  background: #2a3026df;
  border: 1px solid #d9c39b77;
  border-radius: 2px;
  box-shadow: 0 3px 9px #282b2352;
  color: #f2e8cd;
  cursor: pointer;
  display: flex;
  gap: 6px;
  left: 0;
  line-height: 1.34;
  padding: 4px 8px 4px 6px;
  pointer-events: auto;
  position: absolute;
  top: 0;
  white-space: nowrap;
}
.wd-hotspot[hidden] { display: none; }
.wd-hotspot:hover, .wd-hotspot:focus-visible { background: #3b4737; border-color: #d4b780; z-index: 100 !important; }
.wd-hotspot-ring {
  aspect-ratio: 1;
  background: #b69667;
  border: 2px solid #394036;
  box-shadow: 0 0 0 1px #beac7eb5;
  display: block;
  transform: rotate(45deg);
  width: 8px;
}
.wd-hotspot[data-kind="npc"] .wd-hotspot-ring { background: #a9ad85; }
.wd-hotspot[data-kind="cabin-door"] {
  background: #754330ec;
  border-color: #dec5a2b5;
}
.wd-hotspot-label { font-size: 11px; letter-spacing: 0.065em; }
.wd-header {
  align-items: start;
  display: flex;
  gap: 10px;
  inset: 18px 20px auto;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}
.wd-left-tools {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.wd-ruler-button, .wd-ruler-label {
  background: #303b30eb;
  border: 1px solid #e1d0ac85;
  border-radius: 2px;
  color: #fff0d0;
  line-height: 1.15;
  white-space: nowrap;
}
.wd-scene .wd-ruler-button {
  cursor: pointer;
  font-size: 12px;
  min-height: 33px;
  padding: 5px 9px;
  pointer-events: auto;
  touch-action: manipulation;
}
.wd-ruler-button[aria-pressed="true"] { background: #eee5ce; border-color: #5949366f; color: #503a2d; }
.wd-ruler-label {
  font-size: 12px;
  left: 0;
  padding: 3px 6px;
  pointer-events: none;
  position: absolute;
  top: 0;
  z-index: 2;
}
.wd-location {
  align-items: center;
  background: #222a23e5;
  border: 1px solid #decc9c59;
  box-shadow: 0 4px 15px #2b342833;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 8px 13px 8px 8px;
}
.wd-location-mark {
  align-items: center;
  background: #853d30;
  border: 1px solid #cf9c7a88;
  display: flex;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 16px;
  height: 29px;
  justify-content: center;
  width: 29px;
}
.wd-location-copy { display: grid; gap: 2px; }
.wd-location-copy strong { font-size: 13px; font-weight: 600; letter-spacing: 0.09em; }
.wd-location-copy small { color: #c8bd9d; font-size: 10px; letter-spacing: 0.12em; }
.wd-leave {
  background: #eee5ceea;
  border: 1px solid #5949366f;
  border-radius: 2px;
  color: #413c2e;
  cursor: pointer;
  font-size: 11px !important;
  letter-spacing: 0.07em;
  margin-left: auto;
  padding: 9px 10px;
  pointer-events: auto;
}
.wd-leave:hover { background: #faf0d5; }
.wd-header .wd-cabin-action { margin-left: 0; }
.wd-leave.wd-cabin-action {
  background: #7d4937;
  border-color: #d8b499;
  color: #fff4df;
}
.wd-leave.wd-cabin-action:hover { background: #68392a; }
.wd-compass {
  align-items: center;
  aspect-ratio: 1;
  background: #2e3b30e1;
  border: 1px solid #ede0b38a;
  border-radius: 50%;
  color: #e9dbb5;
  display: flex;
  font-size: 12px;
  justify-content: center;
  line-height: 1;
  position: relative;
  width: 42px;
}
.wd-compass::before {
  border: 4px solid transparent;
  border-top: 0;
  border-bottom: 6px solid #e5c897;
  content: "";
  left: calc(50% - 4px);
  position: absolute;
  top: 2px;
  transform: rotate(var(--wd-heading,0deg));
  transform-origin: center 18px;
}
.wd-footer {
  align-items: end;
  display: flex;
  gap: 9px;
  inset: auto 20px 16px;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}
.wd-controls { display: flex; gap: 4px; }
.wd-actions {
  align-items: end;
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.wd-touch-controls, .wd-touch-hint, .wd-leave.wd-touch-leave { display: none; }
.wd-direction, .wd-interact {
  background: #28362be5;
  border: 1px solid #e1d0ac7c;
  border-radius: 2px;
  color: #eee5cd;
  cursor: pointer;
  min-height: 33px;
  pointer-events: auto;
}
.wd-direction {
  color: #eee3c2;
  line-height: 1;
  min-width: 33px;
  touch-action: none;
}
.wd-direction:hover, .wd-interact:hover { background: #3c4b3a; }
.wd-direction:active { background: #887856; }
.wd-hint, .wd-prompt {
  background: #2d342bcf;
  border: 1px solid #e1d0ac43;
  color: #eee2c5;
  font-size: 10px;
  letter-spacing: 0.07em;
  line-height: 1.2;
  padding: 9px 8px;
  white-space: nowrap;
}
.wd-prompt { margin-left: auto; }
.wd-prompt:empty { visibility: hidden; }
.wd-interact {
  align-items: center;
  display: flex;
  font-size: 10px !important;
  gap: 7px;
  justify-content: center;
  letter-spacing: .06em;
  padding: 4px 9px;
}
.wd-interact-key {
  border: 1px solid #e1d0ac69;
  border-radius: 2px;
  color: #dcc9a2;
  min-width: 15px;
  text-align: center;
}
.wd-interact:disabled { cursor: default; opacity: 0.65; }
.wd-interact:disabled:hover { background: #28362be5; }
.wd-scene[data-level="hold"] .wd-compass { visibility: hidden; }
@container (max-width: 580px) {
  .wd-header { inset: 10px 10px auto; }
  .wd-footer { inset: auto 10px 10px; gap: 5px; }
  .wd-hint { display: none; }
  .wd-direction { min-width: 32px; }
  .wd-prompt { font-size: 9px; padding-inline: 5px; }
}
@media (max-width: 600px), (orientation: landscape) and (max-width: 1024px) and (max-height: 540px), (any-pointer: coarse) {
  .wd-scene {
    --wd-pad: clamp(89px,26vw,108px);
    --wd-touch-left: max(9px,env(safe-area-inset-left));
    --wd-touch-right: max(9px,env(safe-area-inset-right));
    -webkit-touch-callout: none;
    user-select: none;
  }
  .wd-header { inset: 8px var(--wd-touch-right) auto var(--wd-touch-left); }
  .wd-location {
    gap: 6px;
    min-height: 42px;
    padding: 6px 7px 6px 6px;
  }
  .wd-location-mark { height: 25px; width: 25px; }
  .wd-location-copy strong { font-size: 11px; }
  .wd-scene .wd-ruler-button { min-height: 44px; }
  .wd-header .wd-leave, .wd-compass, .wd-controls, .wd-hint, .wd-interact-key { display: none; }
  .wd-footer {
    align-items: end;
    gap: 8px;
    inset: auto var(--wd-touch-right) 8px var(--wd-touch-left);
  }
  .wd-actions { align-items: stretch; flex-direction: column; gap: 4px; }
  .wd-interact, .wd-leave.wd-touch-leave {
    border-radius: 5px;
    font-size: 12px !important;
    margin: 0;
    min-height: 44px;
    min-width: 76px;
    padding: 7px 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .wd-leave.wd-touch-leave { display: block; }
  .wd-interact:not(:disabled) { background: #703e30f2; border-color: #d8b997; }
  .wd-prompt { margin: 0; max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
  .wd-prompt:empty { display: none; }
  .wd-touch-controls {
    display: grid;
    flex: none;
    gap: 3px;
    justify-items: center;
  }
  .wd-joystick {
    background: #29362dcc;
    border: 1px solid #e4cca887;
    border-radius: 50%;
    box-shadow: inset 0 0 0 5px #f0e0b60f, 0 3px 15px #26302965;
    height: var(--wd-pad);
    pointer-events: auto;
    position: relative;
    touch-action: none;
    width: var(--wd-pad);
    -webkit-tap-highlight-color: transparent;
  }
  .wd-stick-thumb {
    align-items: center;
    background: #d4be93ee;
    border: 1px solid #f1d8ad;
    border-radius: 50%;
    box-shadow: 0 3px 10px #1d231d64;
    display: flex;
    height: 36%;
    inset: 32% auto auto 32%;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    width: 36%;
    z-index: 1;
  }
  .wd-stick-thumb::after {
    border: 1px solid #624f37;
    content: "";
    height: 7px;
    transform: rotate(45deg);
    width: 7px;
  }
  .wd-stick-active { background: #3c4b3be6; border-color: #e8cfaa; }
  .wd-touch-direction {
    appearance: none;
    background: transparent;
    border: 0;
    color: #f2deba;
    font-size: 16px !important;
    height: 40px;
    line-height: 1;
    padding: 0;
    position: absolute;
    touch-action: none;
    width: 40px;
  }
  .wd-touch-direction[data-alignment="up"] { inset: -1px auto auto calc(50% - 20px); padding-bottom: 12px; }
  .wd-touch-direction[data-alignment="left"] { inset: calc(50% - 20px) auto auto -1px; padding-right: 10px; }
  .wd-touch-direction[data-alignment="right"] { inset: calc(50% - 20px) -1px auto auto; padding-left: 10px; }
  .wd-touch-direction[data-alignment="down"] { inset: auto auto -1px calc(50% - 20px); padding-top: 12px; }
  .wd-touch-label, .wd-touch-hint {
    color: #f1e6ca;
    font-size: 10px;
    letter-spacing: .08em;
    line-height: 1.2;
    padding: 3px 5px;
    text-shadow: 0 1px 4px #171b15;
    white-space: nowrap;
  }
  .wd-touch-hint {
    background: #253225bb;
    border: 1px solid #e3cdaa48;
    border-radius: 3px;
    display: block;
    margin: 0 0 5px auto;
    min-width: 0;
  }
  .wd-hotspot { min-height: 38px; min-width: 44px; touch-action: manipulation; }
  .deck-panel > .deck-world-actions {
    gap: 3px;
    max-width: min(calc(100% - 121px),420px);
    padding: 3px;
    right: max(8px,env(safe-area-inset-right));
    top: 8px;
  }
  .deck-panel > .deck-world-actions .btn { min-height: 44px; }
}
@media (max-width: 430px) {
  .deck-panel > .deck-world-actions .btn { font-size: 11px; padding-inline: 6px; }
  .deck-panel > .deck-world-actions .btn .ui-icon { display: none; }
}
@media (max-width: 370px) {
  .deck-panel > .deck-world-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (orientation: landscape) and (max-width: 1024px) and (max-height: 540px), (any-pointer: coarse) and (max-height: 490px) {
  .wd-scene { --wd-pad: 84px; }
  .wd-actions { align-items: center; flex-direction: row; }
  .wd-prompt { position: absolute; right: 0; bottom: 50px; }
}
.deck-panel > .wd-scene { min-height: inherit; }
.wd-hotspot[data-kind="ship"] {
  background: #426154df;
  border-color: #e1d8b99c;
}
.wd-hotspot[data-kind="ship"] .wd-hotspot-ring { background: #a7ac91; }
.wd-unavailable {
  background: #2f392ef0;
  border: 1px solid #ada485;
  left: 50%;
  line-height: 1.6;
  margin: 0;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}
