.saved-route-page {
  min-height: calc(100vh - 110px);
  padding-bottom: 72px;
  background: var(--theme-page, #f4f4f1);
}

.saved-route-shell {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
}

.saved-route-header {
  border-bottom: 1px solid var(--line);
  background: var(--theme-surface, #fff);
}

.saved-route-header-inner {
  display: grid;
  min-height: 92px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.saved-route-back.qikswap-back-button {
  display: inline-flex;
  width: max-content;
  min-height: 40px;
  padding: 0 13px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--blue);
  border-radius: 5px;
  color: var(--blue);
  background: var(--theme-accent-soft, #f7f1e3);
}

.saved-route-back .ui-icon { width: 18px; height: 18px; }
.saved-route-back b { font-size: 13px; }
.saved-route-back-spacer { display: block; min-width: 1px; min-height: 1px; }
.saved-route-heading { text-align: center; }
.saved-route-heading small { display: block; color: var(--blue); font-size: 10px; font-weight: 800; }
.saved-route-heading h1 { margin: 5px 0 0; font-family: "Space Grotesk", sans-serif; font-size: 27px; }
.saved-route-count { justify-self: end; color: var(--muted); font-size: 13px; }
.saved-route-count b { margin-right: 3px; color: var(--blue); font-size: 20px; }

.saved-route-content { padding-top: 30px; }
.saved-followed-section { margin-bottom: 34px; }
.saved-followed-hint { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.saved-followed-grid { display: grid; margin-top: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.saved-followed-shop { display: grid; min-width: 0; padding: 14px; grid-template-columns: 48px minmax(0, 1fr) 16px; align-items: start; gap: 11px; border: 1px solid var(--line); border-radius: 6px; color: inherit; background: var(--theme-surface, #fff); text-align: left; }
.saved-followed-shop:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.saved-followed-logo { display: grid; width: 48px; height: 48px; overflow: hidden; place-items: center; border-radius: 50%; color: var(--theme-accent-contrast, #17130b); background: var(--blue); font-size: 18px; font-weight: 800; }
.saved-followed-logo img { width: 100%; height: 100%; object-fit: cover; }
.saved-followed-copy { display: block; min-width: 0; }
.saved-followed-copy > b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.saved-followed-level { display: flex; margin-top: 6px; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.saved-level-icons { display: inline-flex; gap: 3px; }
.saved-level-icons em { display: inline-block; width: 8px; height: 8px; border: 2px solid var(--blue); border-radius: 50%; }
.saved-followed-meta { display: block; margin-top: 7px; overflow: hidden; color: var(--blue); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.saved-followed-intro { display: -webkit-box; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.saved-followed-arrow { color: var(--muted); font-size: 20px; line-height: 1; }
.saved-section-head,
.saved-recommend-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.saved-section-head h2,
.saved-recommend-head h2 { margin: 0; font-size: 20px; }
.saved-section-head span,
.saved-recommend-head span { color: var(--muted); font-size: 12px; }

.saved-route-list { display: grid; margin-top: 16px; gap: 10px; }
.saved-swipe-row { position: relative; overflow: hidden; min-height: 112px; border: 1px solid var(--line); border-radius: 6px; background: var(--theme-surface, #fff); }
.saved-swipe-content { position: relative; z-index: 1; display: grid; min-height: 110px; grid-template-columns: minmax(0, 1fr) 48px; align-items: stretch; background: var(--theme-surface, #fff); transition: transform .2s ease; touch-action: pan-y; }
.saved-swipe-row.is-dragging .saved-swipe-content { transition: none; }
.saved-route-page .saved-item-main { display: grid; width: 100%; min-width: 0; padding: 12px; overflow: visible; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 15px; border: 0; color: inherit; background: transparent; text-align: left; }
.saved-item-image { display: grid; width: 116px; height: 84px; overflow: hidden; place-items: center; border-radius: 5px; background: #f2f1ed; }
.saved-item-image img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.saved-item-copy { display: block; min-width: 0; }
.saved-item-game { display: block; overflow: hidden; color: var(--blue); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.saved-item-title { display: -webkit-box; overflow: hidden; margin-top: 6px; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.saved-item-meta { display: flex; min-width: 0; margin-top: 8px; align-items: center; gap: 10px; }
.saved-item-shop { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.saved-item-price { flex: none; color: var(--blue); font-family: "Space Grotesk", sans-serif; font-size: 16px; font-weight: 700; }
.saved-swipe-row.unavailable .saved-item-image img { filter: grayscale(1); opacity: .55; }
.saved-swipe-row.unavailable .saved-item-title { color: var(--muted); }
.saved-unavailable { color: #b34040; font-size: 12px; font-weight: 700; }

.saved-desktop-delete { display: grid; width: 40px; height: 40px; padding: 0; place-self: center; place-items: center; border: 1px solid #ead5d5; border-radius: 5px; color: #b43b3b; background: #fff8f8; }
.saved-desktop-delete .ui-icon { width: 18px; height: 18px; }
.saved-desktop-delete:hover { color: #fff; background: #b93232; }
.saved-swipe-actions { position: absolute; z-index: 0; top: 0; right: 0; display: none; width: 168px; height: 100%; grid-template-columns: repeat(2, 84px); }
.saved-swipe-row.unavailable .saved-swipe-actions { width: 84px; grid-template-columns: 84px; }
.saved-swipe-buy,
.saved-swipe-delete { display: grid; width: 84px; height: 100%; padding: 7px; place-items: center; border: 0; color: #fff; font-size: 14px; font-weight: 700; }
.saved-swipe-buy { color: var(--theme-accent-contrast, #17130b); background: var(--blue); }
.saved-swipe-delete { background: #b93232; }

.saved-empty { display: grid; min-height: 300px; margin-top: 16px; padding: 42px 20px; place-items: center; align-content: center; border: 1px solid var(--line); border-radius: 6px; background: var(--theme-surface, #fff); text-align: center; }
.saved-empty-icon { display: grid; width: 66px; height: 66px; place-items: center; border-radius: 50%; color: var(--blue); background: var(--theme-accent-soft, #f7f1e3); }
.saved-empty-icon .ui-icon { width: 31px; height: 31px; }
.saved-empty h2 { margin: 17px 0 0; font-size: 20px; }
.saved-empty p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.saved-empty button { min-height: 41px; margin-top: 20px; padding: 0 18px; border: 1px solid var(--blue); border-radius: 5px; color: var(--theme-accent-contrast, #17130b); background: var(--blue); font-size: 13px; font-weight: 700; }

.saved-recommendations { margin-top: 38px; padding-top: 27px; border-top: 1px solid var(--line); }
.saved-recommend-grid { display: grid; margin-top: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.saved-recommend-card { min-width: 0; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: inherit; background: var(--theme-surface, #fff); text-align: left; }
.saved-recommend-card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.saved-recommend-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; object-position: center; background: #f2f1ed; }
.saved-recommend-copy { display: block; padding: 11px; }
.saved-recommend-copy small { display: block; overflow: hidden; color: var(--blue); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.saved-recommend-copy b { display: -webkit-box; min-height: 42px; overflow: hidden; margin-top: 6px; font-size: 14px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.saved-recommend-copy strong { display: block; margin-top: 9px; color: var(--blue); font-family: "Space Grotesk", sans-serif; font-size: 16px; }

body.saved-route > footer { display: none; }

@media (max-width: 760px) {
  body.saved-route { background: var(--theme-page, #f4f4f1); }
  body.saved-route .mobile-nav { z-index: 140; }
  body.saved-route .mobile-nav a.active,
  body.saved-route .mobile-nav button.active { color: var(--blue); background: transparent !important; box-shadow: none !important; }
  body.saved-route .mobile-nav a.active:focus,
  body.saved-route .mobile-nav button.active:focus { outline: none !important; }
  body.saved-route .mobile-nav a.active .nav-icon-shell,
  body.saved-route .mobile-nav button.active .nav-icon-shell { color: inherit !important; background: transparent !important; }
  .saved-route-page { min-height: calc(100dvh - 68px - env(safe-area-inset-bottom)); padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .saved-route-shell { width: 100%; }
  .saved-route-header-inner { min-height: 68px; padding: 9px 14px; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 7px; }
  .saved-route-back.qikswap-back-button { width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; }
  .saved-route-back b { display: none; }
  .saved-route-back-spacer { width: 40px; height: 40px; }
  .saved-route-heading small { font-size: 9px; }
  .saved-route-heading h1 { margin-top: 2px; font-size: 20px; }
  .saved-route-count { font-size: 0; }
  .saved-route-count b { margin: 0; font-size: 16px; }
  .saved-route-content { padding: 18px 14px 0; }
  .saved-followed-section { margin-bottom: 28px; }
  .saved-followed-grid { grid-template-columns: 1fr; gap: 9px; }
  .saved-followed-shop { padding: 12px; }
  .saved-section-head h2,
  .saved-recommend-head h2 { font-size: 18px; }
  .saved-section-head span,
  .saved-recommend-head span { font-size: 12px; }
  .saved-route-list { gap: 9px; }
  .saved-swipe-row { min-height: 104px; }
  .saved-swipe-content { min-height: 102px; grid-template-columns: minmax(0, 1fr); }
  .saved-swipe-row.is-open .saved-swipe-content { transform: translateX(-168px); }
  .saved-swipe-row.unavailable.is-open .saved-swipe-content { transform: translateX(-84px); }
  .saved-route-page .saved-item-main { padding: 10px; grid-template-columns: 94px minmax(0, 1fr); gap: 11px; }
  .saved-item-image { width: 94px; height: 78px; }
  .saved-item-title { margin-top: 4px; font-size: 14px; }
  .saved-item-meta { margin-top: 6px; align-items: flex-end; justify-content: space-between; gap: 6px; }
  .saved-item-shop { max-width: 52%; font-size: 11px; }
  .saved-item-price { font-size: 15px; }
  .saved-desktop-delete { display: none; }
  .saved-swipe-actions { display: grid; }
  .saved-empty { min-height: 280px; margin-right: -14px; margin-left: -14px; border-right: 0; border-left: 0; border-radius: 0; }
  .saved-empty h2 { font-size: 18px; }
  .saved-recommendations { margin-top: 30px; }
  .saved-recommend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .saved-recommend-card img { aspect-ratio: 1 / 1; }
  .saved-recommend-copy { padding: 9px; }
  .saved-recommend-copy b { min-height: 40px; font-size: 13px; }
  .saved-recommend-copy strong { font-size: 15px; }
}

@media (max-width: 360px) {
  .saved-route-page .saved-item-main { grid-template-columns: 82px minmax(0, 1fr); gap: 9px; }
  .saved-item-image { width: 82px; height: 72px; }
  .saved-item-title { font-size: 13px; }
}
