/* ============ 冒险岛浅色暖调主题 ============ */
:root {
  --primary: #E8943A;          /* 枫叶金橙 */
  --primary-light: #F5B461;
  --primary-dark: #C47324;
  --secondary: #D4629A;        /* 粉紫 */
  --secondary-light: #E88BB8;
  --accent: #22C55E;           /* 翠绿 */
  --bg: #FDF6EF;               /* 暖米色底 */
  --bg-base: #F5EDE4;
  --card: #FFFFFF;
  --card-hover: #FFF3E8;
  --text: #3D2415;             /* 深棕主文字 */
  --text-secondary: #6B5544;
  --muted: #9B8E82;
  --border: #E8DED0;
  --danger: #DC2626;
  --danger-dark: #B91C1C;
  --ok: #16A34A;
  --gold: #D4AF37;

  --font-pixel: 'Press Start 2P', 'MuzaiPixelFlat', cursive;
  --font-sans: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
}

@font-face {
  font-family: 'MuzaiPixelFlat';
  src: url('fonts/MuzaiPixelFlat.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background-image: url('news-bg.webp');
  background-attachment: fixed;
  background-size: auto;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #e9f0f5;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

.view { min-height: 100vh; }

/* 让页脚在内容不足时固定在页面最下方 */
#app-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app-view main { flex: 1 0 auto; }

.pixel-font { font-family: var(--font-pixel); }

.glow-text {
  text-shadow: 0 0 10px rgba(232, 148, 58, 0.5), 0 0 40px rgba(232, 148, 58, 0.25);
}

/* ============ 枫叶飘落装饰 ============ */
.leaves {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.falling-leaf {
  position: absolute;
  top: -12vh;
  width: var(--leaf-size, 18px);
  height: var(--leaf-size, 18px);
  background: linear-gradient(135deg, #F5B461 0%, #E8943A 55%, #C47324 100%);
  border-radius: 0 50% 0 50%;
  opacity: 0;
  animation: falling-leaf linear infinite;
  animation-duration: var(--leaf-duration, 10s);
  animation-delay: var(--leaf-delay, 0s);
  filter: drop-shadow(0 1px 2px rgba(61, 36, 21, 0.2));
}

@keyframes falling-leaf {
  0%   { transform: translateY(-12vh) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.85; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(112vh) rotate(720deg); opacity: 0; }
}

/* ============ 冒险岛木框窗口 ============ */
.ms-window {
  position: relative;
  background: linear-gradient(180deg, #FFF8F0 0%, #FDF3E8 100%);
  border: 2px solid var(--primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(61, 36, 21, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.ms-window::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 1px solid rgba(232, 148, 58, 0.25);
  pointer-events: none;
  z-index: 1;
}

/* ============ 登录页 ============ */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card { width: 100%; max-width: 400px; }

.login-logo { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.login-logo-img { width: 84px; height: auto; display: block; }
.login-logo-maple { width: 44px; height: auto; display: block; }

.logo-fixed {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 64px;
  height: auto;
  z-index: 100;
  pointer-events: none;
  opacity: 0.95;
}

/* ============ 卡片 ============ */
.card {
  background: linear-gradient(145deg, rgba(255,255,255,0.97) 0%, rgba(253,246,239,0.92) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(61, 36, 21, 0.06), 0 1px 4px rgba(61, 36, 21, 0.04);
}

.gradient-border {
  position: relative;
  background: var(--card);
  border-radius: 16px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), transparent 50%, var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

h1.site-name {
  margin: 0 0 6px;
  font-size: 19px;
  text-align: center;
  color: var(--primary-dark);
  line-height: 1.5;
  letter-spacing: 0.5px;
}

.subtitle { margin: 0 0 24px; text-align: center; color: var(--muted); font-size: 14px; }

/* ============ 表单 ============ */
form { display: flex; flex-direction: column; gap: 16px; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

input, select {
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFDF9;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 148, 58, 0.15);
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 10px;
  background: #FFFDF9;
  color: var(--text);
  outline: none;
}

textarea:focus { border-color: var(--primary); }

/* ============ 冒险岛按钮 ============ */
button {
  position: relative;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #3A2200;
  border: 2px solid var(--primary-dark);
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  text-shadow: 0 1px 0 rgba(255, 255, 200, 0.4);
  transition: all 0.15s;
}

button:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(232, 148, 58, 0.5);
}

button:active { transform: scale(0.97); }

button:disabled { background: #D8CCC0; border-color: #C4B5A0; color: #8A7C6C; cursor: not-allowed; box-shadow: none; text-shadow: none; }

button.ghost {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
  padding: 7px 14px;
  font-size: 14px;
  text-shadow: none;
}

button.ghost:hover { background: var(--primary-dark); color: #fff; box-shadow: none; }

button.reject {
  color: #FFF5E6;
  border-color: var(--danger-dark);
  background: linear-gradient(180deg, #EF4444 0%, var(--danger) 50%, var(--danger-dark) 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

button.reject:hover { border-color: #EF4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }

.error { color: var(--danger); font-size: 14px; margin: 0; min-height: 1em; }
.ok { color: var(--ok); font-size: 14px; margin: 0; min-height: 1em; }

/* ============ 头部（冒险岛官网风格） ============ */
.site-header-wrapper {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50px;
}

.site-header-hero {
  position: relative;
  height: 200px;
  max-width: 1400px;
  margin: 0 auto;
}

.site-header-chars {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 120px;
  width: auto;
  object-fit: contain;
  object-position: bottom;
  image-rendering: pixelated;
}

.site-header-brand {
  position: absolute;
  left: 0;
  top: 60%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
}

.site-header-logo {
  width: 90px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

.site-header-brand-text h1 {
  margin: 0;
  font-size: 22px;
  color: #fff;
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.25);
}

.site-header-brand-text p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* 深棕色导航标签栏 */
.site-nav-bar {
  background: linear-gradient(180deg, #3D302A 0%, #2A211C 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 40;
}

.site-nav-container {
  display: flex;
  align-items: center;
  padding: 0 max(1vw, 32px);
  min-height: 68px;
}

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #D4C4A8;
  background: transparent;
  border: none;
  border-radius: 0;
  text-shadow: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tabs button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.tabs button.active {
  color: #fff;
  background: linear-gradient(180deg, #F5B461 0%, #E8943A 100%);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(232, 148, 58, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  white-space: nowrap;
}

.user-box span { color: #E8DDC8; font-weight: 600; }

.user-box .ghost {
  color: #FFD966;
  border: 1px solid #E8943A;
  background: transparent;
  text-shadow: none;
}

.user-box .ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* 导航栏图标按钮（爱心/用户名/退出） */
.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(232, 148, 58, 0.55);
  background: transparent;
  color: #E8DDC8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-icon-btn svg { display: block; }
.nav-icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-icon-btn.heart { color: #FF7B9C; }
.nav-icon-btn.heart:hover { color: #FFAEC3; }
.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(232, 148, 58, 0.55);
  background: transparent;
  color: #E8DDC8;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s ease;
}
.nav-user-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-user-btn svg { color: #FFD966; }

/* 为彭于晏点杯恰啡（.card.coffee-card 提高优先级，压过 .tab .card 的 460px 限宽） */
.tab .card.coffee-card { max-width: none; margin: 0 0 24px; }
.coffee-text p { margin: 0 0 10px; line-height: 1.85; color: var(--text); }
.coffee-support { display: flex; gap: 28px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.coffee-left { flex: 1 1 260px; min-width: 240px; }
.coffee-amount-title { font-weight: 700; margin: 0 0 10px; color: var(--primary-dark); }
.coffee-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.coffee-chip { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: #FDF8F0; color: var(--text); cursor: pointer; font-weight: 600; }
.coffee-chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--card-hover); }
.coffee-custom { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.coffee-custom input { max-width: 240px; }
.coffee-paytypes { display: flex; gap: 10px; margin: 14px 0; }
.coffee-paytype { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: #FDF8F0; font-size: 14px; color: var(--text-secondary); }
.coffee-paytype input { accent-color: var(--primary); margin: 0; }
.coffee-paytype:has(input:checked) { border-color: var(--primary); background: var(--card-hover); color: var(--primary-dark); font-weight: 600; }
#coffee-pay-btn { width: 100%; max-width: 260px; }
.coffee-note { font-size: 12px; margin-top: 12px; }
.coffee-sponsors-box { flex: 1 1 280px; min-width: 260px; }
.coffee-sponsor-title { margin: 0 0 6px; font-size: 16px; }
#coffee-sponsor-summary { font-size: 13px; margin: 0 0 8px; }
.coffee-sponsor-table { max-height: 320px; overflow-y: auto; }
.coffee-sponsor-table th, .coffee-sponsor-table td { font-size: 13px; }

/* ============ 主内容 ============ */
main { width: 100%; padding: 24px 28px 48px; max-width: 1380px; margin: 0 auto; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.tab .card-grid .card { max-width: none; margin: 0; }

#requests-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 20px; align-items: start; }
#requests-body .request-card { max-width: none; margin-bottom: 0; }
#requests-body .empty { grid-column: 1 / -1; }

#tab-messages .card { max-width: none; }
.msg-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) {
  .msg-grid { grid-template-columns: 1fr; }
}

.tab h2 {
  margin: 0 0 16px;
  font-size: 19px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab h2::before {
  content: '';
  width: 6px;
  height: 20px;
  border-radius: 9999px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary-dark));
  display: inline-block;
}

.tab .card { max-width: 460px; }

/* ============ 表格 ============ */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
  margin-bottom: 28px;
  box-shadow: 0 2px 10px rgba(61, 36, 21, 0.05);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  word-break: break-all;
}

th {
  background: linear-gradient(180deg, #FFF3E8, #FDF6EF);
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: #FFFDF9; }

td .claim-btn { padding: 6px 14px; font-size: 13px; }

.mask { color: var(--muted); letter-spacing: 1px; }
.empty { color: var(--muted); text-align: center; padding: 24px; }
.load-more-wrap { text-align: center; padding: 12px 0; }

.switch { text-align: center; margin: 14px 0 0; }
.switch span { color: var(--primary-dark); cursor: pointer; font-size: 14px; }
.switch span:hover { text-decoration: underline; }

td button + button { margin-left: 8px; }

.item-icon { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 6px; }

/* ============ 物品自动补全 ============ */
.ac-wrap { position: relative; display: flex; flex-direction: column; }
.ac-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(61, 36, 21, 0.12);
  display: none;
}
.ac-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}
.ac-item:hover { background: var(--card-hover); }

/* ============ OCR 图片识别 ============ */
.ocr-card { margin-bottom: 20px; }
.ocr-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: #FFFDF9;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.ocr-drop:hover { border-color: var(--primary); }
.ocr-drop p { margin: 4px 0; }
.ocr-entry { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ocr-entry input { flex: 1; min-width: 120px; }
.ocr-entry input.incomplete { border-color: var(--danger); }
.ocr-hint { font-size: 13px; color: var(--danger); }
.ocr-hint.ok { color: var(--ok); }
.ocr-raw { white-space: pre-wrap; background: #FDF6EF; padding: 12px; border-radius: 8px; font-size: 13px; }

/* ============ 许愿 ============ */
.wish-card { margin-top: 20px; }
.wish-add { display: flex; gap: 8px; margin-bottom: 10px; }
.wish-add input { flex: 1; }

.role-search { display: flex; gap: 8px; margin-bottom: 14px; }
.role-search input { flex: 1; }
.wish-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.wish-row span { flex: 1; }
.wish-hint { margin: 8px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wish-pick { padding: 4px 10px; font-size: 13px; }

/* ============ 留言本 / 直播间 ============ */
.msg-announce { margin-bottom: 20px; }
.live-rooms { margin: 12px 0; }
.live-room { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.live-name { font-weight: 600; }
.live-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #F0EDE6; color: var(--muted); }
.live-badge.on { background: #E74C3C; color: #fff; animation: pulse 1.2s infinite; }
.live-jump { font-size: 13px; padding: 4px 10px; border-radius: 6px; background: var(--primary); color: #fff; text-decoration: none; }
.live-jump.on { background: #E74C3C; }
.live-jump:hover { opacity: 0.9; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.msg-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.msg-body { margin: 0; white-space: pre-wrap; word-break: break-word; }

/* ============ 摇摇乐 ============ */
.lucky-intro { margin: 0 0 16px; }

.lucky-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
.tab .lucky-draw-card,
.tab .lucky-add-card {
  max-width: none;
  margin: 0;
}
@media (max-width: 900px) {
  .lucky-top { grid-template-columns: minmax(0, 1fr); }
}

.lucky-stage {
  background: #FDF8F0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  min-height: 120px;
  margin-bottom: 16px;
  position: relative;
}

.lucky-pool {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.lucky-pool.is-empty { display: block; }

.lucky-pool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-align: center;
}

.lucky-pool-card .item-icon { width: 40px; height: 40px; margin-right: 0; }
.lucky-pool-card .lucky-name { font-size: 14px; word-break: break-all; line-height: 1.3; }
.lucky-pool-card .lucky-contributor { font-size: 11px; color: var(--muted); }

/* ---- CSGO 式抽奖转盘（绝对定位覆盖层：不参与布局，避免撑爆网格） ---- */
.lucky-reel {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F6EDDD 100%);
}
.lucky-reel::before,
.lucky-reel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  z-index: 3;
  pointer-events: none;
}
.lucky-reel::before { left: 0; background: linear-gradient(90deg, #FDF8F0 0%, rgba(253, 248, 240, 0) 100%); }
.lucky-reel::after { right: 0; background: linear-gradient(270deg, #FDF8F0 0%, rgba(253, 248, 240, 0) 100%); }

.lucky-reel-pointer {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #E8943A, #B86A10);
  z-index: 4;
  box-shadow: 0 0 10px rgba(232, 148, 58, 0.8);
}
.lucky-reel-pointer::before,
.lucky-reel-pointer::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 9px solid transparent;
}
.lucky-reel-pointer::before { top: -2px; border-bottom: none; border-top-color: #B86A10; }
.lucky-reel-pointer::after { bottom: -2px; border-top: none; border-bottom-color: #B86A10; }

.lucky-reel-track {
  display: flex;
  gap: 10px;
  align-items: stretch;
  height: 100%;
  padding: 14px 0;
  will-change: transform;
}

.lucky-reel-card {
  flex: 0 0 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  text-align: center;
  overflow: hidden;
}
.lucky-reel-card .item-icon { width: 42px; height: 42px; margin: 0; }
.lucky-reel-card .lucky-name {
  font-size: 12px;
  line-height: 1.25;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lucky-reel-card .lucky-badge { margin-top: auto; }
.lucky-reel-card.tier-grand { border-color: var(--gold); background: #FFFBEC; }
.lucky-reel-card.tier-thanks { border-color: #B0BEC5; background: #F7F9FA; }

.lucky-reel-card.lucky-reel-winner {
  border-color: var(--gold);
  background: #FFF8E1;
  animation: reelWinnerGlow 0.5s ease-in-out infinite alternate;
  z-index: 2;
}
@keyframes reelWinnerGlow {
  from { box-shadow: 0 0 6px rgba(230, 195, 77, 0.5); transform: scale(1.02); }
  to { box-shadow: 0 0 22px rgba(230, 195, 77, 0.95); transform: scale(1.08); }
}

@media (max-width: 600px) {
  .lucky-reel-card { flex-basis: 96px; }
}

.lucky-draw-btn {
  width: 100%;
  max-width: 320px;
  font-size: 18px;
  font-weight: 700;
  padding: 16px;
  letter-spacing: 4px;
  display: block;
  margin: 0 auto;
}

.lucky-result {
  margin: 16px 0;
  padding: 18px;
  border: 2px solid var(--ok);
  background: #F0FAF0;
  border-radius: 12px;
  text-align: center;
  animation: resultPop 0.5s ease;
}
@keyframes resultPop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
.lucky-result .lucky-win-title { font-size: 18px; font-weight: 700; color: var(--ok); margin-bottom: 8px; }
.lucky-result .lucky-win-cdk { font-size: 20px; letter-spacing: 2px; font-weight: 700; color: var(--text); }
.lucky-result .lucky-win-cdk-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.lucky-thanks-info { margin: 0 0 14px; text-align: center; }
.lucky-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 16px; }

.lucky-pool-card.tier-grand {
  border-color: var(--gold);
  background: linear-gradient(180deg, #FFF8E1, #FFFDF6);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18);
}

.lucky-badge {
  display: inline-block;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  line-height: 1.5;
}
.lucky-badge.grand { background: linear-gradient(135deg, #E6C34D, #F5DD7A); color: #6B4A00; }
.lucky-badge.normal { background: #F0EDE6; color: var(--text-secondary); }
.lucky-badge.thanks { background: #DBEAFE; color: #1D4ED8; }
.lucky-badge.legendary {
  background: linear-gradient(90deg, #FF9D3C, #FFE93C, #5EFF7B, #3CD6FF, #B45EFF, #FF5EC4, #FF9D3C);
  background-size: 200% auto;
  color: #4A2600;
  font-weight: 700;
  animation: medalRainbow 3s linear infinite;
}
/* 传说中的物品：红色炫彩边框（奖池卡片 / 弹窗卡片）/ 转盘卡片 / 抽奖结果 */
.lucky-pool-card.tier-legendary,
.lucky-pool-modal-card.tier-legendary {
  position: relative;
  border-color: rgba(255, 59, 59, 0.55);
  background: linear-gradient(180deg, #FFF3F3, #FFFAF7);
  box-shadow: 0 0 12px rgba(255, 59, 59, 0.3);
}
.lucky-pool-card.tier-legendary::before,
.lucky-pool-modal-card.tier-legendary::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(90deg, #FF3B3B, #FF7B3C, #FFD63C, #FF3BC8, #B43CFF, #FF3B3B);
  background-size: 200% auto;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: medalRainbow 3s linear infinite;
}
.lucky-reel-card.tier-legendary { border-color: #FF3B3B; background: #FFF3F3; }
.lucky-result.result-legendary { border-color: rgba(255, 59, 59, 0.55); background: #FFF3F3; }
.lucky-result.result-legendary .lucky-win-title {
  background: linear-gradient(90deg, #FF9D3C, #B45EFF, #3CD6FF, #FF9D3C);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: medalRainbow 3s linear infinite;
}

.lucky-tier-toggle { margin-top: 6px; }
.lucky-delist-btn { margin-top: 6px; margin-left: 6px; }

.lucky-return-btn {
  color: var(--text-secondary);
  border-color: #C4B5A0;
  background: linear-gradient(180deg, #F0E8DC 0%, #E2D6C4 50%, #D4C5B0 100%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.lucky-return-btn:hover { border-color: #B0A090; box-shadow: 0 0 8px rgba(100, 80, 60, 0.15); }

.lucky-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.lucky-result.result-grand { border-color: var(--gold); background: #FFF8E1; }
.lucky-result.result-grand .lucky-win-title { color: #B8860B; }
.lucky-result.result-thanks { border-color: #B0BEC5; background: #F5F7F8; }
.lucky-result.result-thanks .lucky-win-title { color: var(--muted); }

/* ============ 求购卡片 ============ */
.request-card { margin-bottom: 18px; }
.request-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.request-head strong { font-size: 16px; }
.request-head .muted { flex: 1 1 auto; }
.muted { color: var(--muted); font-size: 13px; }
.request-card table { margin-top: 4px; }

/* ============ 徽章 ============ */
.ms-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid;
  white-space: nowrap;
}

/* ============ 像素分隔线 ============ */
.ms-pixel-divider {
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--primary) 0px,
    var(--primary) 4px,
    transparent 4px,
    transparent 8px
  );
  opacity: 0.5;
}

/* ============ 底部图片滚动 ============ */
.footer-image-scroll {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: var(--bg-base);
}

.footer-image-scroll-track {
  display: flex;
  width: max-content;
  animation: footer-img-scroll 40s linear infinite;
}

.footer-image-scroll-img {
  height: 60px;
  width: auto;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
}

@keyframes footer-img-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ 页脚 ============ */
.site-footer {
  background: linear-gradient(180deg, #FFF3E8 0%, #FDF6EF 100%);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.site-footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 34px; height: auto; display: block; }
.footer-name { display: block; font-size: 13px; color: var(--primary-dark); line-height: 1.5; }
.footer-sub { display: block; font-size: 12px; color: var(--muted); }

.footer-note { margin: 0; font-size: 13px; color: var(--text-secondary); max-width: 640px; line-height: 1.7; }

.footer-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.footer-made { display: inline-flex; align-items: center; gap: 4px; }

/* ============ 交易大厅 ============ */
.ex-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.ex-header h2 { margin: 0; }
.tab .ex-publish-card { max-width: none; margin-bottom: 20px; }
.ex-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ex-form-grid .ex-full { grid-column: 1 / -1; }
.ex-equip-attrs { margin: 8px 0; }
.ex-equip-attrs h3 { font-size: 15px; margin: 0 0 12px; }
.ex-equip-attrs h3 small { color: var(--muted); font-weight: 400; }
.ex-attr-group { background: #FDF8F0; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.ex-attr-group-title { font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.ex-attr-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.ex-attr-item label { flex: 1; flex-direction: row; align-items: center; gap: 8px; cursor: pointer; }
.ex-attr-item label input[type="checkbox"] { width: 16px; height: 16px; }
.ex-attr-input { width: 90px; text-align: center; }
.ex-attr-input:disabled { background: #EFE7DA; color: var(--muted); cursor: not-allowed; }

.ex-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.ex-filter select, .ex-filter input { flex: 1; min-width: 140px; }
.ex-filter #ex-search, .ex-filter #ex-player { flex: 1.5; }

.ex-table { font-size: 14px; }
.ex-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.ex-badge.sell { background: #F5ECE8; color: #7D2E2E; }
.ex-badge.buy { background: #E3F2FD; color: #1565C0; }
.ex-badge.active { background: #E8F5E9; color: #2E7D32; }
.ex-badge.pending { background: #FFF3E0; color: #E65100; }
.ex-badge.completed { background: #E3F2FD; color: #1565C0; }
.ex-badge.removed { background: #FFEBEE; color: #C62828; }
.ex-sort-btn { border: none; background: none; padding: 0; font-weight: 700; color: inherit; text-shadow: none; font-size: 14px; cursor: pointer; }
.ex-sort-btn:hover { box-shadow: none; color: var(--primary-dark); }
.ex-currency-icon { width: 18px; height: 18px; vertical-align: middle; margin-left: 3px; }
.ex-item-name { cursor: pointer; }
.ex-copy-btn { padding: 2px 8px; font-size: 12px; }
.ex-contact { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ex-equip-cell .equip-attributes div { line-height: 1.5; }
.ex-contact-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.ex-actions { white-space: nowrap; }
.ex-actions .claim-btn { padding: 4px 10px; font-size: 12px; margin: 2px 2px 2px 0; }
.ex-offers { margin-top: 6px; }
.ex-offer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 3px 0; }
.ex-offer .claim-btn { padding: 2px 8px; font-size: 11px; }
.ex-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ex-pagination > div { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-page-btn { padding: 6px 12px; font-size: 13px; }
.ex-page-btn.active { background: var(--primary-dark); color: #fff; }

.ex-picker { position: relative; }
.ex-picker input { width: 100%; }
.ex-online-list { z-index: 60; }
.ex-item-preview { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ex-item-preview .item-icon { width: 22px; height: 22px; }
.lucky-win-item { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; font-weight: 700; margin: 8px 0; }
.lucky-win-item .item-icon { width: 32px; height: 32px; }

@media (max-width: 640px) {
  .ex-form-grid { grid-template-columns: 1fr; }
}

/* ============ 物品悬浮窗（与 old.artale.cn/market.php 完全一致） ============ */
.itemframe {
  display: none;
  position: absolute;
  z-index: 1000;
  width: 280px;
  background-color: rgba(34, 34, 34, 0.6);
  color: #fff;
  border: 1px solid #555;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  font-size: 12px;
  padding: 8px;
  text-align: left;
}

.itemname {
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  color: #ffcc00;
  padding: 5px 0;
  border-bottom: 1px dashed #555;
  margin-bottom: 8px;
  letter-spacing: 1.5px;
}

.icon { float: left; margin-right: 15px; }

.rinfo { display: flex; flex-direction: column; }

.reqinfo { color: #fff; display: block; margin-bottom: 2px; letter-spacing: 1.5px; }

.reqjob { clear: both; padding-top: 5px; border-top: 1px dashed #555; margin-top: 8px; }

.reqtm { display: flex; justify-content: space-between; letter-spacing: 1.5px; }

.reqtm span { color: #ff6666; letter-spacing: 1.5px; }

.iinfo { margin-top: 8px; border-top: 1px dashed #555; padding-top: 5px; color: #fff; }

.wiki-bot { word-spacing: 2px; color: #fff; letter-spacing: 1.5px; }

.tuc { word-spacing: 2px; color: #fff; letter-spacing: 1.5px; }

/* ============ 响应式 ============ */
@media (max-width: 640px) {
  .site-header-hero { height: 150px; }
  .site-header-chars { height: 82px; }
  .site-header-logo { width: 58px; }
  .site-header-brand { top: 55%; gap: 8px; padding-left: 4px; }
  .site-header-brand-text h1 { font-size: 15px; }
  .site-header-brand-text p { font-size: 11px; }
  .site-nav-container { flex-direction: column; align-items: stretch; padding: 8px 16px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tabs button { flex-shrink: 0; padding: 8px 16px; font-size: 13px; }
  .user-box { margin-left: 0; padding: 8px 0; justify-content: space-between; }
  main { padding: 16px; }
  .card { padding: 20px; }
  .card-grid { grid-template-columns: 1fr; }
  #requests-body { grid-template-columns: 1fr; }
  .site-footer-inner { padding: 0 16px; }
}

/* ============ BOSS 计时器 ============ */
.boss-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.boss-card { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.boss-card.disabled { opacity: 0.55; }
.boss-card img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 8px; }
.boss-card-name { font-weight: 700; margin-bottom: 4px; }
.boss-admin { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.boss-admin input[type="number"] { width: 90px; padding: 5px 8px; border: 1px solid #ddd; border-radius: 6px; }
.boss-admin input[type="text"] { width: 150px; padding: 5px 8px; border: 1px solid #ddd; border-radius: 6px; }
.boss-kill-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.boss-kill-form label { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.boss-kill-form button { align-self: flex-end; }
.boss-countdown { font-family: ui-monospace, monospace; font-weight: 700; }
.boss-banner { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: #C62828; color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 9999; box-shadow: 0 4px 16px rgba(0,0,0,0.25); max-width: 90%; }
.boss-type { margin-left: 6px; }
#tab-boss .card { max-width: none; }


/* ---- 奖池一览弹窗 ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 10, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-panel {
  background: #FFFDF7;
  border: 2px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(40, 25, 10, 0.35);
  width: 100%;
  max-width: 860px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  animation: resultPop 0.3s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 18px; }
.lucky-pool-modal-body {
  overflow-y: auto;
  padding: 16px 18px;
}
.lucky-pool-modal-section-title {
  font-size: 14px;
  font-weight: 700;
  margin: 10px 0 10px;
  color: var(--text);
}
.lucky-pool-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.lucky-pool-modal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  text-align: center;
}
.lucky-pool-modal-card .item-icon { width: 40px; height: 40px; margin: 0; }
.lucky-pool-modal-card .lucky-name {
  font-size: 12px;
  line-height: 1.25;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lucky-pool-modal-card.tier-grand { border-color: var(--gold); background: #FFFBEC; }
.lucky-pool-modal-card.tier-thanks { border-color: #B0BEC5; background: #F7F9FA; }
.lucky-pool-modal-empty { color: var(--muted); font-size: 13px; padding: 6px 0 10px; }
.lucky-view-pool-btn { display: block; margin: 10px auto 0; }

/* ---- 命中率计算器 ---- */
.acc-required { font-size: 20px; font-weight: 700; margin: 10px 0; }
.acc-verdict { font-size: 17px; font-weight: 700; padding: 12px; border-radius: 10px; margin-top: 6px; }
.acc-verdict.acc-hit { background: #F0FAF0; color: var(--ok); border: 2px solid var(--ok); }
.acc-verdict.acc-miss { background: #FDECEC; color: var(--danger); border: 2px solid var(--danger); }
#acc-result { margin-top: 14px; }
#acc-result:empty { display: none; }

/* ---- 实时经验记录器（屏幕识别） ---- */
.explive-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 20px; align-items: start; margin-bottom: 14px; }
@media (max-width: 900px) { .explive-top { grid-template-columns: minmax(0, 1fr); } }
.explive-preview-wrap { position: relative; aspect-ratio: 16 / 9; background: #241a12; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.explive-video { display: block; width: 100%; height: 100%; object-fit: contain; }
.explive-overlay { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.explive-rect { position: absolute; border: 2px solid var(--primary); background: rgba(232, 148, 58, 0.15); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.25); pointer-events: none; }
.explive-rect-level { border-color: var(--accent); background: rgba(34, 197, 94, 0.15); box-shadow: none; }
#explive-select-modal .explive-rect { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); }
.explive-rect-label { position: absolute; transform: translateY(-105%); background: var(--primary-dark); color: #fff; font-size: 12px; line-height: 1; padding: 4px 9px; border-radius: 6px; cursor: move; user-select: none; white-space: nowrap; z-index: 5; }
.explive-rect-label.inside { transform: translateY(4px); }
#explive-overlay { pointer-events: none; }
.explive-cal-tabs { display: flex; gap: 8px; }
.explive-cal-tabs button { padding: 8px 16px; }
.explive-cal-tabs button.active { box-shadow: 0 0 0 3px rgba(232, 148, 58, 0.35); }
.explive-resolution-hint { font-size: 12px; color: var(--danger-dark); background: #FFF7F7; border: 1px solid var(--danger); border-radius: 8px; padding: 6px 10px; margin: 6px 0 0; }
.explive-resolution-hint.ok { color: #2E7D32; background: #F4FBF4; border-color: #A5D6A7; }
#explive-select-modal .modal-header { flex-wrap: wrap; row-gap: 8px; }
.explive-preview-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: #B8A99A; font-size: 13px; }
.explive-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 8px; }
.explive-controls .boss-kill-form { margin-bottom: 0; }
.explive-controls .explive-note-label { flex: 1 1 100%; }
#explive-status:empty, #explive-last-ocr:empty { display: none; }
#explive-last-ocr { font-size: 12px; word-break: break-all; }
.explive-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
@media (max-width: 520px) { .explive-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.explive-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; background: #FDF8F0; border: 1px solid var(--border); border-radius: 10px; text-align: center; }
.explive-stat-num { font-size: 17px; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.explive-stat-label { font-size: 12px; color: var(--text-secondary); }
.explive-chart { width: 100%; margin-top: 6px; }

/* 记录器地图图鉴（智能补全） */
.explive-map-info { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding: 12px; background: #FDF8F0; border: 1px solid var(--border); border-radius: 10px; }
.explive-map-thumb { width: 190px; max-width: 42vw; height: 120px; object-fit: contain; background: #241a12; border-radius: 8px; flex-shrink: 0; }
.explive-map-thumb.hidden { display: none; }
.explive-map-detail { flex: 1; min-width: 0; }
.explive-map-title { margin: 0 0 8px; font-weight: 700; color: var(--primary-dark); word-break: break-all; }
.explive-map-monsters { display: flex; flex-direction: column; gap: 4px; max-height: 230px; overflow-y: auto; }
.explive-map-monster summary { cursor: pointer; font-size: 13px; color: var(--text); padding: 4px 6px; border-radius: 6px; background: #F5EDE0; list-style-position: inside; }
.explive-map-monster summary:hover { background: #EFE3CE; }
.explive-map-drops { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 2px 2px 10px; }
.explive-map-drop { font-size: 12px; padding: 2px 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; color: var(--text-secondary); }

/* 截图经验计算器（实时记录器关闭后的替代功能） */
.expshot-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.expshot-card-head h2 { margin: 0; }
.expshot-paste-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; background: #FFFDF9; margin-bottom: 4px; transition: border-color 0.15s; }
.expshot-paste-zone:hover { border-color: var(--primary); }
.expshot-paste-zone.dragover { border-color: var(--primary); background: #FDF8F0; }
.expshot-paste-zone p { margin: 4px 0; color: var(--text-secondary); }
.expshot-thumb { max-width: 100%; max-height: 140px; border-radius: 8px; border: 1px solid var(--border); background: #241a12; }
.expshot-thumb.hidden { display: none; }
#expshot-status:empty, #expshot-error:empty, #expshot-warn:empty { display: none; }
#expshot-warn { color: #B26A00; }

/* 截图经验计算器数据共享 + 可视数据 */
.expshot-share { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.expshot-share h3 { margin: 0 0 6px; }
.expshot-share-form { display: flex; flex-direction: column; gap: 8px; }
.expshot-share-public { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; width: fit-content; }
.expshot-share-picker { position: relative; }
#expshot-share-user { width: 100%; }
.expshot-share-user-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14); max-height: 220px; overflow: auto; }
.expshot-share-user-list.hidden { display: none; }
.expshot-share-user-item { padding: 7px 12px; font-size: 13px; cursor: pointer; }
.expshot-share-user-item:hover { background: #F1F6EC; }
.expshot-share-viewers { display: flex; flex-wrap: wrap; gap: 6px; }
.expshot-share-viewers:empty { display: none; }
.expshot-share-viewer { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 10px; border: 1px solid var(--border); border-radius: 9999px; font-size: 12px; background: #FFFDF9; }
.expshot-share-viewer button { padding: 0 6px; border: none; background: none; cursor: pointer; font-size: 14px; line-height: 1.2; color: var(--text-secondary); }
.expshot-share-viewer button:hover { color: #A82D1D; }
#expshot-share-msg:empty { display: none; }
.expshot-visible-mine td { background: #FDF8F0; }

/* 记录器安全性说明（可折叠） */
.exp-note { margin: 10px 0 4px; padding: 10px 14px; background: #FDF8F0; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.exp-note summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); user-select: none; line-height: 1.5; }
.exp-note-body { margin-top: 8px; color: var(--text-secondary); line-height: 1.7; }
.exp-note-body p { margin: 6px 0; }
.exp-note-body ol, .exp-note-body ul { margin: 6px 0; padding-left: 20px; }
.exp-note-body strong { color: var(--text); }

/* 图鉴管理（顶级管理员） */
.gamedb-rows { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 300px; overflow-y: auto; }
.gamedb-row { text-align: left; padding: 7px 10px; background: #FDF8F0; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 13px; }
.gamedb-row:hover { background: #F5EDE0; }
.gamedb-row-flex { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; background: #FDF8F0; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.gamedb-row-flex span { min-width: 0; word-break: break-all; }
.gamedb-mini { padding: 4px 12px; font-size: 12px; flex-shrink: 0; }
.gamedb-sub { margin: 14px 0 8px; font-size: 15px; }
.gamedb-add-label { margin: 10px 0 6px; }
#gamedb-add-rel-q { width: 100%; }

/* 练级会话记录（记录器右侧）+ 排行榜（全宽） */
.tab .explive-sessions-card { max-width: none; margin-bottom: 24px; }
.explive-sessions-card h3, .explive-rank-card h3 { margin: 0 0 8px; }
.explive-sessions-card .table-wrap { max-height: 420px; overflow-y: auto; }
.tab .explive-rank-card { max-width: none; margin-bottom: 24px; }
.explive-rank-card .table-wrap { max-height: 420px; overflow-y: auto; }

/* 可视数据 + 升级地图参考（全宽，与下方卡片留 24px 下边距） */
.tab .card.expshot-visible-card { max-width: none; margin: 0 0 24px; }
.tab .card.expshot-mapref-card { max-width: none; margin: 0 0 24px; }

/* 经验区选区大窗口弹窗 */
.explive-modal-panel { width: auto; max-width: 97vw; max-height: 96vh; overflow-y: auto; }
.explive-modal-video-wrap { position: relative; width: 900px; max-width: 92vw; height: 506px; flex-shrink: 0; background: #241a12; border-radius: 10px; overflow: hidden; margin: 0 auto; }
.explive-cal-preview { width: 320px; max-width: 100%; min-height: 36px; display: block; margin: 6px auto 0; background: #241a12; border: 1px solid var(--border); border-radius: 8px; }
.explive-cal-preview-pair { display: flex; gap: 14px; justify-content: center; align-items: flex-start; flex-wrap: wrap; margin-top: 4px; }
.explive-cal-preview-pair figure { margin: 0; }
.explive-cal-preview-pair figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
.explive-cal-preview-pair .explive-cal-preview { margin: 6px auto 0; }

/* 工具箱：命中卡与实时记录卡全宽 */
.acc-form label { min-width: 150px; }
#tab-accuracy .acc-card { max-width: none; margin-bottom: 24px; }
#tab-accuracy #exp-live-card { max-width: none; width: 100%; margin-bottom: 24px; }
#tab-accuracy #exp-shot-card { max-width: none; width: 100%; margin-bottom: 24px; }

#tab-accuracy .boss-big-card { max-width: none; margin: 0; }
.boss-big-card h3 { margin: 22px 0 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.boss-big-card h3:first-of-type { margin-top: 18px; }

/* ---- 百佬汇（100 级以上角色展示） ---- */
.baiyh-card { margin-bottom: 24px; }
.baiyh-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.baiyh-char { background: #FFFDF9; border: 2px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.baiyh-img { width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #FFFDF7, #F3EADA); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.baiyh-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.baiyh-name { font-size: 16px; font-weight: 700; }
.baiyh-exprow { display: flex; align-items: center; gap: 8px; width: 100%; }
.baiyh-lv { font-weight: 700; white-space: nowrap; color: var(--primary-dark); }
.baiyh-bar { flex: 1; height: 14px; border-radius: 999px; background: #4A4A4A; overflow: hidden; border: 1px solid #333; }
.baiyh-bar-fill { height: 100%; background: #EEFF00; border-radius: 999px; transition: width 0.6s ease; }
.baiyh-pct { font-size: 12px; white-space: nowrap; color: var(--text-secondary); min-width: 40px; text-align: right; }
.baiyh-meta { font-size: 12px; line-height: 1.5; }
.baiyh-admin-edit { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.baiyh-admin-edit input { width: 78px; padding: 6px 8px; font-size: 13px; }
#baiyh-admin h3 { margin: 16px 0 10px; }
#tab-accuracy .baiyh-card { max-width: none; }

/* ============ 交易大厅（CDK + 非CDK 上下满宽双卡片） ============ */
.trade-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.tab .trade-card { max-width: none; margin: 0; }
.tab .trade-card .ex-publish-card { margin-bottom: 20px; }

/* ============ DKP系统 ============ */
.dkp-top {
  display: grid;
  grid-template-columns: minmax(0, 340px) repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}
.tab .dkp-top .card { max-width: none; margin: 0; }
@media (max-width: 1100px) {
  .dkp-top { grid-template-columns: minmax(0, 1fr); }
}

.dkp-balance-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dkp-balance { font-size: 36px; font-weight: 700; color: var(--primary-dark); line-height: 1; }
.dkp-draws-badge { font-size: 12px; padding: 3px 10px; border-radius: 9999px; background: var(--card-hover); border: 1px solid var(--border); color: var(--text-secondary); }
.dkp-exchange-draw { border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 4px; }
.dkp-exchange-draw p { margin: 0 0 10px; }
.dkp-exchange-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.dkp-exchange-row label { display: flex; flex-direction: column; gap: 6px; width: 140px; margin-bottom: 0; }
.dkp-exchange-row button { white-space: nowrap; }

.dkp-announce-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.dkp-announce-item:last-child { border-bottom: none; }
.dkp-announce-item p { margin: 0 0 4px; white-space: pre-wrap; word-break: break-word; }

.dkp-clown-item { padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--danger); border-radius: 8px; background: #FFF7F7; margin-bottom: 10px; }
.dkp-clown-item:last-child { margin-bottom: 0; }
.dkp-clown-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.dkp-clown-head strong { color: var(--danger-dark); }
.dkp-clown-item p { margin: 0; font-size: 13px; color: var(--text-secondary); word-break: break-word; }

.tab .dkp-prize-card { max-width: none; margin-bottom: 24px; }
.dkp-prize-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 14px 0 6px; }
.dkp-prize-form label { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.dkp-prize-form .dkp-prize-desc { min-width: 220px; flex: 1; }
.dkp-prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.dkp-prize-item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.dkp-prize-item .item-icon { width: 32px; height: 32px; }
.dkp-prize-name { font-weight: 600; color: var(--text); }
.dkp-prize-cost { font-weight: 700; color: var(--primary-dark); }
.dkp-prize-item .claim-btn { margin-top: 4px; }
.dkp-prize-item .claim-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dkp-prize-removed { opacity: 0.6; }
.dkp-badge-removed { position: absolute; top: 10px; right: 10px; font-size: 12px; color: var(--danger); border: 1px solid var(--danger); border-radius: 9999px; padding: 1px 8px; }
.dkp-prize-item .claim-btn.reject { margin-top: 0; }

.tab .dkp-admin-card { max-width: none; margin-bottom: 24px; }
.dkp-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.dkp-admin-block { border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.dkp-admin-block h3 { margin: 0 0 10px; font-size: 15px; }
.dkp-admin-block label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.dkp-admin-block textarea { margin-bottom: 10px; }
.dkp-admin-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.dkp-admin-item-row:last-child { border-bottom: none; }
.dkp-admin-item-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dkp-admin-item-row .claim-btn { padding: 3px 10px; font-size: 12px; flex-shrink: 0; }

.dkp-points-plus { color: var(--ok); font-weight: 600; }
.dkp-points-minus { color: var(--danger); font-weight: 600; }
.explive-note-preview { margin: 4px 0 0; font-size: 12px; color: var(--primary-dark); word-break: break-all; }
.explive-note-preview:empty { display: none; }

/* ============ 勋章系统：角色名下方炫彩勋章名 ============ */
.medal-user { display: inline-flex; flex-direction: column; align-items: flex-start; vertical-align: baseline; }
.medal-line { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; margin-top: 1px; }
.medal-item { display: inline-flex; align-items: center; gap: 3px; }
.medal-icon { width: 14px; height: 14px; object-fit: contain; flex: none; }
.medal-name-text {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  background: linear-gradient(90deg, #FF5E5E, #FF9D3C, #FFE93C, #5EFF7B, #3CD6FF, #7A5EFF, #FF5EC4, #FF5E5E);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: medalRainbow 4s linear infinite;
}
@keyframes medalRainbow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
/* 导航栏用户按钮内勋章行更紧凑 */
.nav-user-btn .medal-name-text { font-size: 10px; }
.nav-user-btn .medal-icon { width: 11px; height: 11px; }
.nav-user-btn .medal-line { gap: 2px 6px; }
@media (prefers-reduced-motion: reduce) {
  .medal-name-text,
  .lucky-badge.legendary,
  .lucky-pool-card.tier-legendary::before,
  .lucky-pool-modal-card.tier-legendary::before,
  .lucky-result.result-legendary .lucky-win-title { animation: none; }
}

/* 授勋弹窗（权限管理卡，勋章名可自定义） */
.medal-modal-panel { max-width: 520px; width: 92vw; }
.medal-modal-section { margin: 10px 0; }
.medal-modal-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.medal-modal-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; align-items: center; }
.medal-chip {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  background: #FFFDF9;
  color: var(--text-secondary);
  text-shadow: none;
  cursor: pointer;
  transition: all 0.15s;
}
.medal-chip:hover { border-color: var(--primary); color: var(--primary-dark); box-shadow: none; }
.medal-chip.active {
  border-color: var(--primary-dark);
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  color: #fff;
}
.medal-custom-row { display: flex; gap: 8px; }
.medal-custom-row input { flex: 1; min-width: 0; }
.medal-custom-row button { flex: none; }
@media (max-width: 480px) { .medal-custom-row { flex-direction: column; } }
.medal-tags { color: #8A6D1A; font-size: 12px; line-height: 1.5; margin-bottom: 4px; word-break: break-all; }

/* ============ 攻略分享 ============ */
#tab-guides h2 { margin-top: 24px; }
#tab-guides .card { max-width: none; margin: 0; }
#tab-guides .guide-card { margin: 0 0 18px; }
#tab-guides .guide-pending-card { margin: 0 0 16px; }
.guide-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.guide-publish-card { flex: 1 1 480px; }
.guide-admin-card { flex: 0 1 340px; }
.guide-publish-card textarea { resize: vertical; }
.guide-admin-block h3 { margin: 14px 0 6px; font-size: 14px; }
.guide-admin-block h3:first-child { margin-top: 0; }

.guide-card { max-width: none; margin-bottom: 14px; }
.guide-card.guide-featured {
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.18), 0 1px 4px rgba(212, 175, 55, 0.12);
}
.guide-card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; cursor: pointer; user-select: none; }
.guide-card-title { margin: 0; font-size: 17px; line-height: 1.4; word-break: break-all; }
/* 折叠/展开：默认只显示标题，点击标题展开正文；同时只展开一张 */
.guide-card-extra { display: none; }
.guide-card.guide-expanded .guide-card-extra { display: block; }
.guide-fold-arrow { flex: none; margin-left: auto; font-size: 13px; color: var(--text-secondary); transition: transform 0.15s ease; }
.guide-card.guide-expanded .guide-fold-arrow { transform: rotate(90deg); }
.guide-featured-badge {
  flex: none;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
  color: #7A5A00;
  background: linear-gradient(180deg, #FFE9A8 0%, #FFD45E 100%);
  border: 1px solid var(--gold);
  white-space: nowrap;
}
.guide-card-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 10px;
}
.guide-card-meta { font-size: 12px; margin-bottom: 6px; }
.guide-card-stats { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 8px; font-size: 12px; color: var(--text-secondary); }
.guide-stat { color: var(--primary-dark); }
.guide-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* #标签 图标徽标：物品/怪物/NPC/地图 */
.mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  margin: 1px 2px;
  padding: 1px 8px 1px 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  background: #FFFDF9;
  color: var(--primary-dark);
  white-space: nowrap;
}
.mention-chip img { width: 22px; height: 22px; object-fit: contain; flex: none; image-rendering: pixelated; }
.mention-chip.mention-item { border-color: #BBD8F5; background: #F3F9FF; color: #1D5FA8; }
.mention-chip.mention-monster { border-color: #F5C1BB; background: #FFF4F2; color: #A82D1D; }
.mention-chip.mention-npc { border-color: #C8ECC6; background: #F4FCF3; color: #1D7A28; }
.mention-chip.mention-map { border-color: #E3C8F0; background: #FAF3FF; color: #6B2DA8; }

/* 评论 / 打赏面板 */
.guide-comments-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.guide-tip-records { font-size: 12px; line-height: 1.8; margin-bottom: 8px; }
.guide-comment { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.guide-comment:last-child { border-bottom: none; }
.guide-comment-head { font-size: 12px; margin-bottom: 2px; }
.guide-comment p { margin: 0; font-size: 13px; line-height: 1.7; word-break: break-all; }
.guide-comment-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-start; }
.guide-comment-form textarea { flex: 1; min-width: 0; resize: vertical; }
.guide-comment-form button { flex: none; }

.guide-more { text-align: center; margin-top: 4px; }
.guide-more button { min-width: 160px; }

/* 发布框 # 联想列表 */
.guide-mention-list {
  display: none;
  position: relative;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFFDF9;
  box-shadow: 0 4px 14px rgba(61, 36, 21, 0.12);
}
.guide-mention-group {
  padding: 5px 12px 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  position: sticky;
  top: 0;
}
.guide-mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.guide-mention-item:hover { background: var(--card-hover); }
.guide-mention-item img { width: 24px; height: 24px; object-fit: contain; flex: none; image-rendering: pixelated; }
