/* v4 - PC宽屏适配最终版 */
:root {
  --bg-0: #161a0f;
  --bg-1: #1d2215;
  --bg-2: #242b1a;
  --bg-3: #2d3522;
  --bg-sidebar: #191d11;
  --bg-topbar: #1d2215;
  --border-0: #323924;
  --border-1: #444d32;
  --border-2: #5c6644;
  --border-glow-rust: rgba(196, 90, 58, 0.35);
  --border-glow-mustard: rgba(212, 168, 74, 0.3);
  --text-0: #ece8d6;
  --text-1: #c8c4b0;
  --text-2: #989884;
  --text-3: #6a6a58;
  --accent-rust: #c45a3a;
  --accent-rust-dim: #8a3e26;
  --accent-rust-glow: rgba(196, 90, 58, 0.25);
  --accent-mustard: #d4a84a;
  --accent-mustard-dim: #9a7a30;
  --accent-green: #6a8a4a;
  --accent-green-dim: #4a6a30;
  --accent-green-light: #8ab060;
  --danger: #d65545;
  --success: #5a9a55;
  --warn: #d4a84a;
  --mono: 'JetBrains Mono', 'Consolas', monospace;
  --sans: 'Noto Sans SC', 'Inter', -apple-system, sans-serif;
  --stencil: 'Impact', 'Arial Black', sans-serif;
  --scanline-color: rgba(0, 0, 0, 0.08);
  --noise-opacity: 0.04;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
::selection {
  background: rgba(212, 168, 74, 0.35);
  color: var(--text-0);
}
::-moz-selection {
  background: rgba(212, 168, 74, 0.35);
  color: var(--text-0);
}
html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#root { height: 100%; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track {
  background: var(--bg-1);
  border-left: 1px solid var(--border-0);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-green-dim), var(--accent-green));
  border-radius: 3px;
  opacity: 0.6;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-green), var(--accent-mustard-dim));
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(106, 138, 74, 0.08), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(196, 90, 58, 0.06), transparent 50%),
    linear-gradient(180deg, #1a1e12 0%, #14180d 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100vh;
  position: relative;
  z-index: 2;
}
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 2px 0 20px rgba(0,0,0,0.2);
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(106, 138, 74, 0.3) 20%,
    rgba(196, 90, 58, 0.3) 50%,
    rgba(106, 138, 74, 0.3) 80%,
    transparent 100%
  );
}
.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border-0);
  position: relative;
  background: linear-gradient(180deg, rgba(196, 90, 58, 0.06), transparent);
}
.sidebar-header::after {
  content: '';
  position: absolute;
  left: 20px; right: 20px; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-rust), var(--accent-mustard), transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-rust), #8a3a20);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--stencil);
  font-weight: 900;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0;
  position: relative;
  box-shadow:
    0 2px 8px rgba(196, 90, 58, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 1px;
}
.brand-mark::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 8px;
  border-top: 2px solid rgba(255,255,255,0.4);
  border-right: 2px solid rgba(255,255,255,0.4);
}
.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-0);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.brand-text p {
  font-size: 10px;
  color: var(--text-2);
  font-family: var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.sidebar-section-title {
  padding: 18px 20px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--mono);
  position: relative;
}
.sidebar-section-title::before {
  content: '';
  position: absolute;
  left: 8px; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-rust);
  box-shadow: 0 0 4px var(--accent-rust);
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 2px 10px 16px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-1);
  font-size: 13px;
  user-select: none;
  position: relative;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: var(--bg-2);
  color: var(--text-0);
  border-color: var(--border-0);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(196, 90, 58, 0.15), rgba(196, 90, 58, 0.02));
  color: var(--accent-mustard);
  font-weight: 500;
  border-color: var(--accent-rust-dim);
  box-shadow:
    0 0 12px rgba(196, 90, 58, 0.08),
    inset 0 0 20px rgba(196, 90, 58, 0.04);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 20%;
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, var(--accent-rust), var(--accent-mustard));
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 6px var(--accent-rust);
}
.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.8;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.nav-icon svg[fill="currentColor"] { stroke: none; }
.nav-label {
  flex: 1;
  position: relative;
}
.nav-item.active .nav-label::after {
  content: '▶';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: var(--accent-rust);
  opacity: 0.7;
}
.nav-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-0);
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--border-0);
  font-weight: 500;
}
.nav-item.active .nav-count {
  color: var(--accent-mustard);
  border-color: var(--accent-mustard-dim);
  background: rgba(212, 168, 74, 0.08);
}
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-0);
  font-size: 10px;
  color: var(--text-3);
  font-family: var(--mono);
  line-height: 1.6;
  background: linear-gradient(0deg, rgba(0,0,0,0.2), transparent);
}
.sidebar-footer .ver {
  color: var(--accent-green);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(106, 138, 74, 0.3);
}
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  position: relative;
  min-height: 0;
}
.main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  opacity: 0.4;
}
.main::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(90, 110, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 110, 60, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, black, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, black, transparent 90%);
}
.topbar {
  padding: 14px 28px;
  border-bottom: 1px solid var(--border-0);
  background:
    linear-gradient(180deg, var(--bg-topbar) 0%, rgba(29, 34, 21, 0.95) 100%);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  box-shadow:
    0 2px 20px rgba(0,0,0,0.3),
    inset 0 -1px 0 rgba(106, 138, 74, 0.1);
}
.topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(106, 138, 74, 0.4) 20%,
    rgba(196, 90, 58, 0.4) 50%,
    rgba(106, 138, 74, 0.4) 80%,
    transparent 100%
  );
}
.search-wrap {
  flex: 1;
  max-width: 560px;
  position: relative;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
  z-index: 1;
}
.search-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 42px;
  background: var(--bg-0);
  border: 1px solid var(--border-1);
  border-radius: 3px;
  color: var(--text-0);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.3),
    0 0 0 0 var(--border-glow-rust);
}
.search-input:focus {
  border-color: var(--accent-rust);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.3),
    0 0 0 3px rgba(196, 90, 58, 0.15),
    0 0 16px rgba(196, 90, 58, 0.15);
  background: var(--bg-1);
}
.search-input::placeholder { color: var(--text-3); }
.search-shortcut {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 2px;
  pointer-events: none;
}
.kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 2px;
  color: var(--text-2);
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.topbar-info {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}
.topbar-stat {
  text-align: right;
  position: relative;
  padding-left: 16px;
}
.topbar-stat + .topbar-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent, var(--border-0), transparent);
}
.topbar-stat .num {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-mustard);
  text-shadow: 0 0 10px rgba(212, 168, 74, 0.25);
  letter-spacing: 0.5px;
}
.topbar-stat .lbl {
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.lang-switcher {
  display: flex;
  align-items: center;
  padding: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 20px;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.2),
    0 1px 0 rgba(255,255,255,0.03);
}
.lang-btn {
  padding: 5px 14px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 16px;
  transition: all 0.2s ease;
  font-family: var(--sans);
  position: relative;
}
.lang-btn:hover {
  color: var(--text-0);
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--accent-rust), var(--accent-rust-dim));
  color: #fff;
  box-shadow:
    0 2px 8px rgba(196, 90, 58, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.lang-sep { display: none; }
.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 32px 48px;
  position: relative;
  z-index: 1;
}

/* ===== 卡片入场动画 ===== */
.item-grid > *,
.med-card-grid > *,
.craft-recipe-grid > *,
.map-grid > *,
.tip-grid > *,
.craftsman-levels > *,
.med-legend > * {
  animation: cardLoadIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.item-grid > *:nth-child(1) { animation-delay: 0.01s; }
.item-grid > *:nth-child(2) { animation-delay: 0.03s; }
.item-grid > *:nth-child(3) { animation-delay: 0.05s; }
.item-grid > *:nth-child(4) { animation-delay: 0.07s; }
.item-grid > *:nth-child(5) { animation-delay: 0.09s; }
.item-grid > *:nth-child(6) { animation-delay: 0.11s; }
.item-grid > *:nth-child(n+7) { animation-delay: 0.13s; }
.med-card-grid > *:nth-child(1) { animation-delay: 0.01s; }
.med-card-grid > *:nth-child(2) { animation-delay: 0.03s; }
.med-card-grid > *:nth-child(3) { animation-delay: 0.05s; }
.med-card-grid > *:nth-child(4) { animation-delay: 0.07s; }
.med-card-grid > *:nth-child(5) { animation-delay: 0.09s; }
.med-card-grid > *:nth-child(6) { animation-delay: 0.11s; }
.med-card-grid > *:nth-child(n+7) { animation-delay: 0.13s; }
.craft-recipe-grid > *:nth-child(1) { animation-delay: 0.01s; }
.craft-recipe-grid > *:nth-child(2) { animation-delay: 0.03s; }
.craft-recipe-grid > *:nth-child(3) { animation-delay: 0.05s; }
.craft-recipe-grid > *:nth-child(4) { animation-delay: 0.07s; }
.craft-recipe-grid > *:nth-child(n+5) { animation-delay: 0.09s; }
@keyframes cardLoadIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-0);
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-rust), var(--accent-mustard));
}
.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--border-1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-rust);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.page-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.page-icon svg[fill="currentColor"] { stroke: none; }
.page-title h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-0);
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.page-title .sub {
  font-size: 11px;
  color: var(--text-2);
  font-family: var(--mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}
.page-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.meta-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 3px;
  font-size: 12px;
  color: var(--text-1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.meta-chip .key {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.5px;
}
.meta-chip .val {
  color: var(--accent-mustard);
  font-family: var(--mono);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(212, 168, 74, 0.2);
}
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  height: auto;
  min-height: fit-content;
}
.item-card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 4px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.item-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 14px; height: 14px;
  border-left: 2px solid var(--accent-rust);
  border-top: 2px solid var(--accent-rust);
  transition: all 0.2s;
  z-index: 2;
  filter: drop-shadow(0 0 3px rgba(196, 90, 58, 0.5));
}
.item-card::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 14px; height: 14px;
  border-right: 2px solid var(--accent-rust-dim);
  border-bottom: 2px solid var(--accent-rust-dim);
  transition: all 0.2s;
  z-index: 2;
  opacity: 0.5;
}
.item-card:hover::before,
.item-card.expanded::before {
  border-color: var(--accent-mustard);
  filter: drop-shadow(0 0 5px rgba(212, 168, 74, 0.7));
}
.item-card:hover::after,
.item-card.expanded::after {
  border-color: var(--accent-mustard);
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(212, 168, 74, 0.5));
}
.item-card:hover {
  border-color: var(--accent-rust-dim);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  transform: translateY(-3px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.4),
    0 0 25px rgba(196, 90, 58, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.item-card .side-bar {
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  background: linear-gradient(180deg, var(--border-1), var(--border-0));
  transition: background 0.2s;
  border-radius: 0 2px 2px 0;
}
.item-card:hover .side-bar {
  background: linear-gradient(180deg, var(--accent-rust), var(--accent-mustard));
  box-shadow: 0 0 10px var(--accent-rust);
}
.item-card.expanded {
  border-color: var(--accent-rust);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  box-shadow:
    0 4px 16px rgba(0,0,0,0.3),
    0 0 28px rgba(196, 90, 58, 0.15);
}
.item-card.expanded .side-bar {
  background: linear-gradient(180deg, var(--accent-rust), var(--accent-mustard));
  box-shadow: 0 0 8px var(--accent-rust);
}
.item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-0);
  line-height: 1.4;
  flex: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.item-cat-tag-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(106, 138, 74, 0.1);
  border: 1px solid var(--accent-green-dim);
  color: var(--accent-green);
  font-weight: 500;
}
.item-id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-mustard);
  background: linear-gradient(135deg, #1a1e12, #242b1a);
  border: 1px solid var(--accent-mustard-dim);
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 700;
  box-shadow:
    0 1px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.06);
  letter-spacing: 0.5px;
  position: relative;
  text-shadow: 0 0 6px rgba(212, 168, 74, 0.3);
}
.item-id::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-mustard);
  border-radius: 2px 0 0 2px;
}
.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.item-cat {
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.item-cat .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 4px var(--accent-green);
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: linear-gradient(135deg, var(--bg-0), var(--bg-1));
  border: 1px solid var(--border-1);
  border-radius: 2px;
  color: var(--text-2);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--mono);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.copy-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.copy-btn svg[fill="currentColor"] { stroke: none; }
.copy-btn:hover {
  color: var(--accent-mustard);
  border-color: var(--accent-mustard-dim);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  box-shadow:
    0 1px 4px rgba(0,0,0,0.25),
    0 0 8px rgba(212, 168, 74, 0.1);
}
.copy-btn:active {
  transform: translateY(1px);
}
.copy-btn.copied {
  color: var(--success);
  border-color: var(--success);
  background: rgba(90, 154, 85, 0.1);
}
.copy-btn-sm {
  font-size: 10px;
  padding: 3px 7px;
}
.item-detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-0);
  display: none;
}
.item-card.expanded .item-detail {
  display: block;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 200px; }
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 12px;
}
.detail-row .k { color: var(--text-2); }
.detail-row .v {
  color: var(--text-0);
  font-family: var(--mono);
  font-weight: 500;
}
.give-command {
  margin-top: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--bg-0), #161b0c);
  border: 1px solid var(--accent-green-dim);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-green-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.3),
    0 0 10px rgba(106, 138, 74, 0.06);
}
.give-command .cmd { flex: 1; }
.empty-state {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-2);
}
.empty-state .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  opacity: 0.35;
}
.empty-state .empty-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.2;
}
.empty-state h3 {
  font-size: 16px;
  color: var(--text-1);
  margin-bottom: 6px;
}
.empty-state p { font-size: 13px; }
.data-section {
  margin-bottom: 36px;
}
.data-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-0);
  position: relative;
}
.data-section-title .bar {
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--accent-rust), var(--accent-mustard));
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(196, 90, 58, 0.4);
}
.data-section-title h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.data-section-title .en {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-left: auto;
}
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.map-card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 4px;
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.map-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.map-card.premium {
  border-color: var(--accent-mustard-dim);
  background: linear-gradient(180deg, rgba(212, 168, 74, 0.06), var(--bg-2));
}
.map-card .tier-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  color: var(--accent-green);
  border: 1px solid var(--accent-green-dim);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  z-index: 2;
}
.map-size-visual {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  margin: 8px 0 14px;
  height: 56px;
  position: relative;
}
.map-size-block {
  background: linear-gradient(135deg, var(--accent-green-dim), var(--accent-green));
  border: 1px solid var(--accent-green);
  border-radius: 2px;
  box-shadow:
    0 0 12px rgba(106, 138, 74, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}
.map-card:hover .map-size-block {
  box-shadow:
    0 0 20px rgba(106, 138, 74, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.map-card.premium .map-size-block {
  background: linear-gradient(135deg, var(--accent-mustard-dim), var(--accent-mustard));
  border-color: var(--accent-mustard);
  box-shadow:
    0 0 16px rgba(212, 168, 74, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.map-size-label {
  position: absolute;
  right: 4px;
  top: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.map-card.premium .tier-badge {
  color: var(--accent-mustard);
  border-color: var(--accent-mustard-dim);
  background: linear-gradient(135deg, rgba(212, 168, 74, 0.15), rgba(212, 168, 74, 0.05));
  box-shadow: 0 1px 6px rgba(212, 168, 74, 0.15);
}
.map-size {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-0);
  margin-bottom: 6px;
  letter-spacing: -1px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.map-perm {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
  font-weight: 500;
}
.map-desc {
  font-size: 12px;
  color: var(--text-1);
  line-height: 1.6;
}
.med-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.med-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: all 0.2s;
}
.med-legend-item:hover {
  border-color: var(--border-1);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.med-legend-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  border: 2px solid var(--border-0);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.med-legend-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.med-legend-icon svg[fill="currentColor"] { stroke: none; }
.med-legend-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 2px;
}
.med-legend-desc {
  font-size: 11px;
  color: var(--text-2);
}
.med-filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.med-filter-btn {
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 3px;
  color: var(--text-1);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--sans);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.med-filter-btn:hover {
  border-color: var(--border-2);
  color: var(--text-0);
  transform: translateY(-1px);
}
.med-filter-btn.active {
  background: linear-gradient(135deg, var(--accent-rust), var(--accent-rust-dim));
  border-color: var(--accent-rust);
  color: #fff;
  font-weight: 500;
  box-shadow:
    0 2px 8px rgba(196, 90, 58, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.med-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.med-card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 4px;
  padding: 16px 18px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.med-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.med-card.tier-high::before {
  background: linear-gradient(90deg, var(--accent-rust), var(--accent-mustard));
  box-shadow: 0 0 10px rgba(196, 90, 58, 0.4);
}
.med-card.tier-mid::before {
  background: linear-gradient(90deg, var(--accent-mustard), var(--accent-green));
  box-shadow: 0 0 10px rgba(212, 168, 74, 0.3);
}
.med-card.tier-low::before {
  background: linear-gradient(90deg, var(--accent-green-dim), var(--accent-green));
}
.med-card.tier-berry::before {
  background: linear-gradient(90deg, #9b59b6, #e74c3c);
}
.med-card.tier-special::before {
  background: linear-gradient(90deg, #3498db, #1abc9c);
}
.med-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.3),
    0 0 20px rgba(196, 90, 58, 0.05);
}
.med-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.med-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.med-card-id {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-mustard);
  flex-shrink: 0;
  background: var(--bg-0);
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid var(--accent-mustard-dim);
  font-weight: 600;
}
.med-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.med-stat {
  background: linear-gradient(135deg, var(--bg-0), #161b0c);
  border: 1px solid var(--border-0);
  border-radius: 3px;
  padding: 12px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.3),
    0 1px 0 rgba(255,255,255,0.02);
}
.med-stat::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--progress-color, var(--border-1));
}
.med-stat-icon {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.med-stat-icon .icon { display: none; }
.med-stat-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  text-shadow: 0 0 10px currentColor;
  letter-spacing: -0.5px;
}
.med-stat-label {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.med-stat-bar {
  height: 4px;
  background: rgba(0,0,0,0.3);
  border-radius: 2px;
  margin: 6px auto 4px;
  overflow: hidden;
  max-width: 80%;
}
.med-stat-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.med-card-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 26px;
}
.med-effect-none {
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
}
.med-effect-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.med-effect-badge .icon { display: none; }
.med-effect-badge .effect-emoji {
  font-size: 13px;
  line-height: 1;
}
.med-effect-badge.eff-bleed {
  background: linear-gradient(135deg, rgba(90, 154, 85, 0.25), rgba(90, 154, 85, 0.1));
  color: #8ac87a;
  border: 1px solid var(--accent-green-dim);
  box-shadow: 0 0 8px rgba(90, 154, 85, 0.15);
}
.med-effect-badge.eff-brokenLeg {
  background: linear-gradient(135deg, rgba(212, 168, 74, 0.25), rgba(212, 168, 74, 0.1));
  color: var(--accent-mustard);
  border: 1px solid var(--accent-mustard-dim);
  box-shadow: 0 0 8px rgba(212, 168, 74, 0.15);
}
.med-effect-badge.eff-stamina {
  background: linear-gradient(135deg, rgba(240, 192, 64, 0.25), rgba(240, 192, 64, 0.1));
  color: #f0c850;
  border: 1px solid #c8a030;
  box-shadow: 0 0 8px rgba(240, 192, 64, 0.15);
}
.med-tier-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 7px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  border: 1px solid;
}
.med-card-give {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--border-0);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-green-light);
}
.give-cmd-inline {
  color: var(--accent-green-light);
}
.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.tip-card {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-left: 3px solid var(--accent-rust);
  border-radius: 0 4px 4px 0;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.tip-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: radial-gradient(circle at top right, rgba(196, 90, 58, 0.08), transparent 70%);
}
.tip-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.tip-card .tip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-mustard);
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}
.tip-card .tip-text {
  font-size: 12px;
  color: var(--text-1);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.weapon-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.weapon-chip {
  flex: 1;
  min-width: 150px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: all 0.2s;
}
.weapon-chip:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.weapon-chip::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent-rust);
}
.weapon-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.weapon-dmg {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.weapon-dmg b {
  color: var(--accent-mustard);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(212, 168, 74, 0.3);
}
.dura-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-0);
  border-radius: 4px;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.02);
}
.dura-table-full {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-1);
  min-width: 600px;
}
.dura-table-full th {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  padding: 14px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-mustard);
  border-bottom: 2px solid var(--accent-rust-dim);
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  letter-spacing: 0.5px;
}
.dura-table-full th.col-building {
  text-align: left;
  min-width: 200px;
}
.dura-table-full th.col-hp {
  text-align: left;
  min-width: 180px;
}
.dura-table-full .th-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-2);
  margin-top: 3px;
  font-family: var(--mono);
}
.dura-table-full td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-0);
  text-align: center;
  transition: background 0.15s;
}
.dura-table-full tr:last-child td { border-bottom: none; }
.dura-table-full tr:nth-child(odd) td {
  background: rgba(255,255,255,0.01);
}
.dura-table-full tr:nth-child(even) td {
  background: rgba(0,0,0,0.05);
}
.dura-table-full tr:hover td {
  background: linear-gradient(90deg, rgba(196, 90, 58, 0.08), rgba(212, 168, 74, 0.05)) !important;
}
.building-cell {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.building-icon {
  width: 28px;
  height: 28px;
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-green);
}
.building-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 1.5;
}
.building-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-0);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.building-en {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
  font-family: var(--mono);
}
.hp-cell {
  text-align: left;
}
.hp-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hp-bar {
  flex: 1;
  height: 10px;
  background: var(--bg-0);
  border-radius: 2px;
  overflow: hidden;
  min-width: 80px;
  border: 1px solid var(--border-0);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.hp-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
  box-shadow: 0 0 6px rgba(255,255,255,0.1);
}
.hp-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-0);
  min-width: 50px;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.hits-cell {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-0);
  position: relative;
  padding: 13px 16px !important;
}
.hits-cell.hits-low {
  color: #e88a8a;
  background: rgba(214, 69, 69, 0.08);
  text-shadow: 0 0 6px rgba(214, 69, 69, 0.3);
}
.hits-cell.hits-mid {
  color: var(--accent-mustard);
  background: rgba(212, 168, 74, 0.06);
  text-shadow: 0 0 6px rgba(212, 168, 74, 0.2);
}
.hits-cell.hits-high {
  color: #8ac87a;
  background: rgba(90, 154, 85, 0.06);
  text-shadow: 0 0 6px rgba(90, 154, 85, 0.2);
}
.hits-num {
  position: relative;
  z-index: 1;
}
.hits-cell.invalid {
  color: var(--text-3);
  background: rgba(214, 69, 69, 0.04);
}
.invalid-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--danger);
}
.invalid-mark svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}
.invalid-text {
  font-size: 11px;
  font-weight: 400;
}
.dura-tips {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dura-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text-1);
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--bg-1), var(--bg-2));
  border-radius: 3px;
  border-left: 3px solid var(--accent-green);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  line-height: 1.7;
}
.dura-tip-item::before {
  content: '▸';
  color: var(--accent-green);
  flex-shrink: 0;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(106, 138, 74, 0.4);
}
.craft-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-0);
  position: relative;
}
.craft-tabs::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-rust), transparent);
}
.craft-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-1);
  font-family: var(--sans);
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.craft-tab:hover {
  border-color: var(--border-2);
  color: var(--text-0);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.craft-tab.active {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border-color: var(--tab-color);
  color: var(--text-0);
  box-shadow:
    0 3px 10px rgba(0,0,0,0.25),
    0 0 16px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.craft-tab.active::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: -1px;
  height: 2px;
  background: var(--tab-color);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--tab-color);
}
.craft-tab-name {
  font-size: 13px;
  font-weight: 600;
}
.craft-tab-en {
  font-size: 10px;
  color: var(--text-2);
  font-family: var(--mono);
}
.craft-tab.active .craft-tab-en {
  color: var(--tab-color);
}
.craft-tab-count {
  font-size: 10px;
  font-family: var(--mono);
  padding: 2px 7px;
  background: var(--bg-0);
  border-radius: 2px;
  color: var(--text-2);
  border: 1px solid var(--border-0);
  font-weight: 600;
}
.craft-tab.active .craft-tab-count {
  color: var(--tab-color);
  border-color: var(--tab-color);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}
.craft-search-row {
  margin-bottom: 18px;
}
.craft-search-wrap {
  position: relative;
  max-width: 420px;
}
.search-icon-sm {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
  z-index: 1;
}
.search-icon-sm svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.craft-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  background: var(--bg-0);
  border: 1px solid var(--border-1);
  border-radius: 3px;
  color: var(--text-0);
  font-size: 12px;
  font-family: var(--sans);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.craft-search-input:focus {
  border-color: var(--accent-rust);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.3),
    0 0 0 3px rgba(196, 90, 58, 0.12);
}
.craft-search-input::placeholder {
  color: var(--text-3);
}
.craft-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.craft-recipe-card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 4px;
  padding: 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}
.craft-recipe-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--tab-color, var(--accent-rust));
  opacity: 0.6;
}
.craft-recipe-card:hover {
  border-color: var(--border-2);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.3),
    0 0 20px rgba(196, 90, 58, 0.05);
}
.craft-recipe-card:hover::before {
  opacity: 1;
}
.craft-recipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 8px;
}
.craft-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.craft-result-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--tab-color, var(--accent-rust)), rgba(0,0,0,0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  margin-right: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.craft-result-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-0);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.craft-result-count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-mustard);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(212, 168, 74, 0.2);
}
.craft-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--bg-0), #161b0c);
  border: 1px solid var(--accent-mustard-dim);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-mustard);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.craft-level-badge svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.craft-level-stars {
  display: flex;
  gap: 2px;
  color: var(--accent-mustard);
  font-size: 12px;
}
.craft-materials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, var(--bg-0), #161b0c);
  border: 1px solid var(--border-0);
  border-radius: 3px;
  position: relative;
  margin-left: 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.craft-material-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--border-1);
  border-radius: 3px;
  font-size: 12px;
  color: var(--text-1);
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.craft-material-chip:hover {
  border-color: var(--border-2);
  color: var(--text-0);
}
.craft-mat-count {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-mustard);
  background: var(--bg-0);
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid var(--accent-mustard-dim);
  min-width: 20px;
  text-align: center;
}
.craft-plus {
  color: var(--text-3);
  font-weight: 700;
  font-size: 14px;
}
.craft-arrow {
  width: 100%;
  text-align: center;
  color: var(--accent-rust);
  font-size: 20px;
  margin-top: 2px;
  text-shadow: 0 0 6px rgba(196, 90, 58, 0.4);
}
.craft-recipe-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--border-0);
  margin-left: 8px;
}
.craft-cat-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid;
  border-radius: 2px;
  background: rgba(0,0,0,0.15);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.craftsman-levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.craftsman-level-card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border-0);
  border-radius: 4px;
  padding: 18px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.2s;
}
.craftsman-level-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.craftsman-level-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-rust), var(--accent-mustard));
}
.craftsman-lv-badge {
  display: inline-block;
  font-family: var(--stencil);
  font-size: 26px;
  font-weight: 900;
  color: var(--accent-mustard);
  margin-bottom: 4px;
  letter-spacing: 1px;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.4),
    0 0 12px rgba(212, 168, 74, 0.2);
}
.craftsman-exp {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.craftsman-desc {
  font-size: 12px;
  color: var(--text-1);
  line-height: 1.6;
}
.craft-note {
  margin-top: 18px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(212, 168, 74, 0.08), rgba(196, 90, 58, 0.04));
  border: 1px solid var(--accent-mustard-dim);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-1);
  line-height: 1.8;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 2px 6px rgba(0,0,0,0.2);
}
.craft-note strong {
  color: var(--accent-mustard);
  text-shadow: 0 0 6px rgba(212, 168, 74, 0.2);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 270px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    display: none;
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.show { display: block; }
  .mobile-menu-btn { display: flex !important; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .content { padding: 16px 16px 88px 16px; }
  .item-grid { grid-template-columns: 1fr; }
  .med-card-grid { grid-template-columns: 1fr 1fr; }
  .topbar-stat { display: none; }
  .craft-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .craft-tab { flex-shrink: 0; }
  .page-title h2 { font-size: 20px; }
}
@media (max-width: 480px) {
  .med-card-grid { grid-template-columns: 1fr; }
  .lang-btn { padding: 5px 10px; font-size: 11px; }
}
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--border-1);
  border-radius: 3px;
  color: var(--text-1);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: all 0.15s;
}
.mobile-menu-btn:hover {
  border-color: var(--border-2);
  color: var(--text-0);
}
.mobile-menu-btn svg {
  width: 20px; height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon svg {
  display: block;
}
.ptl-watermark {
  position: fixed;
  bottom: 16px;
  right: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 12px;
  background: rgba(22, 26, 13, 0.75);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid rgba(106, 138, 74, 0.35);
  border-radius: 4px;
  opacity: 0.7;
  transition: all 0.25s ease;
  pointer-events: none;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.ptl-watermark::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(212, 168, 74, 0.4),
    transparent
  );
}
.ptl-watermark:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(212, 168, 74, 0.5);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.5),
    0 0 20px rgba(212, 168, 74, 0.08);
}
.ptl-watermark-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}
.ptl-watermark-text {
  line-height: 1.4;
}
.ptl-wm-title {
  font-size: 12px;
  font-weight: 700;
  color: #d4b860;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(212, 168, 74, 0.3);
}
.ptl-wm-sub {
  font-size: 10px;
  color: #a8a080;
  margin-top: 1px;
}
.ptl-wm-qq {
  font-size: 9px;
  color: #8a8268;
  font-family: var(--mono);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.qq-sep {
  opacity: 0.5;
}
.emoji-icon {
  font-style: normal;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.med-stat-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}
.med-stat-icon .icon { display: none; }
.med-effect-badge .icon { display: none; }
.med-effect-badge .effect-emoji {
  font-size: 14px;
  line-height: 1;
}
.med-legend-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.med-legend-icon .icon { display: none; }
.craft-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ===== 首页样式 ===== */
.home-page {
  padding: 48px 24px;
  text-align: center;
}
.home-desc-block {
  max-width: 800px;   /* 从 640px 改到 800px，PC更舒展 */
  opacity: 0.85;
  line-height: 1.7;
  padding: 0 16px;
  margin: 0 auto 28px;
  color: var(--text-1);
}
.home-page h1 {
  font-size: 28px;
  color: var(--text-0);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 24px;
}
.enter-wiki-btn {
  padding: 11px 30px;
  background: linear-gradient(135deg, var(--accent-rust-dim), var(--accent-rust));
  border: 1px solid var(--accent-rust);
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 15px;
  font-family: var(--sans);
  box-shadow: 0 3px 10px rgba(196, 90, 58, 0.3);
  transition: all 0.2s ease;
}
.enter-wiki-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(196, 90, 58, 0.35);
}
.footer-note {
  margin-top: 36px;
  opacity: 0.55;
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}
.page-hidden { display: none; }
.page-show { display: block; }

/* ===== PC宽屏适配（大屏优化） ===== */
@media (min-width: 1200px) {
  .home-desc-block {
    max-width: 900px;   /* 超宽屏更舒展 */
  }
  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));  /* 卡片更大一点 */
  }
  .content {
    padding: 32px 48px 60px;   /* 内边距更大，呼吸感 */
  }
}
/* ============================================ */
/* 修复手机端菜单按钮 - 2026-08-21 */
/* ============================================ */
.mobile-menu-btn {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: var(--bg-2, #242b1a) !important;
    border: 1px solid var(--border-1, #444d32) !important;
    border-radius: 3px !important;
    color: var(--text-1, #c8c4b0) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin-right: 4px !important;
  }
  .mobile-menu-btn:hover {
    border-color: var(--border-2) !important;
    color: var(--text-0) !important;
  }
  .mobile-menu-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
  }
}
