:root {
  --color-primary: #0b2d62;
  --color-primary-deep: #071f46;
  --color-accent: #0877c9;
  --color-accent-soft: #eaf5ff;
  --color-cyan: #39b5da;
  --color-bg: #f2f6fb;
  --color-surface: #ffffff;
  --color-surface-muted: #f7f9fc;
  --color-text: #10213a;
  --color-text-soft: #617087;
  --color-text-faint: #8995a7;
  --color-border: #e4eaf2;
  --color-success: #16865f;
  --color-success-soft: #eaf8f3;
  --color-warning: #c8700b;
  --color-warning-soft: #fff5e6;
  --color-danger: #c83b4a;
  --shadow-card: 0 14px 36px rgba(24, 55, 95, 0.08);
  --shadow-float: 0 20px 52px rgba(9, 31, 65, 0.17);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--color-text);
  background: #dfe8f4;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #dfe8f4;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(46, 139, 209, 0.2), transparent 30%),
    linear-gradient(145deg, #dfe8f4 0%, #eef3f8 56%, #dce8f3 100%);
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--color-primary-deep);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(8, 119, 201, 0.28);
  outline-offset: 2px;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}

.backdrop-orb--one {
  top: -220px;
  right: 5%;
  background: radial-gradient(circle, rgba(48, 154, 221, 0.34), transparent 68%);
}

.backdrop-orb--two {
  bottom: -220px;
  left: 6%;
  background: radial-gradient(circle, rgba(10, 56, 112, 0.18), transparent 68%);
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: var(--shadow-float);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(14px + env(safe-area-inset-top)) 20px 13px;
  color: #fff;
  background: rgba(11, 45, 98, 0.96);
  backdrop-filter: blur(18px);
}

.topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup,
.page-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(150deg, rgba(70, 192, 226, 0.9), rgba(21, 105, 190, 0.66));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-title,
.page-title {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.icon-button,
.header-action {
  position: relative;
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border-radius: 14px;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 180ms ease, opacity 180ms ease;
}

.icon-button:active,
.header-action:active {
  background: rgba(255, 255, 255, 0.18);
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  background: #52d8ff;
}

.app-view {
  min-height: calc(100vh - 74px);
  padding: 0 18px calc(96px + env(safe-area-inset-bottom));
  outline: none;
}

.view-enter {
  animation: view-enter 320ms var(--ease) both;
}

.welcome-panel {
  position: relative;
  margin: 0 -18px;
  padding: 23px 20px 52px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 86% 18%, rgba(65, 191, 226, 0.35), transparent 27%),
    linear-gradient(155deg, var(--color-primary) 0%, #0e4b91 73%, #116cab 100%);
}

.welcome-panel::after {
  position: absolute;
  right: -50px;
  bottom: -72px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 48% 52% 45% 55%;
  content: "";
  transform: rotate(25deg);
}

.welcome-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-panel .eyebrow {
  color: rgba(211, 242, 255, 0.8);
}

.welcome-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.welcome-copy {
  max-width: 260px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.65;
}

.weather-chip {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 10px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.09);
  font-size: 11px;
}

.notice-strip {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 62px;
  margin: -30px 0 0;
  padding: 13px 15px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.notice-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.notice-content {
  min-width: 0;
  flex: 1;
}

.notice-label {
  display: block;
  margin-bottom: 3px;
  color: var(--color-text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.notice-text {
  overflow: hidden;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  margin-top: 27px;
}

.section-heading {
  display: flex;
  min-height: 32px;
  margin-bottom: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.section-note {
  color: var(--color-text-faint);
  font-size: 12px;
}

.text-button {
  min-height: 44px;
  padding: 0 4px 0 12px;
  color: var(--color-accent);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  position: relative;
  min-width: 0;
  min-height: 150px;
  padding: 16px 13px 14px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: 0 8px 20px rgba(30, 58, 95, 0.05);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.service-card::after {
  position: absolute;
  right: -15px;
  bottom: -22px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--service-soft);
  content: "";
  opacity: 0.8;
}

.service-card:active {
  border-color: var(--service-color);
  background: var(--service-soft);
}

.service-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 14px;
  color: var(--service-color);
  background: var(--service-soft);
}

.service-name {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 750;
}

.service-meta {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--color-text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.service-arrow {
  position: absolute;
  right: 11px;
  bottom: 11px;
  z-index: 1;
  color: var(--service-color);
}

.activity-list,
.message-list,
.profile-list,
.simple-list {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.activity-item,
.message-item,
.profile-item,
.simple-list-item {
  display: flex;
  min-height: 76px;
  padding: 14px 15px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--color-border);
}

.activity-item:last-child,
.message-item:last-child,
.profile-item:last-child,
.simple-list-item:last-child {
  border-bottom: 0;
}

.activity-marker,
.list-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--marker-color, var(--color-accent));
  background: var(--marker-bg, var(--color-accent-soft));
}

.activity-copy,
.message-copy,
.list-copy {
  min-width: 0;
  flex: 1;
}

.activity-title,
.message-title,
.list-title {
  display: flex;
  margin: 0 0 4px;
  align-items: center;
  gap: 7px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
}

.activity-detail,
.message-detail,
.list-detail {
  margin: 0;
  overflow: hidden;
  color: var(--color-text-soft);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  flex: 0 0 auto;
  align-self: flex-start;
  padding-top: 2px;
  color: var(--color-text-faint);
  font-size: 10px;
}

.status-badge {
  display: inline-flex;
  min-height: 22px;
  padding: 3px 8px;
  align-items: center;
  border-radius: 999px;
  color: var(--badge-color, var(--color-accent));
  background: var(--badge-bg, var(--color-accent-soft));
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(223, 230, 239, 0.92);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 -8px 28px rgba(25, 54, 90, 0.06);
}

.nav-item {
  display: flex;
  min-width: 0;
  min-height: 54px;
  padding: 5px 3px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-radius: 14px;
  color: #7f8da0;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.nav-item[aria-current="page"] {
  color: var(--color-accent);
  background: #f2f8fd;
  font-weight: 700;
}

.detail-hero {
  margin: 0 -18px 22px;
  padding: 25px 20px 27px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(72, 200, 226, 0.3), transparent 30%),
    linear-gradient(150deg, var(--color-primary-deep), #0d4f91 74%, #1170aa);
}

.detail-hero__eyebrow {
  display: inline-flex;
  min-height: 26px;
  margin-bottom: 16px;
  padding: 4px 9px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: #d3f3ff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.detail-hero__title {
  max-width: 310px;
  margin: 0;
  font-size: 23px;
  line-height: 1.42;
}

.detail-hero__meta {
  display: flex;
  margin-top: 14px;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.detail-hero__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #62d6f2;
}

.primary-button,
.secondary-button,
.soft-button,
.danger-button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: #fff;
  background: var(--color-accent);
  box-shadow: 0 10px 22px rgba(8, 119, 201, 0.23);
}

.secondary-button {
  color: var(--color-accent);
  border: 1px solid #c9e2f3;
  background: var(--color-surface);
}

.soft-button {
  color: var(--color-primary);
  background: #edf4fa;
}

.danger-button {
  color: var(--color-danger);
  background: #fff0f2;
}

.primary-button:active,
.secondary-button:active,
.soft-button:active,
.danger-button:active {
  opacity: 0.76;
}

.primary-button:disabled,
.secondary-button:disabled,
.soft-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.button-row {
  display: flex;
  margin-top: 20px;
  gap: 10px;
}

.button-row > * {
  flex: 1;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  display: flex;
  min-height: 98px;
  padding: 13px 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  color: var(--color-text);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.quick-action__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.card {
  padding: 17px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 8px 22px rgba(28, 56, 91, 0.04);
}

.card + .card {
  margin-top: 12px;
}

.card-kicker {
  margin: 0 0 7px;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.card-copy {
  margin: 7px 0 0;
  color: var(--color-text-soft);
  font-size: 12px;
  line-height: 1.65;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.info-tile {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 15px;
  background: var(--color-surface);
}

.info-tile__label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-faint);
  font-size: 10px;
}

.info-tile__value {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 750;
}

.repair-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.repair-summary__icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 17px;
  color: var(--color-warning);
  background: var(--color-warning-soft);
}

.timeline {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  min-height: 62px;
  padding-left: 28px;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 15px;
  bottom: -2px;
  left: 7px;
  width: 1px;
  background: #dbe4ed;
  content: "";
}

.timeline-dot {
  position: absolute;
  top: 5px;
  left: 0;
  width: 15px;
  height: 15px;
  border: 4px solid #e4f1fa;
  border-radius: 50%;
  background: var(--color-accent);
}

.timeline-item.is-pending .timeline-dot {
  border-color: #eef1f5;
  background: #b4bfcc;
}

.timeline-title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
}

.timeline-detail,
.timeline-time {
  color: var(--color-text-faint);
  font-size: 10px;
  line-height: 1.5;
}

.date-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.date-tab {
  min-height: 58px;
  padding: 7px 4px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  color: var(--color-text-soft);
  background: var(--color-surface);
  font-size: 10px;
  cursor: pointer;
}

.date-tab strong {
  display: block;
  margin-top: 5px;
  color: var(--color-text);
  font-size: 15px;
}

.date-tab.is-active {
  color: #d7f4ff;
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.date-tab.is-active strong {
  color: #fff;
}

.meal-card {
  position: relative;
  overflow: hidden;
}

.meal-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.meal-card__price {
  color: var(--color-primary);
  font-size: 18px;
  font-weight: 800;
}

.meal-card__price small {
  color: var(--color-text-faint);
  font-size: 10px;
  font-weight: 500;
}

.meal-tags {
  display: flex;
  margin-top: 13px;
  flex-wrap: wrap;
  gap: 7px;
}

.meal-tag {
  display: inline-flex;
  min-height: 26px;
  padding: 4px 8px;
  align-items: center;
  border-radius: 999px;
  color: var(--color-text-soft);
  background: var(--color-surface-muted);
  font-size: 10px;
}

.nutrition-row {
  display: grid;
  margin-top: 15px;
  padding-top: 14px;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--color-border);
}

.nutrition-item {
  text-align: center;
  color: var(--color-text-faint);
  font-size: 10px;
}

.nutrition-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--color-text);
  font-size: 13px;
}

.meal-actions {
  display: flex;
  margin-top: 15px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deadline {
  color: var(--color-warning);
  font-size: 10px;
  font-weight: 650;
}

.compact-button {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 13px;
  color: #fff;
  background: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.compact-button.is-booked {
  color: var(--color-success);
  border: 1px solid #b9e8d8;
  background: var(--color-success-soft);
}

.page-intro {
  padding: 24px 0 8px;
}

.page-intro h1 {
  margin: 0;
  font-size: 24px;
}

.page-intro p {
  margin: 8px 0 0;
  color: var(--color-text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.service-directory {
  display: grid;
  gap: 12px;
}

.directory-card {
  display: flex;
  min-height: 104px;
  padding: 16px;
  align-items: center;
  gap: 15px;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-surface);
  cursor: pointer;
}

.directory-card__icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 17px;
  color: var(--service-color);
  background: var(--service-soft);
}

.directory-card__copy {
  min-width: 0;
  flex: 1;
}

.directory-card__copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.directory-card__copy span {
  display: block;
  color: var(--color-text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.profile-card {
  display: flex;
  margin-top: 22px;
  padding: 21px;
  align-items: center;
  gap: 15px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(145deg, var(--color-primary-deep), #0e5797);
  box-shadow: var(--shadow-card);
}

.avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 19px;
  color: var(--color-primary);
  background: #d9f1ff;
  font-size: 18px;
  font-weight: 800;
}

.profile-card h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.profile-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color-accent);
}

.modal-root {
  position: relative;
  z-index: 100;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  padding: 20px;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5, 18, 38, 0.55);
  animation: fade-in 180ms ease both;
}

.modal-sheet {
  width: min(100%, 430px);
  max-height: min(88vh, 720px);
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 24px 24px 18px 18px;
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
  animation: sheet-up 260ms var(--ease) both;
}

.modal-handle {
  width: 38px;
  height: 4px;
  margin: -6px auto 17px;
  border-radius: 999px;
  background: #d7dde6;
}

.modal-heading {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-heading h2 {
  margin: 0;
  font-size: 20px;
}

.close-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border-radius: 14px;
  color: var(--color-text-soft);
  background: var(--color-surface-muted);
  cursor: pointer;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--color-text-faint);
  font-size: 10px;
  line-height: 1.5;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #d9e1eb;
  border-radius: 13px;
  color: var(--color-text);
  background: #fff;
  outline: 0;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(8, 119, 201, 0.1);
}

.field-error {
  display: none;
  margin-top: 6px;
  color: var(--color-danger);
  font-size: 11px;
}

.field.has-error .field-error {
  display: block;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--color-danger);
}

.toast-root {
  position: fixed;
  z-index: 150;
  top: calc(78px + env(safe-area-inset-top));
  right: max(18px, calc((100vw - 430px) / 2 + 18px));
  left: max(18px, calc((100vw - 430px) / 2 + 18px));
  display: grid;
  place-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  min-height: 48px;
  padding: 11px 15px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  background: rgba(7, 31, 70, 0.96);
  box-shadow: 0 12px 32px rgba(5, 27, 61, 0.24);
  font-size: 12px;
  font-weight: 650;
  animation: toast-in 260ms var(--ease) both;
}

.empty-state {
  padding: 45px 24px;
  text-align: center;
  border: 1px dashed #ced8e4;
  border-radius: var(--radius-md);
  color: var(--color-text-soft);
  background: rgba(255, 255, 255, 0.6);
}

.empty-state__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 18px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.empty-state h2 {
  margin: 0 0 7px;
  color: var(--color-text);
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheet-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (min-width: 431px) {
  .app-shell {
    min-height: calc(100vh - 32px);
    min-height: calc(100dvh - 32px);
    margin-top: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 32px;
  }

  .app-header {
    border-radius: 31px 31px 0 0;
  }

  .bottom-nav {
    bottom: 16px;
    border-radius: 0 0 31px 31px;
  }
}

@media (min-width: 760px) and (orientation: landscape) {
  .app-shell {
    width: min(100% - 40px, 760px);
  }

  .bottom-nav {
    right: max(20px, calc((100vw - 760px) / 2));
    left: max(20px, calc((100vw - 760px) / 2));
  }

  .app-view {
    padding-right: 28px;
    padding-left: 28px;
  }

  .welcome-panel,
  .detail-hero {
    margin-right: -28px;
    margin-left: -28px;
    padding-right: 30px;
    padding-left: 30px;
  }

  .service-grid,
  .quick-actions {
    gap: 14px;
  }

  .service-card {
    min-height: 142px;
  }

  .service-directory {
    grid-template-columns: repeat(3, 1fr);
  }

  .directory-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
