:root {
  color-scheme: light;
  --school-red: #8f1118;
  --school-red-deep: #68080e;
  --school-red-soft: #fff0ed;
  --school-gold: #bd8a42;
  --school-gold-light: #e9c98f;
  --paper: #ffffff;
  --canvas: #f6f3ef;
  --canvas-deep: #ece6df;
  --ink: #2a2422;
  --muted: #6d6460;
  --line: #e7dfda;
  --success: #1d7250;
  --success-soft: #eaf6f0;
  --warning: #8b621f;
  --warning-soft: #fff6e5;
  --danger: #a52a30;
  --shadow-sm: 0 8px 24px rgba(64, 42, 35, 0.07);
  --shadow-lg: 0 24px 70px rgba(58, 35, 28, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #ddd7d0;
}

body {
  color: var(--ink);
  overscroll-behavior-y: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #8f1118;
  outline-offset: 3px;
}

svg {
  display: block;
}

.page-backdrop {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(143, 17, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 17, 24, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 20% 15%, rgba(189, 138, 66, 0.22), transparent 32%),
    #e8e3dd;
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.backdrop-orbit {
  position: absolute;
  border: 56px solid rgba(143, 17, 24, 0.035);
  border-radius: 50%;
}

.backdrop-orbit-a {
  top: -150px;
  right: -110px;
  width: 380px;
  height: 380px;
}

.backdrop-orbit-b {
  bottom: -220px;
  left: -150px;
  width: 480px;
  height: 480px;
  border-color: rgba(189, 138, 66, 0.07);
}

.app-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: clip;
  background:
    radial-gradient(circle at 100% 0, rgba(226, 184, 119, 0.16), transparent 270px),
    var(--canvas);
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: calc(68px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 10px 8px;
  border-bottom: 1px solid rgba(143, 17, 24, 0.09);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.app-header .brand {
  grid-row: 1;
  grid-column: 2;
}

#backButton {
  grid-row: 1;
  grid-column: 1;
}

#homeButton {
  grid-row: 1;
  grid-column: 3;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  color: #5e514d;
  background: transparent;
  cursor: pointer;
}

.icon-button:active {
  background: #f1ece8;
  transform: scale(0.97);
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  min-width: 0;
}

.brand-shield {
  flex: 0 0 auto;
  width: 38px;
  height: 44px;
}

.brand-shield svg {
  width: 100%;
  height: 100%;
}

.shield-fill {
  fill: var(--school-red);
}

.shield-line {
  fill: none;
  stroke: var(--school-gold-light);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  margin-left: 10px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  letter-spacing: 1.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 3px;
  color: #9a6e30;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 1.4px;
}

.flow-progress {
  position: sticky;
  z-index: 12;
  display: grid;
  top: calc(68px + var(--safe-top));
  padding: 12px 22px 11px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.progress-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-progress[hidden] {
  display: none;
}

.progress-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #766b66;
  font-size: 11px;
}

.progress-item:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 10px;
  left: calc(50% + 12px);
  width: calc(100% - 24px);
  height: 1px;
  background: #ded6d1;
  content: "";
}

.progress-item.is-done:not(:last-child)::after {
  background: linear-gradient(90deg, var(--school-red), var(--school-gold));
}

.progress-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border: 1px solid #d5ccc7;
  border-radius: 50%;
  color: #9f9691;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.progress-label {
  margin-top: 5px;
}

.progress-item.is-done,
.progress-item.is-current {
  color: var(--school-red);
  font-weight: 700;
}

.progress-item.is-done .progress-dot,
.progress-item.is-current .progress-dot {
  border-color: var(--school-red);
  color: #fff;
  background: var(--school-red);
}

.progress-item.is-current .progress-dot {
  box-shadow: 0 0 0 5px rgba(143, 17, 24, 0.09);
}

.screen {
  min-height: calc(100vh - 68px - var(--safe-top));
  min-height: calc(100svh - 68px - var(--safe-top));
}

.screen-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 69px - var(--safe-top));
  min-height: calc(100svh - 69px - var(--safe-top));
  padding: 22px 18px calc(24px + var(--safe-bottom));
}

.flow-progress:not([hidden]) + .screen .screen-layout {
  min-height: calc(100vh - 132px - var(--safe-top));
  min-height: calc(100svh - 132px - var(--safe-top));
}

.screen-main {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.screen-actions {
  display: grid;
  gap: 11px;
  margin-top: 28px;
}

.screen-actions.sticky-actions {
  position: sticky;
  z-index: 10;
  bottom: 0;
  margin: 26px -18px calc(-24px - var(--safe-bottom));
  padding: 14px 18px calc(15px + var(--safe-bottom));
  border-top: 1px solid rgba(143, 17, 24, 0.08);
  background: rgba(246, 243, 239, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #9a6e30;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(26px, 7.5vw, 34px);
  line-height: 1.22;
  letter-spacing: 0.02em;
}

.page-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.card {
  border: 1px solid rgba(143, 17, 24, 0.08);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.primary-button,
.secondary-button,
.text-button {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #a31c23, var(--school-red-deep));
  box-shadow: 0 12px 26px rgba(143, 17, 24, 0.22);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px) scale(0.995);
}

.primary-button:disabled,
.secondary-button:disabled {
  color: rgba(255, 255, 255, 0.82);
  background: #bcb5b1;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid rgba(143, 17, 24, 0.18);
  color: var(--school-red);
  background: #fff9f6;
}

.secondary-button:disabled {
  border-color: #d9d3cf;
  color: #9c9490;
  background: #eeebe8;
}

.text-button {
  min-height: 42px;
  color: #766b66;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -4px;
  width: 20px;
  height: 20px;
  margin-right: 7px;
}

.button-icon svg,
.line-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-layout {
  position: relative;
  justify-content: space-between;
  padding-top: 30px;
  overflow: hidden;
}

.login-crest {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 116px;
  margin: 20px auto 30px;
}

.login-crest::before,
.login-crest::after {
  position: absolute;
  border: 1px solid rgba(189, 138, 66, 0.28);
  border-radius: 50%;
  content: "";
}

.login-crest::before {
  width: 150px;
  height: 150px;
}

.login-crest::after {
  width: 190px;
  height: 190px;
  border-color: rgba(143, 17, 24, 0.08);
}

.login-crest .brand-shield {
  position: relative;
  z-index: 1;
  width: 90px;
  height: 105px;
  filter: drop-shadow(0 18px 25px rgba(104, 8, 14, 0.2));
}

.login-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.login-copy .page-title {
  font-size: 33px;
}

.login-copy .page-subtitle {
  max-width: 330px;
  margin-right: auto;
  margin-left: auto;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 34px;
}

.trust-item {
  padding: 14px 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #766d69;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.trust-item .line-icon {
  display: block;
  width: 23px;
  height: 23px;
  margin: 0 auto 7px;
  color: var(--school-red);
}

.login-note {
  margin: 13px 6px 0;
  color: #746a65;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.home-layout {
  padding-top: 16px;
}

.identity-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(145deg, #a21d24, #790a10 58%, #530307);
  box-shadow: 0 22px 45px rgba(104, 10, 15, 0.24);
}

.identity-card::before {
  position: absolute;
  top: -100px;
  right: -60px;
  width: 250px;
  height: 250px;
  border: 34px solid rgba(232, 200, 143, 0.08);
  border-radius: 50%;
  content: "";
}

.identity-top,
.identity-meta,
.identity-footer {
  position: relative;
  z-index: 1;
}

.identity-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.identity-kicker {
  display: block;
  color: var(--school-gold-light);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 2px;
}

.identity-name {
  display: block;
  margin-top: 10px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
}

.avatar-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #751016;
  background: linear-gradient(145deg, #f3d6a5, #d9a65d);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
  font-family: "Songti SC", serif;
  font-size: 23px;
  font-weight: 800;
}

.identity-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-top: 25px;
}

.identity-field {
  min-width: 0;
}

.identity-field-wide {
  grid-column: 1 / -1;
}

.identity-field span,
.identity-field strong {
  display: block;
}

.identity-field span {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
}

.identity-field strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-footer {
  display: flex;
  align-items: center;
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.verified-dot {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #efc37e;
  box-shadow: 0 0 0 4px rgba(239, 195, 126, 0.13);
}

.identity-code {
  margin-left: auto;
  color: var(--school-gold-light);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.mode-card,
.status-card {
  display: flex;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
}

.mode-icon,
.status-visual {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  color: var(--school-red);
  background: var(--school-red-soft);
}

.mode-icon .line-icon,
.status-visual .line-icon {
  width: 26px;
  height: 26px;
}

.card-copy {
  flex: 1;
  min-width: 0;
  margin-left: 14px;
}

.card-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-heading-row h2,
.status-card h2 {
  margin: 0;
  font-size: 16px;
}

.card-copy p,
.status-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--school-red);
  background: var(--school-red-soft);
  font-size: 10px;
  font-weight: 700;
}

.status-card {
  align-items: flex-start;
}

.status-visual {
  color: #8b621f;
  background: var(--warning-soft);
}

.status-visual.is-good {
  color: var(--success);
  background: var(--success-soft);
}

.status-visual.is-bad {
  color: var(--danger);
  background: var(--school-red-soft);
}

.status-action {
  margin-top: 14px;
}

.scene-section {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 3px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 19px;
}

.section-heading span {
  color: #746a65;
  font-size: 11px;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.scene-item {
  padding: 17px 8px 14px;
  border: 1px solid rgba(143, 17, 24, 0.07);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(62, 41, 34, 0.05);
  text-align: center;
}

.scene-item .line-icon {
  display: block;
  width: 25px;
  height: 25px;
  margin: 0 auto 9px;
  color: #9a6e30;
}

.scene-item strong,
.scene-item small {
  display: block;
}

.scene-item strong {
  font-size: 12px;
}

.scene-item small {
  margin-top: 5px;
  color: #766b66;
  font-size: 9px;
  letter-spacing: 0.8px;
}

.notice-intro {
  padding: 19px;
  margin-top: 18px;
  border-left: 3px solid var(--school-gold);
}

.notice-intro strong {
  display: block;
  font-size: 14px;
}

.notice-intro p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.notice-paper {
  margin-top: 14px;
  padding: 21px 19px;
}

.notice-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  color: #746a65;
  font-size: 11px;
}

.notice-section {
  margin-top: 19px;
}

.notice-section h2 {
  margin: 0 0 8px;
  color: #4f403b;
  font-size: 14px;
}

.notice-section p,
.notice-section li {
  color: #655b57;
  font-size: 14px;
  line-height: 1.82;
}

.notice-section p {
  margin: 0;
}

.notice-section ol,
.notice-section ul {
  margin: 0;
  padding-left: 19px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(143, 17, 24, 0.1);
  border-radius: 17px;
  background: #fff;
  cursor: pointer;
}

.consent-row input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--school-red);
}

.consent-row span {
  color: #5f5551;
  font-size: 12px;
  line-height: 1.65;
}

.capture-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 276px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid rgba(143, 17, 24, 0.09);
  border-radius: 28px;
  background:
    linear-gradient(rgba(143, 17, 24, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 17, 24, 0.025) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
  box-shadow: var(--shadow-sm);
}

.capture-building {
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 150px;
  height: 105px;
  color: rgba(143, 17, 24, 0.045);
}

.capture-building svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.face-guide {
  position: relative;
  z-index: 1;
  width: 136px;
  height: 178px;
  border: 2px solid rgba(143, 17, 24, 0.24);
  border-radius: 48% 48% 44% 44% / 39% 39% 58% 58%;
}

.face-guide::before,
.face-guide::after {
  position: absolute;
  left: 50%;
  background: rgba(143, 17, 24, 0.18);
  content: "";
  transform: translateX(-50%);
}

.face-guide::before {
  top: 59px;
  width: 34px;
  height: 50px;
  border: 1px solid rgba(143, 17, 24, 0.18);
  border-radius: 50%;
  background: transparent;
}

.face-guide::after {
  bottom: 25px;
  width: 70px;
  height: 34px;
  border-radius: 45% 45% 15% 15%;
}

.guide-corner {
  position: absolute;
  width: 25px;
  height: 25px;
  border-color: var(--school-gold);
  border-style: solid;
}

.guide-corner-tl {
  top: 18px;
  left: 18px;
  border-width: 2px 0 0 2px;
  border-radius: 8px 0 0;
}

.guide-corner-tr {
  top: 18px;
  right: 18px;
  border-width: 2px 2px 0 0;
  border-radius: 0 8px 0 0;
}

.guide-corner-bl {
  bottom: 18px;
  left: 18px;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 8px;
}

.guide-corner-br {
  right: 18px;
  bottom: 18px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 8px;
}

.quality-tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.quality-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #6d625e;
  background: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  text-align: center;
}

.quality-tip::before {
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--school-gold);
  content: "";
}

.source-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 23px;
}

.source-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 116px;
  padding: 15px;
  border: 1px solid rgba(143, 17, 24, 0.12);
  border-radius: 21px;
  color: #4e4440;
  background: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.source-button:active {
  transform: scale(0.985);
}

.source-button .source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  margin-bottom: 10px;
  border-radius: 15px;
  color: var(--school-red);
  background: var(--school-red-soft);
}

.source-icon .line-icon {
  width: 23px;
  height: 23px;
}

.source-button strong {
  font-size: 14px;
}

.source-button small {
  margin-top: 4px;
  color: #746a65;
  font-size: 11px;
}

.preview-shell {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 26px;
  background: #211d1c;
  box-shadow: var(--shadow-lg);
}

.preview-image {
  display: block;
  width: 100%;
  height: min(58vh, 510px);
  object-fit: contain;
  background: #211d1c;
}

.preview-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 38px 16px 15px;
  color: #fff;
  background: linear-gradient(transparent, rgba(18, 13, 12, 0.78));
  font-size: 11px;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.photo-checklist {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.check-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  color: #655b57;
  background: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 50%;
  color: var(--success);
  background: var(--success-soft);
  font-size: 12px;
  font-weight: 800;
}

.confirm-photo {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 17px;
  margin-top: 20px;
  padding: 15px;
}

.confirm-photo img {
  display: block;
  width: 82px;
  height: 106px;
  border-radius: 15px;
  object-fit: cover;
  background: #e7e1dc;
}

.confirm-photo-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.confirm-photo-copy strong {
  font-size: 16px;
}

.confirm-photo-copy span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.summary-list {
  margin-top: 15px;
  overflow: hidden;
}

.summary-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid #eee8e4;
  font-size: 12px;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-label {
  color: #6f6560;
}

.summary-value {
  color: #493f3b;
  font-weight: 650;
  text-align: right;
}

.privacy-hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  padding: 13px 15px;
  border-radius: 15px;
  color: #675c57;
  background: #efeae5;
  font-size: 11px;
  line-height: 1.55;
}

.privacy-hint .line-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--school-red);
}

.processing-layout {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.process-seal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 190px;
  margin: 12px auto 31px;
}

.process-ring,
.process-ring::before {
  position: absolute;
  border-radius: 50%;
}

.process-ring {
  inset: 0;
  background: conic-gradient(var(--school-red) var(--process-angle, 20%), #eadfda 0);
  transition: background 350ms ease;
}

.process-ring::before {
  inset: 10px;
  background: var(--canvas);
  content: "";
}

.process-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(143, 17, 24, 0.08);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.process-inner .line-icon {
  width: 36px;
  height: 36px;
  color: var(--school-red);
}

.process-percent {
  margin-top: 8px;
  color: #9a6e30;
  font-size: 12px;
  font-weight: 750;
}

.process-title {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 25px;
}

.process-description {
  max-width: 300px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.process-steps {
  width: 100%;
  margin-top: 30px;
  padding: 7px 17px;
  text-align: left;
}

.process-step {
  display: flex;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid #eee8e4;
  color: #706662;
  font-size: 12px;
}

.process-step:last-child {
  border-bottom: 0;
}

.process-step-dot {
  width: 9px;
  height: 9px;
  margin-right: 11px;
  border: 2px solid #cfc5c0;
  border-radius: 50%;
}

.process-step.is-active {
  color: #4b403c;
  font-weight: 700;
}

.process-step.is-active .process-step-dot {
  border-color: var(--school-red);
  background: var(--school-red);
  box-shadow: 0 0 0 4px rgba(143, 17, 24, 0.08);
}

.process-step.is-done {
  color: var(--success);
}

.process-step.is-done .process-step-dot {
  border-color: var(--success);
  background: var(--success);
}

.result-layout {
  justify-content: center;
  text-align: center;
}

.result-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  margin: 12px auto 26px;
  border-radius: 50%;
  color: var(--success);
  background: var(--success-soft);
  box-shadow: 0 0 0 14px rgba(29, 114, 80, 0.05);
}

.result-mark.is-bad {
  color: var(--danger);
  background: var(--school-red-soft);
  box-shadow: 0 0 0 14px rgba(165, 42, 48, 0.05);
}

.result-mark .line-icon {
  width: 54px;
  height: 54px;
}

.result-title {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 28px;
}

.result-description {
  max-width: 320px;
  margin: 11px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.receipt-card {
  margin-top: 27px;
  padding: 19px;
  text-align: left;
}

.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px dashed #ddd2cb;
}

.receipt-head strong {
  font-size: 14px;
}

.receipt-head span {
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
}

.receipt-number {
  display: block;
  margin-top: 16px;
  color: var(--school-red);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.8px;
  word-break: break-all;
}

.receipt-meta {
  margin-top: 8px;
  color: #6f6560;
  font-size: 12px;
}

.error-panel {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid rgba(165, 42, 48, 0.14);
  border-radius: 17px;
  color: #7b3235;
  background: var(--school-red-soft);
  font-size: 12px;
  line-height: 1.65;
  text-align: left;
}

.config-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.config-block .result-mark {
  color: var(--danger);
  background: var(--school-red-soft);
}

.loading-skeleton {
  display: grid;
  gap: 12px;
}

.skeleton-block {
  height: 88px;
  border-radius: 18px;
  background: linear-gradient(90deg, #eee8e3, #f8f5f2, #eee8e3);
  background-size: 200% 100%;
  animation: shimmer 1.25s infinite linear;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: calc(24px + var(--safe-bottom));
  left: 18px;
  max-width: 420px;
  margin: auto;
  padding: 13px 17px;
  border-radius: 14px;
  color: #fff;
  background: rgba(48, 40, 37, 0.92);
  box-shadow: 0 14px 34px rgba(24, 17, 15, 0.28);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.toast[hidden] {
  display: none;
}

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

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (min-width: 600px) {
  body {
    padding: 24px 0;
  }

  .app-frame {
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    border: 1px solid rgba(143, 17, 24, 0.09);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
  }

  .app-header {
    border-radius: 30px 30px 0 0;
  }

  .screen,
  .screen-layout {
    min-height: calc(100vh - 117px);
    min-height: calc(100svh - 117px);
  }

  .flow-progress:not([hidden]) + .screen .screen-layout {
    min-height: calc(100vh - 180px);
    min-height: calc(100svh - 180px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
