:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.06);
  --surface: rgba(255, 255, 255, 0.01);
  --surface-strong: rgba(255, 255, 255, 0.03);
  --hover: rgba(255, 255, 255, 0.05);
  --mark-bg: rgba(255, 255, 255, 0.92);
  --mark-fg: #0a0a0a;
  --logo-red: #ff0900;
  --font: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.5;
}

body.policy-lock {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: hsl(0 0% 4%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: -50%;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  animation: noise-shift 8s steps(6) infinite;
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 3%); }
  40% { transform: translate(4%, -2%); }
  60% { transform: translate(-3%, -4%); }
  80% { transform: translate(2%, 5%); }
  100% { transform: translate(0, 0); }
}

.page {
  width: min(100% - 48px, 1024px);
  margin: 0 auto;
  padding: 96px 0;
}

.hero {
  margin-bottom: 80px;
  text-align: center;
}

.logo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  object-fit: contain;
  object-position: center center;
}

h1 {
  margin: 0;
  font-size: 36px;
  line-height: 40px;
  font-weight: 500;
  letter-spacing: 0;
}

.title-accent {
  color: var(--logo-red);
}

.lead {
  margin: 16px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.creator-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.creator-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  color: var(--fg);
  text-decoration: none;
  transition: opacity 160ms ease;
}

.creator-link:hover {
  opacity: 0.78;
}

.creator-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
  opacity: 0.92;
}

.policy-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    #000;
}

.policy-overlay::before,
.policy-overlay::after {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
}

.policy-overlay::before {
  background:
    radial-gradient(ellipse at 18% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
    radial-gradient(ellipse at 76% 24%, rgba(255, 255, 255, 0.16), transparent 32%),
    radial-gradient(ellipse at 50% 92%, rgba(255, 255, 255, 0.1), transparent 34%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 6px);
  filter: blur(2px);
  opacity: 0.48;
  transform: translateZ(0);
  animation: policy-bg-drift 12s ease-in-out infinite alternate;
}

.policy-overlay::after {
  opacity: 0.13;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
  animation: noise-shift 8s steps(6) infinite;
}

.policy-overlay.is-hidden {
  display: none;
}

.policy-overlay[data-mode="gate"] .policy-close,
.policy-overlay[data-mode="reader"] .gate-only,
.policy-overlay[data-mode="reader"] .reader-hidden {
  display: none;
}

.policy-modal {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  max-height: min(86vh, 780px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(4, 4, 4, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 34px 110px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(28px) saturate(1.22);
  -webkit-backdrop-filter: blur(28px) saturate(1.22);
}

.policy-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.policy-close:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--hover);
  color: var(--fg);
}

.policy-close svg {
  width: 18px;
  height: 18px;
}

.policy-head {
  padding: 32px 32px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.018);
}

.policy-title {
  margin: 0;
  max-width: 720px;
  font-size: 30px;
  line-height: 38px;
  font-weight: 500;
  letter-spacing: 0;
}

.policy-lead {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.policy-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  color: var(--fg);
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}

.policy-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #f5f5f5;
}

.policy-scroll {
  max-height: min(52vh, 440px);
  overflow-y: auto;
  padding: 24px 32px 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  background: rgba(0, 0, 0, 0.08);
}

.policy-scroll::-webkit-scrollbar {
  width: 8px;
}

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

.policy-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  background-clip: padding-box;
}

.policy-block + .policy-block {
  margin-top: 24px;
}

.policy-block h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}

.policy-block p,
.policy-block li {
  color: var(--muted);
  font-size: 13px;
  line-height: 22px;
}

.policy-block p {
  margin: 0;
}

.policy-block ul {
  margin: 0;
  padding-left: 18px;
}

.policy-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.policy-button {
  min-width: 180px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  font-weight: 500;
  transition: opacity 160ms ease, transform 160ms ease;
}

.policy-button:hover:not(:disabled) {
  opacity: 0.86;
}

.policy-button:active:not(:disabled) {
  transform: translateY(1px);
}

.policy-button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

@keyframes policy-bg-drift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.search {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.search svg {
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 16px 12px 16px 28px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.search input::placeholder {
  color: rgba(163, 163, 163, 0.6);
}

.filter-row {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  display: inline-flex;
  height: 36px;
  min-width: 128px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.filter-button:hover,
.filter-button.active {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--hover);
  color: var(--fg);
}

.filter-button svg {
  width: 14px;
  height: 14px;
}

.catalog-section {
  margin-top: 28px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.section-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0;
}

.table-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.table-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

.table-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.catalog-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

.catalog-table col.name {
  width: 28%;
}

.catalog-table col.favorite,
.catalog-table col.action {
  width: 56px;
}

.catalog-table thead {
  background: var(--surface-strong);
}

.catalog-table th {
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 13px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog-table th:first-child {
  border-left: 0;
}

.catalog-table th.icon-column {
  padding-inline: 8px;
  text-align: center;
}

.catalog-table td {
  border-bottom: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
  padding: 10px 12px;
  vertical-align: middle;
}

.catalog-table td:first-child {
  border-left: 0;
}

.catalog-table tr:last-child td {
  border-bottom: 0;
}

.catalog-table tbody tr {
  transition: background 160ms ease;
}

.catalog-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

.catalog-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.title-cell,
.mobile-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.item-logo-wrap {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  line-height: 0;
}

.item-logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center center;
}

.item-logo-wrap[data-logo="findhomo"] {
  background: rgba(255, 255, 255, 0.92);
  padding: 2px;
}

.item-logo-wrap[data-logo="findhomo"] .item-logo {
  width: 18px;
  height: 18px;
}

.item-logo-fallback {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: var(--fg);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.item-name {
  min-width: 0;
  overflow: hidden;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description {
  display: block;
  overflow: visible;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  white-space: normal;
}

.free-break {
  display: none;
}

.free-mark {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: normal;
}

mark {
  border-radius: 4px;
  padding: 0 2px;
  background: var(--mark-bg);
  color: var(--mark-fg);
}

.icon-cell {
  padding-inline: 8px;
  text-align: center;
}

.icon-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-button:hover,
.icon-button.active {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--hover);
  color: var(--fg);
}

.icon-button.active svg {
  fill: currentColor;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
}

.mobile-list {
  display: none;
}

.mobile-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px;
}

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

.mobile-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

.mobile-main {
  min-width: 0;
  flex: 1;
}

.mobile-desc {
  display: block;
  margin: 6px 0 0;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mobile-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}

.empty-state {
  margin: 16px 0 0;
  border: 1px solid var(--line);
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.info-section {
  margin-top: 96px;
}

.info-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: 0;
}

.info-item {
  border-bottom: 1px solid var(--line-soft);
}

.info-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  padding: 20px 0;
  background: transparent;
  color: rgba(245, 245, 245, 0.9);
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease;
}

.info-trigger:hover {
  color: var(--fg);
}

.info-trigger span {
  font-size: 15px;
  line-height: 20px;
}

.info-trigger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 300ms ease, color 300ms ease;
}

.info-item.is-open .info-trigger svg {
  transform: rotate(180deg);
  color: var(--fg);
}

.info-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition:
    grid-template-rows 300ms ease,
    opacity 220ms ease;
}

.info-item.is-open .info-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.info-panel-inner {
  min-height: 0;
}

.info-copy {
  max-width: 760px;
  padding: 0 32px 24px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 22px;
}

.footer-links {
  display: flex;
  justify-content: center;
  margin-top: 72px;
}

.footer-link {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 2px;
  background: transparent;
  color: rgba(245, 245, 245, 0.72);
  cursor: pointer;
  font-size: 12px;
  line-height: 18px;
  transition: color 160ms ease, opacity 160ms ease;
}

.footer-link:hover {
  color: var(--fg);
}

@media (max-width: 720px) {
  .ambient::after {
    animation: none;
    background-size: 220px 220px;
  }

  .page {
    width: min(100% - 32px, 430px);
    padding: 32px 0 72px;
  }

  .hero {
    margin-bottom: 40px;
  }

  .logo {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
  }

  h1 {
    font-size: 24px;
    line-height: 32px;
  }

  .lead {
    font-size: 14px;
    line-height: 20px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
  }

  .filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 144px;
    width: 100%;
  }

  .filter-button {
    min-width: 0;
    width: 100%;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .section-header h2 {
    font-size: 14px;
    line-height: 20px;
  }

  .desktop-table {
    display: none;
  }

  .mobile-list {
    display: block;
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .free-break {
    display: block;
  }

  .info-section {
    margin-top: 80px;
  }

  .info-section h2 {
    font-size: 22px;
    line-height: 30px;
  }

  .info-copy {
    padding-right: 0;
  }

  .policy-overlay {
    padding: 12px;
  }

  .policy-modal {
    max-height: 92vh;
  }

  .policy-head {
    padding: 24px 20px 18px;
  }

  .policy-title {
    font-size: 23px;
    line-height: 30px;
  }

  .policy-scroll {
    max-height: 54vh;
    padding: 20px;
  }

  .policy-button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .page {
    width: min(100% - 24px, 430px);
  }

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

  .mobile-row {
    flex-direction: column;
  }

  .mobile-actions {
    align-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
