:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5fa;
  --ink: #14233a;
  --muted: #667386;
  --navy: #082d63;
  --navy-2: #113d78;
  --navy-soft: #eaf1fb;
  --orange: #f0a23a;
  --orange-soft: #fff5e6;
  --red: #ef4652;
  --red-soft: #fff2f3;
  --line: #d9e0ea;
  --line-dark: #b7c4d5;
  --teal: #06999c;
  --shadow: 0 16px 44px rgba(8, 45, 99, 0.12);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(8, 45, 99, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  background-size: 34px 34px, auto;
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Yu Gothic UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

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

a {
  color: inherit;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 50;
  transform: translateY(-150%);
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(100%, 1536px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  border-bottom: 3px solid var(--navy);
  padding: 24px 24px 18px;
  background: rgba(255, 255, 255, 0.94);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--navy);
}

.brand-logo {
  display: block;
  width: clamp(280px, 25vw, 380px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.header-copy {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.7;
}

.journey {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: var(--navy);
}

.journey li:not(.journey-arrow) {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 64px;
  font-size: 15px;
  font-weight: 900;
}

.journey-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
}

.journey-icon svg {
  width: 28px;
  height: 28px;
}

.journey .is-current .journey-icon {
  background: var(--navy);
  color: #fff;
}

.journey-arrow {
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
}

.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.help-link span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 999px;
  font-size: 20px;
}

.app-layout {
  width: min(100%, 1536px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(420px, 0.97fr);
  gap: 0;
}

.input-column {
  position: relative;
  min-width: 0;
  padding: 14px 28px 26px 34px;
  background: rgba(255, 255, 255, 0.72);
}

.input-column::before {
  content: "";
  position: absolute;
  left: 50px;
  top: 40px;
  bottom: 126px;
  width: 4px;
  border-radius: 999px;
  background: var(--navy);
}

.question-form {
  display: grid;
  gap: 0;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-section {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 26px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0 14px;
}

.question-section:first-of-type {
  padding-top: 8px;
}

.section-rail {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  justify-items: start;
  align-items: start;
  gap: 8px 12px;
  color: var(--navy);
  text-align: left;
}

.step-number {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.section-rail strong {
  max-width: 6.8em;
  color: var(--navy);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.rail-icon {
  display: grid;
  place-items: center;
  grid-column: 2;
  color: var(--navy);
  font-size: 28px;
}

.section-content {
  min-width: 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 10px;
}

.section-title-row h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.section-title-row h2 small {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.required-badge,
.optional-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 2px;
  padding: 2px 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.required-badge {
  border: 1px solid var(--red);
  color: var(--red);
}

.optional-badge {
  border: 1px solid var(--navy);
  color: var(--navy);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.frequency-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.change-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.symptom-group {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 8px;
}

.symptom-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.symptom-label span {
  color: var(--navy);
  font-size: 21px;
  line-height: 1;
}

.symptom-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice-button {
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 4px 7px;
  background: #fff;
  color: #1d2a3e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  text-align: center;
  overflow-wrap: anywhere;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.choice-button:hover,
.choice-button:focus-visible,
.search-button:hover,
.search-button:focus-visible,
.button:hover,
.button:focus-visible,
.help-link:focus-visible {
  outline: 3px solid rgba(17, 61, 120, 0.18);
  outline-offset: 2px;
}

.choice-button:hover {
  border-color: var(--navy);
}

.choice-button:active,
.button:active {
  transform: translateY(1px);
}

.choice-button.is-selected,
.choice-button[aria-pressed="true"] {
  border-color: var(--orange);
  padding-left: 28px;
  background: var(--orange-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(240, 162, 58, 0.22);
}

.choice-button.is-selected::before,
.choice-button[aria-pressed="true"]::before {
  content: "✓";
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.date-input {
  width: min(100%, 370px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 5px 12px;
  background: #fff;
  color: var(--navy);
}

.date-input svg {
  width: 20px;
  height: 20px;
}

.date-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  color: var(--ink);
  font-weight: 800;
  background: transparent;
}

.date-input input:focus-visible,
textarea:focus-visible,
.field input:focus-visible {
  outline: 3px solid rgba(17, 61, 120, 0.18);
  outline-offset: 2px;
}

.date-input small,
.micro-copy {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.micro-copy {
  margin: 6px 0 0;
}

.info-tip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 0;
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #edf3fb;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.info-tip .tip-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}

.info-tip .tip-text {
  min-width: 0;
  flex: 1 1 12rem;
}

.search-button {
  margin-left: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  padding: 6px 14px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.urgent-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  margin-top: 10px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.urgent-box strong {
  grid-column: 1;
  font-size: 16px;
}

.urgent-box > span {
  grid-column: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.urgent-box a {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 5px 12px;
  background: #fff;
  color: var(--red);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.field {
  margin-top: 12px;
}

.field label,
.note-field {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.field input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.field input {
  min-height: 40px;
  padding: 8px 12px;
}

textarea {
  min-height: 82px;
  resize: vertical;
  padding: 12px;
}

.field input::placeholder,
textarea::placeholder {
  color: #98a2b2;
}

.visit-row h2 span {
  font-weight: 900;
}

.char-count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.preview-column {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 26px 32px 32px;
  background: rgba(247, 249, 252, 0.78);
}

.paper-card {
  position: sticky;
  top: 18px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 28px 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.paper-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px dashed var(--navy);
  padding-bottom: 14px;
}

.paper-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
}

.paper-header h2 span {
  margin-left: 16px;
}

.paper-header time {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.pet-info {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px 10px 20px;
}

.pet-avatar-control {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.pet-avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff0dc;
  color: var(--ink);
  overflow: hidden;
}

.pet-avatar svg {
  width: 54px;
  height: 54px;
  stroke-width: 2.4;
}

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

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.avatar-button,
.avatar-upload {
  position: relative;
  min-width: 34px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.avatar-button.is-active,
.avatar-button[aria-pressed="true"],
.avatar-upload.is-active {
  border-color: var(--navy);
  background: var(--navy-soft);
}

.avatar-button:focus-visible,
.avatar-upload:focus-within {
  outline: 3px solid rgba(8, 45, 99, 0.18);
  outline-offset: 2px;
}

.avatar-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pet-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.pet-fields label {
  margin: 0;
  display: grid;
  gap: 3px;
}

.pet-fields span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.pet-fields input,
.pet-fields select {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 2px 0 4px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
}

.pet-fields input::placeholder {
  color: var(--ink);
  opacity: 1;
}

.pet-fields input:focus,
.pet-fields select:focus {
  outline: 3px solid rgba(8, 45, 99, 0.12);
  outline-offset: 3px;
  border-bottom-color: var(--navy);
}

.summary-box {
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: #fff;
}

.summary-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-width: 0;
  margin: 0;
}

.summary-row + .summary-row {
  border-top: 1px dashed var(--line-dark);
}

.summary-row h3,
.summary-row p {
  margin: 0;
  padding: 16px 18px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.summary-row h3 {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--navy);
  font-weight: 900;
}

.summary-row h3 span {
  width: 20px;
  flex: 0 0 auto;
  color: var(--navy);
  text-align: center;
}

.summary-row p {
  border-left: 1px dashed var(--line-dark);
  white-space: pre-line;
}

.generated-block {
  margin: 10px 0 18px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  padding: 18px 20px;
  box-shadow: 0 12px 28px rgba(8, 45, 99, 0.09);
}

.generated-block h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
}

.generated-text {
  min-height: 118px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.generated-text.is-empty {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.medical-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.paper-brand {
  margin: 10px 0 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.preview-photo {
  width: min(100%, 460px);
  margin: 18px -12px -20px auto;
}

.preview-photo img {
  width: 100%;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 20px 4px 16px;
  border-radius: var(--radius);
  padding: 10px 16px;
  background: var(--surface-soft);
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.status-bar::before {
  content: "✓";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-size: 15px;
}

.status-bar[data-status="warning"]::before {
  content: "!";
  border-color: var(--orange);
  color: var(--orange);
}

.status-bar[data-status="success"]::before {
  border-color: var(--teal);
  color: var(--teal);
}

.action-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}

.button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.button.primary {
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 12px 26px rgba(8, 45, 99, 0.18);
}

.button.secondary {
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
}

.button.danger {
  border: 1px solid var(--red);
  background: #fff;
  color: var(--red);
}

.button.small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.device-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.history-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  border-top: 1px solid var(--line);
  padding: 28px 34px 40px;
  background: #fff;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.history-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
}

.history-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}

.history-meta,
.history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.history-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.visit-mark {
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fff;
  color: var(--navy);
}

.visit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
}

.history-excerpt {
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.empty-state {
  margin: 0;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  width: min(100%, 1536px);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 20px 24px 34px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-footer p {
  margin: 4px 0;
}

@media (max-width: 1220px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-copy {
    order: 3;
    grid-column: 1 / -1;
  }

  .help-link {
    display: none;
  }

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

  .preview-column {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .paper-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 840px) {
  body {
    background-size: 28px 28px, auto;
  }

  .site-header {
    padding: 18px 16px 14px;
    gap: 14px;
  }

  .brand-lockup {
    width: 100%;
  }

  .brand-logo {
    width: min(100%, 320px);
  }

  .journey {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 8px;
  }

  .journey li:not(.journey-arrow) {
    min-width: 52px;
    font-size: 13px;
  }

  .journey-icon {
    width: 44px;
    height: 44px;
  }

  .journey-icon svg {
    width: 24px;
    height: 24px;
  }

  .input-column {
    padding: 14px 16px 24px;
  }

  .input-column::before {
    display: none;
  }

  .question-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0 22px;
  }

  .section-rail {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
  }

  .step-number {
    grid-row: auto;
  }

  .section-rail strong {
    max-width: none;
  }

  .rail-icon {
    grid-column: auto;
    justify-self: end;
    font-size: 26px;
  }

  .choice-grid,
  .frequency-grid,
  .change-grid,
  .symptom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .symptom-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .search-button {
    margin-left: 0;
  }

  .urgent-box {
    grid-template-columns: 1fr;
  }

  .urgent-box strong,
  .urgent-box > span,
  .urgent-box a {
    grid-column: 1;
    grid-row: auto;
  }

  .preview-column {
    padding: 20px 16px 26px;
  }

  .paper-card {
    padding: 22px 16px 18px;
  }

  .paper-header {
    display: grid;
  }

  .paper-header h2 {
    font-size: 22px;
  }

  .paper-header h2 span {
    display: block;
    margin: 4px 0 0;
  }

  .pet-info,
  .pet-fields,
  .summary-row,
  .history-card {
    grid-template-columns: 1fr;
  }

  .summary-row p {
    border-left: 0;
    border-top: 1px dashed var(--line-dark);
  }

  .summary-row h3,
  .summary-row p {
    padding: 12px 14px;
  }

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

  .history-card {
    padding: 24px 16px 34px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .site-header {
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .brand-logo {
    width: min(100%, 272px);
  }

  .header-copy {
    font-size: 14px;
  }

  .journey {
    width: 100%;
    justify-content: flex-start;
    gap: clamp(28px, 9vw, 58px);
  }

  .journey li:not(.journey-arrow) {
    min-width: 0;
  }

  .journey-arrow {
    display: none;
  }

  .choice-grid,
  .frequency-grid,
  .change-grid,
  .symptom-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .choice-button {
    min-height: 40px;
    padding: 6px 8px;
    font-size: 13px;
  }

  .preview-photo {
    margin-right: -8px;
    margin-left: -8px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .input-column,
  .status-bar,
  .action-row,
  .device-note,
  .history-card,
  .site-footer {
    display: none;
  }

  .app-layout,
  .preview-column,
  .paper-card {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: #fff;
  }
}
