:root {
  --brand: #ff6200;
  --brand2: #e55300;
  --green: #12a868;
  --red: #ff3b30;
  --gold: #fff8e6;
  --gold-border: #f2dfb3;
  --gold-txt: #7c5812;
  --txt: #222222;
  --sub: #888888;
  --line: #eaeaea;
  --bg: #f5f6f8;
  --card: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 14px;
  transition: filter 3s ease;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--txt);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 3s ease, color 2s ease;
  padding-bottom: 56px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.wrap { width: 1180px; max-width: calc(100% - 32px); margin: 0 auto; }

/* ================= ESCALATION STATE MACHINE (lv1 -> lv2 -> lv3 -> lv5) ================= */
html[data-lv="2"] {
  filter: saturate(0.82);
}
html[data-lv="2"][data-clue="1"] {
  filter: saturate(0.58) contrast(1.05) sepia(0.07);
}
html[data-lv="2"] body {
  background: #f3f1ec;
}
html[data-lv="2"] .logo-icon { background: #8a1f1f; }
html[data-lv="2"] .logo-name { color: #7a1c1c; }

html[data-lv="3"] {
  filter: saturate(0.45) contrast(1.09) sepia(0.13);
}
body.lv3 {
  --brand: #7d1919;
  --brand2: #5e1010;
  --green: #506155;
  --red: #9e1515;
  --bg: #eae6df;
  --card: #f7f4ef;
  --line: #dcd6cc;
}
body.lv3 .main-nav { background: #2d2323; }
body.lv3 .logo-icon { background: #6e0e0e; }
body.lv3 .logo-name { color: #6e0e0e; }
body.lv3 .notice-strip.is-ticker { background: #181313; border-color: #3a1d1d; color: #d63838; }
body.lv3 .chat-head { background: #231d1d !important; }

@keyframes subtleJitter {
  0%, 96%, 100% { transform: translate(0, 0) skewX(0deg); }
  97% { transform: translate(-3px, 0) skewX(-1.5deg); filter: hue-rotate(-25deg); }
  98% { transform: translate(3px, 1px) skewX(1.2deg); }
  99% { transform: translate(0, 0); }
}
body.lv3 .item-card img,
body.lv3 .gallery-main img {
  animation: subtleJitter 8s infinite steps(1);
}

/* Ambient Overlays */
#noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 900;
  opacity: 0;
  background-image: repeating-radial-gradient(circle at 17% 32%, rgba(0,0,0,.18) 0, rgba(255,255,255,.12) 1px, transparent 2px);
  background-size: 6px 6px;
  mix-blend-mode: overlay;
  transition: opacity 2.5s ease;
}
html[data-lv="2"] #noise { opacity: 0.08; }
html[data-lv="2"][data-clue="1"] #noise { opacity: 0.13; }
html[data-lv="3"] #noise { opacity: 0.22; animation: noiseShift 0.22s infinite steps(2); }
@keyframes noiseShift {
  0% { background-position: 0 0; }
  50% { background-position: 3px -2px; }
  100% { background-position: -2px 3px; }
}

#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 899;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(10, 4, 4, 0.72) 100%);
  transition: opacity 3s ease;
}
html[data-lv="2"] #vignette { opacity: 0.36; }
html[data-lv="2"][data-clue="1"] #vignette { opacity: 0.52; }
html[data-lv="3"] #vignette { opacity: 0.82; }

#dimMask {
  position: fixed; inset: 0; pointer-events: none; z-index: 898;
  background: rgba(0, 0, 0, 0);
  transition: background 1.2s ease;
}
#dimMask.on { background: rgba(0, 0, 0, 0.52); }

#flash {
  position: fixed; inset: 0; pointer-events: none; z-index: 2500;
  background: #fff; opacity: 0; transition: opacity 0.12s ease;
}
#flash.bang { opacity: 0.88; }

/* Top Push Bar */
.push-bar {
  position: fixed; top: -64px; left: 0; right: 0; z-index: 1800;
  background: #1f1717; color: #f2e9e9; border-bottom: 2px solid #a11b1b;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: top 0.4s cubic-bezier(.2,.8,.2,1);
}
.push-bar.show { top: 0; }
.push-inner {
  max-width: 1180px; margin: 0 auto; padding: 11px 16px;
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.push-tag {
  background: #a11b1b; color: #fff; padding: 2px 8px; border-radius: 3px; font-weight: 700; font-size: 12px;
}
.push-btn {
  margin-left: auto; background: #a11b1b; color: #fff; padding: 4px 12px; border-radius: 4px; font-size: 12px;
}

/* ================= PORTAL TOPBAR & HEADER ================= */
.topbar {
  background: #f0f1f3; border-bottom: 1px solid #e5e6e8; font-size: 12px; color: #666;
}
.topbar-inner {
  height: 34px; display: flex; align-items: center; justify-content: space-between;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.top-link:hover { color: var(--brand); }
.accent-text { color: var(--brand); font-weight: 600; }
.sep { color: #d4d4d4; }
.hotline strong { color: var(--brand); font-weight: 700; }
.mini-count {
  background: var(--red); color: #fff; border-radius: 10px; padding: 0 5px; font-size: 11px;
}

.site-header { background: var(--card); padding: 18px 0 16px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-group { display: flex; align-items: center; gap: 16px; }
.logo-box { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  transition: background 2s ease;
}
.logo-name { font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1.1; transition: color 2s ease; }
.logo-sub { font-size: 12px; color: #888; margin-top: 2px; }
.city-box {
  border-left: 1px solid var(--line); padding-left: 14px; cursor: pointer;
}
.city-box strong { font-size: 15px; display: block; color: #333; }
.city-switch { font-size: 12px; color: #999; }

.search-area { flex: 1; max-width: 580px; }
.search-tabs { display: flex; gap: 16px; margin-bottom: 6px; font-size: 13px; color: #666; }
.stab { cursor: pointer; padding-bottom: 2px; }
.stab.active { color: var(--brand); font-weight: 700; border-bottom: 2px solid var(--brand); }
.search-bar { display: flex; border: 2px solid var(--brand); border-radius: 6px; overflow: hidden; background: #fff; }
.search-bar input {
  flex: 1; border: none; outline: none; padding: 10px 14px; font-size: 14px; color: #222;
}
.search-bar button {
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; padding: 0 28px;
  transition: background 0.2s;
}
.search-bar button:hover { background: var(--brand2); }
.hotwords { margin-top: 6px; font-size: 12px; color: #999; display: flex; flex-wrap: wrap; gap: 10px; }
.hotwords a:hover { color: var(--brand); }
.hotwords a.bad { color: #e02e24; font-weight: 600; }

.qr-box {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 6px; cursor: pointer; background: #fafafa;
}
.qr-mini {
  width: 38px; height: 38px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  padding: 3px; background: #fff; border: 1px solid #ddd;
}
.qr-mini span:nth-child(odd) { background: #222; }
.qr-mini span:nth-child(3n) { background: var(--brand); }
.qr-txt strong { display: block; font-size: 12px; color: #333; }
.qr-txt span { font-size: 11px; color: var(--brand); }

/* Main Navbar */
.main-nav { background: var(--brand); color: #fff; transition: background 2s ease; }
.nav-inner { display: flex; align-items: center; height: 44px; gap: 4px; }
.nav-item {
  padding: 0 18px; height: 44px; display: flex; align-items: center; gap: 5px;
  font-size: 15px; font-weight: 600; color: #fff; transition: background 0.2s;
}
.nav-item:hover, .nav-item.active { background: rgba(0, 0, 0, 0.16); }
.nav-right { margin-left: auto; background: rgba(0,0,0,0.12); }
.hot-pill {
  background: #ffea00; color: #b31b00; font-style: normal; font-size: 10px; font-weight: 800;
  padding: 1px 5px; border-radius: 3px;
}

/* Notice / Debunking / Ticker Strip */
.notice-strip {
  background: var(--gold); border-bottom: 1px solid var(--gold-border); color: var(--gold-txt);
  font-size: 13px; transition: all 1.5s ease;
}
.notice-inner {
  min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden;
}
.ticker-marquee {
  white-space: nowrap; display: inline-block; animation: marqueeMove 26s linear infinite;
}
@keyframes marqueeMove {
  0% { transform: translateX(15%); }
  100% { transform: translateX(-100%); }
}

/* ================= HOMEPAGE (#/) ================= */
.main-view { padding: 18px 0 36px; min-height: 620px; }

.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin-bottom: 18px; }
.hero-banner {
  background: linear-gradient(130deg, #ff7714 0%, #ff471a 60%, #d62818 100%);
  border-radius: 10px; padding: 30px 34px; color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 235px;
}
body.lv3 .hero-banner {
  background: linear-gradient(130deg, #321818 0%, #1c0d0d 100%);
}
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.2); padding: 3px 10px;
  border-radius: 20px; font-size: 12px; width: fit-content; margin-bottom: 10px;
}
.hero-banner h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.hero-banner p { font-size: 14px; opacity: 0.92; max-width: 480px; }
.hero-cta-row { margin-top: 20px; display: flex; gap: 12px; }
.hero-btn {
  background: #fff; color: #d62818; font-weight: 700; padding: 9px 20px; border-radius: 6px; font-size: 14px;
}
.hero-btn.ghost { background: rgba(0,0,0,0.22); color: #fff; border: 1px solid rgba(255,255,255,.4); }

.user-side-card {
  background: var(--card); border-radius: 10px; padding: 18px; border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
}
.usc-top { display: flex; align-items: center; gap: 12px; }
.usc-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: #ffe7d6; color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
}
.usc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.usc-btn {
  padding: 7px 0; border-radius: 5px; font-weight: 600; font-size: 13px; text-align: center;
  background: var(--brand); color: #fff;
}
.usc-btn.outline { background: #fff5ee; color: var(--brand); border: 1px solid #ffd4b8; }
.usc-news { border-top: 1px solid var(--line); padding-top: 10px; font-size: 12px; }
.usc-news h4 { font-size: 12px; color: #555; margin-bottom: 6px; }
.usc-news li { list-style: none; padding: 3px 0; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usc-news li span { color: var(--red); font-weight: 600; margin-right: 4px; }

/* 8 Category Shortcuts */
.cat-shortcuts {
  background: var(--card); border-radius: 10px; padding: 18px 20px; border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; margin-bottom: 22px; text-align: center;
}
.cat-sc { padding: 8px 4px; border-radius: 8px; transition: transform 0.15s, background 0.15s; }
.cat-sc:hover { background: #fff7f2; transform: translateY(-2px); }
.cat-ico {
  width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 12px; background: #fff3eb;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.cat-sc span { font-size: 13px; font-weight: 600; color: #333; }

/* Section Header & Filter Tabs */
.sec-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.sec-head h3 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sec-sub { font-size: 13px; font-weight: 400; color: var(--sub); }
.sec-tabs { display: flex; gap: 8px; }
.sec-tab {
  padding: 5px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; color: #555;
}
.sec-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

/* 4-Column Item Grid */
.item-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.item-card {
  background: var(--card); border-radius: 8px; border: 1px solid var(--line); overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s; position: relative; display: flex; flex-direction: column;
}
.item-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-2px); }
.item-card.sold { opacity: 0.48; filter: grayscale(0.88); }
.sold-stamp {
  position: absolute; top: 65px; right: 16px; z-index: 4;
  border: 2px solid #555; color: #555; background: rgba(255,255,255,.88);
  padding: 3px 10px; font-weight: 800; font-size: 15px; transform: rotate(-14deg); border-radius: 4px;
}
.ic-img-wrap { position: relative; height: 196px; overflow: hidden; background: #eee; }
.ic-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ic-badge {
  position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.68); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
}
.ic-badge.urgent { background: #e02e24; font-weight: 700; }
.ic-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.ic-title { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ic-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ic-tag { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #f2f3f5; color: #666; }
.ic-tag.red { background: #ffeceb; color: #d92b2b; font-weight: 600; }
.ic-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; }
.ic-price { color: var(--red); font-size: 13px; font-weight: 700; }
.ic-price b { font-size: 20px; }
.ic-loc { font-size: 12px; color: #999; }

/* Guides + Hot Communities 2-Column Section */
.info-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.info-box h4 { font-size: 16px; font-weight: 800; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.guide-list li { list-style: none; padding: 7px 0; display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px dashed #f0f0f0; }
.guide-list li:last-child { border-bottom: none; }
.guide-list a:hover { color: var(--brand); }
.guide-meta { color: #999; font-size: 12px; }

/* ================= DIRECTORY / SEARCH PAGE (#/list) ================= */
.breadcrumb { font-size: 12px; color: #888; margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--brand); }

.filter-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 18px; margin-bottom: 16px;
}
.filter-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 13px;
}
.filter-row:last-child { border-bottom: none; }
.filter-label { color: #888; width: 54px; flex-shrink: 0; }
.filter-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.f-opt { padding: 2px 10px; border-radius: 4px; color: #444; cursor: pointer; }
.f-opt.active, .f-opt:hover { background: var(--brand); color: #fff; }

.list-layout { display: grid; grid-template-columns: 1fr 270px; gap: 18px; }
.list-rows { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0 18px; }
.list-head-bar {
  padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 13px; color: #666;
}
.list-row {
  display: grid; grid-template-columns: 200px 1fr 165px; gap: 18px; padding: 18px 0;
  border-bottom: 1px solid var(--line); align-items: center; position: relative;
}
.list-row:last-child { border-bottom: none; }
.list-row.sold { opacity: 0.48; filter: grayscale(0.85); }
.lr-img { height: 142px; border-radius: 6px; overflow: hidden; position: relative; background: #eee; }
.lr-img img { width: 100%; height: 100%; object-fit: cover; }
.lr-info h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; color: #222; }
.lr-info h3:hover { color: var(--brand); }
.lr-desc { font-size: 13px; color: #666; margin-bottom: 8px; }
.lr-meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.lr-price-col { text-align: right; }
.lr-price { color: var(--red); font-size: 14px; font-weight: 700; }
.lr-price b { font-size: 26px; }
.lr-sub { font-size: 12px; color: #999; margin-top: 4px; }

.pagination { display: flex; justify-content: center; gap: 8px; padding: 20px 0 8px; }
.pg-btn {
  padding: 6px 13px; border: 1px solid var(--line); background: var(--card); border-radius: 4px; font-size: 13px;
}
.pg-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.promo-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 14px;
}
.promo-card.warm { background: linear-gradient(160deg, #fff5eb 0%, #ffe6d1 100%); border-color: #ffd2b0; }
.promo-card h4 { font-size: 15px; font-weight: 800; margin-bottom: 6px; color: #b83b00; }
.promo-card p { font-size: 12px; color: #666; margin-bottom: 10px; }
.promo-btn { width: 100%; padding: 8px 0; background: var(--brand); color: #fff; border-radius: 5px; font-weight: 700; }

/* ================= ITEM DETAIL PAGE (#/item/i404 & n1..n11) ================= */
.detail-title-box { margin-bottom: 16px; }
.detail-title-box h1 { font-size: 24px; font-weight: 800; color: #1c1c1c; margin-bottom: 6px; }
.detail-submeta { font-size: 12px; color: #888; display: flex; gap: 18px; flex-wrap: wrap; }

.detail-top-grid { display: grid; grid-template-columns: 620px 1fr; gap: 26px; margin-bottom: 24px; }
.gallery-box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.gallery-main {
  height: 410px; border-radius: 6px; overflow: hidden; position: relative; background: #181818; cursor: pointer;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.35s ease; }
.gallery-hint {
  position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.65); color: #eee;
  font-size: 12px; padding: 3px 10px; border-radius: 12px; pointer-events: none;
}
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.g-thumb {
  height: 76px; border-radius: 4px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: 0.78;
}
.g-thumb.active { border-color: var(--brand); opacity: 1; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }

.buy-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.price-banner {
  background: #fff7f3; border-radius: 6px; padding: 14px 16px; display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px;
}
body.lv3 .price-banner { background: #261919; color: #e8dada; }
.pb-main { color: var(--red); font-size: 15px; font-weight: 700; }
.pb-main b { font-size: 36px; letter-spacing: -0.5px; }
.pb-orig { color: #999; text-decoration: line-through; font-size: 12px; }
.pb-badge { background: #ffeceb; color: #d92b2b; font-size: 12px; padding: 2px 8px; border-radius: 3px; font-weight: 600; }

.specs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 11px 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.spec-item span { color: #888; margin-right: 8px; }
.spec-item strong { color: #222; font-weight: 600; }
.spec-item strong.danger-txt { color: #d91e18; font-weight: 800; }

.seller-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line);
}
.seller-avatar {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid #eee; filter: grayscale(1);
}
.seller-name { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.seller-tag { background: #fff2d9; color: #a66300; font-size: 11px; padding: 1px 6px; border-radius: 3px; font-weight: 600; }
.seller-stat { font-size: 12px; color: #666; margin-top: 3px; }
.seller-shop { font-size: 12px; color: #999; margin-top: 2px; }

.cta-btn-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.btn-chat { background: var(--green); color: #fff; font-weight: 700; font-size: 15px; padding: 12px 0; border-radius: 6px; }
.btn-buy { background: #fff; color: var(--brand); border: 2px solid var(--brand); font-weight: 700; font-size: 15px; padding: 12px 0; border-radius: 6px; }
.btn-vr { background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; padding: 12px 0; border-radius: 6px; }
.btn-chat:hover, .btn-buy:hover, .btn-vr:hover { opacity: 0.92; }

.phone-strip {
  margin-top: 12px; background: #f3faf6; color: #0e8a52; text-align: center; padding: 9px;
  border-radius: 5px; font-weight: 700; font-size: 14px;
}
body.lv3 .phone-strip { background: #241919; color: #c93b3b; }

/* Detail Body Sections */
.detail-body-grid { display: grid; grid-template-columns: 1fr 310px; gap: 22px; }
.detail-sec {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; margin-bottom: 18px;
}
.detail-sec h2 { font-size: 17px; font-weight: 800; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.desc-list li { list-style: disc inside; margin-bottom: 9px; font-size: 14px; color: #333; line-height: 1.7; }
.desc-list li.rule-warn { color: #222; }
.desc-list li.corrupted-line { color: #b81414; font-weight: 800; letter-spacing: 1px; }

.attr-icons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.attr-pill {
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; text-align: center; font-size: 13px; background: #fafafa;
}
.attr-pill.weird { border-color: #f0c2c0; background: #fff6f6; color: #b5211c; font-weight: 700; }

.poi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.poi-box { background: #f7f8fa; padding: 10px 12px; border-radius: 6px; font-size: 13px; text-align: center; }
.poi-box.weird { color: #b5211c; font-weight: 700; }

/* Comments / Circulation History */
.comment-item { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.comment-item:last-child { border-bottom: none; }
.cm-head { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 5px; }
.cm-user { font-weight: 700; color: #444; }
.cm-text { font-size: 13.5px; color: #2b2b2b; line-height: 1.6; }
.cm-text.creepy { color: #9e1414; font-weight: 600; }
.expand-cm-btn {
  margin-top: 12px; width: 100%; padding: 9px; background: #f7f8fa; border: 1px solid var(--line);
  border-radius: 6px; color: #555; font-weight: 600; font-size: 13px;
}
.expand-cm-btn:hover { background: #fff2eb; color: var(--brand); }

/* Missing Person / Risk Notice Sidebar Card */
.missing-card {
  background: #fff9f8; border: 1px solid #f2c9c6; border-radius: 8px; padding: 16px 18px; margin-bottom: 18px;
}
.missing-card h3 { color: #b81d18; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.missing-card p { font-size: 12.5px; color: #444; line-height: 1.65; margin-bottom: 6px; }

/* ================= FOOTER ================= */
.site-footer { background: #26282c; color: #b8bcc4; padding: 34px 0 42px; margin-top: 28px; font-size: 12.5px; }
.trust-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-bottom: 26px;
  border-bottom: 1px solid #383b42; margin-bottom: 24px;
}
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-badge {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--brand); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; flex-shrink: 0;
}
.trust-item strong { color: #fff; font-size: 14px; display: block; }
.trust-item p { color: #8f949e; font-size: 12px; }

.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 22px; }
.f-col h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.f-col a, .f-col p { display: block; color: #959aa3; margin-bottom: 6px; }
.f-col a:hover { color: #fff; }
.reset-link-btn {
  margin-top: 6px; color: #888; text-decoration: underline; font-size: 12px;
}
.reset-link-btn:hover { color: #fff; }
.footer-copy {
  border-top: 1px solid #383b42; padding-top: 16px; display: flex; gap: 22px; color: #777c85; flex-wrap: wrap;
}

/* ================= FLOATING WIDGETS & SELLER CHAT ================= */
.float-sidebar {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 1000;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1); display: flex; flex-direction: column; overflow: hidden;
}
.sb-btn {
  padding: 10px 9px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border-bottom: 1px solid var(--line); position: relative; font-size: 11px; color: #555;
}
.sb-btn:last-child { border-bottom: none; }
.sb-btn:hover { background: #fff5ee; color: var(--brand); }
.sb-ico { font-size: 17px; }
.sb-dot {
  position: absolute; top: 5px; right: 5px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.float-tip {
  position: fixed; right: 74px; bottom: 72px; z-index: 995; width: 290px;
  background: var(--card); border: 2px solid var(--brand); border-radius: 8px; padding: 12px;
  box-shadow: 0 8px 26px rgba(0,0,0,.18);
}
.ft-close { position: absolute; top: 6px; right: 9px; font-size: 16px; color: #999; }
.ft-tag { font-size: 12px; font-weight: 800; color: #d92b2b; margin-bottom: 8px; }
.ft-body { display: flex; gap: 10px; align-items: center; }
.ft-body img { width: 68px; height: 56px; object-fit: cover; border-radius: 4px; }
.ft-body strong { font-size: 12.5px; display: block; line-height: 1.35; }
.ft-price { color: var(--red); font-size: 12px; margin: 3px 0; }
.ft-price b { font-size: 16px; }
.ft-link { font-size: 12px; color: var(--brand); font-weight: 700; }

.sticky-app-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 990;
  background: rgba(28, 30, 34, 0.94); color: #fff; height: 52px;
}
.sticky-inner { height: 52px; display: flex; align-items: center; justify-content: space-between; }
.sticky-left { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.logo-mini {
  width: 28px; height: 28px; border-radius: 6px; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.sticky-right { display: flex; align-items: center; gap: 12px; }
.sticky-cta { background: var(--brand); color: #fff; padding: 6px 16px; border-radius: 16px; font-weight: 700; font-size: 12.5px; }
.sticky-close { color: #999; font-size: 20px; }

/* Seller Chat Drawer */
.chat-box {
  position: fixed; left: 22px; bottom: 64px; width: 345px; z-index: 1200;
  background: #fff; border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.24);
  border: 1px solid #ddd; overflow: hidden; display: flex; flex-direction: column;
}
.chat-head {
  background: var(--green); color: #fff; padding: 11px 14px;
  display: flex; align-items: center; justify-content: space-between; transition: background 1.5s;
}
.chat-seller { display: flex; align-items: center; gap: 10px; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.6); filter: grayscale(1); }
.chat-name { font-weight: 700; font-size: 13.5px; }
.chat-status { font-size: 11px; opacity: 0.9; }
.chat-min { color: #fff; font-size: 18px; padding: 0 6px; }

.chat-messages {
  height: 255px; overflow-y: auto; padding: 12px; background: #f5f6f8;
  display: flex; flex-direction: column; gap: 10px;
}
.msg-time { text-align: center; font-size: 11px; color: #999; }
.msg-row { display: flex; gap: 8px; align-items: flex-start; }
.msg-row.me { flex-direction: row-reverse; }
.msg-bubble {
  max-width: 78%; padding: 8px 11px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  background: #fff; color: #222; border: 1px solid #e8e8e8;
}
.msg-row.me .msg-bubble { background: #dcf8c6; border-color: #c7e9ad; }
.msg-bubble.eerie { background: #221919; color: #f0d8d8; border-color: #5e1f1f; }
.msg-inline-link {
  display: inline-block; margin-top: 6px; color: #0e8a52; font-weight: 700; text-decoration: underline; cursor: pointer;
}
.msg-bubble.eerie .msg-inline-link { color: #ff6b6b; }

.chat-chips {
  padding: 7px 10px; background: #fff; border-top: 1px solid #eee; display: flex; flex-wrap: wrap; gap: 6px;
}
.chip {
  font-size: 11.5px; padding: 3px 9px; border-radius: 12px; border: 1px solid #bfe3d0; color: #0e8a52; background: #f4fbf7;
}
body.lv3 .chip { border-color: #8f4444; color: #8f1d1d; background: #faf2f2; }

.chat-input-row { display: flex; padding: 8px; background: #fff; border-top: 1px solid #eee; gap: 6px; }
.chat-input-row input {
  flex: 1; border: 1px solid #ddd; border-radius: 4px; padding: 6px 10px; font-size: 13px; outline: none;
}
.chat-input-row button {
  background: var(--green); color: #fff; padding: 0 14px; border-radius: 4px; font-weight: 700; font-size: 13px;
}

/* ================= MODALS & WHITEPACK ================= */
.modal-mask {
  position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.62);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  background: #fff; border-radius: 10px; width: 440px; max-width: 100%; padding: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35); position: relative;
}
.modal-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.modal-card p { font-size: 14px; color: #444; margin-bottom: 16px; line-height: 1.6; }
.modal-field { margin-bottom: 12px; }
.modal-field label { display: block; font-size: 12.5px; color: #666; margin-bottom: 4px; }
.modal-field input, .modal-field select {
  width: 100%; padding: 9px 11px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px;
}
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.m-btn { padding: 9px 18px; border-radius: 5px; font-weight: 700; font-size: 13.5px; background: #eee; color: #333; }
.m-btn.primary { background: var(--brand); color: #fff; }
.m-btn.danger { background: #8f1414; color: #fff; }

/* Redpack -> Funeral Whitepack Inversion */
.redpack-box {
  background: linear-gradient(180deg, #ff4f3a 0%, #d9211b 100%);
  color: #ffe8a8; text-align: center; padding: 28px 22px; border-radius: 12px;
  transition: all 2.8s ease;
}
.redpack-box.white {
  background: linear-gradient(180deg, #f5f5f1 0%, #d8d8d2 100%);
  color: #111111; border: 2px solid #222;
}
.rp-amount { font-size: 42px; font-weight: 900; margin: 10px 0; }
.rp-btn {
  margin-top: 14px; background: #ffd666; color: #9c1c00; font-weight: 800; padding: 9px 30px; border-radius: 20px;
  transition: all 2.5s ease;
}
.redpack-box.white .rp-btn { background: #181818; color: #f0f0f0; }

/* ================= 360° DARKROOM FLASHLIGHT OVERLAY (#vr) ================= */
.vr-overlay {
  position: fixed; inset: 0; z-index: 2200; background: #050505; color: #eaeaea;
}
.vr-loader {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.vr-load-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.vr-load-sub { font-size: 14px; color: #aaa; margin-bottom: 22px; }
.vr-bar-track { width: 340px; max-width: 85vw; height: 8px; background: #222; border-radius: 4px; overflow: hidden; }
.vr-bar-fill { width: 0%; height: 100%; background: #12a868; transition: width 0.25s ease, background 0.6s ease; }
.vr-bar-fill.danger { background: #b51212; }
.vr-load-hint { font-size: 12px; color: #777; margin-top: 16px; }
.vr-enter-btn {
  margin-top: 24px; background: #9e1111; color: #fff; font-weight: 800; font-size: 15px;
  padding: 11px 28px; border-radius: 6px; letter-spacing: 1px;
}

.vr-stage { position: relative; width: 100%; height: 100%; overflow: hidden; cursor: none; }
.vr-scene-img { width: 100%; height: 100%; object-fit: cover; user-select: none; transition: transform 0.6s ease; }
.vr-scene-img.jump { transform: scale(1.22); }
.vr-dark-mask {
  position: absolute; inset: 0; pointer-events: none;
  --fx: 50vw; --fy: 50vh;
  background: radial-gradient(circle 195px at var(--fx) var(--fy), rgba(255,250,235,0.04) 0%, rgba(8,8,8,0.82) 58%, rgba(0,0,0,0.985) 100%);
}
.vr-hud-top {
  position: absolute; top: 18px; left: 22px; right: 22px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; font-family: monospace, sans-serif;
  font-size: 13px; color: #ddd; pointer-events: auto;
}
.rec-dot { color: #ff2a2a; animation: blinkDot 1s infinite; }
@keyframes blinkDot { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.15; } }
.vr-exit-btn {
  background: rgba(255,255,255,.14); color: #ddd; padding: 5px 12px; border-radius: 4px; cursor: pointer;
}
.vr-hotspot {
  position: absolute; transform: translate(-50%, -50%); z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
}
.vr-ring {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255, 220, 180, 0.9);
  background: rgba(180, 24, 24, 0.35); animation: hotPulse 1.6s infinite;
}
@keyframes hotPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(220, 40, 40, 0.65); }
  70% { transform: scale(1.12); box-shadow: 0 0 0 16px rgba(220, 40, 40, 0); }
  100% { transform: scale(0.9); }
}
.vr-hot-label {
  background: rgba(0,0,0,.78); color: #f3e5e5; font-size: 12px; padding: 3px 9px; border-radius: 4px; white-space: nowrap;
}
.vr-subtitle {
  position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%); z-index: 5;
  font-family: "SimSun", "Songti SC", serif; font-size: 20px; color: #e8e0d8;
  background: rgba(0,0,0,.68); padding: 8px 22px; border-radius: 4px; letter-spacing: 1.5px; text-align: center;
}

/* ================= LEVEL 5 PERMANENT ENDING (#lv5View) ================= */
body.lv5 { background: #050505 !important; color: #c8c0b4; padding-bottom: 0; }
.lv5-view {
  min-height: 100vh; padding: 42px 16px 60px; display: flex; align-items: center; justify-content: center;
  font-family: "SimSun", "Songti SC", serif;
}
.end-card {
  width: 780px; max-width: 100%; background: #0e0d0c; border: 1px solid #331a1a;
  padding: 40px 44px; position: relative; box-shadow: 0 0 60px rgba(120, 10, 10, 0.18);
}
.end-doc-no { font-size: 12px; color: #756b63; text-align: right; margin-bottom: 16px; }
.end-card h1 {
  text-align: center; font-size: 38px; color: #9c1414; letter-spacing: 10px; margin-bottom: 8px;
}
.end-sub { text-align: center; font-size: 13px; color: #857b72; margin-bottom: 26px; }

.end-table { border-top: 1px solid #2b2020; border-bottom: 1px solid #2b2020; margin-bottom: 22px; }
.end-row {
  display: grid; grid-template-columns: 150px 1fr; padding: 10px 6px;
  border-bottom: 1px dashed #221919; font-size: 14.5px;
}
.end-row:last-child { border-bottom: none; }
.end-row span { color: #8a8077; }
.end-row strong { color: #d6cec2; }
.blood-txt { color: #c91e1e !important; }

.end-clause { font-size: 13.5px; color: #9e948a; line-height: 1.85; margin-bottom: 28px; }
.end-clause p { margin-bottom: 6px; }

.end-portraits {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; text-align: center;
}
.p-box {
  background: #141312; border: 1px solid #2d2626; padding: 12px;
}
.p-box.current { border-color: #6e1515; }
.p-box img {
  width: 120px; height: 150px; object-fit: cover; margin: 0 auto 8px;
  filter: grayscale(1) contrast(1.12); border: 2px solid #333;
}
.p-name { font-size: 14px; color: #d0c8bc; font-weight: 700; }
.p-date { font-size: 12px; color: #887d74; margin-top: 2px; }

.end-seal {
  position: absolute; right: 54px; top: 205px; width: 126px; height: 126px;
  border: 4px double #b31212; border-radius: 50%; color: #b31212;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; text-align: center; letter-spacing: 2px;
  transform: rotate(-16deg) scale(2.4); opacity: 0; pointer-events: none;
}
.end-seal small { font-size: 12px; margin-top: 2px; }
.end-seal.on {
  opacity: 0.88; transform: rotate(-16deg) scale(1);
  transition: transform 0.45s cubic-bezier(.6,-0.3,.8,1.3), opacity 0.25s ease;
}

.end-actions { display: flex; justify-content: center; gap: 18px; margin-bottom: 22px; font-family: sans-serif; }
.end-leave-btn { background: #261717; color: #b89c9c; border: 1px solid #4a2424; padding: 9px 20px; border-radius: 4px; }
.end-reset-btn { color: #6e665f; font-size: 12px; text-decoration: underline; }
.end-reset-btn:hover { color: #bbb; }
.end-series { text-align: center; font-size: 12px; color: #5c544e; border-top: 1px solid #1e1818; padding-top: 14px; }

/* Toast */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3000;
  background: rgba(20, 12, 12, 0.94); color: #f3dede; border: 1px solid #8a1c1c;
  padding: 12px 24px; border-radius: 6px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-grid, .detail-top-grid, .detail-body-grid, .list-layout, .info-two-col { grid-template-columns: 1fr; }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-shortcuts { grid-template-columns: repeat(4, 1fr); }
  .trust-row, .footer-links { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-wrap: wrap; }
}
