:root {
  --bg: #fff8fb;
  --card: #ffffff;
  --ink: #2b2332;
  --muted: #7b6f80;
  --line: #f0d9e6;
  --accent: #ef5da8;
  --accent-strong: #ff7fbd;
  --ok: #1ba975;
  --warn: #c8891e;
  --bad: #d43775;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -20%, rgba(239, 93, 168, 0.18) 0%, transparent 36%),
    radial-gradient(circle at 90% 0%, rgba(255, 188, 220, 0.25) 0%, transparent 42%),
    var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  gap: 0.2rem;
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #fff, #ffeaf4);
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.brand-home-link {
  cursor: pointer;
  margin: 0;
  font-size: 1rem;
}

.controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.role-sidebar {
  position: fixed;
  top: 62px;
  left: 0;
  width: 220px;
  height: calc(100vh - 62px);
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 0.7rem;
  z-index: 4;
}

.role-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.role-sidebar-nav a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  background: #fff8fb;
}

body.with-sidebar main {
  margin-left: 230px;
  max-width: calc(1200px - 230px);
}

.top-search-row {
  display: flex;
  justify-content: center;
}

.top-search-input {
  width: min(560px, 92vw);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.links a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: #fff;
}

.links .nav-logout-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: #fff;
  color: var(--ink);
}

.links a.active {
  border-color: var(--accent);
  background: #ffe6f2;
}

.auth-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  position: relative;
}

.ghost-btn {
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(90, 36, 73, 0.18);
  padding: 0.6rem;
  display: grid;
  gap: 0.35rem;
}

.auth-dropdown a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

main {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem 2rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 0.9rem;
  box-shadow: 0 8px 20px rgba(170, 109, 143, 0.12);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  animation: fadeUp 500ms ease;
}

.hero-card {
  min-height: 170px;
  background: linear-gradient(140deg, #fff, #ffe7f2);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.78rem;
}

.store-section {
  margin-top: 0.8rem;
}

.store-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.cuisine-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.cuisine-filters button {
  border-radius: 999px;
}

.cuisine-filters button.active {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 2px rgba(239, 93, 168, 0.2);
}

.zone-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.store-grid {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.store-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
  transition: transform 180ms ease, border-color 180ms ease;
}

.store-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-strong);
}

.store-card.closed-store {
  opacity: 0.75;
}

.store-card.closed-store img {
  filter: grayscale(1);
}

.store-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0.8rem;
  align-items: center;
}

.store-row img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
}

.meta-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  margin-top: 0.45rem;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line);
}

.badge.open {
  border-color: var(--ok);
  color: var(--ok);
}

.badge.closed {
  border-color: var(--bad);
  color: var(--bad);
}

.grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

button,
select,
textarea,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff0f7, #ffe3f0);
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 2px rgba(239, 93, 168, 0.2);
}

textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--ink);
  background: #fff;
}

select,
input {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.35rem 0.45rem;
}

.feedback {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fff7fb;
  color: var(--ink);
}

.feedback.ok {
  border-left-color: var(--ok);
}

.feedback.warn {
  border-left-color: var(--warn);
}

.feedback.bad {
  border-left-color: var(--bad);
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(43, 35, 50, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.legal-modal-card {
  width: min(760px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 30px rgba(43, 35, 50, 0.25);
  padding: 1rem;
}

.legal-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8fb;
  padding: 0.65rem;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  margin-bottom: 0.6rem;
}

.qr-image {
  width: 220px;
  height: 220px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0.45rem 0 0.6rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  max-height: 220px;
  overflow: auto;
}

@media (max-width: 760px) {
  .title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-row {
    grid-template-columns: 1fr;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
