:root {
  color-scheme: light;
  --bg: #f2eee5;
  --bg-deep: #e9e1d3;
  --panel: #fffaf0;
  --panel-strong: #fffdf7;
  --ink: #191714;
  --soft-ink: #3d3830;
  --muted: #7d7568;
  --line: #ded3bf;
  --line-soft: rgba(25, 23, 20, 0.08);
  --brand: #171410;
  --accent: #b28742;
  --accent-soft: #f0dfbd;
  --sage: #5d6f62;
  --danger: #b1483d;
  --pending: #b77a1f;
  --ok: #327553;
  --shadow: 0 16px 36px rgba(49, 39, 22, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.9), rgba(242, 238, 229, 0.96) 38%, var(--bg)),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 12px max(26px, env(safe-area-inset-bottom));
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-logo-frame {
  width: 126px;
  height: 48px;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
  mix-blend-mode: normal;
  filter: contrast(1.04);
}

.brand-caption {
  max-width: 88px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 780;
}

.icon,
[data-icon] {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: currentColor;
  flex: 0 0 auto;
}

.icon svg,
[data-icon] svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.74);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(48, 38, 22, 0.08);
}

.status-banner {
  margin: 0 0 10px;
  padding: 11px 12px;
  border: 1px solid rgba(178, 135, 66, 0.36);
  border-radius: 10px;
  background: #fff6df;
  color: #5b4213;
  font-size: 13px;
  line-height: 1.45;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(39, 32, 23, 0.96), rgba(23, 20, 16, 0.98)),
    var(--brand);
  color: #fff9ea;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 18px 36px rgba(32, 24, 12, 0.2);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -28px -52px auto;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(240, 223, 189, 0.16);
  border-radius: 50%;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.location-pill,
.language-pill {
  border: 1px solid rgba(240, 223, 189, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
}

.location-pill {
  color: #f3dfb6;
}

.language-pill {
  appearance: none;
  border-color: rgba(240, 223, 189, 0.36);
  color: #1b1712;
  background: #f3dfb6;
}

.language-menu {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: -6px 0 14px;
}

.language-menu[hidden] {
  display: none;
}

.language-menu button {
  min-height: 34px;
  border: 1px solid rgba(240, 223, 189, 0.24);
  border-radius: 9px;
  background: rgba(255, 250, 240, 0.1);
  color: rgba(255, 249, 234, 0.78);
  font-size: 12px;
}

.language-menu button.is-active {
  background: #f3dfb6;
  color: #1b1712;
}

.hero-card h2 {
  max-width: 16ch;
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 760;
}

.hero-card p {
  max-width: 34em;
  margin: 10px 0 0;
  color: rgba(255, 249, 234, 0.76);
  font-size: 14px;
  line-height: 1.52;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
  margin-top: 16px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.quick-action {
  min-height: 92px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.82);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(58, 43, 18, 0.06);
}

.quick-action.is-active {
  border-color: rgba(178, 135, 66, 0.56);
  background: #fff4dc;
}

.quick-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.quick-action strong {
  display: block;
  font-size: 14px;
  line-height: 1.16;
}

.quick-action small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 8px 0 14px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.66);
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.tab.is-active {
  background: var(--brand);
  color: #fff6df;
  box-shadow: 0 10px 20px rgba(23, 20, 16, 0.16);
}

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

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.loading-card,
.empty-state,
.card {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.88);
  padding: 15px;
  box-shadow: var(--shadow);
}

.loading-card {
  display: grid;
  gap: 10px;
}

.loading-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(222, 211, 191, 0.45), rgba(255, 250, 240, 0.86), rgba(222, 211, 191, 0.45));
}

.loading-line.short {
  width: 62%;
}

.empty-state {
  color: var(--muted);
  line-height: 1.48;
}

.empty-state p {
  margin: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-button {
  min-height: 62px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.82);
  color: var(--ink);
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px;
  box-shadow: 0 10px 22px rgba(58, 43, 18, 0.05);
}

.category-button.is-active {
  border-color: rgba(178, 135, 66, 0.58);
  background: #fff4dc;
}

.category-index {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(178, 135, 66, 0.32);
  background: #fff8e8;
  color: #8b672d;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.category-button.is-active .category-index {
  border-color: rgba(25, 23, 20, 0.14);
  background: var(--brand);
  color: #f3dfb6;
}

.category-button strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.category-button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.price-list {
  display: grid;
  gap: 9px;
}

.price-item {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-strong);
  padding: 14px;
  box-shadow: 0 12px 28px rgba(58, 43, 18, 0.06);
}

.price-item.is-clickable {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.price-item.is-clickable:active {
  transform: scale(0.995);
}

.price-item.is-clickable:focus-visible {
  outline: 2px solid rgba(178, 135, 66, 0.48);
  outline-offset: 2px;
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.item-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.item-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.brand {
  align-self: flex-start;
  border: 1px solid rgba(93, 111, 98, 0.26);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--sage);
  background: #f1f4ed;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.prices {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  border: 1px solid rgba(222, 211, 191, 0.68);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fbf5e8;
}

.price-row[data-length-key] {
  cursor: pointer;
}

.price-row span {
  color: var(--muted);
  font-size: 13px;
}

.price-row strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.primary-button,
.secondary-button,
.ghost-button {
  border-radius: 10px;
  border: 1px solid transparent;
  min-height: 46px;
  padding: 11px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 680;
}

.primary-button {
  width: 100%;
  background: var(--brand);
  color: #fff6df;
}

.secondary-button {
  width: 100%;
  margin-top: 12px;
  background: #fffaf0;
  border-color: var(--line);
  color: var(--ink);
  justify-content: space-between;
}

.ghost-button {
  background: rgba(255, 250, 240, 0.1);
  border-color: rgba(240, 223, 189, 0.28);
  color: #f6e6c3;
}

.compact {
  min-height: 44px;
}

.appointment-card {
  display: grid;
  gap: 9px;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.status-line strong {
  min-width: 0;
  font-size: 15px;
}

.status-badge {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.status-badge.ok {
  background: var(--ok);
}

.status-badge.pending {
  background: var(--pending);
}

.status-badge.danger {
  background: var(--danger);
}

.detail-row {
  display: grid;
  grid-template-columns: 20px minmax(72px, 0.42fr) 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.detail-row .icon {
  color: var(--accent);
}

.detail-row strong {
  min-width: 0;
  color: var(--ink);
  font-weight: 620;
  text-align: right;
  overflow-wrap: anywhere;
}

.address-card {
  display: grid;
  gap: 12px;
}

.address-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand);
  color: #f0dfbd;
  display: grid;
  place-items: center;
}

.address-text {
  white-space: pre-line;
  line-height: 1.55;
  color: var(--soft-ink);
}

@media (max-width: 430px) {
  .app-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-card {
    padding: 16px;
  }

  .hero-card h2 {
    font-size: 27px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tab {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }
}
