:root {
  color-scheme: light;
  --ivory: #f5f0e6;
  --paper: #fffdf8;
  --paper-deep: #ece3d3;
  --burgundy: #782b3b;
  --burgundy-dark: #571c2a;
  --ink: #203247;
  --ink-soft: #536071;
  --gold: #9b783e;
  --gold-light: #d7c39c;
  --line: #d8cbb7;
  --success: #286147;
  --warning: #855116;
  --error: #8a2934;
  --shadow: 0 18px 45px rgba(48, 39, 29, 0.09);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--ivory);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

button,
.button,
[role="button"] {
  min-width: 48px;
  min-height: 48px;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Songti SC", STSong, SimSun, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  letter-spacing: 0.025em;
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

p:last-child {
  margin-bottom: 0;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 18px;
  transform: translateY(-160%);
  background: var(--ink);
  color: white;
  text-decoration: none;
}

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

.site-header {
  border-top: 5px solid var(--burgundy);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 18px;
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 70px;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--burgundy);
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 1.65rem;
}

.brand-mark::before {
  position: absolute;
  inset: 5px;
  border: 1px solid var(--gold-light);
  content: "";
}

.brand-mark span {
  position: relative;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand-name {
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.brand-tagline {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.prototype-badge {
  flex: 0 0 auto;
  padding: 3px 13px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: #6b4d20;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.role-switch {
  display: inline-flex;
  gap: 6px;
  margin-top: 20px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--ivory);
}

.role-button {
  min-height: 48px;
  padding: 9px 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.role-button[aria-pressed="true"] {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: #fff;
}

.role-button:not([aria-pressed="true"]):hover {
  border-color: var(--gold-light);
  background: var(--paper);
}

.app-shell {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  min-height: 560px;
  margin: 0 auto;
  padding: 62px 0 74px;
}

.app-shell::before {
  position: absolute;
  top: 30px;
  right: 0;
  width: 76px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero-copy {
  max-width: 730px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.elder-intro {
  max-width: 820px;
  margin-bottom: 34px;
}

.elder-view h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.7rem);
}

.portrait-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.portrait-card::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(155, 120, 62, 0.23);
  content: "";
  pointer-events: none;
}

.elder-card {
  max-width: 900px;
  padding: 36px 42px 40px;
}

.card-caption,
.section-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.caption-rule {
  width: 38px;
  height: 1px;
  background: var(--gold);
}

.step-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

.step-list::before {
  position: absolute;
  z-index: -1;
  top: 23px;
  right: 9%;
  left: 9%;
  height: 1px;
  background: var(--line);
  content: "";
}

.step-item {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}

.step-number {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: Georgia, serif;
}

.step-item--current .step-number {
  border: 2px solid var(--burgundy);
  background: var(--burgundy);
  color: #fff;
}

.step-item--done .step-number {
  border-color: var(--success);
  color: var(--success);
}

.step-item--locked {
  color: #6c7077;
}

.step-item--locked .step-number {
  border-style: dashed;
  background: #f1ece3;
}

.step-label {
  font-weight: 700;
}

.step-item--current .step-label {
  color: var(--burgundy);
}

.step-state {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.progress-note {
  position: relative;
  z-index: 1;
  margin: 26px 0 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  background: #f6f0e5;
}

.progress-note strong {
  color: var(--burgundy);
}

.progress-note p {
  margin: 4px 0 0;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.button--primary {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: #fff;
}

.button--primary:hover:not(:disabled) {
  border-color: var(--burgundy-dark);
  background: var(--burgundy-dark);
}

.button--secondary {
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.button--quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.button:disabled {
  border-color: #a9a39a;
  background: #ded9d0;
  color: #585b60;
}

.elder-main-button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 62px;
  font-size: 22px;
}

.placeholder-note {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-align: center;
}

.elder-simulation-reminder {
  position: relative;
  z-index: 1;
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--warning);
  background: #fff6e7;
  color: #6d410f;
  font-weight: 700;
  line-height: 1.65;
}

.elder-panel {
  position: relative;
  z-index: 1;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.elder-panel h2 {
  margin-bottom: 10px;
  color: var(--burgundy);
}

.elder-panel__intro {
  margin-bottom: 24px;
  color: var(--ink-soft);
}

.official-account {
  display: flex;
  width: min(100%, 310px);
  align-items: center;
  flex-direction: column;
  gap: 8px;
  margin: 0 auto 28px;
  padding: 24px;
  border: 1px solid var(--line);
  background: #f8f3e9;
  text-align: center;
}

.official-account strong {
  margin-top: 6px;
  font-size: 1.2rem;
}

.official-account > span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.qr-code {
  display: grid;
  width: 210px;
  max-width: 100%;
  aspect-ratio: 1;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 1px;
  padding: 10px;
  border: 1px solid var(--ink);
  background: #fff;
}

.qr-cell {
  aspect-ratio: 1;
  background: #fff;
}

.qr-cell--filled {
  background: var(--ink);
}

.member-number {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 2px solid var(--gold);
  background: #faf3e5;
  text-align: center;
}

.member-number span,
.member-number strong {
  display: block;
}

.member-number span {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.member-number strong {
  overflow-wrap: anywhere;
  color: var(--burgundy);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.elder-registration {
  max-width: 650px;
}

.elder-field label {
  font-size: 1.05rem;
}

.elder-field .field-error:empty {
  display: none;
}

.field-help,
.panel-footnote {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.panel-footnote {
  margin: 12px 0 0;
  text-align: center;
}

.elder-summary {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
}

.elder-summary div {
  min-width: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.elder-summary dt {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.elder-summary dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 1.12rem;
  font-weight: 700;
}

.elder-summary .payment-amount {
  color: var(--burgundy);
  font-family: Georgia, serif;
  font-size: 2.8rem;
  line-height: 1.3;
}

.elder-photo-field input[type="file"] {
  padding: 9px;
}

.elder-photo-field input[type="file"]::file-selector-button {
  min-height: 48px;
  margin-right: 12px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.elder-photo-preview {
  margin: 4px auto 26px;
}

.elder-photo-preview[hidden] {
  display: none;
}

.completion-seal {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  margin: 0 auto 24px;
  transform: rotate(-5deg);
  border: 3px double var(--success);
  border-radius: 50%;
  color: var(--success);
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.archive-file-name {
  font-family: Consolas, "Microsoft YaHei", monospace;
}

.completion-message {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--success);
  background: #edf5ef;
  color: #204d3a;
  font-size: 1.08rem;
  font-weight: 700;
}

.staff-heading {
  max-width: 850px;
  margin-bottom: 34px;
}

.staff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
}

.staff-records,
.studio-aside {
  min-width: 0;
}

.record-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  padding: 22px 26px;
  border-top: 2px solid var(--burgundy);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.55);
}

.record-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.record-total strong {
  color: var(--burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
}

.record-total span {
  font-weight: 700;
}

.status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-summary li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
}

.record-list {
  display: grid;
  gap: 14px;
}

.record-card {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-light);
  background: var(--paper);
}

.record-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.record-card h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.record-id {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-family: Consolas, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.record-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

.record-details div {
  min-width: 0;
}

.record-details dt {
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.record-details dd {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.status-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.status-badge--neutral {
  color: #596270;
}

.status-badge--waiting {
  color: var(--warning);
}

.status-badge--ready {
  color: var(--burgundy);
}

.status-badge--complete {
  color: var(--success);
}

.studio-aside {
  align-self: start;
}

.portrait-frame {
  width: min(100%, 330px);
  margin: 0 auto 28px;
  padding: 15px 15px 12px;
  border: 1px solid #8b6b37;
  outline: 5px solid #c7ae7d;
  outline-offset: -9px;
  background: #af925e;
  box-shadow: var(--shadow);
  text-align: center;
}

.portrait-mat {
  position: relative;
  display: grid;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  place-items: center;
  border: 12px solid #f9f5eb;
  background: #e6ddcf;
}

.portrait-mat::before,
.portrait-mat::after {
  position: absolute;
  background: #c9bda9;
  content: "";
}

.portrait-mat::before {
  top: 12%;
  right: 10%;
  width: 1px;
  height: 76%;
}

.portrait-mat::after {
  right: 10%;
  bottom: 12%;
  left: 10%;
  height: 1px;
}

.portrait-silhouette {
  position: relative;
  width: 75%;
  height: 80%;
}

.portrait-head {
  position: absolute;
  z-index: 2;
  top: 10%;
  left: 50%;
  width: 40%;
  aspect-ratio: 0.82;
  transform: translateX(-50%);
  border: 7px solid #d2d0ca;
  border-bottom-width: 3px;
  border-radius: 48% 48% 45% 45%;
  background: #d9b79d;
}

.portrait-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 90%;
  height: 54%;
  transform: translateX(-50%);
  border-radius: 46% 46% 0 0;
  background: var(--ink);
}

.portrait-shirt {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 50%;
  width: 23%;
  height: 42%;
  transform: translateX(-50%);
  background: #f8f4e9;
  clip-path: polygon(0 0, 50% 24%, 100% 0, 72% 100%, 28% 100%);
}

.frame-plate {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 8px;
  background: #d8c495;
  color: #4f3b21;
  font-family: Georgia, serif;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.studio-note {
  padding: 4px 8px 0;
}

.studio-note h2 {
  font-size: 1.6rem;
}

.studio-note p {
  color: var(--ink-soft);
}

.aside-footnote {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.photo-preview {
  position: relative;
  width: min(100%, 360px);
  padding: 12px 12px 38px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.photo-preview img,
.photo-preview video {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-deep);
}

.photo-preview figcaption,
.archive-file-name {
  overflow-wrap: anywhere;
}

.photo-preview figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-align: center;
}

.field {
  margin-bottom: 22px;
}

.field label,
.field-label {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  font-weight: 700;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid #827b70;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 120px;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border: 2px solid var(--error);
}

.field-error {
  margin: 7px 0 0;
  color: var(--error);
  font-size: 0.86rem;
  font-weight: 700;
}

.checkbox-label {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
}

.checkbox-label input {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.empty-state,
.error-state,
.loading-state {
  padding: 48px 36px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}

.empty-state h3,
.error-state h1,
.loading-state h1 {
  margin-bottom: 12px;
}

.error-state {
  max-width: 760px;
  margin: 20px auto;
  border-top: 4px solid var(--error);
  text-align: left;
}

.error-state .button {
  margin-top: 14px;
}

.error-message {
  padding: 14px 18px;
  border-left: 3px solid var(--error);
  background: #f8eae7;
  color: #711e29;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.loading-state {
  max-width: 680px;
  margin: 30px auto;
}

.loading-seal {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 24px;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--burgundy);
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 2rem;
}

.confirm-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 34px;
  overflow-y: auto;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(24, 28, 35, 0.3);
}

.confirm-dialog::backdrop {
  background: rgba(25, 35, 47, 0.66);
}

.dialog-ornament {
  margin-bottom: 18px;
  color: var(--gold);
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
}

.confirm-dialog h2 {
  margin-bottom: 18px;
  font-size: 1.65rem;
}

.dialog-body {
  color: var(--ink-soft);
}

.dialog-warning {
  padding: 12px 14px;
  border-left: 3px solid var(--error);
  background: #f8eae7;
  color: #711e29;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.notice {
  position: fixed;
  z-index: 110;
  right: 22px;
  bottom: 22px;
  width: min(430px, calc(100% - 44px));
  padding: 15px 20px;
  border: 1px solid var(--ink);
  border-left-width: 5px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 700;
}

.notice--success {
  border-color: var(--success);
}

.notice--warning {
  border-color: var(--warning);
}

.notice--error {
  border-color: var(--error);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ede4d5;
}

.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 30px;
}

.simulation-note {
  max-width: 920px;
  margin-bottom: 6px;
  color: #414d5b;
  font-size: 0.82rem;
}

.simulation-note strong {
  display: inline-block;
  margin-right: 12px;
  color: var(--burgundy);
}

.storage-note {
  margin-bottom: 16px;
  color: #535d68;
  font-size: 0.76rem;
}

.footer-reset {
  font-size: 0.82rem;
}

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 16px;
  border: 2px solid var(--error);
  background: var(--paper);
  color: var(--error);
  text-align: center;
}

.view-enter {
  animation: view-enter 420ms ease-out both;
}

@keyframes view-enter {
  from {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

.staff-controls {
  display: grid;
  gap: 0 16px;
  margin-bottom: 26px;
  padding: 20px;
  border-top: 2px solid var(--burgundy);
  background: rgba(255, 253, 248, 0.72);
}

.staff-controls .field {
  min-width: 0;
}

.staff-result-count {
  margin: -8px 0 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.staff-record-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-record {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold-light);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.staff-record:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

.staff-record[aria-pressed="true"] {
  border-color: var(--burgundy);
  border-left-color: var(--burgundy);
  background: #fbf3e8;
  box-shadow: inset 0 0 0 1px var(--burgundy);
}

.staff-record__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.staff-record__heading > span:first-child {
  min-width: 0;
}

.staff-record__name {
  display: block;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 1.25rem;
}

.staff-record .record-id {
  display: block;
  margin-bottom: 0;
}

.staff-record__fields {
  display: grid;
  gap: 12px 18px;
}

.staff-record__field {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.staff-record__label {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.staff-record__value {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 700;
}

.staff-detail {
  position: relative;
  z-index: 0;
  min-width: 0;
  align-self: start;
  padding: 28px;
}

.staff-detail__heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.staff-detail__heading h2 {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  color: var(--burgundy);
}

.staff-detail__heading .record-id {
  margin-bottom: 0;
}

.staff-details {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0 20px;
  margin-bottom: 28px;
}

.staff-details div {
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--paper-deep);
}

.staff-details dt {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.staff-details dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.staff-photo-section,
.staff-workflow {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.staff-photo-grid {
  display: grid;
  gap: 22px;
}

.staff-photo {
  min-width: 0;
  margin: 0;
}

.staff-photo__content {
  min-height: 180px;
}

.staff-photo__content img {
  width: 100%;
  max-height: 520px;
  border: 10px solid #fff;
  outline: 1px solid var(--line);
  background: var(--paper-deep);
  object-fit: contain;
}

.staff-photo figcaption {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-align: center;
}

.staff-photo__placeholder {
  display: grid;
  min-height: 180px;
  place-content: center;
  padding: 22px;
  border: 1px dashed var(--gold);
  background: #f8f3e9;
  text-align: center;
}

.staff-photo__placeholder p {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.staff-photo__retry {
  justify-self: center;
}

.staff-photo__loading {
  padding: 28px 0;
  color: var(--ink-soft);
  text-align: center;
}

.staff-upload-preview,
.staff-send-preview {
  width: min(100%, 280px);
  margin-right: auto;
  margin-left: auto;
}

.staff-upload-field input[type="file"] {
  padding: 9px;
}

.staff-upload-field input[type="file"]::file-selector-button {
  min-height: 48px;
  margin-right: 12px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.staff-action {
  width: 100%;
  margin-top: 4px;
}

.staff-action-note {
  padding: 18px;
  border-left: 3px solid var(--gold);
  background: #f8f3e9;
}

.staff-delivery-complete {
  padding: 20px;
  border: 1px solid var(--success);
  background: #edf5ef;
  color: #204d3a;
}

.staff-delivery-complete p[role="status"] {
  font-size: 1.08rem;
  font-weight: 700;
}

@media (min-width: 560px) {
  .staff-controls {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.45fr);
  }

  .staff-result-count {
    grid-column: 1 / -1;
  }

  .staff-record__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .staff-layout {
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    gap: 32px;
  }

  .staff-detail {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  .studio-aside {
    position: sticky;
    top: 24px;
  }
}

@media (min-width: 1180px) {
  .staff-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-inner,
  .app-shell,
  .footer-inner {
    width: calc(100% - 32px);
  }

  .header-inner {
    padding-top: 18px;
  }

  .brand-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .role-switch {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-button {
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-shell {
    padding: 42px 0 52px;
  }

  .elder-card {
    padding: 28px 24px 32px;
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 26px 0;
  }

  .step-list::before {
    top: 24px;
    bottom: 24px;
    left: 23px;
    width: 1px;
    height: auto;
  }

  .step-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 68px;
    align-items: center;
    gap: 0 14px;
    text-align: left;
  }

  .step-number {
    grid-row: 1 / 3;
    margin: 0;
  }

  .step-label {
    align-self: end;
  }

  .step-state {
    align-self: start;
  }

  .record-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .studio-aside {
    padding-top: 10px;
  }
}

@media (max-width: 440px) {
  .brand-mark {
    flex-basis: 48px;
    width: 48px;
    height: 60px;
  }

  .brand-tagline {
    letter-spacing: 0.04em;
  }

  .prototype-badge {
    margin-left: 64px;
  }

  .card-caption {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px 10px;
  }

  .caption-rule {
    display: none;
  }

  .elder-card {
    padding: 24px 18px 28px;
  }

  .elder-panel {
    padding-top: 24px;
  }

  .official-account {
    padding: 20px 14px;
  }

  .member-number {
    padding: 16px 12px;
  }

  .elder-summary .payment-amount {
    font-size: 2.4rem;
  }

  .record-card {
    padding: 18px;
  }

  .record-card__heading {
    flex-direction: column;
    gap: 4px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }

  .confirm-dialog {
    padding: 26px 22px;
  }

  .notice {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
