:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f3f8;
  --ink: #20222a;
  --muted: #6d7480;
  --line: #dfe4ec;
  --accent: #c83a53;
  --accent-strong: #9f2237;
  --gold: #c78b2b;
  --teal: #2f7d7c;
  --shadow: 0 16px 40px rgba(28, 36, 52, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

.home-page {
  padding-bottom: 82px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

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

.wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar__inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 310px) auto;
  align-items: center;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
}

.brand__text {
  font-size: 20px;
}

.home-page .brand,
.home-page .hero-strip,
.home-page .section-head {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.nav a,
.nav button {
  appearance: none;
  border: 1px solid transparent;
  padding: 9px 13px;
  border-radius: 999px;
  background: transparent;
  color: #3f4650;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav a:hover,
.nav a.is-active,
.nav button:hover,
.nav button.is-active {
  background: #fff0f3;
  border-color: #ffd3dd;
  color: var(--accent-strong);
  box-shadow: 0 8px 20px rgba(206, 45, 84, 0.12);
}

.model-filter-bar {
  position: sticky;
  top: 66px;
  z-index: 18;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.model-filter-bar[hidden] {
  display: none;
}

.model-filter-bar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 0;
}

.model-filter-bar__inner > strong {
  flex: 0 0 auto;
  color: var(--accent-strong);
}

.model-filter-options {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.model-filter-options button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 11px;
}

.model-filter-options button:hover,
.model-filter-options button.is-active {
  border-color: #f0b7c1;
  background: #fff0f3;
  color: var(--accent-strong);
}

.model-filter-options span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wechat-guide-lock,
.wechat-guide-lock body {
  overflow: hidden;
}

.wechat-open-guide {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(18, 24, 38, 0.38), rgba(255, 255, 255, 0.66) 34%, rgba(255, 255, 255, 0.92) 100%),
    url("./assets/images/wechat-guide-bg.png") center top / cover no-repeat;
  color: #20222a;
}

.wechat-open-guide::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 247, 248, 0.84) 48%, #ffffff 100%);
  content: "";
}

.wechat-open-guide__arrow {
  position: absolute;
  top: -2px;
  right: -4px;
  z-index: 2;
  width: 166px;
  height: 166px;
  color: #07080c;
  pointer-events: none;
  filter: drop-shadow(0 3px 0 rgba(255, 255, 255, 0.42)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.wechat-open-guide__arrow::after {
  display: none;
  content: none;
}

.wechat-open-guide__arrow::before {
  display: none;
  content: none;
}

.wechat-open-guide__arrow svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wechat-open-guide__arrow-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wechat-open-guide__arrow-head {
  fill: currentColor;
}

.wechat-open-guide__panel {
  position: relative;
  width: min(430px, 100%);
  margin-top: 72px;
  padding: 16px 18px 22px;
  border: 1px solid rgba(200, 58, 83, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 26px 80px rgba(32, 34, 42, 0.14);
  text-align: center;
}

.wechat-open-guide__headline {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  text-align: left;
}

.wechat-open-guide__feature {
  display: grid;
  min-height: 74px;
  place-items: center;
  padding: 9px 8px 8px;
  border: 3px solid #ff4f63;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff2d55, #ff7a45);
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 45, 85, 0.28);
}

.wechat-open-guide__feature span {
  display: grid;
  gap: 1px;
  font-size: 24px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(120, 0, 28, 0.24);
}

.wechat-open-guide__feature b {
  display: block;
  font: inherit;
}

.wechat-open-guide__feature small {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.9;
}

.wechat-open-guide__headline-copy {
  min-width: 0;
}

.wechat-open-guide__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 6px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff0f3;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.wechat-open-guide h1 {
  margin: 0;
  font-size: 24px;
}

.wechat-open-guide__copy {
  margin: 7px 0 0;
  color: #4e5868;
  font-size: 13px;
  line-height: 1.55;
}

.wechat-open-guide__copy strong {
  color: var(--accent-strong);
}

.wechat-open-guide__model-preview {
  display: grid;
  min-height: 128px;
  margin: 0 0 16px;
  align-items: end;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(32, 34, 42, 0) 32%, rgba(32, 34, 42, 0.64) 100%),
    url("./assets/images/wechat-guide-bg.png") center 34% / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.wechat-open-guide__model-preview span {
  display: block;
  padding: 0 14px 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-align: left;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

.wechat-open-guide__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.wechat-open-guide__steps div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 6px;
  border-radius: 12px;
  background: #f7f9fc;
}

.wechat-open-guide__steps span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.wechat-open-guide__steps strong {
  font-size: 13px;
}

.wechat-open-guide__steps small {
  color: var(--muted);
  font-size: 11px;
}

.wechat-open-guide__menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 16px;
  background: #eef2f7;
}

.wechat-open-guide__menu div {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}

.wechat-open-guide__menu img {
  width: 100%;
  max-width: 108px;
  height: auto;
  object-fit: contain;
}

.wechat-open-guide__menu .is-highlight {
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(200, 58, 83, 0.14);
}

.wechat-open-guide__copylink {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(200, 58, 83, 0.28);
}

.wechat-open-guide__tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.search {
  display: grid;
  grid-template-columns: 1fr 38px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 12px;
  background: transparent;
}

.search button {
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.user-actions,
.quick-links,
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-btn,
.primary-btn,
.tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.ghost-btn,
.primary-btn {
  padding: 0 14px;
}

.primary-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.hero-strip {
  background: linear-gradient(90deg, #242936 0%, #63323d 52%, #2f625f 100%);
  color: #fff;
}

.hero-strip__inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.notice strong {
  padding: 7px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
}

.quick-links a {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 22px;
  padding: 26px 0 38px;
}

.home-page .layout {
  grid-template-columns: 1fr;
}

.home-page .sidebar--right {
  display: none;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(28, 36, 52, 0.05);
}

.panel h2 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.section-head h1 {
  margin: 0;
  font-size: 28px;
}

.tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tabs button {
  border: 0;
  padding: 0 12px;
  background: transparent;
}

.tabs button.is-active {
  background: var(--ink);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.album-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(28, 36, 52, 0.06);
  content-visibility: auto;
  contain-intrinsic-size: 520px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.album-card.is-favorite {
  border-color: #f0b7c1;
  box-shadow: 0 12px 32px rgba(200, 58, 83, 0.12);
}

.album-card.is-hidden {
  display: none;
}

.album-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8edf4;
}

.album-card__cover img,
.album-card__cover iframe {
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.album-card__watch-count {
  position: absolute;
  left: 8px;
  bottom: 10px;
  z-index: 2;
  max-width: calc(100% - 66px);
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(24, 27, 34, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hide-watch-count .album-card__watch-count {
  display: none;
}

.album-card.is-favorite .album-card__cover::after {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  content: "已收藏";
  font-size: 12px;
  font-weight: 900;
}

.album-card:hover img,
.album-card:hover iframe {
  transform: scale(1.045);
}

.badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(24, 27, 34, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.badge.premium {
  background: var(--gold);
}

.album-card__body {
  padding: 12px 13px 14px;
}

.album-card h3 {
  margin: 0 0 7px;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card p {
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card__meta-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.album-card__meta-links button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.album-card__meta-links button:hover {
  color: var(--accent);
  text-decoration: underline;
}

.meta,
.rank-list li,
.model-list a,
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.meta strong {
  color: var(--teal);
}

.home-page .album-card__save,
.home-page .album-card .meta {
  display: none;
}

.rank-list {
  margin: 0;
  padding: 8px 14px 12px 36px;
}

.rank-list li {
  min-height: 34px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}

.rank-list li:last-child {
  border-bottom: 0;
}

.rank-list a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.model-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.model-list a {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.model-list strong {
  color: var(--muted);
  font-size: 12px;
}

.reward-panel {
  padding-bottom: 14px;
}

.reward-panel p {
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.7;
}

.wide {
  width: calc(100% - 32px);
  margin: 0 16px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.pager a {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.pager a.is-active,
.pager a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.footer {
  border-top: 1px solid #f6a3c8;
  background: #dc2387;
  color: #fff;
}

.footer__inner {
  min-height: 64px;
}

.bottom-tools {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 45;
  box-shadow: 0 -12px 30px rgba(165, 22, 98, 0.24);
}

.bottom-tools__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  justify-content: stretch;
  min-height: 68px;
  padding: 7px 0;
}

.bottom-tools__item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.bottom-tools__item:hover,
.bottom-tools__item.is-active {
  background: rgba(255, 255, 255, 0.16);
}

.bottom-tools__icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #ffe500;
  color: #d11776;
  font-size: 13px;
  font-weight: 900;
}

.detail-topbar.topbar__inner {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.detail-header-title {
  min-width: 0;
}

.detail-header-title strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-header-title span {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #fff0f3;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.detail-favorite-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: end;
  border: 1px solid #f0b7c1;
  border-radius: 6px;
  background: #fff0f3;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
  white-space: nowrap;
}

.detail-favorite-btn::before {
  content: "☆";
  font-size: 16px;
  line-height: 1;
}

.detail-favorite-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.detail-favorite-btn.is-active::before {
  content: "★";
}

.ghost-link {
  justify-self: end;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.detail-page {
  padding: 28px 0 44px;
}

.detail-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}

.detail-cover {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
  box-shadow: var(--shadow);
}

.detail-cover img,
.detail-cover iframe {
  width: 100%;
  height: min(82vh, 980px);
  object-fit: cover;
}

.detail-cover.image-load-error {
  position: relative;
  min-height: 260px;
}

.detail-cover.image-load-error::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #fff;
  color: var(--accent-strong);
  content: "图片加载失败：该图片源可能限制第三方站点引用，请尝试更换图片链接或使用图片代理/本地化存储。";
  font-weight: 800;
  line-height: 1.7;
  text-align: center;
}

.detail-info {
  display: none;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: 30px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: #4d5663;
}

.detail-copy {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.8;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-gallery-wrap {
  margin-top: 22px;
}

.detail-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-gallery-head h2 {
  margin: 0;
  font-size: 22px;
}

.detail-gallery-head span {
  color: var(--accent);
  font-weight: 800;
}

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

.detail-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-photo:not(.is-locked) {
  cursor: zoom-in;
}

.detail-photo img,
.detail-photo iframe {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-photo span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(24, 27, 34, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.detail-photo.is-locked img,
.detail-photo.is-locked iframe {
  filter: blur(10px);
  transform: scale(1.04);
}

.detail-photo.is-locked::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(20, 18, 25, 0.24);
}

.continue-watch {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  min-width: 120px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px rgba(140, 22, 58, 0.28);
}

.image-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  padding: 18px;
  background: rgba(8, 10, 15, 0.92);
}

.image-viewer-modal.is-open {
  display: block;
}

.image-viewer__panel {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #0d0f15;
  color: #fff;
}

.image-viewer__top {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(13, 15, 21, 0.92);
}

.image-viewer__top strong {
  display: block;
  max-width: min(52vw, 720px);
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer__counter {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.image-viewer__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-viewer__toolbar button,
.image-viewer__nav {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.image-viewer__toolbar button {
  position: relative;
  min-width: 38px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
}

.image-viewer__magnifier-btn::before {
  position: absolute;
  top: 9px;
  left: 10px;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.image-viewer__magnifier-btn::after {
  position: absolute;
  top: 22px;
  left: 23px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.image-viewer__toolbar button:hover,
.image-viewer__nav:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.18);
}

.image-viewer__toolbar .image-viewer__feedback-btn {
  min-width: 68px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.3);
  font-weight: 800;
}

.image-viewer__toolbar .image-viewer__feedback-btn--report {
  border-color: rgba(255, 94, 117, 0.72);
  background: #ff3158;
}

.image-viewer__toolbar .image-viewer__feedback-btn--support {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.18);
}

.detail-support-btn {
  border-color: rgba(255, 49, 88, 0.45);
  color: var(--accent-strong);
  font-weight: 800;
}

.detail-cover {
  position: relative;
}

.detail-feedback-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  gap: 6px;
}

.detail-feedback-actions button {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(16, 20, 28, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.detail-feedback-actions button:first-child {
  background: #ff3158;
}

.detail-header-support {
  border-color: rgba(255, 49, 88, 0.45);
  color: var(--accent-strong);
  font-weight: 800;
}

.image-viewer__zoom-value {
  min-width: 54px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.image-viewer__canvas {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: auto;
  padding: 18px 72px;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.image-viewer__canvas.is-pan-ready {
  cursor: grab;
}

.image-viewer__canvas.is-panning {
  cursor: grabbing;
}

.image-viewer__canvas::after {
  position: absolute;
  left: var(--lens-x, 50%);
  top: var(--lens-y, 50%);
  z-index: 2;
  width: 94px;
  height: 94px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 58%, rgba(255, 255, 255, 0) 62%);
  box-shadow:
    0 0 0 999px rgba(255, 255, 255, 0.015),
    0 12px 32px rgba(0, 0, 0, 0.34);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.image-viewer__canvas.is-magnifying::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.image-viewer__stage {
  display: grid;
  place-items: center;
  transform-origin: center center;
  transition: transform 0.16s ease;
  will-change: transform;
}

.image-viewer__canvas.is-panning .image-viewer__stage,
.image-viewer__canvas.is-pinching .image-viewer__stage {
  transition: none;
}

.image-viewer__stage img,
.image-viewer__stage iframe {
  display: block;
  max-width: calc(100vw - 180px);
  max-height: calc(100vh - 138px);
  border: 0;
  border-radius: 8px;
  background: #111;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.44);
}

.image-viewer__stage iframe {
  width: min(900px, calc(100vw - 180px));
  height: calc(100vh - 138px);
}

.image-viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 72px;
  border-radius: 999px;
  font-size: 44px;
  line-height: 1;
  transform: translateY(-50%);
}

.image-viewer__nav--prev {
  left: 18px;
}

.image-viewer__nav--next {
  right: 18px;
}

.reward-watch-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(43, 0, 27, 0.66);
}

.reward-watch-modal.is-open {
  display: flex;
}

.reward-watch-modal__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 16px;
  background: #dc2387;
  color: #fff;
  text-align: center;
  box-shadow: 0 26px 80px rgba(72, 0, 45, 0.38);
}

.reward-watch-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.reward-watch-modal__media {
  width: calc(100% - 48px);
  height: 210px;
  margin: 24px auto 14px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.reward-watch-modal__media img,
.reward-watch-modal__media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.external-image-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #111;
  overflow: hidden;
  pointer-events: none;
}

.detail-cover .external-image-frame,
.detail-photo .external-image-frame {
  height: min(82vh, 980px);
  aspect-ratio: 3 / 4;
}

.detail-photo .external-image-frame {
  height: auto;
}

.album-card__cover .external-image-frame,
.reward-watch-modal__media .external-image-frame {
  height: 100%;
}

.reward-watch-modal h2 {
  margin: 0 20px 6px;
  font-size: 25px;
}

.reward-watch-modal__meta,
.reward-watch-modal__copy {
  margin: 0 22px 8px;
  line-height: 1.6;
}

.reward-options {
  display: grid;
  gap: 7px;
  margin: 18px 26px;
}

.reward-options__loading {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 800;
}

.reward-options button {
  min-height: 47px;
  border: 0;
  border-radius: 13px;
  background: #ffe000;
  color: #231a00;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.reward-options span {
  display: block;
  color: #d11716;
  font-size: 12px;
  font-weight: 800;
}

.reward-watch-modal__cancel {
  margin: 0 0 18px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.reward-watch-modal__tip {
  margin: 0;
  padding: 8px 10px;
  background: #ffe000;
  color: #4a2500;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.register-required-modal,
.payment-channel-modal,
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(18, 14, 22, 0.64);
}

.register-required-modal.is-open,
.payment-channel-modal.is-open,
.feedback-modal.is-open {
  display: grid;
}

.register-required-modal__panel,
.payment-channel-modal__panel,
.feedback-modal__panel {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 16px;
  background: rgba(255, 250, 246, 0.98);
  box-shadow: 0 24px 80px rgba(16, 12, 18, 0.32);
}

.register-required-modal__panel {
  padding: 22px;
}

.register-required-modal__close,
.payment-channel-modal__close,
.feedback-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #c2c6cf;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.register-required-modal h2,
.payment-channel-modal h2,
.feedback-modal h2 {
  margin: 0 42px 12px;
  color: #55515a;
  font-size: 20px;
  text-align: center;
}

.register-required-modal p {
  margin: 0 0 16px;
  color: #6a6170;
  line-height: 1.8;
  text-align: center;
}

.register-required-form {
  display: grid;
  gap: 10px;
}

.register-required-form input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: #fff;
}

.register-required-modal__status,
.payment-channel-modal__status,
.feedback-modal__status {
  min-height: 20px;
  color: var(--accent-strong) !important;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.feedback-modal__panel {
  padding: 22px;
}

.feedback-modal {
  z-index: 120;
}

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

.feedback-form {
  display: grid;
  gap: 12px;
}

.feedback-form label {
  display: grid;
  gap: 6px;
  color: #55515a;
  font-weight: 800;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

.feedback-message-cell {
  min-width: 260px;
  max-width: 420px;
  white-space: pre-wrap;
}

.payment-channel-modal__panel {
  padding: 20px 16px 18px;
}

.payment-channel-modal__notice {
  display: grid;
  width: min(306px, 100%);
  min-height: 34px;
  margin: 8px auto;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: #ff0717;
  font-weight: 900;
}

.payment-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 34px;
  margin-top: 14px;
  padding: 14px 20px;
  border: 3px solid #08a9ff;
  background: rgba(255, 255, 255, 0.3);
}

.payment-channel-button {
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #ff0717;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
}

.payment-channel-button__logo {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 58px;
  padding: 8px 12px;
  border-radius: 7px;
  background: #fff;
  color: #48515f;
  text-align: left;
}

.payment-channel-button__logo b {
  display: grid;
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: #16a8f2;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.payment-channel-button.is-wxpay .payment-channel-button__logo b {
  border-radius: 50%;
  background: #09b954;
}

.payment-channel-button__logo strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-channel-button__logo small {
  color: #727b89;
  font-size: 10px;
  font-weight: 800;
}

.payment-channel-button em {
  font-style: normal;
}

.dashboard-page {
  min-height: 100vh;
  background: #eef2f7;
}

.admin-layout-page {
  overflow-x: hidden;
}

.admin-app {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 14px;
  background: #292c36;
  color: #fff;
}

.admin-sidebar__brand {
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}

.admin-sidebar__brand span {
  color: #ffd500;
  font-size: 12px;
  font-weight: 900;
}

.admin-sidebar__brand strong {
  font-size: 24px;
  line-height: 1.2;
}

.admin-menu {
  display: grid;
  gap: 8px;
}

.admin-menu button {
  min-height: 43px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 0 14px;
}

.admin-menu button:hover,
.admin-menu button.is-active {
  background: #dc2387;
}

.admin-main {
  min-width: 0;
  padding: 24px;
}

.admin-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-main-head p,
.admin-main-head h1 {
  margin: 0;
}

.admin-main-head p {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.admin-main-head h1 {
  font-size: 26px;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-head-actions a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.admin-section {
  display: grid;
  gap: 18px;
}

.admin-section[hidden] {
  display: none !important;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-stat-card {
  min-height: 104px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 35, 55, 0.05);
}

.admin-stat-card p {
  margin: 0 0 12px;
  color: #657083;
}

.admin-stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.admin-two-column {
  display: grid;
  grid-template-columns: minmax(320px, 0.5fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-two-column--library {
  grid-template-columns: minmax(420px, 0.8fr) minmax(0, 1fr);
}

.admin-stack {
  display: grid;
  gap: 18px;
  align-items: start;
}

.admin-guide {
  display: grid;
  gap: 10px;
  padding: 18px;
  color: #536070;
  line-height: 1.8;
}

.admin-guide p {
  margin: 0;
}

.dashboard-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px min(28px, 5vw);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.dashboard-top p,
.dashboard-top h1 {
  margin: 0;
}

.dashboard-top p {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-top h1 {
  font-size: 24px;
}

.dashboard-top nav {
  display: flex;
  gap: 10px;
}

.dashboard-top a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.dashboard-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 46px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 35, 55, 0.06);
}

.dashboard-card--wide {
  min-width: 0;
}

.dashboard-card h2 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.payment-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.payment-filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.payment-filter-bar input,
.payment-filter-bar select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.payment-filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.payment-filter-actions .primary-btn,
.payment-filter-actions .secondary-btn {
  min-height: 38px;
}

.payment-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.payment-stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.payment-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payment-stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
}

.payment-filter-note {
  margin: 0;
  padding: 0 18px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.dashboard-card__toolbar {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.dashboard-card__toolbar h2 {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 0 0;
  border-bottom: 0;
  font-size: 18px;
}

.album-library-tools {
  display: grid;
  flex: 1;
  gap: 10px;
  min-width: 0;
}

.album-library-switch {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.album-library-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
  font-weight: 900;
}

.album-library-switch button.is-active {
  background: var(--ink);
  color: #fff;
}

.album-category-list {
  display: grid;
  padding: 16px;
}

.album-category-tabs {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.album-category-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 12px;
}

.album-category-tabs button:hover,
.album-category-tabs button.is-active {
  border-color: #f0b7c1;
  background: #fff0f3;
  color: var(--accent-strong);
}

.album-category-tabs strong {
  font-size: 14px;
}

.album-category-tabs span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.album-category-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.album-category-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.album-category-panel__head h3 {
  margin: 0;
  font-size: 18px;
}

.album-category-panel__head span {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.album-category-panel__actions,
.album-row-actions,
.album-batch-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.album-batch-toolbar {
  justify-content: flex-end;
  min-height: 52px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.album-batch-toolbar__count {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.album-batch-toolbar__count strong {
  color: var(--accent-strong);
  font-size: 16px;
}

.album-batch-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 12px;
  font-weight: 800;
}

.album-batch-button:hover {
  border-color: #f0b7c1;
  background: #fff0f3;
  color: var(--accent-strong);
}

.album-batch-button--danger,
.table-action--danger {
  border-color: #efb0b0;
  background: #fff3f3;
  color: #c62828;
}

.album-select-cell {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.album-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.album-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.album-status.is-published {
  background: #e8f7ef;
  color: #137a44;
}

.album-status.is-unpublished {
  background: #eef1f5;
  color: #687385;
}

.album-row-actions {
  min-width: 190px;
}

.album-category-panel .table-wrap {
  overflow-x: auto;
}

.album-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.album-pagination button {
  min-width: 36px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.album-pagination button:hover,
.album-pagination button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.empty-state {
  padding: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.edit-category-modal .edit-album-modal__panel {
  width: min(460px, 100%);
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.admin-form--single,
.agent-code-form {
  grid-template-columns: 1fr;
}

.zip-import-form {
  margin: 0 18px 12px;
  border: 1px dashed rgba(204, 45, 82, 0.34);
  border-radius: 8px;
  background: #fff8fa;
}

.admin-form label,
.copy-link {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 800;
}

.span-2 {
  grid-column: 1 / -1;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.copy-link input,
.table-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  outline: 0;
  background: #f9fbfd;
}

.agent-code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.agent-code-field .ghost-btn {
  min-height: 40px;
  white-space: nowrap;
}

.plan-editor {
  display: grid;
  gap: 10px;
}

.payment-channel-editor {
  display: grid;
  gap: 12px;
}

.plan-editor-row {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) 130px 92px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.plan-editor-row label {
  padding: 0;
}

.payment-channel-row {
  display: grid;
  grid-template-columns: 128px 128px 112px repeat(4, minmax(150px, 1fr)) 84px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.payment-channel-row label {
  padding: 0;
}

.plan-editor-row .table-action,
.payment-channel-row .table-action {
  min-height: 40px;
}

.plan-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-actions .primary-btn,
.storage-actions .ghost-btn {
  min-width: 150px;
}

.admin-form textarea {
  min-height: 132px;
  resize: vertical;
}

.qr-upload-field {
  position: relative;
}

.qr-upload-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.qr-upload-hint {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px dashed #f0b7c1;
  border-radius: 7px;
  background: #fff0f3;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 900;
}

.qr-upload-preview {
  width: 118px;
  height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.withdraw-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 0;
}

.withdraw-tips div {
  padding: 12px;
  border-radius: 8px;
  background: #f6f8fb;
}

.withdraw-tips span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.withdraw-tips strong {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-size: 20px;
}

.withdraw-tips p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #fff8e1;
  color: #6c4a00;
  line-height: 1.7;
}

.check-line {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
}

.check-line input {
  width: auto;
}

.form-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f6f8fb;
  color: var(--muted);
  line-height: 1.5;
}

.form-status.is-success {
  background: #eaf8f1;
  color: #117a44;
}

.form-status.is-error {
  background: #fff0f3;
  color: var(--accent-strong);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f8fafc;
  color: #5b6472;
  font-size: 12px;
}

td a {
  color: var(--accent);
  font-weight: 800;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.table-action {
  min-height: 32px;
  border: 1px solid #f0b7c1;
  border-radius: 6px;
  background: #fff0f3;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 800;
}

.table-mini-input {
  width: 92px !important;
  min-width: 0;
  padding: 8px 9px !important;
}

.table-mini-input--code {
  width: 128px !important;
}

.agent-detail-modal__panel {
  width: min(1060px, 100%);
}

.agent-detail-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px;
}

.agent-detail-stats div {
  padding: 14px;
  border-radius: 8px;
  background: #f6f8fb;
}

.agent-detail-stats strong {
  display: block;
  color: var(--accent);
  font-size: 20px;
}

.agent-detail-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.edit-album-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 20px;
}

.edit-album-modal.is-open {
  display: grid;
}

.edit-album-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 30, 0.52);
}

.edit-album-modal__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 22, 30, 0.28);
}

.edit-album-modal__panel h2 {
  margin: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.mini-stats div {
  min-height: 86px;
  padding: 16px;
  border-radius: 8px;
  background: #f6f8fb;
}

.mini-stats span {
  display: block;
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

.mini-stats p {
  margin: 8px 0 0;
  color: var(--muted);
}

.agent-ratio-card {
  margin-bottom: 18px;
}

.agent-ratio-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
  color: var(--muted);
  font-weight: 800;
}

.agent-ratio-code strong {
  padding: 8px 12px;
  border-radius: 7px;
  background: #fff0f3;
  color: var(--accent-strong);
  font-size: 22px;
  letter-spacing: 2px;
}

.agent-ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.agent-ratio-grid article {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.agent-ratio-grid strong {
  display: block;
  color: var(--accent);
  font-size: 26px;
  line-height: 1.1;
}

.agent-ratio-grid h3 {
  margin: 10px 0 8px;
  font-size: 16px;
}

.agent-ratio-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.agent-login-card {
  max-width: 520px;
  margin: 0 auto 18px;
}

.agent-workspace[hidden],
.agent-login-card[hidden] {
  display: none;
}

.agent-login-extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 13px;
}

.agent-login-extra .ghost-btn {
  min-height: 36px;
  white-space: nowrap;
}

.agent-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
}

.agent-card-actions .primary-btn,
.agent-card-actions .ghost-btn {
  min-height: 38px;
}

.agent-card-actions #copyPromo {
  margin: 0;
}

.dashboard-page:not(.admin-layout-page) .dashboard-top {
  padding: 10px min(18px, 4vw);
}

.dashboard-page:not(.admin-layout-page) .dashboard-top h1 {
  font-size: 22px;
}

.dashboard-page:not(.admin-layout-page) .dashboard-top a {
  padding: 7px 10px;
}

.dashboard-page:not(.admin-layout-page) .dashboard-shell {
  width: min(1180px, calc(100% - 16px));
  padding: 12px 0 24px;
}

.dashboard-page:not(.admin-layout-page) .dashboard-grid {
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-page:not(.admin-layout-page) .dashboard-card h2 {
  padding: 12px 14px;
  font-size: 17px;
}

.dashboard-page:not(.admin-layout-page) .copy-link {
  padding: 12px 14px 8px;
}

.dashboard-page:not(.admin-layout-page) .admin-form {
  gap: 10px;
  padding: 12px 14px;
}

.dashboard-page:not(.admin-layout-page) .admin-form input,
.dashboard-page:not(.admin-layout-page) .admin-form textarea,
.dashboard-page:not(.admin-layout-page) .copy-link input {
  padding: 8px 10px;
}

.dashboard-page:not(.admin-layout-page) .mini-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
}

.dashboard-page:not(.admin-layout-page) .mini-stats div {
  min-height: 72px;
  padding: 12px;
}

.dashboard-page:not(.admin-layout-page) .mini-stats span {
  font-size: 20px;
}

.dashboard-page:not(.admin-layout-page) .mini-stats p {
  margin-top: 6px;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-card {
  margin-bottom: 10px;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-code {
  padding: 12px 14px 0;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-code strong {
  padding: 6px 10px;
  font-size: 18px;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-grid {
  gap: 8px;
  padding: 12px 14px;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-grid article {
  min-height: 112px;
  padding: 12px;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-grid strong {
  font-size: 22px;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-grid h3 {
  margin: 7px 0 5px;
  font-size: 15px;
}

.dashboard-page:not(.admin-layout-page) .agent-ratio-grid p {
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-page:not(.admin-layout-page) .withdraw-tips {
  gap: 8px;
  padding: 12px 14px 0;
}

.dashboard-page:not(.admin-layout-page) .withdraw-tips div,
.dashboard-page:not(.admin-layout-page) .withdraw-tips p {
  padding: 10px;
}

.copy-link {
  padding: 18px 18px 12px;
}

#copyPromo {
  margin: 0 18px 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 60;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 16px;
  border-radius: 7px;
  background: rgba(32, 34, 42, 0.92);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.site-modal.is-open {
  display: grid;
}

.site-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 30, 0.48);
}

.site-modal__panel {
  position: relative;
  width: min(460px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 22, 30, 0.28);
}

.site-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.site-modal__content {
  padding: 18px;
}

.site-modal__image {
  aspect-ratio: 3 / 4;
  margin: -18px -18px 16px;
  width: calc(100% + 36px);
  object-fit: cover;
}

.site-modal h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.site-modal p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.agent-portal-dialog {
  display: grid;
  gap: 14px;
}

.agent-portal-dialog__address {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.agent-portal-dialog__address input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8fb;
  color: var(--ink);
  padding: 10px 12px;
}

.agent-portal-dialog__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.agent-income {
  display: grid;
  gap: 14px;
}

.agent-income__list {
  display: grid;
  gap: 10px;
}

.agent-income__list div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafc;
}

.agent-income__list div.has-ratio {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.agent-income__list strong {
  color: var(--ink);
  font-size: 14px;
}

.agent-income__ratio {
  display: inline-grid;
  min-width: 48px;
  min-height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #ffe8ef;
  color: var(--accent-strong);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.agent-income__list span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.account-form {
  display: grid;
  gap: 12px;
}

.account-form label {
  display: grid;
  gap: 7px;
  color: #1f2633;
  font-size: 13px;
  font-weight: 700;
}

.account-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 12px;
  color: #111827;
  font: inherit;
}

.account-form input:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(206, 45, 84, 0.12);
}

.mock-form {
  display: grid;
  gap: 10px;
}

.account-form {
  display: grid;
  gap: 10px;
}

.mock-form input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  outline: 0;
}

.account-form input,
.account-center__link input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  outline: 0;
  background: #f9fbfd;
}

.mock-form input:focus {
  border-color: var(--accent);
}

.account-center {
  display: grid;
  gap: 14px;
}

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

.account-center__grid div {
  min-height: 76px;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8fb;
}

.account-center__grid span,
.account-center__link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-center__grid strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.account-center__link {
  display: grid;
  gap: 7px;
}

.account-center__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1100px) {
  .admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-two-column,
  .admin-two-column--library {
    grid-template-columns: 1fr;
  }

  .topbar__inner {
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1;
    order: 0;
    margin-bottom: 0;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar--right {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .admin-sidebar__brand {
    margin-bottom: 14px;
  }

  .admin-sidebar__brand strong {
    font-size: 22px;
  }

  .admin-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-menu button {
    text-align: center;
  }

  .admin-main {
    padding: 16px;
  }

  .admin-main-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .payment-filter-bar,
  .payment-stats-grid {
    grid-template-columns: 1fr;
  }

  .payment-filter-actions {
    align-items: stretch;
  }

  .dashboard-card__toolbar,
  .album-category-panel__head {
    flex-direction: column;
  }

  .dashboard-card__toolbar h2 {
    padding-top: 0;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .topbar__inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 0;
  }

  .nav {
    grid-column: 1 / -1;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .model-filter-bar {
    position: static;
  }

  .model-filter-bar__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-actions {
    justify-content: end;
  }

  .search {
    grid-column: 1;
    min-width: 0;
  }

  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .sidebar--right {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .tabs button {
    white-space: nowrap;
  }

  .detail-shell {
    grid-template-columns: 1fr;
  }

  .detail-info h1 {
    font-size: 24px;
  }

  .detail-photo-grid {
    grid-template-columns: 1fr;
  }

  .image-viewer-modal {
    padding: 0;
  }

  .image-viewer__panel {
    border-radius: 0;
  }

  .image-viewer__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-viewer__top strong {
    max-width: calc(100vw - 28px);
  }

  .image-viewer__toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .image-viewer__canvas {
    padding: 12px 48px;
  }

  .image-viewer__stage img,
  .image-viewer__stage iframe {
    max-width: calc(100vw - 96px);
    max-height: calc(100vh - 158px);
  }

  .image-viewer__stage iframe {
    width: calc(100vw - 96px);
    height: calc(100vh - 158px);
  }

  .image-viewer__nav {
    width: 38px;
    height: 58px;
    font-size: 34px;
  }

  .image-viewer__nav--prev {
    left: 6px;
  }

  .image-viewer__nav--next {
    right: 6px;
  }

  .payment-channel-grid {
    gap: 14px;
    padding: 12px;
  }

  .dashboard-top,
  .dashboard-grid,
  .agent-ratio-grid,
  .withdraw-tips,
  .plan-editor-row,
  .payment-channel-row,
  .admin-form,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .span-2 {
    grid-column: auto;
  }

  .dashboard-page:not(.admin-layout-page) .dashboard-top {
    flex-direction: row;
    align-items: center;
  }

  .dashboard-page:not(.admin-layout-page) .mini-stats,
  .dashboard-page:not(.admin-layout-page) .withdraw-tips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-page:not(.admin-layout-page) .agent-ratio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-page:not(.admin-layout-page) .agent-ratio-grid article {
    min-height: 0;
    padding: 10px 8px;
  }

  .dashboard-page:not(.admin-layout-page) .agent-ratio-grid p {
    display: none;
  }
}

@media (max-width: 520px) {
  .wechat-open-guide {
    align-items: start;
    padding: 86px 12px 12px;
  }

  .wechat-open-guide__arrow {
    top: -6px;
    right: -8px;
    width: 156px;
    height: 156px;
  }

  .wechat-open-guide__panel {
    max-height: calc(100vh - 96px);
    margin-top: 0;
    padding: 12px 14px 14px;
    border-radius: 16px;
    overflow-y: auto;
  }

  .wechat-open-guide__headline {
    grid-template-columns: 104px 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .wechat-open-guide__feature {
    min-height: 86px;
  }

  .wechat-open-guide__feature span {
    font-size: 25px;
    line-height: 0.96;
  }

  .wechat-open-guide__model-preview {
    min-height: 110px;
    margin-bottom: 12px;
  }

  .wechat-open-guide h1 {
    font-size: 25px;
  }

  .wechat-open-guide__copy {
    font-size: 14px;
    line-height: 1.55;
  }

  .wechat-open-guide__steps {
    display: none;
  }

  .wechat-open-guide__menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .wechat-open-guide__menu div {
    min-height: 82px;
  }

  .wechat-open-guide__menu img {
    max-width: 86px;
  }

  .wechat-open-guide__copylink {
    min-height: 40px;
  }

  .wechat-open-guide__tip {
    font-size: 11px;
  }

  .admin-menu {
    grid-template-columns: 1fr;
  }

  .wrap {
    width: min(100% - 20px, 1280px);
  }

  .brand__text {
    font-size: 18px;
  }

  .user-actions {
    gap: 6px;
  }

  .ghost-btn,
  .primary-btn {
    padding: 0 10px;
  }

  .quick-links {
    flex-wrap: wrap;
  }

  .section-head h1 {
    font-size: 24px;
  }

  .gallery-grid {
    gap: 12px;
  }

  .album-card__body {
    padding: 10px;
  }

  .album-card h3 {
    font-size: 14px;
  }

  .bottom-tools__inner {
    gap: 4px;
  }

  .bottom-tools__item {
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
  }

  .bottom-tools__icon {
    width: 23px;
    height: 23px;
  }
}

.home-page .topbar__inner {
  gap: 8px;
  min-height: 0;
  padding: 5px 0;
}

.home-page .nav {
  gap: 5px 8px;
  padding: 5px 8px;
  border-radius: 10px;
}

.home-page .nav button {
  padding: 7px 12px;
  font-size: 13px;
}

.home-page .search {
  height: 36px;
  grid-template-columns: 1fr 36px;
}

.home-page .ghost-btn,
.home-page .primary-btn {
  min-height: 36px;
  padding: 0 12px;
}

.home-page .footer__inner {
  min-height: 50px;
}

.home-page .bottom-tools__inner {
  min-height: 50px;
  gap: 4px;
  padding: 4px 0;
}

.home-page .bottom-tools__item {
  flex-direction: column;
  gap: 2px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.15;
}

.home-page .bottom-tools__icon {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

@media (max-width: 820px) {
  .home-page .topbar__inner {
    gap: 7px;
    padding: 5px 0;
  }

  .home-page .nav {
    gap: 4px 8px;
    padding: 5px 8px;
  }

  .home-page .search {
    height: 36px;
  }
}

@media (max-width: 520px) {
  .home-page .topbar__inner {
    gap: 5px;
    padding: 3px 0;
  }

  .home-page .nav {
    gap: 2px 6px;
    padding: 3px 6px;
    border-radius: 9px;
  }

  .home-page .nav button {
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.1;
  }

  .home-page .search {
    height: 32px;
    grid-template-columns: 1fr 32px;
  }

  .home-page .search input {
    padding: 0 10px;
    font-size: 13px;
  }

  .home-page .ghost-btn,
  .home-page .primary-btn {
    min-height: 32px;
    padding: 0 9px;
    font-size: 13px;
  }

  .home-page .bottom-tools__inner {
    min-height: 44px;
    padding: 2px 0;
  }

  .home-page .bottom-tools__item {
    gap: 1px;
    font-size: 11px;
  }

  .home-page .bottom-tools__icon {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .agent-income__actions {
    grid-template-columns: 1fr;
  }

  .agent-portal-dialog__actions {
    grid-template-columns: 1fr;
  }
}

/* Compact fullscreen image viewer */
.image-viewer-modal {
  padding: 0;
  background: #070910;
}

.image-viewer__panel {
  border: 0;
  border-radius: 0;
  background: #070910;
}

.image-viewer__top {
  min-height: 42px;
  padding: 4px 8px;
  gap: 8px;
  background: rgba(10, 12, 18, 0.78);
  backdrop-filter: blur(10px);
}

.image-viewer__top strong {
  max-width: min(42vw, 620px);
  font-size: 14px;
  line-height: 1.15;
}

.image-viewer__counter {
  margin-top: 0;
  font-size: 11px;
  line-height: 1.1;
}

.image-viewer__toolbar {
  gap: 6px;
}

.image-viewer__toolbar button {
  min-width: 32px;
  height: 32px;
  border-radius: 7px;
  font-size: 15px;
}

.image-viewer__zoom-value {
  min-width: 42px;
  font-size: 12px;
}

.image-viewer__magnifier-btn::before {
  top: 7px;
  left: 8px;
  width: 12px;
  height: 12px;
}

.image-viewer__magnifier-btn::after {
  top: 20px;
  left: 20px;
  width: 9px;
}

.image-viewer__canvas {
  padding: 4px 34px;
}

.image-viewer__stage img,
.image-viewer__stage iframe {
  max-width: calc(100vw - 68px);
  max-height: calc(100vh - 52px);
  border-radius: 4px;
  box-shadow: none;
}

.image-viewer__stage iframe {
  width: calc(100vw - 68px);
  height: calc(100vh - 52px);
}

.image-viewer__nav {
  width: 30px;
  height: 46px;
  border-radius: 10px;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.12);
}

.image-viewer__nav--prev {
  left: 4px;
}

.image-viewer__nav--next {
  right: 4px;
}

@media (max-width: 820px) {
  .image-viewer__top {
    flex-direction: row;
    align-items: center;
    min-height: 40px;
    padding: 4px 6px;
  }

  .image-viewer__top strong {
    max-width: calc(100vw - 232px);
    font-size: 13px;
  }

  .image-viewer__toolbar {
    width: auto;
    flex: 0 0 auto;
    gap: 5px;
    justify-content: flex-end;
  }

  .image-viewer__toolbar button {
    min-width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 14px;
  }

  .image-viewer__toolbar .image-viewer__feedback-btn {
    min-width: 58px;
    padding: 0 7px;
    font-size: 12px;
  }

  .image-viewer__zoom-value {
    min-width: 38px;
    font-size: 11px;
  }

  .image-viewer__magnifier-btn::before {
    top: 7px;
    left: 8px;
    width: 11px;
    height: 11px;
  }

  .image-viewer__magnifier-btn::after {
    top: 19px;
    left: 19px;
    width: 8px;
  }

  .image-viewer__canvas {
    padding: 2px 4px;
  }

  .image-viewer__stage img,
  .image-viewer__stage iframe {
    max-width: calc(100vw - 8px);
    max-height: calc(100vh - 44px);
    border-radius: 3px;
  }

  .image-viewer__stage iframe {
    width: calc(100vw - 8px);
    height: calc(100vh - 44px);
  }

  .image-viewer__nav {
    width: 24px;
    height: 40px;
    border-radius: 8px;
    font-size: 24px;
  }

  .image-viewer__nav--prev {
    left: 2px;
  }

  .image-viewer__nav--next {
    right: 2px;
  }
}

@media (max-width: 430px) {
  .image-viewer__top {
    min-height: 38px;
    gap: 4px;
  }

  .image-viewer__top strong {
    max-width: calc(100vw - 204px);
    font-size: 12px;
  }

  .image-viewer__counter {
    font-size: 10px;
  }

  .image-viewer__toolbar {
    gap: 4px;
  }

  .image-viewer__toolbar button {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .image-viewer__toolbar .image-viewer__feedback-btn {
    min-width: 52px;
    padding: 0 5px;
    font-size: 11px;
  }

  .image-viewer__zoom-value {
    min-width: 34px;
  }

  .image-viewer__canvas {
    padding: 1px 4px;
  }

  .image-viewer__stage img,
  .image-viewer__stage iframe {
    max-width: calc(100vw - 8px);
    max-height: calc(100vh - 40px);
  }

  .image-viewer__stage iframe {
    width: calc(100vw - 8px);
    height: calc(100vh - 40px);
  }
}

@media (hover: none) and (pointer: coarse) {
  .image-viewer__zoom-control {
    display: none;
  }

  .image-viewer__top strong {
    max-width: calc(100vw - 156px);
  }
}

/* Front feedback controls */
.image-viewer__toolbar .image-viewer__feedback-btn {
  min-width: 68px;
  padding: 0 10px;
  font-weight: 800;
}

.image-viewer__toolbar .image-viewer__feedback-btn--report {
  border-color: rgba(255, 94, 117, 0.72);
  background: #ff3158;
  color: #fff;
}

.image-viewer__toolbar .image-viewer__feedback-btn--support {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.detail-support-btn {
  border-color: rgba(255, 49, 88, 0.45);
  color: var(--accent-strong);
  font-weight: 800;
}

.detail-cover {
  position: relative;
}

.detail-feedback-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  gap: 6px;
}

.detail-feedback-actions button {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(16, 20, 28, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.detail-feedback-actions button:first-child {
  background: #ff3158;
}

.detail-header-support {
  border-color: rgba(255, 49, 88, 0.45);
  color: var(--accent-strong);
  font-weight: 800;
}

@media (max-width: 820px) {
  .image-viewer__toolbar .image-viewer__feedback-btn {
    min-width: 58px;
    padding: 0 7px;
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .image-viewer__toolbar .image-viewer__feedback-btn {
    min-width: 52px;
    padding: 0 5px;
    font-size: 11px;
  }
}

/* Detail header compact layout */
.detail-topbar.topbar__inner {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.detail-header-title strong {
  font-size: 18px;
  line-height: 1.2;
}

.detail-header-title span {
  margin-top: 3px;
  padding: 3px 7px;
  font-size: 12px;
}

.detail-favorite-btn,
.detail-header-report,
.detail-topbar .ghost-link {
  min-height: 34px;
  padding: 0 11px;
  font-size: 14px;
  line-height: 32px;
}

.detail-favorite-btn {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.detail-favorite-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.detail-header-report {
  border-color: rgba(255, 49, 88, 0.42);
  color: var(--accent-strong);
  font-weight: 800;
}

.detail-feedback-actions {
  top: 8px;
  right: 8px;
}

.detail-feedback-actions button {
  padding: 6px 9px;
  font-size: 12px;
}

@media (max-width: 520px) {
  .detail-topbar.topbar__inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
  }

  .detail-header-title {
    grid-column: 1 / -1;
  }

  .detail-header-report,
  .detail-favorite-btn,
  .detail-topbar .ghost-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
    line-height: 30px;
  }
}

/* Detail header top actions and inline count */
.detail-topbar.topbar__inner {
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 10px;
}

.detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  order: 1;
}

.detail-header-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  order: 2;
}

.detail-header-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-header-title span {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1.1;
}

.detail-header-actions .ghost-link,
.detail-header-actions .detail-favorite-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 30px;
}

.detail-back-btn {
  font-weight: 800;
}

@media (max-width: 520px) {
  .detail-topbar.topbar__inner {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .detail-header-actions {
    justify-content: flex-end;
    gap: 6px;
  }

  .detail-header-actions .ghost-link,
  .detail-header-actions .detail-favorite-btn {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
    line-height: 28px;
  }

  .detail-header-title {
    grid-column: auto;
  }

  .detail-header-title strong {
    font-size: 18px;
  }
}
