:root {
  --navy: #080943;
  --navy-2: #17195b;
  --blue: #2589b7;
  --sky: #e7f6fb;
  --coral: #f36f5f;
  --coral-soft: #fff0ed;
  --gold: #f2c75c;
  --gold-soft: #fff8df;
  --mint: #96d5c2;
  --mint-soft: #e9f8f3;
  --ink: #17192d;
  --muted: #6b7385;
  --line: #e4e8eb;
  --canvas: #f5f7f8;
  --surface: #ffffff;
  --success: #247b63;
  --danger: #ce4f43;
  --rail: 224px;
  --header: 72px;
  --shadow: 0 12px 30px rgba(18, 27, 49, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
}

body.sheet-open,
body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

.member-auth {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  min-height: 100vh;
  background: #ffffff;
}

.member-auth-visual {
  min-height: 100vh;
  overflow: hidden;
  background: var(--navy);
}

.member-auth-visual img {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  object-fit: cover;
}

.member-auth-panel {
  align-self: center;
  width: min(470px, calc(100% - 48px));
  padding: 36px;
  margin: 0 auto;
}

.member-auth-panel > .mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 46px;
}

.member-auth-panel > .mobile-brand strong {
  color: var(--navy);
  font-size: 20px;
}

.member-auth .auth-copy p {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.member-auth .auth-copy h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.member-auth .auth-copy > span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
}

.member-auth-form {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.member-auth-form label {
  display: grid;
  gap: 8px;
  color: #353b4d;
  font-size: 12px;
  font-weight: 800;
}

.member-auth-form input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  outline: 0;
}

.member-auth-form input:focus {
  border-color: #77bedb;
  box-shadow: 0 0 0 3px rgba(37, 137, 183, 0.1);
}

.member-auth-form .primary-button {
  width: 100%;
  min-height: 46px;
}

.member-auth-form[hidden] {
  display: none;
}

.auth-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.member-auth-form .auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #687184;
  font-weight: 500;
  line-height: 1.55;
}

.member-auth-form .auth-consent input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.member-auth-form .auth-switch {
  min-height: 36px;
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.member-auth .auth-error {
  min-height: 18px;
  margin: -4px 0;
  color: var(--danger);
  font-size: 11px;
}

.member-auth .demo-account {
  display: block;
  margin-top: 18px;
  color: #969da9;
  font-size: 10px;
  text-align: center;
}

.service-confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #b9dcec;
  border-radius: 8px;
  background: #eef8fc;
}

.service-confirmation > div {
  display: grid;
  gap: 4px;
}

.service-confirmation small {
  color: var(--muted);
}

.service-confirmation .primary-button {
  flex: 0 0 auto;
}

.privacy-number {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid #bfe7d8;
  border-radius: 8px;
  color: #165f4d;
  background: #effaf6;
  text-decoration: none;
}

.privacy-number.pending {
  color: #596579;
  border-color: var(--line);
  background: #f7f8fa;
}

.privacy-number > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.privacy-number span {
  display: grid;
  gap: 3px;
}

.privacy-number small {
  color: var(--muted);
}

.service-review {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.service-review h3 {
  margin: 0;
}

.review-stars {
  display: flex;
  gap: 6px;
}

.review-stars button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  color: #c9ced8;
  background: transparent;
  font-size: 30px;
}

.review-stars button.is-active {
  color: #f2b84b;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-tags button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #596579;
  background: #ffffff;
}

.review-tags button.is-active {
  color: #165f4d;
  border-color: #80cdb5;
  background: #eaf8f3;
}

.service-review textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
}

.payment-protection > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payment-protection > div > span {
  display: grid;
  gap: 4px;
}

.payment-protection > div > span > strong {
  color: var(--navy);
  font-size: 22px;
}

.payment-protection > div > span > small,
.payment-protection > p {
  color: var(--muted);
  font-size: 11px;
}

.payment-protection > div > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.payment-protection > p {
  margin: 12px 0 0;
}

.payment-safe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #165f4d;
  font-size: 12px;
  font-weight: 800;
}

.payment-safe svg {
  width: 17px;
  height: 17px;
}

.off-platform-protection {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  padding: 15px;
  border: 1px solid #f0c5bd;
  border-radius: 8px;
  color: #8c3c31;
  background: #fff4f1;
}

.off-platform-protection > svg {
  width: 22px;
  height: 22px;
}

.off-platform-protection div {
  display: grid;
  gap: 3px;
}

.off-platform-protection small {
  color: #8d665f;
}

.off-platform-protection button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d98d80;
  border-radius: 5px;
  color: #8c3c31;
  background: #ffffff;
  font-weight: 800;
}

@media (max-width: 560px) {
  .service-confirmation {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-protection > div {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-protection > div > div {
    justify-content: flex-start;
  }

  .off-platform-protection {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .off-platform-protection button {
    grid-column: 1 / -1;
  }
}

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

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

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 137, 183, 0.22);
  outline-offset: 2px;
}

svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke-width: 2;
}

.offline-banner {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 200;
  display: none;
  padding: 8px 16px;
  color: #684d08;
  background: var(--gold-soft);
  border-bottom: 1px solid #ecd78c;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.offline-banner.is-visible {
  display: block;
}

.member-shell {
  min-height: 100vh;
}

.app-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--rail);
  color: #ffffff;
  background: var(--navy);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--header);
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-symbol {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: var(--navy);
  background: transparent;
  object-fit: contain;
  font-size: 20px;
  font-weight: 950;
}

.app-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.app-brand strong {
  font-size: 17px;
}

.app-brand small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.app-rail nav {
  display: grid;
  gap: 5px;
  padding: 20px 12px;
}

.rail-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.rail-item:hover,
.rail-item.is-active {
  color: #ffffff;
  background: rgba(68, 198, 238, 0.16);
}

.rail-item.is-active {
  box-shadow: inset 3px 0 0 #44c6ee;
}

.message-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--coral);
  font-size: 10px;
}

.rail-support {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto 12px 18px;
  padding: 13px;
  border-radius: 7px;
  color: var(--mint);
  background: rgba(255, 255, 255, 0.07);
}

.rail-support span {
  display: grid;
  gap: 3px;
}

.rail-support small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.rail-support strong {
  color: #ffffff;
  font-size: 12px;
}

.app-workspace {
  min-width: 0;
  margin-left: var(--rail);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-context h1 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.header-context p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.mobile-brand {
  display: none;
}

.header-actions,
.city-button,
.section-heading,
.view-heading,
.service-actions,
.profile-links,
.booking-modal header,
.booking-modal footer,
.service-sheet header {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 9px;
}

.city-button {
  gap: 6px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 6px;
  color: #42485a;
  background: #f4f6f7;
  font-weight: 700;
  cursor: pointer;
}

.city-button svg:first-child,
.city-button svg:last-child {
  width: 15px;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 6px;
  color: var(--ink);
  background: #f3f5f6;
  cursor: pointer;
}

.icon-button:hover {
  background: #e9edef;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid #f3f5f6;
  border-radius: 50%;
  background: var(--coral);
}

.profile-avatar,
.small-avatar,
.large-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  color: #ffffff;
  background: var(--navy-2);
  cursor: pointer;
}

.app-content {
  width: 100%;
  max-width: 1320px;
  min-height: calc(100vh - var(--header));
  padding: 28px;
  margin: 0 auto;
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
  animation: fade-in 180ms ease;
}

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

.home-heading,
.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.home-heading p {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.home-heading h2,
.view-heading h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: 0;
}

.home-heading span,
.view-heading p {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  color: #ffffff;
  background: var(--coral);
  box-shadow: 0 7px 15px rgba(243, 111, 95, 0.18);
}

.primary-button:hover {
  background: #e86253;
}

.secondary-button {
  color: var(--muted);
  background: #eef1f3;
}

.next-service {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42%;
  min-height: 270px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.next-service::after {
  content: "";
  position: absolute;
  top: -160px;
  left: 25%;
  width: 330px;
  height: 260px;
  border: 54px solid rgba(68, 198, 238, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.next-service-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 28px 34px;
}

.service-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.service-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(242, 199, 92, 0.13);
}

.next-service-copy > p {
  margin: 20px 0 5px;
  color: var(--mint);
  font-size: 18px;
  font-weight: 900;
}

.next-service h3 {
  margin: 0 0 22px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: 0;
}

.companion-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.small-avatar {
  width: 36px;
  height: 36px;
}

.small-avatar.coral {
  color: #8f3931;
  background: #ffd4ce;
}

.companion-line > span:last-child {
  display: grid;
  gap: 3px;
}

.companion-line small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.service-actions {
  gap: 8px;
  margin-top: 24px;
}

.service-actions button {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 6px;
  color: var(--navy);
  background: var(--gold);
  font-weight: 800;
  cursor: pointer;
}

.service-actions button.icon-only {
  display: grid;
  width: 38px;
  padding: 0;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.next-service img {
  width: 100%;
  height: 100%;
  min-height: 270px;
  object-fit: cover;
}

.home-section,
.health-panel,
.checkin-panel,
.profile-section,
.message-list {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.home-section,
.health-panel {
  padding: 20px;
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.section-heading button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.section-heading button svg {
  width: 14px;
}

.quick-section {
  margin-bottom: 20px;
}

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

.quick-actions > button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 12px;
  min-width: 0;
  min-height: 92px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.quick-actions > button:hover {
  transform: translateY(-2px);
  border-color: #cfd9de;
  box-shadow: 0 10px 22px rgba(18, 27, 49, 0.07);
}

.quick-icon {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 7px;
}

.quick-icon.coral,
.metric-icon.coral,
.profile-menu-icon.coral,
.message-icon.coral {
  color: var(--danger);
  background: var(--coral-soft);
}

.quick-icon.blue,
.metric-icon.blue,
.profile-menu-icon.blue,
.message-icon.blue {
  color: #226f93;
  background: var(--sky);
}

.quick-icon.gold,
.metric-icon.gold,
.profile-menu-icon.gold,
.message-icon.gold {
  color: #86620d;
  background: var(--gold-soft);
}

.quick-icon.mint,
.metric-icon.mint,
.profile-menu-icon.mint,
.message-icon.mint {
  color: var(--success);
  background: var(--mint-soft);
}

.quick-actions strong {
  align-self: end;
  font-size: 13px;
}

.quick-actions small {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-grid,
.health-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.plan-progress {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0 62.5%, #eef1f3 62.5% 100%);
}

.progress-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
}

.progress-ring span {
  z-index: 1;
  grid-area: 1 / 1;
  font-size: 24px;
  font-weight: 950;
}

.progress-ring small {
  color: var(--muted);
  font-size: 10px;
}

.plan-copy {
  min-width: 0;
}

.plan-copy strong {
  font-size: 15px;
}

.plan-copy p {
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf0f2;
}

.progress-track i {
  display: block;
  width: 62.5%;
  height: 100%;
  background: var(--coral);
}

.plan-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 18px;
}

.plan-stats > span {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 1px 7px;
  min-width: 0;
}

.plan-stats svg {
  grid-row: 1 / 3;
  width: 17px;
  color: var(--blue);
}

.plan-stats strong {
  font-size: 14px;
}

.plan-stats small {
  color: var(--muted);
  font-size: 9px;
}

.reminder-list {
  display: grid;
}

.reminder-list label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 11px;
  min-height: 67px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.reminder-list label:last-child {
  border-bottom: 0;
}

.reminder-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy-2);
}

.reminder-list label > span {
  display: grid;
  gap: 4px;
}

.reminder-list small {
  color: var(--muted);
  font-size: 10px;
}

.reminder-list label > svg {
  width: 17px;
  color: var(--blue);
}

.reminder-list input:checked + span {
  opacity: 0.48;
}

.view-heading {
  align-items: center;
}

.view-heading p {
  font-size: 12px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  margin-bottom: 16px;
  border-radius: 6px;
  background: #eaeef0;
}

.segmented button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.segmented button.is-active {
  color: var(--navy);
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(18, 27, 49, 0.08);
}

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

.service-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border 150ms ease, transform 150ms ease;
}

.service-card:hover {
  transform: translateY(-1px);
  border-color: #cdd8dd;
}

.service-date {
  display: grid;
  place-items: center;
  min-height: 66px;
  border-radius: 7px;
  color: var(--navy);
  background: var(--sky);
  text-align: center;
}

.service-date strong {
  font-size: 22px;
  line-height: 1;
}

.service-date small {
  color: var(--blue);
  font-size: 10px;
}

.service-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.service-card-copy h3 {
  margin: 0;
  font-size: 15px;
}

.service-card-copy p,
.service-card-copy small {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-card-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.service-card-side > svg {
  width: 17px;
  color: #9aa2ae;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 800;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.upcoming {
  color: #236d90;
  background: var(--sky);
}

.status.done {
  color: var(--success);
  background: var(--mint-soft);
}

.status.cancelled {
  color: var(--muted);
  background: #eef1f3;
}

.empty-services {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 24px;
  border: 1px dashed #cfd7dc;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.checkin-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.65fr) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 24px;
  margin-bottom: 20px;
  color: #ffffff;
  background: var(--navy);
}

.checkin-panel .eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.checkin-panel h3 {
  margin: 7px 0 6px;
  font-size: 23px;
  letter-spacing: 0;
}

.checkin-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.mood-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.mood-options button {
  display: grid;
  gap: 8px;
  min-height: 82px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  cursor: pointer;
}

.mood-options button:hover,
.mood-options button.is-active {
  color: var(--navy);
  border-color: var(--gold);
  background: var(--gold);
}

.mood-options svg {
  width: 26px;
  height: 26px;
}

.health-grid {
  margin-bottom: 20px;
}

.stable-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}

.stable-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.health-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  align-items: end;
  gap: 12px;
  height: 205px;
  padding: 18px 8px 0;
  background-image: repeating-linear-gradient(to top, transparent 0 47px, #edf0f2 47px 48px);
}

.health-day {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  justify-items: center;
  gap: 8px;
  height: 100%;
}

.health-day i {
  width: min(24px, 55%);
  min-height: 14px;
  border-radius: 4px 4px 1px 1px;
  background: var(--mint);
}

.health-day.today i {
  background: var(--coral);
}

.health-day span {
  color: var(--muted);
  font-size: 10px;
}

.health-metrics {
  display: grid;
}

.health-metrics article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.health-metrics article:last-child {
  border-bottom: 0;
}

.metric-icon,
.profile-menu-icon,
.message-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 7px;
}

.health-metrics p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  margin: 0;
}

.health-metrics small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.health-metrics strong {
  font-size: 16px;
}

.health-metrics em {
  align-self: center;
  color: var(--success);
  font-size: 10px;
  font-style: normal;
}

.care-note {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #cde6dd;
  border-radius: 8px;
  background: var(--mint-soft);
}

.care-note > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--success);
  background: #ffffff;
}

.care-note p {
  margin: 5px 0 0;
  color: #547168;
  font-size: 11px;
}

.care-note button,
.text-button {
  color: var(--success);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.message-list {
  overflow: hidden;
}

.message-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 92px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.message-item:last-child {
  border-bottom: 0;
}

.message-item:hover {
  background: #fafbfb;
}

.message-item.unread::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.message-item > span:nth-child(2) {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.message-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-item time {
  color: #9aa1ad;
  font-size: 10px;
}

.message-item > svg {
  color: #9ca4af;
}

.profile-hero {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 18px;
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
}

.large-avatar {
  width: 72px;
  height: 72px;
  color: var(--navy);
  background: var(--gold);
  font-size: 25px;
}

.profile-hero h2 {
  margin: 0;
  font-size: 24px;
}

.profile-hero p {
  margin: 5px 0 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.profile-hero div > span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 12px;
  color: var(--navy);
  background: var(--mint);
  font-size: 10px;
  font-weight: 800;
}

.profile-hero .icon-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.profile-section {
  overflow: hidden;
}

.profile-section h3 {
  margin: 0;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.profile-section > button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.profile-section > button:last-child {
  border-bottom: 0;
}

.profile-section > button:hover {
  background: #fafbfb;
}

.profile-section button > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.profile-section small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-section button > svg {
  color: #a1a8b3;
}

.profile-links {
  justify-content: center;
  gap: 22px;
  margin-top: 24px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.profile-links svg {
  width: 16px;
}

.bottom-nav {
  display: none;
}

.booking-modal {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(12, 18, 42, 0.24);
}

.booking-modal::backdrop {
  background: rgba(7, 8, 35, 0.4);
  backdrop-filter: blur(2px);
}

.booking-modal form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
}

.booking-modal header,
.booking-modal footer,
.service-sheet header {
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.booking-modal header span,
.service-sheet header span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.booking-modal h2,
.service-sheet h2 {
  margin: 4px 0 0;
  font-size: 21px;
  letter-spacing: 0;
}

.booking-body {
  display: grid;
  gap: 16px;
  padding: 22px;
  overflow-y: auto;
}

.booking-body label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #373d4d;
  font-size: 12px;
  font-weight: 800;
}

.booking-body input,
.booking-body select,
.booking-body textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  outline: 0;
}

.booking-body input,
.booking-body select {
  height: 44px;
  padding: 0 12px;
}

.booking-body textarea {
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.6;
}

.booking-body input:focus,
.booking-body select:focus,
.booking-body textarea:focus {
  border-color: #7bc4e0;
  box-shadow: 0 0 0 3px rgba(37, 137, 183, 0.1);
}

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

.booking-body label.consent-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
}

.consent-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy-2);
}

.booking-modal footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.service-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto auto 1fr;
  width: min(440px, 100vw);
  visibility: hidden;
  background: #ffffff;
  box-shadow: -22px 0 54px rgba(18, 27, 49, 0.2);
  transform: translateX(102%);
  transition: 220ms ease;
}

.service-sheet.is-open {
  visibility: visible;
  transform: translateX(0);
}

.sheet-handle {
  display: none;
}

.sheet-content {
  min-height: 0;
  padding: 22px;
  overflow-y: auto;
}

.sheet-hero {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background: var(--sky);
}

.sheet-hero strong {
  font-size: 17px;
}

.sheet-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.sheet-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.sheet-section h3 {
  margin: 0 0 14px;
  font-size: 14px;
}

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

.detail-grid div {
  display: grid;
  gap: 5px;
}

.detail-grid span {
  color: var(--muted);
  font-size: 10px;
}

.detail-grid strong {
  font-size: 12px;
  line-height: 1.5;
}

.service-timeline {
  display: grid;
}

.service-timeline div {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 18px;
}

.service-timeline div::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: #d8dfe3;
}

.service-timeline div:last-child::before {
  display: none;
}

.service-timeline i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.service-timeline p {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 12px;
}

.service-timeline small {
  color: var(--muted);
  font-size: 10px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
  opacity: 0;
  background: rgba(7, 8, 35, 0.34);
  transition: 180ms ease;
}

.sheet-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.app-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 230px;
  padding: 14px 16px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  border-radius: 7px;
  color: #ffffff;
  background: var(--navy-2);
  box-shadow: var(--shadow);
  font-weight: 800;
  transition: 180ms ease;
}

.app-toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.app-toast svg {
  color: var(--mint);
}

.quick-icon.violet {
  color: #355f78;
  background: #e9f3f7;
}

.booking-price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: var(--sky);
}

.booking-price span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #286d8b;
  font-size: 11px;
  font-weight: 900;
}

.booking-price svg {
  width: 16px;
}

.booking-price strong {
  grid-row: span 2;
  align-self: center;
  color: var(--navy);
  font-size: 18px;
}

.booking-price small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.interest-program {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.interest-program .section-heading h3 {
  margin: 5px 0 4px;
  font-size: 21px;
}

.program-mark,
.private-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: #315d73;
  border: 1px solid #cfe4eb;
  background: #eef8fa;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.program-mark svg,
.private-mark svg {
  width: 15px;
}

.interest-picker {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 16px 0 20px;
}

.interest-picker > div:first-child {
  display: grid;
  gap: 5px;
}

.interest-picker small {
  color: var(--muted);
  font-size: 10px;
}

.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-chips button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  color: #495264;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.interest-chips button.is-selected {
  color: var(--navy);
  border-color: #9fcddd;
  background: var(--sky);
}

.interest-chips svg {
  width: 15px;
}

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

.activity-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.activity-card:hover {
  border-color: #b9d7e1;
  box-shadow: 0 10px 24px rgba(18, 27, 49, 0.07);
  transform: translateY(-2px);
}

.activity-card-top,
.activity-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.activity-category,
.activity-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 900;
}

.activity-category {
  color: #855f0b;
  background: var(--gold-soft);
}

.activity-match {
  color: var(--success);
  background: var(--mint-soft);
}

.activity-match svg {
  width: 12px;
}

.activity-card h4 {
  margin: 15px 0 12px;
  font-size: 17px;
}

.activity-card > p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card > p svg {
  flex: 0 0 auto;
  width: 14px;
  color: var(--blue);
}

.activity-card-bottom {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.activity-card-bottom > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.activity-card-bottom strong {
  color: var(--coral);
  font-size: 18px;
}

.activity-card-bottom small {
  font-size: 9px;
}

.activity-card-bottom svg {
  width: 15px;
}

.activity-description {
  margin: 0 0 14px;
  color: #444c5c;
  font-size: 12px;
  line-height: 1.8;
}

.activity-highlights {
  display: grid;
  gap: 9px;
}

.activity-highlights span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.activity-highlights svg {
  width: 15px;
  color: var(--success);
}

.activity-join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 0;
}

.activity-join > div {
  display: grid;
  gap: 5px;
}

.activity-join small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.contact-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #a3453d;
  border-radius: 50%;
  background: var(--coral-soft);
  font-weight: 950;
}

.contact-item > span:nth-child(2),
.contact-empty span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contact-item small,
.contact-empty small,
.contact-form-heading small {
  color: var(--muted);
  font-size: 10px;
}

.contact-item button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--danger);
  border: 0;
  background: transparent;
}

.contact-item button svg {
  width: 17px;
}

.contact-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  color: var(--muted);
  background: #f7f9fa;
}

.contact-form-heading {
  display: grid;
  gap: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.message-empty,
.memo-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 220px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.message-empty svg,
.memo-empty svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.message-empty small,
.memo-empty small {
  font-size: 10px;
}

.memo-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
  align-items: start;
  gap: 20px;
}

.memo-composer,
.memo-library {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.memo-composer {
  padding: 20px;
}

.memo-composer-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.memo-composer-heading > div,
.memo-library-heading > div:first-child {
  display: grid;
  gap: 5px;
}

.memo-composer-heading small,
.memo-library-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.memo-ai-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #795b0c;
  border-radius: 8px;
  background: var(--gold-soft);
}

.memo-composer form {
  display: grid;
  gap: 15px;
  padding-top: 18px;
}

.memo-composer label {
  display: grid;
  gap: 7px;
  color: #3e4655;
  font-size: 11px;
  font-weight: 850;
}

.memo-composer input,
.memo-composer select,
.memo-composer textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: #ffffff;
  font: inherit;
}

.memo-composer input,
.memo-composer select {
  height: 44px;
  padding: 0 12px;
}

.memo-composer textarea {
  padding: 12px;
  resize: vertical;
  line-height: 1.7;
}

.memo-composer input:focus,
.memo-composer select:focus,
.memo-composer textarea:focus {
  border-color: #7bc4e0;
  box-shadow: 0 0 0 3px rgba(37, 137, 183, 0.1);
}

.memo-composer form > .primary-button {
  justify-self: stretch;
}

.memo-safety {
  padding: 11px 12px;
  margin: 14px 0 0;
  color: #9a3d35;
  border-left: 3px solid var(--coral);
  background: var(--coral-soft);
  font-size: 11px;
  line-height: 1.6;
}

.memo-draft-editor {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.memo-draft-label,
.memo-editor-actions,
.memo-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.memo-draft-label span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 11px;
  font-weight: 900;
}

.memo-draft-label svg {
  width: 15px;
}

.memo-draft-label small {
  color: var(--muted);
  font-size: 10px;
}

.memo-editor-actions {
  justify-content: flex-end;
}

.memo-library {
  overflow: hidden;
}

.memo-library-heading {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.memo-library-heading h3 {
  margin: 0;
  font-size: 16px;
}

.segmented.compact {
  margin: 0;
}

.segmented.compact button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}

.memo-list {
  display: grid;
}

.memo-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.memo-item:last-child {
  border-bottom: 0;
}

.memo-check,
.memo-item-actions button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--blue);
  border: 0;
  background: transparent;
}

.memo-check svg,
.memo-item-actions svg {
  width: 18px;
}

.memo-item-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.memo-item-copy > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.memo-item-copy > div:first-child > span {
  padding: 4px 7px;
  color: #75580e;
  border-radius: 4px;
  background: var(--gold-soft);
  font-size: 9px;
  font-weight: 900;
}

.memo-item-copy time,
.memo-item-copy > small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.memo-item-copy svg {
  width: 12px;
}

.memo-item-copy h4 {
  margin: 0;
  font-size: 14px;
}

.memo-item-copy p {
  max-height: 88px;
  margin: 0;
  overflow: hidden;
  color: #4d5565;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-line;
}

.memo-item-actions {
  display: flex;
  gap: 2px;
}

.memo-item-actions button:last-child {
  color: var(--danger);
}

.memo-item.is-completed .memo-item-copy h4,
.memo-item.is-completed .memo-item-copy p {
  color: #8b92a0;
  text-decoration: line-through;
}

@media (max-width: 1040px) {
  :root {
    --rail: 200px;
  }

  .app-header,
  .app-content {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .memo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --header: 64px;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .member-auth {
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
    background: var(--canvas);
  }

  .member-auth-visual {
    min-height: 230px;
    height: 32vh;
  }

  .member-auth-visual img {
    min-height: 230px;
    object-position: center 38%;
  }

  .member-auth-panel {
    width: min(520px, calc(100% - 28px));
    padding: 24px 20px 32px;
    margin-top: -26px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(18, 27, 49, 0.12);
  }

  .member-auth-panel > .mobile-brand {
    margin-bottom: 26px;
  }

  .app-rail {
    display: none;
  }

  .app-workspace {
    margin-left: 0;
  }

  .app-header {
    padding: 0 16px;
  }

  .header-context {
    display: none;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-brand .brand-symbol {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }

  .mobile-brand strong {
    font-size: 17px;
  }

  .city-button {
    display: none;
  }

  .app-content {
    min-height: calc(100vh - 64px - 72px);
    padding: 20px 16px;
  }

  .home-grid,
  .health-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .next-service {
    grid-template-columns: minmax(0, 1.15fr) minmax(130px, 0.85fr);
  }

  .next-service-copy {
    padding: 24px;
  }

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

  .checkin-panel {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(18, 27, 49, 0.08);
    backdrop-filter: blur(14px);
  }

  .bottom-nav > button:not(.book-fab) {
    position: relative;
    display: grid;
    gap: 3px;
    place-items: center;
    min-height: 51px;
    color: #7a8291;
    background: transparent;
    font-size: 10px;
    cursor: pointer;
  }

  .bottom-nav > button:not(.book-fab).is-active {
    color: var(--navy);
  }

  .bottom-nav > button:not(.book-fab).is-active svg {
    stroke-width: 2.6;
  }

  .bottom-nav .message-count {
    position: absolute;
    top: 0;
    left: calc(50% + 8px);
  }

  .book-fab {
    display: grid;
    align-self: start;
    width: 54px;
    height: 54px;
    margin: -22px auto 0;
    place-items: center;
    border: 5px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    background: var(--coral);
    box-shadow: 0 8px 18px rgba(243, 111, 95, 0.28);
    cursor: pointer;
  }

  .book-fab svg {
    width: 24px;
    height: 24px;
  }

  .app-toast {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 14px;
    min-width: 0;
  }

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

@media (max-width: 560px) {
  .member-auth-visual {
    min-height: 205px;
    height: 28vh;
  }

  .member-auth-visual img {
    min-height: 205px;
  }

  .member-auth .auth-copy h1 {
    font-size: 29px;
  }

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

  .app-header {
    padding: 0 12px;
  }

  .header-actions {
    gap: 6px;
  }

  .icon-button,
  .profile-avatar {
    width: 38px;
    height: 38px;
  }

  .app-content {
    padding: 18px 14px 24px;
  }

  .interest-program .section-heading,
  .memo-library-heading {
    align-items: flex-start;
  }

  .program-mark,
  .private-mark {
    min-height: 30px;
    padding: 0 8px;
    font-size: 9px;
  }

  .interest-picker {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .interest-chips button {
    justify-content: center;
  }

  .activity-card {
    padding: 16px;
  }

  .memo-composer {
    padding: 16px;
  }

  .memo-library-heading {
    display: grid;
  }

  .memo-item {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 14px;
  }

  .memo-item-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .memo-item-copy > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .booking-price {
    grid-template-columns: 1fr;
  }

  .booking-price strong {
    grid-row: auto;
  }

  .contact-modal .form-row {
    grid-template-columns: 1fr;
  }

  .home-heading,
  .view-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .home-heading h2,
  .view-heading h2 {
    font-size: 23px;
  }

  .desktop-booking {
    display: none;
  }

  .view-heading .primary-button {
    padding: 0 12px;
    font-size: 12px;
  }

  .next-service {
    grid-template-columns: minmax(0, 1fr) 118px;
    min-height: 246px;
  }

  .next-service-copy {
    padding: 20px 18px;
  }

  .next-service-copy > p {
    margin-top: 16px;
    font-size: 16px;
  }

  .next-service h3 {
    margin-bottom: 16px;
    font-size: 20px;
  }

  .companion-line {
    align-items: flex-start;
  }

  .companion-line small {
    max-width: 120px;
  }

  .service-actions {
    margin-top: 17px;
  }

  .next-service img {
    min-height: 246px;
  }

  .home-section,
  .health-panel {
    padding: 17px;
  }

  .quick-actions {
    gap: 9px;
  }

  .quick-actions > button {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 3px 9px;
    min-height: 82px;
    padding: 12px;
  }

  .quick-icon {
    width: 38px;
    height: 38px;
  }

  .quick-actions small {
    display: none;
  }

  .plan-progress {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .progress-ring {
    width: 82px;
    height: 82px;
  }

  .progress-ring::before {
    width: 62px;
    height: 62px;
  }

  .plan-stats > span {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .plan-stats svg {
    grid-row: auto;
  }

  .segmented {
    display: flex;
    overflow-x: auto;
  }

  .segmented button {
    flex: 0 0 auto;
  }

  .service-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 13px;
  }

  .service-date {
    min-height: 60px;
  }

  .service-date strong {
    font-size: 19px;
  }

  .service-card-side .status {
    padding: 0 7px;
  }

  .checkin-panel {
    gap: 20px;
    padding: 20px 16px;
  }

  .mood-options {
    gap: 6px;
  }

  .mood-options button {
    min-height: 74px;
    font-size: 11px;
  }

  .mood-options svg {
    width: 23px;
    height: 23px;
  }

  .health-chart {
    gap: 6px;
  }

  .care-note {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .care-note > span {
    width: 38px;
    height: 38px;
  }

  .care-note button {
    grid-column: 2;
    justify-self: start;
    padding: 0;
  }

  .message-item {
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 13px 14px;
  }

  .message-icon {
    width: 40px;
    height: 40px;
  }

  .profile-hero {
    grid-template-columns: 58px minmax(0, 1fr) 38px;
    gap: 13px;
    padding: 20px 16px;
  }

  .large-avatar {
    width: 58px;
    height: 58px;
    font-size: 21px;
  }

  .profile-hero h2 {
    font-size: 21px;
  }

  .profile-links {
    flex-direction: column;
    gap: 14px;
  }

  .booking-modal {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }

  .booking-modal form {
    max-height: calc(100vh - 18px);
  }

  .booking-modal header,
  .booking-modal footer,
  .booking-body {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .service-sheet {
    top: auto;
    width: 100%;
    max-height: calc(92vh - env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    transform: translateY(102%);
  }

  .service-sheet.is-open {
    transform: translateY(0);
  }

  .sheet-handle {
    display: block;
    width: 42px;
    height: 5px;
    margin: 8px auto 0;
    border-radius: 3px;
    background: #cfd5d9;
  }

  .service-sheet header {
    padding: 12px 16px 16px;
  }

  .sheet-content {
    padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
  }
}

@media (display-mode: standalone) {
  .app-header {
    padding-top: env(safe-area-inset-top);
    min-height: calc(var(--header) + env(safe-area-inset-top));
  }
}
