:root {
  --ink: #222;
  --wine: #8b3d4a;
  --wine-soft: #d7a8af;
  --cream: #f3f3f3;
  --paper: #ffffff;
  --rail: #ffffff;
  --gold: #666;
  --line: #d8d8d8;
  --muted: #555;
  --font: Arial, Helvetica, "Liberation Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
}

a { color: var(--wine); }
h1, h2, .brand, .price {
  font-family: var(--font);
  font-weight: 700;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.bar-clock {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.bar-clock #bar-date { color: var(--wine); font-weight: 600; }
.bar-clock #bar-time { font-weight: 700; color: var(--ink); }
.bar-clock #bar-weather { font-weight: 600; color: var(--ink); }
.sep {
  width: 1px;
  height: 14px;
  background: var(--line);
  display: inline-block;
}
.bar-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.bar-nav .btn { min-width: 118px; text-align: center; }

.page { display: flex; min-height: calc(100vh - 52px); }

.rail {
  width: 236px;
  flex: 0 0 236px;
  background: var(--rail);
  padding: 22px 16px 32px;
  border-right: 1px solid var(--line);
}
.brand { display: block; text-align: center; }
.brand img {
  width: 158px;
  height: 158px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.cats { margin-top: 20px; display: grid; gap: 3px; }
.cats-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}
.cats a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.cats a:hover, .cats a.is-on { background: #f3f0f2; color: var(--wine); }

.shell { flex: 1; min-width: 0; padding: 28px 36px 20px; }
.pagehead { margin-bottom: 24px; }
.eyebrow {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--gold);
}
.pagehead h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.who { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-block;
  background: var(--wine);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: 700 13px var(--font);
  cursor: pointer;
}
.btn.ghost { background: #fff; color: var(--wine); box-shadow: inset 0 0 0 1px var(--line); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.card-photo { position: relative; height: 170px; background: #f2f4f6; }
.card-photo img, .ph, .ph.tall {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.ph.tall { min-height: 280px; }
.timer {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}
.card-body { padding: 10px 12px 12px; }
.card-body h2 { margin: 4px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.meta { margin: 0; color: var(--muted); font-size: 13px; }
.price { margin: 0; color: #b00020; font-size: 18px; font-weight: 700; }
.price.big { font-size: 26px; }

.detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}
.gallery { display: grid; gap: 10px; }
.gallery img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
.bidbox, .form, .prose {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.clock { font-size: 16px; font-weight: 700; }
.bidform, .form { display: grid; gap: 12px; }
.form.slim { max-width: 420px; }
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, select, textarea {
  font: 15px var(--font);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.hint, .empty { color: var(--muted); }
.err { color: #9c1c2a; }
.ok { color: #1b6b3a; font-weight: 700; }
.form .btn { margin-bottom: 72px; }
.ended { font-weight: 700; }
.bids { padding-left: 18px; }
.chat { margin-top: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.chat h2 { margin: 0 0 8px; }
.chat-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  margin: 14px 0;
  padding-right: 4px;
}
.chat-msg {
  background: #f6f7f9;
  border-radius: 12px;
  padding: 10px 12px;
}
.chat-msg.is-mine { background: #f3eef0; }
.chat-meta { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.chat-body { margin: 0; white-space: pre-wrap; word-break: break-word; }
.chat-form { display: grid; gap: 10px; }
.chat-form textarea { resize: vertical; min-height: 68px; }
.foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.pager {
  margin: 22px 0 8px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.legal h2 { font-size: 22px; margin: 22px 0 8px; }
.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { width: auto; margin-top: 3px; }

.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(40, 40, 50, 0.08);
}
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  max-width: 460px;
}
.cookie-form { display: grid; gap: 12px; }
.cookie-form h2 { margin: 0; }

@media (max-width: 860px) {
  .page { display: block; }
  .bar { flex-direction: column; align-items: stretch; }
  .rail { width: auto; }
  .brand img { width: 120px; height: 120px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .shell { padding: 18px; }
  .pagehead h1 { font-size: 22px; }
  .detail, .row { grid-template-columns: 1fr; }
}
