:root {
  --brand: #e63652;
  --brand-dark: #b71f3a;
  --ink: #202124;
  --muted: #626a73;
  --line: #e7e9ee;
  --panel: #ffffff;
  --bg: #f6f7f9;
  --ok: #1f8f55;
  --danger: #cf2e2e;
  --shadow: 0 10px 30px rgba(20, 24, 32, 0.08);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
a { color: inherit; }
button, input { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px clamp(14px, 4vw, 34px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  color: var(--brand-dark);
}
.brand img { border-radius: 8px; }

.search-wrap input,
.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  outline: none;
}
.search-wrap input:focus,
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230, 54, 82, .14); }

.button, button, .details {
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}
.button.ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--line); }
button.secondary { background: #eef0f4; color: var(--ink); }
button.danger { background: var(--danger); }
button:disabled { opacity: .55; cursor: not-allowed; }

.empty {
  grid-column: 1 / -1;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.error { color: var(--danger); }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.bottom-nav a,
.bottom-nav button {
  min-width: 106px;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  border: 0;
}
.bottom-nav .active,
.bottom-nav a:hover,
.bottom-nav button:hover { background: #fff0f3; color: var(--brand-dark); }

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; }
  .search-wrap { grid-column: 1 / -1; order: 3; }
  .bottom-nav { width: calc(100% - 24px); justify-content: space-between; }
  .bottom-nav a, .bottom-nav button { min-width: 0; flex: 1; }
}
