:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #e4e4e4;
  --accent: #111111;
  --accent-text: #ffffff;
  --error: #b42318;
  --success: #067647;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10;
    --surface: #18181a;
    --text: #f2f2f2;
    --muted: #9a9a9a;
    --border: #2a2a2d;
    --accent: #f2f2f2;
    --accent-text: #111111;
    --error: #f97066;
    --success: #47cd89;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.top {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { font-weight: 600; }

.lang { display: flex; gap: 4px; }
.lang button {
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.lang button.active { color: var(--text); border-color: var(--border); }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.featured {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 40px;
}
.featured-title {
  margin: 0;
  font-size: clamp(24px, 6vw, 40px);
  line-height: 1.2;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.featured-domain { font-weight: 700; }
.featured-price { font-size: 22px; margin: 8px 0 24px; color: var(--muted); }

.list-title { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.item-name { font-weight: 600; overflow-wrap: anywhere; }
.item-price { color: var(--muted); }

@media (max-width: 480px) {
  .item { grid-template-columns: 1fr auto; }
  .item .btn { grid-column: 1 / -1; }
}

.offer-form { display: grid; gap: 12px; }
.field { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.field input, .field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.btn {
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: none; color: var(--text); border-color: var(--border); padding: 6px 12px; font-size: 14px; }

.status { margin: 0; color: var(--error); font-size: 14px; }
.status:empty { display: none; }
.thanks { margin: 0; color: var(--success); }
.note { color: var(--muted); font-size: 14px; margin-top: 32px; }

.dialog {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 24px;
}
.dialog::backdrop { background: rgb(0 0 0 / .5); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dialog-head h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.close { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
