:root {
  --room-bg: #FEFAF5;
  --room-paper: #FEFAF5;
  --room-card: #FFFFFF;
  --room-soft: #E6DCD2;
  --room-line: #E6DCD2;
  --room-ink: #804C3B;
  --room-heading: #804C3B;
  --room-muted: #804C3B;
  --room-control-line: #804C3B;
  --room-input: #FFFFFF;
  --room-red: #FF4438;
  --room-action: #FF4438;
  --room-red-dark: #804C3B;
  --room-selected: #FEFAF5;
  --room-focus: #FF4438;
  --room-gutter: clamp(16px, 5vw, 24px);
  --room-display: Monda, Harmony, sans-serif;
  --room-nav-height: calc(56px + env(safe-area-inset-top, 0px));
}

html { scroll-padding-top: calc(var(--room-nav-height) + 12px); }
:is([id], input, select, textarea) { scroll-margin-top: 12px; }

body {
  background: var(--room-bg);
  color: var(--room-ink);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

main,
dialog {
  color: var(--room-ink);
}

main {
  width: 100%;
  max-width: 600px;
  min-height: 100dvh;
  padding: 0 0 32px;
  background: var(--room-paper);
}

main > :is(#pageHeading, #observationProgress, #saveState, #form, #report, #invitation) {
  width: calc(100% - 2 * var(--room-gutter));
  max-width: 660px;
  margin-inline: auto;
}

body[data-view] main > .room-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fefaf5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: var(--room-nav-height);
  min-height: var(--room-nav-height);
  padding: env(safe-area-inset-top, 0px) var(--room-gutter) 0;
  border-bottom: 1px solid var(--room-line);
  color: var(--room-ink);
}

.room-brand {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--room-display);
  font-weight: 700;
  white-space: nowrap;
}

.room-brand b {
  color: var(--room-red-dark);
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0;
}

.room-brand span {
  font-size: 15px;
}

.room-current-page {
  display: block;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  white-space: nowrap;
  color: var(--room-muted);
  font-size: 14px;
  font-weight: 400;
}

.room-tabs {
  display: flex;
  margin-left: auto;
  gap: 8px;
  white-space: nowrap;
}

.room-tabs button,
.profile-nav-button,
.record-link,
.history-entry,
.icon-button {
  background: transparent;
  border: 0;
  color: var(--room-ink);
  font: inherit;
}

.room-tabs button {
  min-height: 44px;
  padding: 0 5px;
  font-size: 13px;
  border-bottom: 2px solid transparent;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-start: -9px;
  padding: 0;
}

.icon-button img,
.room-icon {
  flex: none;
  width: 20px;
  height: 20px;
  filter: invert(23%) sepia(32%) saturate(830%) hue-rotate(338deg) brightness(.85);
}

:is(button, input, select, summary, a):focus-visible,
.choice:focus-within,
.skip:focus-within {
  outline: 2px solid var(--room-focus);
  outline-offset: 3px;
}

.choice:focus-within:not(:has(:focus-visible)),
.skip:focus-within:not(:has(:focus-visible)) {
  outline: none;
}

#pageTitle:focus,
#profile-history:focus {
  outline: none;
}

main > .save-status {
  color: var(--room-muted);
  font-size: 12px;
  line-height: 1.5;
  margin-block: 6px 0;
}

body[data-view="form"]:not([data-page="0"]) .save-status {
  display: block;
  min-height: 18px;
  margin-top: 0;
  text-align: right;
}

#observationProgress {
  padding-top: 12px;
}

.observation-progress ol {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.observation-progress li {
  position: relative;
  min-width: 0;
}

.observation-progress li:not(:last-child)::after {
  position: absolute;
  top: 11px;
  left: calc(50% + 9px);
  width: calc(100% - 18px);
  height: 1px;
  background: #E6DCD2;
  content: "";
}

.observation-progress li:has(.step-past)::after {
  background: var(--room-red);
}

.observation-progress button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 39px;
  padding: 5px 0 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--room-muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.observation-progress button:disabled {
  cursor: default;
}

.observation-progress .step-past,
.observation-progress [aria-current="step"] {
  color: var(--room-red-dark);
  font-weight: 700;
}

.step-marker {
  display: block;
  width: 13px;
  height: 13px;
  border: 1px solid #E6DCD2;
  border-radius: 50%;
  background: #E6DCD2;
}

[aria-current="step"] .step-marker,
.step-past .step-marker {
  border-color: var(--room-action);
  background: var(--room-red);
}

[aria-current="step"] .step-marker {
  box-shadow: inset 0 0 0 2px var(--room-paper);
}

.step-past .step-marker {
  display: grid;
  place-items: center;
}

.step-past .step-marker::before {
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("../assets/observation-ui/check.svg") center / contain no-repeat;
  mask: url("../assets/observation-ui/check.svg") center / contain no-repeat;
  content: "";
}

.page-heading {
  position: relative;
  isolation: isolate;
  padding-block: 14px 16px;
}

.page-heading h1,
.profile-heading h1,
.cat-list-heading h1 {
  margin: 0;
  color: var(--room-heading);
  font-family: var(--room-display);
  font-size: clamp(27px, 7.5vw, 35px);
  line-height: 1.32;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.page-lead {
  margin: 9px 0 0;
  color: var(--room-muted);
  font-size: 14px;
  line-height: 1.55;
}

.heading-cat {
  display: none;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}

body:is([data-page="0"], [data-view="report"]) .page-heading {
  min-height: 148px;
  padding-top: 22px;
  padding-bottom: 20px;
}

body:is([data-page="0"], [data-view="report"]) .heading-cat {
  position: absolute;
  right: -8px;
  bottom: 0;
  z-index: -1;
  display: block;
  width: min(55%, 210px);
  height: auto;
}

#profileIntro {
  max-width: min(61%, 300px);
}

body[data-view="report"] .page-heading h1 {
  max-width: 74%;
  font-size: clamp(25px, 7vw, 34px);
}

body[data-view="report"] .heading-cat {
  width: min(51%, 190px);
}

.report-date {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: var(--room-ink);
  font-size: 14px;
}

.report-date img {
  width: 18px;
  height: 18px;
}

#intro {
  margin: 0;
}

#studio {
  max-width: none;
  padding: 0;
}

article > section {
  margin: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--room-line);
  min-width: 0;
}

article > section h2 {
  margin: 0 0 11px;
  color: var(--room-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.choice,
.skip {
  min-height: 46px;
  margin: 7px 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  border-color: var(--room-line);
  background: var(--room-card);
}

.choice:has(:checked),
.skip:has(:checked) {
  border-color: var(--room-action);
  background: var(--room-selected);
}

input,
progress {
  accent-color: var(--room-red-dark);
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--room-control-line);
  border-radius: 7px;
  padding: 10px 13px;
  background: var(--room-input);
  color: var(--room-ink);
  font-size: 16px;
}

.field input::placeholder {
  color: var(--room-muted);
}

.field input:disabled,
.field select:disabled {
  background: var(--room-soft);
  opacity: .72;
}

.action {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 16px;
  background: var(--room-action);
  color: #fff;
  overflow-wrap: anywhere;
  transition: background-color 150ms ease, transform 150ms ease;
}

.action:active:not(:disabled) {
  transform: translateY(1px);
}

.action.light {
  border: 1px solid var(--room-line);
  background: var(--room-paper);
  color: var(--room-ink);
}

.action.light:hover {
  background: var(--room-line);
}

.action:disabled {
  opacity: .55;
  cursor: wait;
}

.action:not(.light):hover {
  background: var(--room-red-dark);
}

.form-dock {
  position: fixed;
  z-index: 2;
  inset-inline: 0;
  bottom: 0;
  width: min(100%, 600px);
  margin-inline: auto;
  padding: 9px var(--room-gutter) calc(9px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid transparent;
  background: var(--room-paper);
}

.body-followup-hint {
  display: none;
  margin: 0 0 7px;
  color: var(--room-red-dark);
  font-size: 13px;
  line-height: 1.4;
}

body[data-page="1"]:has(#scores input:checked):not(:has(#ribs input:checked)) .body-followup-hint {
  display: block;
}

.form-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.form-actions .action {
  margin: 0;
}

#back {
  flex: 0 0 41%;
}

#submit {
  position: relative;
  min-width: 0;
  padding-inline: 12px 34px;
}

#submit::after {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background: currentColor;
  -webkit-mask: url("../assets/observation-ui/arrow-right.svg") center / contain no-repeat;
  mask: url("../assets/observation-ui/arrow-right.svg") center / contain no-repeat;
  content: "";
}

body[data-view="form"] #form {
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}

.keyboard-visible .form-dock {
  position: static;
  width: 100%;
  padding-inline: 0;
}

#err:empty {
  display: none;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 13px;
}

.profile-form > :is([data-question-id="101"], [data-question-id="106"], .profile-consent) {
  grid-column: 1 / -1;
}

.profile-form > section {
  padding: 8px 0;
  border: 0;
}

.profile-form > section h2 {
  margin: 0 0 5px;
  font-size: 14px;
}

.required-mark {
  color: var(--room-red-dark);
  margin-inline-start: 2px;
}

.profile-form .field {
  margin: 0;
  gap: 5px;
}

.profile-form .field input {
  min-width: 0;
}

.age-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.age-fields .field select {
  padding-inline: 5px;
}

.weight-field {
  position: relative;
}

.weight-field input {
  padding-inline-end: 36px;
}

.weight-field span {
  position: absolute;
  right: 10px;
  color: var(--room-muted);
  font-size: 13px;
  pointer-events: none;
}

.profile-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.profile-options .choice {
  display: grid;
  position: relative;
  place-items: center;
  min-height: 44px;
  padding: 4px 1px;
  margin: 0;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
}

.profile-options input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.profile-options .choice:has(:checked) {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--room-red);
}

.profile-form .profile-unknown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  margin: 1px 0 0;
  padding: 3px 5px 3px 0;
  border-color: transparent;
  background: transparent;
  color: var(--room-muted);
  font-size: 13px;
}

.profile-unknown input,
.profile-consent input {
  flex: none;
  margin: 0;
  width: 16px;
  height: 16px;
}

.profile-form .profile-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 12px;
  margin: 9px 0 4px;
  font-size: 13px;
  line-height: 1.55;
  background: var(--room-soft);
}

.profile-consent input {
  margin-top: 2px;
}

.breed-results {
  margin-top: 6px;
  background: var(--room-card);
  border-color: var(--room-line);
}

.body-score {
  padding-top: 4px;
}

.question-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  margin-bottom: 7px;
}

.question-heading h2 {
  margin: 0;
}

.score-reference {
  margin-left: auto;
}

.score-reference .pic {
  width: auto;
  border: 0;
  background: transparent;
  text-align: right;
}

.score-reference .pic img {
  display: none;
}

.score-reference .zoom-label {
  padding: 6px 0;
  min-height: 32px;
  background: transparent;
  color: var(--room-red-dark);
  font-size: 13px;
}

#scores {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-top: 0;
}

#scores .choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  margin: 0;
  text-align: start;
}

#scores .score-option {
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr) 18px;
  justify-content: stretch;
  gap: 12px;
  min-height: 84px;
  padding: 7px 12px 7px 8px;
}

#scores img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.55;
  object-fit: cover;
  object-position: center bottom;
  border-radius: 6px;
  mix-blend-mode: multiply;
}

#scores input {
  position: static;
  opacity: 1;
  width: 16px;
  height: 16px;
  margin: 0;
}

.score-copy {
  display: grid;
  gap: 2px;
}

.score-copy strong {
  font-size: 16px;
}

.score-copy span {
  color: var(--room-muted);
  font-size: 13px;
}

.photo-assist {
  padding: 0;
  margin-top: 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--room-card);
}

.photo-assist details {
  border-bottom: 0;
  padding: 0;
}

.photo-assist summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 11px;
  list-style: none;
}

.photo-assist summary::-webkit-details-marker {
  display: none;
}

.photo-assist summary img {
  width: 21px;
  height: 21px;
}

.photo-assist summary span {
  flex: 1;
}

.photo-assist summary small {
  margin-left: 5px;
  color: var(--room-muted);
  font-size: 12px;
  font-weight: 400;
}

.photo-assist details[open] summary img:last-child {
  transform: rotate(90deg);
}

.photo-content {
  padding: 8px 12px 3px;
}

.photo-assist .skip {
  min-height: 40px;
  margin: 0;
  padding: 7px 12px;
  border-width: 1px 0 0;
  border-radius: 0 0 10px 10px;
  font-size: 14px;
}

.photo-assist .field-error {
  padding: 0 12px 10px;
}

#ribpics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#ribpics .pic {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
}

#ribpics .pic img {
  height: clamp(79px, 27vw, 135px);
  object-fit: contain;
}

#ribpics .zoom-label {
  width: 100%;
  font-size: 12px;
}

#ribpics.single-guide {
  grid-template-columns: minmax(0, 1fr);
}

#ribpics.single-guide .pic img {
  height: auto;
  max-height: none;
}

.stool-guide {
  margin: 10px 0 14px;
}

.coat-options-grid,
.coat-density-options {
  display: grid;
  margin-top: 12px;
}

.coat-options-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.coat-density-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.coat-option.choice,
.density-option.choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  grid-template-rows: auto minmax(48px, auto);
  align-items: center;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.coat-option img,
.density-option img {
  grid-column: 1 / -1;
  width: 100%;
  border-bottom: 1px solid var(--room-line);
  object-fit: cover;
}

.coat-option img {
  aspect-ratio: 3 / 2;
}

.density-option img {
  aspect-ratio: 4 / 5;
}

.coat-option span,
.density-option span {
  padding: 9px 4px 9px 11px;
  color: var(--room-ink);
  font-size: 14px;
  line-height: 1.4;
}

.coat-option input,
.density-option input {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
}

.density-option span {
  padding-inline-start: 8px;
  font-size: 13px;
  text-align: center;
}

.illustrated-choice {
  display: grid;
  grid-template-columns: clamp(48px, 17vw, 70px) minmax(0, 1fr) 18px;
  gap: 10px;
  min-height: 70px;
}

.illustrated-choice img {
  width: 100%;
  height: 56px;
  grid-column: 1;
  grid-row: 1;
  object-fit: contain;
}

.illustrated-choice span {
  grid-column: 2;
  grid-row: 1;
}

.illustrated-choice input {
  grid-column: 3;
  grid-row: 1;
  width: 16px;
  height: 16px;
}

article [data-question-id="111"] > p {
  margin-top: 22px;
  color: var(--room-ink);
  font-weight: 700;
}

.cat-list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 0 16px;
}

.cat-list-heading .action,
.profile-heading .action {
  width: auto;
  margin: 0;
  flex: none;
}

.cat-list {
  display: grid;
  gap: 12px;
}

.cat-list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cat-list-tools .action {
  width: auto;
  min-height: 44px;
  margin: 0;
  font-size: 14px;
}

.cat-manage-link {
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--room-muted);
  font: inherit;
  font-size: 13px;
}

.cat-manage-link:is(:hover, :focus-visible, :active) {
  color: var(--room-red-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

#studio[data-scene="room"] .studio-pet {
  margin: 0;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  border-color: var(--room-line);
  background: var(--room-card);
  box-shadow: none;
}

.cat-status-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-status-identity > div {
  min-width: 0;
}

.studio-pet h2 {
  margin: 0;
  color: var(--room-heading);
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cat-status-meta {
  margin: 3px 0 0;
  color: var(--room-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cat-list-portrait {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--room-soft);
  object-fit: contain;
}

.cat-status-recent {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--room-line);
}

.cat-status-recent time,
.cat-status-next {
  color: var(--room-muted);
  font-size: 14px;
}

.cat-status-summary {
  margin: 8px 0 0;
  color: var(--room-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cat-status-alert {
  margin: 7px 0;
  overflow: hidden;
  border: 1px solid #FF4438;
  border-radius: 8px;
  background: #FEFAF5;
  color: #804C3B;
}

.cat-status-alert-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--room-red-dark);
  color: #fff;
  font-size: 15px;
}

.cat-status-alert p {
  margin: 0;
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cat-status-next {
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.cat-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cat-status-actions .action {
  width: auto;
  min-height: 44px;
  margin: 0;
  padding-inline: 9px;
}

.cat-status-actions .action:first-child {
  flex: 2 1 120px;
}

.cat-status-actions .action.light {
  flex: 1 1 84px;
}

.cat-list-footer {
  margin-top: 24px;
  border-top: 1px solid var(--room-line);
}

.cat-list-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--room-muted);
  font-size: 13px;
  text-underline-offset: 3px;
}

.profile-layout {
  padding: 0 var(--room-gutter);
}

.profile-sidebar {
  display: none;
}

.profile-content {
  min-width: 0;
}

.profile-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 22px 0 8px;
}

.profile-draft {
  margin: 4px 0 0;
  color: var(--room-muted);
  font-size: 14px;
}

.profile-overview {
  display: grid;
  grid-template-columns: minmax(84px, .85fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 16px;
  padding: 18px 0 25px;
}

.profile-portrait {
  width: 100%;
  max-width: 225px;
  height: auto;
  object-fit: contain;
}

.profile-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 8px;
}

.profile-name h2,
.profile-history h2,
#report .record-heading {
  margin: 0;
  color: var(--room-ink);
  font: 700 22px / 1.35 var(--room-display);
  overflow-wrap: anywhere;
}

.profile-name span {
  color: var(--room-muted);
  font-size: 13px;
}

.profile-meta {
  margin: 9px 0 0;
}

.profile-meta-item {
  display: grid;
  grid-template-columns: 2.3em minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 0;
  font-size: 15px;
}

.profile-meta-item dt {
  color: var(--room-muted);
  font-size: 13px;
  align-self: center;
}

.profile-meta-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}

.profile-latest {
  grid-column: 1 / -1;
  padding: 20px;
  border: 0;
  border-radius: 16px;
  background: var(--room-soft);
}

.profile-latest h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--room-ink);
}

.profile-latest time,
.profile-latest p {
  font-size: 14px;
}

.profile-latest p {
  margin: 5px 0 0;
  color: var(--room-ink);
  line-height: 1.65;
}

.record-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  padding: 0;
  color: var(--room-red-dark);
  font-size: 14px;
  font-weight: 700;
}

.record-link .room-icon,
.history-entry .room-icon {
  width: 16px;
  height: 16px;
}

.profile-history {
  border-top: 1px solid var(--room-line);
  padding-top: 18px;
}

.profile-history-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  border: 1px solid transparent;
  border-radius: 8px;
  border-color: var(--room-line);
  background: var(--room-card);
}

.profile-history-list li + li {
  border-top: 1px solid var(--room-line);
}

.history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  text-align: left;
  align-items: center;
  gap: 4px 8px;
  min-height: 52px;
  width: 100%;
  padding: 16px;
}

.history-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.record-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-identity time {
  color: var(--room-muted);
  font-size: 13px;
}

.history-summary {
  grid-row: 2;
  color: var(--room-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.history-entry > .room-icon {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.history-entry:hover,
.profile-nav-button:hover {
  background: var(--room-selected);
}

.profile-switch {
  margin-top: 12px;
}

#report .report-conclusion {
  margin: 0 0 20px;
  padding: 20px 22px;
  border: 1px solid var(--room-line);
  border-inline-start: 3px solid var(--room-heading);
  border-radius: 8px;
  background: var(--room-card);
}

#report .report-conclusion p {
  color: var(--room-ink);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  line-height: 1.6;
}

#report .report-conclusion .report-conclusion-label {
  margin-bottom: 8px;
  color: var(--room-muted);
  font-size: 13px;
  font-weight: 400;
}

#report .report-alert {
  margin: 0 0 20px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #FF4438;
  border-radius: 12px;
  background: #FEFAF5;
}

#report .report-alert-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px 14px;
  background: var(--room-red-dark);
  color: #fff;
  font-size: 16px;
}

.report-alert-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  line-height: 1;
}

#report .report-alert .observation-card {
  margin: 0;
  padding: 12px 14px 14px;
  color: #804C3B;
}

#report .report-alert-advice {
  margin: 8px 0 0;
  font-weight: 700;
}

.observation-progress-count {
  margin: 0 0 10px;
  color: var(--room-red-dark);
  font-size: 14px;
  font-weight: 700;
}

.body-score-followup {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--room-line);
}

.report-postcard {
  margin: 20px 0 12px;
  padding: 16px 0 0;
  border-top: 1px solid var(--room-line);
}

.report-postcard .action {
  margin: 0;
}

#report .report-highlights {
  display: grid;
  margin: 12px 0 26px;
}

.report-highlight {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 16px 0;
  border-bottom: 1px solid var(--room-line);
}

.report-highlight:first-child {
  border-top: 1px solid var(--room-line);
}

.report-highlight .room-icon {
  width: 24px;
  height: 24px;
  margin: 3px 0;
}

.report-highlight h3 {
  margin: 0;
  color: var(--room-muted);
  font-size: 13px;
  font-weight: 400;
}

.report-highlight p {
  margin: 4px 0 0;
  color: var(--room-ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#report .report-detail {
  margin: 8px 0 0;
  padding: 1px 0;
  border: 0;
  border-bottom: 1px solid var(--room-line);
  border-radius: 0;
  background: transparent;
  overflow-wrap: anywhere;
}

#report .report-detail summary {
  min-height: 44px;
  padding: 10px 0;
}

.report-card-detail,
.report-note {
  color: var(--room-muted);
  font-size: 14px;
}

.report-note {
  margin-block: 16px;
}

@media (max-width: 779px) {
  body[data-view="report"] #roomCats {
    display: none;
  }
}

@media (max-width: 359px) {
  .room-brand span {
    font-size: 13px;
  }

  .profile-form {
    column-gap: 8px;
  }

  .profile-options .choice {
    font-size: 12px;
  }

  .age-fields .field select {
    font-size: 15px;
  }

  #profileIntro {
    max-width: 67%;
  }
}

@media (min-width: 780px) {
  body {
    padding: 24px;
  }

  main {
    min-height: calc(100dvh - 48px);
    max-width: 1160px;
    border: 1px solid transparent;
    border-radius: 15px;
    box-shadow: none;
  }

  body[data-view] main > .room-header {
    padding-inline: 28px;
  }

  .room-brand b {
    font-size: 31px;
  }

  .room-brand span {
    font-size: 18px;
  }

  .room-tabs {
    gap: 24px;
  }

  .room-tabs button {
    min-height: 54px;
    font-size: 14px;
  }

  .form-dock {
    position: static;
    width: 100%;
    padding-inline: 0;
    margin-top: 14px;
  }

  body[data-view="form"] #form {
    padding-bottom: 0;
  }

  .profile-form {
    column-gap: 18px;
  }

  .profile-form > section {
    padding: 10px 0;
  }

  .cat-list {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .profile-layout {
    display: grid;
    grid-template-columns: minmax(130px, 16%) minmax(0, 1fr);
    padding: 0;
  }

  .profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 12px;
    border-right: 1px solid var(--room-line);
  }

  .profile-nav-button {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 15px;
    text-align: left;
  }

  #studio[data-scene="profile"] .profile-nav-button:first-child,
  .profile-nav-button[aria-current] {
    background: var(--room-selected);
    color: var(--room-red-dark);
  }

  .profile-sidebar:has([aria-current]) .profile-nav-button:first-child {
    background: transparent;
    color: var(--room-ink);
  }

  .profile-content {
    padding-inline: clamp(18px, 3vw, 38px);
  }

  .profile-heading {
    padding-top: 28px;
  }

  .profile-heading h1 {
    font-size: clamp(32px, 4vw, 43px);
  }

  .profile-name h2 {
    font-size: 27px;
  }

  .profile-portrait {
    max-width: 255px;
  }

  .profile-history h2 {
    font-size: 25px;
  }

  .profile-overview {
    grid-template-columns: minmax(125px, 1fr) minmax(120px, 1fr) minmax(155px, 1.1fr);
    gap: 16px;
    min-height: 264px;
  }

  .profile-latest {
    grid-column: auto;
    padding: 17px 15px 8px;
  }

  .history-entry {
    grid-template-columns: max-content minmax(0, 1fr) 16px;
    gap: 14px;
  }

  .history-summary {
    grid-row: 1;
    grid-column: 2;
  }

  .history-entry > .room-icon {
    grid-row: 1;
    grid-column: 3;
  }

  #report .report-highlights {
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }

  .report-highlight:nth-child(2) {
    border-top: 1px solid var(--room-line);
  }
}

.room-brand img { display: block; width: 80px; height: auto; }
#headerBack { grid-column: 1; grid-row: 1; justify-self: start; width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; padding: 0; display: grid; place-items: center; }
#saveState[data-quiet="true"] { visibility: hidden; }
.profile-recovery {margin:0 0 20px;padding:20px;border:1px solid var(--room-line);border-radius:18px;background:var(--room-card)}
.profile-recovery h2 {margin:0 0 8px;font-size:20px}
.profile-recovery p {overflow-wrap:anywhere}
.profile-options:has([name="sex"]) { grid-template-columns: repeat(2,minmax(0,1fr)); }

#scores img { height: clamp(88px, 25vw, 112px); object-fit: contain; }


.identity-picker {display:none}
.profile-form[data-step="0"] .identity-picker {display:none}
.profile-form:is([data-step="0"],[data-step="1"]) .profile-consent {display:none}
.identity-cards {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
.identity-cards button {display:grid;gap:4px;margin:0;padding:12px 16px;line-height:1.35;text-align:left;color:var(--room-ink);background:var(--room-card);border:1px solid var(--room-line);border-radius:8px}
.identity-cards span {font-size:14px}
.identity-cards [aria-pressed="true"] {outline:2px solid var(--room-action);outline-offset:-2px;background:var(--room-selected)}
.identity-picker > button {background:transparent;color:var(--room-muted);text-decoration:underline}
.profile-form[hidden],.profile-form section[hidden]{display:none}


body[data-view="form"] #pageTitle {
  font-family: var(--room-display);
  color: var(--room-heading);
  font-size: clamp(32px, 6vw, 46px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}
body[data-view="form"] :is(label.choice, #back, #submit, .score-reference .pic) {
  min-height: 44px;
}
body[data-view="form"] .choice:has(input:checked) {
  border-color: var(--room-action);
  background-color: var(--room-selected);
}
#scores .score-copy { gap: 5px; }
#scores .score-copy span { font-size: 13px; line-height: 1.5; }

.identity-cards strong {display:inline-flex;align-items:center;gap:5px}
.identity-cards .identity-icon {font:18px/1 sans-serif;color:inherit}
#birthdayField[hidden],#ageFields[hidden] {display:none}

#birthdayField {
  display: block;
  width: 100%;
  margin: 16px auto;
}
#birthdayField[data-pending="true"] [role="spinbutton"] {
  color: var(--room-muted);
  background: linear-gradient(to bottom, transparent 44px, var(--room-line) 44px 45px,
    transparent 45px 87px, var(--room-line) 87px 88px, transparent 88px);
}
.birthday-status {
  min-height: 20px;
  margin: 5px 0 0;
  color: var(--room-red-dark);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
#birthdayField[data-pending="false"] .birthday-status { color: var(--room-muted); }
.birthday-wheels [role="spinbutton"]:focus-visible {
  outline: 2px solid var(--room-focus);
  outline-offset: -2px;
}
.birthday-wheels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 4vw, 28px);
  width: min(100%, 420px);
  margin-inline: auto;
}
.birthday-wheels [role="spinbutton"] {
  height: 132px;
  padding-block: 44px;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  text-align: center;
  color: var(--room-ink);
  background: linear-gradient(to bottom, transparent 44px, var(--room-line) 44px 45px,
    var(--room-card) 45px 87px, var(--room-line) 87px 88px, transparent 88px);
  mask-image: linear-gradient(transparent, black 36% 64%, transparent);
}
.birthday-wheels [role="spinbutton"] div {
  height: 44px;
  line-height: 44px;
  scroll-snap-align: center;
  font-size: clamp(17px, 3vw, 20px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}



.cat-profile-link {
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.cat-profile-link .room-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-inline-start: 6px;
  color: var(--room-muted);
  vertical-align: middle;
}
.cat-status-alert .cat-status-alert-reason {
  font-weight: 700;
  padding-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .action { transition: none; }
  .action:active:not(:disabled) { transform: none; }
}

.avatar-upload {display:none}

.profile-option-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #b38270;
  border-radius: 8px;
  background: #f9eae2;
  color: var(--room-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.profile-option-button strong { text-decoration: underline; text-underline-offset: 3px; }
.profile-option-button .room-icon { flex: 0 0 auto; width: 16px; height: 16px; }
@media (hover: hover) {
  .profile-option-button:hover { background: #f5e0d4; }
}
.profile-option-button:active { background: #efd6c8; }
.profile-option-button:focus-visible { outline: 2px solid var(--room-ink); outline-offset: 2px; }

.profile-consent{grid-column:1/-1;border:0;padding:0;margin:20px 0 4px}.profile-consent legend{font-size:15px;line-height:1.55;color:var(--room-ink);margin-bottom:10px}.profile-consent-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.profile-consent-options .choice{display:flex;align-items:center;justify-content:center;min-height:48px;margin:0}

#zoom{inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border-radius:0;background:#111}#zoom::backdrop{background:#111}.zoom-back{position:fixed;z-index:2;top:max(16px,env(safe-area-inset-top));left:16px;width:48px;height:48px;padding:12px;border:0;border-radius:50%;background:rgba(255,255,255,.9)}.zoom-back img{width:24px;height:24px}.viewer{display:flex;align-items:center;justify-content:center;width:100%;height:100%;max-height:none;overflow:auto;touch-action:pan-x pan-y pinch-zoom}.viewer img{width:auto;max-width:100%;height:auto;max-height:100%;object-fit:contain;touch-action:pinch-zoom}
body #studio[data-scene="manage"]{padding:20px var(--room-gutter)} #studio[data-scene="manage"] .studio-pet{padding:18px;margin-top:14px;border:0;border-radius:18px;background:var(--room-card)}

/* Photography-led brand direction: no decorative illustration or motion. */
html{scroll-behavior:auto!important}
*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.heading-cat,#profileCat,.cat-mark{display:none!important}
body[data-page="0"] .page-heading:has(#profileCat){display:block}

body[data-view="cover"]:has(#studio[data-scene="welcome"]) {
  padding: 0;
  background: #FEFAF5;
}

body[data-view="cover"]:has(#studio[data-scene="welcome"]) main {
  max-width: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

body[data-view="cover"]:has(#studio[data-scene="welcome"]) .room-header {
  display: none;
}

.observation-cover {
  --cover-paper: var(--room-paper);
  display: grid;
  grid-template: "photo photo" minmax(235px, 1fr) "copy copy" auto "entry signature" auto / 1fr auto;
  align-items: center;
  gap: 22px 12px;
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) 6vw max(28px, env(safe-area-inset-bottom));
  background: var(--cover-paper);
  color: #804C3B;
}

.observation-cover-photo {
  grid-area: photo;
  position: relative;
  align-self: stretch;
}

.observation-cover-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 64%;
}

.observation-cover-copy { grid-area: copy; }
.observation-cover-copy h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(2rem, 8.5vw, 4rem);
  font-weight: 600;
  line-height: 1.2;
}

.observation-cover-copy p {
  margin: .55em 0 0;
  color: #804C3B;
  line-height: 1.55;
}

.observation-cover-signature {
  grid-area: signature;
  width: 70px;
  height: auto;
}

.observation-cover-entry {
  grid-area: entry;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: var(--room-action);
  color: white;
  font: inherit;
  font-weight: 600;
}

.observation-cover-entry img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.observation-cover-entry:is(:hover, :active) { background: #804C3B; }
.observation-cover-entry:focus-visible { outline: 2px solid #804C3B; outline-offset: 4px; }

@media (min-width: 680px) and (min-aspect-ratio: 6/5) {
  .observation-cover {
    grid-template: "photo signature" 1fr "photo copy" auto "photo entry" auto "photo ." 1fr / minmax(0, 1.2fr) minmax(0, 1fr);
    column-gap: 5vw;
    padding: 5vh 5vw;
  }
  .observation-cover-signature { align-self: end; }
  .observation-cover-photo img { object-position: 25% center; }
}

#studio[data-scene="room"] {
  display: grid;
  row-gap: 16px;
  padding: 16px var(--room-gutter) 0;
}
.cat-avatar-button {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--room-soft);
}
.cat-avatar-button span {
  position: absolute;
  inset: auto 0 0;
  padding: 2px 0 5px;
  background: #804C3B;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
}
.cat-status-identity + .hint:empty {
  display: none;
}
.profile-actions {
  margin-block: 20px;
}
.profile-actions .action {
  width: 100%;
  margin: 0;
}

/* 2026-11-26: colors sampled from the supplied Illustrator PDF, RGB rounded to 8-bit. */
body,input,select,textarea,button {font-family:Monda,Harmony,sans-serif;}
::selection {background:var(--room-red);color:white;}
input,textarea {caret-color:var(--room-red);}
.photo-assist {order:0;margin:0 0 28px;padding:0 0 28px;border:0;border-bottom:1px dashed var(--room-red);}
.photo-content {padding:0;}
.photo-content .pair {display:grid;grid-template-columns:1fr 1fr;gap:12px;min-inline-size:0;margin:0;padding:0;border:0;}
.photo-content .pair:disabled .upload {background:var(--room-soft);color:var(--room-muted);cursor:default;}
.photo-content .pair:disabled figure > img {display:none;}
.photo-content figure {margin:0;min-width:0;}
.photo-content .upload {display:flex;align-items:center;justify-content:center;min-height:48px;background:var(--room-red);color:white;border:0;border-radius:4px;position:relative;}
.photo-content figure>img {width:100%;height:150px;object-fit:contain;background:white;margin-top:12px;}
.photo-content .pic img {height:115px;object-fit:contain;}
.photo-content figcaption {font-size:13px;margin:8px 0;}
.avatar-upload {padding:24px 0;margin:0;}
.chapter-subtitle {font:600 18px Monda,sans-serif;color:var(--room-red);margin:8px 0 20px;}
.chapter-number {font:400 28px Monda,sans-serif;color:var(--room-red);float:right;margin-left:12px;}
body[data-view="form"] #pageTitle {font-size:clamp(28px,7vw,36px);line-height:1.25;}
body[data-view="form"] #pageHeading {padding-top:12px;}
body[data-view="form"] #observationProgress {margin-bottom:24px;}
body[data-view="form"] article>section {border-bottom-color:var(--room-red);}
body[data-view="form"] .choice {background:white;}
body[data-view="form"] .choice:has(input:checked) {outline:2px solid var(--room-red);outline-offset:-2px;background:var(--room-paper);}
body[data-view="form"] .choice input {accent-color:var(--room-red);}

.photo-assist {background:var(--room-paper);border-radius:0;}
.hint,.zoom-label,small,figcaption,.field-error,.error {color:var(--room-ink);}
.zoom-label,.breed-results,.breed-results button {background:white;color:var(--room-ink);}
.breed-results button:hover {background:var(--room-paper);}
.choice:focus-within,.upload:focus-within {outline-color:var(--room-red);}
.observation-progress ol {display:none;}
.observation-progress::after {content:"";display:block;height:8px;border-radius:6px;background:linear-gradient(to right,var(--room-red) var(--chapter-progress,0%),var(--room-line) var(--chapter-progress,0%));}

.action,#submit,.photo-content .upload,.observation-cover-entry {font-size:16px;font-weight:600;}

#pageTitle {white-space:pre-line;overflow-wrap:anywhere;}
#ageMode {margin-top:16px;}
/* Compact management surface; keep the questionnaire typography unchanged. */
body #studio[data-scene="manage"] {padding:8px var(--room-gutter) 24px;background:var(--room-paper);}
#studio[data-scene="manage"] .cat-list-heading {padding:8px 0 14px;}
#studio[data-scene="manage"] .cat-list-heading {justify-content:flex-end;}
body #studio[data-scene="manage"] .studio-pet {padding:14px;margin:0 0 10px;border:1px solid var(--room-line);border-radius:8px;background:var(--room-card);}
#studio[data-scene="manage"] .studio-pet h2 {font-size:16px;line-height:1.5;font-weight:500;margin:0 0 10px;overflow-wrap:anywhere;}
#studio[data-scene="manage"] .action {font-size:14px;font-weight:500;min-height:44px;padding:9px 12px;line-height:1.5;margin-top:0;border-radius:6px;background:var(--room-paper);color:var(--room-ink);}
#studio[data-scene="manage"] .cat-status-actions {gap:8px;margin:0;}

.account-panel{max-width:440px;margin:32px auto;padding:24px;background:var(--paper,#fefaf5);color:#804c3b;display:grid;gap:20px}.account-panel h1{font-size:26px;line-height:1.4;margin:0}.account-panel p{line-height:1.7;margin:0}.account-panel button{min-height:48px;width:100%}.account-notice{font-size:14px;line-height:1.7}.account-notice summary{cursor:pointer;min-height:44px;display:flex;align-items:center;text-decoration:underline}.account-consent{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.6}.account-consent input{width:20px;height:20px;flex-shrink:0;accent-color:#ff4438}.account-state{font-size:13px;text-align:center;color:#804c3b}.account-message:empty{display:none}

/* V1.5 additions keep the existing single-column observation flow. */
.muscle-observation h2 { margin-bottom: 6px; }
.muscle-location { margin: 0 0 12px; color: var(--room-muted); font-size: 15px; line-height: 1.5; }
.muscle-options { display: grid; gap: 6px; }
.muscle-options .choice {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  margin: 0;
  padding: 10px 12px;
  line-height: 1.5;
}
.muscle-options input { margin: 0; }
.muscle-option-key { font-weight: 600; }
.muscle-guide { margin: 8px 0 0; padding: 0; border: 0; line-height: 1.6; }
.muscle-guide summary { min-height: 44px; padding: 10px 0; font-size: 15px; cursor: pointer; }
.muscle-reference { margin: 16px 0; }
.muscle-reference .pic { display: block; width: min(100%, 280px); margin-inline: auto; }
.muscle-reference .pic img { display: block; width: 100%; height: auto; }
.muscle-reference figcaption { margin-top: 8px; font-size: 14px; }
.urine-emergency { margin: 20px 0; padding: 18px; border: 1px solid var(--room-red, #f9423a); background: var(--room-card, #fffaf3); }
.urine-emergency h3 { margin: 0 0 12px; font-size: 18px; }
.urine-emergency p { margin: 0; line-height: 1.7; }
.observation-assessment { margin: 24px 0; }
.observation-assessment .assessment-score { font-size: 32px; font-weight: 600; margin: 12px 0; }

#report .assessment-advice { padding: 18px; }
#report .assessment-advice h2 { margin: 0 0 12px; font-size: 18px; }
#report .assessment-advice h3 { margin: 14px 0 4px; color: var(--room-heading); font-size: 15px; }
#report .report-alert.assessment-advice { border: 2px solid var(--room-red-dark); }
#report .report-alert.assessment-advice h2 { color: var(--room-red-dark); font-weight: 700; }
#report .report-review { margin: 0 0 18px; border: 1px solid var(--room-line); border-radius: 8px; background: var(--room-card); }
#report .assessment-advice p { margin: 0 0 10px; line-height: 1.7; }
#report .assessment-advice p:last-child { margin-bottom: 0; }

.membership-card{display:flex;align-items:center;gap:12px;margin:0 0 20px;padding:12px 0;}
.membership-card img{width:44px;height:44px;border-radius:50%;object-fit:cover;}
.membership-card p{margin:0;}
.membership-name{font-size:16px;font-weight:600;}
.membership-status{font-size:13px;opacity:.75;margin-top:4px!important;}

.membership-enter{display:inline-flex;align-items:center;min-height:44px;padding:4px 0;border:0;background:none;color:var(--brown,#804c3b);font:inherit;font-size:15px;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
/* The fallback must not remain clickable once the WeChat launcher is ready. */
.membership-enter[hidden]{display:none!important}
.mall-dialog{box-sizing:border-box;width:min(90vw,400px);max-height:85vh;overflow:auto;padding:24px;border:1px solid #e6dcd2;border-radius:16px;background:#fefaf5;color:#804c3b}
.mall-dialog::backdrop{background:rgb(0 0 0 / .35)}
.mall-dialog h2{margin:0 0 12px;font-size:21px}.mall-dialog p{font-size:15px;line-height:1.6}
.mall-dialog a.action{display:flex;justify-content:center;align-items:center;min-height:48px;margin:20px 0;text-decoration:none}
.mall-dialog img{display:block;width:min(100%,240px);height:auto;margin:16px auto;background:white;padding:12px;box-sizing:border-box}
.mall-dialog .mall-code-help{margin:12px 0 8px}.mall-dialog .mall-update-hint{margin:0 0 20px;font-size:14px}.mall-dialog .mall-close{width:100%;min-height:44px}

/* ===== 观察手记 · 结论页（礼物版） ===== */
body[data-view="report"] .page-heading { min-height: auto; padding-bottom: 12px; }
body[data-view="report"] #pageHeading:has(.journal-book-title) {
  display: flex; flex-direction: column; align-items: flex-start;
  padding-block: 30px 10px;
}
body[data-view="report"] #pageHeading h1 { max-width: 100%; font-family: Harmony,sans-serif; }
#pageHeading:has(.journal-book-title) h1 { margin: 12px 0 0; line-height: 1.18; }
.journal-owner,.journal-book-title { display: block; }
.journal-owner { font-size: 17px; font-weight: 400; color: #9a6f5e; }
.journal-book-title { margin-top: 4px; font-size: clamp(33px,8.5vw,44px); font-weight: 600; letter-spacing: .01em; }
#pageHeading:has(.journal-book-title) .report-date {
  order: -1; margin: 0 0 2px; font-family: var(--room-display); font-size: 12px;
  letter-spacing: .06em; color: #b08974;
}
#pageHeading:has(.journal-book-title) .report-date img { opacity: .7; }

#report .journal-opening {
  max-width: 34em; margin: 10px 0 22px; font-size: 16.5px; line-height: 1.8; color: #6f5244;
}

#report .observation-assessment h2 { margin: 0; font-size: 16px; }
#report .journal-marks { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 14px; padding: 16px 0; }
#report .journal-marks p { margin: 0; }
#report .journal-marks .report-note { margin-top: 5px; font-size: 13px; line-height: 1.5; }
#report .journal-marks .assessment-score { font: 600 clamp(24px,6vw,32px)/1.3 var(--room-display); }
#report .journal-grade small,#report .journal-award small { display: block; font-size: 13px; }
#report .journal-grade-mark { font: 600 23px/1.3 var(--room-display); }

/* 礼物卡：只作用于有称号的正常报告，不影响异常 / 低覆盖报告 */
#report .observation-assessment:has(.journal-award) {
  position: relative; text-align: center; overflow: hidden;
  margin: 2px 0 26px; padding: 30px clamp(18px,5vw,30px) 22px;
  border: 1px solid #F1DAD0; border-radius: 22px;
  background:
    radial-gradient(130% 68% at 50% -8%, rgba(255,68,56,.08), rgba(255,68,56,0) 62%),
    linear-gradient(180deg, #FFFDFB 0%, #FCF3EB 100%);
  box-shadow: 0 18px 40px -26px rgba(128,76,59,.6);
}
#report .observation-assessment:has(.journal-award)::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, #FF4438, #FF8559);
}
#report .observation-assessment:has(.journal-award) > h2 { display: none; }
#report .observation-assessment:has(.journal-award) .journal-marks {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 2px;
}
#report .observation-assessment:has(.journal-award) .journal-grade { order: -1; }
#report .observation-assessment:has(.journal-award) .journal-grade small {
  display: block; margin-bottom: 2px; font-size: 12px; letter-spacing: .1em; color: #bb8572;
}
#report .observation-assessment:has(.journal-award) .journal-grade-mark {
  display: block; font: 700 clamp(56px,17vw,76px)/1 var(--room-display);
  color: var(--room-red); letter-spacing: .02em; text-shadow: 0 6px 18px rgba(255,68,56,.18);
}
#report .observation-assessment:has(.journal-award) .journal-grade .report-note {
  margin-top: 8px; font-size: 12.5px; color: #a98977;
}
#report .observation-assessment:has(.journal-award) .journal-points {
  display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 8px 18px; border-radius: 999px; background: rgba(128,76,59,.07);
}
#report .observation-assessment:has(.journal-award) .journal-points .assessment-score {
  margin: 0; font: 700 16px/1 var(--room-display); color: var(--room-ink);
}
#report .observation-assessment:has(.journal-award) .journal-points .report-note {
  margin: 0; font-size: 12.5px; color: #a98977;
}
#report .observation-assessment:has(.journal-award) .journal-award {
  max-width: 30em; margin: 20px auto 2px; padding-top: 20px;
  border-top: 1px solid rgba(221,187,172,.7);
}
#report .observation-assessment:has(.journal-award) .journal-award small {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .1em; color: #bb8572;
}
#report .observation-assessment:has(.journal-award) .journal-award small::before,
#report .observation-assessment:has(.journal-award) .journal-award small::after {
  content: ""; width: 20px; height: 1px; background: #e3c6b8;
}
#report .observation-assessment:has(.journal-award) .journal-award h3 {
  margin: 8px 0; font: 700 clamp(23px,6.4vw,27px)/1.35 var(--room-display); color: var(--room-ink);
}
#report .observation-assessment:has(.journal-award) .journal-award p {
  margin: 0 auto; max-width: 26em; font-size: 14px; line-height: 1.7; color: #7d5f51;
}
#report .observation-assessment:has(.journal-award) > .report-note {
  margin: 14px auto 0; max-width: 30em; font-size: 12px; line-height: 1.6; color: #a98977;
}
#report .observation-assessment:has(.journal-award) > .report-detail {
  margin-top: 16px; text-align: left; border-bottom: 0;
  border-top: 1px solid rgba(221,187,172,.5);
}
#report .observation-assessment:has(.journal-award) > .report-detail summary {
  color: #9a6f5e; font-weight: 600;
}

/* The cat profile uses the same controls for new cats and recovered drafts. */
body:has(.compact-profile:not([hidden])) .page-heading {min-height:0;padding-block:12px 0;margin-bottom:0}
body:has(.compact-profile:not([hidden])) #pageTitle {font-size:26px;line-height:1.3}
.profile-form.compact-profile {display:block;max-width:600px;margin-inline:auto}
.compact-profile .avatar-upload {display:grid;justify-items:center;padding:6px 0 12px}
.compact-profile .avatar-upload .hint:empty {display:none}
.profile-avatar-entry {display:grid;justify-items:center;gap:5px;border:0;background:transparent;color:var(--room-muted);font:inherit;font-size:13px;cursor:pointer}
.profile-avatar-frame {display:grid;place-items:center;position:relative;width:68px;height:68px;border-radius:50%;border:1px dashed var(--room-heading);background:var(--room-card);overflow:hidden}
.profile-avatar-frame .room-icon {width:25px;height:25px}
.profile-avatar-frame img:not(.room-icon) {position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
body[data-view="form"] .compact-profile > section {
  display:grid;grid-template-columns:6em minmax(0,1fr);gap:4px 8px;align-items:center;
  margin:0;padding:8px 2px;border:0;border-bottom:1px solid var(--room-line);
}
.compact-profile > section h2 {grid-row:1;grid-column:1;margin:0;font-size:14px;white-space:nowrap}
.compact-profile > section > :not(h2) {grid-column:2;min-width:0}
.compact-profile .profile-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.compact-profile .field :is(input,select) {min-height:44px;font-size:16px}
.compact-profile .profile-option-button {min-height:32px;margin:0;padding:3px 0;border:0;background:transparent;justify-content:flex-start;font-size:13px}
.compact-profile #ageMode strong {font-weight:500}
.compact-profile [hidden] {display:none!important}
.compact-profile .breed-results {position:static;max-height:150px;overflow:auto}
.profile-bind-dialog {box-sizing:border-box;width:min(calc(100% - 36px),380px);max-height:85dvh;margin:auto;padding:0;border:1px solid var(--room-line);border-radius:12px;background:var(--room-paper);color:var(--room-ink)}
.profile-bind-dialog::backdrop {background:rgb(46 35 28 / 42%)}
.profile-bind-dialog .account-panel {display:flex;flex-direction:column;gap:9px;margin:0;padding:24px;background:var(--room-paper)}
.profile-bind-dialog h2 {margin:0;color:var(--room-heading);font-size:23px;line-height:1.4}
.profile-bind-dialog .account-notice summary {min-height:36px}
.profile-bind-dialog .account-consent {margin:5px 0}
.profile-bind-dialog .action {margin:0}
.profile-bind-dialog .action.light {background:transparent;color:var(--room-heading);border:0}

.cat-switcher {display:none;position:relative;grid-area:1 / 1;justify-self:start;min-width:0;max-width:100%;margin:0;padding:0;border:0}
body[data-view="cover"]:has(#studio[data-scene="profile"]) .cat-switcher {display:block}
body[data-view="cover"]:has(#studio:is([data-scene="profile"], [data-scene="personal"])) :is(#headerBack, .room-current-page) {display:none}
.cat-switcher summary {display:flex;align-items:center;gap:6px;max-width:100%;min-height:44px;padding:0;cursor:pointer;color:var(--room-heading);font-weight:600;list-style:none}
.cat-switcher summary::-webkit-details-marker {display:none}
.cat-switcher summary span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cat-switcher summary img {width:15px;height:15px;transform:rotate(90deg)}
.cat-switcher[open] summary img {transform:rotate(-90deg)}
.cat-switcher-list {position:absolute;top:100%;left:0;width:min(230px,78vw);max-height:52vh;overflow:auto;padding:6px;background:var(--room-card);border:1px solid var(--room-line);border-radius:8px;box-shadow:0 8px 22px #52372521}
.cat-switcher-list button {display:block;width:100%;min-height:44px;padding:8px 12px;text-align:left;color:var(--room-ink);font:inherit;border:0;background:transparent;overflow-wrap:anywhere}
.cat-switcher-list [aria-current] {color:var(--room-heading);background:var(--room-soft);font-weight:600;border-radius:4px}
.cat-switcher-list .cat-switch-add {border-top:1px solid var(--room-line);color:var(--room-heading);font-weight:600}

/* Top-level destinations share one dock. The questionnaire keeps its form controls. */
:root {--member-nav-height:calc(60px + env(safe-area-inset-bottom,0px))}
#intro:has(.member-nav:not([hidden])) {padding-bottom:var(--member-nav-height)}
#intro:has(.member-nav:not([hidden])) .observation-cover {min-height:calc(100svh - var(--member-nav-height))}
.member-nav {position:fixed;z-index:25;inset:auto 0 0;display:grid;grid-template-columns:1fr 1fr;width:min(100%,600px);margin-inline:auto;height:var(--member-nav-height);padding:0 0 env(safe-area-inset-bottom,0px);box-sizing:border-box;background:var(--room-card);border-top:1px solid var(--room-line)}
.member-nav[hidden] {display:none}
.member-nav button {display:grid;align-content:center;justify-items:center;gap:4px;margin:0;padding:4px;border:0;background:transparent;color:var(--room-muted);font:inherit;font-size:12px;line-height:1.25;cursor:pointer}
.member-nav [aria-current="page"] {color:var(--room-action);font-weight:600}
.cat-tab-icon {width:23px;height:23px;background:currentColor;mask:url('../assets/observation-ui/cat.svg') center/contain no-repeat}
.person-icon {display:inline-block;position:relative;width:23px;height:23px}
.person-icon::before,.person-icon::after {content:'';position:absolute;left:50%;transform:translateX(-50%);box-sizing:border-box;border:1.7px solid currentColor}
.person-icon::before {top:1px;width:9px;height:9px;border-radius:50%}
.person-icon::after {bottom:1px;width:18px;height:9px;border-radius:10px 10px 3px 3px}
.personal-center {max-width:560px;margin:0 auto;padding:26px var(--room-gutter)}
.personal-center h1 {margin:0 0 20px;font-size:clamp(26px,6vw,34px);line-height:1.25}
.personal-center .membership-card {gap:14px;margin:0 0 16px;padding:20px 16px;background:var(--room-card);border:1px solid var(--room-line);border-radius:8px}
.member-portrait {display:grid;place-items:center;position:relative;flex:none;width:54px;height:54px;border-radius:50%;background:var(--room-paper);color:var(--room-heading)}
.member-portrait img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.personal-center .membership-name {margin:0;font-size:20px;overflow-wrap:anywhere}
.personal-center .action {margin:0;width:100%}
.personal-center .mall-entry {display:block;margin-top:14px}
@media(min-width:780px){.member-nav {width:min(calc(100% - 48px),1160px)}}

/* ===== 猫咪档案 / 个人中心 UI 优化 ===== */
/* 顶栏切换猫：做成明确可点的 chip */
.cat-switcher summary { padding: 5px 12px; border: 1px solid var(--room-line); border-radius: 999px; background: var(--room-card); }

/* 标题行的「编辑资料」入口 */
.profile-edit-link { min-height: 44px; padding: 4px 2px; border: 0; background: none; color: var(--room-heading); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.profile-overview { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 6px; padding: 0; min-height: 0; }
.profile-head {
  display: grid;
  grid-template-columns: minmax(84px, .85fr) minmax(0, 1.25fr);
  align-items: center;
  align-self: stretch;
  gap: 16px;
  padding-block: 8px;
}
.profile-identity { min-width: 0; }
.profile-latest { margin: 0; }

/* 观察历史空状态：友好引导块 */
.profile-history-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 12px 0 6px; padding: 30px 20px; border: 1px dashed var(--room-line); border-radius: 18px; background: var(--room-card); }
.profile-history-empty .room-icon { width: 30px; height: 30px; opacity: .5; margin-bottom: 4px; }
.profile-empty-title { margin: 0; color: var(--room-ink); font-size: 15px; font-weight: 600; }
.profile-history-empty .hint { margin: 0; max-width: 24em; line-height: 1.6; }

/* 个人中心 */
.personal-section-label { margin: 0 0 8px; color: var(--room-muted); font-size: 13px; letter-spacing: .06em; }
.personal-hint { margin: 0 0 14px; color: var(--room-muted); font-size: 14px; line-height: 1.6; }
.personal-notice { margin: 22px 0 0; border-top: 1px solid var(--room-line); }
.personal-notice summary { min-height: 44px; display: flex; align-items: center; color: var(--room-heading); font-size: 15px; font-weight: 600; cursor: pointer; }
.personal-notice p { margin: 2px 0 14px; color: var(--room-muted); font-size: 13.5px; line-height: 1.7; }
