#threeWorld {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #dba84d;
}
#threeWorld canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}
.auth-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d79b45, #704326);
}
.auth-screen.hidden {
  display: none;
}
.auth-card {
  width: min(390px, calc(100vw - 32px));
  padding: 30px;
  background: #fff4cf;
  border: 4px solid #713b22;
  border-radius: 18px;
  box-shadow: 0 12px 0 #402014;
}
.auth-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: auto;
  color: #fff4cf;
  background: #8a452d;
  border-radius: 45%;
  font:
    700 34px Gaegu,
    sans-serif;
}
.auth-card h1,
.auth-card > p {
  text-align: center;
}
.auth-card h1 {
  margin: 12px 0 4px;
  font:
    700 34px Gaegu,
    sans-serif;
}
.auth-card > p {
  margin: 0 0 18px;
  color: #82593e;
  font-size: 12px;
}
.auth-card label {
  display: block;
  margin: 12px 0;
  font-size: 12px;
  font-weight: 800;
}
.auth-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 2px solid #b47a4b;
  border-radius: 8px;
  background: #fffdf2;
  font: inherit;
}
.auth-submit,
.auth-switch {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}
.auth-submit {
  color: white;
  background: #a9512c;
  box-shadow: 0 4px #652c1a;
}
.auth-switch {
  margin-top: 12px;
  color: #7a4328;
  background: transparent;
}
.auth-card .auth-error {
  min-height: 18px;
  margin: 4px 0 8px;
  color: #b23b29;
}
.logout-button {
  margin-left: 7px;
  padding: 5px 7px;
  color: #ffe9bb;
  border: 1px solid #b87b50;
  border-radius: 6px;
  background: #32170f;
  font-size: 9px;
  cursor: pointer;
}
.game-stage::after {
  z-index: 2;
}
.quest-card {
  width: 250px;
  padding: 40px 14px 10px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.quest-card:not(.open) {
  transform: translateX(calc(-100% + 78px));
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.quest-card:not(.open) .quest-list {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.quest-card .quest-list {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.quest-card .ribbon {
  width: auto;
  cursor: pointer;
  font-family: Gaegu, sans-serif;
}
.quest-card:not(.open) .ribbon {
  left: auto;
  right: -3px;
  width: 78px;
  min-height: 92px;
  padding: 10px 8px;
  line-height: 1.15;
}
.game-shell {
  grid-template-rows: 1fr;
  position: relative;
}
.world-topbar {
  position: absolute;
  z-index: 10;
  top: 14px;
  right: 18px;
  width: auto;
  height: 44px;
  padding: 0;
  justify-content: flex-end;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.coordinates {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 0;
  padding: 8px 14px;
  border: 2px solid #b48551;
  border-radius: 10px;
  background: #fff9e9;
  font-size: 12px;
}
.coordinates i {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: #c49b68;
}
.coordinates strong {
  min-width: 34px;
  color: #9f3a1e;
  font-size: 15px;
}
.shop-wrap {
  position: relative;
  height: 42px;
}
.shop-button {
  height: 42px;
  padding: 0 18px;
  color: #fff4cf;
  background: #8b4a29;
  border: 2px solid #5d2b19;
  border-radius: 9px;
  font-weight: 900;
  cursor: pointer;
}
.announcement-banner {
  position: absolute;
  z-index: 12;
  top: 18px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(620px, calc(100vw - 40px));
  padding: 11px 18px;
  color: #4b2515;
  background: #fff0bd;
  border: 3px solid #9b542d;
  border-radius: 10px;
  box-shadow: 0 5px 0 #5a2d1a;
  transform: translateX(-50%);
}
.announcement-banner[hidden] {
  display: none;
}
.announcement-banner strong {
  flex: none;
  color: #a64024;
}
.announcement-dialog textarea {
  width: 100%;
  min-height: 150px;
  margin: 22px 0 14px;
  padding: 14px;
  color: #4a2415;
  background: #fff9e8;
  border: 2px solid #a86a3d;
  border-radius: 9px;
  font: inherit;
  resize: vertical;
}
.announcement-submit {
  width: 100%;
  padding: 12px;
  color: #fff4cf;
  background: #8b4a29;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
.shop-panel {
  display: none;
  position: fixed;
  z-index: 90;
  inset: 0;
  place-items: center;
  width: 100vw;
  height: 100vh;
  padding: 24px;
  background: #24120dcc;
  backdrop-filter: none;
}
.shop-panel.open {
  display: grid;
}
.shop-dialog {
  position: relative;
  width: min(620px, 100%);
  min-height: 360px;
  padding: 30px;
  background: #fff4cf;
  border: 4px solid #713b22;
  border-radius: 18px;
  box-shadow: 0 10px 0 #3f1c10;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.shop-dialog h2 {
  margin: 0;
  font:
    700 34px Gaegu,
    sans-serif;
}
.shop-dialog > p {
  margin: 4px 0 24px;
  color: #80573e;
  font-size: 13px;
}
.shop-close {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 8px 12px;
  color: #fff4cf;
  background: #774026;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
.shop-items {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.shop-items h3 {
  margin: 18px 0 2px;
  padding-bottom: 7px;
  color: #744027;
  border-bottom: 2px solid #c69258;
  font-size: 14px;
}
.shop-items button span {
  flex: 1;
  text-align: left;
}
.item-icon {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-right: 14px;
  image-rendering: auto;
}
.shop-items button strong,
.shop-items button small {
  display: block;
}
.shop-items button small {
  margin-top: 5px;
  color: #7b5943;
}
.shop-items button b {
  font-size: 16px;
}
@media (max-width: 560px) {
  .shop-items {
    grid-template-columns: 1fr;
  }
  .shop-dialog {
    min-height: 0;
  }
}
.shop-panel button[data-buy],
.shop-panel button[data-sell],
.shop-panel button[data-craft] {
  min-height: 78px;
  align-items: center;
}
.shop-panel button[data-buy],
.shop-panel button[data-sell],
.shop-panel button[data-craft] {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 7px;
  padding: 10px;
  color: #4a2415;
  background: #f1cf88;
  border: 1px solid #a86a3d;
  border-radius: 7px;
  cursor: pointer;
}
.shop-panel button b {
  color: #9f3a1e;
}
.shop-panel button.shop-highlight {
  outline: 4px solid #e47a2f;
  background: #ffe0a0;
  transform: scale(1.015);
}
.chest-transfer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}
.chest-dialog {
  background: #f8e4af;
  border-color: #6c371d;
  box-shadow:
    0 10px 0 #3f1c10,
    inset 0 0 0 3px #d69b52;
}
.chest-zone {
  padding: 10px;
  background: #efd097;
  border: 3px solid #86502d;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #ffe8b6;
  transition: background 0.15s;
}
.chest-zone h3 {
  margin: 0 0 9px;
  color: #5d301b;
  font-size: 13px;
}
.chest-zone.drag-over {
  background: #f6df91;
  box-shadow:
    inset 0 0 0 2px #fff1b8,
    0 0 0 3px #d67e2d;
}
.chest-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}
.chest-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  background: #c99150;
  border: 2px solid #704020;
  border-radius: 6px;
  box-shadow:
    inset 2px 2px #9a5d32,
    inset -2px -2px #f3cb82;
}
.chest-slot.filled {
  background: #e4b96e;
  cursor: grab;
}
.chest-slot.filled:active {
  cursor: grabbing;
}
.chest-slot.dragging {
  opacity: 0.35;
}
.chest-slot img {
  width: 32px;
  height: 32px;
  image-rendering: auto;
}
.chest-slot strong {
  display: none;
}
.chest-slot > b {
  position: absolute;
  right: 3px;
  bottom: 1px;
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px #111;
}
@media (max-width: 620px) {
  .chest-transfer {
    grid-template-columns: 1fr;
  }
  .chest-grid {
    grid-template-columns: repeat(5, minmax(34px, 1fr));
  }
}
.profile-overlay {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 20px;
  width: 230px;
  padding: 10px 12px;
  color: #ffe9bb;
  background: linear-gradient(135deg, #5d2d1ee8, #351910e8);
  border: 3px solid #a96a38;
  border-radius: 14px;
  box-shadow: none;
}
.profile-detail {
  flex: 1;
}
.profile-detail > strong {
  display: block;
  margin: 0 3px 5px;
  color: #fff0c6;
  font:
    700 17px Gaegu,
    sans-serif;
}
.profile-overlay .mini-avatar {
  width: 54px;
  height: 54px;
  flex: none;
  font-size: 18px;
  box-shadow: none;
}
.profile-overlay .bars {
  display: block;
}
.world-topbar .quest-card {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  min-width: 120px;
  height: 42px;
  padding: 0;
  margin: 0;
  transform: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.world-topbar .quest-card .ribbon {
  position: relative;
  inset: auto;
  display: block;
  width: 120px;
  min-height: 42px;
  padding: 7px 12px;
  white-space: nowrap;
  color: #fff4cf;
  background: #8b4a29;
  border: 2px solid #5d2b19;
  border-radius: 9px;
  box-shadow: none;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 13px;
  font-weight: 900;
}
.world-topbar .quest-card:not(.open) {
  transform: none;
}
.world-topbar .quest-card:not(.open) .ribbon {
  inset: auto;
  width: 120px;
  min-height: 42px;
  padding: 7px 12px;
  line-height: normal;
}
.world-topbar .quest-list {
  position: absolute;
  top: 50px;
  right: 0;
  width: 250px;
  padding: 12px;
  background: linear-gradient(120deg, #fff9df, #f7e4b2);
  border: 3px solid #7d4427;
  border-radius: 10px;
  box-shadow:
    0 5px 0 #4d2618,
    0 10px 20px #36180c55;
}
.hud {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}
.hud .hotbar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  pointer-events: auto;
}
.hud .tip {
  position: absolute;
  right: 24px;
  pointer-events: auto;
}
.hotbar button.selected {
  transform: translateY(-7px);
}
.hotbar button {
  display: grid;
  grid-template-rows: 1fr 18px;
  align-items: center;
  justify-items: center;
  padding: 7px 5px 5px;
  overflow: visible;
}
.hotbar button > span {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 34px;
  line-height: 1;
}
.hotbar button > span img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: auto;
}
.hotbar button > small {
  display: block;
  width: 100%;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}
.hotbar button > em {
  top: 3px;
  right: 3px;
  bottom: auto;
  min-width: 18px;
  text-align: center;
  z-index: 2;
}
.hotbar button > em[hidden] {
  display: none;
}
.hotbar button > kbd {
  z-index: 2;
}
.hotbar button.locked {
  background: linear-gradient(#393532, #181615);
  border-color: #100f0e;
  color: #9b9690;
  filter: grayscale(1);
}
.hotbar button.locked > span,
.hotbar button.locked > small {
  color: #8c8782;
}
.hotbar button.locked > em {
  color: #bdb8b1;
  background: #050505;
}
.hotbar button.locked.selected {
  outline-color: #333;
  border-color: #111;
}
.game-stage .toast {
  bottom: 112px;
  z-index: 7;
}
@media (max-width: 650px) {
  .game-stage .toast {
    bottom: 98px;
    max-width: calc(100vw - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 650px) {
  .profile-overlay {
    display: flex !important;
    transform: scale(0.82);
    transform-origin: top left;
  }
  .world-topbar {
    top: 8px;
    right: 8px;
  }
  .coordinates {
    padding: 6px 9px;
  }
  .hud {
    bottom: 10px;
    height: 72px;
  }
  .hud .hotbar {
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
  }
}
