:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #a3a3a3;
  --line: color-mix(in srgb, #ffffff 8%, transparent);
  --line-soft: color-mix(in srgb, #ffffff 6%, transparent);
  --surface: color-mix(in srgb, #ffffff 1%, transparent);
  --surface-strong: color-mix(in srgb, #ffffff 3%, transparent);
  --hover: color-mix(in srgb, #ffffff 5%, transparent);
  --mark-bg: rgba(255, 255, 255, 0.92);
  --mark-fg: #0a0a0a;
  --logo-red: #ff0900;
  --tg-blue: #24a1de;
  --font: Geist, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

[hidden] {
  display: none !important;
}

/* Prevent dragging & unwanted selection of icons, images, logos, and media */
img,
picture,
svg,
canvas,
video,
.logo,
.item-logo,
.item-logo-wrap,
.item-logo-fallback,
.brand-logo,
.icon-button {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Prevent ghost drag on icons inside links and buttons */
a img,
a svg,
button img,
button svg {
  pointer-events: none;
}

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

  &::-webkit-scrollbar {
    display: none;
  }
}

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

  &::-webkit-scrollbar {
    display: none;
  }

  &.policy-lock {
    overflow: hidden;
    touch-action: none;
  }
}

button,
input {
  font: inherit;
}

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

  &::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); }
}

@keyframes dialog-fade-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes backdrop-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Native Modal Dialog */
dialog.policy-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border: none;
  background: transparent;
  color: var(--fg);
  overflow: auto;
  overscroll-behavior: contain;

  &:not([open]) {
    display: none;
  }

  &::backdrop {
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
      rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(28px) saturate(1.22);
    -webkit-backdrop-filter: blur(28px) saturate(1.22);
    animation: backdrop-fade-in 200ms ease forwards;
  }

  &[open] .policy-content {
    animation: dialog-fade-in 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

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

  &[data-mode="reader"] .gate-only,
  &[data-mode="reader"] .reader-hidden {
    display: none !important;
  }
}

dialog.policy-modal:not([open]) {
  display: none !important;
}

.policy-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 860px);
  max-height: min(780px, calc(100dvh - 32px));
  min-height: 0;
  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.88);
  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;
  z-index: 10;
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;

  &:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: var(--hover);
    color: var(--fg);
  }

  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;
  padding-right: 48px;
  font-size: 26px;
  line-height: 34px;
  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: center;
  gap: 10px;
  margin: 0;
  color: var(--fg);
  font-size: 13.5px;
  line-height: 20px;
  cursor: pointer;
  user-select: none;

  input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #f5f5f5;
    cursor: pointer;
    flex-shrink: 0;
  }
}

.policy-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px 32px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  background: rgba(0, 0, 0, 0.08);
  -webkit-overflow-scrolling: touch;

  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: transparent;
  }

  &::-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;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 18px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.28);
}

dialog.policy-modal[data-mode="reader"] .policy-actions {
  justify-content: flex-end;
}

.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;

  &:hover:not(:disabled) {
    opacity: 0.86;
  }

  &:active:not(:disabled) {
    transform: translateY(1px);
  }

  &:disabled {
    cursor: not-allowed;
    opacity: 0.32;
  }

  &.reader-only {
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg);
    border: 1px solid rgba(255, 255, 255, 0.16);

    &:hover {
      background: rgba(255, 255, 255, 0.16);
      color: #ffffff;
      opacity: 1;
    }
  }
}

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

/* Hero Header */
.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;
  filter: drop-shadow(0 0 20px rgba(250, 240, 225, 0.14));
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease;

  &:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 28px rgba(250, 240, 225, 0.28));
  }
}

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;

  &:hover {
    opacity: 0.78;
  }

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

.catalog-count {
  color: var(--muted);
  font-weight: 400;
}

/* Catalog Table & List */
.catalog-section {
  margin-top: 28px;
}

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

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

.view-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 160ms ease;

  svg {
    width: 14px;
    height: 14px;
  }

  &:hover {
    color: var(--fg);
  }

  &.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  }
}

/* Modern Card Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms ease,
              background 200ms ease,
              box-shadow 200ms ease;
  overflow: hidden;

  &:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5),
                0 0 24px -4px rgba(36, 161, 222, 0.08);

    .card-action-btn {
      border-color: rgba(36, 161, 222, 0.4);
      background: rgba(36, 161, 222, 0.15);
      color: #ffffff;
    }
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.card-logo-wrap {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);

  &[data-logo="findhomo"] {
    background: #ffffff !important;
    padding: 3px;

    .item-logo {
      object-fit: contain;
    }
  }

  .item-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.card-logo-fallback {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: #f5f5f5;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body {
  flex: 1;
  margin-bottom: 16px;
}

.card-description {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 160ms ease;
  width: 100%;

  svg {
    width: 14px;
    height: 14px;
    color: var(--tg-blue);
    transition: transform 160ms ease;
  }

  &:hover svg {
    transform: translate(1px, -1px);
  }
}

/* View Mode Switching */
.catalog-section[data-view="grid"] {
  .catalog-grid {
    display: grid;
  }
  .desktop-table,
  .mobile-list {
    display: none !important;
  }
}

.catalog-section[data-view="table"] {
  .catalog-grid {
    display: none !important;
  }
  .desktop-table {
    display: block;
  }
  @media (max-width: 768px) {
    .desktop-table {
      display: none !important;
    }
    .mobile-list {
      display: block !important;
    }
  }
}

.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;

  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  &::-webkit-scrollbar-track {
    background: transparent;
  }

  &::-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;

  col.name {
    width: 28%;
  }

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

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

  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;

    &:first-child {
      border-left: 0;
    }

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

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

    &:first-child {
      border-left: 0;
    }
  }

  tbody tr {
    transition: background 160ms ease;

    &:nth-child(even) {
      background: rgba(255, 255, 255, 0.012);
    }

    &:hover {
      background: rgba(255, 255, 255, 0.03);
    }

    &:last-child td {
      border-bottom: 0;
    }
  }
}

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

.item-logo-wrap {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  line-height: 0;
  background: rgba(255, 255, 255, 0.04);

  &[data-logo="findhomo"] {
    background: #ffffff !important;
    padding: 2px;

    .item-logo {
      object-fit: contain;
    }
  }
}

.item-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.item-logo-fallback {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: var(--fg);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border-radius: 6px;
  text-transform: uppercase;
}

.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: 3px;
  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;

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

  &.active svg {
    fill: currentColor;
    color: #f5f5f5;
  }

  svg {
    width: 17px;
    height: 17px;
    fill: none;
  }
}

/* Mobile List */
.mobile-list {
  display: none;
}

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

  &:last-child {
    border-bottom: 0;
  }

  &: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 (Semantic details/summary) */
.info-section {
  margin-top: 96px;

  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);

  &[open] .info-trigger svg {
    transform: rotate(180deg);
    color: var(--fg);
  }
}

.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;
  list-style: none;
  transition: color 160ms ease;

  &::-webkit-details-marker {
    display: none;
  }

  &:hover {
    color: var(--fg);
  }

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

  svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--muted);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), color 200ms ease;
  }
}

.info-panel {
  padding-bottom: 24px;
  animation: panel-reveal 240ms ease forwards;
}

@keyframes panel-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Footer */
.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;

  &:hover {
    color: var(--fg);
  }
}

/* Responsive Styles */
@media (width <= 768px) {
  .ambient::after {
    animation: none;
    background-size: 220px 220px;
  }

  .page {
    width: min(100% - 32px, 460px);
    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;
  }

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

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

  .view-toggle {
    width: 100%;
  }

  .view-btn {
    flex: 1 1 50%;
    min-height: 40px;
    justify-content: center;
  }

  .desktop-table {
    display: none;
  }

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

  .catalog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .catalog-card {
    padding: 16px;
    min-height: auto;
  }

  .card-action-btn {
    padding: 10px 16px;
    min-height: 44px;
    font-size: 13.5px;
  }

  .free-break {
    display: block;
  }

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

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

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

  dialog.policy-modal {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .policy-content {
    width: 100%;
    max-height: calc(100dvh - 16px);
  }

  .policy-head {
    padding: 22px 18px 16px;
  }

  .policy-title {
    padding-right: 34px;
    font-size: clamp(19px, 6vw, 24px);
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

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

  .policy-consent {
    font-size: 12px;
    line-height: 18px;
  }

  .policy-scroll {
    padding: 18px;
  }

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

  .policy-block h3 {
    font-size: 14px;
    line-height: 20px;
  }

  .policy-block p,
  .policy-block li {
    font-size: 12px;
    line-height: 20px;
  }

  .policy-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  }

  .policy-consent {
    align-items: flex-start;
    font-size: 13px;
    line-height: 18px;
  }

  .policy-button {
    width: 100%;
    min-height: 46px;
  }
}

@media (height <= 640px) {
  dialog.policy-modal {
    align-items: start;
  }

  .policy-content {
    max-height: calc(100dvh - 16px);
  }

  .policy-head {
    padding-top: 18px;
    padding-bottom: 14px;
  }
}

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

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

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

  .catalog-grid {
    gap: 10px;
  }

  .catalog-card {
    padding: 14px 12px;
  }
}

@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;
  }
}
