:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --subtle: #efece4;
  --subtle-2: #e7e2d7;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #8c857b;
  --line: #e4dfd3;
  --line-strong: #cfc8b8;
  --brand: #b45309;
  --brand-2: #d97706;
  --brand-soft: #fef3c7;
  --brand-border: #f5d08a;
  --dark: #1c1917;
  --dark-2: #292524;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --pill: 999px;
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 10px 26px rgba(28, 25, 23, 0.09);
  --container: 960px;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 14px/1.65 var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.site-main {
  flex: 1;
  padding-top: 18px;
  padding-bottom: 40px;
}

.section {
  margin-bottom: 30px;
}

.section:last-child {
  margin-bottom: 0;
}

/* Universal Cover Aspect-Ratio Lock */
.cov {
  position: relative;
  overflow: hidden;
  background: var(--subtle);
}

.cov>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.34s ease;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--brand-border);
  box-shadow: var(--shadow-md);
}

.card:hover .cov>img {
  transform: scale(1.04);
}

.cov-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(28, 25, 23, 0.84);
  color: #fef3c7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cov-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.clamp-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* HD7: Centered Editorial Print Header */
.ed-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 60;
}

.ed-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
}

.ed-top-left {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--ink-3);
}

.ed-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.ed-brand img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.ed-brand-text {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink);
  line-height: 1.15;
}

.ed-top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ed-search {
  display: flex;
  align-items: center;
  width: 220px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--bg);
  padding: 2px 4px 2px 12px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.ed-search:focus-within {
  border-color: var(--brand);
  background: var(--surface);
}

.ed-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  padding: 4px 0;
}

.ed-search button {
  flex: none;
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: var(--pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}

.ed-search button:hover {
  background: var(--brand);
}

.ed-nav-bar {
  border-bottom: 2px solid var(--ink);
  background: var(--surface);
}

.ed-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.ed-nav-link {
  position: relative;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  border-radius: var(--r-sm);
}

.ed-nav-link:hover {
  color: var(--brand);
  background: var(--bg);
}

.ed-nav-link.is-active,
.ed-nav-link[data-current="是"] {
  color: var(--brand);
}

.ed-nav-link.is-active::after,
.ed-nav-link[data-current="是"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--brand);
}

/* Mobile Header Controls (MHD5) */
.m-menu-btn,
.m-search-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.m-search-drawer {
  display: none;
  padding: 10px 16px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.m-search-drawer.is-open {
  display: block;
}

.m-search-drawer form {
  display: flex;
  gap: 8px;
}

.m-search-drawer input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  outline: none;
}

.m-search-drawer button {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

/* Mobile Slide Drawer */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(28, 25, 23, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  z-index: 130;
  background: var(--surface);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 24px;
  overflow-y: auto;
}

.drawer-panel.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.drawer-head strong {
  font-family: var(--font-serif);
  font-size: 18px;
}

.drawer-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  font-size: 16px;
}

.drawer-group {
  margin-bottom: 16px;
}

.drawer-group-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.drawer-grid a {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.drawer-grid a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

/* SH4: Centered Double-Line Magazine Section Header */
.sh4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
  position: relative;
}

.sh4::before,
.sh4::after {
  content: "";
  flex: 1;
  height: 4px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.sh4-inner {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
}

.sh4 h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.sh4 span {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

.sh4-more {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 10px;
  border-radius: var(--pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

.sh4-more:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* SH2: Bold Underline + Quick Sub-category Pills Header */
.sh2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  flex-wrap: wrap;
}

.sh2-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.sh2 h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sh2 h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--brand);
}

.sh2-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sh2-pills a {
  padding: 3px 10px;
  border-radius: var(--pill);
  background: var(--subtle);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.sh2-pills a:hover {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand);
}

.sh2-more {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.sh2-more:hover {
  text-decoration: underline;
}

/* Attribute Display Styles (M1, M2, M3, M5) */
.attr-m1 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  overflow: hidden;
  white-space: nowrap;
}

.attr-m1 i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.attr-m1 strong {
  color: var(--ink-2);
  font-weight: 700;
}

.attr-m2 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.attr-m2 span {
  padding: 2px 8px;
  border-radius: var(--pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--subtle);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.attr-m2 span.hi {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-border);
}

.attr-m3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-3);
  overflow: hidden;
  white-space: nowrap;
}

.attr-m3 em {
  font-style: normal;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.attr-m3 span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.attr-m5 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12.5px;
}

.attr-m5-row {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.attr-m5-row dt {
  color: var(--ink-3);
  font-weight: 600;
  flex: none;
}

.attr-m5-row dd {
  color: var(--ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* BC1: Breadcrumbs */
.bc1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.bc1 a:hover {
  color: var(--brand);
}

.bc1-sep {
  color: var(--line-strong);
}

.bc1-cur {
  color: var(--ink);
  font-weight: 700;
}

/* F1 / MF1: Multi-row Filter Panel */
.filter-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.filter-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.filter-row:first-child {
  padding-top: 0;
}

.filter-label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-3);
  padding-top: 4px;
}

.filter-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-opts a {
  padding: 3px 11px;
  border-radius: var(--pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
}

.filter-opts a:hover {
  color: var(--brand);
  background: var(--bg);
}

.filter-opts a.is-active,
.filter-opts a[data-current="是"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  flex-wrap: wrap;
}

.sort-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sort-tabs a {
  padding: 4px 12px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--bg);
}

.sort-tabs a:hover {
  color: var(--brand);
}

.sort-tabs a.is-active,
.sort-tabs a[data-current="是"] {
  background: var(--brand);
  color: #fff;
}

.sort-total {
  font-size: 12.5px;
  color: var(--ink-3);
}

.sort-total strong {
  color: var(--ink);
}

/* SC1: Search Hero Box */
.sc1-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sc1-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.sc1-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 14px;
  outline: none;
}

.sc1-form input:focus {
  border-color: var(--brand);
  background: var(--surface);
}

.sc1-form button {
  padding: 10px 22px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.sc1-form button:hover {
  background: var(--brand);
}

.sc1-hot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.sc1-hot a {
  padding: 2px 10px;
  border-radius: var(--pill);
  background: var(--subtle);
  color: var(--ink-2);
  font-weight: 600;
}

.sc1-hot a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

/* PG3 / MPG3: Minimal Underline Pagination + Mobile Jump */
.pg3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pg3 a,
.pg3 span {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
}

.pg3 a:hover {
  color: var(--brand);
  border-bottom-color: var(--brand-border);
}

.pg3 .is-current,
.pg3 a[data-current="是"] {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.pg3-info {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 600;
  margin-left: 8px;
}

.mpg3-select {
  display: none;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

/* NB3: Minimal Divider Prev / Next Bar */
.nb3 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.nb3-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.nb3-item.is-next {
  text-align: right;
}

.nb3-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.06em;
}

.nb3-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nb3-item:hover .nb3-title {
  color: var(--brand);
}

/* CP3: Wide Chapter Preview Pager */
.cp3 {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-top: 24px;
}

.cp3-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 12px 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}

.cp3-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.cp3-card.is-next {
  text-align: right;
}

.cp3-card.is-toc {
  align-items: center;
  text-align: center;
  padding: 12px 22px;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.cp3-card.is-toc:hover {
  background: var(--brand);
  border-color: var(--brand);
}

.cp3-card small {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}

.cp3-card.is-toc small {
  color: rgba(255, 255, 255, 0.78);
}

.cp3-card strong {
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp3-disabled {
  opacity: 0.48;
  pointer-events: none;
}

/* ER1: Empty / 404 Card */
.er1-card {
  max-width: 520px;
  margin: 36px auto;
  padding: 36px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.er1-code {
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1.1;
  margin-bottom: 10px;
}

.er1-card h1,
.er1-card h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.er1-card p {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 18px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--r-sm);
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--brand);
  color: #fff;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Unified Ad Slots (960px PC: APP 10x1, Text 4x2, Banner 2x1; Mobile: APP 5x2, Text 2x2, Banner 1x1) */
.app-ads[data-ad-tiered]:not([data-ad-ready]),
.text-ads[data-ad-tiered]:not([data-ad-ready]),
.ad-banner-slot[data-ad-pc-limit]:not([data-ad-ready]),
.ad-float-bar:not([data-ad-ready]) {
  opacity: 0;
}

.ad-banner-slot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.ad-banner-slot:has(> .ad-banner-item:only-child) {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.ad-banner-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 6.4 / 1;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.ad-banner-item>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-banner-item:hover {
  border-color: var(--brand);
}

.ad-slot-ctrl {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.78);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
}

.ad-float-host {
  display: contents;
}

.ad-float-bar {
  position: fixed;
  z-index: 75;
  padding: 8px;
  border-radius: var(--r);
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.22);
  border: 1px solid var(--brand-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.ad-float-bar--pc-corner {
  top: 156px;
  right: 18px;
  left: auto;
  transform: none;
  width: 360px;
  max-width: calc(100vw - 36px);
  padding: 10px;
}

.ad-float-bar--pc-corner .ad-float-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.ad-float-bar--top {
  top: 112px;
  left: 50%;
  transform: translateX(-50%);
}

.ad-float-bar--bottom {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.ad-float-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 100%;
}

.ad-float-item {
  position: relative;
  width: 100%;
}

.ad-float-bar .ad-banner-item {
  border-radius: var(--r-sm);
}

.ad-float-close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 4;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ad-float-close:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  background: rgba(28, 25, 23, 0.56);
}

.ad-float-close:not(:disabled):hover {
  background: var(--brand);
  color: #fff;
}

/* Notice Bar & App/Text Ads */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-sm);
  font-size: 12.5px;
}

.notice-badge {
  flex: none;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.notice-links {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  color: var(--ink-2);
}

.notice-links::-webkit-scrollbar {
  display: none;
}

.notice-links a:hover {
  color: var(--brand);
}

.app-ads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 10px 8px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
}

.app-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  min-width: 0;
}

.app-icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  flex: none;
  background: var(--subtle);
  border: 1px solid var(--line-strong);
}

.app-icon>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-item strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-item small {
  font-size: 11px;
  color: var(--ink-3);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.text-ad {
  display: block;
  text-align: center;
  min-width: 0;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
}

.text-ad:hover {
  transform: translateY(-1px);
}

.text-ad:nth-child(5n+1) { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.text-ad:nth-child(5n+2) { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.text-ad:nth-child(5n+3) { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.text-ad:nth-child(5n+4) { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.text-ad:nth-child(5n+5) { color: #7e22ce; background: #faf5ff; border-color: #e9d5ff; }

/* Sub-category Ribbon under Header */
.ed-subbar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.ed-subbar-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ed-subbar-inner::-webkit-scrollbar {
  display: none;
}

.ed-subbar-inner a {
  flex: none;
  padding: 3px 11px;
  border-radius: var(--pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
}

.ed-subbar-inner a:hover,
.ed-subbar-inner a[data-current="是"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Rank Header Tabs (inside sticky ed-header) */
.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 16px;
}

.rank-models {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rank-models a {
  padding: 3px 12px;
  border-radius: var(--pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}

.rank-models a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.rank-models a[data-current="是"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.rank-periods {
  display: flex;
  gap: 6px;
}

.rank-periods button {
  padding: 4px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.rank-periods button.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* FT2: Multi-Column Sitemap + Friend Links Footer */
.ed-footer {
  background: var(--surface);
  border-top: 2px solid var(--ink);
  margin-top: auto;
  padding: 28px 0 24px;
}

.ft2-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.ft2-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}

.ft2-desc {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
}

.ft2-col h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.ft2-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.ft2-links a:hover {
  color: var(--brand);
}

.ft2-friends {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

.ft2-friends strong {
  color: var(--ink);
  font-weight: 800;
}

.ft2-friends a:hover {
  color: var(--brand);
}

.ft2-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  font-size: 12px;
  color: var(--ink-3);
}

/* MBN1: Mobile Dynamic Bottom Navigation (height 56px, flex auto-fit, never blocks bottom ad) */
.mbn1 {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 42;
  height: 56px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-strong);
  padding-bottom: env(safe-area-inset-bottom);
}

.mbn1-grid {
  height: 100%;
  display: flex;
  align-items: stretch;
}

.mbn1-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.mbn1 [data-dock-channel]:nth-of-type(n+4) {
  display: none;
}

.mbn1-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.mbn1-item.is-active,
.mbn1-item[data-current="是"] {
  color: var(--brand);
}

@media (max-width: 767px) {
  body {
    padding-bottom: 62px;
  }

  .wrap {
    padding: 0 12px;
  }

  .site-main {
    padding-top: 12px;
    padding-bottom: 28px;
  }

  .bc1 {
    display: none;
  }

  .section {
    margin-bottom: 22px;
  }

  .ed-top {
    grid-template-columns: 36px 1fr 36px;
    padding: 10px 0;
    gap: 8px;
  }

  .ed-top-left,
  .ed-search {
    display: none;
  }

  .m-menu-btn,
  .m-search-btn {
    display: inline-flex;
  }

  .ed-brand-text {
    font-size: 19px;
    letter-spacing: 0.04em;
  }

  .ed-nav-list {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 5px 0;
  }

  .ed-nav-list::-webkit-scrollbar {
    display: none;
  }

  .ed-nav-link {
    flex: none;
    padding: 5px 11px;
    font-size: 13px;
  }

  .sh4 {
    justify-content: flex-start;
    gap: 10px;
  }

  .sh4::before {
    display: none;
  }

  .sh4 h2 {
    font-size: 17px;
  }

  .sh4-more {
    position: static;
    transform: none;
  }

  .sh2 h2 {
    font-size: 16.5px;
  }

  .filter-box {
    padding: 10px 12px;
  }

  .filter-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px;
  }

  .filter-opts {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .filter-opts::-webkit-scrollbar {
    display: none;
  }

  .filter-opts a {
    flex: none;
  }

  .pg3 a[data-page-num] {
    display: none;
  }

  .mpg3-select {
    display: inline-block;
  }

  .nb3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nb3-item.is-next {
    text-align: left;
  }

  .cp3 {
    grid-template-columns: 1fr;
  }

  .cp3-card.is-next {
    text-align: left;
  }

  .ad-banner-slot,
  .ad-banner-slot:has(> .ad-banner-item:only-child) {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .ed-subbar {
    background: rgba(247, 245, 240, 0.96);
    backdrop-filter: blur(8px);
  }

  .ad-float-bar {
    left: 8px;
    right: 8px;
    width: auto;
    transform: none;
    padding: 4px;
  }

  .ad-float-bar--top {
    top: 140px;
  }

  .ad-float-bar--bottom {
    bottom: 64px;
  }

  .ad-float-close {
    top: 4px;
    right: 4px;
  }

  .app-ads {
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 10px 6px;
    padding: 10px 8px;
  }

  .app-ads[data-ad-cols="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .text-ads {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .text-ads:has(> .text-ad:only-child) {
    grid-template-columns: 1fr;
  }

  .text-ad {
    padding: 6px 8px;
    font-size: 12px;
  }

  .ed-subbar-inner {
    padding: 6px 12px;
  }

  .rank-head {
    padding: 6px 12px;
    gap: 6px;
  }

  .rank-models {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }

  .rank-models::-webkit-scrollbar {
    display: none;
  }

  .ft2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .mbn1 {
    display: block;
  }
}