.site-logo,
.home-topbar .site-logo,
.mypage-head .site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  line-height: 1;
}

.site-logo img,
.home-topbar .site-logo img,
.mypage-head .site-logo img {
  display: block;
  width: 170px;
  height: 38px;
  object-fit: contain;
}

:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #172026;
  background: #f8fafc;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
}

.mypage-head {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(24px, calc((100vw - 960px) / 2));
  background: #2563eb;
  color: #ffffff;
}

body.pet-management-page .mypage-head {
  justify-content: flex-start;
  gap: 12px;
}

body.pet-management-page .mypage-head .site-logo {
  margin-right: auto;
}

.mypage-head div {
  display: grid;
  gap: 6px;
}

.mypage-head strong {
  font-size: 22px;
}

.mypage-head span {
  font-size: 15px;
}

.mypage-head button,
.pet-card button,
form button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mypage-head button {
  background: #ffffff;
  color: #1d4ed8;
}

.inbox-button {
  position: relative;
  width: 42px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #ffffff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 800;
}

.inbox-button.active {
  box-shadow: 0 0 0 2px #dbeafe inset;
}

.inbox-button b {
  position: absolute;
  right: -5px;
  top: -7px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f04438;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

.inbox-button b[hidden],
.inbox-button b.is-empty {
  display: none !important;
}

.prescription-toast {
  position: fixed;
  right: 24px;
  top: 96px;
  z-index: 3000;
  max-width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #172026;
  box-shadow: 0 16px 40px rgba(23, 32, 38, 0.16);
}

.prescription-toast a {
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: none;
}

.prescription-toast button {
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  cursor: pointer;
}

.prescription-toast[hidden] {
  display: none;
}

.compact-title {
  align-items: center;
  gap: 12px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

a.primary,
a.ghost,
.primary.small,
.ghost.small {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 12px;
  font-weight: 800;
  text-decoration: none;
}

a.primary,
.primary.small {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
}

a.ghost,
.ghost.small {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #2563eb;
}

.pdf-preview-frame {
  width: 100%;
  min-height: min(720px, 70vh);
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

body.guardian-home-page {
  min-height: 100vh;
  background: #f8fafc;
}

body.pet-management-page {
  background: #f8fafc;
}

.pet-management-main {
  width: min(1120px, calc(100% - 48px));
  margin: 32px auto 64px;
}

.pet-management-page .hero.compact {
  margin-bottom: 22px;
}

.pet-management-page .hero.compact h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.pet-management-page .top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pet-management-page .top-actions .inbox-button {
  width: auto;
  padding: 0 14px;
}

.guardian-home-page .top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 278px;
  overflow-y: auto;
  border-right: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 12px 0 30px rgba(23, 32, 38, 0.08);
  transition: width 0.18s ease, transform 0.18s ease;
}

.home-sidebar-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 12px;
  border-bottom: 1px solid #cbd5e1;
  background: #ffffff;
}

.sidebar-logo {
  color: #35b33f;
  font-size: 18px;
  letter-spacing: 0;
}

.sidebar-toggle-button,
#homeMobileMenu {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #172026;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-toggle-button {
  width: 34px;
  height: 34px;
}

#homeMobileMenu {
  display: none;
  min-height: 34px;
  padding: 0 12px;
}

.home-shell {
  min-height: 100vh;
  margin-left: 278px;
  transition: margin-left 0.18s ease;
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.home-topbar > strong,
.home-topbar > .home-title {
  justify-self: center;
  grid-column: 2;
}

.home-topbar .top-actions {
  grid-column: 3;
  justify-self: end;
}

#homeMobileMenu {
  grid-column: 1;
  justify-self: start;
}

.home-topbar .inbox-button {
  width: auto;
  min-width: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  color: #2563eb;
}

.home-topbar button:not(#homeMobileMenu) {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.home-main {
  width: min(720px, calc(100% - 32px));
  min-height: calc(100vh - 58px);
  display: grid;
  align-content: start;
  gap: 24px;
  margin: 0 auto;
  padding: 16px 0 210px;
}

.chat-welcome-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(23, 32, 38, 0.04);
  margin-top: 0;
}

.chat-welcome-card h1 {
  margin-bottom: 14px;
  font-size: 18px;
}

.chat-welcome-card p {
  margin: 0 0 18px;
  color: #4f5b55;
  line-height: 1.6;
}

.home-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-action-row button,
.home-action-row a,
.chat-input-dock button,
.primary-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 14px;
  background: #ffffff;
  color: #172026;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.home-action-row button:first-child,
.chat-input-dock button {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.chat-input-dock button:disabled,
.chat-input-dock textarea:disabled {
  cursor: wait;
  opacity: 0.72;
}

.chat-input-dock {
  position: fixed;
  left: calc(278px + (100vw - 278px - min(640px, calc(100vw - 340px))) / 2);
  right: auto;
  bottom: 34px;
  width: min(640px, calc(100vw - 340px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 2px solid #35b33f;
  border-radius: 18px;
  padding: 12px;
  background: #ffffff;
}

.chat-input-dock textarea {
  min-height: 48px;
  border: 0;
  resize: none;
  font: inherit;
  outline: 0;
}

.sidebar-pet-card {
  padding: 14px 10px 18px;
  border-bottom: 1px solid #cbd5e1;
}

.pet-summary-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.pet-summary-row strong,
.pet-summary-row span {
  display: block;
}

.pet-summary-row span,
.pet-health-card dd,
.pet-health-card dt {
  color: #64748b;
  font-size: 12px;
}

.pet-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
  font-weight: 900;
}

#homePetPickerButton {
  width: 40px;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #2563eb;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.paw-button {
  display: grid;
  place-items: center;
}

.paw-icon {
  position: relative;
  width: 19px;
  height: 19px;
  display: block;
}

.paw-icon::before,
.paw-icon::after {
  content: "";
  position: absolute;
  border: 2px solid #2563eb;
  border-radius: 999px;
}

.paw-icon::before {
  left: 5px;
  bottom: 1px;
  width: 10px;
  height: 11px;
  transform: rotate(-18deg);
}

.paw-icon::after {
  left: 1px;
  top: 1px;
  width: 5px;
  height: 6px;
  box-shadow: 6px -2px 0 -2px #f8fafc, 6px -2px 0 0 #2563eb, 12px 1px 0 -2px #f8fafc, 12px 1px 0 0 #2563eb;
}

.pet-health-card {
  margin-top: 14px;
  border-radius: 8px;
  padding: 12px;
  background: #f5f8f6;
}

.pet-health-card strong {
  display: block;
  margin-bottom: 8px;
}

.pet-health-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pet-health-card div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pet-health-card dt,
.pet-health-card dd {
  margin: 0;
}

.pet-health-card dd {
  max-width: 150px;
  text-align: right;
  font-weight: 800;
}

.sidebar-section {
  padding: 14px 10px;
  border-bottom: 1px solid #eef2f7;
}

.sidebar-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.sidebar-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-list-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.sidebar-open {
  min-width: 0;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  color: #172026;
  text-align: left;
  cursor: pointer;
}

.sidebar-open small,
.sidebar-open strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-open small {
  color: #7c8782;
  font-size: 11px;
}

.sidebar-open strong {
  margin-top: 3px;
  font-size: 13px;
}

.dot-menu-button {
  border: 0;
  border-left: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.dot-menu {
  position: absolute;
  right: 4px;
  top: calc(100% - 4px);
  z-index: 1200;
  display: grid;
  box-sizing: border-box;
  width: max-content;
  min-width: 86px;
  max-width: 128px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.14);
}

.dot-menu[hidden] {
  display: none;
}

.dot-menu button {
  border: 0;
  border-radius: 4px;
  padding: 7px 8px;
  background: #ffffff;
  color: #172026;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.dot-menu button:hover {
  background: #eff6ff;
}

.sidebar-empty {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  color: #64748b;
  background: #f8fafc;
}

.home-sidebar-collapsed .home-sidebar {
  width: 52px;
  overflow: visible;
}

.home-sidebar-collapsed .home-shell {
  margin-left: 52px;
}

.home-sidebar-collapsed .sidebar-logo,
.home-sidebar-collapsed .sidebar-pet-card,
.home-sidebar-collapsed .sidebar-section {
  display: none;
}

.home-sidebar-collapsed .home-sidebar-top {
  justify-content: center;
  padding: 0;
}

.home-sidebar-collapsed .chat-input-dock {
  left: calc(52px + (100vw - 52px - min(640px, calc(100vw - 114px))) / 2);
  width: min(640px, calc(100vw - 114px));
}

.home-chat-feed {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding-bottom: 150px;
}

.home-chat-feed:empty {
  display: none;
}

.home-chat-message {
  max-width: 86%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(23, 32, 38, 0.04);
}

.home-chat-message.user {
  justify-self: end;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.home-chat-message.assistant {
  justify-self: start;
}

.home-chat-message.pending {
  border-color: #bfdbfe;
  background: #fbfffc;
}

.home-chat-message strong,
.home-chat-message p {
  display: block;
  margin: 0;
}

.home-chat-message strong {
  margin-bottom: 5px;
  color: #2563eb;
  font-size: 13px;
}

.home-chat-message p {
  color: #172026;
  line-height: 1.55;
}

.typing-status {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  color: #4f5b55 !important;
  font-weight: 700;
}

.typing-status i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #2563eb;
  animation: typingPulse 1s infinite ease-in-out;
}

.typing-status i:nth-child(3) {
  animation-delay: 0.15s;
}

.typing-status i:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes typingPulse {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.questionnaire-card {
  display: grid;
  gap: 14px;
  min-width: min(560px, 100%);
}

.questionnaire-card-head {
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 10px;
}

.questionnaire-card-head span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.questionnaire-card-head h3 {
  margin: 8px 0 0;
  font-size: 20px;
}

.questionnaire-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.questionnaire-card dl div,
.questionnaire-card section {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 11px 12px;
}

.questionnaire-card dt {
  margin: 0 0 5px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.questionnaire-card dd {
  margin: 0;
  color: #172026;
  line-height: 1.45;
}

.questionnaire-card h4 {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 14px;
}

.questionnaire-card section p {
  margin: 0;
}

.pet-picker-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 32, 38, 0.64);
}

.pet-picker-overlay[hidden],
.modal-overlay[hidden] {
  display: none;
}

.pet-picker-modal,
.modal-panel {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  font-size: 20px;
}

.modal-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f5f8f6;
  color: #172026;
  font: inherit;
  cursor: pointer;
}

.pet-picker-list {
  display: grid;
  gap: 10px;
}

.pet-picker-list button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #172026;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.pet-picker-list button.selected {
  border-color: #35b33f;
  background: #eff6ff;
}

.pet-picker-list strong,
.pet-picker-list small {
  display: block;
}

.pet-picker-list small {
  color: #64748b;
}

.primary-link {
  margin-top: 14px;
  border-color: #2563eb;
  color: #2563eb;
}

.segmented {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.segmented button,
.provider-card button,
.search-row button,
.modal-panel form button {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 14px;
  background: #ffffff;
  color: #172026;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.segmented button.active,
.provider-card button,
.search-row button,
.modal-panel form button {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.search-row input,
.modal-panel input,
.modal-panel select,
.modal-panel textarea {
  width: 100%;
  border: 1px solid #cdd6d1;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.search-row input,
.modal-panel input,
.modal-panel select {
  min-height: 42px;
}

.modal-panel textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.medical-insight-panel {
  width: min(760px, calc(100vw - 32px));
}

.medical-record-picker {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.medical-record-option,
.empty-medical-records {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  color: #172026;
  text-align: left;
}

.medical-record-option {
  position: relative;
  display: grid;
  gap: 5px;
  padding-right: 48px;
  cursor: pointer;
}

.medical-record-delete {
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7470;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.medical-record-delete:hover,
.medical-record-delete:focus-visible {
  background: #eef4f0;
  color: #b42318;
  outline: none;
}

.medical-record-saved-analysis {
  display: inline-flex;
  width: max-content;
  margin-top: 4px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e8f6ea;
  color: #2563eb;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.medical-record-option.selected {
  border-color: #35b33f;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #35b33f;
}

.medical-record-option strong,
.medical-record-option span,
.medical-record-option small {
  display: block;
}

.medical-record-option span,
.medical-record-option small,
.empty-medical-records p {
  color: #64748b;
}

.medical-insight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.medical-insight-actions button {
  min-height: 40px;
  border: 1px solid #2563eb;
  border-radius: 6px;
  padding: 0 14px;
  background: #ffffff;
  color: #2563eb;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.medical-insight-actions button:last-child {
  background: #2563eb;
  color: #ffffff;
}

.medical-insight-actions button:disabled {
  border-color: #cbd5e1;
  background: #edf2ef;
  color: #7a857f;
  cursor: not-allowed;
}

.medical-insight-result {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.medical-insight-result h3,
.medical-insight-result h4,
.medical-insight-result p {
  margin: 0;
}

.medical-insight-result ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.medical-insight-source {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid #b8e5bf;
  border-radius: 999px;
  color: #0b6b36;
  font-weight: 800;
  padding: 6px 12px;
}

.medical-insight-grid {
  display: grid;
  grid-template-columns: minmax(90px, max-content) 1fr;
  gap: 8px 16px;
}

.medical-insight-grid span,
.medical-insight-result .muted {
  color: #5f6f68;
}

.medical-insight-disclaimer {
  border-radius: 8px;
  padding: 12px;
  background: #eef6ff;
  color: #334155;
}

.provider-request-note {
  margin-top: 14px;
  font-weight: 800;
}

.provider-request-note textarea {
  margin-top: 6px;
  font-weight: 500;
}

.provider-results {
  display: grid;
  gap: 10px;
}

.provider-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #172026;
  cursor: pointer;
  text-align: left;
}

.provider-card:hover {
  border-color: #8bd193;
  background: #f7fcf8;
}

.provider-card.selected {
  border-color: #2563eb;
  background: #eef9f0;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.provider-card strong,
.provider-card span,
.modal-panel label {
  display: block;
}

.provider-card span {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.provider-selected-summary {
  margin: 10px 0;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.provider-confirm-button {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 850;
}

.provider-confirm-button:disabled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #84908a;
  cursor: not-allowed;
}

.form-status {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.form-status.pending {
  border: 1px solid #bfdbfe;
  background: #fbfffc;
  color: #1d4ed8;
}

.form-status.success {
  border: 1px solid #93c5fd;
  background: #eef9f0;
  color: #1d4ed8;
}

.form-status.error {
  border: 1px solid #ffd6cf;
  background: #fff3f0;
  color: #b42318;
}

.modal-panel form {
  display: grid;
  gap: 12px;
}

.new-chat-button {
  position: fixed;
  right: 30px;
  top: 86px;
  z-index: 35;
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 14px 30px rgba(35, 127, 45, 0.28);
  cursor: pointer;
}

.new-chat-button span {
  position: absolute;
  left: 21px;
  top: 19px;
  width: 26px;
  height: 26px;
  border: 3px solid #ffffff;
  border-radius: 4px;
  transform: rotate(-35deg);
}

.new-chat-button span::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 10px;
  height: 3px;
  background: #ffffff;
}

.new-chat-button span::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -8px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 13px solid #ffffff;
}

.modal-panel label {
  font-weight: 750;
}

.modal-panel label input,
.modal-panel label select {
  margin-top: 6px;
  font-weight: 400;
}

.pet-profile-form {
  overflow: visible;
}

.lookup-field,
.lookup-group {
  position: relative;
  min-width: 0;
}

.lookup-field input[name="breed"] {
  padding-right: 38px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 10 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.25 5 5.25 9 1.25' fill='none' stroke='%23475569' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) 50%;
  background-repeat: no-repeat;
  background-size: 10px 7px;
}

.lookup-group {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.lookup-group legend {
  padding: 0;
  font-weight: 750;
}

.lookup-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 6px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.16);
}

.lookup-results:empty {
  display: none;
}

.lookup-results button,
.lookup-results .muted {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 9px 11px;
  background: #ffffff;
  color: #172026;
  text-align: left;
  font: inherit;
}

.lookup-results button {
  position: relative;
  padding-right: 38px;
  cursor: pointer;
}

.lookup-results button:hover,
.lookup-results button:focus {
  border-color: #bfdbfe;
  background: #ffffff;
  color: #0f172a;
}

.lookup-results button.is-selected {
  border-color: #2563eb;
  background: #ffffff;
  color: #0f172a;
}

.lookup-results button.is-selected::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 7px;
  border-left: 2px solid #2563eb;
  border-bottom: 2px solid #2563eb;
  transform: translateY(-65%) rotate(-45deg);
}

.lookup-results strong,
.lookup-results small {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.lookup-results small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 4px;
}

.selected-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 9px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}

.selected-chips .chip button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.supplement-help {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eef6ff;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.supplement-help:empty {
  display: none;
}

.supplement-help strong,
.supplement-help span {
  display: block;
}

@media (max-width: 900px) {
  .pet-management-main {
    width: min(100% - 24px, 760px);
  }

  .pet-management-page .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-sidebar {
    width: min(286px, calc(100vw - 48px));
    transform: translateX(-100%);
  }

  .home-sidebar-collapsed .home-sidebar {
    width: min(286px, calc(100vw - 48px));
    transform: translateX(-100%);
  }

  .home-sidebar.open {
    transform: translateX(0);
  }

  .home-shell,
  .home-sidebar-collapsed .home-shell {
    margin-left: 0;
  }

  #homeMobileMenu {
    display: inline-flex;
    align-items: center;
  }

  .home-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .home-topbar > strong,
  .home-topbar > .home-title {
    justify-self: start;
  }

  .home-topbar .top-actions {
    gap: 6px;
  }

  .home-topbar .inbox-button {
    min-width: 38px;
    padding: 0 8px;
  }

  .home-topbar .inbox-button[href="/mypage.html"] {
    display: none;
  }

  .home-main {
    width: min(100% - 24px, 640px);
    align-content: start;
    padding-top: 28px;
  }

  .chat-input-dock,
  .home-sidebar-collapsed .chat-input-dock {
    left: 12px;
    right: 12px;
    bottom: 16px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .home-sidebar-collapsed .sidebar-logo,
  .home-sidebar-collapsed .sidebar-pet-card,
  .home-sidebar-collapsed .sidebar-section {
    display: block;
  }

  .home-sidebar-collapsed .home-sidebar-top {
    justify-content: space-between;
    padding: 0 12px;
  }
}

main {
  width: min(960px, calc(100% - 32px));
  margin: 32px auto 64px;
}

.prescription-inbox-page main {
  width: min(1320px, calc(100% - 32px));
}

.hero {
  margin-bottom: 20px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero p,
.muted,
.pet-card span,
.pet-card small {
  color: #64748b;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
}

.account-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-form input,
.account-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.account-form textarea {
  resize: vertical;
}

.account-form .check-row {
  grid-template-columns: 18px 1fr;
  align-items: start;
  font-weight: 700;
}

.account-form .check-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.account-form button.danger {
  border-color: #dc2626;
  background: #dc2626;
}

.account-form button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.account-status {
  min-height: 18px;
  margin: 0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
}

.account-status.error {
  color: #b91c1c;
}

.danger-panel {
  border-color: #fecaca;
}

.withdrawal-notice {
  margin: 0;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.upload-panel {
  margin-top: 16px;
}

.panel {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 20px;
  overflow: hidden;
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.inbox-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.inbox-tabs button {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 14px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 850;
  cursor: pointer;
}

.inbox-tabs button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.prescription-inbox-list {
  display: grid;
  gap: 10px;
}

.prescription-inbox-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  color: #172026;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.prescription-inbox-card .message-new-badge {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e93535;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.prescription-inbox-card.unread {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.prescription-inbox-card.selected {
  border-color: #172026;
  box-shadow: inset 0 0 0 1px #172026;
}

.prescription-inbox-card strong,
.prescription-inbox-card span,
.prescription-inbox-card small {
  display: block;
}

.prescription-inbox-card strong {
  grid-column: 1 / -1;
  color: #2563eb;
  font-size: 14px;
}

.prescription-inbox-card span {
  grid-column: 1;
  color: #172026;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.prescription-inbox-card small {
  color: #64748b;
}

.prescription-inbox-card small {
  grid-column: 1;
}

.prescription-inbox-card em {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: center;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 7px 10px;
  color: #2563eb;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 850;
  font-style: normal;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.prescription-inbox-card em:hover {
  border-color: #2563eb;
  background: #e9f8ec;
  color: #0f6f25;
}

.message-inbox-card {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
}

.message-inbox-card .message-card-topline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.message-inbox-card .message-card-topline b {
  font: inherit;
  color: inherit;
}

.message-inbox-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inbox-detail-close {
  display: none;
}

.recipe-detail-card {
  display: grid;
  gap: 18px;
}

.recipe-detail-card > section {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  background: #ffffff;
}

.recipe-detail-head {
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 16px;
}

.recipe-detail-head h2 {
  margin-top: 6px;
  font-size: 28px;
}

.ingredient-photo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 20px 14px;
  text-align: center;
}

.ingredient-photo-grid figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.ingredient-photo-grid img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 50%;
  background: #f6f8f6;
}

.ingredient-photo-grid figcaption {
  display: grid;
  gap: 2px;
  font-weight: 800;
  font-size: 13px;
}

.ingredient-photo-grid figcaption small {
  color: #64748b;
  font-weight: 650;
}

.vet-ingredient-set-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #d9e6de;
  border-radius: 10px;
  padding: 16px;
  background: #f8fafc;
}

.vet-template-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.3fr);
  gap: 12px;
}

.form-actions.compact {
  gap: 8px;
  flex-wrap: wrap;
}

.ingredient-choice-card.preferred {
  border-color: #82d593;
  background: #f4fff6;
}

.ingredient-choice-card.preferred::after {
  content: "선호";
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  padding: 3px 7px;
  color: #117328;
  background: #dff7e4;
  font-size: 11px;
  font-weight: 850;
}

.ingredient-choice-card {
  position: relative;
}

.danger-light {
  border-color: #ffd3d3;
  color: #b42318;
  background: #fff6f5;
}

.danger-light:hover {
  border-color: #ffaaa6;
  background: #ffe9e7;
}

.daily-feed-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 22px;
  border-radius: 10px;
  background: #f6f8f6;
  text-align: center;
}

.daily-feed-card strong {
  color: #2563eb;
  font-size: 18px;
}

.macro-bar {
  display: flex;
  min-height: 54px;
  overflow: hidden;
  border-radius: 0;
  background: #e2e8f0;
}

.macro-segment {
  display: grid;
  place-items: center;
  min-width: 34px;
  color: #172026;
  font-weight: 850;
  font-size: 12px;
}

.macro-stack {
  display: flex;
  width: 100%;
  min-height: 78px;
  margin: 14px 0 12px;
  overflow: hidden;
  border-radius: 0;
  background: #e2e8f0;
}

.macro-stack span {
  display: grid;
  place-items: center;
  min-width: 0;
  flex-shrink: 0;
  color: #172026;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.macro-caption {
  margin: 8px 0 22px;
  text-align: center;
  color: #172026;
  font-size: 14px;
  font-weight: 800;
}

.macro-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #33413a;
  font-size: 13px;
}

.macro-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.macro-legend i {
  width: 18px;
  height: 8px;
  display: inline-block;
}

.related-prescription-panel {
  display: grid;
  gap: 16px;
}

.related-prescription-panel .ingredient-photo-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  text-align: left;
}

.related-prescription-panel .ingredient-photo-grid.compact figure {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #f8fbff;
}

.related-prescription-panel .ingredient-photo-grid.compact img {
  width: 44px;
  height: 44px;
}

.related-prescription-panel .ingredient-photo-grid.compact figcaption {
  min-width: 0;
}

.related-prescription-nutrition-preview {
  padding: 14px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #f8fbff;
}

.related-prescription-macro-preview h4 {
  margin: 0 0 10px;
  color: #172554;
  font-size: 14px;
}

.related-prescription-macro-preview .macro-stack {
  min-height: 40px;
  margin: 8px 0 10px;
}

.related-prescription-details {
  border-top: 1px solid #dbe7f5;
  padding-top: 12px;
}

.related-prescription-details > summary {
  width: fit-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #b9d2f5;
  border-radius: 8px;
  color: #1457d9;
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.related-prescription-details[open] > summary {
  margin-bottom: 16px;
  color: #ffffff;
  background: #2f63e7;
  border-color: #2f63e7;
}

.related-prescription-full-detail {
  display: grid;
  gap: 16px;
}

.nutrient-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}

.nutrient-list.single {
  grid-template-columns: 1fr;
}

.nutrient-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.nutrient-comparison-grid h4 {
  margin: 0 0 12px;
  color: #2563eb;
  font-size: 15px;
}

.nutrient-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.nutrient-row > div {
  height: 8px;
  border-radius: 999px;
  background: #e3e8e5;
  overflow: hidden;
}

.nutrient-row i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #52d273;
}

.nutrient-row i.before {
  background: #f4a3a3;
}

.followup-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.followup-detail-grid > div {
  border: 1px solid #d9e5dd;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.followup-detail-grid span,
.followup-detail-grid strong {
  display: block;
}

.followup-detail-grid span {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 5px;
}

.followup-detail-grid strong {
  color: #172026;
  font-size: 15px;
}

.guardian-followup-reply-panel .compact-title {
  align-items: flex-start;
}

.guardian-followup-reply-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.guardian-followup-reply-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  border: 1px solid #d9e5dd;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.guardian-followup-reply-form legend {
  padding: 0 6px;
  color: #172026;
  font-weight: 800;
}

.guardian-followup-reply-form label {
  display: grid;
  gap: 6px;
  color: #172026;
  font-weight: 700;
}

.guardian-followup-reply-form fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.guardian-followup-reply-form input,
.guardian-followup-reply-form select,
.guardian-followup-reply-form textarea {
  width: 100%;
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.guardian-reply-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.guardian-reply-summary {
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  .followup-detail-grid {
    grid-template-columns: 1fr;
  }

  .guardian-reply-grid {
    grid-template-columns: 1fr;
  }
}

.benefit-box {
  padding: 14px;
  border-radius: 10px;
  background: #eef6ff;
}

.cooking-steps {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .inbox-layout {
    grid-template-columns: 1fr;
  }

  .ingredient-photo-grid {
    grid-template-columns: repeat(3, minmax(80px, 1fr));
  }

  .nutrient-list,
  .nutrient-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pet-list {
  display: grid;
  gap: 10px;
}

.pet-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
}

.pet-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 800;
}

.pet-card div:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pet-card span,
.pet-card small {
  overflow-wrap: anywhere;
}

.pet-card button,
form button {
  background: #2563eb;
  color: #ffffff;
}

.pet-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pet-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.pet-actions .secondary,
.text-button {
  background: #eef7ef;
  color: #2563eb;
}

.pet-actions .danger {
  background: #fff0ee;
  color: #b42318;
}

.text-button {
  min-height: auto;
  padding: 0;
  border: 0;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #33413a;
  font-size: 14px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

body.pet-management-page .birth-weight-row {
  grid-template-columns: minmax(0, 1fr) minmax(96px, 120px);
}

body.pet-management-page .birth-weight-row .birth-input-row {
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.quick-link-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  color: #172026;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.quick-link-card strong {
  color: #2563eb;
  font-size: 17px;
}

.quick-link-card span {
  color: #64748b;
  line-height: 1.45;
}

input,
select {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
}

.lookup-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.16);
}

.lookup-results:empty {
  display: none;
}

.lookup-results button {
  width: 100%;
  height: auto;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 9px 11px;
  background: #ffffff;
  color: #172026;
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: visible;
}

.lookup-results button strong,
.lookup-results button small {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.lookup-results button small {
  margin-top: 2px;
  color: #64748b;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.supplement-help {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #33413a;
  font-size: 13px;
  line-height: 1.45;
}

.supplement-help:empty {
  display: none;
}

.supplement-help strong {
  color: #2563eb;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}

.chip button {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
}

.error {
  color: #b42318;
}

@media (max-width: 820px) {
  .layout,
  .account-management-grid,
  .two,
  .quick-links {
    grid-template-columns: 1fr;
  }

  .pet-card {
    grid-template-columns: 46px 1fr;
  }

  .pet-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .pet-actions button {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .pet-management-main {
    width: calc(100% - 16px);
    margin: 18px auto 44px;
  }

  .pet-management-page .panel,
  .pet-profile-form {
    width: 100%;
    max-width: 100%;
  }

  body.pet-management-page .birth-weight-row,
  body.pet-management-page .birth-weight-row .birth-input-row {
    grid-template-columns: 1fr;
  }

  body.pet-management-page input,
  body.pet-management-page select,
  body.pet-management-page textarea {
    min-width: 0;
    max-width: 100%;
  }
}

/* Sidebar styles for OpenAI-style collapsible left rail and mobile drawer */
.page-with-sidebar { display: flex; gap: 24px; align-items: flex-start; }
.page-with-sidebar.sidebar-collapsed { gap: 0; }
.sidebar { position: relative; width: 360px; min-width: 340px; max-width: 380px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }
.sidebar-header { min-height: 42px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:10px; border-bottom:1px solid #f1f5f9; }
.sidebar-logo { color:#2563eb; font-size:18px; font-weight:700; letter-spacing:0; }
.sidebar-toggle-button { position:absolute; right:-15px; top:24px; z-index:30; width:30px; min-height:30px; border:1px solid #cbd5e1; border-radius:50%; padding:0; background:#ffffff; color:#47544d; box-shadow:0 4px 12px rgba(23,32,38,.12); }
.sidebar-section { margin-top:12px; }
.sidebar-section h3 { margin:0 0 8px 0; font-size:14px; color:#33413a; }
.sidebar-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; max-height:320px; overflow:auto; overflow-x:visible; }
.sidebar-list li { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px; border-radius:6px; background:#f8fafc; border:1px solid #eef6ee; }
.sidebar-list button { min-height:28px; padding:0 8px; font-size:13px; }

/* Collapsed / hidden state for small screens */
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 12px; top: 92px; bottom: 12px; z-index: 1200; width: min(360px, calc(100vw - 24px)); min-width: 0; transform: translateX(-120%); transition: transform 220ms ease; }
  .sidebar.open { transform: translateX(0%); }
  .page-with-sidebar main { flex: 1 1 auto; }
}

@media (min-width: 821px) {
  /* Desktop: keep sidebar visible by default but allow collapse via aria state */
  .page-with-sidebar main { flex: 1 1 auto; }
}

.sidebar-pet-card {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-pet-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
}

.sidebar-pet-avatar,
.sidebar-empty-pet {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.sidebar-pet-avatar {
  width: 44px;
  height: 44px;
}

.sidebar-pet-main strong,
.sidebar-pet-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-pet-main span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.pet-picker-button,
.sidebar-empty-pet {
  min-height: 38px;
  border: 1px solid #d7ebd8;
  padding: 0;
  background: #f3fbe6;
  color: #2a8b32;
}

.sidebar-empty-pet {
  width: 100%;
  border-radius: 8px;
  padding: 0 12px;
}

.sidebar-health-card {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8f6;
}

.sidebar-health-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-health-card dt,
.sidebar-health-card dd {
  margin: 0;
  font-size: 12px;
}

.sidebar-health-card dt {
  color: #64748b;
}

.sidebar-health-card dd {
  max-width: 160px;
  text-align: right;
  color: #172026;
  font-weight: 700;
}

.sidebar-item {
  position: relative;
  align-items: stretch !important;
  padding: 0 !important;
}

.sidebar-item-open {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
  min-height: 48px;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  color: #172026;
  text-align: left;
}

.sidebar-item-open span,
.sidebar-item-open small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-item-open small {
  color: #75817b;
  font-size: 11px;
}

.sidebar-dot {
  width: 34px;
  min-height: 48px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #64748b;
}

.sidebar-menu {
  position: fixed;
  right: 8px;
  top: 42px;
  z-index: 2600;
  min-width: 112px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.16);
}

.sidebar-menu[hidden] {
  display: none;
}

.sidebar-menu button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: #ffffff;
  color: #172026;
  text-align: left;
}

.sidebar-menu button:hover {
  background: #f1f7f2;
}

.pet-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 32, 40, 0.78);
}

.pet-picker-overlay[hidden] {
  display: none;
}

.pet-picker-dialog {
  width: min(420px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

.pet-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.pet-picker-head h2 {
  font-size: 18px;
}

.pet-picker-list {
  display: grid;
  gap: 10px;
}

.pet-picker-list button {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #172026;
  text-align: left;
}

.pet-picker-list button.selected {
  border-color: #bfdbfe;
  background: #f5fde5;
}

.pet-picker-list button span {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.pet-picker-list button small {
  color: #64748b;
}

@media (min-width: 821px) {
  .page-with-sidebar {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
  }

  .page-with-sidebar main {
    width: auto;
    margin: 32px 0 64px;
    flex: 1 1 auto;
  }

  .page-with-sidebar.sidebar-collapsed {
    gap: 12px;
  }

  .page-with-sidebar.sidebar-collapsed .sidebar[aria-hidden="true"] {
    display: block;
  }

  .page-with-sidebar.sidebar-collapsed .sidebar {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    padding: 10px 6px;
  }

  .page-with-sidebar.sidebar-collapsed .sidebar-header {
    justify-content: center;
    border-bottom: 0;
    min-height: 38px;
  }

  .page-with-sidebar.sidebar-collapsed .sidebar-header strong,
  .page-with-sidebar.sidebar-collapsed .sidebar-pet-card,
  .page-with-sidebar.sidebar-collapsed .sidebar-section {
    display: none;
  }

  .page-with-sidebar.sidebar-collapsed .sidebar-toggle-button {
    right: -15px;
    top: 18px;
  }
}

@media (max-width: 820px) {
  .page-with-sidebar.sidebar-collapsed .sidebar {
    transform: translateX(calc(-100% + 18px));
  }

  .sidebar.open {
    transform: translateX(0%);
  }
}

.recipe-ad-section {
  margin-top: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.recipe-ad-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.recipe-ad-head h3 {
  margin: 0;
  font-size: 18px;
}

.recipe-ad-head p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.recipe-ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.recipe-ad-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 112px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.recipe-ad-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
  transform: translateY(-1px);
}

.recipe-ad-card[aria-disabled="true"] {
  cursor: default;
}

.recipe-ad-card img {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8fafc;
}

.recipe-ad-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.recipe-ad-copy span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-ad-copy h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.recipe-ad-copy p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.recipe-ad-copy b {
  display: inline-block;
  margin-top: 4px;
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: none;
}

.recipe-ad-placeholder {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef5f1;
  color: #1d4ed8;
  font-weight: 900;
}

.recipe-ad-placeholder.product {
  align-content: center;
  gap: 2px;
  text-align: center;
  border: 1px solid #d6eadf;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.9) 0 12px, transparent 13px),
    linear-gradient(135deg, #eff6ff, #f7fff9);
}

.recipe-ad-placeholder.product b {
  font-size: 24px;
  letter-spacing: 0;
}

.recipe-ad-placeholder.product span {
  display: block;
  min-height: auto;
  padding: 0;
  background: transparent;
  color: #255f48;
  font-size: 10px;
}

.recipe-ad-placeholder.product.mist {
  background: linear-gradient(135deg, #e8f7ff, #f8fcff);
  color: #297399;
}

.recipe-ad-placeholder.product.shampoo {
  background: linear-gradient(135deg, #f2f3ff, #ffffff);
  color: #4e5fa8;
}

.recipe-ad-placeholder.product.tooth {
  background: linear-gradient(135deg, #ecfff8, #ffffff);
  color: #168064;
}

body.prescription-followup-page main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 48px;
}

.compact-hero {
  margin-top: 28px;
}

.followup-shell {
  display: grid;
  gap: 18px;
}

.followup-context-card {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 18px;
}

.followup-context-card h2 {
  margin: 10px 0 14px;
}

.followup-context-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.followup-context-card div {
  border: 1px solid #e3ebe7;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.followup-context-card dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.followup-context-card dd {
  margin: 0;
  color: #172026;
  font-weight: 800;
}

.followup-form {
  display: grid;
  gap: 16px;
}

.followup-form label {
  display: grid;
  gap: 8px;
  align-content: start;
  color: #172026;
  font-weight: 800;
  min-width: 0;
}

.followup-form input,
.followup-form select,
.followup-form textarea {
  width: 100%;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  padding: 12px;
  color: #172026;
  background: #ffffff;
  font: inherit;
  font-weight: 650;
  box-sizing: border-box;
}

.followup-form label small,
.readonly-field small,
.checks-heading small {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  word-break: keep-all;
}

.followup-form textarea {
  min-height: 130px;
  resize: vertical;
}

.readonly-field {
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #f8fafc;
  box-sizing: border-box;
}

.followup-phase-display {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.followup-phase-display span {
  color: #172026;
  font-weight: 800;
}

.followup-phase-display strong {
  color: #172026;
  font-size: 16px;
}

.grid.four {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.checks.boxed {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.checks-heading {
  flex: 1 0 100%;
  display: grid;
  gap: 2px;
}

.checks.boxed label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.checks.boxed input {
  width: auto;
}

.notice.warning {
  background: #fff7e6;
  border-color: #f3cf88;
  color: #76540c;
}

.result-box {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 18px;
}

.followup-result h3 {
  margin-top: 0;
}

@media (max-width: 900px) {
  body.prescription-followup-page main {
    width: min(100% - 24px, 1180px);
  }

  .followup-context-card dl,
  .grid.four {
    grid-template-columns: 1fr;
  }
}

/* Clinical comfort theme: shared by guardian pages, inbox, and follow-up screens. */
:root {
  --clinical-bg: #f8fafc;
  --clinical-surface: #ffffff;
  --clinical-surface-soft: #f8fafc;
  --clinical-tint: #eff6ff;
  --clinical-line: #e2e8f0;
  --clinical-line-strong: #cbd5e1;
  --clinical-text: #0f172a;
  --clinical-muted: #64748b;
  --clinical-accent: #2563eb;
  --clinical-accent-strong: #1d4ed8;
  --clinical-accent-soft: #eff6ff;
  --clinical-info: #2563eb;
  --clinical-info-soft: #eff6ff;
  --clinical-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Inter, "Segoe UI", Arial, sans-serif;
  color: var(--clinical-text);
  background: var(--clinical-bg);
  font-size: 15px;
  line-height: 1.55;
}

body,
body.guardian-home-page,
body.pet-management-page,
body.prescription-inbox-page,
body.prescription-followup-page {
  color: var(--clinical-text);
  background: var(--clinical-bg);
}

.mypage-head {
  min-height: 70px;
  background: var(--clinical-accent-strong);
  color: #ffffff;
}

.mypage-head strong,
.mypage-head span {
  color: #ffffff;
}

.mypage-head button,
.inbox-button {
  color: var(--clinical-accent-strong);
  background: #ffffff;
  font-weight: 650;
}

.inbox-button.active {
  box-shadow: 0 0 0 2px rgba(47, 111, 104, 0.22) inset;
}

.home-sidebar,
.home-sidebar-top,
.home-topbar,
.panel,
.modal-panel,
.pet-picker-modal,
.pet-picker-dialog,
.recipe-detail-card,
.prescription-inbox-card,
.chat-welcome-card,
.home-chat-message,
.followup-context-card,
.result-box,
.recipe-ad-section {
  background: var(--clinical-surface);
  border-color: var(--clinical-line);
}

.panel,
.recipe-detail-card,
.prescription-inbox-card,
.chat-welcome-card,
.followup-context-card,
.result-box {
  box-shadow: var(--clinical-shadow);
}

.sidebar-logo,
.site-logo,
.home-topbar > strong,
.home-topbar > .home-title,
.mypage-head + main h1,
.quick-link-card strong,
.recipe-ad-copy b,
.daily-feed-card strong,
.nutrient-comparison-grid h4,
.questionnaire-card dt,
.questionnaire-card h4,
.medical-insight-result h3,
.medical-insight-result h4 {
  color: var(--clinical-accent-strong);
}

.home-topbar button:not(#homeMobileMenu),
.home-action-row button:first-child,
.chat-input-dock button,
.provider-card button,
.search-row button,
.modal-panel form button,
.segmented button.active,
.medical-insight-actions button:last-child,
.pet-card button,
form button,
a.primary,
.primary.small {
  border-color: var(--clinical-accent-strong);
  background: var(--clinical-accent-strong);
  color: #ffffff;
  font-weight: 650;
}

a.ghost,
.ghost.small,
.primary-link,
.medical-insight-actions button,
.text-button,
.join-link {
  color: var(--clinical-accent-strong);
}

.home-topbar .inbox-button,
.home-action-row button,
.home-action-row a,
.chat-input-dock,
.primary-link,
.segmented button,
.provider-card button,
.search-row button,
.modal-panel form button,
input,
select,
textarea,
.prescription-inbox-card,
.recipe-detail-card,
.pet-card,
.quick-link-card,
.medical-record-option {
  border-color: var(--clinical-line-strong);
}

.home-action-row button:first-child,
.chat-input-dock button,
.pet-card button,
form button {
  background: var(--clinical-accent-strong);
}

.home-action-row button:first-child:hover,
.chat-input-dock button:hover,
.pet-card button:hover,
form button:hover,
a.primary:hover,
.primary.small:hover {
  background: #1e40af;
}

.inbox-tabs button {
  color: var(--clinical-accent-strong);
  background: var(--clinical-surface);
  border-color: var(--clinical-line-strong);
  font-weight: 650;
}

.inbox-tabs button.active {
  color: #ffffff;
  background: var(--clinical-accent-strong);
  border-color: var(--clinical-accent-strong);
}

.prescription-inbox-card {
  background: var(--clinical-surface);
}

.prescription-inbox-card strong {
  color: var(--clinical-text);
}

.prescription-inbox-card span,
.prescription-inbox-card small,
.prescription-inbox-card em {
  color: var(--clinical-muted);
}

.prescription-inbox-card em,
.message-detail-card .chip,
.recipe-detail-card .chip {
  border-color: #bfdbfe;
  color: var(--clinical-accent-strong);
  background: var(--clinical-accent-soft);
}

.prescription-inbox-card em:hover {
  color: #ffffff;
  background: var(--clinical-accent-strong);
}

.prescription-inbox-card.unread,
.prescription-inbox-card.selected,
.medical-record-option.selected,
.pet-card.selected,
.type-card.active,
.hospital-results button.selected {
  border-color: var(--clinical-accent);
  background: var(--clinical-accent-soft);
  box-shadow: inset 3px 0 0 var(--clinical-accent);
}

.prescription-inbox-card .message-new-badge,
.questionnaire-card-head span,
.medical-record-saved-analysis,
.medical-insight-source,
.chip,
.recipe-ad-copy span {
  color: var(--clinical-accent-strong);
  background: var(--clinical-accent-soft);
  border-color: #bfdbfe;
}

.message-body,
.benefit-box,
.medical-insight-disclaimer {
  background: var(--clinical-info-soft);
}

.message-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.message-body table {
  width: 100%;
  margin: 10px 0;
  border-collapse: collapse;
  background: white;
}

.message-body th,
.message-body td {
  padding: 8px;
  border: 1px solid #bfdbfe;
  text-align: left;
}

.message-body .ql-size-small {
  font-size: 0.75em;
}

.message-body .ql-size-large {
  font-size: 1.35em;
}

.message-body .ql-size-huge {
  font-size: 1.8em;
}

.pet-avatar,
.sidebar-pet-avatar,
.sidebar-empty-pet,
.pet-picker-list button span {
  color: var(--clinical-accent-strong);
  background: var(--clinical-accent-soft);
}

.chat-input-dock {
  border-color: var(--clinical-accent);
}

.home-chat-message.user,
.home-chat-message.pending {
  border-color: #bfdbfe;
  background: var(--clinical-accent-soft);
}

.home-chat-message strong,
.typing-status i,
.nutrient-row i {
  color: var(--clinical-accent-strong);
  background: var(--clinical-accent);
}

.nutrient-row i.before {
  background: #d79393;
}

/* Vet workspace color alignment for the prescription inbox only. */
body.prescription-inbox-page {
  --inbox-bg: #f8fafc;
  --inbox-surface: #ffffff;
  --inbox-surface-soft: #f8fafc;
  --inbox-line: #e2e8f0;
  --inbox-line-strong: #cbd5e1;
  --inbox-text: #0f172a;
  --inbox-muted: #64748b;
  --inbox-accent: #2563eb;
  --inbox-accent-strong: #1d4ed8;
  --inbox-accent-soft: #eff6ff;
  --inbox-accent-border: #bfdbfe;
  --inbox-danger: #dc2626;
  background: var(--inbox-bg);
  color: var(--inbox-text);
}

body.prescription-inbox-page .mypage-head {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 56px;
  padding: 0 24px;
  background: var(--inbox-surface);
  border-bottom: 1px solid var(--inbox-line);
  color: var(--inbox-text);
  box-shadow: none;
}

body.prescription-inbox-page .mypage-head strong {
  color: var(--inbox-accent);
  font-size: 18px;
}

body.prescription-inbox-page .mypage-head span {
  color: var(--inbox-muted);
  font-size: 13px;
}

body.prescription-inbox-page .vet-inbox-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

body.prescription-inbox-page .vet-inbox-nav[hidden],
body.prescription-inbox-page .vet-inbox-logout[hidden],
body.prescription-inbox-page #guardianInboxNav[hidden] {
  display: none !important;
}

body.prescription-inbox-page .vet-inbox-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--inbox-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

body.prescription-inbox-page .vet-inbox-nav a[aria-current="page"] {
  color: var(--inbox-accent);
  font-weight: 800;
}

body.prescription-inbox-page .vet-inbox-nav .notice-button b {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--inbox-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

body.prescription-inbox-page .vet-inbox-nav .notice-button b[hidden] {
  display: none;
}

body.prescription-inbox-page .mypage-head button,
body.prescription-inbox-page .inbox-button {
  min-height: 36px;
  border: 1px solid var(--inbox-line);
  background: var(--inbox-surface);
  color: var(--inbox-muted);
  font-size: 14px;
  font-weight: 700;
}

body.prescription-inbox-page .mypage-head button:hover,
body.prescription-inbox-page .inbox-button:hover {
  border-color: var(--inbox-accent-border);
  background: var(--inbox-accent-soft);
  color: var(--inbox-accent-strong);
  text-decoration: none;
}

body.prescription-inbox-page .inbox-button.active {
  box-shadow: 0 0 0 2px var(--inbox-accent-border) inset;
}

body.prescription-inbox-page .mypage-head .guardian-back-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  text-decoration: none;
  box-shadow: none;
}

body.prescription-inbox-page .mypage-head .guardian-back-button:hover,
body.prescription-inbox-page .mypage-head .guardian-back-button:focus {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

body.prescription-inbox-page main {
  width: min(1320px, calc(100% - 32px));
  margin-top: 24px;
}

body.prescription-inbox-page h1,
body.prescription-inbox-page h2,
body.prescription-inbox-page .panel-title h2 {
  color: var(--inbox-text);
}

body.prescription-inbox-page .hero {
  border-bottom-color: var(--inbox-line);
}

body.prescription-inbox-page .hero p,
body.prescription-inbox-page .muted,
body.prescription-inbox-page .panel-title span {
  color: var(--inbox-muted);
}

body.prescription-inbox-page .panel,
body.prescription-inbox-page .recipe-detail-card,
body.prescription-inbox-page .recipe-detail-card > section,
body.prescription-inbox-page .prescription-inbox-card {
  border-color: var(--inbox-line);
  background: var(--inbox-surface);
  box-shadow: none;
}

body.prescription-inbox-page .inbox-tabs button {
  border-color: var(--inbox-line-strong);
  background: var(--inbox-surface);
  color: var(--inbox-muted);
  font-weight: 700;
}

body.prescription-inbox-page .inbox-tabs button:hover {
  border-color: var(--inbox-accent-border);
  background: var(--inbox-accent-soft);
  color: var(--inbox-accent-strong);
}

body.prescription-inbox-page .inbox-tabs button.active {
  border-color: var(--inbox-accent);
  background: var(--inbox-accent);
  color: #ffffff;
}

body.prescription-inbox-page .prescription-inbox-card {
  color: var(--inbox-text);
}

body.prescription-inbox-page .prescription-inbox-card strong,
body.prescription-inbox-page .prescription-inbox-card span {
  color: var(--inbox-text);
}

body.prescription-inbox-page .prescription-inbox-card small {
  color: var(--inbox-muted);
}

body.prescription-inbox-page .prescription-inbox-card em,
body.prescription-inbox-page .message-detail-card .chip,
body.prescription-inbox-page .recipe-detail-card .chip,
body.prescription-inbox-page .chip {
  border-color: var(--inbox-accent-border);
  background: var(--inbox-accent-soft);
  color: var(--inbox-accent-strong);
}

body.prescription-inbox-page .prescription-inbox-card em:hover {
  border-color: var(--inbox-accent);
  background: var(--inbox-accent);
  color: #ffffff;
}

body.prescription-inbox-page .prescription-inbox-card.unread,
body.prescription-inbox-page .prescription-inbox-card.selected {
  border-color: var(--inbox-accent);
  background: var(--inbox-accent-soft);
  box-shadow: inset 3px 0 0 var(--inbox-accent);
}

body.prescription-inbox-page .prescription-inbox-card .message-new-badge {
  background: var(--inbox-accent);
  color: #ffffff;
}

body.prescription-inbox-page .message-inbox-card {
  border-radius: 12px;
  padding: 14px;
}

body.prescription-inbox-page .message-inbox-card .message-card-topline i {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--inbox-surface-soft);
  color: var(--inbox-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

body.prescription-inbox-page .message-inbox-card .message-card-topline .message-new-badge {
  background: var(--inbox-accent);
  color: #ffffff;
}

body.prescription-inbox-page .followup-summary-details > summary {
  cursor: pointer;
  color: var(--inbox-accent-strong);
  font-weight: 850;
}

body.prescription-inbox-page .primary-action,
body.prescription-inbox-page a.primary,
body.prescription-inbox-page .primary.small {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--inbox-accent);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--inbox-accent);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

body.prescription-inbox-page .primary-action:hover,
body.prescription-inbox-page a.primary:hover,
body.prescription-inbox-page .primary.small:hover {
  border-color: var(--inbox-accent-strong);
  background: var(--inbox-accent-strong);
  color: #ffffff;
  text-decoration: none;
}

body.prescription-inbox-page .form-actions.inline-actions {
  align-items: center;
  gap: 8px;
}

body.prescription-inbox-page .form-actions.inline-actions .ghost.small {
  min-height: 38px;
  border-color: var(--inbox-line-strong);
  background: var(--inbox-surface);
  color: var(--inbox-text);
  font-weight: 800;
}

body.prescription-inbox-page .form-actions.inline-actions .ghost.small:hover {
  border-color: var(--inbox-accent-border);
  background: var(--inbox-accent-soft);
  color: var(--inbox-accent-strong);
  text-decoration: none;
}

body.prescription-inbox-page .message-body,
body.prescription-inbox-page .benefit-box,
body.prescription-inbox-page .medical-insight-disclaimer {
  background: var(--inbox-surface-soft);
}

body.prescription-inbox-page .table-scroll,
body.prescription-inbox-page .prescription-inbox-list,
body.prescription-inbox-page .recipe-detail-card {
  scrollbar-color: #94a3b8 #e2e8f0;
}

@media (max-width: 820px) {
  body.prescription-inbox-page main.agent-shell {
    width: 100%;
    height: auto;
    min-height: calc(100dvh - var(--wb-head, 56px));
    margin: 0;
    padding: 10px;
  }

  body.prescription-inbox-page .agent-bar {
    border-radius: 12px;
    padding: 12px;
  }

  body.prescription-inbox-page .inbox-tabs {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  body.prescription-inbox-page .inbox-tabs button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 12px;
    white-space: nowrap;
  }

  body.prescription-inbox-page .agent-split {
    display: block;
    min-height: 0;
  }

  body.prescription-inbox-page .agent-pane {
    border-radius: 12px;
    min-height: 0;
  }

  body.prescription-inbox-page .agent-list .pane-head {
    align-items: stretch;
  }

  body.prescription-inbox-page .pane-tools {
    width: 100%;
    margin-inline-start: 0;
  }

  body.prescription-inbox-page .pane-tools input {
    flex: 1 1 170px;
    width: auto;
  }

  body.prescription-inbox-page .pane-tools select {
    flex: 0 0 88px;
  }

  body.prescription-inbox-page .agent-list .pane-body {
    overflow: visible;
    padding: 10px;
  }

  body.prescription-inbox-page .agent-detail {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: none;
    border: 0;
    border-radius: 0;
    background: var(--inbox-bg);
  }

  body.prescription-inbox-page.inbox-detail-open .agent-detail {
    display: flex;
  }

  body.prescription-inbox-page .inbox-detail-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 8px 10px 0;
    border: 1px solid var(--inbox-line-strong);
    border-radius: 10px;
    background: var(--inbox-surface);
    color: var(--inbox-accent-strong);
    font: inherit;
    font-weight: 850;
  }

  body.prescription-inbox-page .agent-detail .pane-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 10px;
  }

  body.prescription-inbox-page .recipe-detail-card,
  body.prescription-inbox-page .recipe-detail-card > section {
    border-radius: 12px;
  }

  body.prescription-inbox-page .recipe-detail-head h2 {
    font-size: 22px;
    line-height: 1.25;
  }

  body.prescription-inbox-page .message-inbox-card {
    display: grid;
    min-height: 0;
    padding: 14px;
  }

  body.prescription-inbox-page .message-inbox-card strong {
    font-size: 16px;
    line-height: 1.35;
  }

  body.prescription-inbox-page .message-inbox-card em {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: stretch;
    text-align: center;
    margin-top: 4px;
  }
}

/* Vet workspace blue alignment for guardian and mypage screens. */
body.guardian-home-page {
  --home-bg: #f8fafc;
  --home-surface: #ffffff;
  --home-surface-soft: #f8fafc;
  --home-line: #e2e8f0;
  --home-line-strong: #cbd5e1;
  --home-text: #0f172a;
  --home-muted: #64748b;
  --home-accent: #2563eb;
  --home-accent-strong: #1d4ed8;
  --home-accent-soft: #eff6ff;
  --home-accent-border: #bfdbfe;
  background: var(--home-bg);
  color: var(--home-text);
}

body.guardian-home-page .home-sidebar,
body.guardian-home-page .home-sidebar-top,
body.guardian-home-page .home-topbar,
body.guardian-home-page .chat-welcome-card,
body.guardian-home-page .home-chat-message,
body.guardian-home-page .modal-panel,
body.guardian-home-page .pet-picker-modal,
body.guardian-home-page .pet-picker-dialog,
body.guardian-home-page .result-box,
body.guardian-home-page .provider-card,
body.guardian-home-page .medical-record-option {
  border-color: var(--home-line);
  background: var(--home-surface);
}

body.guardian-home-page .home-topbar {
  min-height: 56px;
  border-bottom-color: var(--home-line);
  box-shadow: none;
}

body.guardian-home-page .sidebar-logo,
body.guardian-home-page .home-topbar > strong,
body.guardian-home-page .chat-welcome-card h1,
body.guardian-home-page .modal-head h2,
body.guardian-home-page .quick-link-card strong,
body.guardian-home-page .daily-feed-card strong,
body.guardian-home-page .medical-insight-result h3,
body.guardian-home-page .medical-insight-result h4 {
  color: var(--home-accent);
}

body.guardian-home-page .home-topbar .inbox-button,
body.guardian-home-page .home-action-row button,
body.guardian-home-page .home-action-row a,
body.guardian-home-page .sidebar-toggle-button,
body.guardian-home-page #homeMobileMenu,
body.guardian-home-page .primary-link,
body.guardian-home-page .segmented button,
body.guardian-home-page .provider-card button,
body.guardian-home-page .search-row button,
body.guardian-home-page .medical-insight-actions button,
body.guardian-home-page input,
body.guardian-home-page select,
body.guardian-home-page textarea {
  border-color: var(--home-line-strong);
}

body.guardian-home-page .home-topbar .inbox-button,
body.guardian-home-page .home-action-row button,
body.guardian-home-page .home-action-row a,
body.guardian-home-page .sidebar-toggle-button,
body.guardian-home-page #homeMobileMenu,
body.guardian-home-page .primary-link,
body.guardian-home-page .medical-insight-actions button {
  background: var(--home-surface);
  color: var(--home-text);
}

body.guardian-home-page .home-topbar .inbox-button:hover,
body.guardian-home-page .home-action-row button:hover,
body.guardian-home-page .home-action-row a:hover,
body.guardian-home-page .sidebar-toggle-button:hover,
body.guardian-home-page #homeMobileMenu:hover,
body.guardian-home-page .primary-link:hover,
body.guardian-home-page .medical-insight-actions button:hover {
  border-color: var(--home-accent-border);
  background: var(--home-accent-soft);
  color: var(--home-accent-strong);
  text-decoration: none;
}

body.guardian-home-page .home-topbar button:not(#homeMobileMenu),
body.guardian-home-page .home-action-row button:first-child,
body.guardian-home-page .chat-input-dock button,
body.guardian-home-page .provider-confirm-button,
body.guardian-home-page .modal-panel form button,
body.guardian-home-page .segmented button.active,
body.guardian-home-page .medical-insight-actions button:last-child,
body.guardian-home-page a.primary,
body.guardian-home-page .primary.small {
  border-color: var(--home-accent);
  background: var(--home-accent);
  color: #ffffff;
  font-weight: 750;
}

body.guardian-home-page .home-topbar button:not(#homeMobileMenu):hover,
body.guardian-home-page .home-action-row button:first-child:hover,
body.guardian-home-page .chat-input-dock button:hover,
body.guardian-home-page .provider-confirm-button:hover,
body.guardian-home-page .modal-panel form button:hover,
body.guardian-home-page .medical-insight-actions button:last-child:hover,
body.guardian-home-page a.primary:hover,
body.guardian-home-page .primary.small:hover {
  border-color: var(--home-accent-strong);
  background: var(--home-accent-strong);
  color: #ffffff;
}

body.guardian-home-page .chat-input-dock {
  border-color: var(--home-accent);
  background: var(--home-surface);
}

body.guardian-home-page .home-chat-message.user,
body.guardian-home-page .home-chat-message.pending,
body.guardian-home-page .pet-avatar,
body.guardian-home-page .sidebar-pet-avatar,
body.guardian-home-page .sidebar-empty-pet,
body.guardian-home-page .chip,
body.guardian-home-page .medical-record-saved-analysis,
body.guardian-home-page .medical-insight-source {
  border-color: var(--home-accent-border);
  background: var(--home-accent-soft);
  color: var(--home-accent-strong);
}

body.guardian-home-page .pet-picker-modal {
  width: min(560px, calc(100vw - 32px));
  padding: 22px;
}

body.guardian-home-page .pet-picker-list button {
  min-height: 78px;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

body.guardian-home-page .pet-picker-list button .pet-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

body.guardian-home-page .pet-picker-list button .pet-picker-info {
  min-width: 0;
  width: auto;
  height: auto;
  display: grid;
  place-items: initial;
  gap: 3px;
  border-radius: 0;
  background: transparent;
  color: var(--home-text);
  font-weight: 700;
}

body.guardian-home-page .pet-picker-list button .pet-picker-info strong,
body.guardian-home-page .pet-picker-list button .pet-picker-info small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

body.guardian-home-page .pet-picker-list button .pet-picker-info small {
  color: var(--home-muted);
  font-weight: 650;
}

body.guardian-home-page .pet-picker-modal .primary-link {
  width: max-content;
  max-width: 100%;
  margin-top: 14px;
}

body.guardian-home-page .paw-icon::before,
body.guardian-home-page .paw-icon::after {
  border-color: var(--home-accent);
}

body.guardian-home-page .paw-icon::after {
  box-shadow: 6px -2px 0 -2px var(--home-surface-soft), 6px -2px 0 0 var(--home-accent), 12px 1px 0 -2px var(--home-surface-soft), 12px 1px 0 0 var(--home-accent);
}

body.guardian-home-page .sidebar-list button:hover,
body.guardian-home-page .sidebar-list button.active,
body.guardian-home-page .pet-card.selected,
body.guardian-home-page .medical-record-option.selected,
body.guardian-home-page .provider-card.selected,
body.guardian-home-page .hospital-results button.selected {
  border-color: var(--home-accent);
  background: var(--home-accent-soft);
  box-shadow: inset 3px 0 0 var(--home-accent);
}

body.guardian-home-page .home-sidebar,
body.guardian-home-page .home-chat-feed,
body.guardian-home-page .modal-panel {
  scrollbar-color: #94a3b8 #e2e8f0;
}

body.guardian-home-page .home-sidebar {
  display: none;
}

body.guardian-home-page .home-shell {
  margin-left: 0;
}

body.guardian-home-page #homeMobileMenu {
  display: none;
}

body.guardian-home-page .home-topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 24px;
}

body.guardian-home-page .home-topbar > strong {
  justify-self: start;
  grid-column: 1;
  font-size: 18px;
  font-weight: 800;
}

body.guardian-home-page .home-title-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #1d4ed8;
  text-decoration: none;
  cursor: pointer;
}

body.guardian-home-page .home-title-link:hover,
body.guardian-home-page .home-title-link:focus {
  color: #1e40af;
  outline: none;
}

body.guardian-home-page .home-title-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 50;
  min-width: max-content;
  border-radius: 6px;
  padding: 7px 9px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

body.guardian-home-page .home-title-link::before {
  content: "";
  position: absolute;
  left: 14px;
  top: calc(100% + 4px);
  z-index: 51;
  border: 6px solid transparent;
  border-bottom-color: #0f172a;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

body.guardian-home-page .home-title-link:hover::after,
body.guardian-home-page .home-title-link:focus::after,
body.guardian-home-page .home-title-link:hover::before,
body.guardian-home-page .home-title-link:focus::before {
  opacity: 1;
  transform: translateY(0);
}

body.guardian-home-page .home-topbar .top-actions {
  grid-column: 2;
}

body.guardian-home-page .guardian-dashboard-main {
  width: min(1000px, calc(100% - 32px));
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px auto 56px;
  padding: 0;
}

.guardian-pet-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 12px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.guardian-pet-hero .eyebrow {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.78);
}

.guardian-pet-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.25;
}

.guardian-pet-hero p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.guardian-pet-hero .btn-light {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: #ffffff;
  color: #2563eb;
  font-weight: 800;
  white-space: nowrap;
}

.guardian-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 24px;
  align-items: start;
}

.guardian-dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guardian-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  background: #ffffff;
}

#obesityManagementCard[hidden],
.guardian-weight-card[hidden] {
  display: none !important;
}

.guardian-weight-card {
  border-color: #bfdbfe;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
}

.guardian-weight-card.attention {
  animation: guardianWeightAttention 1.4s ease;
}

@keyframes guardianWeightAttention {
  0%,
  100% {
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
  }
  35% {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 14px 34px rgba(37, 99, 235, 0.16);
  }
}

.guardian-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guardian-card-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.guardian-card-title span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.guardian-diet-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guardian-diet-select,
.guardian-daily-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.guardian-diet-select select,
.guardian-daily-form input,
.guardian-daily-form select {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.guardian-rx-box {
  display: grid;
  gap: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 16px;
  background: #eff6ff;
}

.guardian-rx-box span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
}

.guardian-rx-box h3 {
  margin: 0;
  color: #1d4ed8;
  font-size: 17px;
}

.guardian-rx-box p {
  margin: 0;
  color: #1e40af;
  font-size: 13px;
}

.guardian-home-recipe-head,
.guardian-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.guardian-home-recipe-list,
.guardian-record-list,
.guardian-quick-links {
  display: grid;
  gap: 10px;
}

.guardian-record-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.guardian-record-tabs button {
  min-height: 36px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.guardian-record-tabs button.active,
.guardian-record-tabs button:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.guardian-home-recipe-main,
.guardian-record-list button,
.guardian-quick-links a,
.guardian-quick-links button {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
  color: #334155;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
}

.guardian-home-recipe-main {
  cursor: pointer;
}

.guardian-home-recipe-list.has-overflow {
  max-height: 560px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.guardian-home-recipe-item {
  position: relative;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.guardian-home-recipe-item .guardian-home-recipe-main {
  border: 0;
  padding-right: 48px;
  background: transparent;
}

.guardian-home-recipe-item:hover,
.guardian-home-recipe-item.selected,
.guardian-home-recipe-item:focus-within {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.guardian-home-recipe-item.selected .guardian-home-recipe-main,
.guardian-home-recipe-item:hover .guardian-home-recipe-main,
.guardian-home-recipe-item:focus-within .guardian-home-recipe-main {
  color: #1d4ed8;
}

.guardian-home-recipe-more,
.guardian-home-recipe-mobile-delete {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.guardian-home-recipe-more:hover,
.guardian-home-recipe-more:focus-visible {
  background: #dbeafe;
  color: #1d4ed8;
}

.guardian-home-recipe-menu {
  position: absolute;
  z-index: 6;
  top: 50%;
  right: 46px;
  width: 92px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  transform: translateY(-50%);
}

.guardian-home-recipe-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 6px 10px;
  background: transparent;
  color: #b91c1c;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.guardian-home-recipe-menu button:hover {
  background: #fef2f2;
}

.guardian-home-recipe-mobile-delete {
  display: none;
  color: #b91c1c;
  font-size: 20px;
}

.guardian-home-recipe-sentinel {
  min-height: 46px;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.guardian-record-list button:hover,
.guardian-record-list button.selected,
.guardian-quick-links a:hover,
.guardian-quick-links button:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
}

.provider-connect-panel {
  max-width: 620px;
}

.provider-connect-form {
  display: grid;
  gap: 14px;
}

.provider-connect-help {
  display: grid;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 14px;
  background: #eff6ff;
  color: #1e3a8a;
}

.provider-connect-help span {
  color: #475569;
  font-size: 13px;
}

.provider-connect-identity {
  gap: 12px;
}

@media (max-width: 640px) {
  .provider-connect-identity {
    grid-template-columns: 1fr;
  }
}

.guardian-home-recipe-main strong,
.guardian-record-list strong {
  display: block;
  color: #0f172a;
}

.guardian-home-recipe-main span,
.guardian-record-list span,
.guardian-record-list p {
  display: block;
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.home-recipe-delete-panel {
  width: min(390px, calc(100vw - 32px));
  padding: 22px;
  text-align: left;
}

.home-recipe-delete-panel h2 {
  margin: 0;
  font-size: 18px;
}

.home-recipe-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.home-recipe-delete-actions button {
  min-width: 76px;
}

.home-recipe-delete-actions .danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.guardian-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guardian-daily-form {
  display: grid;
  gap: 14px;
}

.guardian-daily-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, auto);
  gap: 10px;
  align-items: center;
}

.guardian-daily-form .primary.small,
.guardian-daily-form .ghost.small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.guardian-obesity-panel {
  display: grid;
  gap: 12px;
}

.guardian-obesity-summary {
  display: grid;
  gap: 6px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px;
  background: #eff6ff;
}

.guardian-obesity-summary span {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.guardian-obesity-summary p {
  margin: 0;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.55;
}

.guardian-obesity-risk {
  display: block;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 900;
}

.guardian-obesity-risk.caution {
  background: #fef3c7;
  color: #92400e;
}

.guardian-obesity-summary.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.guardian-obesity-summary.success span,
.guardian-obesity-summary.success p {
  color: #166534;
}

.guardian-obesity-summary.caution {
  border-color: #fde68a;
  background: #fffbeb;
}

.guardian-obesity-summary.caution span,
.guardian-obesity-summary.caution p {
  color: #92400e;
}

.guardian-obesity-summary.danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.guardian-obesity-summary.danger span,
.guardian-obesity-summary.danger p {
  color: #991b1b;
}

.guardian-obesity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guardian-obesity-metrics div {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.guardian-obesity-metrics span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.guardian-obesity-metrics strong {
  color: #0f172a;
  font-size: 14px;
}

.guardian-obesity-target-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) auto minmax(120px, 1fr);
  gap: 8px;
  align-items: end;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.guardian-obesity-target-form label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.guardian-obesity-target-form input,
.guardian-obesity-target-form select {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  background: #ffffff;
}

.guardian-obesity-target-form button {
  min-height: 38px;
}

.guardian-obesity-target-form .muted {
  align-self: center;
  margin: 0;
  font-size: 12px;
}

.guardian-obesity-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guardian-obesity-guide div {
  display: grid;
  gap: 5px;
  align-content: start;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 11px;
  background: #f8fbff;
}

.guardian-obesity-guide span,
.guardian-obesity-guide small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.guardian-obesity-guide strong {
  color: #1d4ed8;
  font-size: 15px;
}

.guardian-obesity-guide button {
  justify-self: start;
  min-height: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0 10px;
  background: #ffffff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.guardian-obesity-guide button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.guardian-obesity-steps {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.guardian-obesity-steps li + li {
  margin-top: 4px;
}

.guardian-obesity-note {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.guardian-obesity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.guardian-obesity-actions .primary.small,
.guardian-obesity-actions .ghost.small {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  text-decoration: none;
  font-weight: 800;
}

.guardian-quick-card {
  position: sticky;
  top: 80px;
}

.guardian-chat-card {
  position: relative;
}

body.guardian-home-page .guardian-chat-card .chat-input-dock {
  position: static;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  border-width: 1px;
  border-radius: 12px;
}

body.guardian-home-page .guardian-chat-card .home-chat-feed {
  display: grid;
  gap: 10px;
}

@media (max-width: 820px) {
  body.guardian-home-page .home-topbar {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px 16px;
  }

  body.guardian-home-page .home-topbar .top-actions {
    grid-column: 1;
    justify-self: stretch;
    flex-wrap: wrap;
  }

  .guardian-pet-hero,
  .guardian-card-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .guardian-dashboard-grid,
  .guardian-form-grid {
    grid-template-columns: 1fr;
  }

  .guardian-quick-card {
    position: static;
  }
}

@media (max-width: 640px) {
  body.guardian-home-page {
    background: #f6f9fd;
  }

  body.guardian-home-page .home-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  body.guardian-home-page .home-title-link {
    font-size: 17px;
  }

  body.guardian-home-page .home-title-link::before,
  body.guardian-home-page .home-title-link::after {
    display: none;
  }

  body.guardian-home-page .home-topbar .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  body.guardian-home-page .home-topbar .inbox-button,
  body.guardian-home-page .home-topbar button:not(#homeMobileMenu) {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  body.guardian-home-page .guardian-dashboard-main {
    width: calc(100% - 20px);
    gap: 12px;
    margin: 10px auto 28px;
  }

  .guardian-pet-hero {
    display: grid;
    gap: 12px;
    border-radius: 10px;
    padding: 16px;
  }

  .guardian-pet-hero .eyebrow {
    margin-bottom: 4px;
    font-size: 12px;
  }

  .guardian-pet-hero h1 {
    font-size: 20px;
    line-height: 1.35;
  }

  .guardian-pet-hero p {
    font-size: 13px;
    line-height: 1.55;
  }

  .guardian-pet-hero .btn-light {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .guardian-dashboard-grid,
  .guardian-dashboard-stack {
    gap: 12px;
  }

  .guardian-card {
    gap: 12px;
    border-radius: 10px;
    padding: 16px;
  }

  .guardian-card-title {
    gap: 5px;
  }

  .guardian-card-title h2 {
    font-size: 15px;
  }

  .guardian-card-title span {
    font-size: 11px;
  }

  .guardian-home-recipe-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .guardian-home-recipe-head .ghost.small {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .guardian-home-recipe-main,
  .guardian-record-list button,
  .guardian-quick-links a,
  .guardian-quick-links button {
    min-height: 48px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 13px;
  }

  .guardian-home-recipe-more {
    display: none;
  }

  .guardian-home-recipe-mobile-delete {
    display: grid;
    opacity: 0;
    pointer-events: none;
  }

  .guardian-home-recipe-item:focus-within .guardian-home-recipe-mobile-delete {
    opacity: 1;
    pointer-events: auto;
  }

  .guardian-form-grid {
    gap: 10px;
  }

  .guardian-daily-form label {
    gap: 5px;
    font-size: 12px;
  }

  .guardian-diet-select select,
  .guardian-daily-form input,
  .guardian-daily-form select {
    min-height: 44px;
    border-radius: 8px;
    font-size: 14px;
  }

  .guardian-daily-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .guardian-daily-form .primary.small,
  .guardian-daily-form .ghost.small {
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  .guardian-obesity-metrics {
    grid-template-columns: 1fr;
  }

  .guardian-obesity-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .guardian-obesity-target-form {
    grid-template-columns: 1fr;
  }

  .guardian-obesity-guide {
    grid-template-columns: 1fr;
  }

  .guardian-obesity-actions .primary.small,
  .guardian-obesity-actions .ghost.small {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    text-align: center;
  }

  .guardian-quick-card {
    order: -1;
  }

  .guardian-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .guardian-quick-links a,
  .guardian-quick-links button {
    display: grid;
    place-items: center;
    text-align: center;
    line-height: 1.35;
  }

  body.guardian-home-page .guardian-chat-card {
    min-height: 0;
  }

  body.guardian-home-page .guardian-chat-card .home-chat-feed:empty {
    display: none;
  }

  body.guardian-home-page .guardian-chat-card .chat-input-dock {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  body.guardian-home-page .guardian-chat-card .chat-input-dock textarea {
    min-height: 72px;
    font-size: 14px;
  }

  body.guardian-home-page .guardian-chat-card .chat-input-dock button {
    width: 100%;
    min-height: 42px;
  }
}

.pet-actions .secondary,
.text-button,
.inline-note,
.auth-notice,
.extra,
.sidebar-empty,
.pet-health-card,
.sidebar-health-card,
.supplement-help,
.followup-context-card,
.recipe-ad-card,
.daily-feed-card {
  background: var(--clinical-surface-soft);
}

.recipe-ad-card:hover,
.sidebar-menu button:hover,
.dot-menu button:hover,
.lookup-results button:hover {
  border-color: var(--clinical-accent);
  background: var(--clinical-tint);
}

.table-scroll,
.prescription-inbox-list,
.recipe-detail-card,
.home-sidebar,
.modal-panel,
.timeline-modal-body {
  scrollbar-color: #98a7a7 #eef3f2;
  scrollbar-width: thin;
}

.age-input-row,
.birth-input-row {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(82px, max-content);
  gap: 6px;
}

.age-input-row input,
.age-input-row select,
.birth-input-row input,
.birth-input-row select {
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

body.pet-management-page .mypage-head {
  min-height: 70px;
  padding: 0 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
}

body.guardian-home-page .mypage-head {
  background: #1d4ed8;
}

body.pet-management-page .mypage-head button,
body.pet-management-page .inbox-button,
body.guardian-home-page .mypage-head button,
body.guardian-home-page .inbox-button {
  color: #1d4ed8;
}

body.pet-management-page .inbox-button.active,
body.guardian-home-page .inbox-button.active {
  box-shadow: 0 0 0 2px #bfdbfe inset;
}

body.pet-management-page .mypage-head + main h1,
body.pet-management-page .panel-title h2,
body.pet-management-page .form-head h2,
body.guardian-home-page .home-topbar > strong,
body.guardian-home-page .home-topbar > .home-title,
body.guardian-home-page .modal-head h2 {
  color: #1d4ed8;
}

body.pet-management-page .pet-card.selected,
body.guardian-home-page .pet-picker-list button.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

body.pet-management-page .avatar,
body.pet-management-page .chip,
body.guardian-home-page .pet-avatar,
body.guardian-home-page .chip {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

body.pet-management-page .pet-card button,
body.pet-management-page form button,
body.pet-management-page a.primary,
body.pet-management-page .primary.small,
body.guardian-home-page form button,
body.guardian-home-page a.primary,
body.guardian-home-page .primary.small {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

body.pet-management-page .pet-card button:hover,
body.pet-management-page form button:hover,
body.pet-management-page a.primary:hover,
body.pet-management-page .primary.small:hover,
body.guardian-home-page form button:hover,
body.guardian-home-page a.primary:hover,
body.guardian-home-page .primary.small:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

body.pet-management-page .text-button,
body.pet-management-page a.ghost,
body.pet-management-page .ghost.small,
body.guardian-home-page .text-button,
body.guardian-home-page a.ghost,
body.guardian-home-page .ghost.small,
body.guardian-home-page .primary-link {
  color: #1d4ed8;
}

body.guardian-home-page .guardian-daily-form .ghost.small:hover,
body.guardian-home-page #openMealRecordHistoryButton:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

body.guardian-home-page .home-topbar .inbox-button:hover {
  color: #1d4ed8;
}

body.pet-management-page input:focus,
body.pet-management-page select:focus,
body.pet-management-page textarea:focus,
body.guardian-home-page input:focus,
body.guardian-home-page select:focus,
body.guardian-home-page textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

body.pet-management-page .lookup-results button:hover,
body.pet-management-page .lookup-results button:focus,
body.guardian-home-page .lookup-results button:hover,
body.guardian-home-page .lookup-results button:focus {
  border-color: #bfdbfe;
  background: #ffffff;
  color: #0f172a;
}

body.pet-management-page .lookup-results,
body.guardian-home-page .lookup-results {
  background: #ffffff;
}

body.pet-management-page .lookup-results button,
body.pet-management-page .lookup-results button:hover,
body.pet-management-page .lookup-results button:focus,
body.pet-management-page .lookup-results button:active,
body.pet-management-page .lookup-results button.is-selected,
body.guardian-home-page .lookup-results button,
body.guardian-home-page .lookup-results button:hover,
body.guardian-home-page .lookup-results button:focus,
body.guardian-home-page .lookup-results button:active,
body.guardian-home-page .lookup-results button.is-selected {
  background: #ffffff !important;
  color: #0f172a;
}

body.pet-management-page .lookup-results button.is-selected,
body.guardian-home-page .lookup-results button.is-selected {
  border-color: #2563eb;
}

body.pet-management-page #cancelEditButton,
body.pet-management-page form button.text-button {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 800;
}

body.pet-management-page #cancelEditButton:hover,
body.pet-management-page #cancelEditButton:focus,
body.pet-management-page form button.text-button:hover,
body.pet-management-page form button.text-button:focus {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
body.guardian-home-page .home-recipe-detail-panel {
  width: min(1040px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

body.guardian-home-page .home-recipe-detail-panel .prescription-recipe-view {
  border: 0;
  box-shadow: none;
  padding: 0;
}

body.guardian-home-page .meal-record-detail-panel {
  width: min(760px, calc(100vw - 40px));
}

.meal-record-detail-form {
  display: grid;
  gap: 14px;
}

.readonly-field {
  display: grid;
  gap: 5px;
  min-height: 64px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.readonly-field span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.readonly-field strong {
  color: #0f172a;
  font-size: 15px;
}

.meal-record-readonly {
  display: grid;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
}

.meal-record-readonly h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}

.meal-record-readonly p,
.meal-record-readonly ul {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.meal-record-meta {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px 14px;
}

.meal-record-meta strong,
.meal-record-meta span {
  display: block;
}

.meal-record-meta strong {
  color: #0f172a;
  font-size: 16px;
}

.meal-record-meta span {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
}

.meal-record-detail-form textarea {
  min-height: 110px;
}

.meal-record-detail-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

body.guardian-home-page .danger.small {
  min-height: 40px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 800;
  cursor: pointer;
  padding: 8px 12px;
}

body.guardian-home-page .danger.small:hover {
  border-color: #ef4444;
  background: #fee2e2;
}

body.guardian-records-page {
  background: #f6f9fd;
}

body.guardian-records-page .records-shell {
  margin-left: 0;
}

body.guardian-records-page .home-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

body.guardian-records-page .home-topbar .site-logo {
  margin-right: auto;
  order: 1;
}

body.guardian-records-page .home-topbar .top-actions {
  margin-left: 0;
  order: 2;
}

body.guardian-records-page .home-topbar .guardian-back-button {
  order: 0;
}

.guardian-records-main {
  width: min(1500px, calc(100vw - 56px));
  max-width: none;
}

.guardian-records-layout {
  display: grid;
  grid-template-columns: minmax(360px, 480px) minmax(560px, 1fr);
  gap: 22px;
}

.meal-record-detail-card {
  min-height: 420px;
}

.meal-record-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
  padding: 24px;
}

@media (max-width: 900px) {
  .guardian-records-layout {
    grid-template-columns: 1fr;
  }
}

.guardian-back-button,
.mypage-head .guardian-back-button,
.home-topbar .guardian-back-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  cursor: pointer;
}

.guardian-back-button:hover,
.guardian-back-button:focus,
.mypage-head .guardian-back-button:hover,
.mypage-head .guardian-back-button:focus,
.home-topbar .guardian-back-button:hover,
.home-topbar .guardian-back-button:focus {
  border-color: #2563eb;
  color: #2563eb;
}

.guardian-intake-context {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guardian-intake-patient {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.guardian-intake-patient strong {
  color: #0f172a;
  font-size: 15px;
}

.guardian-intake-patient span,
.guardian-intake-patient small {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.guardian-basic-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.guardian-basic-chip-row span {
  min-width: max-content;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.guardian-feed-check {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px dashed #60a5fa;
  border-radius: 10px;
  background: #eff6ff;
}

.guardian-feed-check legend {
  padding: 0 4px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.guardian-radio-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guardian-radio-row label,
.guardian-daily-form .guardian-feed-check .guardian-radio-row label {
  min-height: 38px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  padding: 0 14px;
  margin: 0;
}

.guardian-radio-row input,
.guardian-daily-form .guardian-feed-check .guardian-radio-row input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.guardian-feed-check .guardian-radio-row label input {
  margin-top: 0;
}

.guardian-radio-row label span,
.guardian-daily-form .guardian-feed-check .guardian-radio-row label span {
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.2;
}

@media (max-width: 640px) {
  body.guardian-home-page {
    background: #f8fafc;
  }

  body.guardian-home-page .home-topbar {
    min-height: 52px;
    padding: 8px 12px;
    gap: 8px;
  }

  body.guardian-home-page .guardian-dashboard-main {
    width: min(100% - 16px, 460px);
    margin-top: 8px;
  }

  body.guardian-home-page .guardian-pet-hero {
    border: 1px solid #dbeafe;
    background: #ffffff;
    color: #0f172a;
    box-shadow: none;
  }

  body.guardian-home-page .guardian-pet-hero .eyebrow,
  body.guardian-home-page .guardian-pet-hero p {
    color: #475569;
  }

  body.guardian-home-page #dailyRecordCard {
    border-color: #bfdbfe;
    background: #ffffff;
    box-shadow: none;
  }

  body.guardian-home-page #dailyRecordCard .guardian-card-title {
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
  }

  .guardian-intake-patient {
    padding: 12px;
  }

  .guardian-basic-chip-row {
    margin: 0 -2px;
  }

  .guardian-feed-check {
    padding: 13px;
  }

  .guardian-radio-row {
    grid-template-columns: 1fr;
  }

  .guardian-radio-row label,
  .guardian-daily-form .guardian-feed-check .guardian-radio-row label {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
  }

  .guardian-daily-form .primary.small {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
  }
}
