:root {
  --bg: #f7f4ef;
  --panel: #fffdf8;
  --ink: #2f2a24;
  --muted: #756b5f;
  --line: #e5ded3;
  --brand: #0f766e;
  --brand-2: #c2410c;
  --soft: #ecfdf5;
  --warn: #fff7ed;
  --shadow: 0 14px 40px rgba(47, 42, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--brand);
  background: var(--soft);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 18px 56px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 800;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.lead {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

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

.entry {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.entry:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.08);
}

.entry strong {
  display: block;
  margin-bottom: 8px;
}

.entry span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  padding: 22px;
}

.panel h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.form-row {
  display: grid;
  gap: 10px;
}

label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
  outline: none;
}

textarea {
  min-height: 122px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

button,
.button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 15px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

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

.primary {
  background: var(--brand);
  color: #fff;
}

.secondary {
  background: #f3eee6;
  color: var(--ink);
}

.danger {
  background: #fff1f2;
  color: #be123c;
}

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

.stat-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.item-title {
  font-weight: 800;
  word-break: break-all;
}

.item-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.tool-stack {
  display: grid;
  gap: 18px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.module-disabled-banner {
  display: grid;
  gap: 14px;
  border-style: dashed;
  border-color: rgba(15, 118, 110, 0.25);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 28%),
    var(--panel);
}

.module-disabled-banner .tool-title {
  font-size: 28px;
  margin-bottom: 0;
}

.module-disabled-banner .tool-lead {
  color: var(--muted);
  max-width: 48ch;
}

body.module-disabled .tool-card--hero {
  margin-bottom: 0;
}

.tool-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.tool-card--hero {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 28%),
    radial-gradient(circle at left bottom, rgba(194, 65, 12, 0.08), transparent 24%),
    var(--panel);
}

.tool-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.tool-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tool-kicker {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.tool-title {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.1;
}

.tool-lead {
  margin: 0;
  max-width: 66ch;
}

.tool-notes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tool-notes span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.record-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.record-row__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.record-row__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.secondary--small,
.primary--small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.checkline input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex: none;
}

.detect {
  min-height: 40px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: #fff;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.detect--ok {
  border-color: rgba(15, 118, 110, 0.22);
  background: var(--soft);
  color: var(--brand);
}

.detect--warn {
  border-color: rgba(194, 65, 12, 0.22);
  background: #fff7ed;
  color: var(--brand-2);
}

.meta-block {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chip--active,
.chip:hover {
  background: var(--soft);
  border-color: rgba(15, 118, 110, 0.25);
  color: var(--brand);
}

.chip--accent {
  background: #fff7ed;
  color: var(--brand-2);
  border-color: rgba(194, 65, 12, 0.18);
}

.tool-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.toolbar-subline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.list-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

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

.clock {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f7f4ef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  gap: 4px;
}

.segmented__item {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.segmented__item.is-active {
  background: var(--soft);
  color: var(--brand);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toggle input {
  width: 14px;
  height: 14px;
}

.helper-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cooldown-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.cooldown-note--warn {
  color: var(--brand-2);
}

.item {
  list-style: none;
}

.item-main {
  min-width: 0;
}

.item-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.item-progress {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: #efe7db;
  overflow: hidden;
}

.item-progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, #14b8a6 100%);
}

.record-panel {
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: #fff;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.tag--orange {
  background: #fff7ed;
  color: var(--brand-2);
}

.tag--blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.tag--green {
  background: var(--soft);
  color: var(--brand);
}

.tag--slate {
  background: #f3f4f6;
  color: #475569;
}

.tag--purple {
  background: #f5f3ff;
  color: #6d28d9;
}

.used-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.used-section__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.used-section__head h2 {
  margin: 0;
  font-size: 18px;
}

.used-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pill--muted {
  background: #f3f4f6;
  color: #475569;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(47, 42, 36, 0.38);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(100%, 460px);
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(47, 42, 36, 0.18);
  padding: 22px;
}

.modal h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-note {
  margin-bottom: 14px !important;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 32px;
  width: 32px;
  padding: 0;
  border-radius: 999px;
  background: #f3eee6;
  color: var(--ink);
}

.modal--locked {
  width: min(100%, 520px);
}

.modal--records {
  width: min(100%, 560px);
}

.record-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.record-item__main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.record-item__value {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

.record-item__time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.locked-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.locked-raw {
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.actions--modal {
  margin-top: 14px;
}

body.has-modal {
  overflow: hidden;
}

.empty {
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 50;
  background: #2f2a24;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

.toast.success {
  background: var(--brand);
}

.toast.error {
  background: var(--brand-2);
}

.coupon-shortcuts {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

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

.coupon-shortcuts__item {
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 14px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.coupon-shortcuts__item:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.08);
}

.coupon-shortcuts__item strong {
  font-size: 14px;
}

.coupon-shortcuts__item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.loading-area {
  display: none;
  padding: 28px 0;
  text-align: center;
}

.loading-area__spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 12px;
  border-radius: 999px;
  border: 3px solid rgba(15, 118, 110, 0.14);
  border-top-color: var(--brand);
  animation: coupon-spin 0.9s linear infinite;
}

.loading-area__text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.error-banner {
  display: none;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.result-top {
  padding: 18px 18px 0;
}

.result-merchant {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.result-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff7ed;
  color: var(--brand-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex: none;
}

.result-merchant__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.result-merchant__name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.coupon-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--brand-2);
  border: 1px solid #fed7aa;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
}

.coupon-badge.no-coupon {
  background: #f7f4ef;
  border-color: var(--line);
  color: var(--muted);
}

.cashback-panel {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.cashback-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cashback-panel__summary {
  padding: 12px 14px;
  border: 1px solid rgba(25, 200, 170, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(25, 200, 170, 0.08), rgba(24, 169, 242, 0.05));
  color: #0f5c6b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.cashback-panel__summary.is-empty {
  border-color: var(--line);
  background: #f8fbfc;
  color: var(--muted);
  font-weight: 700;
}

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

.cashback-chip {
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 4px;
}

.cashback-chip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.cashback-chip strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.result-links {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.result-link {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  text-decoration: none;
  border-bottom: 1px solid #f3eee6;
}

.result-link:last-child {
  border-bottom: 0;
}

.result-link--coupon {
  background: #fffbeb;
  color: #92400e;
}

.result-link--coupon:hover {
  background: #fef3c7;
}

.result-link--mini {
  background: #f8fafc;
  color: var(--brand);
}

.result-link--mini:hover {
  background: var(--soft);
}

.result-link__title {
  font-size: 14px;
  font-weight: 800;
}

.result-link__meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.result-message {
  padding: 26px 18px;
  text-align: center;
}

.empty-icon-circle {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #f7f4ef;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
}

.empty-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.empty-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-message .error-text {
  display: inline-block;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.modal--saved {
  width: min(100%, 620px);
}

.modal-body {
  max-height: min(56vh, 520px);
  overflow: auto;
}

.saved-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.saved-item:first-child {
  border-top: 0;
}

.item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff7ed;
  color: var(--brand-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex: none;
}

.item-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.item-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.saved-item .item-meta {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.6;
}

.saved-item .item-meta--cashback {
  color: #0f7d77;
  font-weight: 700;
}

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

.item-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f7f4ef;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.item-links a:hover {
  background: var(--soft);
  color: var(--brand);
}

.btn-item-refresh,
.btn-item-delete {
  min-height: 30px;
  width: 30px;
  padding: 0;
  border-radius: 999px;
  flex: none;
}

.btn-item-refresh {
  background: var(--soft);
  color: var(--brand);
}

.btn-item-delete {
  background: #fff1f2;
  color: #be123c;
}

.saved-empty {
  padding: 22px 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

.admin-stack {
  display: grid;
  gap: 18px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.stat-card__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-card__value {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: start;
}

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

.section-head h2,
.admin-block h3 {
  margin-bottom: 6px;
}

.section-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-form,
.admin-block {
  display: grid;
  gap: 14px;
}

.admin-block + .admin-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

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

.field-grid label {
  display: grid;
  gap: 8px;
}

.admin-switch {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.admin-switch input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
}

.field-span-2 {
  grid-column: 1 / -1;
}

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

.preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.preview-card--wide {
  grid-column: 1 / -1;
}

.preview-card__eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.preview-card__title {
  font-size: 18px;
  line-height: 1.35;
}

.preview-card__copy {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.admin-inline-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: 120px 120px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.admin-toolbar label,
.toolbar-search {
  display: grid;
  gap: 8px;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: #fbfaf7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.table-raw {
  max-width: 340px;
  line-height: 1.55;
  word-break: break-all;
}

.table-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f7f4ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.favorite-groups {
  display: grid;
  gap: 12px;
}

.favorite-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.favorite-group__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.favorite-group__head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.favorite-poi-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .home-grid,
  .tool-layout,
  .entry-grid,
  .tool-grid,
  .admin-grid,
  .admin-stats,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel,
  .tool-card {
    padding: 18px;
  }

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

  .item-actions button {
    flex: 1;
  }

  .record-item {
    grid-template-columns: 1fr;
  }

  .tool-card__head,
  .tool-toolbar,
  .toolbar-subline,
  .used-section__head,
  .record-row,
  .section-head,
  .favorite-group__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar-actions,
  .tool-head-actions {
    justify-content: flex-start;
  }

  .coupon-shortcuts__grid {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .banner-admin-card__head,
  .banner-admin-card__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .banner-admin-actions .logo-upload__preview {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 6.2;
  }

  .cashback-panel__meta {
    grid-template-columns: 1fr;
  }

  .tool-title {
    font-size: 28px;
  }
}

/* 2026 visual refresh */
:root {
  --bg: #f4f1eb;
  --panel: #fffdf8;
  --panel-strong: #ffffff;
  --ink: #161616;
  --muted: #706a61;
  --line: #ece6dc;
  --brand: #20b889;
  --brand-2: #0f8f72;
  --soft: #eafaf4;
  --hero-bg: linear-gradient(135deg, #fffdf8 0%, #f4fff9 100%);
  --shadow: 0 18px 48px rgba(38, 31, 20, 0.08);
  --shadow-soft: 0 10px 26px rgba(38, 31, 20, 0.06);
}

body[data-platform="pdd"] {
  --brand: #ff3f46;
  --brand-2: #d82632;
  --soft: #fff1f2;
  --hero-bg: linear-gradient(135deg, #fff7f6 0%, #ffe6e7 100%);
}

body[data-platform="jd"] {
  --brand: #ff7214;
  --brand-2: #dd4d00;
  --soft: #fff3e8;
  --hero-bg: linear-gradient(135deg, #fffaf2 0%, #ffe9ce 100%);
}

body[data-platform="mt"] {
  --brand: #f2b700;
  --brand-2: #c88900;
  --soft: #fff7d6;
  --hero-bg: linear-gradient(135deg, #fffdf0 0%, #ffeeb2 100%);
}

body[data-page="coupon"] {
  --brand: #7c5cff;
  --brand-2: #5b38db;
  --soft: #f2efff;
  --hero-bg: linear-gradient(135deg, #fbf7ff 0%, #eee6ff 100%);
}

body[data-page="admin"] {
  --brand: #16a085;
  --brand-2: #0f766e;
  --soft: #ecfdf5;
  --hero-bg: linear-gradient(135deg, #f8fffb 0%, #e9fbf5 100%);
}

html {
  background: #ece8df;
}

body {
  color: var(--ink);
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(244, 241, 235, 0.94)),
    repeating-linear-gradient(90deg, rgba(22, 22, 22, 0.018) 0 1px, transparent 1px 72px);
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  font-size: 48px;
  line-height: 1.08;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 253, 248, 0.84);
  border-bottom: 1px solid rgba(236, 230, 220, 0.86);
  box-shadow: 0 12px 34px rgba(44, 35, 25, 0.05);
}

.nav {
  max-width: 1240px;
  padding: 16px 20px;
}

.brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  color: var(--ink);
  line-height: 1.1;
}

.brand::before {
  content: "♥";
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #32d39a, #18a884);
  color: #fff;
  box-shadow: 0 10px 18px rgba(24, 168, 132, 0.22);
  font-size: 16px;
  font-weight: 900;
}

.brand span {
  display: block;
  font-size: 18px;
}

.brand small {
  font-size: 10px;
  color: #8b8377;
}

.nav-links {
  gap: 18px;
  align-items: center;
}

.nav-links a {
  position: relative;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 8px 0;
  border-radius: 0;
  color: #3b3935;
  font-size: 13px;
  background: transparent;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
  transition: left 0.16s ease, right 0.16s ease;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--brand);
  background: transparent;
}

.nav-links a[aria-current="page"]::after,
.nav-links a:hover::after {
  left: 0;
  right: 0;
}

.wrap {
  max-width: 1240px;
  padding: 22px 20px 48px;
}

.home-wrap {
  display: grid;
  gap: 18px;
}

.home-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.hero,
.panel,
.tool-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.hero {
  min-height: 292px;
  padding: 0;
  overflow: hidden;
  background: var(--hero-bg);
}

.hero-layout {
  min-height: 292px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: center;
  padding: 34px 44px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.tool-kicker,
.preview-card__eyebrow {
  color: var(--brand);
  letter-spacing: 0;
}

.lead,
.tool-lead,
.section-copy {
  color: var(--muted);
}

.hero-checks {
  display: grid;
  gap: 11px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: #4a4640;
  font-size: 14px;
  font-weight: 700;
}

.hero-checks li {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hero-checks li::before,
.steps li::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex: none;
  background:
    linear-gradient(135deg, transparent 48%, #fff 48% 58%, transparent 58%),
    var(--brand);
  box-shadow: 0 6px 14px rgba(32, 184, 137, 0.18);
}

.home-visual {
  position: relative;
  min-height: 236px;
}

.home-visual__box {
  position: absolute;
  left: 96px;
  bottom: 22px;
  width: 134px;
  height: 104px;
  border-radius: 8px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.6), transparent 52%),
    linear-gradient(180deg, #43d6a4, #19b789);
  box-shadow: 0 20px 34px rgba(25, 183, 137, 0.24);
}

.home-visual__box::before {
  content: "";
  position: absolute;
  left: -20px;
  right: -20px;
  top: -28px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #72e2bf, #22bd91);
  transform: skewY(-10deg);
}

.home-visual__tile {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(34, 25, 18, 0.12);
}

.home-visual__tile--red {
  left: 176px;
  top: 18px;
  background: linear-gradient(145deg, #ff6b70, #ef3038);
  transform: rotate(-15deg);
}

.home-visual__tile--amber {
  right: 20px;
  top: 72px;
  background: linear-gradient(145deg, #ffc968, #ff9f1a);
  transform: rotate(14deg);
}

.home-visual__tile--green {
  left: 62px;
  top: 94px;
  background: linear-gradient(145deg, #72e2bf, #18b78b);
  transform: rotate(-24deg);
}

.deploy-panel {
  padding: 28px;
}

.steps {
  display: grid;
  gap: 15px;
  padding: 0;
  list-style: none;
  color: #5a554d;
}

.steps li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  line-height: 1.5;
}

.entry-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.entry {
  position: relative;
  min-height: 198px;
  padding: 22px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.entry::after {
  content: "";
  position: absolute;
  inset: auto -20px -46px 42%;
  height: 100px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  transform: rotate(-8deg);
}

.entry__icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 20px color-mix(in srgb, var(--brand) 24%, transparent);
  font-size: 18px;
  font-weight: 900;
}

.entry--pdd {
  --brand: #ff3f46;
}

.entry--jd {
  --brand: #ff7214;
}

.entry--mt {
  --brand: #f2b700;
}

.entry--coupon {
  --brand: #7c5cff;
}

.entry strong {
  position: relative;
  z-index: 1;
  font-size: 20px;
  margin-bottom: 10px;
}

.entry span:not(.entry__icon) {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.entry em {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 94px;
  min-height: 36px;
  margin-top: 20px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.entry em::after {
  content: "->";
  margin-left: 7px;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-soft);
}

.home-stats article {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-right: 1px solid var(--line);
}

.home-stats article:last-child {
  border-right: 0;
}

.home-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.home-stats strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.tool-stack,
.admin-stack {
  gap: 18px;
}

.tool-card {
  padding: 24px;
}

.tool-card--hero {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  background: var(--hero-bg);
}

.tool-card__head {
  position: relative;
  z-index: 1;
  align-items: stretch;
}

.tool-card__head > div:first-child {
  max-width: 680px;
}

.tool-card__side {
  min-width: 280px;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.tool-head-actions {
  align-items: center;
}

.tool-title {
  font-size: 38px;
  line-height: 1.12;
  margin-bottom: 10px;
}

.tool-notes {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.tool-notes span {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 18px rgba(45, 35, 22, 0.04);
}

.page-art {
  position: relative;
  width: 230px;
  height: 112px;
  align-self: end;
}

.page-art__main {
  position: absolute;
  right: 42px;
  bottom: 8px;
  width: 92px;
  height: 92px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  box-shadow: 0 22px 30px color-mix(in srgb, var(--brand) 25%, transparent);
  font-size: 34px;
  font-weight: 900;
}

.page-art--pdd .page-art__main {
  border-radius: 48px 48px 38px 38px;
}

.page-art--jd .page-art__main,
.page-art--mt .page-art__main {
  border-radius: 999px;
}

.page-art--coupon .page-art__main,
.page-art--admin .page-art__main {
  border-radius: 8px;
}

.page-art__coin,
.page-art__spark,
.page-art__route,
.page-art__paper {
  position: absolute;
  display: block;
}

.page-art__coin {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 5px solid #ffd166;
  background: #fff8d9;
}

.page-art__coin--one {
  right: 12px;
  top: 18px;
}

.page-art__coin--two {
  left: 44px;
  bottom: 26px;
}

.page-art__spark {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: #ffd166;
  transform: rotate(45deg);
}

.page-art__spark--one {
  left: 50px;
  top: 18px;
}

.page-art__spark--two {
  right: 0;
  bottom: 18px;
}

.page-art__route {
  width: 58px;
  height: 28px;
  border: 4px solid rgba(255, 114, 20, 0.26);
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 8px 0;
}

.page-art__route--one {
  left: 28px;
  top: 36px;
}

.page-art__route--two {
  right: 8px;
  bottom: 22px;
  transform: rotate(180deg);
}

.page-art__paper {
  width: 56px;
  height: 72px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, #fff);
  box-shadow: 0 12px 22px rgba(45, 35, 22, 0.08);
}

.page-art__paper::before,
.page-art__paper::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 28%, #fff);
}

.page-art__paper::before {
  top: 20px;
}

.page-art__paper::after {
  top: 36px;
}

.page-art__paper--one {
  left: 40px;
  bottom: 16px;
  transform: rotate(-12deg);
}

.page-art__paper--two {
  right: 16px;
  top: 10px;
  transform: rotate(14deg);
}

.tool-grid {
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
}

form[data-form],
form[data-coupon-form],
.admin-form {
  display: grid;
  gap: 14px;
}

label {
  color: #3f3b35;
  font-size: 13px;
}

input,
textarea,
select {
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

textarea {
  min-height: 118px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--brand) 50%, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent);
}

button,
.button {
  border-radius: 8px;
}

.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 18px color-mix(in srgb, var(--brand) 18%, transparent);
}

.secondary {
  background: rgba(255, 255, 255, 0.76);
  color: #33302b;
  border: 1px solid var(--line);
}

.danger {
  border: 1px solid #fecdd3;
}

.detect,
.empty,
.record-panel,
.locked-raw,
.result-card,
.coupon-shortcuts__item,
.preview-card,
.favorite-group,
.admin-table-wrap {
  border-radius: 8px;
}

.detect {
  background: #fff;
}

.pill,
.clock,
.tag,
.mini-tag {
  min-height: 28px;
  box-shadow: none;
}

.pill {
  background: var(--soft);
  color: var(--brand-2);
}

.tool-toolbar {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.stat-line {
  margin-bottom: 0;
}

.toolbar-subline {
  padding: 4px 0 8px;
}

.helper-copy {
  padding: 14px 16px;
  border: 1px dashed color-mix(in srgb, var(--brand) 26%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft) 45%, #fff);
}

.list {
  margin: 0;
  padding: 0;
}

.item {
  border-radius: 8px;
  border-color: var(--line);
  box-shadow: 0 8px 18px rgba(40, 31, 20, 0.04);
}

.item-progress {
  background: #f0ebe3;
}

.item-progress__bar {
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 62%, #fff));
}

.empty {
  min-height: 164px;
  display: grid;
  place-items: center;
  border-color: #eee4d7;
  color: #8d8375;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 253, 248, 0.95)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(0, 0, 0, 0.018) 12px 13px);
}

.coupon-shortcuts__grid {
  gap: 12px;
}

.coupon-shortcuts__item {
  min-height: 96px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(40, 31, 20, 0.04);
}

.result-avatar,
.item-avatar,
.empty-icon-circle {
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand-2);
}

.result-link--coupon {
  background: color-mix(in srgb, var(--soft) 46%, #fff);
  color: var(--brand-2);
}

.result-link--coupon:hover,
.result-link--mini:hover,
.item-links a:hover,
.coupon-shortcuts__item:hover {
  background: var(--soft);
  color: var(--brand-2);
}

.modal {
  border-radius: 8px;
}

.admin-stats {
  gap: 14px;
}

.stat-card {
  padding: 18px;
}

.stat-card__value {
  color: var(--ink);
}

.admin-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.admin-block + .admin-block {
  border-top-color: var(--line);
}

.preview-card,
.favorite-group {
  box-shadow: 0 8px 18px rgba(40, 31, 20, 0.04);
}

.admin-table th {
  background: #fbfaf7;
}

@media (max-width: 980px) {
  h1 {
    font-size: 38px;
  }

  .home-grid,
  .hero-layout,
  .tool-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .home-visual {
    min-height: 184px;
  }

  .tool-card__side {
    min-width: 0;
    justify-items: start;
  }

  .page-art {
    width: 210px;
  }

  .entry-grid,
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stats article:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .nav {
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    gap: 12px;
  }

  .wrap {
    padding: 16px 12px 34px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-layout {
    min-height: auto;
    padding: 24px;
  }

  .home-visual {
    display: none;
  }

  .entry-grid,
  .home-stats,
  .admin-stats,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .home-stats article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-stats article:last-child {
    border-bottom: 0;
  }

  .tool-card {
    padding: 18px;
  }

  .tool-card__head {
    display: grid;
  }

  .page-art {
    display: none;
  }

  .tool-title {
    font-size: 30px;
  }

  .tool-toolbar,
  .toolbar-subline,
  .used-section__head,
  .record-row,
  .section-head,
  .favorite-group__head {
    align-items: stretch;
  }

  .toolbar-actions,
  .tool-head-actions,
  .record-row__actions {
    justify-content: flex-start;
  }

  .item-actions {
    width: 100%;
  }
}

/* Reference fidelity pass */
.brand::before {
  grid-row: 1 / 3;
}

.brand span {
  grid-column: 2;
  grid-row: 1;
}

.brand small {
  grid-column: 2;
  grid-row: 2;
  margin-top: 3px;
}

.home-wrap h1 {
  max-width: 620px;
  font-size: 40px;
}

.hero-layout {
  min-height: 330px;
  padding: 28px 36px;
}

.hero-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
  margin-top: 16px;
}

.home-visual {
  width: 300px;
  min-height: 220px;
  justify-self: center;
  display: grid;
  place-items: center;
  background: none;
}

.home-visual > * {
  display: block;
}

.home-visual svg {
  width: 100%;
  max-height: 210px;
  filter: drop-shadow(0 22px 28px rgba(40, 32, 20, 0.12));
}

.entry {
  min-height: 190px;
  padding: 16px;
}

.entry__icon {
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  padding: 5px;
  background: var(--soft);
  box-shadow: none;
}

.entry__icon svg {
  width: 100%;
  height: 100%;
}

.entry--pdd .entry__icon {
  background: #fff1f2;
}

.entry--jd .entry__icon {
  background: #fff3e8;
}

.entry--mt .entry__icon {
  background: #fff7d6;
}

.entry--coupon .entry__icon {
  background: #f2efff;
}

.entry strong {
  font-size: 18px;
  margin-bottom: 8px;
}

.entry em {
  min-height: 32px;
  margin-top: 12px;
}

.tool-card--hero {
  min-height: 0;
  padding: 18px 24px;
}

.tool-title {
  font-size: 34px;
}

.tool-notes {
  margin-top: 12px;
}

.tool-notes span {
  min-height: 28px;
}

.page-art {
  width: 220px;
  height: 110px;
  display: grid;
  place-items: center;
  background: none;
}

.page-art:not(.page-art--admin) > * {
  display: block;
}

.page-art svg {
  width: 100%;
  max-height: 130px;
  filter: drop-shadow(0 20px 24px rgba(40, 32, 20, 0.13));
}

.coupon-shortcuts__item {
  position: relative;
  grid-template-columns: 38px minmax(0, 1fr);
  align-content: center;
  column-gap: 10px;
  min-height: 78px;
  padding: 12px;
}

.coupon-shortcuts__item::before {
  content: "券";
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 900;
}

.coupon-shortcuts__item:nth-child(1)::before {
  content: "小";
  background: #e9fbf5;
  color: #0f9f78;
}

.coupon-shortcuts__item:nth-child(2)::before {
  content: "网";
  background: #edf6ff;
  color: #1677d2;
}

.coupon-shortcuts__item:nth-child(3)::before {
  content: "津";
  background: #fff5dc;
  color: #d89500;
}

.coupon-shortcuts__item:nth-child(4)::before {
  content: "包";
  background: #fff0f1;
  color: #e33d49;
}

body[data-page="coupon"] textarea {
  min-height: 104px;
}

@media (max-width: 980px) {
  .home-wrap h1 {
    font-size: 36px;
  }

  .hero-checks {
    grid-template-columns: 1fr;
  }

  .home-visual {
    width: 360px;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  body {
    width: 100%;
    max-width: 100vw;
  }

  .nav {
    flex-direction: row;
    align-items: center;
    min-width: 0;
  }

  .brand {
    flex: none;
    min-width: 154px;
  }

  .nav-links {
    min-width: 0;
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .home-wrap h1 {
    font-size: 31px;
  }

  .hero-layout {
    padding: 22px;
  }

  .hero-checks {
    grid-template-columns: 1fr;
  }

  .tool-notes {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    max-width: calc(100vw - 72px);
    gap: 8px;
  }

  .tool-notes span {
    display: block;
    width: auto;
    max-width: calc(100vw - 72px);
    min-width: 0;
    min-height: 0;
    padding: 8px 10px;
    white-space: normal !important;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .tool-lead,
  .list-status,
  .cooldown-note {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .wrap,
  .tool-stack,
  .tool-grid,
  .tool-card,
  .tool-card__head,
  .tool-card__head > div,
  .tool-card__side,
  .toolbar-subline,
  .result-card,
  .coupon-shortcuts,
  .coupon-shortcuts__grid,
  .coupon-shortcuts__item {
    min-width: 0;
    max-width: 100%;
  }

  .wrap {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  body[data-page="coupon"] .tool-card {
    width: 100%;
    max-width: calc(100vw - 24px);
  }

  body[data-page="coupon"] .tool-card--hero {
    padding-bottom: 16px;
  }

  body[data-page="coupon"] .tool-lead {
    font-size: 14px;
    line-height: 1.6;
    max-width: calc(100vw - 72px);
  }

  body[data-page="coupon"] .tool-card__side {
    gap: 10px;
  }

  body[data-page="coupon"] .page-art {
    width: 160px;
    height: 88px;
    justify-self: center;
  }

  body[data-page="coupon"] .actions {
    gap: 8px;
  }

  body[data-page="coupon"] .actions button {
    flex: 1 1 auto;
  }

  body[data-page="coupon"] #btnQuery {
    flex-basis: 100%;
  }
}

/* 2026-07 new blue-green template theme */
:root {
  --bg: #f6f9fb;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #17212b;
  --muted: #687381;
  --line: #e8edf2;
  --brand: #19c8aa;
  --brand-2: #18a9f2;
  --soft: #e9fbf7;
  --warn: #fff6e9;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #f6fffc 54%, #eef9ff 100%);
  --shadow: 0 18px 48px rgba(31, 48, 72, 0.08);
  --shadow-soft: 0 8px 24px rgba(31, 48, 72, 0.06);
  --blue: #18a9f2;
  --blue-soft: #eef8ff;
  --danger: #ff5353;
  --warning: #ff9f1c;
  --success: #17b885;
  --purple: #8b6ff4;
}

body[data-platform="pdd"] {
  --brand: #ff5353;
  --brand-2: #ff9f1c;
  --soft: #fff0f0;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #fff8f5 46%, #fff1f3 100%);
}

body[data-platform="jd"] {
  --brand: #ff9f1c;
  --brand-2: #ff7a22;
  --soft: #fff6e9;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #fff9ef 50%, #fff4e8 100%);
}

body[data-platform="mt"] {
  --brand: #17b885;
  --brand-2: #19c8aa;
  --soft: #e9fbf7;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #fffbeb 50%, #fff3c4 100%);
}

body[data-page="coupon"] {
  --brand: #8b6ff4;
  --brand-2: #18a9f2;
  --soft: #f2efff;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #f7f3ff 54%, #edf6ff 100%);
}

body[data-page="admin"] {
  --brand: #19c8aa;
  --brand-2: #18a9f2;
  --soft: #e9fbf7;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #effdff 52%, #ecfff7 100%);
}

html {
  background: #f4f8fb;
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(25, 200, 170, 0.08), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(24, 169, 242, 0.08), transparent 28%),
    linear-gradient(180deg, #f9fbfc 0%, #f4f8fb 100%);
  color: var(--ink);
}

.site-header {
  background: rgba(255, 255, 255, 0.84);
  border-bottom-color: rgba(216, 226, 234, 0.75);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.nav {
  max-width: 1280px;
  padding: 18px 28px;
  gap: 24px;
}

.brand {
  position: relative;
  grid-template-columns: 56px minmax(0, 1fr);
  min-width: 240px;
}

.brand::before {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Crect x='10' y='12' width='24' height='18' rx='7' fill='none' stroke='white' stroke-width='3'/%3E%3Cpath d='M20 27h10l-10 8z' fill='white'/%3E%3C/svg%3E") center / 38px 38px no-repeat,
    linear-gradient(135deg, #19c8aa, #18a9f2);
  box-shadow: 0 10px 24px rgba(24, 169, 242, 0.18);
  grid-row: 1 / 3;
}

.brand::after {
  display: none;
}

.brand-logo-img {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(24, 169, 242, 0.18);
}

.brand--custom-logo::before {
  display: none;
}

.brand--custom-logo::after {
  display: none;
}

.brand span {
  font-size: 24px;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.nav-links {
  gap: 8px;
}

.nav-links a {
  padding: 12px 17px;
  border-radius: 16px;
  color: #354151;
  font-size: 16px;
  font-weight: 750;
}

.nav-links a::after {
  left: 14px;
  right: 14px;
  bottom: -18px;
  height: 3px;
  background: linear-gradient(90deg, #19c8aa, #18a9f2);
  opacity: 0;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: #078e7a;
  background: #e9fbf7;
}

.nav-links a[aria-current="page"]::after,
.nav-links a:hover::after {
  left: 14px;
  right: 14px;
  opacity: 1;
}

.wrap {
  max-width: 1280px;
  padding: 28px;
}

.hero,
.panel,
.tool-card,
.stat-card,
.preview-card,
.favorite-group,
.admin-table-wrap,
.result-card,
.coupon-shortcuts__item,
.modal {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.hero,
.tool-card--hero {
  border-radius: 22px;
  background: var(--hero-bg);
}

.hero-layout {
  min-height: 300px;
  padding: 44px 42px;
}

.tool-card--hero {
  padding: 28px 32px;
}

.hero-checks,
.steps,
.tool-lead,
.lead,
.section-copy,
.helper-copy,
.cooldown-note,
.list-status,
.item-meta,
.record-row__label,
label {
  color: var(--muted);
}

.eyebrow,
.tool-kicker,
.preview-card__eyebrow,
.status-ok {
  color: #078e7a;
}

.hero-checks {
  color: #41505f;
}

.hero-checks li::before,
.steps li::before {
  background:
    linear-gradient(135deg, transparent 48%, #ffffff 48% 58%, transparent 58%),
    #19c8aa;
  box-shadow: 0 6px 14px rgba(25, 200, 170, 0.16);
}

.entry,
.tool-card,
.stat-card,
.preview-card,
.favorite-group,
.coupon-shortcuts__item,
.result-card,
.record-panel,
.item,
.modal,
.detect,
.empty,
.locked-raw {
  border-radius: 20px;
}

.entry {
  min-height: 210px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
}

.entry::after {
  background: linear-gradient(135deg, rgba(25, 200, 170, 0.08), rgba(24, 169, 242, 0.1));
}

.entry--pdd {
  --brand: #ff5353;
}

.entry--jd {
  --brand: #ff9f1c;
}

.entry--mt {
  --brand: #17b885;
}

.entry--coupon {
  --brand: #8b6ff4;
}

.entry__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--brand) 12%, #ffffff);
}

.entry em,
.primary,
.button.primary {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 14px 24px color-mix(in srgb, var(--brand) 18%, transparent);
}

body[data-page="home"] .entry--mt em,
body[data-platform="mt"] .primary {
  background: linear-gradient(135deg, #19c8aa, #18a9f2);
}

body[data-page="home"] .entry--pdd em,
body[data-platform="pdd"] .primary {
  background: linear-gradient(135deg, #ff6b6b, #ff9f1c);
}

body[data-page="home"] .entry--jd em,
body[data-platform="jd"] .primary {
  background: linear-gradient(135deg, #ffb438, #ff7a22);
}

body[data-page="home"] .entry--coupon em,
body[data-page="coupon"] .primary {
  background: linear-gradient(135deg, #8b6ff4, #18a9f2);
}

.secondary,
.danger,
.chip,
.segmented,
.toggle,
.clock,
.pill,
.mini-tag,
.item-links a {
  border-color: var(--line);
  background: #f6f8fa;
  color: #354151;
}

.secondary:hover,
.chip:hover,
.item-links a:hover,
.coupon-shortcuts__item:hover {
  border-color: rgba(25, 200, 170, 0.24);
  background: #e9fbf7;
  color: #078e7a;
}

.pill,
.chip--active,
.segmented__item.is-active,
.detect--ok,
.tag--green {
  background: #e9fbf7;
  color: #078e7a;
}

.pill--muted {
  background: #eef8ff;
  color: #1278b8;
}

input,
textarea,
select {
  border-color: #dfe7ed;
  border-radius: 13px;
  background: #ffffff;
  color: #25313d;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(25, 200, 170, 0.8);
  box-shadow: 0 0 0 4px rgba(25, 200, 170, 0.12);
}

.detect,
.helper-copy,
.empty,
.record-panel {
  border-color: #dce6ec;
  background: #fbfdfd;
  color: var(--muted);
}

.empty {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(251, 253, 253, 0.96)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(24, 169, 242, 0.018) 12px 13px);
}

.home-stats {
  border-radius: 20px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.home-stats span,
.stat-card__label {
  color: var(--muted);
}

.stat-card__value,
.home-stats strong {
  color: var(--ink);
}

.page-art svg,
.home-visual svg {
  filter: drop-shadow(0 22px 28px rgba(24, 169, 242, 0.12));
}

.coupon-shortcuts__item::before,
.result-avatar,
.item-avatar,
.empty-icon-circle {
  border-radius: 14px;
  background: #e9fbf7;
  color: #078e7a;
}

.coupon-shortcuts__item:nth-child(1)::before {
  background: #e9fbf7;
  color: #078e7a;
}

.coupon-shortcuts__item:nth-child(2)::before {
  background: #eef8ff;
  color: #1278b8;
}

.coupon-shortcuts__item:nth-child(3)::before {
  background: #fff6e9;
  color: #d16c00;
}

.coupon-shortcuts__item:nth-child(4)::before {
  background: #fff0f0;
  color: #f04444;
}

.result-link--coupon {
  background: color-mix(in srgb, var(--soft) 50%, #ffffff);
  color: var(--brand);
}

.result-link--mini {
  background: #eef8ff;
  color: #1278b8;
}

.coupon-badge {
  background: color-mix(in srgb, var(--soft) 62%, #ffffff);
  border-color: color-mix(in srgb, var(--brand) 24%, #ffffff);
  color: var(--brand);
}

.error-banner,
.detect--warn,
.coupon-badge.no-coupon {
  border-color: #ffe0b2;
  background: #fff6e9;
  color: #d16c00;
}

.toast.success {
  background: linear-gradient(135deg, #19c8aa, #18a9f2);
}

.toast.error {
  background: linear-gradient(135deg, #ff6b6b, #ff9f1c);
}

.admin-table th {
  background: #f6f8fa;
  color: #728092;
}

.admin-table td {
  color: #45515e;
}

.logo-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px dashed #dce6ec;
  border-radius: 18px;
  background: #fbfdfd;
}

.logo-upload__preview {
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #19c8aa, #18a9f2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.logo-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-upload__button {
  width: max-content;
}

.banner-admin-list {
  display: grid;
  gap: 14px;
}

.banner-admin-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fcfefe;
  display: grid;
  gap: 14px;
}

.banner-admin-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.banner-admin-card__head strong {
  font-size: 16px;
}

.banner-admin-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.banner-admin-preview {
  width: 100%;
  aspect-ratio: 16 / 6.2;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(135deg, rgba(25, 214, 163, 0.10), rgba(22, 140, 255, 0.10)),
    #f7fbfd center / cover no-repeat;
  position: relative;
}

.banner-admin-preview::after {
  content: attr(data-preview-title);
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.55);
}

.banner-admin-preview--empty::before {
  content: "等待上传轮播图";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #678094;
  font-size: 13px;
  font-weight: 800;
}

.banner-admin-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.banner-admin-actions .logo-upload__preview {
  width: 108px;
  height: 68px;
  border-radius: 14px;
  background: #eef5f8;
  color: #678094;
}

.banner-admin-actions .logo-upload__preview img {
  object-fit: cover;
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .nav {
    display: block;
    padding: 14px 16px;
    overflow: hidden;
  }

  .brand {
    min-width: 0;
  }

  .brand::before {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand span {
    font-size: 21px;
  }

  .brand small {
    font-size: 11px;
  }

  .nav-links {
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .nav-links a {
    padding: 9px 12px;
    font-size: 15px;
  }

  .nav-links a::after {
    display: none;
  }

  .wrap {
    padding: 16px;
    overflow: hidden;
  }

  .hero,
  .tool-card--hero {
    border-radius: 18px;
  }

  .tool-card,
  .entry,
  .panel,
  .stat-card,
  .result-card,
  .coupon-shortcuts__item {
    border-radius: 18px;
  }

  .tool-card__head,
  .tool-card__head > div,
  .tool-card__side,
  .tool-lead,
  .tool-notes,
  .tool-notes span,
  .form-row,
  textarea,
  input,
  select,
  .detect {
    width: 100%;
    max-width: 100%;
  }

  body[data-page="coupon"] .tool-card {
    width: auto !important;
    max-width: 100% !important;
  }

  body[data-page="coupon"] .tool-lead,
  body[data-page="coupon"] .tool-notes,
  body[data-page="coupon"] .tool-notes span {
    max-width: 100%;
  }

  body[data-page="coupon"] .tool-card--hero,
  body[data-page="coupon"] .tool-card--hero * {
    min-width: 0;
  }

  .logo-upload {
    align-items: flex-start;
  }

  .tool-lead,
  .tool-notes span,
  textarea::placeholder,
  input::placeholder {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
