    :root {
      --pine: #123d35;
      --pine-2: #1f5a4d;
      --gold: #b68b45;
      --gold-soft: rgba(182, 139, 69, .18);
      --paper: #fbfaf6;
      --paper-2: #f3efe6;
      --ink: #1f2d2a;
      --muted: #65736f;
      --line: rgba(18, 61, 53, .14);
      --danger: #9f3a2f;
      --white: #fff;
      --shadow: 0 18px 46px rgba(18, 61, 53, .11);
    }

    * { box-sizing: border-box; }

    html,
    body {
      overflow-x: hidden;
    }

    button,
    input {
      font: inherit;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at 12% 8%, rgba(182, 139, 69, .16), transparent 28%),
        linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
      color: var(--ink);
      font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
      letter-spacing: 0;
    }

    .container { min-height: 100vh; }

    .tool-wrap {
      width: min(1180px, calc(100% - 32px));
      max-width: 100%;
      margin: 0 auto;
      padding: 32px 0 52px;
    }

    .tool-top {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
      gap: 22px;
      align-items: end;
      margin-bottom: 18px;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--gold);
      font-size: .82rem;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .eyebrow::before {
      content: "";
      width: 24px;
      height: 1px;
      background: var(--gold);
    }

    h1 {
      margin: 10px 0 12px;
      color: var(--pine);
      font-size: clamp(2rem, 4vw, 3.45rem);
      line-height: 1.12;
      letter-spacing: 0;
    }

    .lead {
      max-width: 700px;
      margin: 0;
      color: var(--muted);
      font-size: 1.02rem;
      line-height: 1.8;
      overflow-wrap: anywhere;
    }

    .top-note {
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, .72);
      border-radius: 8px;
      padding: 16px 18px;
      box-shadow: 0 10px 26px rgba(18, 61, 53, .06);
      color: var(--muted);
      line-height: 1.75;
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .tool-grid {
      display: grid;
      grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
      gap: 18px;
      align-items: stretch;
    }

    .share-poster-hero {
      position: relative;
      overflow: hidden;
      margin: 0 0 24px;
      border-radius: 22px;
      background:
        radial-gradient(circle at top left, rgba(214, 171, 84, .28), transparent 28%),
        radial-gradient(circle at bottom right, rgba(32, 80, 67, .42), transparent 34%),
        linear-gradient(135deg, #071d19 0%, #123d35 54%, #173a31 100%);
      box-shadow: 0 28px 72px rgba(8, 23, 20, .28);
      color: #f6ecd2;
    }

    .share-poster-hero::before,
    .share-poster-hero::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
    }

    .share-poster-hero::before {
      width: 360px;
      height: 360px;
      top: -180px;
      right: -120px;
      background: radial-gradient(circle, rgba(214, 171, 84, .22), transparent 68%);
    }

    .share-poster-hero::after {
      width: 280px;
      height: 280px;
      left: -90px;
      bottom: -120px;
      background: radial-gradient(circle, rgba(255, 255, 255, .08), transparent 70%);
    }

    .share-poster-shell {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1.4fr) minmax(250px, .75fr);
      gap: 24px;
      padding: 30px;
    }

    .share-poster-kicker {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: rgba(246, 220, 164, .92);
      font-size: .78rem;
      font-weight: 900;
      letter-spacing: .16em;
      text-transform: uppercase;
    }

    .share-poster-kicker::before {
      content: "";
      width: 28px;
      height: 1px;
      background: currentColor;
    }

    .share-poster-hook {
      margin: 14px 0 8px;
      color: rgba(255, 248, 232, .95);
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: .02em;
    }

    .share-poster-pattern {
      margin: 0;
      color: #fff8e8;
      font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
      font-size: clamp(2.6rem, 7vw, 5rem);
      font-weight: 900;
      line-height: 1.05;
      letter-spacing: .04em;
      text-shadow: 0 12px 32px rgba(0, 0, 0, .26);
    }

    .share-poster-summary {
      max-width: 680px;
      margin: 16px 0 0;
      color: rgba(255, 247, 228, .86);
      font-size: 1.02rem;
      line-height: 1.8;
    }

    .share-poster-tail {
      margin: 16px 0 0;
      color: #f6d694;
      font-size: 1rem;
      font-weight: 800;
    }

    .share-poster-actions {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 24px;
    }

    .share-poster-actions .btn-primary {
      min-width: 220px;
      background: linear-gradient(135deg, #d8aa56 0%, #b98532 100%);
      color: #102822;
      border-color: rgba(255, 255, 255, .14);
      box-shadow: 0 18px 30px rgba(9, 22, 19, .28);
    }

    .share-poster-caption {
      color: rgba(255, 247, 228, .72);
      font-size: .88rem;
      letter-spacing: .03em;
    }

    .share-poster-proof {
      display: grid;
      gap: 8px;
      margin-top: 18px;
      color: rgba(255, 247, 228, .82);
      font-size: .9rem;
      line-height: 1.6;
    }

    .share-poster-proof span {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .share-poster-proof span::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgba(246, 214, 148, .9);
      flex: 0 0 auto;
    }

    .share-poster-side {
      display: grid;
      align-content: stretch;
      gap: 16px;
    }

    .share-poster-scorecard,
    .share-poster-chipbox {
      border: 1px solid rgba(255, 255, 255, .12);
      border-radius: 18px;
      background: rgba(255, 255, 255, .06);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      padding: 20px;
    }

    .share-poster-scorecard span,
    .share-poster-chipbox span {
      display: block;
    }

    .share-poster-scorecard span {
      color: rgba(246, 220, 164, .84);
      font-size: .78rem;
      font-weight: 900;
      letter-spacing: .14em;
      text-transform: uppercase;
    }

    .share-poster-scorecard strong {
      display: block;
      margin-top: 10px;
      color: #fff8e8;
      font-size: clamp(2.6rem, 8vw, 4.4rem);
      line-height: 1;
      font-weight: 900;
    }

    .share-poster-scorecard small {
      display: block;
      margin-top: 10px;
      color: rgba(255, 247, 228, .76);
      font-size: .9rem;
      line-height: 1.55;
    }

    .share-poster-chipbox {
      display: grid;
      gap: 10px;
      align-content: start;
    }

    .share-poster-chipbox strong {
      color: #f6d694;
      font-size: .88rem;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .share-poster-chip-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .share-poster-chip {
      display: inline-flex;
      align-items: center;
      min-height: 36px;
      padding: 0 14px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, .14);
      background: rgba(255, 255, 255, .08);
      color: #fff8e8;
      font-size: .88rem;
      font-weight: 700;
    }

    .tool-top > *,
    .tool-grid > *,
    .panel {
      min-width: 0;
    }

    .panel {
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, .86);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .input-panel {
      padding: 18px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      min-height: 572px;
    }

    .panel-title {
      margin: 0 0 10px;
      color: var(--pine);
      font-size: 1.1rem;
      line-height: 1.35;
    }

    .field-label {
      display: block;
      margin: 16px 0 8px;
      color: var(--ink);
      font-weight: 800;
      font-size: .95rem;
    }

    .upload-zone {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 176px;
      padding: 18px;
      border: 1.5px dashed rgba(18, 61, 53, .28);
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(251, 250, 246, .95), rgba(243, 239, 230, .78));
      text-align: center;
      cursor: pointer;
      transition: border-color .2s ease, transform .2s ease, background .2s ease;
    }

    .upload-zone:hover,
    .upload-zone:focus-within {
      border-color: var(--gold);
      transform: translateY(-1px);
      background: #fffaf0;
    }

    .upload-zone.is-loading {
      border-color: var(--gold);
      background: #fffaf0;
      cursor: progress;
    }

    .upload-zone .upload-preview {
      position: absolute;
      inset: 8px;
      border-radius: 7px;
      overflow: hidden;
      background: rgba(18, 61, 53, .08);
      display: none;
    }

    .upload-zone.has-preview .upload-preview {
      display: block;
    }

    .upload-preview img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
      background: #111f1c;
    }

    .upload-preview .upload-preview-label {
      position: absolute;
      left: 10px;
      top: 10px;
      padding: 5px 9px;
      border-radius: 999px;
      background: rgba(18, 61, 53, .82);
      color: #fff;
      font-size: .76rem;
      font-weight: 850;
      width: auto;
      line-height: 1;
    }

    .upload-zone.is-loading .upload-preview-label::after {
      content: " · 读取中";
    }

    .change-image-btn {
      width: 100%;
      margin-top: 10px;
      display: none;
    }

    .change-image-btn.is-visible {
      display: block;
    }

    .upload-zone.has-preview .upload-mark,
    .upload-zone.has-preview strong,
    .upload-zone.has-preview > span:not(.upload-preview) {
      visibility: hidden;
    }

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

    .upload-mark {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      border: 1px solid var(--gold);
      display: grid;
      place-items: center;
      margin: 0 auto 10px;
      color: var(--gold);
      font-weight: 900;
      font-size: 1.4rem;
    }

    .upload-zone strong {
      display: block;
      color: var(--pine);
      margin-bottom: 6px;
    }

    .upload-zone span {
      display: block;
      color: var(--muted);
      font-size: .92rem;
      line-height: 1.55;
      overflow-wrap: anywhere;
    }

    .button-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 14px;
    }

    .btn {
      min-height: 46px;
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 0 14px;
      font-weight: 850;
      font-size: .95rem;
      cursor: pointer;
      transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    }

    .btn:focus-visible {
      outline: 3px solid rgba(182, 139, 69, .38);
      outline-offset: 2px;
    }

    .btn-primary {
      background: var(--pine);
      color: #fff;
      box-shadow: 0 12px 24px rgba(18, 61, 53, .18);
    }

    .btn-secondary {
      background: #fff;
      color: var(--pine);
      border-color: var(--line);
    }

    .btn:hover { transform: translateY(-1px); }
    .btn:disabled { opacity: .58; cursor: not-allowed; transform: none; box-shadow: none; }

    .privacy-note {
      margin: 14px 0 0;
      padding: 12px 13px;
      border-radius: 8px;
      background: rgba(18, 61, 53, .06);
      color: var(--muted);
      font-size: .9rem;
      line-height: 1.65;
    }

    .scan-panel { overflow: hidden; }

    .results-panel {
      margin-top: 18px;
      overflow: hidden;
    }

    .results-panel .report-section {
      border-top: 0;
    }

    .report-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px;
      background: rgba(251, 250, 246, .82);
      border-bottom: 1px solid var(--line);
    }

    .report-actions p {
      margin: 0;
      color: var(--muted);
      font-size: .92rem;
      line-height: 1.55;
    }

    .report-actions .button-row {
      display: flex;
      margin: 0;
      min-width: 260px;
    }

    .saved-report-list {
      display: none;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      padding: 0 18px 18px;
      background: #fff;
    }

    .saved-report-list.is-visible {
      display: grid;
    }

    .saved-report-item {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fffdfa;
      padding: 12px;
      text-align: left;
      color: var(--pine);
      cursor: pointer;
      font-weight: 800;
      line-height: 1.45;
    }

    .saved-report-item span {
      display: block;
      margin-top: 5px;
      color: var(--muted);
      font-size: .82rem;
      font-weight: 600;
    }

    .scan-header {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      padding: 16px 18px;
      border-bottom: 1px solid var(--line);
      background: rgba(251, 250, 246, .72);
    }

    .scan-status {
      min-width: 0;
    }

    .scan-status strong {
      display: block;
      color: var(--pine);
      font-size: 1rem;
      line-height: 1.35;
    }

    .scan-status span {
      display: block;
      color: var(--muted);
      font-size: .9rem;
      margin-top: 4px;
      line-height: 1.5;
    }

    .readability-pill {
      align-self: start;
      white-space: nowrap;
      border: 1px solid var(--gold-soft);
      background: rgba(182, 139, 69, .1);
      color: #785b2d;
      border-radius: 999px;
      padding: 8px 11px;
      font-size: .86rem;
      font-weight: 850;
    }

    .scan-stage {
      position: relative;
      min-height: 490px;
      background:
        linear-gradient(180deg, rgba(18, 61, 53, .84), rgba(15, 42, 37, .94)),
        radial-gradient(circle at center, rgba(182, 139, 69, .16), transparent 46%);
      display: grid;
      grid-template-columns: 178px minmax(0, 1fr) 190px;
      gap: 0;
      padding: 18px;
    }

    .metric-rail {
      display: grid;
      align-content: start;
      gap: 10px;
      z-index: 3;
    }

    .metric-card {
      min-height: 82px;
      border: 1px solid rgba(255, 255, 255, .13);
      background: rgba(255, 255, 255, .08);
      border-radius: 8px;
      padding: 12px 44px 12px 12px;
      color: rgba(255, 255, 255, .86);
      backdrop-filter: blur(10px);
      position: relative;
    }

    .metric-card.is-active {
      border-color: rgba(182, 139, 69, .65);
      background: rgba(182, 139, 69, .14);
      box-shadow: 0 0 0 1px rgba(182, 139, 69, .16), 0 16px 30px rgba(0, 0, 0, .18);
    }

    .metric-card.is-running {
      border-color: rgba(246, 214, 148, .76);
      background: rgba(246, 214, 148, .12);
      box-shadow: 0 0 0 1px rgba(246, 214, 148, .14), 0 16px 30px rgba(0, 0, 0, .16);
    }

    .metric-label {
      display: block;
      color: rgba(255, 255, 255, .68);
      font-size: .78rem;
      font-weight: 850;
      letter-spacing: .04em;
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .metric-value {
      color: #fff;
      font-size: 1.35rem;
      line-height: 1;
      font-weight: 900;
    }

    .metric-desc {
      margin-top: 8px;
      color: rgba(255, 255, 255, .72);
      font-size: .82rem;
      line-height: 1.45;
    }

    .image-frame {
      position: relative;
      min-height: 454px;
      border-radius: 8px;
      overflow: hidden;
      background: rgba(7, 25, 22, .5);
      border: 1px solid rgba(255, 255, 255, .12);
      display: grid;
      place-items: center;
      isolation: isolate;
    }

    #previewImage {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: .86;
      filter: saturate(.9) contrast(.95);
      transform: translate3d(0, 0, 0) scale(1.001);
      transform-origin: 0 0;
      transition: transform .45s cubic-bezier(.2, .8, .2, 1);
    }

    .placeholder-face {
      position: absolute;
      width: min(62%, 340px);
      aspect-ratio: .76;
      border-radius: 48% 48% 45% 45%;
      border: 2px solid rgba(182, 139, 69, .45);
      background:
        radial-gradient(circle at 38% 40%, rgba(255, 255, 255, .5) 0 3px, transparent 4px),
        radial-gradient(circle at 62% 40%, rgba(255, 255, 255, .5) 0 3px, transparent 4px),
        radial-gradient(circle at center, rgba(182, 139, 69, .12), rgba(255, 255, 255, .04));
      opacity: .72;
    }

    .placeholder-face::before,
    .placeholder-face::after {
      content: "";
      position: absolute;
      left: 28%;
      right: 28%;
      height: 1px;
      background: rgba(182, 139, 69, .44);
    }

    .placeholder-face::before { top: 46%; }
    .placeholder-face::after { top: 64%; }

    #scanCanvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 2;
    }

    .scan-line {
      position: absolute;
      left: 8%;
      width: 84%;
      top: 12%;
      height: 2px;
      z-index: 3;
      background: linear-gradient(90deg, transparent, rgba(246, 214, 148, .95), transparent);
      box-shadow: 0 0 18px rgba(246, 214, 148, .75);
      opacity: 0;
      transform: translateY(0);
    }

    .scan-line.is-running {
      opacity: 1;
      animation: scanSweep 3.8s ease-in-out forwards;
    }

    @keyframes scanSweep {
      0% { transform: translateY(0); opacity: 0; }
      8% { opacity: 1; }
      88% { opacity: 1; }
      100% { transform: translateY(var(--scan-travel, 330px)); opacity: 0; }
    }

    .progress-strip {
      position: absolute;
      left: 18px;
      right: 18px;
      bottom: 18px;
      z-index: 4;
      border: 1px solid rgba(255, 255, 255, .14);
      background: rgba(7, 25, 22, .72);
      border-radius: 8px;
      padding: 10px 12px;
      color: rgba(255, 255, 255, .82);
    }

    .progress-copy {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      font-size: .86rem;
      margin-bottom: 8px;
    }

    .progress-bar {
      height: 7px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .12);
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--gold), #f4d38e);
      transition: width .38s ease;
    }

    .card-spinner {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, .18);
      border-top-color: rgba(246, 214, 148, .96);
      opacity: 0;
      transform: scale(.92);
      transition: opacity .18s ease, transform .18s ease;
      animation: spinnerTurn .72s linear infinite;
    }

    .metric-card.is-running .card-spinner,
    .report-card.is-running .card-spinner {
      opacity: 1;
      transform: scale(1);
    }

    @keyframes spinnerTurn {
      to { transform: rotate(360deg); }
    }

    .report-section {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      padding: 18px;
      background: #fff;
      border-top: 1px solid var(--line);
    }

    .report-card {
      border: 1px solid var(--line);
      background: #fffdfa;
      border-radius: 8px;
      padding: 15px 48px 15px 15px;
      min-height: 134px;
      opacity: .68;
      transform: translateY(6px);
      transition: opacity .3s ease, transform .3s ease, border-color .3s ease;
      position: relative;
    }

    .report-card.is-ready {
      opacity: 1;
      transform: translateY(0);
      border-color: rgba(182, 139, 69, .34);
    }

    .report-card.is-running {
      opacity: 1;
      transform: translateY(0);
      border-color: rgba(182, 139, 69, .44);
      box-shadow: 0 10px 22px rgba(18, 61, 53, .08);
    }

    .report-card h2 {
      margin: 0 0 8px;
      color: var(--pine);
      font-size: 1rem;
      line-height: 1.35;
    }

    .report-card p {
      margin: 0;
      color: var(--muted);
      font-size: .92rem;
      line-height: 1.65;
    }

    .card-spinner {
      position: absolute;
      right: 14px;
      top: 14px;
      border-color: rgba(18, 61, 53, .18);
      border-top-color: var(--gold);
    }

    .indicator-section {
      padding: 18px;
      background: #fff;
      border-top: 1px solid var(--line);
    }

    .indicator-head {
      display: flex;
      justify-content: space-between;
      align-items: end;
      gap: 14px;
      margin-bottom: 12px;
    }

    .indicator-head h2 {
      margin: 0;
      color: var(--pine);
      font-size: 1.08rem;
      line-height: 1.35;
    }

    .indicator-head p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: .9rem;
      line-height: 1.55;
    }

    .indicator-count {
      flex: 0 0 auto;
      color: #785b2d;
      border: 1px solid var(--gold-soft);
      background: rgba(182, 139, 69, .1);
      border-radius: 999px;
      padding: 7px 10px;
      font-size: .82rem;
      font-weight: 850;
      white-space: nowrap;
    }

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

    .indicator-card {
      border: 1px solid var(--line);
      background: #fffdfa;
      border-radius: 8px;
      padding: 12px;
      min-width: 0;
    }

    .indicator-meta {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
      color: var(--gold);
      font-size: .76rem;
      font-weight: 850;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .indicator-card h3 {
      margin: 0 0 7px;
      color: var(--pine);
      font-size: .98rem;
      line-height: 1.35;
    }

    .indicator-card p {
      margin: 0;
      color: var(--muted);
      font-size: .88rem;
      line-height: 1.58;
    }

    .indicator-card p + p { margin-top: 6px; }

    .indicator-card .focus {
      color: var(--ink);
      font-weight: 700;
    }

    .ratio-grid,
    .palace-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }

    .ratio-card,
    .palace-card {
      border: 1px solid var(--line);
      background: #fffdfa;
      border-radius: 8px;
      padding: 12px;
      min-width: 0;
    }

    .ratio-card h3,
    .palace-card h3 {
      margin: 0 0 7px;
      color: var(--pine);
      font-size: .98rem;
      line-height: 1.35;
    }

    .ratio-card p,
    .palace-card p {
      margin: 0;
      color: var(--muted);
      font-size: .88rem;
      line-height: 1.58;
    }

    .ratio-card p + p,
    .palace-card p + p { margin-top: 6px; }

    .ratio-value {
      display: inline-flex;
      margin-bottom: 8px;
      color: #785b2d;
      border: 1px solid var(--gold-soft);
      background: rgba(182, 139, 69, .1);
      border-radius: 999px;
      padding: 6px 9px;
      font-size: .82rem;
      font-weight: 850;
    }

    .disclaimer {
      padding: 0 18px 18px;
      background: #fff;
      color: var(--muted);
      font-size: .88rem;
      line-height: 1.65;
    }

    .hidden { display: none !important; }

    @media (max-width: 980px) {
      .tool-top,
      .tool-grid { grid-template-columns: 1fr; }
      .input-panel { min-height: 0; }
      .scan-stage {
        grid-template-columns: 1fr;
        gap: 12px;
      }
      .metric-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .metric-rail.right { order: 3; }
      .image-frame { min-height: 430px; }
    }

    @media (max-width: 640px) {
      .tool-wrap {
        width: min(360px, calc(100vw - 20px));
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 18px;
      }
      .lead,
      .top-note,
      .upload-zone span,
      .privacy-note,
      .scan-status span,
      .report-card p {
        word-break: break-word;
        overflow-wrap: anywhere;
      }
      .button-row,
      .saved-report-list,
      .ratio-grid,
      .palace-grid,
      .indicator-grid { grid-template-columns: 1fr; }
      .metric-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .report-section { grid-template-columns: 1fr; }
      .report-actions {
        display: block;
      }
      .report-actions .button-row {
        min-width: 0;
        margin-top: 12px;
      }
      .scan-header { display: block; }
      .indicator-head { display: block; }
      .indicator-count { display: inline-flex; margin-top: 10px; }
      .readability-pill {
        display: inline-flex;
        margin-top: 10px;
      }
      .scan-stage {
        padding: 12px;
      }
      .image-frame { min-height: 380px; }
      .share-poster-shell {
        grid-template-columns: 1fr;
        padding: 24px 18px;
        gap: 18px;
      }
      .share-poster-pattern {
        font-size: clamp(2.2rem, 12vw, 3.4rem);
      }
      .share-poster-summary {
        font-size: .95rem;
        line-height: 1.7;
      }
      .share-poster-actions .btn-primary {
        width: 100%;
      }
      .focus-magnifier {
        width: 100%;
        height: 100%;
        min-height: 0;
      }
      .focus-copy strong { font-size: .98rem; }
      .focus-copy p { font-size: .8rem; }
      @keyframes scanSweep {
        0% { transform: translateY(0); opacity: 0; }
        8% { opacity: 1; }
        88% { opacity: 1; }
        100% { transform: translateY(270px); opacity: 0; }
      }
    }

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

    .wechat-pay-result {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 3000;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(20, 20, 35, .48);
    }

    .wechat-pay-result.open {
      display: flex;
    }

    .wechat-pay-dialog {
      width: min(420px, 100%);
      padding: 22px;
      border-radius: 18px;
      border: 1px solid rgba(18, 61, 53, .16);
      background: #ffffff;
      color: #18231f;
      line-height: 1.6;
      box-shadow: 0 18px 48px rgba(20, 20, 35, .24);
      position: relative;
      text-align: center;
    }

    .wechat-pay-close {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 34px;
      height: 34px;
      border: 0;
      border-radius: 50%;
      background: #f2f4f7;
      color: #38423e;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
    }

    .wechat-pay-close:hover {
      background: #e4e7ec;
    }

    .wechat-qr-panel {
      display: grid;
      gap: 12px;
      justify-items: center;
      margin-top: 12px;
    }

    .wechat-qr-code {
      width: 220px;
      min-height: 220px;
      display: grid;
      place-items: center;
      padding: 10px;
      border: 1px solid rgba(18, 61, 53, .14);
      border-radius: 8px;
      background: #ffffff;
    }

    .wechat-qr-code canvas,
    .wechat-qr-code img {
      width: 200px;
      height: 200px;
      display: block;
    }

    .wechat-pay-link {
      max-width: 100%;
      color: #0f6b48;
      font-size: .9rem;
      overflow-wrap: anywhere;
    }

    .wechat-pay-note {
      margin: 0;
      color: #43504b;
      font-size: .95rem;
      text-align: center;
    }

    .wechat-pay-success {
      color: #0f8f5a;
    }
