:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #17212c;
  --muted: #667484;
  --line: #d8e1e8;
  --accent: #0f6b5f;
  --accent-soft: #e2f3ef;
  --blue: #246bce;
  --warn: #9a5b00;
  --bad: #b42318;
  --shadow: 0 10px 24px rgba(17, 29, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

h1,
h2,
h3 {
  margin: 0;
}

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

h2 {
  font-size: 18px;
}

.topbar-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(15, 107, 95, 0.35);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.status-strip {
  min-width: 150px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  text-align: right;
}

.status-strip.is-stale {
  border-color: #e5bd74;
  background: #fff8e8;
  color: var(--warn);
}

.layout {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.deal-tabs {
  position: sticky;
  top: 66px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(17, 29, 43, 0.04);
}

.deal-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.deal-tab strong,
.deal-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-tab strong {
  color: inherit;
  font-size: 15px;
  font-weight: 820;
}

.deal-tab span {
  font-size: 12px;
  font-weight: 760;
}

.deal-tab.is-active {
  border-color: rgba(15, 107, 95, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #e7c983;
  border-radius: 8px;
  background: #fff8e8;
  color: var(--warn);
  font-size: 13px;
}

.link-intake {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.link-intake-dialog {
  width: min(520px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.link-intake-dialog::backdrop {
  background: rgba(23, 33, 44, 0.34);
}

.link-intake-dialog .link-intake {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.link-intake-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.link-intake-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
}

.link-form input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.link-form input:focus {
  outline: 2px solid rgba(15, 107, 95, 0.22);
  outline-offset: 1px;
  border-color: var(--accent);
}

.link-form button {
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
}

.link-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.link-status {
  min-height: 20px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.link-status.is-error {
  color: var(--bad);
}

.link-status.is-pending {
  color: var(--warn);
}

.link-readback {
  margin-top: 10px;
  border: 1px solid rgba(15, 107, 95, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f4fbf8;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.link-readback[hidden] {
  display: none;
}

.link-readback strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 13px;
}

.link-readback ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 17px;
}

.link-readback.is-pending {
  border-color: #e7c983;
  background: #fff8e8;
}

.link-readback.is-pending strong {
  color: var(--warn);
}

.link-readback.is-error {
  border-color: rgba(198, 72, 65, 0.28);
  background: #fff4f2;
}

.link-readback.is-error strong {
  color: var(--bad);
}

.link-lifecycle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.link-lifecycle span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
  text-align: center;
}

.link-lifecycle strong {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}

.pending-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.pending-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
}

.pending-item strong,
.pending-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-item strong {
  color: var(--ink);
}

.view {
  display: none;
  margin-top: 18px;
}

.view.is-active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 220px;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.secondary-action:hover {
  border-color: rgba(15, 107, 95, 0.45);
  background: var(--accent-soft);
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  font-weight: 820;
  cursor: pointer;
}

.icon-action:hover,
.icon-action[aria-expanded="true"] {
  border-color: rgba(15, 107, 95, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}

.section-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.deal-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(112px, .7fr) minmax(138px, .8fr) minmax(138px, .8fr);
  gap: 10px;
  align-items: end;
  margin: 0 0 10px;
}

.search-panel {
  grid-column: 1 / -1;
}

.search-panel[hidden] {
  display: none;
}

.search-panel .search-field {
  max-width: 420px;
}

.search-field,
.select-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.search-field span,
.select-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.search-field input,
.select-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 38px;
}

.category-filter button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.category-filter button.is-active {
  border-color: rgba(15, 107, 95, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}

.feed-summary {
  min-height: 28px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.personal-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.personal-dashboard h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  letter-spacing: 0;
}

.personal-pill-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.personal-total-pill,
.personal-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 820;
  text-decoration: none;
}

.personal-total-pill {
  min-width: 112px;
  gap: 6px;
  padding: 0 15px;
  background: var(--accent);
  color: #fff;
}

.personal-total-pill strong {
  font-size: 18px;
}

.personal-add-button {
  width: 46px;
  border: 1px solid rgba(36, 107, 206, 0.14);
  background: #eef7ff;
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.personal-add-button:hover {
  border-color: rgba(36, 107, 206, 0.36);
  background: #e3f1ff;
}

.personal-toast {
  margin: 8px 0 12px;
  border: 1px solid rgba(15, 107, 95, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f4fbf8;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.4;
}

.personal-toast[hidden] {
  display: none;
}

.personal-toast.is-pending {
  border-color: #e7c983;
  background: #fff8e8;
  color: var(--warn);
}

.personal-toast.is-error {
  border-color: rgba(198, 72, 65, 0.28);
  background: #fff4f2;
  color: var(--bad);
}

.my-items {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.my-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.my-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(17, 29, 43, 0.04);
}

.my-item.is-price-alert {
  border-color: rgba(36, 107, 206, 0.18);
  background: #fbfdff;
}

.my-item.is-recent {
  border-color: rgba(15, 107, 95, 0.52);
  box-shadow: 0 0 0 3px rgba(15, 107, 95, 0.12), 0 10px 24px rgba(17, 29, 43, 0.1);
}

.my-item-type,
.my-item-title,
.my-item-meta,
.my-item-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-item-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 0.74;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f1f4f6;
  background-position: center;
  background-size: cover;
}

.my-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-item-thumb img[hidden] {
  display: none;
}

.my-item-type {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(15, 107, 95, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 820;
}

.my-item-content {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 10px 0;
}

.my-item-title {
  display: -webkit-box;
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  line-height: 1.35;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.my-item-meta {
  display: -webkit-box;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.my-item-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.my-item-facts span {
  display: grid;
  gap: 1px;
  min-width: 0;
  border: 1px solid #edf1f4;
  border-radius: 8px;
  padding: 6px 7px;
  background: #fbfcfd;
}

.my-item-facts small,
.my-item-facts strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-item-facts small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.my-item-facts strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.my-item-price {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.my-item-price strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.my-item-price span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.3;
}

.my-item-price.is-pending strong {
  color: var(--muted);
  font-size: 15px;
}

.my-item-price.is-pending span {
  color: var(--muted);
}

.my-item-status {
  position: absolute;
  top: 9px;
  right: 9px;
  max-width: calc(100% - 18px);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(244, 251, 248, 0.94);
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  text-align: right;
  box-shadow: 0 2px 8px rgba(17, 29, 43, 0.08);
}

.my-item-alert-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.my-item-alert-controls input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.my-item-save,
.my-item-view,
.my-item-open,
.my-item-remove {
  min-width: 48px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.my-item-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(15, 107, 95, 0.18);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.my-item-save {
  color: var(--blue);
}

.my-item-view {
  grid-column: 1 / -1;
  color: var(--accent);
}

.my-item-save:hover,
.my-item-view:hover:not(:disabled),
.my-item-open:hover,
.my-item-remove:hover {
  border-color: rgba(36, 107, 206, 0.35);
  color: var(--blue);
}

.my-item-view:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.my-item-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid #edf1f4;
}

.my-item-actions > .my-item-remove {
  width: 100%;
}

.my-item.is-link .my-item-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.my-item.is-link .my-item-actions > .my-item-remove {
  width: auto;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 64px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.empty-state p {
  margin: 0;
}

.empty-state-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 10px;
  border: 1px solid rgba(15, 107, 95, 0.35);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(17, 29, 43, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-card.is-clickable {
  cursor: pointer;
}

.product-card.is-clickable:hover,
.product-card.is-clickable:focus-visible {
  border-color: rgba(15, 107, 95, 0.4);
  box-shadow: 0 10px 24px rgba(17, 29, 43, 0.1);
  transform: translateY(-1px);
}

.thumb-wrap {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.58;
  background: #f1f4f6;
  background-position: center;
  background-size: cover;
  min-height: 148px;
}

.thumb-wrap::before {
  content: "ALI\A FISHING";
  white-space: pre-line;
  color: #5e6c78;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.thumb-wrap.has-product-fallback::before {
  content: none;
}

.thumb {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 148px;
  object-fit: cover;
  display: block;
}

.thumb[hidden] {
  display: none;
}

.product-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
}

.product-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}

.category,
.verified {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.verified {
  color: var(--accent);
}

.title {
  margin-top: 6px;
  min-height: 42px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-seller-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  margin-top: 8px;
  overflow: hidden;
}

.seller {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 107, 95, 0.25);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f5fbf8;
  color: var(--accent);
  font-size: 11px;
  font-weight: 820;
}

.price-basis {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-quickfacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 0;
}

.product-quickfacts div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 7px;
  background: #fff;
}

.product-quickfacts dt,
.product-quickfacts dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-quickfacts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.product-quickfacts dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 820;
}

.decision {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  margin-top: 8px;
  border: 1px solid rgba(15, 107, 95, 0.16);
  border-radius: 8px;
  padding: 6px 7px;
  background: #f8fcfa;
}

.decision-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(15, 107, 95, 0.25);
  border-radius: 999px;
  padding: 0 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 820;
}

.decision-reason {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin-top: 0;
  color: #314451;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-panel {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.price-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-summary strong {
  color: #0e5048;
  font-size: 25px;
  line-height: 1.1;
}

.price-summary span {
  border-radius: 999px;
  padding: 3px 7px;
  background: #f4f6f8;
  font-size: 11px;
  font-weight: 780;
}

.price-condition-line {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card .price-condition-line {
  display: none;
}

.price-route-summary {
  display: grid;
  gap: 5px;
  border: 1px solid #d4e5f7;
  border-radius: 8px;
  padding: 8px;
  background: #f6f9ff;
}

.price-route-summary strong {
  color: var(--blue);
  font-size: 11px;
  font-weight: 820;
}

.price-route-summary span,
.price-route-summary small {
  color: #314451;
  font-size: 11px;
  line-height: 1.45;
}

.price-route-summary > span {
  font-weight: 760;
}

.price-route-summary.is-app {
  border-color: #d7e6df;
  background: #f4fbf8;
}

.price-route-summary.is-app strong {
  color: var(--accent);
}

.price-route-summary.is-conditional {
  border-color: #e7c983;
  background: #fff8e8;
}

.price-route-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.price-route-requirements em {
  border: 1px solid rgba(36, 107, 206, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff;
  color: #246bce;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
}

.price-layer-summary {
  display: grid;
  gap: 6px;
  border: 1px solid #d7e6df;
  border-radius: 8px;
  padding: 8px;
  background: #f6fbf8;
}

.price-layer-summary strong {
  color: var(--accent);
  font-size: 12px;
}

.price-layer-summary span,
.price-layer-note {
  color: #3f5662;
  font-size: 11px;
  line-height: 1.45;
}

.price-layer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.price-layer-badges em {
  border: 1px solid #c9dfd7;
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff;
  color: #0f6b5f;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
}

.trend-good {
  color: #0f6b5f;
}

.trend-watch {
  color: #8a6500;
}

.trend-neutral {
  color: var(--muted);
}

.price-sparkline {
  display: grid;
  gap: 4px;
  min-height: 42px;
}

.price-trend-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.price-sparkline svg {
  display: block;
  width: 100%;
  height: 42px;
}

.sparkline-area {
  fill: rgba(15, 107, 95, 0.12);
  stroke: none;
}

.sparkline-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.price-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.price-metrics span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  background: #fff;
}

.price-metrics small,
.price-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.price-metrics strong {
  margin-top: 2px;
  font-size: 11px;
}

.alert-suggestion {
  border: 1px solid #ead18c;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff9e7;
  color: #745000;
  font-size: 12px;
  font-weight: 760;
}

.badges {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.offers {
  display: none;
  gap: 6px;
  margin-top: 12px;
}

.offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  text-decoration: none;
  color: var(--ink);
}

.offer.is-best {
  border-color: rgba(15, 107, 95, 0.45);
  background: #f3fbf8;
}

.offer span {
  display: grid;
  gap: 1px;
  font-size: 12px;
  font-weight: 720;
}

.offer small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.offer strong {
  font-size: 13px;
}

.product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  justify-content: stretch;
  margin-top: 10px;
  padding-top: 0;
}

.buy-button,
.alert-button,
.detail-button,
.dialog-close,
.link-preview-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.buy-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.link-preview-submit {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.alert-button {
  border-color: rgba(36, 107, 206, 0.35);
  color: var(--blue);
}

.detail-button {
  display: none;
  color: var(--muted);
}

.alert-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.buy-button:hover,
.alert-button:hover:not(:disabled),
.detail-button:hover,
.dialog-close:hover,
.link-preview-submit:hover {
  border-color: rgba(15, 107, 95, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}

.product-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(820px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(23, 33, 44, 0.34);
}

.link-preview-dialog {
  width: min(460px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.link-preview-dialog::backdrop {
  background: rgba(23, 33, 44, 0.34);
}

.link-preview-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.link-preview-thumb {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f4f6;
  background-position: center;
  background-size: cover;
}

.link-preview-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.link-preview-body h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.link-preview-body strong,
.link-preview-body span,
.link-preview-body small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-preview-body strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
}

.link-preview-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.link-preview-body small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  white-space: nowrap;
}

.link-preview-body p {
  margin: 3px 0 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

.link-preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.dialog-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.detail-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.detail-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.9;
  min-height: 198px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9eef3;
  background-position: center;
  background-size: cover;
  color: #5e6c78;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  min-height: 198px;
  object-fit: cover;
}

.detail-thumb.has-product-fallback img[hidden] {
  display: none;
}

.detail-heading {
  min-width: 0;
}

.detail-decision {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--accent-soft);
  color: #314451;
  font-size: 13px;
  line-height: 1.45;
}

.detail-decision strong {
  color: var(--accent);
  font-size: 14px;
  line-height: 1.25;
}

.detail-decision span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-buy-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 10px;
  align-items: stretch;
  margin-top: 10px;
  border: 1px solid rgba(15, 107, 95, 0.2);
  border-radius: 8px;
  padding: 10px;
  background: #f4fbf8;
}

.detail-buy-panel div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.detail-buy-panel span,
.detail-buy-panel small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-buy-panel strong {
  overflow: hidden;
  color: #0e5048;
  font-size: 24px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-primary-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 820;
  text-decoration: none;
  cursor: pointer;
}

.detail-action-stack {
  display: grid;
  grid-template-rows: 1fr 38px;
  gap: 8px;
  min-width: 0;
}

.detail-primary-buy:hover {
  background: #0b5c52;
  color: #fff;
}

.detail-primary-buy:disabled {
  opacity: 0.55;
  cursor: wait;
}

.detail-alert-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(36, 107, 206, 0.3);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

.detail-alert-button:hover,
.detail-alert-button.is-saved {
  border-color: rgba(15, 107, 95, 0.45);
  background: #fff;
  color: var(--accent);
}

.detail-alert-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.detail-purchase-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.detail-purchase-summary li {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
}

.detail-purchase-summary span,
.detail-purchase-summary strong,
.detail-purchase-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-purchase-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.detail-purchase-summary strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.detail-purchase-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.detail-notes {
  display: grid;
  gap: 5px;
  margin: 9px 0 0;
  padding: 0;
  color: #314451;
  font-size: 12px;
  line-height: 1.45;
  list-style: none;
}

.detail-notes li {
  position: relative;
  display: -webkit-box;
  padding-left: 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-notes li::before {
  position: absolute;
  top: 0.55em;
  left: 1px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.detail-merchant-strip,
.detail-more {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.detail-merchant-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.detail-merchant-link,
.detail-merchant-placeholder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: inherit;
  text-decoration: none;
}

.detail-merchant-more {
  margin: -1px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.detail-merchant-link.is-best {
  border-color: rgba(15, 107, 95, 0.45);
  background: #f3fbf8;
}

.detail-merchant-link:hover {
  border-color: rgba(15, 107, 95, 0.45);
  background: var(--accent-soft);
}

.detail-merchant-link span,
.detail-merchant-link strong,
.detail-merchant-link small,
.detail-merchant-placeholder span,
.detail-merchant-placeholder strong,
.detail-merchant-placeholder small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-merchant-link span,
.detail-merchant-placeholder span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.detail-merchant-link strong,
.detail-merchant-placeholder strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  text-align: right;
}

.detail-merchant-link small,
.detail-merchant-placeholder small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.detail-more summary {
  width: fit-content;
  color: var(--accent);
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
}

.detail-more[open] summary {
  margin-bottom: 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.detail-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfd;
}

.detail-grid dt,
.detail-grid dd {
  margin: 0;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.detail-grid dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 720;
}

.detail-comparison {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.detail-section-heading {
  display: grid;
  gap: 3px;
}

.detail-section-heading h3,
.detail-section-heading p {
  margin: 0;
}

.detail-section-heading h3 {
  color: var(--ink);
  font-size: 15px;
}

.detail-section-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-route {
  display: grid;
  gap: 7px;
  border: 1px solid #d7e6df;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f4fbf8;
}

.detail-route div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.detail-route strong {
  color: var(--accent);
  font-size: 13px;
}

.detail-route span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  text-align: right;
}

.detail-route em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.detail-route p {
  margin: 0;
  color: #3f5662;
  font-size: 12px;
  line-height: 1.45;
}

.detail-comparison-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.detail-comparison-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.detail-comparison-list li.is-best {
  border-color: rgba(15, 107, 95, 0.45);
  background: #f3fbf8;
}

.detail-comparison-list span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-comparison-list span strong,
.detail-comparison-list span small,
.detail-comparison-list > li > strong,
.detail-comparison-list > li > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-comparison-list span strong {
  color: var(--ink);
  font-size: 13px;
}

.detail-comparison-list span small,
.detail-comparison-list > li > small {
  color: var(--muted);
  font-size: 11px;
}

.detail-comparison-list > li > strong {
  color: var(--accent);
  font-size: 15px;
}

.detail-comparison-list > li > small {
  grid-column: 1 / -1;
}

.detail-offers {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 14px 0;
  list-style: none;
}

.detail-offers li {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.detail-offers li.is-best {
  border-color: rgba(15, 107, 95, 0.45);
  background: #f3fbf8;
}

.detail-offers a,
.detail-offer-placeholder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  color: inherit;
  text-decoration: none;
}

.detail-offers a:hover {
  background: rgba(15, 107, 95, 0.07);
}

.detail-offer-heading {
  margin-top: 14px;
}

.detail-offers span,
.detail-offers strong,
.detail-offers small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-price-layers {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.detail-price-layer-card {
  display: grid;
  gap: 9px;
  border: 1px solid #d7e6df;
  border-radius: 8px;
  padding: 10px;
  background: #f6fbf8;
}

.detail-layer-heading,
.detail-layer-primary,
.detail-price-layer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.detail-layer-heading span,
.detail-layer-primary span,
.detail-price-layer small,
.detail-price-layer-card p {
  color: #3f5662;
  font-size: 11px;
  line-height: 1.45;
}

.detail-layer-primary {
  border: 1px solid #c9dfd7;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.detail-layer-primary strong {
  color: var(--accent);
  font-size: 17px;
}

.detail-saving {
  grid-column: 1 / -1;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  background: #e8f7ef;
  color: #0f6b5f;
  font-size: 11px;
  font-weight: 760;
}

.detail-price-layer-list {
  display: grid;
  gap: 5px;
}

.detail-price-layer {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 8px;
  background: #fff;
}

.detail-price-layer.is-recommended {
  border-color: rgba(15, 107, 95, 0.45);
  background: #eef8f3;
}

.detail-price-layer span,
.detail-price-layer strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-price-layer span {
  font-size: 12px;
  font-weight: 760;
}

.detail-price-layer strong {
  color: var(--ink);
  font-size: 13px;
}

.detail-price-layer small {
  grid-column: 1 / -1;
}

.detail-price-layer-card p {
  margin: 0;
}

@media (max-width: 860px) {
  .deal-controls {
    grid-template-columns: 1fr 1fr;
  }

  .category-filter {
    grid-column: 1 / -1;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  .secondary-action {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 14px 10px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .status-strip {
    min-width: 118px;
    text-align: left;
  }

  .layout {
    padding: 12px;
  }

  .deal-tabs {
    top: 108px;
    margin-top: 0;
  }

  .deal-tab {
    min-height: 40px;
    padding: 0 10px;
  }

  .personal-dashboard {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .personal-pill-row {
    justify-content: flex-start;
  }

  .link-form,
  .link-lifecycle,
  .pending-item {
    grid-template-columns: 1fr;
  }

  .deal-controls {
    grid-template-columns: 1fr;
  }

  .deal-controls .select-field {
    display: none;
  }

  .my-item-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .my-item,
  .my-item.is-price-alert {
    display: flex;
    flex-direction: column;
  }

  .category-filter {
    grid-column: auto;
  }

  .my-item-status {
    text-align: left;
  }

  .my-item-type {
    max-width: 100%;
  }

  .my-item-thumb {
    width: 100%;
  }

  .my-item-status {
    justify-self: start;
  }

  .my-item-actions {
    grid-column: auto;
  }

  .my-item-alert-controls {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .my-item-save,
  .my-item-view,
  .my-item-open,
  .my-item-remove {
    min-width: 0;
  }

  .thumb-wrap,
  .thumb {
    min-height: 146px;
  }

  .product-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .thumb-wrap {
    aspect-ratio: auto;
    height: 100%;
  }

  .title {
    min-height: 0;
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .decision {
    margin-top: 6px;
  }

  .price-summary strong {
    font-size: 20px;
  }

  .product-actions {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .alert-button {
    display: none;
  }

  .product-seller-line {
    margin-top: 6px;
  }

  .detail-button {
    min-width: 46px;
    padding: 0 9px;
  }

  .detail-grid,
  .detail-comparison-list li,
  .detail-offers a,
  .detail-offer-placeholder,
  .detail-hero,
  .detail-buy-panel,
  .detail-action-stack,
  .detail-purchase-summary,
  .detail-layer-heading,
  .detail-layer-primary,
  .detail-price-layer {
    grid-template-columns: 1fr;
  }

  .detail-thumb,
  .detail-thumb img {
    min-height: 180px;
  }
}
