:root {
  color-scheme: light;
  --ink: #141d32;
  --muted: #515e75;
  --line: #dfe5ef;
  --paper: #fff;
  --base: #f5f7fb;
  --accent: #3456de;
  --accent-hover: #2846bf;
  --accent-soft: #e8efff;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--base);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; }
h1, h2, p { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #5374ff; outline-offset: 3px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.mark { flex: 0 0 auto; display: block; width: 2rem; height: 2rem; }

.sale-body {
  background: radial-gradient(ellipse at 17% 20%, #e4edff 0, transparent 48%), var(--base);
}
.sale-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(1rem, 5vw, 4rem);
}
.sale-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  width: min(100%, 76rem);
  min-height: min(32rem, 80vh);
  margin: auto;
  padding: clamp(1.5rem, 6vw, 5rem);
  border: 1px solid #dce5fa;
  border-radius: 2rem;
  background: linear-gradient(126deg, #f9fbff 6%, #eef3ff 58%, #e9edff 100%);
  box-shadow: 0 1.7rem 5rem -3.5rem #233f89;
}
.sale-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -9rem -18rem auto;
  width: min(55rem, 75vw);
  aspect-ratio: 1;
  border: 1px solid #b9c7f0;
  border-radius: 50%;
  box-shadow: 0 0 0 4rem #d4def660, 0 0 0 8rem #dbe5fa80;
  pointer-events: none;
}
.sale-hero { min-width: 0; }
.sale-label {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: #263c74;
  font-size: .9rem;
  font-weight: 650;
}
.sale-hero h1 {
  margin: 1.05rem 0 1rem;
  font-size: clamp(2.5rem, 6.8vw, 6.1rem);
  line-height: 1;
  letter-spacing: -.066em;
  overflow-wrap: anywhere;
}
.sale-hero h1 span { color: var(--accent); }
.sale-description {
  max-width: 39rem;
  color: #465571;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.sale-card {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #dce4f6;
  border-radius: 1.35rem;
  background: var(--paper);
  box-shadow: 0 1rem 2.4rem -1.6rem #2c448c70;
}
.sale-price { display: grid; gap: .32rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.sale-price span { color: var(--muted); font-size: .875rem; font-weight: 600; }
.sale-price strong { font-size: clamp(1.4rem, 2.9vw, 2.05rem); line-height: 1.15; overflow-wrap: anywhere; }
.sale-card h2 { margin: 1.2rem 0 .72rem; font-size: 1rem; }
.contact-list { display: grid; gap: .55rem; }
.contact-row {
  width: 100%;
  min-height: 3.55rem;
  display: flex;
  align-items: center;
  gap: .68rem;
  padding: .62rem .76rem;
  border: 1px solid var(--line);
  border-radius: .72rem;
  color: var(--ink);
  background: #f9fbff;
  text-align: left;
  text-decoration: none;
}
.contact-row:hover { border-color: #9eb2f5; background: #f0f4ff; }
.contact-icon { width: 1.27rem; height: 1.27rem; flex: 0 0 auto; color: var(--accent); }
.contact-text { min-width: 0; display: grid; gap: .12rem; }
.contact-text strong { font-size: .9rem; font-weight: 650; }
.contact-text span { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.copy-label { margin-left: auto; color: var(--accent); font-size: .875rem; font-weight: 650; }
.copy-feedback { margin-top: .6rem; color: #234388; font-size: .875rem; }
.preview-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .55rem;
  padding: .8rem clamp(1rem, 5vw, 4rem);
  border-bottom: 1px solid #c9d6fb;
  background: #e7eeff;
  color: #20336d;
  font-size: .9rem;
  font-weight: 650;
}
.preview-banner + .sale-shell { min-height: calc(100vh - 3rem); }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner, .admin-shell { width: min(calc(100% - 2rem), 76rem); margin-inline: auto; }
.topbar-inner { min-height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-brand { display: inline-flex; gap: .65rem; align-items: center; color: var(--ink); font-weight: 700; text-decoration: none; }
.admin-shell { padding: 2.75rem 0 3rem; }
.admin-footer { width: min(calc(100% - 2rem), 76rem); margin: 0 auto 1.5rem; color: var(--muted); font-size: .8rem; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.page-heading h1, .auth-card h1 { font-size: clamp(1.65rem, 4vw, 2.25rem); letter-spacing: -.045em; }
.page-heading p { margin-top: .42rem; color: var(--muted); overflow-wrap: anywhere; }
.panel { border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; margin-bottom: 1.2rem; }
.stat { display: grid; gap: .28rem; padding: clamp(.62rem, 2vw, 1.1rem); }
.stat span { color: var(--muted); font-size: .875rem; }
.stat strong { font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.03em; }
.button {
  display: inline-flex;
  min-height: 2.65rem;
  justify-content: center;
  align-items: center;
  padding: .55rem .91rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }
.secondary { border-color: var(--line); background: var(--paper); color: var(--ink); }
.secondary:hover { border-color: #a8b7d7; background: #f7f9fe; }
.quiet { padding: .4rem .2rem; border: 0; color: var(--muted); background: transparent; font-size: .9rem; }
.quiet:hover { color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: .65rem; padding: 1rem; }
.filters label:first-child { flex: 1 1 15rem; }
label { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  padding: .65rem .72rem;
  border: 1px solid #cbd5e5;
  border-radius: .52rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}
input::placeholder, textarea::placeholder { color: #637089; }
textarea { resize: vertical; }
label small { color: var(--muted); line-height: 1.45; font-weight: 400; font-size: .82rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 35rem; }
th, td { padding: .86rem 1rem; border-top: 1px solid var(--line); font-size: .9rem; }
thead { background: #f8faff; color: var(--muted); }
.domain-link { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.domain-link:hover { text-decoration: underline; }
.status { display: inline-block; border-radius: 1rem; padding: .22rem .63rem; font-size: .85rem; white-space: nowrap; }
.status--published { color: #175842; background: #e0f4e9; }
.status--draft { color: #495669; background: #edf0f5; }
.row-actions { white-space: nowrap; }
.row-actions a + a { margin-left: .8rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; padding: .8rem 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.pagination div { display: flex; gap: .5rem; }
.empty { padding: 2.6rem 1.2rem; text-align: center; border-top: 1px solid var(--line); }
.empty h2 { margin-bottom: .6rem; font-size: 1.05rem; }
.back-link { display: inline-block; margin-bottom: 1rem; font-size: .875rem; }
.editor { display: grid; gap: 1rem; }
.form-panel { padding: clamp(1rem, 3vw, 1.55rem); }
.form-panel h2 { margin-bottom: .9rem; font-size: 1.15rem; }
.form-panel p { margin: -.45rem 0 .95rem; font-size: .9rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.span-full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.delete-panel { margin-top: 2rem; padding: 1rem 0; border-top: 1px solid var(--line); color: #9d263c; }
.delete-panel summary { width: fit-content; cursor: pointer; font-weight: 650; }
.delete-panel p { margin: .7rem 0; color: var(--muted); }
.delete-panel form { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.check { flex-direction: row; align-items: center; }
.check input { width: auto; }
.danger { color: #a02138; border-color: #e5acb8; background: #fff; }
.danger:hover { background: #fff0f2; }
.alert, .success { margin: .65rem 0 1rem; padding: .8rem .9rem; border-radius: .55rem; font-size: .9rem; }
.alert { color: #91253b; background: #ffedf0; }
.success { color: #1d604b; background: #e6f5ed; }
.auth-card, .message { width: min(calc(100% - 2rem), 29rem); margin: clamp(1rem, 8vh, 5rem) auto; padding: clamp(1.15rem, 4vw, 2.1rem); }
.auth-card p, .message p { margin-top: .7rem; line-height: 1.55; }
.auth-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.message .button { margin-top: 1rem; }

@media (max-width: 49rem) {
  .sale-frame { grid-template-columns: minmax(0,1fr); min-height: 0; border-radius: 1.4rem; }
  .sale-shell { align-items: center; }
  .sale-hero h1 { font-size: clamp(2.5rem, 10vw, 4.65rem); }
}
@media (max-width: 33rem) {
  .admin-shell { padding-top: 1.8rem; }
  .field-grid { grid-template-columns: 1fr; }
  .button { font-size: .92rem; }
  .sale-card { border-radius: 1rem; }
  .sale-frame::before { opacity: .5; }
}

