:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-soft: #f0f3f4;
  --line: #d9e0e4;
  --line-strong: #c4cdd3;
  --text: #1f2933;
  --muted: #66727c;
  --quiet: #87929b;
  --accent: #ee2737;
  --accent-dark: #c91828;
  --accent-soft: #fff0f2;
  --red: #ee2737;
  --red-soft: #fff1eb;
  --cta: #e65c5c;
  --amber: #9a6a00;
  --amber-soft: #fff4cf;
  --fanza-yellow: #ffc847;
  --blue: #2f5f98;
  --blue-soft: #edf4ff;
  --data-accent: #1f7a8c;
  --data-accent-soft: rgba(31, 122, 140, 0.08);
  --data-accent-muted: rgba(31, 122, 140, 0.36);
  --success: #0f766e;
  --danger: #b42335;
  --warning: #9a6a00;
  --chart-grid: rgba(100, 116, 139, 0.14);
  --chart-label: #66727c;
  --pictogram-line: #30343b;
  --shadow: 0 12px 30px rgba(31, 41, 51, 0.08);
  --shadow-soft: 0 8px 20px rgba(31, 41, 51, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

.home-page {
  height: 100dvh;
  overflow: hidden;
}

body,
button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

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

button,
select,
input {
  border: 0;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(160px, 190px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand-name {
  display: block;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.1;
}

.brand-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-start;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.nav-divider {
  width: 1px;
  height: 24px;
  margin: 0 7px;
  background: #b6c0c7;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 9px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.top-nav-link:hover,
.top-nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.status-pill,
.label-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}

.status-pill svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.page-shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.home-page .page-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100dvh - 72px);
  min-height: 0;
  padding: 12px 0;
  overflow: hidden;
}

.home-page .home-overview-shell {
  grid-template-rows: minmax(0, 1fr);
}

.home-search {
  box-shadow: none;
}

.home-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.home-scroll::-webkit-scrollbar {
  width: 10px;
}

.home-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(102, 114, 124, 0.45);
  background-clip: padding-box;
}

.home-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.search-surface {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 1fr);
  gap: 18px 24px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-surface-compact {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.3;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.38;
}

.search-form {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) auto;
  gap: 10px;
}

.type-select {
  display: block;
}

.type-select select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 760;
  outline: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.search-box svg {
  color: var(--quiet);
}

.search-box input {
  width: 100%;
  min-width: 0;
  outline: 0;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--quiet);
}

.primary-button,
.secondary-button,
.subtle-button,
.text-button,
.icon-button,
.segment,
.scope-tab,
.chip,
.item-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius);
  font-weight: 700;
  text-align: center;
}

.primary-button {
  min-height: 44px;
  padding: 0 18px;
  background: var(--cta);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button.large,
.secondary-button.large {
  min-height: 48px;
  padding: 0 16px;
}

.primary-button.full {
  width: 100%;
}

.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}

.subtle-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.subtle-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.text-button {
  min-height: 32px;
  padding: 0 8px;
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px;
}

.icon-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.icon-button:hover,
.icon-button.is-saved,
.save-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.filter-toggle {
  display: none;
}

.segment-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.scope-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.scope-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  white-space: nowrap;
}

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

.segment {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.segment.is-active {
  border-color: var(--fanza-yellow);
  background: var(--amber-soft);
  color: #7c5200;
}

.info-button {
  width: 36px;
  height: 36px;
}

.related-tag-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
}

.related-tag-strip a,
.side-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
  white-space: nowrap;
}

.related-tag-strip a:hover,
.side-tags a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.content-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 282px;
  gap: 20px;
  align-items: start;
  margin-top: 14px;
}

.home-page .content-layout {
  min-height: 0;
  overflow: hidden;
}

.filter-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-panel {
  position: sticky;
  top: 92px;
  padding: 14px 16px;
}

.home-page .filter-panel {
  position: static;
  max-height: 100%;
  overflow: hidden;
}

.panel-heading,
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-group {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.filter-group label,
.filter-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.filter-group select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 26px;
  color: var(--text) !important;
  font-weight: 560 !important;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.chip.is-active,
.chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.range-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.range-row input {
  width: 100%;
  accent-color: var(--accent);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.main-column {
  min-width: 0;
}

.home-page .main-column {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.home-page .main-column::-webkit-scrollbar {
  width: 10px;
}

.home-page .main-column::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(102, 114, 124, 0.45);
  background-clip: padding-box;
}

.home-page .main-column::-webkit-scrollbar-track {
  background: transparent;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-label,
.metric-trend,
.tiny-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  font-size: 24px;
  line-height: 1.1;
}

.metric-trend.positive {
  color: var(--accent-dark);
}

.metric-trend.neutral {
  color: var(--amber);
}

.section-bar {
  margin: 22px 0 14px;
}

.section-bar.compact {
  margin: 0 0 12px;
}

.home-lane {
  padding: 4px 0 18px;
}

.lane-bar {
  margin: 14px 0 10px;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 14px;
}

.compact-card .poster {
  aspect-ratio: 4 / 5;
}

.compact-card .item-body {
  gap: 8px;
}

.compact-card .item-title-row h3 {
  min-height: 40px;
}

.home-ranking-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.75fr);
  gap: 14px;
}

.home-rank-list,
.home-actress-rank {
  margin-top: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mode-list {
  display: grid;
  gap: 7px;
}

.mode-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.mode-link svg {
  width: 16px;
  height: 16px;
}

.mode-link:hover,
.mode-link.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.actress-search-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.actress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.actress-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.actress-avatar {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
}

.actress-card h3 {
  font-size: 16px;
}

.actress-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 16px;
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
}

.item-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.item-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 3 / 4;
  padding: 12px;
  overflow: hidden;
  color: #fff;
  background: #334155;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px);
}

.poster-a {
  background: linear-gradient(135deg, #8a2d1c 0%, #e7cab2 52%, #164e63 100%);
}

.poster-b {
  background: linear-gradient(135deg, #26324f 0%, #d6e7e2 50%, #087f8c 100%);
}

.poster-c {
  background: linear-gradient(135deg, #31504a 0%, #e6d9bd 48%, #7c3f1d 100%);
}

.poster-d {
  background: linear-gradient(135deg, #712f2f 0%, #f2dfcf 46%, #334155 100%);
}

.poster-e {
  background: linear-gradient(135deg, #355070 0%, #f0c8b8 52%, #6d597a 100%);
}

.poster-f {
  background: linear-gradient(135deg, #22577a 0%, #e8ece5 52%, #b7791f 100%);
}

.poster.has-image {
  background-position: center;
  background-size: cover;
}

.poster-tag,
.poster-title {
  position: relative;
  z-index: 1;
}

.poster-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--red);
  font-size: 11px;
  font-weight: 800;
}

.poster-tag.amber {
  background: var(--amber);
}

.poster-tag.teal {
  background: var(--accent);
}

.poster-tag.blue {
  background: var(--blue);
}

.poster-title {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  max-width: 130px;
  font-size: 20px;
  font-weight: 820;
  line-height: 1.1;
}

.poster-rating {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 46px;
  height: 46px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  background: var(--fanza-yellow);
  color: transparent;
  font-size: 0;
}

.poster-rating::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 13px;
  height: 13px;
  background: rgba(255, 255, 255, 0.38);
  transform: rotate(45deg);
  transform-origin: center;
}

.poster-rating::before {
  content: attr(data-rating);
  position: absolute;
  top: 10px;
  left: 5px;
  z-index: 1;
  color: #5f4300;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  transform: rotate(-45deg);
  transform-origin: center;
}

.poster-meta {
  display: none;
}

.poster-actor,
.poster-date {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.66);
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.poster-actor {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-date {
  flex-shrink: 0;
}

.item-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.item-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: start;
}

.item-title-row h3 {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.item-title-row h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.item-meta {
  display: grid;
  gap: 3px;
  min-height: 38px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.item-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta-date {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 680;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.tag-row a,
.tag-row button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
}

.tag-row button {
  appearance: none;
  cursor: pointer;
}

.item-card .tag-row {
  display: none;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 24px;
}

.price-row strong {
  font-size: 15px;
}

.price-row span {
  color: var(--red);
  font-size: 12px;
  font-weight: 760;
}

.item-card .price-row span {
  display: none;
}

.item-cta {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
}

.item-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.item-card .item-cta {
  display: none;
}

.insight-column {
  display: grid;
  gap: 14px;
}

.home-page .insight-column {
  max-height: 100%;
  overflow: hidden;
}

.side-panel {
  padding: 16px;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.rank-list a {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list strong {
  color: var(--accent-dark);
  font-size: 12px;
}

.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.stacked-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.stacked-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.stacked-links span {
  color: var(--muted);
  font-weight: 650;
}

.compact-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mini-saved,
.media-strip {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.mini-cover {
  display: block;
  width: 46px;
  height: 62px;
  border-radius: 6px;
  background: #334155;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr) 278px;
  gap: 22px;
  align-items: start;
}

.detail-media,
.detail-main,
.detail-side .side-panel,
.related-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-media {
  padding: 14px;
}

.detail-poster {
  border-radius: var(--radius);
}

.detail-main {
  padding: 22px;
}

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.label-badge {
  background: var(--amber-soft);
  color: var(--amber);
}

.detail-main h1 {
  max-width: 780px;
  margin-bottom: 8px;
}

.detail-subtitle {
  margin-bottom: 18px;
  color: var(--muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.meta-grid div {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.meta-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.meta-grid dd {
  margin: 0;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 22px;
}

.detail-tags a {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.plain-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-copy {
  margin-bottom: 0;
  color: var(--text);
  line-height: 1.75;
}

.detail-side {
  display: grid;
  gap: 14px;
}

.simple-list {
  display: grid;
  gap: 9px;
  padding-left: 18px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.related-section {
  margin-top: 22px;
  padding: 18px;
}

.trend-shell {
  padding-top: 24px;
}

.trend-section {
  display: grid;
  gap: 16px;
}

.listing-bar h1 {
  margin: 0;
}

.listing-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 230px));
}

.tags-shell {
  padding-top: 24px;
}

.tag-page .trend-section {
  display: grid;
  gap: 14px;
}

.tag-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.tag-search-field {
  min-width: 0;
}

.tag-search-field .search-box {
  height: 42px;
}

.tag-reset-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.tag-result-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.tag-category-tabs {
  justify-content: flex-start;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.tag-category-tabs::-webkit-scrollbar {
  display: none;
}

.tag-category-tab small {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 850;
}

.tag-results {
  display: grid;
  gap: 12px;
}

.tag-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.tag-result-link {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.tag-result-link:hover {
  border-color: rgba(238, 39, 55, 0.36);
  background: var(--accent-soft);
}

.tag-result-link svg {
  width: 15px;
  height: 15px;
  color: var(--quiet);
}

.tag-result-link:hover svg {
  color: var(--accent);
}

.tag-result-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tag-result-text strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-result-text small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.item-modal.is-open {
  display: block;
}

.item-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 41, 51, 0.46);
}

.item-modal-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 22px;
  width: min(940px, calc(100vw - 40px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 20px;
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(31, 41, 51, 0.24);
}

.item-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.item-modal-media {
  min-width: 0;
}

.item-modal-main {
  min-width: 0;
  padding-right: 44px;
}

.item-modal-main h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.25;
}

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

@media (max-width: 1180px) {
  .content-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

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

  .home-page .insight-column {
    display: none;
  }

  .detail-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .detail-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .home-page {
    overflow: auto;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 64px;
    padding: 0 16px;
  }

  .top-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .status-pill {
    display: none;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .page-shell {
    width: min(100% - 24px, 760px);
    padding-top: 16px;
  }

  .home-page .page-shell {
    display: block;
    height: auto;
    overflow: visible;
  }

  .search-surface {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

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

  .home-page .content-layout {
    overflow: visible;
  }

  .tag-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tag-result-count {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .filter-panel {
    position: static;
    display: none;
  }

  .filter-panel.is-open {
    display: block;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .home-page .main-column {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .insight-column {
    grid-template-columns: 1fr;
  }

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

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

  .detail-media {
    max-width: 380px;
  }

  .item-modal-dialog {
    grid-template-columns: 1fr;
    width: min(420px, calc(100vw - 24px));
    padding: 14px;
  }

  .item-modal-main {
    padding-right: 0;
  }

  .item-modal-main h2 {
    font-size: 22px;
  }

  .modal-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 560px) {
  h1 {
    font-size: 24px;
  }

  .brand-note {
    display: none;
  }

  .top-nav-link {
    padding: 0 10px;
  }

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

  .item-body {
    padding: 10px;
  }

  .poster-title {
    font-size: 17px;
  }

  .poster-rating {
    width: 42px;
    height: 42px;
  }

  .poster-rating::before {
    top: 9px;
    left: 5px;
    font-size: 10px;
  }

  .poster-meta {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 5px;
  }

  .poster-actor,
  .poster-date {
    min-height: 22px;
    padding: 0 7px;
    font-size: 11px;
  }

  .poster-date {
    display: none;
  }

  .tag-row {
    display: none;
  }

  .tag-result-grid {
    grid-template-columns: 1fr;
  }

  .price-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .item-title-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

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

  .action-row .primary-button,
  .action-row .secondary-button {
    width: 100%;
  }
}
