/**
 * RewardHub visual polish. Tokens + components. No business rules.
 */

.rh-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.rh-icon-btn,
.rh-more__summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid var(--rh-color-border, #e2e8f0);
  border-radius: var(--rh-radius-sm, 8px);
  background: var(--rh-color-surface, #fff);
  color: var(--rh-color-text, #0f172a);
  cursor: pointer;
}

.rh-icon-btn:hover,
.rh-more__summary:hover {
  background: var(--rh-color-surface-soft, #f8fafc);
}

.rh-actions,
.cell-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rh-space-2, 8px);
}

.rh-more,
details.admin-more {
  position: relative;
  display: inline-block;
}

.rh-more__menu,
.admin-more .rh-more__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 160px;
  padding: var(--rh-space-2, 8px);
  background: var(--rh-color-surface, #fff);
  border: 1px solid var(--rh-color-border, #e2e8f0);
  border-radius: var(--rh-radius-md, 12px);
  box-shadow: var(--rh-shadow-md, 0 8px 24px rgba(15, 23, 42, 0.08));
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rh-more:not([open]) .rh-more__menu,
.admin-more:not([open]) .rh-more__menu {
  display: none;
}

.rh-more__menu .btn,
.admin-more .btn {
  width: 100%;
  justify-content: flex-start;
}

.rh-more summary,
.admin-more summary {
  list-style: none;
}

.rh-more summary::-webkit-details-marker,
.admin-more summary::-webkit-details-marker {
  display: none;
}

.rh-btn,
.btn {
  min-height: var(--rh-control-h, 40px);
}

.btn--sm {
  min-height: var(--rh-control-h-sm, 36px);
  height: auto;
}

.btn--danger {
  background: var(--rh-color-danger, #e11d48);
  color: #fff;
  border: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

h1,
.page-title {
  font-weight: 700;
}

h2,
.section__head h2 {
  font-weight: 650;
  font-weight: 700;
}

.card h3,
.task-card h3,
.reward-card h3 {
  font-weight: 600;
}

.muted,
.stat-label,
.page-lead {
  font-weight: 400;
  color: var(--rh-color-text-muted, #64748b);
}

.card {
  border-radius: var(--rh-radius-lg, 16px);
}

body.rh-user-app .card,
body.rh-user-app .stat-card,
body.rh-user-app .summary-card {
  padding: var(--rh-space-5, 20px);
}

.form-field {
  margin-bottom: var(--rh-space-4, 16px);
}

.form-field label {
  margin-bottom: var(--rh-space-2, 8px);
}

.form-field input,
.form-field select,
.form-field textarea,
.admin-list-bar input,
.admin-list-bar select,
.toolbar input,
.toolbar select {
  min-height: var(--rh-control-h-sm, 36px);
  border: 1px solid var(--rh-color-border, #e2e8f0);
  border-radius: var(--rh-radius-sm, 8px);
  background: var(--rh-color-surface, #fff);
  color: var(--rh-color-text, #0f172a);
  padding: 8px 12px;
}

.admin-list-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rh-space-3, 12px);
  margin-bottom: var(--rh-space-4, 16px);
}

.admin-list-bar input[type="search"] {
  min-width: 14rem;
  flex: 1 1 14rem;
}

.admin-table th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--rh-color-text-muted, #64748b);
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.admin-body .stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--rh-space-3, 12px);
}

body.admin-body .stat-card {
  padding: 16px;
}

body.admin-body .stat-card__value {
  font-size: 1.45rem;
  font-weight: 700;
}

body.admin-body #economyForm,
body.admin-body #withdrawalForm {
  padding: 20px 24px 24px;
}

body.admin-body #economyForm h2,
body.admin-body #withdrawalForm h2,
body.admin-body #economyForm h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

body.admin-body #economyForm h3 {
  margin-top: 20px;
}

body.admin-body .form-grid {
  gap: 16px 20px;
}

body.admin-body .form-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rh-color-border, #e2e8f0);
}

.wd-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  align-items: start;
}

.wd-hero__copy .stat-label {
  margin-bottom: 8px;
}

.wd-hero__min {
  display: block;
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--rh-color-text-muted, #64748b);
}

.wd-hero__eur:empty {
  display: none;
}

.wd-methods {
  display: grid;
  gap: 8px;
}

.wd-method {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid var(--rh-color-border, #e2e8f0);
  border-radius: var(--rh-radius-md, 12px);
  cursor: pointer;
}

.wd-method:has(input:checked) {
  border-color: var(--rh-color-primary, #0d9488);
  background: #f0fdfa;
}

.wd-method input {
  margin: 0 8px 0 0;
}

.stat-card.summary-card--highlight .stat-value {
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 24px 16px;
  max-width: 28rem;
  margin-inline: auto;
}

.empty-state__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
}

.toast {
  border-radius: var(--rh-radius-md, 12px);
  padding: 12px 16px;
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--rh-radius-sm, 8px);
  font-size: 0;
  background: transparent;
  border: 1px solid var(--rh-color-border, #e2e8f0);
  color: var(--rh-color-text, #0f172a);
}

.modal__close .rh-icon {
  font-size: 0;
}

:focus-visible {
  outline: 2px solid var(--rh-color-primary, #0d9488);
  outline-offset: 2px;
}

.adv-switcher select:focus-visible {
  outline: 2px solid var(--rh-color-primary, #0d9488);
}

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

@media (max-width: 768px) {
  .btn,
  .btn--sm {
    min-height: 44px;
  }

  .rh-icon-btn,
  .rh-more__summary {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  body.rh-user-app .card,
  body.rh-user-app .stat-card {
    padding: 16px;
  }
}

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

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

@media (max-width: 640px) {
  body.admin-body .stat-grid {
    grid-template-columns: 1fr;
  }
}

.reward-card__footer .points-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.task-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.admin-nav__group {
  margin-top: 16px;
}

.admin-content {
  max-width: none;
}

.page-header {
  margin-bottom: 16px;
}

.page-lead {
  margin-top: 8px;
}

@media (min-width: 1440px) {
  body.admin-body .admin-content {
    max-width: none;
  }
}

body.rh-user-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.rh-user-app main {
  flex: 1 0 auto;
}

body.rh-user-app .site-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

body.rh-user-app .rh-account-page .container {
  width: min(100% - 2rem, 1200px);
  max-width: 1200px;
}

body.rh-user-app .rh-account-page .page-header {
  padding-bottom: 0;
  margin-bottom: 0;
}

body.rh-user-app .rh-account-page .page-header h1,
body.rh-user-app .rh-account-page .page-header .page-title {
  margin-bottom: 0;
}

body.rh-user-app .rh-account-page .page-lead {
  margin-top: 10px;
  margin-bottom: 0;
}

body.rh-user-app .rh-account-page .rh-page-main {
  padding-top: 40px;
  padding-bottom: 3rem;
}

body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) #walletFilters,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) #orderFilters,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) #walletActions,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) #txList,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) #ordersList,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) .rh-account-page .filters,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) .rh-account-page .section__head,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) .rh-account-page .stat-grid,
body.rh-account-gate:not(.rh-auth-in):not(.rh-auth-error) main .empty-state {
  display: none !important;
}

.rh-auth-loading {
  color: var(--rh-color-text-muted, #64748b);
  padding: 1.25rem 0 2rem;
  text-align: center;
}

.rh-auth-required {
  width: min(100%, 560px);
  max-width: 560px;
  margin: 0 auto;
}

.rh-auth-required__card {
  background: var(--rh-color-surface, #fff);
  border: 1px solid var(--rh-color-border, #e2e8f0);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 2.25rem 1.75rem 1.85rem;
  text-align: center;
}

.rh-auth-required__mark .logo__mark {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  font-size: 1rem;
  border-radius: 14px;
}

.rh-auth-required__brand {
  margin: 0.85rem 0 0;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--rh-color-text, #0f172a);
}

.rh-auth-required__kicker {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--rh-color-text-muted, #64748b);
}

.rh-auth-required__title {
  margin: 1.2rem 0 0;
  font-size: 1.35rem;
  color: var(--rh-color-text, #0f172a);
}

.rh-auth-required__desc,
.rh-auth-required__expired {
  margin: 0.5rem 0 0;
  color: var(--rh-color-text-muted, #64748b);
}

.rh-auth-required__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.35rem;
  min-height: 48px;
  min-width: 8.5rem;
  padding: 0 1.5rem;
  border: 0;
}

.rh-auth-required__secondary {
  display: block;
  margin-top: 0.85rem;
  color: var(--rh-color-primary, #0d9488);
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .rh-auth-required {
    width: 100%;
    max-width: none;
  }

  body.rh-user-app .rh-account-page .container {
    width: calc(100% - 2rem);
  }

  body.rh-user-app .rh-account-page .rh-page-main {
    padding-top: 32px;
  }
}

@media (max-width: 430px) {
  body.rh-user-app .rh-account-page .container {
    width: calc(100% - 1.5rem);
  }

  .rh-auth-required__card {
    padding: 1.5rem 1.1rem 1.35rem;
  }

  .rh-auth-required__cta {
    width: 100%;
  }
}

/* ---- User Detail Page System ---- */
.rh-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.rh-user-app .rh-detail-page .container {
  width: min(calc(100% - 32px), 1280px);
  max-width: 1280px;
  margin-inline: auto;
}

body.rh-user-app .rh-detail-page .rh-page-main {
  padding-top: 32px;
  padding-bottom: 48px;
}

.rh-detail-header {
  padding-bottom: 0;
}

.rh-detail-back {
  margin: 0 0 10px;
  font-size: 0.88rem;
}

.rh-detail-back a {
  color: var(--muted, #64748b);
  text-decoration: none;
  font-weight: 600;
}

.rh-detail-back a:hover {
  color: var(--primary, #0d9488);
}

.rh-detail-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.rh-detail-header h1 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.rh-detail-header__status .rh-status-badge {
  font-size: 0.82rem;
  padding: 0.28rem 0.7rem;
  font-weight: 700;
}

.rh-detail-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.rh-detail-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  color: var(--text-secondary, #475569);
  overflow-wrap: anywhere;
  min-width: 0;
}

.rh-copy-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.rh-detail-header .rh-icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
}

.rh-detail-meta {
  margin-top: 8px;
  color: var(--muted, #64748b);
  font-size: 0.9rem;
}

.rh-detail-id {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rh-wd-id {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rh-wd-amount-card__label {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--muted, #64748b);
}

.rh-wd-amount {
  margin: 0 0 8px;
}

.rh-wd-amount-card__icon {
  margin-bottom: 8px;
  color: var(--text, #0f172a);
}

.rh-order-layout,
.rh-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: var(--rh-space-5, 20px);
  align-items: start;
  width: 100%;
}

.rh-order-main,
.rh-order-side {
  display: grid;
  gap: var(--rh-space-5, 20px);
  align-content: start;
  align-items: start;
  min-width: 0;
}

.rh-detail-grid--loading,
.rh-order-layout--loading {
  grid-template-areas: none;
}

#orderLoading[hidden],
#orderContent[hidden],
#orderState[hidden],
#withdrawalLoading[hidden],
#withdrawalContent[hidden],
#withdrawalState[hidden] {
  display: none !important;
}

#orderContent,
#orderState {
  width: 100%;
}

.rh-detail-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--surface, #fff);
  min-width: 0;
  height: auto;
  align-self: start;
}

.rh-detail-card__title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
}

.rh-detail-card__note {
  margin: -6px 0 14px;
  color: var(--muted, #64748b);
  font-size: 0.88rem;
}

.rh-detail-reward .rh-reward-media {
  margin: -1.15rem -1.2rem 1rem;
  width: calc(100% + 2.4rem);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md, 14px) var(--radius-md, 14px) 0 0;
}

.rh-detail-reward h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.rh-detail-reward__type {
  margin: 0 0 12px;
}

.badge--reward-digital,
.badge--reward-physical,
.badge--reward-coupon {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
}

.rh-detail-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--muted, #64748b);
}

.rh-detail-amount strong {
  font-size: 1.35rem;
  color: var(--text, #0f172a);
  letter-spacing: -0.03em;
}

.rh-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.rh-info-grid__item {
  min-width: 0;
}

.rh-info-grid dt {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  font-weight: 600;
  margin: 0 0 4px;
}

.rh-info-grid dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text, #0f172a);
  overflow-wrap: anywhere;
}

.rh-debit {
  color: #57534e;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.rh-credit {
  color: #047857;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.rh-delivery__status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}

.rh-delivery__copy {
  margin: 0 0 12px;
  color: var(--text-secondary, #475569);
}

.rh-delivery__block h3 {
  margin: 12px 0 6px;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
}

.rh-delivery__block p {
  margin: 0;
}

.rh-progress {
  list-style: none;
  margin: 0;
  padding: 8px 0 4px;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.rh-progress__step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  min-width: 0;
  padding: 0 6px;
}

.rh-progress__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% + 12px);
  right: calc(-50% + 12px);
  height: 2px;
  background: var(--border, #e2e8f0);
}

.rh-progress__step.is-done:not(:last-child)::after,
.rh-progress__step.is-complete:not(:last-child)::after {
  background: var(--success, #059669);
}

.rh-progress__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border, #e2e8f0);
  background: #fff;
  z-index: 1;
}

.rh-progress__step.is-done .rh-progress__dot,
.rh-progress__step.is-complete .rh-progress__dot {
  background: var(--success, #059669);
  border-color: var(--success, #059669);
}

.rh-progress__step.is-current .rh-progress__dot {
  border-color: var(--warning, #d97706);
  background: var(--warning, #d97706);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.16);
}

.rh-progress__step.is-cancelled .rh-progress__dot {
  background: #b91c1c;
  border-color: #b91c1c;
}

.rh-progress__step.is-skipped {
  opacity: 0.42;
}

.rh-progress__step.is-skipped:not(:last-child)::after {
  background: var(--border, #e2e8f0);
}

.rh-progress__label {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

.rh-progress__step.is-current .rh-progress__label,
.rh-progress__step.is-complete .rh-progress__label {
  color: var(--text, #0f172a);
}

.rh-progress__step.is-cancelled .rh-progress__label {
  color: #b91c1c;
}

.rh-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rh-timeline li {
  position: relative;
  padding: 0 0 14px 16px;
  border-left: 2px solid var(--border, #e2e8f0);
  margin-left: 4px;
}

.rh-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rh-color-text, #0f172a);
}

.rh-timeline li:last-child {
  padding-bottom: 0;
}

.rh-timeline time {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted, #64748b);
}

.rh-order-support {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rh-color-border, #e2e8f0);
}

.rh-order-support h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--rh-color-text, #0f172a);
}

.rh-order-support p {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--rh-color-text-muted, #64748b);
}

.rh-order-support__err {
  color: #b91c1c;
  font-size: 0.85rem;
}

#orderSupportModal textarea,
#orderSupportModal select,
#orderSupportModal input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#orderSupportModal .modal__dialog {
  max-width: min(480px, calc(100vw - 24px));
  overflow-x: hidden;
}

#orderSupportModal .form-field {
  margin-bottom: 12px;
}

.rh-timeline strong {
  display: block;
  margin-top: 2px;
}

.rh-timeline p {
  margin: 4px 0 0;
  color: var(--text-secondary, #475569);
  font-size: 0.88rem;
}

.rh-detail-empty {
  text-align: left;
  padding: 4px 0 0;
  color: var(--muted, #64748b);
}

.rh-detail-empty__icon {
  color: var(--muted, #64748b);
  margin-bottom: 8px;
}

.rh-detail-empty__title {
  margin: 0 0 4px;
  color: var(--text, #0f172a);
  font-weight: 650;
}

.rh-detail-empty__text {
  margin: 0;
  font-size: 0.88rem;
}

.rh-detail-actions {
  margin-top: 16px;
}

.rh-skel--block {
  min-height: 280px;
}

.rh-skel--side {
  min-height: 180px;
}

@media (max-width: 900px) {
  body.rh-user-app .rh-detail-page .container {
    width: min(calc(100% - 32px), 720px);
    max-width: 720px;
    margin-inline: auto;
  }

  body.rh-user-app .rh-detail-page .rh-page-main {
    padding-top: var(--rh-space-6, 24px);
  }

  .rh-detail-back {
    margin: 0 0 var(--rh-space-5, 20px);
  }

  .rh-detail-id-row {
    margin-top: var(--rh-space-3, 12px);
  }

  .rh-detail-meta {
    margin-top: var(--rh-space-2, 8px);
  }

  .rh-order-layout,
  .rh-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
    margin-inline: auto;
    gap: var(--rh-space-4, 16px);
  }

  .rh-order-main,
  .rh-order-side {
    gap: var(--rh-space-4, 16px);
    width: 100%;
  }

  .rh-detail-card {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding: var(--rh-space-4, 16px);
    box-sizing: border-box;
  }

  .rh-detail-card__title {
    margin: 0 0 var(--rh-space-3, 12px);
  }

  .rh-detail-reward .rh-reward-media {
    margin: calc(var(--rh-space-4, 16px) * -1) calc(var(--rh-space-4, 16px) * -1) var(--rh-space-3, 12px);
    width: calc(100% + var(--rh-space-4, 16px) * 2);
    max-height: 216px;
    aspect-ratio: 16 / 9;
    padding: var(--rh-space-2, 8px);
  }

  .rh-detail-reward h2 {
    margin: 0 0 var(--rh-space-1, 4px);
    font-size: 1.12rem;
  }

  .rh-detail-reward__type {
    margin: 0 0 var(--rh-space-3, 12px);
  }

  .rh-detail-amount {
    margin: 0 0 var(--rh-space-3, 12px);
  }

  .rh-detail-amount strong {
    font-size: 1.2rem;
    white-space: nowrap;
  }

  .rh-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--rh-space-3, 12px) var(--rh-space-4, 16px);
  }

  .rh-delivery__status {
    margin-bottom: var(--rh-space-2, 8px);
  }

  .rh-delivery__copy {
    margin: 0 0 var(--rh-space-2, 8px);
  }

  .rh-skel--block {
    min-height: 180px;
    max-height: 216px;
  }

  .rh-skel--side {
    min-height: 120px;
  }
}

@media (max-width: 768px) {
  body.rh-user-app .rh-detail-page .rh-page-main {
    padding-bottom: calc(
      var(--rh-mobile-bottom-nav-height, 56px) +
        var(--rh-safe-bottom, env(safe-area-inset-bottom, 0px)) + var(--rh-space-5, 20px)
    );
  }
}

@media (max-width: 430px) {
  body.rh-user-app .rh-detail-page .container {
    width: calc(100% - 32px);
    max-width: 720px;
    margin-inline: auto;
  }

  .rh-detail-header h1 {
    font-size: 1.45rem;
    flex: 1 1 auto;
    min-width: 0;
  }

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

  .rh-detail-id-row {
    width: 100%;
  }
}

@media (max-width: 360px) {
  body.rh-user-app .rh-detail-page .container {
    width: calc(100% - 32px);
    max-width: 720px;
    margin-inline: auto;
  }

  .rh-detail-actions .btn {
    width: 100%;
  }

  .rh-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .rh-progress {
    flex-direction: column;
    gap: 0;
  }

  .rh-progress__step {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 8px 0;
    gap: 10px;
  }

  .rh-progress__step:not(:last-child)::after {
    top: 22px;
    left: 6px;
    right: auto;
    width: 2px;
    height: calc(100% - 8px);
  }

  .rh-progress__label {
    margin-top: 0;
  }
}
