:root {
  --bg: #f7f3ea;
  --ink: #16211e;
  --muted: #6c746c;
  --green: #0f5f54;
  --green-2: #174d45;
  --coral: #ef7b45;
  --gold: #f5c15b;
  --blue: #376b87;
  --surface: #fffdf8;
  --line: #e5dccd;
  --shadow: 0 20px 60px rgba(31, 46, 39, 0.16);
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(239, 123, 69, 0.16), transparent 28rem),
    linear-gradient(180deg, #eaf2ed 0%, var(--bg) 38%, #efe6d8 100%);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

select,
.admin-form input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline-color: var(--green);
  background: #fffaf0;
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 16px 96px;
  background: linear-gradient(180deg, rgba(247, 243, 234, 0.7), rgba(247, 243, 234, 0.96));
}

.hero {
  margin: 0 -16px;
  padding: 18px 16px 16px;
  color: #fffdf8;
  background:
    linear-gradient(145deg, rgba(15, 95, 84, 0.94), rgba(23, 77, 69, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 36px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.topbar,
.card-head,
.drawer-head,
.drawer-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.location,
.micro {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 8px 0 4px;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.hero p {
  margin-bottom: 0;
  color: rgba(255, 253, 248, 0.78);
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(8, 43, 38, 0.32);
}

.controls {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 -16px;
  padding: 12px 16px 10px;
  background: rgba(247, 243, 234, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 220, 205, 0.72);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 46, 39, 0.07);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.segments {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.segments::-webkit-scrollbar {
  display: none;
}

.segment,
.primary,
.secondary,
.text-button,
.icon-button,
.save,
.nav-item {
  border: 0;
  cursor: pointer;
}

.segment {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.segment[aria-selected="true"] {
  border-color: var(--green);
  background: var(--green);
  color: #fffdf8;
}

.summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 2px 9px;
  color: var(--muted);
}

.summary strong {
  color: var(--green);
  font-size: 28px;
}

.cards {
  display: grid;
  gap: 12px;
}

.venue-card,
.drawer,
.empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(31, 46, 39, 0.08);
}

.venue-card {
  padding: 13px;
}

.card-head p,
.drawer-head p {
  margin-bottom: 0;
  font-size: 13px;
}

.tag,
.live {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--green);
  background: #e8f2ed;
}

.tag-legacy {
  color: #855315;
  background: #fff0cf;
}

.tag-lead {
  color: var(--blue);
  background: #eaf2f6;
}

.tag-call {
  color: #8c4224;
  background: #ffe5d7;
}

.live {
  margin-left: 5px;
  color: #fffdf8;
  background: var(--coral);
}

.facts,
.profile-grid {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.facts div,
.profile-grid div {
  display: grid;
  gap: 3px;
}

dt {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.primary,
.secondary,
.text-button {
  min-height: 42px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
}

.primary {
  padding: 0 16px;
  color: #14211d;
  background: var(--gold);
}

.secondary {
  padding: 0 16px;
  color: var(--green);
  background: #e7f0eb;
}

.secondary:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.text-button {
  width: 100%;
  color: var(--green);
  background: #eef5f1;
}

.icon-button,
.save {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  color: #fffdf8;
  background: rgba(255, 255, 255, 0.12);
}

.save {
  color: var(--muted);
  background: #f1eadf;
}

.save.saved {
  color: #fffdf8;
  background: var(--green);
}

.light {
  color: var(--green);
  background: #edf4f0;
}

.bottom-nav {
  position: fixed;
  right: 50%;
  bottom: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 28px), 402px);
  padding: 7px;
  transform: translateX(50%);
  border: 1px solid rgba(229, 220, 205, 0.9);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 50px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.nav-item.active {
  color: var(--green);
  background: #e7f0eb;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(11, 20, 18, 0.44);
}

.drawer {
  width: min(100%, 430px);
  max-height: 86vh;
  overflow-y: auto;
  padding: 10px 16px 18px;
}

.drawer-handle {
  width: 44px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #c7beae;
}

.profile-grid {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.vibe {
  margin-bottom: 16px;
  color: var(--ink);
}

.drawer-actions {
  align-items: stretch;
}

.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  text-decoration: none;
}

.update-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.update-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

textarea {
  min-height: 86px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline-color: var(--green);
  background: #fffaf0;
  color: var(--ink);
  line-height: 1.4;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-list a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--green);
  background: #fffaf0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.admin-link {
  display: block;
  margin-top: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.admin-shell {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 42px;
}

.admin-hero {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 18px;
  border-radius: var(--radius);
  color: #fffdf8;
  background: linear-gradient(145deg, var(--green), var(--green-2));
  box-shadow: var(--shadow);
}

.admin-hero p {
  margin-bottom: 0;
  color: rgba(255, 253, 248, 0.78);
}

.admin-back {
  width: fit-content;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.admin-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(31, 46, 39, 0.08);
}

.admin-card h2 {
  font-size: 20px;
}

.admin-row,
.admin-actions,
.admin-checks {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.admin-grid {
  display: grid;
  gap: 12px;
}

.place-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.place-list button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
}

.place-list button.selected {
  border-color: var(--green);
  background: #e7f0eb;
}

.place-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-form {
  display: grid;
  gap: 11px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-form textarea {
  min-height: 76px;
}

.admin-checks label {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.admin-message {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fffdf8;
  background: var(--green);
  font-weight: 900;
}

.danger {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  color: #fffdf8;
  background: #9a3d2c;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f1eadf;
}

.empty {
  padding: 22px;
  text-align: center;
}

.empty p {
  margin-bottom: 0;
}

.toast {
  position: fixed;
  right: 50%;
  bottom: 92px;
  z-index: 20;
  width: min(calc(100% - 32px), 390px);
  padding: 12px 14px;
  transform: translateX(50%);
  border-radius: var(--radius);
  color: #fffdf8;
  background: var(--green);
  box-shadow: var(--shadow);
  font-weight: 800;
  line-height: 1.35;
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: start center;
    padding: 28px 0;
  }

  .phone-shell {
    min-height: 860px;
    border: 1px solid rgba(22, 33, 30, 0.1);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  .bottom-nav {
    bottom: 28px;
  }

  .admin-grid {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}
