/* ==========================================================================
   Lineage Remastered Marketplace - Core Design System & Styles
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #0a0d14;
  --bg-card: rgba(18, 24, 36, 0.68);
  --bg-card-hover: rgba(23, 33, 50, 0.78);
  --bg-elevated: #1a2233;
  --bg-subtle: #242f44;
  --bg-input: #0e141f;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-gold: rgba(229, 169, 59, 0.35);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accent Colors */
  --gold-primary: #e5a93b;
  --gold-hover: #f3be5d;
  --gold-glow: rgba(229, 169, 59, 0.25);
  --gold-gradient: linear-gradient(135deg, #f59e0b, #e5a93b 60%, #b45309);

  /* Grades (Official Lineage Remaster System) */
  --grade-unique: #00f0ff;
  --grade-mythic: #ff7700;
  --grade-legend: #a855f7;
  --grade-hero: #ef4444;
  --grade-rare: #3b82f6;
  --grade-adv: #10b981;
  --grade-normal: #94a3b8;

  /* Functional */
  --blue-primary: #2563eb;
  --blue-hover: #1d4ed8;
  --green-deal: #10b981;
  --red-tag: #ef4444;

  /* Layout */
  --header-height: 72px;
  --sidebar-width: 290px;
  --container-max: 1400px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 20px rgba(229, 169, 59, 0.2);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  isolation: isolate;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  /* 공식 리니지 리마스터 업데이트 아트워크를 읽기 쉬운 어두운 배경으로 사용 */
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.character-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #080c13;
}

.character-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 15, .24) 0%, rgba(8, 12, 19, .45) 48%, rgba(10, 13, 20, .78) 100%),
              linear-gradient(90deg, rgba(8, 12, 19, .48), rgba(8, 12, 19, .12) 50%, rgba(8, 12, 19, .48));
}

.character-backdrop-layer {
  position: absolute;
  top: 0;
  width: 38vw;
  height: min(100vh, 900px);
  object-fit: cover;
  object-position: center 18%;
  opacity: .58;
  filter: saturate(1.08) brightness(1.08);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.92) 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.92) 72%, transparent 100%);
  transition: opacity 1.6s ease;
}

.character-backdrop-layer:nth-child(1) { left: 2%; }
.character-backdrop-layer:nth-child(2) { left: 31%; opacity: .42; }
.character-backdrop-layer:nth-child(3) { right: 2%; }
.character-backdrop-layer.is-changing { opacity: 0; }

@media (max-width: 767px) {
  .character-backdrop-layer { top: 0; width: 72vw; height: 680px; opacity: .4; }
  .character-backdrop-layer:nth-child(1) { left: -24%; }
  .character-backdrop-layer:nth-child(2) { left: 14%; opacity: .3; }
  .character-backdrop-layer:nth-child(3) { right: -23%; }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 13, 20, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-normal);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gold-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0f19;
  font-weight: 900;
  font-size: 19px;
  box-shadow: 0 0 15px var(--gold-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff 0%, #ffd480 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0 45px 0 16px;
  font-size: 14px;
  color: #fff;
  transition: all var(--transition-fast);
}

.header-search input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.header-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.btn-header-action[hidden] { display: none; }

.btn-header-action:hover {
  background: var(--bg-subtle);
  border-color: var(--border-medium);
}

.btn-sell-register {
  background: var(--gold-gradient);
  color: #0c0f17;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 12px rgba(229, 169, 59, 0.28);
}

.btn-sell-register:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-header-edit { border-color: rgba(245,158,11,.45); color: #fbbf24; }
.btn-header-edit:hover { border-color: rgba(245,158,11,.75); background: rgba(245,158,11,.1); }
.character-edit-picker-overlay { position: fixed; inset: 0; z-index: 11000; display: grid; place-items: center; padding: 18px; background: rgba(3,7,12,.78); }
.character-edit-picker { width: min(620px,100%); max-height: min(760px,88dvh); display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; padding: 20px; border: 1px solid var(--gold-primary); border-radius: 12px; background: #111925; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.character-edit-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #f2c66c; }
.character-edit-picker-close { padding: 6px 10px; border: 1px solid var(--border-medium); border-radius: 5px; color: var(--text-main); background: var(--bg-input); cursor: pointer; }
.character-edit-picker-list { display: grid; gap: 8px; overflow-y: auto; min-height: 0; }
.character-edit-picker-item { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 11px 13px; border: 1px solid var(--border-light); border-radius: 7px; color: var(--text-main); background: var(--bg-elevated); text-align: left; cursor: pointer; }
.character-edit-picker-item:hover { border-color: var(--gold-primary); background: var(--bg-subtle); }
.character-edit-picker-item span,.character-edit-picker-empty { color: var(--text-muted); font-size: 12px; }

/* ==========================================================================
   Notice Banner / Trust Bar
   ========================================================================== */
.trust-banner {
  background: linear-gradient(90deg, #131d2e 0%, #172439 50%, #131d2e 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.trust-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-item svg {
  color: var(--gold-primary);
}

.trust-item strong {
  color: #fff;
  font-weight: 600;
}

/* ==========================================================================
   Main Layout (Marketplace View)
   ========================================================================== */
.marketplace-container {
  max-width: var(--container-max);
  margin: 28px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 32px;
  align-items: start;
}

/* ==========================================================================
   Sidebar Filter
   ========================================================================== */
.filter-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.filter-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset-filter {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
}
.btn-reset-filter:hover {
  color: var(--gold-primary);
}

.filter-section {
  margin-bottom: 22px;
}

.filter-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  background: var(--bg-subtle);
  color: #fff;
  border-color: var(--border-medium);
}

.filter-chip.active {
  background: var(--gold-primary);
  color: #0b0f19;
  font-weight: 700;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.filter-select {
  width: 100%;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13px;
  color: #fff;
  outline: none;
}
.filter-select:focus {
  border-color: var(--gold-primary);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--gold-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-label:hover {
  color: #fff;
}

/* ==========================================================================
   Marketplace Listing (Center / Right)
   ========================================================================== */
.listing-content {
  min-width: 0;
}

.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
}

.listing-count {
  font-size: 14px;
  color: var(--text-muted);
}
.listing-count strong {
  color: var(--gold-primary);
  font-size: 16px;
  font-weight: 700;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-select {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  padding: 6px 12px;
  outline: none;
}

.btn-mobile-filter {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ==========================================================================
   Character Product Cards (Shopping Mall Card UI)
   ========================================================================== */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.character-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.character-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), var(--shadow-gold);
  background: var(--bg-card-hover);
}

.card-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #090d14;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.character-card:hover .card-img {
  transform: scale(1.05);
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.badge-server {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge-status.selling {
  background: #10b981;
  color: #052e16;
}
.badge-status.reserved {
  background: #f59e0b;
  color: #451a03;
}
.badge-status.sold {
  background: #64748b;
  color: #0f172a;
}

.card-like-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--transition-fast);
}

.card-like-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.card-like-btn.liked {
  color: #ef4444;
}

.card-level-banner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(10, 13, 20, 0.95) 0%, rgba(10, 13, 20, 0) 100%);
  padding: 16px 14px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.card-class-level {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.card-class-level .exp-text {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  margin-left: 4px;
}

/* Card Body */
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #e2e8f0;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
}

/* Skill Grade Badges Row */
.card-skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 4px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}
.skill-tag.unique {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}
.skill-tag.mythic {
  background: rgba(255, 119, 0, 0.16);
  color: #ff8800;
  border: 1px solid rgba(255, 119, 0, 0.45);
  box-shadow: 0 0 8px rgba(255, 119, 0, 0.25);
}
.skill-tag.legend {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25);
}
.skill-tag.hero {
  background: rgba(239, 68, 68, 0.16);
  color: #ff4d66;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}
.skill-tag.rare {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.2);
}
.skill-tag.adv {
  background: rgba(34, 197, 94, 0.16);
  color: #34d399;
  border: 1px solid rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.2);
}
.skill-tag.normal {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.skill-tag-names {
  font-weight: 500;
  opacity: 0.92;
  margin-left: 2px;
  font-size: 10.5px;
  letter-spacing: -0.3px;
}

/* Equipment summary pills */
.card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.highlight-pill {
  font-size: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Card Price and Action */
.card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-wrap {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 11px;
  color: var(--text-dim);
}

.price-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: -0.5px;
}

.btn-card-detail {
  padding: 8px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  transition: all var(--transition-fast);
}

.character-card:hover .btn-card-detail {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #0b0f19;
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Card Meta (Time / Views) */
.card-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ==========================================================================
   Character Detail Page View (Product Detail Page)
   ========================================================================== */
.detail-view {
  display: none;
  max-width: var(--container-max);
  margin: 24px auto;
  padding: 0 24px 60px;
}

.detail-view.active {
  display: block;
}

/* Breadcrumb navigation */
.detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.detail-nav-bar > strong { flex: 1 1 180px; }

.detail-status-select {
  min-width: 124px;
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background: var(--bg-card);
  font: inherit;
}

.btn-back-to-list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-back-to-list:hover {
  color: #fff;
  background: var(--bg-elevated);
  border-color: var(--border-medium);
}

/* Detail Top Section: 2 Columns (Left: Class Image & Seller / Right: Buy Box & Full Specs) */
.detail-top-grid {
  display: grid;
  grid-template-columns: minmax(330px, 31%) minmax(0, 1fr);
  gap: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  align-items: start;
}

/* Left: Class Image Gallery Panel */
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 20px;
}

.gallery-main-img-box {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-medium);
  background: #090c13;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
}

.gallery-main-img-box:hover .gallery-main-img {
  transform: scale(1.03);
}

.gallery-badges {
  position: static;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 0;
}

.gallery-badges > span {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.gallery-badges .badge-server {
  background: #111827;
  border: 1px solid var(--border-medium);
  color: #e2e8f0;
}

.gallery-badges .badge-status {
  justify-content: center;
  min-width: 82px;
}

.badge-character-level {
  grid-column: 1 / -1;
  background: rgba(229, 169, 59, 0.08);
  color: var(--gold-primary);
  border: 1px solid rgba(229, 169, 59, 0.42);
}

/* Right: Full Specs Text Panel (Inside Right Buy Column) */
.detail-spec-text-panel {
  background: #090e18;
  border: 1px solid rgba(229, 169, 59, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  margin-top: 4px;
}

.spec-text-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.spec-text-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-text-badge {
  background: var(--gold-primary);
  color: #0b0f19;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.spec-text-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.btn-copy-spec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-medium);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-spec:hover {
  background: var(--gold-primary);
  color: #0b0f19;
  border-color: var(--gold-primary);
}

.spec-text-body {
  flex: 1;
  overflow-y: auto;
  max-height: 480px;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-text-body::-webkit-scrollbar {
  width: 5px;
}
.spec-text-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.spec-sheet-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.spec-sheet-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-sheet-row {
  display: flex;
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.spec-sheet-row:last-child {
  margin-bottom: 0;
}

.spec-sheet-row .st-k {
  width: 100px;
  flex-shrink: 0;
  color: var(--text-dim);
  font-weight: 600;
}

.spec-sheet-row .st-v {
  flex: 1;
  color: #e2e8f0;
  word-break: break-all;
}

.spec-sheet-row .st-v.highlight {
  color: var(--gold-primary);
  font-weight: 700;
}

.st-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.st-skill-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.st-skill-tag.mythic { color: #fb923c; border-color: rgba(255, 119, 0, 0.4); }
.st-skill-tag.legend { color: #c084fc; border-color: rgba(168, 85, 247, 0.4); }
.st-skill-tag.hero { color: #f87171; border-color: rgba(239, 68, 68, 0.4); }
.st-skill-tag.rare { color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); }
.st-skill-tag.adv { color: #4ade80; border-color: rgba(34, 197, 94, 0.4); }

.spec-text-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Section 1: Separate Individual Spec Cards */
.spec-cards-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.spec-indie-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.spec-indie-card:hover {
  border-color: rgba(229, 169, 59, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.spec-indie-head {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-indie-body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* 상세 스펙 카드 앞의 장식용 소형 아이콘은 제거하고 내용부터 정렬 */
.spec-indie-card > .spec-indie-body > .spec-icon-box,
.keplisha-stat-body > .spec-icon-box {
  display: none;
}

.spec-indie-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.spec-indie-value.highlight {
  color: var(--gold-primary);
  font-weight: 800;
}

.spec-card-col-2 {
  grid-column: span 2;
}

.split-spec-cards {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.split-spec-cards .spec-indie-card {
  min-width: 0;
  align-self: stretch;
}

.split-spec-cards .eye-badge-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.split-spec-cards .eye-badge {
  flex: 0 1 auto;
}

@media (max-width: 700px) {
  .spec-cards-container {
    grid-template-columns: 1fr;
  }

  .spec-card-col-2 {
    grid-column: span 1;
  }

  .split-spec-cards {
    grid-template-columns: 1fr;
  }
}

.keplisha-stat-card {
  border-color: var(--border-light);
  background: var(--bg-card);
}

.keplisha-stat-card .spec-indie-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.keplisha-source-link {
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.keplisha-source-link:hover {
  color: #e9d5ff;
  text-decoration: underline;
}

.keplisha-stat-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.keplisha-icon-box {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.18);
}

.keplisha-stat-values {
  flex: 1;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.keplisha-stat-values > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  line-height: 1.35;
}

.keplisha-stat-values span {
  color: var(--text-muted);
}

.keplisha-stat-values strong {
  color: #e9d5ff;
  text-align: right;
  overflow-wrap: anywhere;
}

.keplisha-stat-values strong.highlight {
  color: #f0abfc;
}

@media (max-width: 1100px) {
  .detail-top-grid {
    grid-template-columns: 1fr;
  }
}

/* Left: Legacy Gallery Fallback (if needed) */
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Right: Buy Area / Shopping Mall Action Box */
.detail-buy-panel {
  display: flex;
  flex-direction: column;
}

.detail-title-wrap {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.detail-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.badge-verified-deal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}

.detail-main-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 8px;
}

.detail-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* Price Box */
.detail-price-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-main {
  font-size: 26px;
  font-weight: 900;
  color: var(--gold-primary);
  letter-spacing: -1px;
}

.price-sub-info {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.price-sub-info span {
  color: #10b981;
  font-weight: 600;
}

/* Seller Profile Card */
.seller-box {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 132px);
  gap: 12px;
  align-items: center;
}

.seller-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--gold-primary);
  font-size: 18px;
}

.seller-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.seller-stats {
  font-size: 12px;
  color: var(--text-muted);
}
.seller-stats strong {
  color: #fbbf24;
}

.seller-account-type {
  min-width: 0;
  text-align: right;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Action CTA Buttons */
.detail-actions-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-actions-bottom {
  margin: 14px 0 0;
}

.detail-actions-bottom .btn-buy-inquiry,
.detail-actions-bottom .btn-detail-wish {
  height: 48px;
}

.btn-buy-inquiry {
  flex: 2;
  height: 52px;
  background: var(--gold-gradient);
  color: #090d14;
  font-size: 16px;
  font-weight: 800;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(229, 169, 59, 0.35);
  transition: all var(--transition-fast);
}

.btn-buy-inquiry:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(229, 169, 59, 0.45);
}

.btn-chat-inquiry {
  flex: 1.5;
  height: 52px;
  background: var(--blue-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-chat-inquiry:hover {
  background: var(--blue-hover);
}

.btn-detail-wish {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 20px;
  transition: all var(--transition-fast);
}

.btn-detail-wish:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* Safe Trading Notice */
.safe-trade-box {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 12px;
  color: #93c5fd;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.safe-trade-item {
  display: block;
  line-height: 1.55;
  gap: 6px;
}

.safe-trade-item strong {
  display: block;
  margin-bottom: 3px;
}

/* ==========================================================================
   Detail Tabs & Sections
   ========================================================================== */
.detail-tabs-bar {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 32px;
  position: sticky;
  top: var(--header-height);
  background: var(--bg-dark);
  z-index: 50;
  padding-top: 12px;
}

.detail-tab-btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  transition: all var(--transition-fast);
}

.detail-tab-btn:hover {
  color: #fff;
}

.detail-tab-btn.active {
  color: var(--gold-primary);
}

.detail-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Section Box Styles */
.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.section-title svg {
  color: var(--gold-primary);
}

/* Tables / Grid Layouts for Specs */
.info-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.section-heading-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.spec-cell {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.spec-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}

.spec-mini-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}

.spec-text-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-key {
  font-size: 12px;
  color: var(--text-dim);
}

.spec-val {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.spec-val.highlight {
  color: var(--gold-primary);
}

/* Emblem & Dragon Eye Badges Layout */
.spec-cell.spec-cell-badges {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 16px 14px;
}

.spec-header-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spec-badges-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.emblem-badge-list,
.eye-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

/* 각성 엠블럼 뱃지 스타일 (38px 고해상도 대형 아이콘 적용) */
.emblem-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1.5px solid rgba(234, 179, 8, 0.35);
  border-radius: 8px;
  padding: 5px 12px 5px 7px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.emblem-badge:hover {
  border-color: rgba(234, 179, 8, 0.8);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.9));
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(234, 179, 8, 0.3);
}

.emblem-badge-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.emblem-badge:hover .emblem-badge-icon {
  transform: scale(1.08);
}

.emblem-badge-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emblem-badge-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.emblem-badge-level {
  font-size: 13px;
  font-weight: 800;
  color: #fde047;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(161, 98, 7, 0.2));
  border: 1.5px solid rgba(250, 204, 21, 0.55);
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.2;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.25);
  min-width: 22px;
  text-align: center;
}

/* 용의 마안 배지 스타일 (38px 고해상도 대형 안구 아이콘 + 속성별 테마) */
.eye-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 5px 12px 5px 7px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.eye-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
}

.eye-badge-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.eye-badge:hover .eye-badge-icon {
  transform: scale(1.08);
}

.eye-badge-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.2px;
}

/* 마안 속성별 맞춤 컬러 */
.eye-badge-water {
  border-color: rgba(56, 189, 248, 0.5);
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.5), rgba(15, 23, 42, 0.9));
}
.eye-badge-water .eye-badge-name { color: #7dd3fc; }
.eye-badge-water:hover {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.35);
}

.eye-badge-fire {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, rgba(69, 10, 10, 0.5), rgba(15, 23, 42, 0.9));
}
.eye-badge-fire .eye-badge-name { color: #fca5a5; }
.eye-badge-fire:hover {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(239, 68, 68, 0.35);
}

.eye-badge-earth {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.5), rgba(15, 23, 42, 0.9));
}
.eye-badge-earth .eye-badge-name { color: #fde047; }
.eye-badge-earth:hover {
  border-color: rgba(245, 158, 11, 0.9);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(245, 158, 11, 0.35);
}

.eye-badge-wind {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.45), rgba(15, 23, 42, 0.9));
}
.eye-badge-wind .eye-badge-name { color: #86efac; }
.eye-badge-wind:hover {
  border-color: rgba(16, 185, 129, 0.9);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(16, 185, 129, 0.35);
}

.eye-badge-birth,
.eye-badge-shape,
.eye-badge-life {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(59, 7, 100, 0.45), rgba(15, 23, 42, 0.9));
}
.eye-badge-birth .eye-badge-name,
.eye-badge-shape .eye-badge-name,
.eye-badge-life .eye-badge-name { color: #d8b4fe; }

.eye-badge-black,
.eye-badge-absolute {
  border-color: rgba(244, 63, 94, 0.55);
  background: linear-gradient(135deg, rgba(76, 5, 25, 0.5), rgba(15, 23, 42, 0.9));
}
.eye-badge-black .eye-badge-name,
.eye-badge-absolute .eye-badge-name { color: #fda4af; }

/* 이동 부적 배지 스타일 (환부, 금부 등) */
.eye-badge.charm-badge {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(46, 16, 101, 0.4), rgba(15, 23, 42, 0.9));
}

.eye-badge.charm-badge:hover {
  border-color: rgba(192, 132, 252, 0.85);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.5), rgba(30, 41, 59, 0.95));
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(168, 85, 247, 0.35);
}

.eye-badge.charm-badge.charm-hwanbu {
  border-color: rgba(168, 85, 247, 0.6);
}
.eye-badge.charm-badge.charm-hwanbu .eye-badge-name {
  color: #e9d5ff;
}

.eye-badge.charm-badge.charm-geumbu {
  border-color: rgba(234, 179, 8, 0.6);
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.35), rgba(15, 23, 42, 0.9));
}
.eye-badge.charm-badge.charm-geumbu .eye-badge-name {
  color: #fef08a;
}

/* Combat Stats Grid (STR, DEX, HP, AC, 대감...) */
.combat-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.combat-stat-card {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.stat-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stat-header {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

.stat-mini-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}

.stat-number {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

/* Item Slot Card (Weapon, Armor, Accessories) */
.item-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.item-slot-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all var(--transition-fast);
}

.item-slot-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-subtle);
}

.item-slot-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: radial-gradient(circle, #1a2336 0%, #0d121c 100%);
  border: 2px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
}
.item-slot-icon.unique { border-color: var(--grade-unique); color: var(--grade-unique); box-shadow: 0 0 10px rgba(0, 240, 255, 0.35); }
.item-slot-icon.mythic { border-color: var(--grade-mythic); color: var(--grade-mythic); box-shadow: 0 0 10px rgba(255, 119, 0, 0.35); }
.item-slot-icon.legend { border-color: var(--grade-legend); color: var(--grade-legend); box-shadow: 0 0 10px rgba(168, 85, 247, 0.35); }
.item-slot-icon.hero { border-color: var(--grade-hero); color: var(--grade-hero); box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
.item-slot-icon.rare { border-color: var(--grade-rare); color: var(--grade-rare); box-shadow: 0 0 6px rgba(59, 130, 246, 0.25); }
.item-slot-icon.adv { border-color: var(--grade-adv); color: var(--grade-adv); box-shadow: 0 0 6px rgba(16, 185, 129, 0.25); }
.item-slot-icon.normal { border-color: var(--grade-normal); color: var(--grade-normal); }

.item-slot-icon img,
.item-slot-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  transition: transform 0.2s ease;
}

.item-slot-card:hover .item-slot-icon img {
  transform: scale(1.08);
}

.item-slot-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-slot-type {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.item-slot-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}

.item-name-line {
  display: block;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.item-slot-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.engraved-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 1px 6px;
  border-radius: 3px;
}

/* Crafting Stones (세공석) */
.crafting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.crafting-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
}

.crafting-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crafting-options-list,
.crafting-opt-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crafting-options-list li,
.crafting-opt-list li {
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

/* Refining Stones (제련석) */
.refining-table {
  width: 100%;
  border-collapse: collapse;
}

.refining-table th, .refining-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.refining-table th:nth-child(1) { width: 18%; }
.refining-table th:nth-child(2) { width: 22%; }
.refining-table th:nth-child(3) { width: 10%; }

.refining-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  text-align: left;
  font-weight: 600;
}

.refining-table td {
  background: var(--bg-card);
  color: #e2e8f0;
}

.refining-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(229, 169, 59, 0.15);
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 12px;
}

/* Relics (성물 & 전리품) */
.relics-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.relic-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.relic-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffd480;
  margin-bottom: 4px;
}

.relic-effect {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals (Purchase Inquiry & Register Character)
   ========================================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.register-modal-box { max-width: 960px; }
.register-page-view { display: none; width: min(1180px, calc(100% - 32px)); margin: 28px auto 80px; }
.register-page-view.active { display: block; }
.register-page-view .register-modal-box { max-width: none; max-height: none; overflow: visible; border: 0; background: transparent; box-shadow: none; }
.register-page-view .modal-head { position: sticky; top: 64px; z-index: 30; padding: 14px 0; border: 0; border-bottom: 1px solid var(--border-medium); border-radius: 0; background: rgba(10, 15, 25, .97); backdrop-filter: blur(12px); }
.register-page-kicker { display: block; margin-bottom: 4px; color: var(--gold-primary); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.register-section-nav { position: sticky; top: 135px; z-index: 29; overflow-x: auto; background: rgba(10, 15, 25, .96); }
.register-section-nav a { flex: 0 0 auto; color: var(--text-muted); text-decoration: none; }
.register-section-nav a:hover { background: rgba(245,158,11,.1); color: #fbbf24; }
.register-page-view .modal-body { display: grid; gap: 20px; padding: 24px 0; }
.register-editor-section { scroll-margin-top: 205px; }
.register-editor-section-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.register-editor-section-head > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border: 1px solid rgba(245,158,11,.4); border-radius: 8px; background: rgba(245,158,11,.09); color: #fbbf24; font-size: 12px; font-weight: 800; }
.register-editor-section-head h4 { margin: 0 0 4px; color: #fff; font-size: 18px; }
.register-editor-section-head p { margin: 0; color: var(--text-muted); font-size: 12px; }
.register-basic-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.register-basic-grid > .form-group { min-height: 118px; padding: 16px; border: 1px solid var(--border-light); border-radius: 9px; background: var(--bg-elevated); }
.register-basic-grid > .form-group:first-child, .register-basic-grid > .form-group:last-child { grid-column: 1 / -1; }
.register-field-pair { display: contents; }
.register-field-pair .form-group, .register-basic-grid > .form-group { margin: 0; }
.register-page-view .reg-custom-details { margin: 0; }
.register-page-view .reg-selection-builder { margin: 0; padding: 0; border: 0; background: transparent; }
.register-page-view .reg-slot-section-primary { padding: 0; border: 0; background: transparent; }
.register-page-view .reg-selection-row { min-height: 220px; padding: 52px 14px 14px; border-color: var(--border-light); background: var(--bg-elevated); }
.register-page-view .reg-selection-row::before { top: 16px; font-size: 14px; }
.register-page-view .reg-selection-card-icon { top: 10px; }
.register-page-view .reg-selection-row .form-input, .register-page-view .reg-selection-row .form-select { min-height: 39px; }
.register-page-view .reg-slot-section { padding: 20px 0; }
.register-page-view .reg-slot-section + .reg-slot-section, .register-page-view .reg-optional-equipment + .reg-slot-section { margin-top: 18px; }
.register-editor-details { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-light); }
.register-editor-details > summary { margin-bottom: 14px; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.register-editor-details .form-group { margin: 0; padding: 13px; border: 1px solid var(--border-light); border-radius: 9px; background: var(--bg-elevated); }
.register-page-view .modal-footer { position: sticky; bottom: 0; z-index: 30; padding: 14px 20px; border: 1px solid var(--border-medium); border-radius: 10px; background: rgba(10,15,25,.96); backdrop-filter: blur(12px); }
body.register-editor-open .trust-banner, body.register-editor-open #marketplace-view, body.register-editor-open #detail-view { display: none !important; }
.reg-custom-details { margin: 18px 0; padding: 14px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.reg-custom-details h4 { margin: 0 0 6px; }
.reg-custom-details p { margin: 0 0 12px; color: var(--text-dim); font-size: 13px; }
.reg-selection-builder { margin: 14px 0 20px; padding: 14px; border: 1px solid rgba(245, 158, 11, .28); border-radius: var(--radius-sm); background: rgba(245, 158, 11, .035); }
.reg-selection-builder h5 { margin: 0 0 6px; font-size: 14px; }
.reg-selection-sections { display: grid; gap: 18px; }
.reg-slot-section { padding-top: 14px; border-top: 1px solid var(--border-light); }
.reg-slot-section-primary { padding: 14px; border: 1px solid rgba(245, 158, 11, .38); border-radius: 10px; background: rgba(245, 158, 11, .045); }
.reg-slot-section-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 10px; }
.reg-slot-section-head strong { color: #fff; font-size: 15px; }
.reg-slot-section-head span { color: var(--text-muted); font-size: 12px; }
.reg-slot-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.reg-selection-row { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 44px 10px 10px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-card); }
.reg-selection-row::before { content: attr(data-card-title); position: absolute; top: 13px; left: 48px; color: #fff; font-size: 13px; font-weight: 700; }
.reg-selection-card-icon { position: absolute; top: 8px; left: 10px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(245, 158, 11, .32); border-radius: 7px; background: rgba(245, 158, 11, .08); color: #fbbf24; }
.reg-selection-card-icon svg { width: 22px; height: 22px; }
.reg-selection-row .selection-type, .reg-selection-row .selection-slot { grid-column: span 1; }
.reg-selection-row .selection-name, .reg-selection-row .selection-name-custom, .reg-selection-row .selection-option { grid-column: 1 / -1; }
.reg-selection-row .selection-name-custom { padding-left: 34px; background-image: radial-gradient(circle at 17px 50%, transparent 5px, #64748b 6px, #64748b 7px, transparent 8px), linear-gradient(45deg, transparent 47%, #64748b 48%, #64748b 57%, transparent 58%); background-size: 28px 100%, 8px 8px; background-position: 0 0, 23px 62%; background-repeat: no-repeat; }
.reg-selection-row > .btn-import-manual { position: absolute; top: 8px; right: 8px; padding: 5px 8px; border-color: transparent; color: var(--text-muted); font-size: 11px; }
.reg-selection-row .form-input, .reg-selection-row .form-select { min-width: 0; width: 100%; }
.reg-add-slot { margin-top: 10px; }
.reg-optional-equipment { padding: 12px 14px; border: 1px solid var(--border-light); border-radius: 9px; background: rgba(255,255,255,.015); }
.reg-optional-equipment summary { color: var(--text-dim); font-size: 13px; font-weight: 700; cursor: pointer; }
.reg-optional-equipment[open] summary { margin-bottom: 8px; color: #fff; }
.reg-optional-equipment > p { margin-bottom: 10px; }
.detail-optional-equipment { margin-top: 24px; padding: 14px 16px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: rgba(255,255,255,.015); }
.detail-optional-equipment summary { color: var(--text-dim); font-size: 13px; font-weight: 700; cursor: pointer; }
.detail-optional-equipment[open] summary { margin-bottom: 14px; color: #fff; }
.optional-info-empty { padding: 14px 16px; border: 1px dashed var(--border-light); border-radius: var(--radius-sm); color: var(--text-dim); font-size: 13px; }
.reg-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.reg-detail-grid .form-group { min-width: 0; }
.reg-detail-grid .form-textarea { min-height: 82px; }
.reg-custom-row { display: grid; grid-template-columns: 110px minmax(0,1fr) minmax(0,1fr) auto; gap: 8px; margin: 8px 0; }
.custom-detail-category, .custom-detail-name, .custom-detail-value { min-width: 0; }
.custom-detail-display { margin: 18px 0; padding: 16px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.custom-detail-display h3 { margin: 0 0 12px; }
.custom-detail-display > div { display: grid; gap: 8px; }
.custom-detail-display article { display: grid; grid-template-columns: 100px minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.bound-items-display article { grid-template-columns: minmax(0,1fr) auto; }
@media (max-width: 600px) { .reg-detail-grid, .reg-slot-card-grid { grid-template-columns: 1fr; } .reg-selection-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reg-slot-section-head { align-items: flex-start; flex-direction: column; gap: 3px; } .reg-custom-row { grid-template-columns: 1fr 1fr; } .custom-detail-display article { grid-template-columns: 1fr; gap: 3px; } }
@media (max-width: 720px) { .register-page-view { width: min(100% - 20px, 1180px); margin-top: 12px; } .register-page-view .modal-head { top: 58px; padding: 14px; } .register-section-nav { top: 126px; padding: 8px 12px; } .register-editor-section { padding: 14px; } .register-basic-grid, .register-field-pair { grid-template-columns: 1fr; } .register-basic-grid > .form-group:first-child, .register-basic-grid > .form-group:last-child { grid-column: auto; } }
.import-panel { margin-bottom: 22px; padding: 18px; border: 1px solid rgba(245, 158, 11, .35); border-radius: 10px; background: rgba(245, 158, 11, .06); }
.import-panel[hidden], .import-review[hidden] { display: none; }
.import-panel h4 { margin: 0 0 6px; color: #fff; font-size: 16px; }
.import-panel p, .register-local-note { margin: 0 0 12px; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.import-source { min-height: 220px; resize: vertical; line-height: 1.5; }
.import-panel-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.import-panel-actions span { color: var(--text-muted); font-size: 12px; }
.btn-import-manual { background: transparent; border: 1px solid var(--border-medium); border-radius: 7px; padding: 9px 12px; color: #fff; cursor: pointer; }
.btn-import-manual:hover { border-color: #fbbf24; }
.import-review { margin-top: 16px; border-top: 1px solid var(--border-medium); padding-top: 14px; }
.import-review > strong { display: block; color: #fff; font-size: 14px; margin-bottom: 10px; }
.import-issue { display: flex; gap: 10px; padding: 10px 12px; margin-top: 8px; border-radius: 8px; border: 1px solid var(--border-medium); background: var(--bg-input); color: #dbeafe; font-size: 12px; line-height: 1.45; }
.import-issue.required { border-color: rgba(239, 68, 68, .5); }
.import-issue.required.resolved { border-color: rgba(34, 197, 94, .45); }
.import-issue.required.resolved .import-issue-marker { color: #4ade80; }
.import-issue.review { border-color: rgba(245, 158, 11, .4); }
.import-issue input { margin-top: 2px; accent-color: #f59e0b; }
.import-issue strong { display: block; font-size: 13px; color: #fff; }
.import-issue small { display: block; color: var(--text-muted); margin-top: 2px; font-size: 11px; }
.import-review-message { margin-top: 10px; color: #fca5a5; font-size: 12px; min-height: 1.4em; }
.register-local-note { margin: 0; }
.phone-check-panel { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border-medium); border-radius: 8px; background: var(--bg-input); color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.phone-check-panel strong { color: #fff; }
.phone-check-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.phone-check-links a, .phone-check-links button { color: #fbbf24; border: 1px solid rgba(245, 158, 11, .4); border-radius: 6px; padding: 4px 8px; text-decoration: none; background: transparent; font: inherit; cursor: pointer; }
.phone-check-links a:hover, .phone-check-links button:hover { background: rgba(245, 158, 11, .12); }
.item-icon-unverified { color: #fbbf24; font-size: 24px; font-weight: 800; line-height: 1; }
.import-detail-warning { margin: 0 0 12px; color: #fbbf24; font-size: 13px; }
.import-detail-list { margin: 0; padding: 14px 18px 14px 32px; color: #dbeafe; border: 1px solid rgba(245, 158, 11, .35); border-radius: 8px; background: rgba(245, 158, 11, .06); line-height: 1.7; font-size: 13px; }
.character-image-pending { width: 100%; min-height: 240px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #111827, #1f2937); color: #94a3b8; font-size: 13px; }
.btn-buy-inquiry:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.4); }
.btn-edit-my-listing { margin-left: auto; padding: 8px 12px; border: 1px solid rgba(245, 158, 11, .5); border-radius: 7px; color: #fbbf24; background: rgba(245, 158, 11, .08); cursor: pointer; }
.btn-edit-my-listing:hover { background: rgba(245, 158, 11, .16); }
.btn-delete-my-listing { margin-left: auto; padding: 8px 12px; border: 1px solid rgba(248, 113, 113, .5); border-radius: 7px; color: #fca5a5; background: rgba(239, 68, 68, .1); cursor: pointer; }
.btn-delete-my-listing:hover { background: rgba(239, 68, 68, .2); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.modal-close-btn {
  font-size: 22px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.modal-close-btn:hover {
  background: var(--bg-elevated);
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.5;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: #fff;
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-elevated);
}

.btn-modal-cancel {
  padding: 10px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-modal-submit {
  padding: 10px 22px;
  background: var(--gold-gradient);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: #0b0f19;
  box-shadow: 0 2px 10px rgba(229, 169, 59, 0.3);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--gold-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1100px) {
  .marketplace-container {
    grid-template-columns: 240px 1fr;
    gap: 20px;
  }
  .detail-top-grid {
    grid-template-columns: 380px 1fr;
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .marketplace-container {
    grid-template-columns: 1fr;
    margin: 16px auto;
  }

  .filter-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    overflow-y: auto;
    border-radius: 0;
    border: none;
  }

  .filter-sidebar.mobile-open {
    display: block;
  }

  .btn-mobile-filter {
    display: flex;
  }

  .detail-top-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .gallery-main-img-box {
    aspect-ratio: 4 / 3;
  }

  .detail-actions-wrap {
    flex-direction: column;
  }

  .btn-buy-inquiry, .btn-chat-inquiry {
    width: 100%;
  }

  .header-search {
    display: none;
  }
}

/* ==========================================================================
   Lineage Remaster Fonts & In-Game UI Styles
   ========================================================================== */
@font-face {
  font-family: 'LineageFont';
  src: url('../image/ui/Fonts/Font_MB.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LineageFont';
  src: url('../image/ui/Fonts/Font_GEB.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.lineage-font {
  font-family: 'LineageFont', 'Pretendard', sans-serif !important;
}

/* Holy Relic Action Banner */
.relic-action-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(90deg, rgba(229, 169, 59, 0.15), rgba(30, 41, 59, 0.6));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
}

.relic-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.relic-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(229, 169, 59, 0.3);
}

.relic-banner-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.btn-open-relic-viewer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #d4af37, #f59e0b 60%, #b45309);
  color: #000;
  font-family: 'LineageFont', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  border: 1px solid #ffd700;
}

.btn-open-relic-viewer:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.55);
  filter: brightness(1.1);
}

/* In-Game Holy Relic Modal Styling */
.relic-modal-box {
  width: 980px;
  max-width: 95vw;
  max-height: 90vh;
  background: radial-gradient(circle at 50% 15%, #182236 0%, #0d121c 65%, #07090f 100%);
  border: 2px solid #c59b27;
  border-radius: 10px;
  box-shadow: 0 0 50px rgba(197, 155, 39, 0.35), 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.relic-modal-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(255, 215, 0, 0.2);
  pointer-events: none;
  border-radius: 8px;
  margin: 3px;
}

/* Modal Titlebar */
.relic-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, #25334c 0%, #172133 100%);
  border-bottom: 2px solid #b38927;
  position: relative;
}

.relic-head-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.relic-head-icon {
  width: 38px;
  height: 38px;
  background: #0d131e;
  border: 1px solid #d4af37;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.relic-head-icon img {
  width: 28px;
  height: 28px;
}

.relic-head-title {
  font-family: 'LineageFont', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 8px rgba(255, 215, 0, 0.4);
  letter-spacing: 0.5px;
}

.relic-head-subtitle {
  font-size: 12px;
  color: #94a3b8;
  display: block;
}

.relic-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.relic-close-btn img {
  width: 26px;
  height: 26px;
  display: block;
}

.relic-close-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.25);
}

/* Relic Tabs */
.relic-nav-tabs {
  display: flex;
  background: #0f1522;
  border-bottom: 1px solid rgba(197, 155, 39, 0.3);
  padding: 0 16px;
  overflow-x: auto;
}

.relic-tab-btn {
  padding: 12px 20px;
  font-family: 'LineageFont', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #8da2c0;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.relic-tab-btn:hover {
  color: #ffd700;
}

.relic-tab-btn.active {
  color: #ffd700;
  border-bottom-color: #ffd700;
  background: linear-gradient(180deg, rgba(229, 169, 59, 0.05) 0%, rgba(229, 169, 59, 0.18) 100%);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Modal Body */
.relic-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: radial-gradient(circle at 50% 30%, #161e2f 0%, #0a0d14 100%);
}

/* 1. Blessed Relics Altar View (석상 + 8개 슬롯) */
.blessed-altar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.altar-main-stage {
  display: grid;
  grid-template-columns: 1fr 340px 1fr;
  align-items: center;
  width: 100%;
  max-width: 900px;
  gap: 20px;
  margin: 10px 0 24px 0;
  position: relative;
}

/* Center Statue Column */
.altar-statue-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.altar-statue-backdrop {
  width: 220px;
  height: 380px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.altar-statue-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.3) 0%, rgba(234, 179, 8, 0.05) 60%, transparent 80%);
  filter: blur(15px);
  animation: statuePulse 4s ease-in-out infinite alternate;
}

@keyframes statuePulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.altar-statue-img {
  width: 190px;
  height: 354px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.45));
  z-index: 2;
  position: relative;
}

.altar-statue-badge {
  background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(20,25,35,0.95));
  border: 1px solid var(--gold-primary);
  border-radius: 20px;
  padding: 6px 18px;
  color: #ffd700;
  font-family: 'LineageFont', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-top: -15px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Side Slot Columns */
.altar-slots-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Single Holy Relic Card / Slot */
.holy-slot-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(18, 25, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.holy-slot-card:hover {
  background: rgba(28, 38, 56, 0.95);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 15px rgba(229, 169, 59, 0.25);
}

.holy-slot-card.equipped {
  border-color: rgba(229, 169, 59, 0.5);
  background: linear-gradient(90deg, rgba(229, 169, 59, 0.12) 0%, rgba(20, 27, 40, 0.9) 100%);
}

.holy-slot-card.equipped::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold-primary);
  box-shadow: 0 0 8px #ffd700;
}

/* The Relic Slot Frame & Icon */
.holy-slot-visual {
  width: 62px;
  height: 62px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.slot-base-bg {
  position: absolute;
  width: 58px;
  height: 58px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 6px;
  background-color: #0b0f16;
}

.slot-ring-frame {
  position: absolute;
  width: 64px;
  height: 64px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 3;
}

.holy-slot-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  z-index: 2;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.holy-slot-card:hover .holy-slot-icon {
  transform: scale(1.12);
}

.holy-slot-card:not(.equipped) .holy-slot-icon {
  filter: grayscale(1) opacity(0.35);
}

.holy-slot-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #b91c1c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  z-index: 4;
  border: 1px solid #f87171;
  box-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.holy-slot-badge.blessed-badge {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  border-color: #fde047;
  color: #000;
}

/* Slot Card Text Info */
.holy-slot-info {
  flex: 1;
  min-width: 0;
}

.holy-slot-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.holy-slot-name {
  font-family: 'LineageFont', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.holy-slot-card.equipped .holy-slot-name {
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.holy-slot-status {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.holy-slot-status.on {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.holy-slot-status.off {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.holy-slot-effect {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.3;
}

.holy-slot-card.equipped .holy-slot-effect {
  color: #cbd5e1;
}

/* 2. Enhancement Relics Grid (체가호, 염원, 오만, 십자가, 펜던트) */
.enhancement-relics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.enh-card {
  background: linear-gradient(145deg, #161e2e, #0e141f);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.enh-card:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(96, 165, 250, 0.2);
}

.enh-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.enh-card-icon-wrap {
  width: 56px;
  height: 56px;
  background: #080b11;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.enh-card-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.enh-card-title-col {
  flex: 1;
}

.enh-card-name {
  font-family: 'LineageFont', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.enh-card-stage-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.enh-card-stage-badge.max {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.enh-card-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 6px;
  border-left: 2px solid #3b82f6;
}

/* 3. Spoils & Tower Relics Grid */
.spoils-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.spoil-card {
  background: rgba(18, 24, 37, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.spoil-card:hover {
  border-color: #c084fc;
  background: rgba(27, 34, 52, 0.95);
  box-shadow: 0 0 15px rgba(192, 132, 252, 0.25);
}

.spoil-icon-box {
  width: 50px;
  height: 50px;
  background: #090c13;
  border: 1px solid #a855f7;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spoil-icon-box img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.spoil-info {
  flex: 1;
}

.spoil-name {
  font-family: 'LineageFont', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #e9d5ff;
}

.spoil-stage {
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
  margin-top: 2px;
}

/* 4. Relic Total Stats Summary Table */
.relic-summary-table-wrap {
  background: rgba(14, 20, 31, 0.85);
  border: 1px solid rgba(229, 169, 59, 0.25);
  border-radius: 8px;
  padding: 20px;
}

.relic-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.relic-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 3px solid var(--gold-primary);
}

.relic-stat-label {
  font-size: 13px;
  color: #94a3b8;
}

.relic-stat-value {
  font-family: 'LineageFont', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
}

/* In-Game Floating Tooltip (정통 리니지 리마스터 스타일 툴팁) */
.lineage-item-tooltip {
  position: fixed;
  z-index: 1000;
  width: 320px;
  background: rgba(10, 14, 22, 0.96);
  border: 2px solid #b8860b;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(184, 134, 11, 0.35);
  padding: 14px;
  color: #f1f5f9;
  font-size: 13px;
  pointer-events: none;
  backdrop-filter: blur(8px);
  animation: tooltipFade 0.15s ease-out;
}

@keyframes tooltipFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lineage-tooltip-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.3);
  margin-bottom: 10px;
}

.lineage-tooltip-icon {
  width: 44px;
  height: 44px;
  background: #000;
  border: 1px solid #d4af37;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lineage-tooltip-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.lineage-tooltip-title {
  font-family: 'LineageFont', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.lineage-tooltip-grade {
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.lineage-tooltip-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 1.5;
}

.lineage-tooltip-opt {
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 3px;
}

.lineage-tooltip-lore {
  color: #94a3b8;
  font-style: italic;
  font-size: 11px;
}

.client-item-tooltip {
  pointer-events: none;
  width: min(340px, calc(100vw - 24px));
  border-color: #4f7ba8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.88), 0 0 18px rgba(56, 189, 248, 0.18);
}

.client-tooltip-stat {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px;
  color: #b8c6d8;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.client-tooltip-stat strong { color: #7dd3fc; text-align: right; }
.client-tooltip-note { margin: 8px 0 2px; color: #fbbf24; font-size: 11px; line-height: 1.5; }
.client-tooltip-source { margin-top: 9px; color: #64748b; font-size: 10px; text-align: right; }

@media (max-width: 768px) {
  .altar-main-stage {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .altar-statue-backdrop {
    height: 240px;
  }
  
  .altar-statue-img {
    height: 220px;
  }
}

/* ==========================================================================
   Authentic Lineage Remaster In-Game Window UI (.lineage-game-window)
   ========================================================================== */
.lineage-game-window {
  background: linear-gradient(180deg, #111622 0%, #0a0d14 100%);
  border: 2px solid #5a4625;
  outline: 1px solid #1f2738;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.7);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 10px;
}

.game-win-header {
  background: linear-gradient(90deg, #1e2638 0%, #151b26 50%, #111622 100%);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #4a381d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.game-win-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'LineageFont', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

.game-win-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #94a3b8;
}

.btn-win-modal-trigger {
  background: linear-gradient(180deg, rgba(229, 169, 59, 0.2) 0%, rgba(138, 97, 24, 0.3) 100%);
  border: 1px solid #c59b27;
  color: #ffd700;
  font-family: 'LineageFont', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-win-modal-trigger:hover {
  background: #ffd700;
  color: #0b0e14;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  transform: translateY(-1px);
}

.game-win-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.game-relic-block {
  background: rgba(15, 20, 31, 0.7);
  border: 1px solid rgba(197, 155, 39, 0.2);
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.game-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.game-block-title {
  font-family: 'LineageFont', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.3px;
}

.game-block-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.game-block-badge.blessed {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.game-block-badge.enh {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.game-block-badge.spoils {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.game-slots-grid {
  display: grid;
  gap: 8px;
}

.blessed-grid {
  grid-template-columns: repeat(4, 1fr);
}

.enh-grid {
  grid-template-columns: repeat(5, 1fr);
}

.spoils-grid {
  grid-template-columns: repeat(4, 1fr);
}

.game-slot-cell {
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.game-slot-cell:hover {
  background: rgba(30, 41, 62, 0.8);
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
  transform: translateY(-2px);
}

.game-slot-cell.empty {
  opacity: 0.55;
  filter: grayscale(0.5);
}

.game-slot-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: radial-gradient(circle, #1a2233 0%, #0a0d14 100%);
  border: 1.5px solid #5a4625;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
}

.game-slot-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.game-slot-tag {
  position: absolute;
  top: 1px;
  left: 1px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 3px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.blessed-tag {
  background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
  color: #0b0e14;
}

.enh-tag {
  background: #3b82f6;
  color: #ffffff;
}

.max-tag {
  background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%);
  color: #fff;
  border: 1px solid #f87171;
}

.spoil-tag {
  background: #8b5cf6;
  color: #ffffff;
}

.game-slot-label {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 2px;
}

.game-slot-name {
  font-family: 'LineageFont', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.game-slot-opt {
  font-size: 11px;
  color: #38bdf8;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.game-slot-opt.opt-gold {
  color: #ffd700;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .blessed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .enh-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .spoils-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blessed-grid,
  .enh-grid,
  .spoils-grid {
    grid-template-columns: 1fr;
  }
}

/* Equipment Slot Official Silhouette Badge (Direct SVG) */
.slot-symbol-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(212, 175, 55, 0.08);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.slot-symbol-badge:hover {
  border-color: rgba(255, 215, 0, 0.6);
  background: rgba(212, 175, 55, 0.15);
  transform: translateY(-1px);
}

/* ==========================================================================
   Skills Section Grid & Cards (Official Lineage Remaster System)
   ========================================================================== */
.skills-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.skill-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.skill-status-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.skill-status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5px;
  height: 100%;
}
.skill-status-card.unique::before { background: var(--grade-unique); box-shadow: 0 0 8px var(--grade-unique); }
.skill-status-card.mythic::before { background: var(--grade-mythic); box-shadow: 0 0 8px var(--grade-mythic); }
.skill-status-card.legend::before { background: var(--grade-legend); box-shadow: 0 0 8px var(--grade-legend); }
.skill-status-card.hero::before { background: var(--grade-hero); box-shadow: 0 0 8px var(--grade-hero); }
.skill-status-card.rare::before { background: var(--grade-rare); box-shadow: 0 0 8px var(--grade-rare); }
.skill-status-card.adv::before { background: var(--grade-adv); box-shadow: 0 0 8px var(--grade-adv); }
.skill-status-card.normal::before { background: var(--grade-normal); }

.skill-card-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.skill-status-card.unique .skill-card-icon-box { border-color: rgba(0, 240, 255, 0.5); box-shadow: 0 0 10px rgba(0, 240, 255, 0.25); }
.skill-status-card.mythic .skill-card-icon-box { border-color: rgba(255, 119, 0, 0.5); box-shadow: 0 0 10px rgba(255, 119, 0, 0.25); }
.skill-status-card.legend .skill-card-icon-box { border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 0 10px rgba(168, 85, 247, 0.25); }
.skill-status-card.hero .skill-card-icon-box { border-color: rgba(239, 68, 68, 0.5); box-shadow: 0 0 10px rgba(239, 68, 68, 0.25); }
.skill-status-card.rare .skill-card-icon-box { border-color: rgba(59, 130, 246, 0.5); box-shadow: 0 0 8px rgba(59, 130, 246, 0.2); }
.skill-status-card.adv .skill-card-icon-box { border-color: rgba(16, 185, 129, 0.5); box-shadow: 0 0 8px rgba(16, 185, 129, 0.2); }
.skill-status-card.normal .skill-card-icon-box { border-color: rgba(148, 163, 184, 0.3); }

.skill-card-icon-box img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
}

.skill-image-note {
  margin: -4px 0 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.skill-image-note a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.skill-audit-notice {
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  background: rgba(120, 53, 15, 0.12);
  color: #fcd7a0;
  font-size: 12px;
}

.skill-audit-notice summary {
  cursor: pointer;
  font-weight: 700;
}

.skill-audit-notice ul {
  margin: 9px 0 0 18px;
  line-height: 1.65;
}

.skill-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.skill-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-card-grade-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.skill-card-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Skill Polishing System UI (안샤르의 마법 연마서 공식 시스템) */
.polishing-system-wrapper {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(229, 169, 59, 0.25);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.polishing-system-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.polishing-system-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.polishing-system-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.polishing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.polishing-card {
  background: #090e18;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.polishing-card:hover {
  border-color: rgba(229, 169, 59, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.polishing-card.mythic { border-top: 3px solid #ff7700; }
.polishing-card.legend { border-top: 3px solid #a855f7; }
.polishing-card.hero { border-top: 3px solid #ef4444; }
.polishing-card.rare { border-top: 3px solid #3b82f6; }

.polishing-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.polishing-icon-box {
  width: 48px;
  height: 48px;
  background: radial-gradient(circle, #1e293b 0%, #0a0f1d 100%);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.polishing-icon-box img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.polishing-meta {
  flex: 1;
}

.polishing-grade-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 3px;
}

.polishing-grade-tag.mythic { background: rgba(255, 119, 0, 0.2); color: #fb923c; border: 1px solid rgba(255, 119, 0, 0.4); }
.polishing-grade-tag.legend { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.polishing-grade-tag.hero { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.polishing-grade-tag.rare { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }

.polishing-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.polishing-progress-wrap {
  margin: 8px 0 12px 0;
}

.polishing-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.polishing-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.polishing-progress-fill.mythic { background: linear-gradient(90deg, #f59e0b, #ff7700); }
.polishing-progress-fill.legend { background: linear-gradient(90deg, #9333ea, #c084fc); }
.polishing-progress-fill.hero { background: linear-gradient(90deg, #dc2626, #f87171); }
.polishing-progress-fill.rare { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.polishing-progress-fill.unknown { opacity: 0; }

.polishing-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

@media (max-width: 1100px) {
  .polishing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .polishing-grid {
    grid-template-columns: 1fr;
  }
}

/* Skill Names Chips in Section 3 Cards */
.skill-card-names-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.skill-name-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.skill-name-chip.mythic {
  background: rgba(255, 119, 0, 0.15);
  border-color: rgba(255, 119, 0, 0.45);
  color: #fb923c;
  box-shadow: 0 0 6px rgba(255, 119, 0, 0.2);
}

.skill-name-chip.legend {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.45);
  color: #c084fc;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.2);
}

.skill-name-chip.hero {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}

.skill-name-chip.rare {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.45);
  color: #60a5fa;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.2);
}

.skill-name-chip.adv {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.2);
}

/* Skill Book Item Chips (클래스별 스킬북 스킬명 배지 칩) */
.skill-book-item-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  letter-spacing: -0.2px;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.skill-book-item-chip:hover {
  transform: translateY(-1px);
}

.skill-book-item-text {
  font-size: 12px;
  letter-spacing: -0.2px;
}

.skill-book-item-chip.mythic {
  background: rgba(255, 119, 0, 0.14);
  border-color: rgba(255, 119, 0, 0.45);
  color: #fb923c;
  box-shadow: 0 0 8px rgba(255, 119, 0, 0.15);
}

.skill-book-item-chip.legend {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.45);
  color: #c084fc;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.15);
}

.skill-book-item-chip.hero {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.skill-book-item-chip.rare {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.45);
  color: #60a5fa;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}

.skill-book-item-chip.adv {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.15);
}

.skill-book-item-chip.normal {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.skill-book-item-chip.empty {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

/* ========================================================================
   Detail typography scale
   제목 16px · 카드 제목 14px · 본문 13px · 보조 정보 12px
   ======================================================================== */
.detail-view {
  font-size: 13px;
}

.detail-view .section-title {
  font-size: 16px !important;
  line-height: 1.4;
  letter-spacing: -0.25px;
}

.detail-view .spec-indie-head,
.detail-view .crafting-title {
  font-size: 14px;
  line-height: 1.4;
}

.detail-view .spec-indie-value,
.detail-view .spec-val,
.detail-view .item-slot-name,
.detail-view .crafting-options-list li,
.detail-view .crafting-opt-list li,
.detail-view .refining-table th,
.detail-view .refining-table td {
  font-size: 13px;
  line-height: 1.5;
}

.detail-view .spec-key,
.detail-view .item-slot-type,
.detail-view .engraved-badge,
.detail-view .relic-effect,
.detail-view .skill-card-desc,
.detail-view .keplisha-stat-values,
.detail-view .keplisha-source-link {
  font-size: 12px;
  line-height: 1.45;
}

.detail-view .skill-card-grade-name,
.detail-view .emblem-badge-name,
.detail-view .eye-badge-name,
.detail-view .relic-name {
  font-size: 13px;
  line-height: 1.4;
}

.detail-view .skill-name-chip,
.detail-view .skill-book-item-chip,
.detail-view .st-skill-tag {
  font-size: 12px;
  line-height: 1.35;
}

/* 기본 스펙 카드 가독성 보정 */
.detail-view .spec-indie-head {
  font-size: 15px;
}

.detail-view .spec-indie-value {
  font-size: 14px;
}

.split-spec-cards .spec-indie-head {
  font-size: 16px;
}

.split-spec-cards .eye-badge,
.split-spec-cards .eye-badge.charm-badge {
  gap: 12px;
  padding: 7px 14px 7px 9px;
}

.split-spec-cards .eye-badge-icon {
  width: 42px;
  height: 42px;
}

.split-spec-cards .eye-badge-name {
  font-size: 14px;
}

/* 2열 기본 스펙 카드 확대 */
.detail-view .spec-indie-head {
  font-size: 17px;
  color: #f8fafc;
}

.detail-view .spec-indie-value {
  font-size: 16px;
  line-height: 1.45;
}

.detail-view .skill-name-chip,
.detail-view .skill-book-item-chip,
.detail-view .st-skill-tag {
  font-size: 13px;
}

.detail-view .keplisha-stat-values,
.detail-view .keplisha-source-link {
  font-size: 13px;
}

.detail-view .keplisha-stat-values strong {
  font-size: 14px;
}

.detail-view .emblem-badge-name,
.detail-view .eye-badge-name {
  font-size: 14px;
}

.auth-modal[hidden] { display: none; }
.auth-modal { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 20px; background: rgba(5, 10, 18, .78); backdrop-filter: blur(8px); }
.auth-dialog { position: relative; width: min(100%, 430px); padding: 34px; color: #f8fafc; background: linear-gradient(145deg, rgba(24, 34, 49, .98), rgba(12, 18, 29, .98)); border: 1px solid rgba(212, 163, 60, .38); border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.auth-dialog h2 { margin: 5px 0 24px; font-size: 26px; }
.auth-eyebrow { margin: 0; color: #d4a33c; font-size: 10px; letter-spacing: .18em; }
.auth-close { position: absolute; top: 12px; right: 15px; padding: 3px 8px; color: #cbd5e1; background: none; border: 0; font-size: 28px; cursor: pointer; }
.auth-dialog form label { display: block; margin: 15px 0; color: #cbd5e1; font-size: 13px; }
.auth-dialog input { display: block; box-sizing: border-box; width: 100%; margin-top: 7px; padding: 12px 13px; color: #f8fafc; background: rgba(255,255,255,.07); border: 1px solid rgba(203,213,225,.2); border-radius: 9px; outline: none; }
.auth-dialog input:focus { border-color: #d4a33c; }
.auth-dialog small { display: block; margin-top: 6px; color: #94a3b8; }
.auth-notice { padding: 10px 12px; color: #cbd5e1; background: rgba(212,163,60,.1); border-radius: 8px; font-size: 12px; line-height: 1.55; }
.auth-message { min-height: 20px; color: #fca5a5; font-size: 13px; }
.auth-submit { width: 100%; padding: 12px; color: #17130b; background: #d4a33c; border: 0; border-radius: 9px; font-weight: 800; cursor: pointer; }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-link { display: block; margin: 15px auto 0; padding: 4px; color: #e8c36b; background: none; border: 0; cursor: pointer; }
.auth-link[hidden] { display: none; }
.admin-dialog { width: min(100%, 760px); max-height: min(84vh, 900px); overflow: auto; }
.admin-dialog h2 { color: #f8fafc; }
.admin-summary, .admin-hint { color: #cbd5e1; font-size: 13px; line-height: 1.6; }
.admin-hint { padding: 11px 13px; background: rgba(212,163,60,.1); border-radius: 9px; }
.admin-add-form { display: flex; gap: 9px; margin: 18px 0; }
.admin-add-form input { flex: 1; min-width: 0; margin: 0; }
.admin-add-form select, .admin-user-row select { padding: 9px 11px; color: #f8fafc; background: #172235; border: 1px solid rgba(203,213,225,.22); border-radius: 8px; }
.admin-add-form button, .admin-user-row button { padding: 9px 13px; color: #17130b; background: #d4a33c; border: 0; border-radius: 8px; font-weight: 700; cursor: pointer; }
.admin-users { display: grid; gap: 8px; margin-top: 14px; }
.admin-user-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: rgba(255,255,255,.045); border: 1px solid rgba(203,213,225,.12); border-radius: 9px; }
.admin-user-identity { display: grid; flex: 1; gap: 3px; min-width: 0; }
.admin-user-identity strong, .admin-user-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity small { color: #94a3b8; }
.admin-role-badge { padding: 6px 9px; color: #f4d387; background: rgba(212,163,60,.16); border-radius: 99px; font-size: 12px; }
.admin-listing-section { margin: 20px 0 24px; }
.admin-listing-section h3 { margin: 0 0 12px; color: #f8fafc; font-size: 16px; }
.admin-listing-tools { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 9px; margin-bottom: 10px; }
.admin-listing-tools input, .admin-listing-tools select { min-width: 0; padding: 10px 12px; color: #f8fafc; background: #172235; border: 1px solid rgba(203,213,225,.22); border-radius: 8px; }
.admin-listings { display: grid; gap: 8px; max-height: 42vh; overflow: auto; }
.admin-listing-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: rgba(255,255,255,.045); border: 1px solid rgba(203,213,225,.12); border-radius: 9px; }
.admin-listing-details { display: grid; flex: 1; gap: 4px; min-width: 0; }
.admin-listing-details strong, .admin-listing-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-listing-details small, .admin-listing-empty { color: #94a3b8; font-size: 12px; }
.admin-listing-row button { flex: 0 0 auto; padding: 8px 10px; color: #f4d387; background: rgba(212,163,60,.1); border: 1px solid rgba(212,163,60,.35); border-radius: 8px; cursor: pointer; }
.admin-listing-row button:hover { background: rgba(212,163,60,.18); }
.auth-modal-open { overflow: hidden; }
@media (max-width: 650px) { .auth-dialog { padding: 28px 22px; } #btn-header-account { font-size: 11px; padding-inline: 8px; } .admin-listing-tools { grid-template-columns: 1fr; } .admin-listing-row { align-items: flex-start; } .admin-listing-row button { font-size: 11px; } }



.btn-win-modal-trigger {
  display: none !important;
}
