:root {
  --bg: #fffaf5;
  --bg-strong: #fff3e8;
  --surface: #ffffff;
  --surface-warm: #ffefe0;
  --surface-soft: #fffbf7;
  --ink: #2e241f;
  --muted: #76675f;
  --faint: #9d8f86;
  --line: #ead9cb;
  --line-strong: #dec3ad;
  --accent: #f49a58;
  --accent-deep: #d96f36;
  --accent-soft: #ffe9d4;
  --nav-active-bg: linear-gradient(135deg, #f7ad6f 0%, #ee817a 100%);
  --gold: #d3a64f;
  --rose: #d66f78;
  --sage: #637f55;
  --blue: #516f93;
  --shadow: 0 18px 42px rgba(133, 83, 42, 0.1);
  --shadow-soft: 0 10px 26px rgba(133, 83, 42, 0.07);
  --radius: 8px;
  --max: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fffaf5 0, var(--bg) 310px, #fffdf9 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

h1,
h2,
h3,
strong {
  font-weight: 600;
}

td strong,
.list-item strong,
.timeline-item strong,
.category-nav strong {
  font-weight: 500;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.top-strip {
  border-bottom: 1px solid rgba(234, 217, 203, 0.72);
  background: rgba(255, 252, 248, 0.9);
}

.top-strip-inner,
.masthead-inner,
.nav-inner,
.page {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.top-strip-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
  background: #3fb987;
  box-shadow: 0 0 0 4px rgba(63, 185, 135, 0.12);
  margin-right: 8px;
}

.status-dot.syncing {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(211, 166, 79, 0.14);
}

.status-dot.offline {
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(214, 111, 120, 0.14);
}

.strip-status {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(234, 217, 203, 0.9);
  color: var(--faint);
}

.strip-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 0;
}

.link-button:hover {
  color: var(--accent-deep);
}

.masthead {
  background: rgba(255, 250, 244, 0.82);
  backdrop-filter: blur(16px);
}

.masthead-inner {
  min-height: 104px;
  display: grid;
  grid-template-columns: 220px minmax(280px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 21px;
  background: linear-gradient(135deg, #f7a765 0%, #e67868 100%);
  box-shadow: 0 16px 30px rgba(231, 125, 71, 0.2);
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-name {
  display: block;
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-deep);
}

.brand-subtitle {
  display: block;
  font-size: 10px;
  line-height: 1.1;
  color: var(--faint);
  text-transform: uppercase;
}

.search-wrap {
  display: grid;
  grid-template-columns: 1fr 108px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 24px;
  color: var(--ink);
  background: transparent;
  min-width: 0;
  font-size: 14px;
}

.search-wrap input::placeholder {
  color: var(--faint);
}

.search-wrap button {
  border: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--accent) 0%, #ef7a65 100%);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.header-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  padding: 0 14px;
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(133, 83, 42, 0.06);
}

.header-icon {
  width: 18px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  opacity: 0.78;
}

.header-pill.primary {
  color: #fff;
  border: 0;
  font-weight: 500;
  background: linear-gradient(135deg, #f7a25d 0%, #ef746c 100%);
}

.count-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--rose);
  font-size: 10px;
  font-weight: 500;
}

.cart-pill.cart-attention {
  animation: cart-attention 820ms ease both;
  border-color: rgba(244, 154, 88, 0.72);
}

.cart-pill.cart-attention .header-icon {
  animation: cart-icon-bump 720ms ease both;
}

.cart-pill.cart-attention .count-badge {
  animation: cart-badge-pop 760ms ease both;
  box-shadow: 0 0 0 6px rgba(214, 111, 120, 0.16);
}

@keyframes cart-attention {
  0% {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(133, 83, 42, 0.06);
  }
  35% {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(216, 111, 54, 0.2);
  }
  70% {
    transform: translateY(1px);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(133, 83, 42, 0.06);
  }
}

@keyframes cart-icon-bump {
  0%,
  100% {
    transform: rotate(0deg);
  }
  35% {
    transform: rotate(-10deg);
  }
  65% {
    transform: rotate(8deg);
  }
}

@keyframes cart-badge-pop {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 111, 120, 0.2);
  }
  36% {
    box-shadow: 0 0 0 7px rgba(214, 111, 120, 0.18);
  }
  68% {
    box-shadow: 0 0 0 3px rgba(214, 111, 120, 0.12);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(214, 111, 120, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-pill.cart-attention,
  .cart-pill.cart-attention .header-icon,
  .cart-pill.cart-attention .count-badge {
    animation: none;
  }
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-top: 1px solid rgba(234, 217, 203, 0.7);
  border-bottom: 1px solid rgba(222, 195, 173, 0.72);
  background: rgba(255, 250, 244, 0.94);
  backdrop-filter: blur(16px);
}

.nav-inner {
  min-height: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 9px;
  overflow: visible;
  padding: 8px 0;
}

.nav-button {
  height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.nav-icon {
  width: 1.1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1em;
  line-height: 1;
}

.nav-label {
  display: inline-flex;
  align-items: center;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.nav-caret {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
}

.nav-divider {
  width: 1px;
  height: 22px;
  flex: 0 0 auto;
  margin: 0 4px;
  background: linear-gradient(
    180deg,
    rgba(222, 195, 173, 0),
    rgba(222, 195, 173, 0.86),
    rgba(222, 195, 173, 0)
  );
}

.nav-button:hover {
  color: var(--accent-deep);
  background: var(--surface-warm);
}

.nav-button.active {
  color: #fff;
  background: var(--nav-active-bg);
  box-shadow: 0 10px 22px rgba(215, 100, 79, 0.14);
}

.nav-button.active:hover {
  color: #fff;
  background: var(--nav-active-bg);
}

.nav-menu:hover > .nav-button,
.nav-menu:focus-within > .nav-button {
  color: #fff;
  background: var(--nav-active-bg);
  box-shadow: 0 10px 22px rgba(215, 100, 79, 0.14);
}

.nav-menu {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}

.nav-menu:hover .nav-popover,
.nav-menu:focus-within .nav-popover {
  display: grid;
}

.nav-popover {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 158px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 50;
}

.nav-popover button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  text-align: left;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}

.nav-popover button:hover,
.nav-popover button.active {
  color: var(--accent-deep);
  background: var(--surface-warm);
}

.page {
  padding: 34px 0 72px;
}

.page-deals,
.page-articles,
.page-categories,
.page-targets,
.page-periodic,
.page-orders,
.page-cart,
.page-savings,
.page-stats {
  padding-top: 20px;
}

.page-deals > .section:first-child,
.page-articles > .section:first-child,
.page-categories > .section:first-child,
.page-targets > .section:first-child,
.page-periodic > .section:first-child,
.page-orders > .section:first-child,
.page-cart > .section:first-child,
.page-savings > .section:first-child,
.page-stats > .section:first-child {
  margin-top: 0;
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 0.72fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 156px;
  padding: 24px 30px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(238, 169, 84, 0.08), rgba(233, 111, 112, 0.12)),
    linear-gradient(135deg, #e8b85f 0%, #f39a56 48%, #ee7778 100%);
  box-shadow: var(--shadow);
}

.hero-main::after {
  content: "";
  position: absolute;
  inset: auto -34px -64px auto;
  width: 250px;
  height: 132px;
  border-radius: 18px;
  transform: rotate(-12deg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.18) 0,
      rgba(255, 255, 255, 0.18) 12px,
      rgba(255, 255, 255, 0.05) 12px,
      rgba(255, 255, 255, 0.05) 24px
    );
}

.hero-kicker {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.82;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.12;
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

.hero-side {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.hero-metric {
  min-height: 68px;
  border: 1px solid rgba(222, 195, 173, 0.64);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.home-hero {
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1fr);
  align-items: stretch;
}

.home-hero .hero-main {
  min-height: 92px;
  padding: 10px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-hero .hero-main::after {
  width: 188px;
  height: 92px;
  inset: auto -28px -44px auto;
}

.home-hero .hero-kicker {
  font-size: 10px;
}

.home-hero h1 {
  margin: 6px 0 5px;
  font-size: clamp(22px, 1.75vw, 28px);
  line-height: 1.08;
}

.home-hero p {
  max-width: 900px;
  font-size: 13px;
  line-height: 1.45;
}

.home-hero .hero-side {
  align-content: stretch;
}

.home-hero .hero-metric {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  margin-top: 5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--accent-deep);
  font-size: 21px;
  font-weight: 500;
}

.section {
  margin-top: 28px;
}

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

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.deals-page {
  margin-top: 0;
}

.deals-page .section-head {
  margin-bottom: 12px;
}

.deals-page .section-title {
  font-size: 17px;
}

.deals-page .section-subtitle {
  margin-top: 4px;
}

.deals-toolbar {
  align-items: center;
  margin: 0 0 16px;
}

.deals-toolbar .segmented {
  flex: 1 1 auto;
}

.deals-toolbar .segmented button {
  min-height: 34px;
  padding: 0 13px;
  font-size: 13px;
}

.deals-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.deals-controls .small-pill {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.deals-controls .deal-sort {
  width: 132px;
  min-height: 34px;
  font-size: 13px;
}

.page-articles .section-head,
.page-categories .section-head,
.page-report .section-head,
.page-targets .section-head,
.page-periodic .section-head,
.page-orders .section-head,
.page-cart .section-head,
.page-savings .section-head,
.page-stats .section-head {
  margin-bottom: 12px;
}

.page-articles .toolbar,
.page-categories .toolbar,
.page-report .toolbar,
.page-targets .toolbar,
.page-periodic .toolbar,
.page-orders .toolbar,
.page-cart .toolbar,
.page-savings .toolbar,
.page-stats .toolbar {
  margin: 12px 0;
}

.page-articles .segmented button,
.page-articles .small-pill,
.page-categories .segmented button,
.page-categories .small-pill,
.page-report .segmented button,
.page-report .small-pill,
.page-targets .segmented button,
.page-targets .small-pill,
.page-periodic .segmented button,
.page-periodic .small-pill,
.page-orders .segmented button,
.page-orders .small-pill,
.page-cart .segmented button,
.page-cart .small-pill,
.page-savings .segmented button,
.page-savings .small-pill,
.page-stats .segmented button,
.page-stats .small-pill {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.page-categories .category-nav {
  margin-bottom: 14px;
}

.page-categories .category-nav button {
  min-height: 34px;
  padding: 0 13px;
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.segmented {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.segmented button,
.chip,
.small-pill {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 14px;
}

.segmented button.active,
.chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, #e67868 100%);
  box-shadow: 0 10px 20px rgba(223, 112, 55, 0.14);
}

.select,
.input,
.textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: 0;
  padding: 0 12px;
}

.textarea {
  width: 100%;
  min-height: 112px;
  padding: 14px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(244, 154, 88, 0.14);
}

.grid {
  display: grid;
  gap: 18px;
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(238px, 280px));
  justify-content: start;
  align-items: start;
}

.two-col {
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid rgba(234, 217, 203, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.product-card {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-media {
  position: relative;
  min-height: 278px;
  display: grid;
  grid-template-rows: 220px auto;
  align-items: center;
  justify-items: center;
  gap: 8px;
  padding: 0 0 14px;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(234, 217, 203, 0.72);
}

.product-emoji {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--product-a, #f2a543), var(--product-b, #b74c48));
  box-shadow: 0 20px 34px rgba(111, 64, 34, 0.18);
  font-size: 34px;
}

.product-image {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.product-media-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  padding: 0 14px;
}

.product-media-meta span,
.product-media-meta strong {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.product-media-meta strong {
  color: var(--accent-deep);
  font-weight: 500;
}

.product-body {
  flex: 0 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-topline,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  min-height: 40.6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  color: var(--muted);
  font-size: 11px;
}

.product-platform {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.reporter-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.2;
  min-width: 0;
}

.reporter-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reporter-line span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--line-strong);
}

.deal-block {
  display: grid;
  gap: 4px;
}

.product-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 2px;
}

.price-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.price {
  color: var(--accent-deep);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.price small {
  font-size: 12px;
}

.origin-price {
  color: var(--faint);
  text-decoration: line-through;
}

.rebate-line {
  color: var(--sage);
  font-size: 12px;
  font-weight: 400;
}

.saving-text {
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
}

.rebate-box {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 86px;
  text-align: right;
}

.rebate-rate {
  color: var(--faint);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.rebate-tag {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(99, 127, 85, 0.24);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--sage);
  background: rgba(99, 127, 85, 0.08);
  font-size: 12px;
  white-space: nowrap;
}

.product-blurb {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.target-link {
  min-height: 36px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 8px;
  color: var(--accent-deep);
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}

.target-link:hover {
  background: var(--surface-warm);
}

.button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.button.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #e67868 100%);
  box-shadow: 0 12px 24px rgba(223, 112, 55, 0.15);
}

.button.subtle {
  color: var(--accent-deep);
  background: var(--surface-warm);
}

.button.success {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #718f55 0%, #476f53 100%);
}

.button.warning {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #e7b860 0%, #d98a43 100%);
}

.button.danger {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #de7d82 0%, #c75f6d 100%);
}

.button.full {
  width: 100%;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.form-actions .button {
  min-width: 150px;
  width: auto;
  padding-inline: 18px;
}

.form-panel,
.data-panel,
.wide-panel {
  border: 1px solid rgba(234, 217, 203, 0.9);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.data-panel h2,
.report-form h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
}

.panel-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.report-form .button[type="submit"] {
  width: 100%;
  margin-top: 14px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.data-list {
  display: grid;
  gap: 12px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 252, 248, 0.9);
  padding: 16px;
}

.report-item p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}

.list-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.list-meta {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.status.active {
  color: var(--accent-deep);
  background: #ffe3c6;
}

.status.done {
  color: #fff;
  background: var(--sage);
}

.status.pending {
  color: #76510d;
  background: #ffe9b7;
}

.status.locked {
  color: #fff;
  background: var(--rose);
}

.status.info {
  color: #fff;
  background: var(--blue);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 500;
}

td {
  color: var(--ink);
}

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

.qty-stepper {
  display: inline-grid;
  grid-template-columns: 32px 40px 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.qty-stepper button {
  border: 0;
  background: transparent;
  font-weight: 500;
}

.qty-stepper span {
  display: grid;
  place-items: center;
  border-inline: 1px solid var(--line);
  font-weight: 500;
}

.compact-page {
  font-size: 13px;
}

.compact-page .section-head {
  margin-bottom: 14px;
}

.compact-page .section-title {
  font-size: 16px;
  font-weight: 500;
}

.compact-page .section-subtitle {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.compact-page .toolbar {
  margin: 14px 0;
  gap: 10px;
}

.compact-page .form-panel,
.compact-page .data-panel,
.compact-page .wide-panel {
  padding: 18px;
}

.compact-page .form-grid {
  gap: 12px;
}

.compact-page .field {
  gap: 6px;
}

.compact-page .field label {
  font-size: 11px;
  font-weight: 500;
}

.compact-page .input,
.compact-page .select,
.compact-page .textarea {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.compact-page .button,
.compact-page .segmented button,
.compact-page .small-pill {
  min-height: 32px;
  padding: 0 11px;
  gap: 6px;
  font-size: 12px;
}

.compact-page .status {
  min-height: 24px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 500;
}

.compact-page .data-list {
  gap: 10px;
}

.compact-page .list-item {
  padding: 14px;
}

.compact-page .list-title {
  font-size: 14px;
  font-weight: 500;
}

.compact-page .inner-section {
  padding: 0;
  margin-top: 18px;
}

.compact-page .list-meta {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.compact-page table {
  min-width: 800px;
}

.compact-page th,
.compact-page td {
  padding: 11px 14px;
  font-size: 13px;
}

.compact-page th {
  font-size: 11px;
}

.compact-page td strong {
  font-weight: 500;
}

.compact-page .qty-stepper {
  grid-template-columns: 28px 34px 28px;
  height: 28px;
}

.compact-page .qty-stepper button,
.compact-page .qty-stepper span {
  font-size: 12px;
  font-weight: 500;
}

.compact-page .stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.compact-page .stat-card {
  min-height: 88px;
  padding: 14px 16px;
}

.compact-page .stat-card strong {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 500;
}

.compact-page .stat-card span {
  font-size: 12px;
}

.compact-page .timeline {
  gap: 10px;
}

.compact-page .timeline-item {
  grid-template-columns: 78px 1fr auto;
  gap: 12px;
  padding: 11px 14px;
}

.compact-page .timeline-date {
  font-size: 12px;
}

.compact-page .timeline-item strong {
  font-size: 13px;
  font-weight: 500;
}

.compact-page .timeline-item .muted {
  margin-top: 2px;
  font-size: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat-card {
  min-height: 112px;
  border: 1px solid rgba(234, 217, 203, 0.88);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--accent-deep);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
}

.auction-card {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.auction-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mini-metric {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}

.mini-metric span {
  color: var(--muted);
  font-size: 12px;
}

.mini-metric strong {
  display: block;
  margin-top: 5px;
  color: var(--accent-deep);
  font-size: 20px;
  font-weight: 600;
}

.demand-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.demand-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}

.auction-actions {
  display: grid;
  grid-template-columns: minmax(140px, 210px) auto;
  gap: 12px;
  align-items: center;
}

.auction-page {
  font-size: 13px;
}

.auction-page .hero {
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.auction-page .hero-main {
  min-height: 84px;
  padding: 8px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auction-page .hero-main::after {
  width: 188px;
  height: 86px;
  inset: auto -28px -42px auto;
}

.auction-page .hero-kicker {
  font-size: 10px;
}

.auction-page .hero h1 {
  margin: 5px 0 4px;
  font-size: 22px;
  line-height: 1.1;
}

.auction-page .hero p {
  font-size: 12px;
  line-height: 1.38;
}

.auction-page .hero-metric {
  min-height: 84px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auction-page .metric-label {
  font-size: 11px;
}

.auction-page .metric-value {
  margin-top: 4px;
  font-size: 18px;
}

.auction-page .section {
  margin-top: 22px;
}

.auction-page .toolbar {
  margin: 16px 0;
}

.auction-page .segmented button,
.auction-page .small-pill {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.auction-page .auction-card {
  padding: 16px;
  gap: 13px;
}

.auction-page .list-title {
  font-size: 14px;
  line-height: 1.35;
}

.auction-page .list-meta {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.auction-page .status {
  min-height: 24px;
  padding: 0 9px;
  font-size: 10px;
}

.auction-page .auction-metrics {
  gap: 10px;
}

.auction-page .mini-metric {
  min-height: 58px;
  padding: 10px;
}

.auction-page .mini-metric span,
.auction-page .metric-label {
  font-size: 11px;
}

.auction-page .mini-metric strong {
  margin-top: 4px;
  font-size: 17px;
}

.auction-page .demand-chips {
  gap: 6px;
}

.auction-page .demand-chip {
  min-height: 28px;
  padding: 0 10px;
  gap: 5px;
  font-size: 12px;
}

.auction-page .auction-actions {
  gap: 10px;
  grid-template-columns: minmax(120px, 180px) max-content;
  justify-content: start;
}

.auction-page .auction-actions .input,
.auction-page .auction-actions .button {
  min-height: 34px;
  font-size: 12px;
}

.auction-page .auction-actions .button {
  padding-inline: 18px;
}

.article-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.article-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.article-card .status {
  justify-self: start;
  min-height: 24px;
  padding: 0 10px;
  font-size: 11px;
}

.article-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.article-card .row-between {
  align-items: center;
  font-size: 12px;
  min-width: 0;
}

.article-product-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-card .button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.category-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.category-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  box-shadow: var(--shadow-soft);
}

.category-nav button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
}

.category-nav button span {
  white-space: nowrap;
}

.category-nav button strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.category-nav button.active,
.category-nav button.active:hover {
  color: var(--accent-deep);
  background: var(--surface-warm);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(46, 36, 31, 0.3);
  padding: 20px;
}

.login-modal {
  position: relative;
  width: min(420px, 100%);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.98);
  box-shadow: 0 28px 72px rgba(49, 29, 17, 0.2);
  padding: 22px;
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.login-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 42px;
}

.login-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #f7a765 0%, #e67868 100%);
  font-size: 17px;
  font-weight: 500;
}

.login-modal h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.login-modal p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.login-code-row {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 10px;
  align-items: end;
}

.login-message {
  margin-top: 12px !important;
  color: var(--accent-deep) !important;
  font-size: 12px !important;
}

.login-modal .input {
  min-height: 38px;
  font-size: 13px;
}

.login-modal .button {
  min-height: 38px;
  font-size: 12px;
}

.modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 10px;
  margin-top: 16px;
}

.login-modal .login-submit {
  min-height: 42px;
  font-size: 13px;
  font-weight: 600;
}

.login-modal .login-register {
  border-color: rgba(217, 111, 54, 0.28);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(420px, calc(100% - 48px));
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #fff;
  background: rgba(46, 36, 31, 0.92);
  box-shadow: var(--shadow);
}

.empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.64);
  text-align: center;
  padding: 24px;
}

.product-empty {
  align-content: center;
  gap: 14px;
}

.product-empty.compact {
  min-height: 132px;
  margin: 12px 0;
}

.product-empty-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  justify-self: center;
  border-radius: 999px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-weight: 600;
}

.product-empty-copy {
  display: grid;
  gap: 6px;
  line-height: 1.55;
}

.product-empty-copy strong {
  color: var(--ink);
  font-size: 16px;
}

.product-empty-copy span {
  color: var(--muted);
}

.empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.loading-dot {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(217, 111, 54, 0.24);
  border-top-color: var(--accent-deep);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 98px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.timeline-date {
  color: var(--muted);
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f3e4d7;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--sage) 100%);
}

.footer {
  margin-top: 38px;
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  border-top: 1px solid rgba(234, 217, 203, 0.8);
}

.nowrap {
  white-space: nowrap;
}

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

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

.sage {
  color: var(--sage);
}

.rose {
  color: var(--rose);
}

.hide {
  display: none !important;
}

@media (max-width: 1180px) {
  .masthead-inner {
    grid-template-columns: 1fr;
    padding: 18px 0;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero,
  .two-col,
  .category-layout {
    grid-template-columns: 1fr;
  }

  .category-nav {
    display: flex;
  }
}

@media (max-width: 760px) {
  .top-strip-inner,
  .masthead-inner,
  .nav-inner,
  .page {
    width: min(100% - 24px, var(--max));
  }

  .top-strip-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
    gap: 6px;
  }

  .brand-name {
    font-size: 25px;
  }

  .search-wrap {
    grid-template-columns: 1fr 90px;
  }

  .hero-main {
    padding: 30px 24px;
  }

  .form-grid,
  .three-col,
  .auction-metrics,
  .auction-actions,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .login-code-row,
  .modal-actions {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }
}
