:root {
  color-scheme: light;
  --brand: #f28a00;
  --brand-dark: #c45b00;
  --ink: #251b19;
  --muted: #6a6260;
  --line: #e8e1dc;
  --surface: #fffaf5;
  --page: #f5f2ee;
  --red: #d91818;
  --teal: #075c67;
  --green: #188455;
  --shadow: 0 16px 38px rgba(37, 27, 25, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  min-height: 100svh;
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  min-height: 100svh;
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: max(12px, env(safe-area-inset-top)) 18px 12px;
  background: rgba(255, 250, 245, 0.94);
  border-bottom: 1px solid rgba(232, 225, 220, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: 154px;
  height: auto;
  display: block;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f0ebe6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.status-pill.open {
  background: rgba(24, 132, 85, 0.12);
  color: var(--green);
}

.status-pill.closed {
  background: rgba(217, 24, 24, 0.1);
  color: var(--red);
}

main {
  padding: 16px 16px 152px;
}

.screen {
  display: none;
  animation: fadeIn 180ms ease-out;
}

.screen.active {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-panel,
.search-card,
.hours-strip,
.rate-panel,
.contact-panel,
.detail-hero,
.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.hero-panel {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(242, 138, 0, 0.12), rgba(7, 92, 103, 0.08)),
    #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.08;
  max-width: 11ch;
}

h2 {
  font-size: 22px;
  line-height: 1.16;
}

.quick-actions,
.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.contact-actions {
  grid-template-columns: 1fr 1fr 1fr;
}

.primary-action,
.secondary-action,
.tertiary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 12px 14px;
  font-weight: 900;
  text-align: center;
}

.primary-action {
  background: var(--red);
  color: #ffffff;
}

.secondary-action {
  background: var(--ink);
  color: #ffffff;
}

.tertiary-action {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.full {
  width: 100%;
  margin-top: 14px;
}

.search-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
}

.search-card.compact {
  margin: 0 0 12px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfb;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(242, 138, 0, 0.16);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.summary-tile {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.summary-tile span,
.service-card span,
.contact-row span,
.info-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-tile strong {
  font-size: 15px;
  line-height: 1.25;
}

.hours-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
}

.hours-strip h2 {
  font-size: 16px;
}

.hours-strip p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.section-head {
  margin: 4px 0 16px;
}

.filter-row {
  display: flex;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  overflow-x: auto;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
}

.filter-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.service-list,
.info-list {
  display: grid;
  gap: 10px;
}

.service-card,
.info-list > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.service-card {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.service-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(242, 138, 0, 0.14);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 1000;
}

.service-card.money .service-mark { background: rgba(7, 92, 103, 0.12); color: var(--teal); }
.service-card.mobile .service-mark { background: rgba(217, 24, 24, 0.1); color: var(--red); }
.service-card.tv .service-mark { background: rgba(37, 27, 25, 0.1); color: var(--ink); }
.service-card.shop .service-mark { background: rgba(24, 132, 85, 0.12); color: var(--green); }
.service-card.change .service-mark { background: rgba(242, 138, 0, 0.16); color: var(--brand-dark); }

.service-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.18;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.service-open {
  align-self: center;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 1000;
}

.back-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 12px;
}

.detail-hero {
  display: grid;
  gap: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(242, 138, 0, 0.13), rgba(7, 92, 103, 0.08)),
    #ffffff;
}

.detail-hero p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.detail-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--brand);
  font-weight: 1000;
}

.detail-hero.money .detail-mark { background: var(--teal); color: #ffffff; }
.detail-hero.mobile .detail-mark { background: var(--red); color: #ffffff; }
.detail-hero.tv .detail-mark { background: var(--ink); color: var(--brand); }
.detail-hero.shop .detail-mark { background: var(--green); color: #ffffff; }
.detail-hero.change .detail-mark { background: var(--brand-dark); color: #ffffff; }

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.detail-block {
  margin-top: 12px;
  padding: 14px;
}

.detail-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.detail-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.28;
}

.empty-state {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.rate-panel,
.contact-panel {
  padding: 16px;
}

.rate-panel p {
  margin: 12px 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

.currency-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.currency-line span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--brand);
  font-size: 22px;
  font-weight: 1000;
}

.info-list {
  margin-top: 12px;
}

.info-list > div,
.contact-row {
  display: grid;
  gap: 6px;
}

.info-list strong,
.contact-row strong {
  font-size: 15px;
  line-height: 1.35;
}

.contact-panel {
  display: grid;
  gap: 14px;
}

.contact-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.contact-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  transform: translateX(-50%);
  padding: 8px 10px max(8px, env(safe-area-inset-bottom));
  background: rgba(255, 250, 245, 0.96);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav-item {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.nav-item span {
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.nav-item.active {
  background: rgba(242, 138, 0, 0.14);
  color: var(--ink);
}

.nav-item.active span {
  background: var(--brand);
}

.install-banner {
  display: none;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid rgba(232, 225, 220, 0.7);
  background: var(--ink);
  color: #ffffff;
  padding: 10px 14px;
  animation: slideDown 220ms ease-out;
}

.install-banner.visible {
  display: grid;
  grid-template-columns: 1fr auto auto;
}

.phone-links {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.phone-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 800;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.install-banner p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.install-banner button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
}

#dismissInstall {
  width: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 20px;
}

@media (min-width: 760px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    min-height: calc(100svh - 36px);
    border-radius: 18px;
  }

  .bottom-nav {
    border-radius: 0 0 18px 18px;
  }

  main {
    padding-bottom: 168px;
  }
}

@media (max-width: 370px) {
  .brand img {
    width: 132px;
  }

  h1 {
    font-size: 24px;
  }

  .contact-actions {
    grid-template-columns: 1fr;
  }

  .hours-strip {
    display: grid;
  }

  .hours-strip p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}