.jyp-main {
  max-width: 860px;
  margin: 1.5rem auto;
  padding: 0 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.jyp-main-wide { max-width: 1080px; }
.jyp-tabs { display: flex; gap: 0.5rem; }
.jyp-tab {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-soft);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
}
.jyp-tab-active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.jyp-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.jyp-title { margin: 0; font-size: 1.05rem; color: var(--color-heading); }
.jyp-note { margin: 0; font-size: 0.8rem; color: var(--color-text-soft); }
.jyp-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.jyp-month-label { font-weight: 600; color: var(--color-heading); }
.jyp-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.jyp-calendar-dow {
  text-align: center;
  font-size: 0.7rem;
  color: var(--color-muted);
  padding: 0.25rem 0;
}
.jyp-day {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.8rem;
  text-align: left;
  vertical-align: top;
}
.jyp-day:hover { border-color: var(--color-accent); color: var(--color-accent); }
.jyp-day-selected { border-color: var(--color-accent); background: var(--color-tint); }
.jyp-day-empty { border: none; background: transparent; cursor: default; }
.jyp-day-past { opacity: 0.4; cursor: not-allowed; }
.jyp-slots { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.jyp-slot {
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.jyp-slot:hover { border-color: var(--color-accent); color: var(--color-accent); }
.jyp-session-list { display: flex; flex-direction: column; gap: 0.6rem; }
.jyp-session {
  display: grid;
  grid-template-columns: minmax(110px, 0.85fr) minmax(0, 2fr) auto;
  gap: 0.9rem;
  align-items: start;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  background: var(--color-bg);
}
.jyp-session-info { min-width: 0; }
.jyp-session-conversation {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.jyp-session-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}
@media (max-width: 720px) {
  .jyp-session { grid-template-columns: 1fr; }
  .jyp-session-status { align-items: flex-start; }
}
.jyp-session-date { font-weight: 600; color: var(--color-heading); }
.jyp-session-meta { font-size: 0.75rem; color: var(--color-text-soft); }
.jyp-badge {
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  border: 1px solid currentColor;
}
.jyp-badge-PENDING { color: var(--color-amber); }
.jyp-badge-CONFIRMED { color: var(--color-green); }
.jyp-badge-CANCELLED { color: var(--color-red); }
.jyp-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text-soft);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.jyp-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.jyp-btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.jyp-btn-primary:hover { opacity: 0.88; color: #fff; }
.jyp-btn-danger { color: var(--color-red); }
.jyp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 23, 0.45);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}
.jyp-backdrop[hidden] { display: none; }
.jyp-modal {
  width: 100%;
  max-width: 440px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.jyp-greeting {
	margin: 13px 0 0; color: var(--color-heading); font-size: 1rem; line-height: 1.55;
}
.jyp-input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}
.jyp-input-inline { width: auto; display: inline-block; }
.jyp-modal-actions {
	display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
	margin: 21px 0 0;
}
.jyp-modal-actions-stack { flex-direction: column; align-items: stretch; }
.jyp-inline-error { margin: 0; color: var(--color-red); font-size: 0.78rem; }
.jyp-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--color-red);
  color: var(--color-red);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  white-space: pre-wrap;
}
.jyp-form { display: flex; flex-direction: column; gap: 0.6rem; }
.jyp-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.78rem; color: var(--color-text-soft); }
.jyp-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.jyp-schedule {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--color-bg);
}
.jyp-schedule-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.jyp-slot-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.jyp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  color: var(--color-text-soft);
}
.jyp-chip button { border: none; background: none; color: var(--color-red); cursor: pointer; font-weight: 700; }
.jyp-header-link {
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}
.jyp-header-link:hover { text-decoration: underline; }
.jyp-landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.jyp-landing-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}
.jyp-landing-card:hover { border-color: var(--color-accent); }
.jyp-landing-card strong { color: var(--color-heading); }
.jyp-landing-icon { font-size: 1.4rem; }
.jyp-entry-rows { display: flex; flex-direction: column; gap: 0.4rem; }
.jyp-entry-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.jyp-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--color-text-soft);
}
.jyp-field > span {
  font-weight: 600;
}
.jyp-entry-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.68rem;
  color: var(--color-text-soft);
}
.jyp-entry-field > span {
  font-weight: 600;
}
.jyp-entry-row { align-items: flex-end; }
.jyp-greeting-bar {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-heading);
}
.jyp-name-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
}
.jyp-name-button:hover { color: var(--color-accent); }
.jyp-textarea {
  resize: vertical;
  min-height: 5.5rem;
  font-family: var(--font-sans);
}
body.jyp-site {
  background:
    radial-gradient(circle at top, var(--color-tint), transparent 55%),
    var(--color-bg);
  min-height: 100vh;
}
.jyp-site-main { padding-top: 0; padding-bottom: 1rem; }
.jyp-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 2.5rem 1rem 0.75rem;
  text-align: center;
}
.jyp-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.jyp-brand h1 {
  margin: 0.5rem 0 0;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  color: var(--color-heading);
}
.jyp-brand p { margin: 0; font-size: 0.85rem; color: var(--color-text-soft); }
.jyp-site-footer { display: flex; justify-content: center; padding: 1.75rem 0 0.5rem; }
.jyp-site-footer a { color: var(--color-muted); font-size: 0.72rem; text-decoration: none; }
.jyp-site-footer a:hover { color: var(--color-accent); }
body.jyp-site {
  /* Palette sampled from Joana's Facebook post: mauve, blush, peach,
     deep brown, cream, and near-black. */
  --color-bg: #F7F2EF;
  --color-surface: #FFFDFC;
  --color-surface-2: #F0E7E4;
  --color-border: #DCD0D0;
  --color-accent: #715651;
  --color-text: #2A2424;
  --color-text-soft: #715651;
  --color-muted: #9C8A8B;
  --color-heading: #1F1B1B;
  --color-tint: #EADFDC;
  background:
    radial-gradient(circle at 12% 0%, #E8CFC8 0, transparent 42%),
    radial-gradient(circle at 88% 8%, #E3D6D5 0, transparent 38%),
    #F7F2EF;
}
.jyp-doctor {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border);
}
.jyp-doctor-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(113, 86, 81, 0.22);
}
.jyp-doctor-meta { display: flex; flex-direction: column; gap: 0.1rem; }
.jyp-doctor-meta strong { color: var(--color-heading); font-size: 0.9rem; }
.jyp-doctor-meta span { color: var(--color-text-soft); font-size: 0.75rem; }
.jyp-delete-row {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-top: 0.15rem;
}
.jyp-delete-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-red);
  font-size: 0.72rem;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
}
.jyp-delete-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  width: min(280px, 80vw);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--color-heading);
  color: var(--color-surface);
  font-size: 0.7rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 2;
}
.jyp-delete-row:hover .jyp-delete-tooltip,
.jyp-delete-link:focus + .jyp-delete-tooltip {
  opacity: 1;
  visibility: visible;
}
.jyp-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-text);
}
.jyp-checkbox input { width: auto; }
.jyp-logs {
  margin: 0;
  max-height: 60vh;
  overflow: auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.jyp-logs-toolbar { align-items: center; }
.jyp-logs-wrap {
  overflow: auto;
  max-height: 62vh;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.jyp-logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}
.jyp-logs-table th,
.jyp-logs-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.jyp-logs-table th {
  background: var(--color-surface-2);
  color: var(--color-text-soft);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.jyp-log-row { cursor: pointer; }
.jyp-log-row:hover { background: var(--color-tint); }
.jyp-log-created { white-space: nowrap; color: var(--color-text-soft); }
.jyp-log-path { font-family: var(--font-mono); word-break: break-all; max-width: 360px; }
.jyp-log-latency { font-family: var(--font-mono); white-space: nowrap; }
.jyp-status-2xx { color: var(--color-green); font-weight: 700; }
.jyp-status-3xx { color: var(--color-amber); font-weight: 700; }
.jyp-status-4xx { color: var(--color-amber); font-weight: 700; }
.jyp-status-5xx { color: var(--color-red); font-weight: 700; }
.jyp-log-caret { color: var(--color-muted); white-space: nowrap; }
.jyp-log-detail td { background: var(--color-bg); }
.jyp-log-detail pre {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.45;
}
.jyp-form label.jyp-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.jyp-log-created-time { color: var(--color-muted); font-size: 0.66rem; }
.jyp-session-bubble {
  max-width: 92%;
  width: fit-content;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.72rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.jyp-bubble-right {
  align-self: flex-end;
  border-radius: 12px 12px 2px 12px;
  background: var(--color-tint);
}
.jyp-bubble-left {
  align-self: flex-start;
  border-radius: 12px 12px 12px 2px;
  background: var(--color-surface-2);
}
