:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #16201b;
  --muted: #65716b;
  --line: #d9e3dd;
  --accent: #0f8f66;
  --accent-dark: #087453;
  --soft: #eaf6f1;
  --warning: #a9680d;
  --danger: #a33b32;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
.topbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 max(16px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { color: var(--ink); font-size: 19px; font-weight: 850; text-decoration: none; }
.top-actions, .language { display: flex; align-items: center; gap: 12px; }
.environment { color: var(--muted); font-size: 13px; }
.language { gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.language a { min-width: 34px; min-height: 30px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.quiet-button, .icon-button { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.quiet-button { min-height: 36px; padding: 0 12px; font-weight: 750; }
.icon-button { width: 42px; height: 42px; font-size: 22px; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 48px; }
.intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 20px; }
.intro h1 { margin: 2px 0 8px; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; }
.intro p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 0; color: var(--accent); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.state-panel, .auth-panel { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.state-panel { color: var(--muted); text-align: center; }
.auth-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.auth-panel h2 { margin: 0 0 6px; }
.auth-panel p { margin: 0; color: var(--muted); }
.primary-link, .primary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 0 16px; background: var(--accent); color: #fff; font-weight: 850; text-decoration: none; cursor: pointer; }
.primary-link:hover, .primary-button:hover { background: var(--accent-dark); }
.workspace { display: grid; grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); gap: 18px; align-items: start; }
.create-panel, .lots-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.create-panel { position: sticky; top: 16px; padding: 18px; }
.lots-panel { padding: 18px; min-height: 500px; }
.panel-heading { min-height: 45px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 21px; }
.account-name, .count { color: var(--muted); font-size: 12px; font-weight: 750; }
.limit-line { margin-bottom: 14px; padding: 9px 11px; border-radius: 8px; background: var(--soft); color: #176247; font-size: 12px; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
input, textarea, select { width: 100%; min-height: 42px; border: 1px solid #cfdad4; border-radius: 8px; padding: 9px 10px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
.photo-field small { font-weight: 500; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feedback { min-height: 18px; color: #176247; font-size: 12px; }
.feedback.error { color: var(--danger); }
.auction-list { display: grid; gap: 12px; }
.empty { padding: 48px 18px; border: 1px dashed #c8d5ce; border-radius: 8px; color: var(--muted); text-align: center; }
.auction-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.auction-photo, .photo-placeholder { width: 150px; height: 100%; min-height: 220px; object-fit: cover; background: #edf2ef; }
.photo-placeholder { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.auction-body { min-width: 0; padding: 15px; }
.auction-head, .price-line, .bid-actions, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; background: var(--soft); color: #176247; font-size: 11px; font-weight: 850; }
.status.finished { background: #eef0ef; color: var(--muted); }
.auction-card h3 { margin: 10px 0 5px; font-size: 20px; }
.description { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }
.price { font-size: 24px; font-weight: 850; }
.leader, .ends { color: var(--muted); font-size: 12px; }
.bid-actions { align-items: end; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.bid-actions label { flex: 1; }
.bid-actions .amount { max-width: 145px; }
.bid-button { min-height: 42px; border: 0; border-radius: 8px; padding: 0 14px; background: var(--ink); color: #fff; font-weight: 800; cursor: pointer; }
.blitz-button { min-height: 38px; border: 1px solid #e2c18f; border-radius: 8px; padding: 0 12px; background: #fff8ec; color: var(--warning); font-weight: 800; cursor: pointer; }
.card-footer { margin-top: 11px; }
.finish-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; text-decoration: underline; cursor: pointer; }
.card-feedback { min-height: 16px; color: var(--danger); font-size: 12px; }
button:disabled { opacity: .55; cursor: wait; }

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .create-panel { position: static; }
}
@media (max-width: 560px) {
  .environment { display: none; }
  .shell { width: min(100% - 20px, 1180px); padding-top: 18px; }
  .intro { position: relative; display: block; padding-right: 52px; }
  .intro .icon-button { position: absolute; top: 0; right: 0; }
  .intro h1 { font-size: 30px; }
  .auth-panel { align-items: stretch; flex-direction: column; }
  .auction-card { grid-template-columns: 1fr; }
  .auction-photo, .photo-placeholder { width: 100%; height: 190px; min-height: 0; }
  .bid-actions { align-items: stretch; flex-direction: column; }
  .bid-actions .amount { max-width: none; }
  .bid-button { width: 100%; }
}
