/* SoftSpot original typefaces (from iOS Quicksand OTF pack) */
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ss-red: #ff474a;
  --ss-red-dark: #e61417;
  /* Teal-green near SoftSpot blue — calmer than system green */
  --ss-green: #3a7f78;
  --ss-green-dark: #2d6560;
  --ss-green-bright: #4a918a;
  --ss-green-bg: #e6f2f1;
  --ss-blue: #82c2d4;
  --ss-blue-dark: #5c9eb0;
  --ss-blue-bg: #e5f2f5;
  --ss-pet-border: rgba(60, 60, 67, 0.12);
  --ss-white: #ffffff;
  /* ColorGlobal.mainGrayColor = UIColor.darkGray */
  --ss-gray: #555555;
  /* ColorGlobal.lightestGrayColor */
  --ss-light: #d9d9d4;
  --ss-bg: #f2f2f7;
  --ss-nav-chrome: rgba(249, 249, 249, 0.92);
  --ss-text: #555555;
  /* Darker than #8a8a8a for readable secondary copy on light surfaces */
  --ss-muted: #6b6b6b;
  --ss-separator: rgba(85, 85, 85, 0.18);
  --ss-tint: #007aff;
  --phone-w: 420px;
  /* Silver device frame aspect (454×851 @4× → 1816×3404) */
  --phone-h: calc(var(--phone-w) * 851 / 454);
  /* Even L/R; matched to geometric frame hole */
  --frame-inset-l: 3.9648%;
  --frame-inset-t: 1.9976%;
  --frame-inset-r: 3.9648%;
  --frame-inset-b: 2.0564%;
  /* Match punched hole; cqw keeps corners circular */
  --screen-radius: 12.98cqw;
  --island-w: 34%;
  --island-h: 23px;
  --island-top: 6px;
  --safe-top: calc(var(--island-top) + var(--island-h) + 6px);
  --safe-bottom: 28px;
  --login-y: 22px;
  --tab-h: 44px;
  --edge: 14px;
  --nav-edge: 12px;
  --ss-font: "Quicksand", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ss-screen-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  /* Compact type scale for phone mock */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-base: 14px;
  --fs-lg: 15px;
  --fs-title: 16px;
  --fs-btn: 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--ss-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(ellipse at 30% 10%, rgba(130, 194, 212, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(255, 71, 74, 0.08), transparent 45%),
    #1a2a32;
  color: var(--ss-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 16px;
}

.demo-chrome {
  width: min(420px, 100%);
  color: #c5d5db;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
}

.demo-chrome a {
  color: var(--ss-blue);
  font-weight: 600;
  text-decoration: none;
}

.demo-line {
  color: #e8f2f5;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.demo-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(130, 194, 212, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
}

.demo-notes p {
  color: #b7c8ce;
  font-size: 12.5px;
  font-weight: 400;
}

.demo-disclaimer {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(130, 194, 212, 0.18);
  font-size: 12px !important;
}

.demo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(130, 194, 212, 0.18);
  color: var(--ss-blue);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* ——— Silver iPhone frame (PNG chrome overlay + content clipped to display) ——— */
.iphone-12-pro {
  width: var(--phone-w);
  height: var(--phone-h);
  position: relative;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.iphone-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  z-index: 30;
  /* Smooth chrome when scaled — avoid nearest-neighbor jaggies */
  image-rendering: auto;
  -webkit-user-drag: none;
}

/* App content sits under the bezel; silver PNG covers the seams */
.phone-screen {
  position: absolute;
  left: var(--frame-inset-l);
  top: var(--frame-inset-t);
  right: var(--frame-inset-r);
  bottom: var(--frame-inset-b);
  background: var(--ss-bg);
  border-radius: var(--screen-radius);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  z-index: 1;
  /* No clip-path — it stair-steps against the PNG hole */
  font-size: var(--fs-base);
  line-height: 1.35;
  container-type: size;
  container-name: phone-screen;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Login — one continuous teal wash behind status bar + welcome */
body:not(.is-authenticated) .phone-screen {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(130, 194, 212, 0.5), transparent 52%),
    linear-gradient(180deg, #c5e6ed 0%, #dff0f4 14%, var(--ss-blue-bg) 42%, #fff 78%);
}

body:not(.is-authenticated) .status-bar {
  background: transparent;
  color: var(--ss-text);
}

body:not(.is-authenticated) .app-body {
  background: transparent;
}

/* Status bar — time | Dynamic Island | signal + wifi + battery */
.status-bar {
  height: var(--safe-top);
  min-height: var(--safe-top);
  padding: var(--island-top) 16px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--island-w) minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
  color: var(--ss-text);
  pointer-events: none;
  box-sizing: border-box;
}

.status-time {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  justify-self: start;
  line-height: 1;
  padding-left: 2px;
}

.status-island-gap {
  height: var(--island-h);
  width: 100%;
  /* Reserves the oval between time and icons — frame PNG draws the pill */
  pointer-events: none;
}

.status-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: var(--island-h);
  justify-self: end;
  overflow: visible;
}

.status-icons svg {
  display: block;
  flex-shrink: 0;
  overflow: visible;
}

.status-icons .status-signal {
  width: 17px;
  height: 11px;
}

.status-icons .status-wifi {
  width: 15px;
  height: 11px;
}

.status-icons .status-battery {
  width: 25px;
  height: 12px;
}

.home-indicator {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--safe-bottom);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  z-index: 7;
  pointer-events: none;
}

.home-indicator span {
  width: 36%;
  max-width: 128px;
  height: 5px;
  border-radius: 3px;
  background: #1c1c1e;
  opacity: 0.9;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 10px;
  color: var(--ss-gray);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.login-brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.app-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  animation: screenIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.active {
  display: flex;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

/* Welcome / Auth — centered stack; gradient on .phone-screen */
.screen-welcome {
  background: transparent;
  padding: var(--login-y) var(--edge);
  padding-bottom: calc(var(--login-y) + var(--safe-bottom));
  justify-content: center;
  align-items: stretch;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.login-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  width: 100%;
  max-width: 100%;
}

.brand-mark {
  text-align: center;
  margin: 0;
  flex-shrink: 0;
  padding-top: 0;
}

.brand-mark img {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  box-shadow: 0 6px 16px rgba(82, 150, 170, 0.28);
}

.brand-mark h1 {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #2c2c2e;
  letter-spacing: -0.03em;
}

.brand-mark p {
  margin-top: 5px;
  color: #3a3a3c;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  padding: 0 8px;
}

.screen-welcome .login-card {
  margin: 0;
  flex-shrink: 0;
  padding: 16px 14px;
}

.screen-welcome #login-form .btn-green {
  margin-top: 22px;
}

.screen-welcome .field label {
  color: #3a3a3c;
  font-weight: 600;
}

.screen-welcome .field input {
  color: #2c2c2e;
  font-weight: 500;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: var(--fs-btn);
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.98); opacity: 0.92; }

.btn-red,
.btn-green {
  background: var(--ss-green);
  color: #fff;
}
.btn-red:hover,
.btn-green:hover { background: var(--ss-green-dark); }

.btn-blue {
  background: var(--ss-blue);
  color: #fff;
}
.btn-blue:hover { background: var(--ss-blue-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ss-blue-dark);
  border: none;
  font-weight: 500;
  font-size: var(--fs-md);
}

.btn-ghost:active {
  opacity: 0.45;
}

.btn-block { width: 100%; }

.btn-apple-pay {
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-apple-pay:hover { background: #000; }

.or-divider {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--ss-muted);
  margin: 0 0 10px;
}

.screen-login {
  background: var(--ss-bg);
  padding: 8px var(--edge) 16px;
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 12px;
  box-shadow: 0 1px 0 var(--ss-separator);
  margin-top: 0;
}

.login-card h2 {
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.login-card .hint {
  font-size: var(--fs-sm);
  color: var(--ss-muted);
  margin-bottom: 12px;
  font-weight: 400;
}

.field {
  margin-bottom: 10px;
}

.field label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ss-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 400;
  outline: none;
  background: var(--ss-bg);
  color: var(--ss-text);
  letter-spacing: -0.01em;
}

.field input:focus {
  box-shadow: 0 0 0 3px rgba(130, 194, 212, 0.45);
}

/* Brand line — larger SoftSpot mark; login teal wash once logged in */
.nav-brand-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px var(--edge) 10px;
  background: rgba(249, 249, 249, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  flex-shrink: 0;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.nav-brand span {
  font-size: 20px;
  font-weight: 700;
  color: var(--ss-text);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

/* Auth chrome — same teal top wash as login .phone-screen (status + logo strip) */
body.is-authenticated {
  /* One paint for status + brand / chat-header so the join reads continuous */
  --ss-auth-chrome-h: calc(var(--safe-top) + 56px);
  --ss-auth-chrome:
    radial-gradient(ellipse at 20% 0%, rgba(130, 194, 212, 0.5), transparent 52%),
    linear-gradient(180deg, #c5e6ed 0%, #dff0f4 40%, var(--ss-blue-bg) 100%);
}

body.is-authenticated .status-bar {
  color: var(--ss-text);
  background-color: #c5e6ed;
  background-image: var(--ss-auth-chrome);
  background-size: 100% var(--ss-auth-chrome-h);
  background-position: top center;
  background-repeat: no-repeat;
}

body.is-authenticated .nav-brand-bar {
  padding: 2px var(--edge) 14px;
  background-color: var(--ss-blue-bg);
  background-image: var(--ss-auth-chrome);
  background-size: 100% var(--ss-auth-chrome-h);
  background-position: 0 calc(-1 * var(--safe-top));
  background-repeat: no-repeat;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.is-authenticated .nav-brand span {
  color: var(--ss-text);
}

body.is-authenticated .nav-brand img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  background: #fff;
}

/* Thread header — same frosted bar as My Pets nav */
body.is-authenticated .chat-header {
  color: var(--ss-text);
  background: var(--ss-nav-chrome);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background-image: none;
  border-bottom: 0.5px solid var(--ss-separator);
}

body.is-authenticated .live-pill {
  display: none;
}

body.is-authenticated .live-pill.ended {
  display: none;
}

body.is-authenticated .chat-header .end-chat {
  color: var(--ss-text);
  background: rgba(85, 85, 85, 0.12);
}

/* Main shell — translucent nav + tab bars */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px var(--edge) 10px;
  background: var(--ss-nav-chrome);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--ss-separator);
  flex-shrink: 0;
  min-height: 44px;
  position: relative;
  z-index: 2;
  gap: 8px;
}

.nav-bar h2 {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: static;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  text-align: left;
  color: var(--ss-text);
}

#screen-flow .nav-bar {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: center;
  padding: 8px var(--edge) 12px;
}

#screen-flow .nav-bar h2 {
  grid-column: 2;
  text-align: center;
  flex: none;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 4px 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
  color: var(--ss-text);
}

#screen-chat .nav-bar h2 {
  font-family: var(--ss-screen-font);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ss-text);
}

#screen-flow .nav-btn.back {
  grid-column: 1;
  justify-self: start;
}

#screen-flow .nav-side {
  grid-column: 3;
  justify-self: end;
}

#screen-flow .scroll {
  padding-top: 8px;
}

#screen-pet-detail .nav-bar,
#screen-visit-detail .nav-bar,
#screen-payments .nav-bar,
#screen-services .nav-bar,
#screen-notifications .nav-bar,
#screen-push-settings .nav-bar,
#screen-payment-method .nav-bar {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
}

#screen-pet-detail .nav-bar h2,
#screen-visit-detail .nav-bar h2,
#screen-payments .nav-bar h2,
#screen-notifications .nav-bar h2,
#screen-push-settings .nav-bar h2,
#screen-payment-method .nav-bar h2 {
  text-align: center;
  font-family: var(--ss-screen-font);
  font-size: 13px;
  font-weight: 600;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  color: var(--ss-text);
}

#screen-services .nav-bar h2 {
  text-align: center;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  color: var(--ss-text);
}

.flow-step-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ss-text);
  margin: 4px 0 20px;
  line-height: 1.2;
}

/* Old centering spacers — collapse leading ones so title hugs --edge */
.nav-bar > .nav-side:first-child {
  display: none;
}

.nav-side {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--ss-blue-dark);
  cursor: pointer;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 28px;
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
  flex-shrink: 0;
}

.nav-btn.back {
  padding-left: 0;
  color: var(--ss-blue-dark);
  max-width: 42%;
}

.nav-btn.back svg {
  flex-shrink: 0;
  width: 10px;
  height: 16px;
}

.nav-btn.icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(130, 194, 212, 0.14);
  color: var(--ss-blue-dark);
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-btn.icon:active {
  opacity: 0.5;
}

.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 8px var(--edge) 72px;
  background: var(--ss-bg);
}

#screen-flow .scroll {
  padding-bottom: 96px;
}

.flow-cta {
  position: sticky;
  bottom: 8px;
  z-index: 3;
  margin-top: 12px;
  padding-top: 8px;
  background: linear-gradient(180deg, transparent, var(--ss-bg) 28%);
}

.flow-cta .btn {
  margin-bottom: 6px;
}

.flow-cta .payments-note {
  margin: 0;
}

.tab-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 4px;
  align-content: start;
  border-top: 0.5px solid var(--ss-separator);
  background: rgba(249, 249, 249, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  flex-shrink: 0;
  min-height: calc(var(--tab-h) + var(--safe-bottom));
  padding: 4px var(--edge) var(--safe-bottom);
  border-bottom-left-radius: var(--screen-radius);
  border-bottom-right-radius: var(--screen-radius);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.tab {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  color: var(--ss-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 2px 2px 0;
  min-width: 0;
  height: var(--tab-h);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.tab .glyph {
  width: 28px;
  height: 25px;
  display: grid;
  place-items: center;
  line-height: 1;
}

.tab .glyph svg {
  width: 24px;
  height: 24px;
  display: block;
}

.tab.active {
  color: var(--ss-green-bright);
}

.tab:active {
  opacity: 0.55;
}

.section-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--ss-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 18px 0 8px 2px;
  text-align: left;
}

.section-label:first-child {
  margin-top: 4px;
}

.visit-card,
.plan-card,
.pet-card,
.activity-card,
.faq-card,
.notif-card {
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  box-shadow: 0 0.5px 0 var(--ss-separator);
  -webkit-tap-highlight-color: transparent;
}

.visit-card:active,
.plan-card:active,
.pet-card:active {
  transform: scale(0.985);
  opacity: 0.92;
}

.visit-card .row,
.pet-card .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.visit-card h3,
.plan-card h3,
.pet-card h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.visit-card p,
.plan-card p,
.pet-card p {
  font-size: var(--fs-sm);
}

.visit-card p,
.plan-card p,
.pet-card p,
.activity-card p,
.notif-card p,
.faq-card p {
  font-size: 13px;
  color: var(--ss-muted);
  margin-top: 3px;
  font-weight: 400;
  line-height: 1.35;
}

.view-more-link {
  display: inline-block;
  margin: 2px 0 4px 2px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ss-green);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.view-more-link:hover {
  color: var(--ss-green-dark);
  text-decoration: underline;
}

.view-more-link:active {
  opacity: 0.7;
}

.badge {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(107, 119, 133, 0.16);
  color: #5c6773;
  white-space: nowrap;
}

.badge.red,
.badge.green,
.badge.confirmed {
  background: var(--ss-green-bg);
  color: var(--ss-green-dark);
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 10px;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 18px rgba(34, 58, 76, 0.06), 0 0.5px 0 var(--ss-separator);
  -webkit-tap-highlight-color: transparent;
}

.settings-link:active {
  opacity: 0.85;
}

.settings-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-link-text strong,
.settings-link-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-link-text span {
  font-size: 13px;
  color: var(--ss-muted);
  font-weight: 400;
}

.settings-link .chevron {
  color: #c7c7cc;
  flex-shrink: 0;
}

.payments-note {
  font-size: 12px;
  color: var(--ss-muted);
  margin: -2px 0 10px 2px;
  font-weight: 400;
  line-height: 1.35;
}

.plan-card-active {
  box-shadow: 0 0 0 2px var(--ss-green-bright);
  background: var(--ss-green-bg);
}

#screen-flow,
#screen-payments,
#screen-visit-detail,
#screen-services,
#screen-notifications,
#screen-payment-method {
  padding-bottom: var(--safe-bottom);
}

#screen-flow .scroll,
#screen-payments .scroll {
  padding-bottom: 28px;
}

.flow-steps {
  display: none;
}

.flow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1d1d6;
}

.flow-dot.active {
  background: var(--ss-green-bright);
  transform: scale(1.15);
}

.flow-dot.done {
  background: var(--ss-green);
}

.flow-hint {
  font-size: 14px;
  color: var(--ss-muted);
  margin-bottom: 12px;
  line-height: 1.35;
}

.flow-hint--pet-pick,
.flow-hint--vet-slot,
.flow-hint--reschedule {
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pet-pick-list {
  margin-bottom: 4px;
}

.pet-pick-list .pet-card {
  margin-bottom: 8px;
}

.pet-pick-list .pet-card:last-child {
  margin-bottom: 0;
}

.flow-add-pet {
  margin-top: 6px;
  margin-bottom: 0;
}

.flow-pet-continue {
  margin-top: 22px;
}

.pet-pick.selected,
.service-card.selected {
  box-shadow: 0 0 0 2px var(--ss-green-bright);
  background: var(--ss-green-bg);
}

.plan-card-active,
#screen-services .plan-card.selected {
  box-shadow: none;
  background: var(--ss-green-bg);
  outline: none;
}

.plan-card-active h3,
#screen-services .plan-card.selected h3 {
  color: var(--ss-green-dark);
  font-weight: 700;
}

.plan-card-active .badge.green,
#screen-services .plan-card.selected .badge.green {
  background: var(--ss-green);
  color: #fff;
}

/* Vet selection: green fill + typography — no stroke/outline */
.vet-card.selected,
.vet-card.compact.selected {
  box-shadow: none;
  background: var(--ss-green-bg);
  outline: none;
}

.vet-card.selected .vet-info h3,
.vet-card.compact.selected .vet-info h3 {
  font-weight: 700;
  color: var(--ss-green-dark);
}

.vet-card.selected .vet-years,
.vet-card.compact.selected .vet-years,
.vet-card.selected .vet-specialty,
.vet-card.compact.selected .vet-specialty {
  color: var(--ss-green);
  font-weight: 500;
}

.vet-card.selected .vet-select,
.vet-card.compact .vet-select {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.vet-card.selected .vet-select:focus,
.vet-card.compact .vet-select:focus {
  outline: none;
}

.btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.field select {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 17px;
  background: var(--ss-bg);
  color: var(--ss-text);
  outline: none;
  appearance: none;
}

.date-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.date-chip {
  flex: 0 0 auto;
  border: none;
  background: #fff;
  border-radius: 20px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ss-text);
  cursor: pointer;
}

.date-chip.selected {
  background: var(--ss-blue);
  color: #fff;
}

.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.slot-grid.compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 0;
}

.slot-chip.compact {
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
}

.schedule-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vet-step-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#flow-body.schedule-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

#flow-body.vet-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

#screen-flow .scroll:has(#flow-body.schedule-step),
#screen-flow .scroll:has(#flow-body.vet-step) {
  flex: 1;
  padding-bottom: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.schedule-content {
  flex: 1;
  min-height: 0;
}

.schedule-footer {
  flex-shrink: 0;
  padding-top: 10px;
  margin-top: auto;
  background: linear-gradient(180deg, transparent, var(--ss-bg) 24%);
}

.vet-step-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.vet-step-footer {
  flex-shrink: 0;
  padding-top: 12px;
  margin-top: auto;
  border-top: none;
  box-shadow: none;
  background: var(--ss-bg);
}

.schedule-date-block {
  margin-bottom: 4px;
}

.schedule-date-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: none;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ss-text);
  cursor: pointer;
  box-shadow: 0 0.5px 0 var(--ss-separator);
}

.schedule-date-sheet {
  margin-top: 8px;
  padding: 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0.5px 0 var(--ss-separator);
}

.date-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.date-chip.compact {
  padding: 7px 8px;
  font-size: 11px;
  border-radius: 8px;
  text-align: center;
}

.schedule-divider {
  height: 1px;
  background: var(--ss-separator);
  margin: 12px 0 10px;
}

.schedule-content .section-label {
  margin-top: 0;
  margin-bottom: 6px;
}

.slot-chip {
  border: none;
  background: #fff;
  border-radius: 10px;
  padding: 14px 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ss-text);
  cursor: pointer;
}

.slot-chip.selected {
  background: var(--ss-blue);
  color: #fff;
}

.slot-chip.disabled,
.slot-chip:disabled {
  opacity: 0.28;
  cursor: default;
}

.vet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.vet-card {
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.vet-list.compact {
  gap: 8px;
  margin-bottom: 0;
}

.vet-card.compact {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.vet-card.compact .vet-select {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.vet-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.vet-card.compact .vet-info h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.vet-card.compact .vet-years {
  font-size: 11px !important;
  margin-top: 1px !important;
}

.vet-card.compact .vet-specialty {
  font-size: 11px;
  color: var(--ss-muted);
  margin-top: 1px;
  line-height: 1.25;
  min-height: calc(1.25em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vet-profile-link {
  align-self: center;
  flex-shrink: 0;
  border: none;
  background: var(--ss-blue-bg);
  border-radius: 8px;
  padding: 6px 8px;
  margin-right: 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: var(--ss-blue-dark);
  cursor: pointer;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.vet-profile-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  background: var(--ss-bg);
}

.vet-profile-sheet.show {
  display: flex;
  flex-direction: column;
}

.vet-profile-fullscreen {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--ss-bg);
}

.vet-profile-topbar {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  padding: 8px var(--edge);
  background: rgba(249, 249, 249, 0.94);
  border-bottom: 0.5px solid var(--ss-separator);
  flex-shrink: 0;
}

.vet-profile-topbar h2 {
  text-align: center;
  font-family: var(--ss-screen-font);
  font-size: 14px;
  font-weight: 600;
  color: #3d6b78;
}

.vet-profile-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px var(--edge) 12px;
  text-align: center;
}

.vet-profile-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 10px var(--edge) calc(10px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--ss-bg) 24%);
}

.vet-profile-footer .btn-green {
  background: var(--ss-green);
  color: #fff;
  font-family: inherit;
  font-size: var(--fs-btn);
  font-weight: 600;
  letter-spacing: -0.02em;
  border-radius: 10px;
}

.vet-profile-footer-preview {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ss-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vet-profile-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
}

.vet-profile-photo.large {
  width: 96px;
  height: 96px;
}

.vet-profile-panel h3,
.vet-profile-scroll h3 {
  font-size: 18px;
  font-weight: 700;
}

.vet-profile-years {
  font-size: 12px;
  font-weight: 600;
  color: var(--ss-blue-dark);
  margin-top: 4px;
}

.vet-profile-specialty {
  font-size: 13px;
  color: var(--ss-muted);
  margin-top: 2px;
}

.vet-profile-practice {
  font-size: 12px;
  color: var(--ss-text);
  margin-top: 6px;
  font-weight: 500;
}

.vet-profile-bio {
  font-size: 13px;
  color: var(--ss-text);
  line-height: 1.4;
  margin: 0 0 8px;
  text-align: left;
}

.vet-review-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  text-align: left;
  box-shadow: 0 0.5px 0 var(--ss-separator);
}

.vet-review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.vet-review-head strong {
  font-size: 13px;
}

.vet-stars {
  color: #e6a800;
  font-size: 12px;
  letter-spacing: 1px;
}

.vet-review-card p {
  font-size: 12px;
  color: var(--ss-muted);
  line-height: 1.35;
}

.payment-loader {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(249, 249, 249, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.payment-loader.show {
  display: flex;
}

.payment-loader-card {
  text-align: center;
  padding: 24px 20px;
}

.payment-loader-card h3 {
  font-family: var(--ss-screen-font);
  font-size: 16px;
  font-weight: 600;
  margin-top: 14px;
  color: var(--ss-text);
}

.payment-loader-card p {
  font-size: 13px;
  color: var(--ss-muted);
  margin-top: 6px;
}

.payment-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid var(--ss-blue-bg);
  border-top-color: var(--ss-green-bright);
  border-radius: 50%;
  animation: payment-spin 0.8s linear infinite;
}

@keyframes payment-spin {
  to { transform: rotate(360deg); }
}

.confirm-modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.confirm-modal.show {
  display: flex;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.confirm-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 270px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  animation: confirm-modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes confirm-modal-in {
  from { transform: scale(1.06); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.confirm-modal-message {
  padding: 20px 16px 18px;
  font-family: var(--ss-screen-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ss-text);
}

.confirm-modal-actions {
  display: flex;
  border-top: 0.5px solid var(--ss-separator);
}

.confirm-modal-actions--single .btn-green {
  border-radius: 0;
}

.confirm-modal-actions .btn {
  flex: 1;
  border-radius: 0;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
}

.confirm-modal-actions .btn-ghost {
  color: var(--ss-muted);
  font-weight: 500;
  border-right: 0.5px solid var(--ss-separator);
}

.confirm-modal-actions .btn-ghost:active {
  background: rgba(0, 0, 0, 0.04);
  opacity: 1;
}

.confirm-modal-actions .btn-green {
  background: transparent;
  color: var(--ss-green);
}

.confirm-modal-actions .btn-green:active {
  background: var(--ss-green-bg);
  opacity: 1;
}

.booking-transition {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(249, 249, 249, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.booking-transition.show {
  display: flex;
  opacity: 1;
}

.booking-transition-card {
  text-align: center;
  padding: 28px 22px;
  max-width: 280px;
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.35s ease;
}

.booking-transition.phase-processing .booking-transition-card {
  transform: scale(1);
}

.booking-transition.phase-confirm .booking-transition-card {
  transform: scale(1);
  animation: booking-card-settle 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes booking-card-settle {
  from { transform: scale(0.96); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}

.booking-transition-icon {
  min-height: 48px;
  display: grid;
  place-items: center;
}

.booking-transition-card h3 {
  font-family: var(--ss-screen-font);
  font-size: 17px;
  font-weight: 600;
  margin-top: 16px;
  color: var(--ss-text);
  letter-spacing: -0.02em;
}

.booking-transition-card p {
  font-size: 13px;
  color: var(--ss-muted);
  margin-top: 8px;
  line-height: 1.4;
}

.booking-success-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ss-green-bright);
  display: grid;
  place-items: center;
  animation: booking-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.booking-success-check::after {
  content: "";
  width: 11px;
  height: 20px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -2px);
}

@keyframes booking-pop {
  from { transform: scale(0.55); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.vet-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.vet-info h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.vet-info p {
  font-size: 13px;
  color: var(--ss-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.vet-years {
  color: var(--ss-blue-dark) !important;
  font-weight: 600 !important;
}

.vet-bio {
  margin-top: 4px !important;
}

.plan-card .price {
  font-size: 22px;
  font-weight: 700;
  color: var(--ss-green-dark);
  margin-top: 6px;
  letter-spacing: -0.03em;
}

.plan-card ul {
  margin-top: 8px;
  padding-left: 16px;
  font-size: 13px;
  color: var(--ss-muted);
  font-weight: 400;
}

.plan-card li { margin-bottom: 3px; }

.plan-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.plan-actions .btn {
  flex: 1;
  padding: 11px;
  font-size: 15px;
  border-radius: 10px;
}

.pet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  border: none;
  background: var(--ss-blue-bg);
  overflow: hidden;
}

.pet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pet-avatar.profile-size {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
  font-size: 34px;
}

.pet-card .info { flex: 1; }

/* Chat — Messages-like bubbles */
.chat-header {
  color: var(--ss-text);
  background: var(--ss-nav-chrome);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--ss-separator);
  padding: 6px var(--edge) 10px;
  flex-shrink: 0;
}

.chat-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.chat-header-center {
  justify-self: center;
}

.chat-header-end {
  justify-self: end;
  min-width: 0;
}

.chat-thread-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--ss-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.chat-thread-back-link svg {
  flex-shrink: 0;
}

.chat-header .chat-thread-status.badge.green {
  background: var(--ss-green);
  color: #fff;
  font-weight: 600;
}

.chat-thread-status {
  flex-shrink: 0;
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--ss-bg);
}

.bubble {
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.bubble .meta {
  font-size: 11px;
  margin-top: 3px;
  opacity: 0.65;
  font-weight: 400;
}

.bubble.user {
  align-self: flex-end;
  background: var(--ss-blue-bg);
  color: var(--ss-text);
  border: 0.5px solid rgba(130, 194, 212, 0.55);
  border-bottom-right-radius: 4px;
}

.bubble.vet {
  align-self: flex-start;
  background: #fff;
  color: var(--ss-text);
  border: 0.5px solid rgba(58, 127, 120, 0.2);
  border-bottom-left-radius: 4px;
}

.bubble.system {
  align-self: center;
  background: transparent;
  color: var(--ss-muted);
  font-size: 12px;
  padding: 4px 8px;
  text-align: center;
  max-width: 90%;
}

.chat-compose {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 8px 16px 10px 16px;
  background: rgba(249, 249, 249, 0.94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 0.5px solid var(--ss-separator);
}

.chat-compose textarea,
.chat-compose input {
  flex: 1;
  border: 0.5px solid var(--ss-separator);
  border-radius: 22px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.01em;
  outline: none;
  background: #fff;
  color: var(--ss-text);
  min-height: 44px;
  max-height: 132px;
  resize: none;
  overflow-y: hidden;
}

.chat-compose textarea::placeholder,
.chat-compose input::placeholder {
  color: var(--ss-muted);
  font-weight: 400;
}

.chat-compose .btn.send {
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: none;
  place-items: center;
  flex-shrink: 0;
  background: var(--ss-green) !important;
  color: #fff;
  border: none;
}

.chat-compose .btn.send.is-visible {
  display: grid;
}

.chat-compose .btn.send:hover {
  background: var(--ss-green-dark) !important;
}

.chat-compose .btn.send:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.chat-shell.chat-input-focused .chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* When typing, hide attach button so native keyboard isn't crowded. */
.chat-shell.chat-input-focused .attach { display: none; }

.demo-keyboard {
  display: none;
  flex-shrink: 0;
  background: #d1d3d9;
  border-top: 0.5px solid #b8bac0;
  padding: 6px 4px 10px;
}

.demo-keyboard.visible {
  display: none !important;
}

.demo-keyboard-suggest {
  display: flex;
  gap: 6px;
  padding: 0 6px 6px;
  overflow-x: auto;
}

.demo-keyboard-suggest span {
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--ss-text);
  white-space: nowrap;
}

.demo-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 5px;
}

.demo-key {
  min-width: 28px;
  height: 36px;
  padding: 0 6px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 0 #9a9ca3;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ss-text);
}

.demo-key.wide {
  min-width: 42px;
  font-size: 11px;
}

.demo-key.space {
  flex: 1;
  max-width: 140px;
}

.pay-method-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.pay-method-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0.5px 0 var(--ss-separator);
}

.pay-method-row.selected {
  box-shadow: 0 0 0 2px var(--ss-green-bright);
}

.pay-method-pick {
  flex: 1;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-method-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--ss-text);
}

.pay-method-detail {
  font-size: 13px;
  color: var(--ss-muted);
}

.pay-method-remove {
  width: 40px;
  border: none;
  background: transparent;
  color: var(--ss-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

/* Account */
.profile-head {
  text-align: center;
  padding: 4px 0 14px;
}

.profile-head.pet-profile-preview {
  background: #fff;
  border-radius: 14px;
  padding: 18px 14px 14px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(34, 58, 76, 0.06), 0 0.5px 0 var(--ss-separator);
}

.pet-profile-sub {
  color: var(--ss-muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

.pet-card.locked,
.chat-history-card.locked {
  opacity: 0.92;
}

.pet-card .row {
  align-items: center;
}

#screen-account .scroll {
  padding-top: 18px;
  overflow-anchor: none;
}

#screen-account .section-label {
  margin-top: 16px;
}

#screen-account .section-label:first-of-type {
  margin-top: 8px;
}

.account-link-group {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(34, 58, 76, 0.06), 0 0.5px 0 var(--ss-separator);
  margin-bottom: 4px;
}

.account-link-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  border-bottom: 0.5px solid var(--ss-separator);
  background: transparent;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.account-link-row:last-child {
  border-bottom: none;
}

.account-link-row:active {
  background: rgba(0, 0, 0, 0.03);
}

.account-link-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ss-text);
}

.account-link-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--ss-muted);
}

.account-link-row .chevron {
  flex-shrink: 0;
  color: var(--ss-muted);
  opacity: 0.45;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--ss-blue-bg);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 600;
  margin: 0 auto 10px;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-rows {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(34, 58, 76, 0.06), 0 0.5px 0 var(--ss-separator);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--ss-separator);
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
}

.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--ss-text); font-weight: 500; }
.detail-row span:last-child {
  font-weight: 400;
  text-align: right;
  color: var(--ss-muted);
  font-size: var(--fs-sm);
}

/* Pet info rows — smaller than account/settings rows */
#screen-pet-detail .detail-row {
  font-size: var(--fs-xs);
  padding: 8px 12px;
}
#screen-pet-detail .detail-row span:last-child {
  font-size: var(--fs-xs);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  background: rgba(44, 44, 46, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.toast.show { opacity: 1; }

.empty {
  text-align: center;
  color: var(--ss-muted);
  font-size: 15px;
  padding: 28px 12px;
  font-weight: 400;
}

/* Screens without tab bar — avoid extra bottom padding on login (causes scroll) */
#screen-pet-detail {
  padding-bottom: 0;
}

#screen-welcome {
  padding-bottom: calc(var(--login-y) + var(--safe-bottom));
}

.pet-detail-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#screen-pet-detail .pet-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 8px var(--edge) 12px;
  background: var(--ss-bg);
}

.pet-detail-footer {
  flex-shrink: 0;
  padding: 10px var(--edge) calc(10px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--ss-bg) 24%);
  border-top: 0.5px solid var(--ss-separator);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pet-chat-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(34, 58, 76, 0.06), 0 0.5px 0 var(--ss-separator);
  -webkit-tap-highlight-color: transparent;
}

.pet-chat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.pet-chat-card-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ss-text);
  line-height: 1.3;
}

.pet-chat-card-head .badge {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 7px;
}

.pet-chat-card-preview {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ss-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.pet-chat-card:active {
  opacity: 0.85;
}

#screen-pet-detail .section-label {
  margin-top: 14px;
  margin-bottom: 8px;
}

#screen-pet-detail .section-label:first-of-type {
  margin-top: 4px;
}

/* Pet profile title */
#screen-pet-detail .nav-bar h2 {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
  line-height: 1.15;
}

/* Account fields: more native card-like form styling */
#screen-account .login-card {
  border-radius: 16px;
  padding: 16px 14px;
  box-shadow: 0 8px 22px rgba(34, 58, 76, 0.07), 0 0.5px 0 var(--ss-separator);
}

#screen-account .field {
  margin-bottom: 12px;
}

#screen-account .field input {
  min-height: 42px;
  border-radius: 12px;
  background: #f7fafb;
  box-shadow: inset 0 0 0 1px rgba(130, 194, 212, 0.12);
}

#screen-account .btn-green {
  margin-top: 4px;
}

/* Shared subpage polish */
#screen-services .plan-card,
#screen-notifications .notif-card,
#screen-payments .notif-card,
#screen-payments .pay-method-card,
#screen-payments .detail-rows,
#screen-services .detail-rows,
#screen-notifications .detail-rows,
#screen-push-settings .detail-rows {
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(34, 58, 76, 0.06), 0 0.5px 0 var(--ss-separator);
}

#screen-notifications .notif-card,
#screen-services .plan-card {
  margin-bottom: 12px;
}

#screen-services .section-label,
#screen-notifications .section-label,
#screen-payments .section-label,
#screen-push-settings .section-label {
  margin-top: 14px;
}

.embed-mode,
.embed-mode body {
  /* Match portfolio page — never paint black letterboxing around the phone */
  background: #ffffff !important;
  padding: 0;
  margin: 0;
  min-height: 100%;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.embed-mode html {
  overflow: hidden;
  height: 100%;
  width: 100%;
  background: #ffffff !important;
  color-scheme: only light;
}

.embed-mode body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.embed-mode .demo-chrome { display: none; }

/* Phone fills the iframe 1:1 — parent sets the large size */
.embed-mode {
  --phone-w: 100%;
  --phone-h: auto;
}

.embed-mode .iphone-12-pro {
  width: 100%;
  height: 100%;
  aspect-ratio: 454 / 851;
  max-width: 100%;
  max-height: 100%;
  background: transparent !important;
  transform: none;
  overflow: hidden;
  flex-shrink: 0;
}

.embed-mode .tab-bar {
  display: grid;
  flex-shrink: 0;
  visibility: visible;
}

.embed-mode .screen.active {
  display: flex;
  min-height: 0;
}

.embed-mode .phone-screen {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  pointer-events: auto;
}

.embed-mode .iphone-frame-overlay {
  pointer-events: none;
}

/* Fullscreen on real phones — no device chrome; app fills the viewport */
.fs-mode {
  --edge: 16px;
  --nav-edge: 16px;
  --fs-safe-x: 16px;
}

.fs-mode,
.fs-mode body {
  background: var(--ss-bg) !important;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.fs-mode html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--ss-bg) !important;
}

.fs-mode body {
  display: block;
  overflow-x: hidden;
  box-sizing: border-box;
}

.fs-mode .iphone-frame-overlay {
  display: none !important;
}

.fs-mode .iphone-12-pro {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  background: transparent !important;
  transform: none;
  overflow: hidden;
  border-radius: 0;
  position: relative;
}

.fs-mode .phone-screen {
  left: max(var(--fs-safe-x), env(safe-area-inset-left, 0px));
  right: max(var(--fs-safe-x), env(safe-area-inset-right, 0px));
  top: 0;
  bottom: 0;
  width: auto;
  border-radius: 0;
  height: 100%;
}

.fs-mode .tab-bar {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: max(var(--safe-bottom), env(safe-area-inset-bottom, 0px));
}

.fs-mode .status-bar {
  padding-top: max(var(--island-top), env(safe-area-inset-top, 0px));
  min-height: calc(var(--safe-top) + env(safe-area-inset-top, 0px));
  height: auto;
}

.fs-mode .scroll,
.fs-mode #screen-home .scroll,
.fs-mode .screen-welcome,
.fs-mode .pet-detail-scroll,
.fs-mode .vet-step-scroll,
.fs-mode .vet-profile-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 380px) {
  :root {
    --phone-w: min(320px, 90vw);
  }
}

@media (min-width: 720px) {
  :root {
    --phone-w: 420px;
  }
}

/* Service type + booking */
.service-card {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 10px;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
.service-card h3 { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 4px; }
.service-card p { font-size: var(--fs-sm); color: var(--ss-muted); }

.pay-row-editable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.icon-btn {
  border: none;
  background: var(--ss-green-bg);
  color: var(--ss-green-dark);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Chat shell */
.chat-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-shell .chat-header { flex-shrink: 0; }
.chat-shell .chat-thread { flex: 1; min-height: 0; }
.chat-shell .chat-compose,
.chat-shell .demo-keyboard,
.chat-shell .image-picker { flex-shrink: 0; }
.chat-history-list { flex: 1; overflow-y: auto; padding: 12px var(--edge) 18px; background: var(--ss-bg); }

.recent-chat-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 0.5px 0 var(--ss-separator);
  -webkit-tap-highlight-color: transparent;
}

.recent-chat-card .pet-avatar.compact {
  width: 34px;
  height: 34px;
  font-size: 17px;
  margin-top: 1px;
}

.home-visit-card {
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
}

.home-visit-card .info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.home-visit-card h3 {
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  margin: 0;
}

.home-visit-card .visit-when,
.visit-card .visit-when,
.visit-when-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ss-text);
  margin-top: 6px;
  white-space: normal;
  line-height: 1.3;
}

.visit-cal-icon {
  flex-shrink: 0;
  color: var(--ss-blue-dark);
}

.home-visit-card .visit-meta,
.visit-card .visit-meta {
  font-size: 12px;
  color: var(--ss-text);
  margin-top: 4px;
  white-space: normal;
  line-height: 1.35;
}

.visit-meta-label {
  color: var(--ss-muted);
  font-weight: 500;
  margin-right: 4px;
}

.visit-note {
  font-size: 12px;
  color: var(--ss-muted);
  margin-top: 4px;
}

.badge-compact {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  line-height: 1.2;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.recent-chat-card:active { opacity: 0.85; }

.recent-chat-card .info {
  flex: 1;
  min-width: 0;
}

.recent-chat-card h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--ss-text);
}

.recent-chat-card p {
  font-size: var(--fs-xs);
  color: var(--ss-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-ended-banner {
  background: #fff3cd;
  color: #856404;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 8px 12px;
}
.chat-compose.locked { opacity: 0.45; pointer-events: none; }
.chat-compose .attach {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--ss-green-bg);
  color: var(--ss-green-dark);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn.send { background: var(--ss-green) !important; }
.bubble img.chat-img {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  margin-bottom: 4px;
  object-fit: cover;
}
.image-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 0.5px solid var(--ss-separator);
}
.image-picker button {
  border: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--ss-bg);
}
.image-picker img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.chat-header .end-chat {
  font-size: 12px;
  font-weight: 600;
  color: var(--ss-text);
  background: rgba(85, 85, 85, 0.12);
  border: none;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.notif-bell {
  position: relative;
}

.notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e85d4c;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(232, 93, 76, 0.25);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ios-select-field {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: none;
  background: var(--ss-bg);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ss-text);
  cursor: pointer;
}

.ios-picker-option {
  width: 100%;
  display: block;
  border: none;
  background: #fff;
  padding: 13px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ss-blue-dark);
  margin-bottom: 1px;
  cursor: pointer;
}

.ios-picker-sheet {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
}

.ios-picker-sheet[hidden] {
  display: none !important;
}

.ios-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.ios-picker-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #f2f2f7;
  border-radius: 14px 14px 0 0;
  padding: 10px 10px calc(10px + var(--safe-bottom));
}

.ios-picker-title {
  text-align: center;
  font-size: 13px;
  color: var(--ss-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.ios-picker-option {
  width: 100%;
  display: block;
  border: none;
  background: #fff;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ss-blue-dark);
  margin-bottom: 1px;
  cursor: pointer;
}

.ios-picker-option:first-of-type {
  border-radius: 12px 12px 0 0;
}

.ios-picker-option:nth-of-type(2) {
  border-radius: 0 0 12px 12px;
  margin-bottom: 8px;
}

.ios-picker-option.selected {
  font-weight: 700;
  background: #fff;
}

.ios-picker-cancel {
  width: 100%;
  border: none;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ss-text);
  cursor: pointer;
}

#screen-faqs .nav-bar {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
}

#screen-faqs .nav-bar h2 {
  text-align: center;
  font-family: var(--ss-screen-font);
  font-size: 14px;
  font-weight: 600;
  color: #3d6b78;
}

.logout-btn {
  color: #c0392b !important;
}
.live-pill.ended { background: rgba(0,0,0,0.25); }
.date-chip.selected, .slot-chip.selected {
  background: var(--ss-green);
  color: #fff;
}


/* Card brand icons */
.pay-method-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.card-brand-icon {
  flex-shrink: 0;
  border-radius: 3px;
  display: block;
}
.pay-method-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  padding: 4px 0;
}

/* Calendar sheet — compact full-month picker (schedule + reschedule) */
.calendar-sheet {
  position: absolute;
  inset: 0;
  z-index: 46;
  display: flex;
  align-items: flex-end;
}
.calendar-sheet[hidden] { display: none !important; }
.calendar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.calendar-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(86%, 560px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding: 10px 10px calc(10px + var(--safe-bottom));
}
.calendar-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.calendar-head h3 {
  font-size: 14px;
  font-weight: 700;
}
.calendar-close {
  border: none;
  background: none;
  font-size: 22px;
  color: var(--ss-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.calendar-weekdays {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  color: var(--ss-muted);
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}
.calendar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.calendar-month + .calendar-month {
  margin-top: 6px;
}
.calendar-month-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--ss-text);
  letter-spacing: -0.01em;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ss-text);
  cursor: pointer;
  padding: 0;
}
.cal-day.empty { visibility: hidden; pointer-events: none; }
.cal-day.disabled {
  color: var(--ss-muted);
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.cal-day.selected {
  background: var(--ss-green);
  color: #fff;
}
.calendar-hint {
  flex-shrink: 0;
  text-align: center;
  font-size: 11px;
  color: var(--ss-muted);
  margin-top: 6px;
}
.schedule-date-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Chat message avatars replaced below */

/* Visits list cards — single horizontal inset on the card; inner blocks stay flush */
#screen-visits .visit-card,
.visit-card.upcoming,
.visit-card.previous {
  background: #fff;
  border: none;
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 12px var(--edge);
  box-shadow: 0 0.5px 0 var(--ss-separator);
  overflow: hidden;
  cursor: default;
  box-sizing: border-box;
}
.visit-card-main {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
}
.visit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.visit-card-top h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  min-width: 0;
}
.visit-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ss-blue-bg);
  color: var(--ss-blue-dark);
  flex-shrink: 0;
  margin: 0;
}
.visit-status.confirmed {
  background: var(--ss-green-bg);
  color: var(--ss-green-dark);
}
.visit-status.cancelled {
  background: #fdecea;
  color: #c0392b;
}
.visit-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 10px 0 0;
  margin: 0;
  box-sizing: border-box;
}
.visit-card-actions.detail {
  margin-top: 4px;
  padding-top: 10px;
}
.visit-action {
  flex: 0 0 auto;
  padding: 9px 0 !important;
  font-size: 13px !important;
  margin: 0 !important;
}
.btn.danger,
.visit-action.danger {
  color: #c0392b !important;
}

/* Center SoftSpot + flow titles more reliably */
#screen-flow .nav-brand-bar,
#screen-home .nav-brand-bar,
#screen-visits .nav-brand-bar {
  justify-content: center;
}
#screen-flow .nav-brand {
  margin: 0 auto;
}
#screen-flow .nav-bar {
  grid-template-columns: 40px 1fr 40px;
}
#screen-flow .nav-bar h2 {
  grid-column: 2;
  justify-self: center;
  width: 100%;
  text-align: center;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ss-text);
}


/* Home — keep content scrollable when it overflows the phone screen */
#screen-home .scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(8px + var(--safe-bottom));
}
#screen-home .section-label {
  margin: 10px 0 6px 2px;
}
#screen-home .section-label:first-child {
  margin-top: 0;
}
.home-visit-card.compact-home {
  align-items: stretch;
  gap: 12px;
  padding: 12px;
}

.home-card {
  display: flex;
  align-items: stretch;
}

.home-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  width: 52px;
}

.home-card-left .pet-avatar.compact {
  width: 34px;
  height: 34px;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 0;
}

.home-card-pet-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--ss-text);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-card-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-align: left;
}

.home-card-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.home-card-row-icon,
.home-card-row svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--ss-blue-dark);
}

.home-card-row-text {
  flex: 1;
  min-width: 0;
  color: var(--ss-text);
}

.home-card-row--date .home-card-row-text {
  font-weight: 700;
}

.home-card-row--meta .home-card-row-text {
  font-weight: 500;
}

.home-card-row--preview .home-card-row-text {
  color: var(--ss-muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-card-row--preview-multiline {
  align-items: flex-start;
}

.home-card-row--preview-multiline .home-card-row-text {
  color: var(--ss-muted);
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}

.home-card-vet-avatar.compact,
.vet-avatar-img.home-card-vet-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.vet-avatar-fallback.home-card-vet-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ss-blue-bg);
  color: var(--ss-blue-dark);
  font-size: 11px;
  font-weight: 700;
}

.home-card-vet-name {
  max-width: 56px;
  padding: 0 2px;
}

.chat-preview-card .home-card-left {
  width: 56px;
  gap: 5px;
}

.chat-empty-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ss-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-more-link--muted {
  /* Deprecated: payments View more uses SoftSpot green text link */
  color: var(--ss-green);
  display: block;
  margin: 2px 0 4px 2px;
}

.view-more-link--muted:hover {
  color: var(--ss-green-dark);
  text-decoration: underline;
}

.pay-method-card {
  width: 100%;
  margin-bottom: 10px;
  border: none;
  background: #fff;
  border-radius: 14px;
  /* Match .notif-card invoice rows: equal L/R, same content inset */
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(34, 58, 76, 0.06), 0 0.5px 0 var(--ss-separator);
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: default;
  box-sizing: border-box;
}

button.pay-method-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button.pay-method-card:active {
  opacity: 0.88;
}

.pay-method-default {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.pay-method-default .pay-method-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}

.pay-method-default .pay-method-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-method-default .pay-method-number {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ss-text);
}

.pay-method-default .pay-method-exp {
  font-size: 13px;
  font-weight: 400;
  color: var(--ss-muted);
  letter-spacing: -0.01em;
}

/* Card form: match SoftSpot field size — no oversized placeholders */
.pay-card-form .field input,
.input-card-number,
.field-card-number input {
  font-size: var(--fs-base);
  letter-spacing: -0.01em;
  padding: 10px 12px;
}

.pay-card-form .field input::placeholder,
.input-card-number::placeholder,
.field-card-number input::placeholder {
  font-size: var(--fs-base);
  letter-spacing: 0.06em;
  color: var(--ss-muted);
  opacity: 0.75;
}

.invoice-row {
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.invoice-row-right {
  text-align: right;
  flex-shrink: 0;
}

.invoice-row-amount {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.invoice-detail-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 0.5px 0 var(--ss-separator);
}

.invoice-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.invoice-detail-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--ss-text);
}

.invoice-list {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ss-text);
  line-height: 1.4;
}

.invoice-list li {
  margin-bottom: 4px;
}

.plan-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

#screen-services .plan-card {
  padding: 12px 14px;
  margin-bottom: 10px;
}

#screen-services .plan-card ul {
  margin: 8px 0 0;
  padding-left: 16px;
  font-size: 13px;
  color: var(--ss-muted);
  line-height: 1.35;
}

#screen-services .plan-card li + li {
  margin-top: 3px;
}

#screen-services .scroll {
  flex: 1;
  min-height: 0;
}

.services-footer {
  flex-shrink: 0;
  padding: 10px var(--edge) calc(10px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--ss-bg) 24%);
}

#home-visits,
#home-recent-chats {
  margin-bottom: 2px;
}

#home-visits .view-more-link,
#home-recent-chats .view-more-link {
  margin-top: 2px;
}

/* Visits list — match scroll inset to card content edge */
#screen-visits .scroll {
  padding-left: var(--edge);
  padding-right: var(--edge);
}
#screen-visits .section-label {
  margin-left: 0;
  margin-right: 0;
}

/* Chat message layout — equal ~16px edge inset (from .chat-thread) */
.chat-thread {
  padding-left: 16px;
  padding-right: 16px;
}
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.msg-row.user {
  align-self: stretch;
  justify-content: flex-end;
  padding-left: 20px;
}
.msg-row.vet {
  align-self: stretch;
  justify-content: flex-start;
  padding-right: 20px;
}
.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.msg-row .bubble {
  flex: 0 1 auto;
  min-width: min(100%, 72px);
  max-width: calc(100% - 36px);
  width: fit-content;
}
.msg-row .bubble.user,
.msg-row .bubble.vet {
  align-self: auto;
}
.msg-row .bubble:has(.chat-img) {
  width: min(100%, 220px);
  max-width: calc(100% - 36px);
}
.bubble-text {
  display: block;
  width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.bubble img.chat-img {
  display: block;
  width: 100%;
  max-width: none;
  border-radius: 12px;
  margin-bottom: 4px;
  object-fit: cover;
}
.img-caption {
  font-size: 12px;
  margin-bottom: 2px;
}
.btn.send { background: var(--ss-green) !important; }

/* Account edit link */
.account-profile-head {
  position: relative;
}
.profile-edit-link {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--ss-blue-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}
.profile-edit-link:hover { opacity: 0.75; }

/* Push toggles */
.toggle-row {
  align-items: center;
}

.toggle-row span:first-child {
  font-weight: 500;
}

.toggle-row-disabled {
  opacity: 0.45;
}

.toggle-row-disabled .ios-toggle {
  cursor: not-allowed;
}

.ios-toggle {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: #e5e5ea;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ios-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
.ios-toggle.on {
  background: var(--ss-green-bright, #34c759);
}
.ios-toggle.on::after {
  transform: translateX(18px);
}

.plan-card-clickable {
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.plan-cta-hint {
  font-size: 12px;
  color: var(--ss-green);
  font-weight: 600;
  margin-top: 8px;
}
.notif-card.unread {
  box-shadow: 0 0 0 1.5px var(--ss-green-bright, #7ec8a8);
}
.notif-card {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}
