/* HK Jetso — palette tokens from DESIGN.md (Airbnb-inspired) */
:root {
  --palette-bg-primary-core: #ff385c;
  --palette-bg-tertiary-core: #e00b41;
  --palette-text-primary: #222222;
  --palette-text-secondary: #6a6a6a;
  --palette-text-focused: #3f3f3f;
  --palette-text-legal: #428bff;
  --palette-border: #c1c1c1;
  --palette-surface-muted: #f2f2f2;
  --palette-surface: #ffffff;
  --palette-text-material-disabled: rgba(0, 0, 0, 0.24);

  --shadow-card:
    rgba(0, 0, 0, 0.02) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 6px,
    rgba(0, 0, 0, 0.1) 0px 4px 8px;
  --shadow-hover: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  --shadow-focus-ring: rgb(255, 255, 255) 0px 0px 0px 4px;

  --radius-btn: 8px;
  --radius-badge: 14px;
  --radius-card: 20px;
  --radius-hero: 32px;
  --radius-pill: 999px;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 22px;
  --space-6: 24px;
  --space-8: 32px;

  --font: "Noto Sans TC", Circular, -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif;
  --touch-min: 44px;

  --section-heading-size: 1.75rem;
  --card-heading-size: 1.38rem;
  --ui-body-size: 0.88rem;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.43;
  color: var(--palette-text-primary);
  background: var(--palette-surface);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 2000;
  padding: var(--space-2) var(--space-4);
  background: var(--palette-text-primary);
  color: var(--palette-surface);
  font-weight: 600;
  font-size: var(--ui-body-size);
  text-decoration: none;
  border-radius: var(--radius-btn);
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
}

.skip-link:focus {
  top: var(--space-4);
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 112rem;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--palette-surface);
  border-bottom: 1px solid color-mix(in srgb, var(--palette-border) 50%, transparent);
  box-shadow: var(--shadow-card);
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.header-brand {
  min-width: 0;
}

.site-title {
  margin: 0 0 4px;
  font-size: clamp(1.25rem, 3vw, var(--section-heading-size));
  font-weight: 700;
  line-height: 1.43;
  letter-spacing: -0.02em;
  color: var(--palette-text-primary);
}

.site-title__accent {
  color: var(--palette-bg-primary-core);
}

.site-tagline {
  margin: 0;
  color: var(--palette-text-secondary);
  font-size: 0.81rem;
  font-weight: 400;
  line-height: 1.23;
}

/* Primary dark CTA (DESIGN.md) */
.btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  border: none;
  cursor: pointer;
  min-height: var(--touch-min);
  padding: 0 var(--space-6);
  border-radius: var(--radius-btn);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--palette-text-primary);
  outline-offset: 2px;
}

.btn--primary-dark {
  background: var(--palette-text-primary);
  color: var(--palette-surface);
}

.btn--primary-dark:hover {
  background: var(--palette-bg-tertiary-core);
}

.btn--accent {
  background: var(--palette-bg-primary-core);
  color: var(--palette-surface);
}

.btn--accent:hover {
  background: var(--palette-bg-tertiary-core);
}

.btn--ghost {
  background: var(--palette-surface-muted);
  color: var(--palette-text-primary);
}

.btn--ghost:hover {
  box-shadow: var(--shadow-hover);
}

.btn--text {
  background: transparent;
  color: var(--palette-text-secondary);
  text-decoration: underline;
  padding: 0 var(--space-2);
  min-height: auto;
}

.btn--text:hover {
  color: var(--palette-text-primary);
}

.btn--pill-nav {
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--pill-nav svg {
  width: 20px;
  height: 20px;
}

.btn--pill-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* —— Search hero —— */
.search-hero {
  padding: var(--space-6) 0 var(--space-4);
}

.search-panel {
  background: var(--palette-surface);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-card);
  padding: var(--space-2) var(--space-4);
  max-width: 52rem;
  margin: 0 auto;
}

.search-input {
  font-family: inherit;
  font-size: var(--ui-body-size);
  font-weight: 400;
  line-height: 1.43;
  color: var(--palette-text-primary);
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-badge);
  background: transparent;
}

.search-input::placeholder {
  color: var(--palette-text-secondary);
}

.search-input:focus {
  outline: none;
}

.search-panel:focus-within {
  box-shadow: var(--shadow-card), 0 0 0 2px var(--palette-bg-primary-core);
}

/* —— Category pills —— */
.category-strip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  max-width: 100%;
}

.category-pills-wrap {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.category-pills {
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0;
  display: flex;
  gap: var(--space-4);
  width: max-content;
}

.category-pill {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: var(--ui-body-size);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--palette-text-secondary);
  background: none;
  border: none;
  padding: var(--space-2) var(--space-2) 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  min-height: var(--touch-min);
}

.category-pill:hover {
  color: var(--palette-text-primary);
}

.category-pill[aria-current="true"] {
  color: var(--palette-text-primary);
  border-bottom-color: var(--palette-bg-primary-core);
}

.category-pill:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
  border-radius: var(--radius-btn);
}

/* —— Main toolbar —— */
.main-content {
  padding: 0 0 var(--space-8);
}

.toolbar-section {
  margin-bottom: var(--space-6);
}

.toolbar-section__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.32px;
  color: var(--palette-text-secondary);
  margin: 0 0 var(--space-3);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-5);
}

.toolbar__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(100%, 11rem);
}

.toolbar__group--grow {
  flex: 1 1 12rem;
}

.sort-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--palette-text-focused);
  min-height: auto;
}

.sort-select {
  font-family: inherit;
  font-size: var(--ui-body-size);
  font-weight: 400;
  padding: 10px var(--space-4);
  min-height: var(--touch-min);
  min-width: 10rem;
  border: 1px solid var(--palette-border);
  border-radius: var(--radius-btn);
  background: var(--palette-surface);
  color: var(--palette-text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.sort-select:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
}

.status-region {
  min-height: 1.5rem;
  margin-bottom: var(--space-4);
  color: var(--palette-text-secondary);
  font-size: var(--ui-body-size);
  font-weight: 400;
}

.section-title {
  font-size: var(--card-heading-size);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.028em;
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--palette-surface-muted);
  color: var(--palette-text-primary);
}

.featured {
  margin-bottom: var(--space-8);
}

.featured .section-title {
  border-bottom-color: var(--palette-bg-primary-core);
}

/* —— Deal grid —— */
.deal-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 550px) {
  .deal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 950px) {
  .deal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1128px) {
  .deal-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1440px) {
  .deal-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.deal-card {
  background: var(--palette-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

@media (hover: hover) {
  .deal-card:hover {
    box-shadow: var(--shadow-hover);
  }
}

.deal-card:focus-within {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
}

.deal-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--palette-surface-muted);
  overflow: hidden;
}

.deal-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deal-card__body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.deal-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--palette-text-secondary);
}

.deal-card__score {
  font-weight: 600;
  color: var(--palette-bg-primary-core);
}

.deal-card__district {
  font-weight: 500;
  color: var(--palette-text-focused);
}

.deal-card__category {
  font-weight: 600;
  font-size: 12px;
  color: var(--palette-text-primary);
  background: var(--palette-surface-muted);
  padding: 4px 10px;
  border-radius: var(--radius-badge);
}

.deal-card__tags {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 12px;
  color: var(--palette-text-secondary);
  line-height: 1.33;
}

.deal-card__tags li {
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--palette-border) 60%, transparent);
  border-radius: var(--radius-btn);
  background: var(--palette-surface);
}

.deal-card__promo-dates {
  font-size: 12px;
  color: var(--palette-text-secondary);
  margin: 0;
}

.deal-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
}

.deal-card__title a {
  color: inherit;
  text-decoration: none;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
}

.deal-card__title a:hover {
  color: var(--palette-bg-primary-core);
}

.deal-card__title a:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
  border-radius: var(--radius-btn);
}

.deal-card__price {
  font-weight: 600;
  font-size: var(--ui-body-size);
  font-variant-numeric: tabular-nums;
  color: var(--palette-text-primary);
}

.deal-card__actions {
  margin-top: auto;
  padding-top: var(--space-2);
}

.deal-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 0 var(--space-6);
  font-weight: 500;
  font-size: 16px;
  color: var(--palette-surface);
  background: var(--palette-text-primary);
  text-decoration: none;
  border-radius: var(--radius-btn);
  transition: background 0.15s ease;
}

.deal-card__link:hover {
  background: var(--palette-bg-primary-core);
}

.deal-card__link:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
}

.empty-state {
  text-align: center;
  padding: var(--space-8);
  color: var(--palette-text-secondary);
  border-radius: var(--radius-card);
  background: var(--palette-surface);
  box-shadow: var(--shadow-card);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.55;
  color: var(--palette-text-secondary);
}

/* Pagination (DESIGN.md: circular nav + pill row, Rausch accent) */
.pagination {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid color-mix(in srgb, var(--palette-border) 40%, transparent);
}

.pagination__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.pagination__meta {
  font-size: var(--ui-body-size);
  font-weight: 400;
  color: var(--palette-text-secondary);
  width: 100%;
  text-align: center;
  order: 3;
}

@media (min-width: 744px) {
  .pagination__meta {
    width: auto;
    order: 0;
    flex: 1 1 auto;
    text-align: left;
  }
}

.pagination__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pagination__pages-wrap {
  max-width: min(100%, 28rem);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pagination__pages {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  width: max-content;
}

.pagination__page {
  font-family: inherit;
  font-size: var(--ui-body-size);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--palette-text-secondary);
  background: none;
  border: none;
  padding: var(--space-2) 12px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  min-height: var(--touch-min);
  min-width: 2.5rem;
}

.pagination__page:hover {
  color: var(--palette-text-primary);
}

.pagination__page[aria-current="page"] {
  color: var(--palette-text-primary);
  border-bottom-color: var(--palette-bg-primary-core);
}

.pagination__page:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
  border-radius: var(--radius-btn);
}

.pagination__page:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (hover: hover) {
  .pagination .btn--pill-nav:hover:not(:disabled) {
    box-shadow: var(--shadow-hover);
  }
}

/* Footer */
.site-footer {
  margin-top: var(--space-8);
  padding: var(--space-6) 0;
  border-top: 1px solid color-mix(in srgb, var(--palette-border) 50%, transparent);
  font-size: var(--ui-body-size);
  font-weight: 400;
  color: var(--palette-text-secondary);
  text-align: center;
}

/* —— Onboarding dialog —— */
.onboarding-dialog {
  border: none;
  border-radius: var(--radius-card);
  padding: 0;
  max-width: min(28rem, 100vw - 2rem);
  width: 100%;
  box-shadow: var(--shadow-card), 0 16px 48px rgba(0, 0, 0, 0.12);
}

.onboarding-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.onboarding-dialog__inner {
  padding: var(--space-6);
}

.onboarding-dialog__progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--palette-text-secondary);
  margin-bottom: var(--space-3);
}

.onboarding-dialog__heading {
  margin: 0 0 var(--space-2);
  font-size: var(--section-heading-size);
  font-weight: 700;
  line-height: 1.43;
  letter-spacing: -0.02em;
  color: var(--palette-text-primary);
}

.onboarding-dialog__lede {
  margin: 0 0 var(--space-6);
  font-size: var(--ui-body-size);
  font-weight: 400;
  color: var(--palette-text-secondary);
  line-height: 1.43;
}

.onboarding-panel {
  margin-bottom: var(--space-6);
}

.onboarding-panel[hidden] {
  display: none !important;
}

.onboarding-field {
  margin-bottom: var(--space-4);
}

.onboarding-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--palette-text-focused);
  margin-bottom: var(--space-2);
}

.onboarding-select {
  font-family: inherit;
  font-size: var(--ui-body-size);
  width: 100%;
  min-height: var(--touch-min);
  padding: 10px var(--space-4);
  border: 1px solid var(--palette-border);
  border-radius: var(--radius-btn);
  background: var(--palette-surface);
  color: var(--palette-text-primary);
  box-shadow: var(--shadow-card);
}

.onboarding-select:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
}

.onboarding-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--palette-surface-muted);
}

.onboarding-dialog__footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-left: auto;
}

/* —— Deal card title (opens in-app detail) —— */
.deal-card__title-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  min-height: var(--touch-min);
}

.deal-card__title-btn:hover {
  color: var(--palette-bg-primary-core);
}

.deal-card__title-btn:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
  border-radius: var(--radius-btn);
}

/* —— Full-screen deal detail —— */
.deal-detail-dialog {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--palette-surface);
}

.deal-detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.deal-detail-dialog__chrome {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(to bottom, var(--palette-surface) 60%, transparent);
  pointer-events: none;
}

.deal-detail-dialog__chrome .deal-detail-dialog__close {
  pointer-events: auto;
  box-shadow: var(--shadow-card);
}

.deal-detail-dialog__body {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-8);
}

.deal-detail-loading {
  padding: var(--space-8);
  text-align: center;
  color: var(--palette-text-secondary);
}

.deal-detail-carousel {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--palette-surface-muted);
  margin-bottom: var(--space-6);
}

.deal-detail-carousel__frame {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deal-detail-carousel__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deal-detail-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.deal-detail-carousel__nav--prev {
  left: var(--space-2);
}

.deal-detail-carousel__nav--next {
  right: var(--space-2);
}

.deal-detail-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: var(--space-3);
  flex-wrap: wrap;
}

.deal-detail-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: color-mix(in srgb, var(--palette-text-primary) 25%, transparent);
  cursor: pointer;
}

.deal-detail-carousel__dot[aria-current="true"] {
  background: var(--palette-bg-primary-core);
}

.deal-detail-title {
  font-size: var(--section-heading-size);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
  color: var(--palette-text-primary);
}

.deal-detail-meta {
  font-size: var(--ui-body-size);
  color: var(--palette-text-secondary);
  margin-bottom: var(--space-4);
}

.deal-detail-offer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: baseline;
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-badge);
  background: var(--palette-surface-muted);
}

.deal-detail-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--palette-text-primary);
}

.deal-detail-discount-type {
  font-size: var(--ui-body-size);
  font-weight: 600;
  color: var(--palette-bg-primary-core);
}

.deal-detail-dates {
  font-size: var(--ui-body-size);
  color: var(--palette-text-focused);
  margin: 0 0 var(--space-4);
}

.deal-detail-urgency {
  display: inline-block;
  font-weight: 600;
  color: var(--palette-bg-tertiary-core);
}

.deal-detail-where {
  font-size: var(--ui-body-size);
  margin: 0 0 var(--space-4);
  color: var(--palette-text-focused);
}

.deal-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.deal-detail-tags span {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-badge);
  background: var(--palette-surface-muted);
  color: var(--palette-text-primary);
}

.deal-detail-desc {
  font-size: var(--ui-body-size);
  font-weight: 400;
  line-height: 1.6;
  color: var(--palette-text-focused);
  white-space: pre-wrap;
  margin: 0 0 var(--space-6);
}

.deal-detail-quality {
  padding: var(--space-4);
  border-radius: var(--radius-badge);
  border: 1px solid color-mix(in srgb, var(--palette-border) 60%, transparent);
  margin-bottom: var(--space-6);
}

.deal-detail-quality__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--palette-text-primary);
  margin: 0 0 var(--space-2);
}

.deal-detail-quality__text {
  font-size: var(--ui-body-size);
  color: var(--palette-text-secondary);
  margin: 0;
}

.deal-detail-excerpt {
  padding: var(--space-4);
  border-radius: var(--radius-badge);
  background: var(--palette-surface-muted);
  margin-bottom: var(--space-6);
}

.deal-detail-excerpt__label {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--palette-text-primary);
}

.deal-detail-excerpt__text {
  font-size: var(--ui-body-size);
  line-height: 1.55;
  color: var(--palette-text-focused);
  white-space: pre-wrap;
  margin: 0 0 var(--space-2);
}

.deal-detail-excerpt__note {
  font-size: 12px;
  color: var(--palette-text-secondary);
  margin: 0;
}

.deal-detail-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.deal-detail-actions .btn {
  width: 100%;
  justify-content: center;
}

.deal-detail-trust {
  font-size: 12px;
  color: var(--palette-text-secondary);
  margin: 0 0 var(--space-6);
}

.deal-detail-related {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--palette-surface-muted);
}

.deal-detail-related__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.018em;
}

.deal-detail-related__strip {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
}

.deal-detail-mini-card {
  flex: 0 0 min(220px, 72vw);
  scroll-snap-align: start;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--palette-surface);
  cursor: pointer;
  text-align: left;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
}

.deal-detail-mini-card:focus-visible {
  outline: 2px solid var(--palette-bg-primary-core);
  outline-offset: 2px;
}

.deal-detail-mini-card__media {
  aspect-ratio: 16 / 10;
  background: var(--palette-surface-muted);
}

.deal-detail-mini-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deal-detail-mini-card__body {
  padding: var(--space-3);
}

.deal-detail-mini-card__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-detail-error {
  padding: var(--space-8);
  color: var(--palette-text-secondary);
  text-align: center;
}
