#threeWorld {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #dba84d;
}
#threeWorld canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}
.minimap {
  position: absolute;
  z-index: 9;
  right: 18px;
  bottom: 104px;
  width: 228px;
  padding: 8px;
  color: #fff4cf;
  background: #3d2419e8;
  border: 3px solid #8b512d;
  border-radius: 12px;
  box-shadow: 0 5px 0 #24130c99;
  pointer-events: none;
}
.minimap[hidden] {
  display: none;
}
.minimap > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3px 7px;
  font-size: 11px;
}
.minimap > div span {
  color: #dfbd83;
  font-size: 9px;
}
#minimapCanvas {
  position: static;
  display: block;
  width: 206px;
  height: 206px;
  background: #80a957;
  border: 2px solid #d2a866;
  border-radius: 7px;
}
.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;
}
.auth-consents {
  display: grid;
  gap: 8px;
  margin: 14px 0 4px;
}
.auth-consents[hidden] {
  display: none;
}
.auth-consents label {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px;
  background: #fff9e8;
  border: 1px solid #d4a66f;
  border-radius: 7px;
}
.auth-consents input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}
.auth-consents button {
  padding: 3px 6px;
  color: #754026;
  background: transparent;
  border: 1px solid #b47a4b;
  border-radius: 5px;
  cursor: pointer;
}
.policy-panel {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #24120ddd;
}
.policy-panel[hidden],
.policy-panel section[hidden] {
  display: none;
}
.policy-card {
  position: relative;
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  padding: 30px;
  overflow-y: auto;
  color: #402012;
  background: #fff4cf;
  border: 4px solid #713b22;
  border-radius: 16px;
}
.policy-card h2 {
  margin: 0 0 5px;
  font:
    700 30px Gaegu,
    sans-serif;
}
.policy-card h3 {
  margin: 20px 0 5px;
  color: #7d3b22;
  font-size: 14px;
}
.policy-card p {
  margin: 0;
  color: #65452f;
  font-size: 13px;
  line-height: 1.75;
}
.policy-close {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 7px 10px;
  color: #fff4cf;
  background: #774026;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
.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: 12px;
  right: 16px;
  left: 274px;
  width: auto;
  min-height: 38px;
  height: auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}
.world-topbar > * {
  pointer-events: auto;
}
.coordinates {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 0;
  padding: 6px 10px;
  border: 2px solid #b48551;
  border-radius: 8px;
  background: #fff9e9;
  font-size: 12px;
  height: 36px;
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}
.coordinates i {
  width: 1px;
  height: 14px;
  margin: 0 3px;
  background: #c49b68;
}
.coordinates strong {
  min-width: 28px;
  color: #9f3a1e;
  font-size: 14px;
}
.world-topbar .wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 6px 10px;
  border: 2px solid #b48551;
  border-radius: 8px;
  background: #fff9e9;
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}
.shop-wrap {
  position: relative;
  height: 36px;
  flex-shrink: 0;
}
.topbar-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(43, 23, 12, 0.45);
  padding: 2px 4px;
  border-radius: 9px;
  border: 1px solid rgba(180, 133, 81, 0.4);
  backdrop-filter: blur(4px);
}
.shop-button {
  height: 32px;
  padding: 0 10px;
  color: #fff4cf;
  background: #8b4a29;
  border: 1.5px solid #5d2b19;
  border-radius: 7px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 0 #4a2113;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.shop-button:hover {
  background: #9c5531;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #4a2113;
}
.shop-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #4a2113;
}
.shop-button.btn-farm {
  background: #366338;
  border-color: #234525;
  box-shadow: 0 2px 0 #1b361d;
}
.shop-button.btn-farm:hover {
  background: #417544;
}
.shop-button.btn-upgrade {
  background: #b45309;
  border-color: #78350f;
  box-shadow: 0 2px 0 #5a270a;
}
.shop-button.btn-upgrade:hover {
  background: #d97706;
}
.shop-button.btn-cosmetics {
  background: linear-gradient(135deg, #7c2d12 0%, #9a3412 100%);
  border-color: #ea580c;
  color: #fef08a;
  box-shadow: 0 2px 0 #571e0c, 0 0 6px rgba(234, 88, 12, 0.4);
}
.shop-button.btn-cosmetics:hover {
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
  box-shadow: 0 3px 0 #571e0c, 0 0 10px rgba(234, 88, 12, 0.6);
}
.shop-button.btn-util {
  background: #334155;
  border-color: #1e293b;
  box-shadow: 0 2px 0 #0f172a;
}
.shop-button.btn-util:hover {
  background: #475569;
}
.shop-button[hidden] {
  display: none !important;
}
#adminAnnouncementButton,
#adminGiveButton,
#adminEnvButton {
  background: #6d2c18;
  border-color: #4a1c0d;
}
.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;
}
.admin-give-dialog label {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  color: #62351f;
  font-weight: 900;
}
.admin-give-dialog input,
.admin-give-dialog select {
  width: 100%;
  padding: 11px;
  color: #4a2415;
  background: #fff9e8;
  border: 2px solid #a86a3d;
  border-radius: 8px;
  font: inherit;
}
.sign-dialog input {
  width: 100%;
  margin: 24px 0 14px;
  padding: 14px;
  color: #4a2415;
  background: #fff9e8;
  border: 2px solid #a86a3d;
  border-radius: 9px;
  font: inherit;
}
.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;
}
.home-dialog {
  width: min(460px, 100%);
  min-height: 0;
}
.bar.hunger i {
  width: 100%;
  background: linear-gradient(90deg, #b86831, #efbd55);
  transition: 0.3s;
}
.home-dialog form,
#homeOwnerControls {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.home-dialog input {
  width: 100%;
  padding: 12px;
  color: #402012;
  background: #fffdf2;
  border: 2px solid #b47a4b;
  border-radius: 8px;
  font: inherit;
}
.door-keypad {
  display: grid;
  gap: 12px;
  width: min(270px, 100%);
  margin: 18px auto;
}
.door-keypad[hidden] {
  display: none;
}
.door-keypad input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
}
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.keypad-grid button {
  min-height: 52px;
  color: #4b2515;
  background: #f2cf89;
  border: 2px solid #8b4a29;
  border-radius: 9px;
  box-shadow: 0 3px 0 #63321d;
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.keypad-grid button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #63321d;
}
.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);
}
.craft-dialog {
  width: min(920px, 100%);
}
.craft-workbench {
  display: grid;
  grid-template-columns: 170px 260px minmax(220px, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.craft-workbench h3 {
  margin: 0 0 10px;
  color: #64371f;
  font-size: 13px;
}
.craft-materials,
.craft-board,
.craft-recipes {
  padding: 12px;
  background: #efd097;
  border: 3px solid #86502d;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #ffe8b6;
}
.craft-material-list {
  display: grid;
  gap: 8px;
  min-height: 120px;
}
.craft-item {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 4px;
  background: #e4b96e;
  border: 2px solid #704020;
  border-radius: 6px;
  box-shadow:
    inset 2px 2px #9a5d32,
    inset -2px -2px #f3cb82;
  cursor: grab;
}
.craft-item:active {
  cursor: grabbing;
}
.craft-item img {
  width: 32px;
  height: 32px;
}
.craft-item span {
  font-size: 10px;
}
.craft-item b {
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px #4b2818;
}
.craft-grid {
  display: grid;
  grid-template-columns: repeat(4, 52px);
  gap: 4px;
  justify-content: center;
}
.craft-cell {
  width: 52px;
  height: 52px;
  background: #bd844b;
  border: 3px solid;
  border-color: #744321 #f8d99a #f8d99a #744321;
}
.craft-cell .craft-item {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.craft-cell .craft-item span {
  display: none;
}
.craft-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  margin: 12px 0 9px;
  color: #694028;
  background: #f8e6b9;
  border: 2px solid #9a6033;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}
.craft-result img {
  width: 32px;
  height: 32px;
}
.craft-recipe-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 7px;
  background: #f7dfab;
  border: 2px solid #9a6033;
  border-radius: 7px;
  color: #4b2918;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.craft-recipe-card > img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.craft-recipe-card:hover:not(:disabled) {
  background: #ffe9b8;
  border-color: #6d351f;
  transform: translateY(-1px);
}
.craft-recipe-card:disabled {
  opacity: 0.48;
  filter: grayscale(0.65);
  cursor: not-allowed;
}
.craft-recipe-card span {
  display: grid;
  gap: 5px;
}
.craft-recipe-card small {
  color: #825334;
  font-size: 11px;
}
.craft-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 20px);
  gap: 2px;
}
.craft-mini-grid i {
  width: 20px;
  height: 20px;
  background-color: #bd844b;
  background-position: center;
  background-size: 17px 17px;
  background-repeat: no-repeat;
  border: 1px solid #704020;
}
@media (max-width: 780px) {
  .craft-workbench {
    grid-template-columns: 1fr;
  }
  .craft-material-list {
    grid-template-columns: repeat(2, 1fr);
    min-height: 0;
  }
}
.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: 12px;
  left: 16px;
  width: 248px;
  box-sizing: border-box;
  padding: 10px 12px;
  color: #ffe9bb;
  background: linear-gradient(135deg, #5d2d1ee8, #351910e8);
  border: 3px solid #a96a38;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.profile-detail {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
#profileName {
  display: inline-block;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  color: #fff0c6;
  font: 700 17px Gaegu, sans-serif;
}
.profile-detail > small,
#farmerLevel {
  display: block;
  margin: 1px 0 5px;
  color: #e9c67e;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 135px;
}
.quest-list p {
  margin: 8px 2px;
  color: #80573e;
  font-size: 11px;
}
.quest-claim {
  width: 100%;
  padding: 7px;
  color: #fff4cf;
  background: #9a502b;
  border: 0;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}
.quest-claim:disabled {
  opacity: 0.48;
  cursor: default;
}
.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: 90px;
  height: 36px;
  padding: 0;
  margin: 0;
  transform: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  flex-shrink: 0;
}
.world-topbar .quest-card .ribbon,
.world-topbar .quest-card:not(.open) .ribbon {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 90px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
  color: #fff4cf;
  background: #8b4a29;
  border: 2px solid #5d2b19;
  border-radius: 8px;
  box-shadow: 0 2px 0 #5d2b19;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: normal;
  box-sizing: border-box;
}
.world-topbar .quest-card:not(.open) {
  transform: none;
}
.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;
}
.world-topbar .quest-list label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 2px;
  font-size: 13px;
}
.world-topbar .quest-list label span {
  min-width: 0;
  overflow-wrap: break-word;
}
.world-topbar .quest-list label b {
  white-space: nowrap;
}
.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;
}
.held-item-label {
  position: absolute;
  left: 50%;
  bottom: 86px;
  min-width: 120px;
  padding: 7px 14px;
  color: #fff4cf;
  background: #321c13e8;
  border: 2px solid #9b673d;
  border-radius: 7px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.held-item-label[hidden] {
  display: none;
}
.hud .tip {
  position: absolute;
  right: 24px;
  pointer-events: auto;
}
.hotbar button.selected {
  transform: translateY(-7px);
}
.hotbar button[hidden],
[data-place][hidden] {
  display: none;
}
.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;
}
.hotbar button.empty {
  opacity: 0.45;
  filter: grayscale(0.6);
}
.hotbar button.empty > span img {
  opacity: 0.55;
}
.game-stage .toast {
  position: fixed;
  bottom: 112px;
  z-index: 120;
}
body:has(.shop-panel.open) .game-stage .toast {
  bottom: 24px;
}
.tutorial {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #24150b99;
}
.tutorial[hidden] {
  display: none;
}
.tutorial-card {
  width: min(470px, 100%);
  padding: 28px;
  color: #4b2918;
  background: #fff4cf;
  border: 4px solid #7d4427;
  border-radius: 16px;
  box-shadow: 0 9px 0 #482515;
  text-align: center;
}
.tutorial-card > small {
  color: #9d5b32;
  font-weight: 900;
}
.tutorial-card h2 {
  margin: 10px 0 12px;
  font-size: 26px;
}
.tutorial-card p {
  min-height: 54px;
  margin: 0;
  line-height: 1.7;
  word-break: keep-all;
}
.tutorial-keys {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.tutorial-keys[hidden] {
  display: none;
}
.tutorial-keys kbd {
  min-width: 38px;
  padding: 8px;
  color: #fff4cf;
  background: #754027;
  border: 2px solid #492315;
  border-radius: 7px;
  box-shadow: 0 3px 0 #35180f;
  font: 900 14px "Noto Sans KR", sans-serif;
}
.tutorial-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.tutorial-actions button {
  padding: 10px 18px;
  border: 2px solid #67331e;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
#tutorialSkip {
  color: #6d4a38;
  background: #ead9b3;
}
#tutorialNext {
  color: #fff5d4;
  background: #9b522d;
}
.fishing-game {
  position: fixed;
  z-index: 310;
  inset: 0;
  display: grid;
  place-items: center;
  background: #1c140b99;
}
.fishing-game[hidden] {
  display: none;
}
.fishing-card {
  width: min(430px, calc(100vw - 32px));
  padding: 24px;
  color: #4b2918;
  background: #f4d79c;
  border: 4px solid #704020;
  border-radius: 12px;
  box-shadow: 0 8px 0 #3c2114;
  text-align: center;
}
.fishing-card > img {
  width: 56px;
  height: 56px;
}
.fishing-card h2 {
  margin: 4px 0;
}
.fishing-card p {
  margin: 8px 0 20px;
}
.fishing-meter {
  position: relative;
  height: 32px;
  margin-bottom: 18px;
  overflow: hidden;
  background: #6b8da0;
  border: 3px solid #4b2d1c;
  border-radius: 6px;
}
.fishing-meter i {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #7da449;
}
.fishing-meter b {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 5px;
  background: #f2e0ae;
  border: 1px solid #4b2d1c;
}
.fishing-card button {
  padding: 9px 16px;
  border: 2px solid #5d321f;
  border-radius: 7px;
  background: #96502d;
  color: #fff4cf;
  font-weight: 900;
  cursor: pointer;
}
#fishingCancel {
  margin-left: 6px;
  background: #725d48;
}
@media (max-width: 650px) {
  .minimap {
    right: 8px;
    bottom: 92px;
    transform: scale(0.76);
    transform-origin: bottom right;
  }
  .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: 6px;
    right: 6px;
    left: 210px;
    gap: 4px;
  }
  .coordinates {
    padding: 4px 6px;
    font-size: 11px;
    height: 30px;
  }
  .world-topbar .wallet {
    padding: 4px 6px;
    font-size: 11px;
    height: 30px;
  }
  .world-topbar .shop-button {
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }
  .world-topbar .quest-card,
  .world-topbar .quest-card .ribbon,
  .world-topbar .quest-card:not(.open) .ribbon {
    min-width: 75px;
    height: 30px;
    min-height: 30px;
    font-size: 11px;
    padding: 0 7px;
  }
  .hud {
    bottom: 8px;
    height: 68px;
  }
  .hud .hotbar {
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 96vw;
  }
}
.admin-env-group h3 {
  margin: 0 0 10px 0;
  font-size: 19px;
  color: #5c2f1a;
  font-family: inherit;
}
.admin-env-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.admin-env-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 10px;
  background: #fdf5de;
  border: 2px solid #8d4f2c;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #4a2415;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 0 #8d4f2c;
  font-family: inherit;
}
.admin-env-btn:hover {
  background: #fdedc2;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #8d4f2c;
}
.admin-env-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #8d4f2c;
}
.nick-edit-btn {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(141, 79, 44, 0.4);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  line-height: 1;
  transition: all 0.2s ease;
}
.nick-edit-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #8d4f2c;
  transform: scale(1.15);
}

/* User Trading & Gifting Styles */
.trade-request-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fdf5de;
  border: 3px solid #8d4f2c;
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 10000;
  animation: tradeSlideDown 0.3s ease-out;
}
.trade-request-banner[hidden] {
  display: none !important;
}
@keyframes tradeSlideDown {
  from { top: -60px; opacity: 0; }
  to { top: 24px; opacity: 1; }
}
.trade-req-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #3f2010;
}
.trade-req-badge {
  background: #8d4f2c;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
}
.trade-req-buttons {
  display: flex;
  gap: 8px;
}
.trade-req-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
}
.trade-req-btn:hover {
  transform: translateY(-2px);
}
.trade-req-btn.accept {
  background: #4caf50;
  color: #fff;
}
.trade-req-btn.decline {
  background: #e74c3c;
  color: #fff;
}

.interact-dialog, .nearby-dialog, .gift-dialog {
  max-width: 380px;
  width: 90%;
}
.interact-subtitle {
  margin: 0 0 16px;
  font-size: 13px;
  color: #7b583f;
  text-align: center;
}
.interact-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.interact-btn {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
}
.interact-btn.gift-btn {
  background: #8d6b4f;
}
.interact-btn.team-btn {
  background: #2b7a4b;
}

.team-dialog {
  max-width: 420px;
  width: 90%;
}
.team-member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  background: #f4e8cb;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #d4c19d;
}
.team-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff8e7;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
}
.team-badge-tag {
  background: #2b7a4b;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}
.team-kick-btn {
  background: #bd3a3a;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.team-kick-btn:hover {
  background: #962828;
}

.nearby-player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 10px;
}
.nearby-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fdf7e7;
  border: 1.5px solid #c9a982;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.nearby-player-item:hover {
  background: #fff;
  transform: translateX(4px);
  border-color: #8d4f2c;
}
.nearby-player-name {
  font-weight: bold;
  color: #4a2415;
}
.nearby-player-dist {
  font-size: 12px;
  color: #888;
}

.gift-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gift-form label {
  font-size: 13px;
  font-weight: bold;
  color: #5d351e;
  margin-bottom: -4px;
}
.trade-select-input, .trade-number-input {
  background: #fff;
  border: 2px solid #8d4f2c;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
}
.gift-amount-group {
  display: flex;
  gap: 8px;
}
.gift-amount-group .trade-number-input {
  flex: 1;
}
.trade-aux-btn {
  background: #8d4f2c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.trade-aux-btn:hover {
  background: #a65e34;
}

/* 1:1 Trade Window */
.trade-window-dialog {
  max-width: 720px;
  width: 95%;
}
.trade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}
@media (max-width: 640px) {
  .trade-grid {
    grid-template-columns: 1fr;
  }
}
.trade-card {
  background: #fdf8eb;
  border: 2px solid #8d4f2c;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trade-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(141, 79, 44, 0.2);
  padding-bottom: 8px;
}
.trade-card-header strong {
  font-size: 15px;
  color: #4a2415;
}
.trade-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
}
.trade-badge.waiting {
  background: #e0d0b8;
  color: #634b35;
}
.trade-badge.ready {
  background: #4caf50;
  color: #fff;
}
.trade-gold-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trade-gold-box label {
  font-size: 12px;
  font-weight: bold;
  color: #6d4225;
}
.trade-gold-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trade-gold-input-row input {
  width: 100px;
  padding: 6px 10px;
}
.gold-unit {
  font-weight: bold;
  color: #e67e22;
}
.trade-gold-display {
  font-size: 18px;
  color: #b86500;
  background: #fff;
  border: 1.5px solid #d4b896;
  border-radius: 6px;
  padding: 6px 10px;
}
.trade-item-add-box label {
  font-size: 12px;
  font-weight: bold;
  color: #6d4225;
}
.trade-add-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.trade-add-row select {
  flex: 2;
  padding: 6px;
  font-size: 13px;
}
.trade-add-row input {
  flex: 1;
  padding: 6px;
  font-size: 13px;
}
.trade-offer-list {
  background: #fff;
  border: 1.5px solid #d4b896;
  border-radius: 8px;
  min-height: 120px;
  max-height: 140px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trade-empty-msg {
  font-size: 12px;
  color: #a8947f;
  text-align: center;
  margin-top: 45px;
}
.trade-item-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fbf3e0;
  border: 1px solid #d4b58c;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
}
.trade-item-tag-info {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trade-item-tag img {
  width: 20px;
  height: 20px;
}
.trade-item-tag .remove-btn {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  padding: 0 4px;
}
.trade-item-tag .remove-btn:hover {
  transform: scale(1.2);
}
.trade-ready-btn {
  margin-top: 8px;
  background: #8d4f2c;
  color: #fff;
}
.trade-ready-btn.active {
  background: #4caf50 !important;
}
.trade-confirm-btn {
  margin-top: 8px;
  background: #e67e22;
  color: #fff;
}
.trade-confirm-btn:disabled {
  background: #cbb49c;
  cursor: not-allowed;
  opacity: 0.6;
}
.trade-confirm-btn.confirmed {
  background: #27ae60 !important;
}

/* Tool Upgrade Dialog Styles */
.upgrade-dialog {
  max-width: 440px;
  width: 90%;
}
.upgrade-status-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #fdf7e7;
  border: 2px solid #c9a982;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.upgrade-stage-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1.5px solid #d4c19d;
  border-radius: 8px;
  padding: 8px 16px;
  min-width: 90px;
}
.upgrade-stage-box.next {
  border-color: #2b7a4b;
  background: #eaf8ee;
}
.upgrade-stage-label {
  font-size: 11px;
  color: #7b583f;
  margin-bottom: 2px;
}
.upgrade-stage-box strong {
  font-size: 18px;
  color: #402012;
}
.upgrade-stage-box.next strong {
  color: #1b5e34;
}
.upgrade-arrow {
  font-size: 20px;
  font-weight: bold;
  color: #8d4f2c;
}
.upgrade-req-section, .upgrade-perks-section {
  margin-bottom: 16px;
}
.upgrade-req-section h3, .upgrade-perks-section h3 {
  font-size: 14px;
  color: #402012;
  margin: 0 0 8px 0;
}
.upgrade-req-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f4e8cb;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #d4c19d;
}
.upgrade-req-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  border: 1.5px solid transparent;
}
.upgrade-req-row.ok {
  border-color: #73b889;
  background: #f3fcf5;
}
.upgrade-req-row.missing {
  border-color: #e28e8e;
  background: #fdf2f2;
}
.upgrade-req-row.rate {
  border-color: #d4a343;
  background: #fdf9ea;
}
.upgrade-req-row.rate .upgrade-req-val {
  color: #9c6204;
  font-weight: bold;
  font-size: 14px;
}
.upgrade-req-name {
  font-weight: bold;
  color: #4a2415;
}
.upgrade-req-val {
  font-weight: 500;
}
.upgrade-req-row.ok .upgrade-req-val {
  color: #1f7a3f;
}
.upgrade-req-row.missing .upgrade-req-val {
  color: #c53030;
}
.upgrade-perks-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #634027;
  line-height: 1.6;
}
.upgrade-action-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
}
.upgrade-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

#shaderToggleBtn {
  transition: all 0.2s ease;
}
#shaderToggleBtn.low-spec {
  background: #3e6e4a;
  color: #fff;
  border-color: #294d32;
  font-weight: bold;
}
#shaderToggleBtn.low-spec:hover {
  background: #4c875b;
}

/* Cosmetics Modal Styles - Premium Wardrobe Design */
.cosmetics-dialog {
  max-width: 840px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fdf8ee;
  border: 4px solid #6b3e21;
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55);
  padding: 20px 22px;
}
.cosmetics-dialog-header {
  margin-bottom: 12px;
}
.cosmetics-dialog-header h2 {
  margin: 0 0 4px 0;
  font-family: Gaegu, sans-serif;
  font-size: 28px;
  color: #3f1f10;
}
.cosmetics-body-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 680px) {
  .cosmetics-body-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* Left Showroom Panel */
.cosmetics-showroom-panel {
  display: flex;
  flex-direction: column;
  background: #f7ede0;
  border: 2px solid #ceb396;
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}
.showroom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.showroom-header span {
  font-size: 13px;
  font-weight: 800;
  color: #522d19;
}
.showroom-reset-btn {
  background: #dfc3a7;
  border: 1px solid #aa8769;
  border-radius: 5px;
  font-size: 11px;
  color: #4a2817;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.showroom-reset-btn:hover {
  background: #d4b191;
}
.showroom-canvas-wrap {
  position: relative;
  width: 100%;
  height: 250px;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #faecd9 65%, #edd4b6 100%);
  border: 2px solid #bda083;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.08);
}
#cosmeticsPreviewCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#cosmeticsPreviewCanvas:active {
  cursor: grabbing;
}
.showroom-hint {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: #8c6a51;
  pointer-events: none;
  font-weight: 600;
}
.showroom-equipped-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding: 8px;
  background: #fdfaf5;
  border: 1px solid #dfcfbc;
  border-radius: 8px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.summary-row small {
  color: #8a664e;
  font-weight: 700;
}
.summary-row b {
  color: #2b170c;
  font-weight: 800;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Catalog Panel */
.cosmetics-catalog-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.cosmetics-gold-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #2b170c 0%, #442413 100%);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1.5px solid #82502c;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.cosmetics-gold-bar .gold-label {
  font-size: 12px;
  color: #fbd38d;
  font-weight: 700;
}
.cosmetics-gold-bar strong {
  font-size: 17px;
  color: #fef08a;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.cosmetics-tab-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.cosmetics-tab-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1.5px solid #7c4826;
  background: #edd8bf;
  color: #4a2711;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 0 #6e3d1c;
}
.cosmetics-tab-btn.active {
  background: #7c4826;
  color: #fff;
  border-color: #552d13;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
  transform: translateY(1px);
}
.cosmetics-tab-btn:hover:not(.active) {
  background: #f7e6d0;
}
.cosmetics-item-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 44vh;
  padding-right: 6px;
}
.cosmetics-item-grid::-webkit-scrollbar {
  width: 6px;
}
.cosmetics-item-grid::-webkit-scrollbar-thumb {
  background: #c9ab8d;
  border-radius: 3px;
}

/* Item Card */
.cosmetic-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fffdfa;
  border: 2px solid #e2cbaf;
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.15s ease;
  gap: 10px;
}
.cosmetic-card:hover {
  border-color: #b58d68;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}
.cosmetic-card.equipped {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px #10b981;
}
.cosmetic-card.previewing {
  outline: 2px dashed #f59e0b;
}

/* Grade Borders & Glow */
.cosmetic-card.grade-legendary {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}
.cosmetic-card.grade-mythic {
  border-color: #ef4444;
  background: #fff5f5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
  animation: mythicPulse 2.8s infinite ease-in-out;
}
@keyframes mythicPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
}

.cosmetic-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f3e5d3;
  border: 1.5px solid #d4b898;
  flex-shrink: 0;
}
.cosmetic-swatch-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.cosmetic-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.cosmetic-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cosmetic-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #2b170c;
}
.cosmetic-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}
.cosmetic-badge.grade-basic { background: #94a3b8; }
.cosmetic-badge.grade-advanced { background: #2563eb; }
.cosmetic-badge.grade-rare { background: #059669; }
.cosmetic-badge.grade-hero { background: #9333ea; }
.cosmetic-badge.grade-legendary { background: linear-gradient(135deg, #d97706, #f59e0b); }
.cosmetic-badge.grade-mythic { background: linear-gradient(135deg, #dc2626, #b91c1c); }

.cosmetic-card-desc {
  font-size: 11px;
  color: #6a4934;
  line-height: 1.35;
}

.cosmetic-card-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 130px;
  flex-shrink: 0;
}
.cosmetic-price-tag {
  font-size: 12.5px;
  font-weight: 900;
  color: #b45309;
}
.cosmetic-btn-group {
  display: flex;
  gap: 4px;
  width: 100%;
}
.cosmetic-btn {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-align: center;
  box-sizing: border-box;
}
.cosmetic-btn.btn-try {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
  white-space: nowrap;
}
.cosmetic-btn.btn-try:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.cosmetic-btn.btn-buy {
  flex: 1;
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  color: #422006;
  border-color: #ca8a04;
  box-shadow: 0 1.5px 0 #a16207;
}
.cosmetic-btn.btn-buy:hover {
  background: linear-gradient(180deg, #fde047 0%, #facc15 100%);
}
.cosmetic-btn.btn-buy:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  border-color: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}
.cosmetic-btn.btn-equip {
  flex: 1;
  background: #3b82f6;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 1.5px 0 #1d4ed8;
}
.cosmetic-btn.btn-equip:hover {
  background: #60a5fa;
}
.cosmetic-btn.btn-equipped {
  flex: 1;
  background: #10b981;
  color: #fff;
  border-color: #059669;
  cursor: default;
}


