﻿    :root {
      color-scheme: light;
      --bg: #eef2f6;
      --panel: #ffffff;
      --panel-2: #f8fafc;
      --ink: #0f172a;
      --muted: #64748b;
      --line: #d7dee8;
      --soft: #e8eef5;
      --accent: #0f766e;
      --accent-2: #0b5f59;
      --accent-soft: #d7f3ef;
      --good: #0f766e;
      --good-soft: #dbf5ef;
      --bad: #b42318;
      --bad-soft: #fee4e2;
      --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
      --radius: 8px;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      background: var(--bg);
      color: var(--ink);
      font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
    }

    body {
      min-height: 100vh;
    }

    button,
    input,
    textarea {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .shell {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 20px 20px;
    }

    .qr-page-wrap {
      margin-top: 140px;
    }

    .topbar {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      padding: 12px 0 18px;
      border-bottom: 1px solid var(--line);
    }

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

    .brand-mark {
      width: 42px;
      height: 42px;
      border-radius: 10px;
      background: linear-gradient(180deg, var(--accent-soft), #fff);
      color: var(--accent);
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      border: 1px solid #c9e7e1;
    }

    .brand-text {
      min-width: 0;
    }

    h1 {
      margin: 0;
      font-size: 22px;
      line-height: 1.2;
      letter-spacing: 0;
    }

    .brand-text p {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    .panel {
      background: rgba(255, 255, 255, 0.7);
      border: 1px solid var(--line);
      border-top: 0;
      padding: 18px 0 14px;
    }

    .input-block {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 14px;
      box-shadow: var(--shadow);
      min-width: 0;
    }

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

    .block-head h2 {
      margin: 0;
      font-size: 15px;
      line-height: 1.2;
    }

    .hint {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 0 8px;
      border-radius: 999px;
      background: #edf2f7;
      color: var(--muted);
      font-size: 12px;
      white-space: nowrap;
    }

    .inline-row {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .inline-row-end {
      justify-content: flex-end;
    }

    .text-area {
      width: 100%;
      resize: vertical;
      min-height: 152px;
      padding: 12px;
      line-height: 1.5;
      font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #fff;
      color: var(--ink);
      outline: none;
      transition: border-color .15s ease, box-shadow .15s ease;
    }

    .text-area:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    }

    .tool-btn {
      height: 42px;
      padding: 0 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #fff;
      color: var(--ink);
      display: inline-flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
      flex: 0 0 auto;
      transition: background .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
    }

    .tool-btn:hover:not(:disabled) {
      border-color: #b9c6d4;
      background: #fafdff;
      transform: translateY(-1px);
    }

    .tool-btn:disabled {
      opacity: .45;
      cursor: not-allowed;
    }

    .tool-btn.primary {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    .tool-btn.primary:hover:not(:disabled) {
      background: var(--accent-2);
      border-color: var(--accent-2);
    }

    .tool-btn.ghost {
      background: transparent;
    }

    .icon {
      width: 16px;
      height: 16px;
      stroke-width: 2;
      flex: 0 0 auto;
    }

    .icon-brand {
      width: 20px;
      height: 20px;
    }

    .icon-error {
      color: var(--bad);
    }

    .status-row {
      margin-top: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      padding: 0 14px;
    }

    .summary,
    .notice {
      font-size: 12px;
      color: var(--muted);
      min-height: 20px;
    }

    .notice[data-tone="good"] {
      color: var(--good);
    }

    .notice[data-tone="bad"] {
      color: var(--bad);
    }

    .results {
      padding: 18px 0 28px;
    }

    .results-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .results-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
      gap: 16px;
    }

    .result-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 14px;
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-width: 0;
    }

    .card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }

    .card-title-wrap {
      min-width: 0;
      flex: 1 1 auto;
    }

    .card-title {
      font-size: 13px;
      line-height: 1.45;
      word-break: break-all;
      color: var(--ink);
    }

    .card-uri {
      margin-top: 4px;
      font-size: 11px;
      line-height: 1.35;
      word-break: break-all;
      color: var(--muted);
      font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    }

    .chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 24px;
      padding: 0 8px;
      border-radius: 999px;
      font-size: 12px;
      white-space: nowrap;
      flex: 0 0 auto;
    }

    .chip-ok {
      background: var(--good-soft);
      color: var(--good);
    }

    .chip-error {
      background: var(--bad-soft);
      color: var(--bad);
    }

    .qr-box {
      display: grid;
      place-items: center;
      padding: 12px;
      border: 1px solid var(--soft);
      background: #fff;
      border-radius: var(--radius);
      aspect-ratio: 1 / 1;
    }

    .qr-image {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .qr-loading,
    .error-box,
    .empty {
      min-height: 260px;
      display: grid;
      place-items: center;
      text-align: center;
      border-radius: var(--radius);
      background: var(--panel-2);
      color: var(--muted);
      border: 1px dashed var(--line);
      padding: 16px;
      gap: 10px;
    }

    .error-box {
      color: var(--bad);
      align-content: center;
    }

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

    .empty {
      grid-column: 1 / -1;
      min-height: 180px;
      font-size: 14px;
    }

    @media (max-width: 900px) {

      .topbar,
      .results-bar {
        align-items: flex-start;
        flex-direction: column;
      }
    }

    @media (max-width: 640px) {
      .shell {
        padding: 0 14px 14px;
      }

      .qr-page-wrap {
        margin-top: 124px;
      }

      h1 {
        font-size: 20px;
      }

      .inline-row {
        flex-direction: column;
        align-items: stretch;
      }

      .tool-btn {
        width: 100%;
        justify-content: center;
      }

      .card-actions .tool-btn {
        width: auto;
        flex: 1 1 0;
      }
    }

