:root {
    color-scheme: light;
    --ink: #18201c;
    --muted: #35473d;
    --green: #186348;
    --border: #abbfb2;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 18px;
    color: var(--ink);
    background: #f2f6f2;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 18px; line-height: 1.65; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { touch-action: manipulation; }
input, select, textarea { width: 100%; min-width: 0; border: 1.5px solid #7c9686; border-radius: 10px; background: #fff; padding: 12px 14px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #526259; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #d19013; outline-offset: 3px; }
input:disabled, select:disabled, textarea:disabled { background: #eef3ef; color: #35473d; opacity: 1; }
button:disabled { cursor: not-allowed; background: #dce6df; color: #35473d; border-color: #a8b8ac; opacity: 1; }
fieldset { border: 0; margin: 22px 0; padding: 0; min-width: 0; }
legend, .field-label { font-weight: 700; display: block; margin-bottom: 10px; }
p { margin: 8px 0 16px; }
h1, h2, h3 { margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
h1 { font-size: clamp(30px, 2.5vw, 32px); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: 23px; font-weight: 750; }
h3 { font-size: 20px; font-weight: 750; }
a { color: var(--green); }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 12px; z-index: 100; background: white; }
.skip-link:focus { top: 8px; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px max(24px, calc((100vw - 1400px) / 2)); background: #fff; border-bottom: 1px solid var(--border); }
.brand { color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.brand-mark { background: var(--green); color: #fff; border-radius: 12px; display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; }
.service-status { font-size: 16px; font-weight: 650; color: var(--muted); border: 1px solid var(--border); background: #f2f6f2; border-radius: 999px; padding: 6px 14px; }
.service-status.connected { color: #125039; border-color: #82b399; background: #edf7ef; }
main { max-width: 1448px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 38px 0 28px; }
.eyebrow { display: block; font-size: 16px; color: var(--green); font-weight: 750; margin-bottom: 10px; }
.hero > p { font-size: 18px; margin-top: 14px; color: var(--muted); }
.mobile-break { display: none; }
.flow { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 16px 24px; }
.flow li { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 18px; }
.flow span, .step-number { display: grid; place-items: center; background: #e1eee4; border: 1px solid #84a48e; color: #164d35; border-radius: 50%; width: 34px; height: 34px; flex: 0 0 auto; font-size: 18px; font-weight: 800; }
.workspace { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(0, 1.45fr); gap: 24px; align-items: start; }
.setup-column, .content-column { display: grid; gap: 24px; min-width: 0; }
.panel { background: #fff; border: 1.5px solid var(--border); border-radius: 18px; padding: 26px; box-shadow: 0 3px 14px #17372506; min-width: 0; }
.section-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 22px; }
.section-heading .step-number { margin-top: 2px; }
.section-heading p { color: var(--muted); font-size: 16px; margin: 8px 0 0; }
.folder-drop { border: 2px dashed #8ba895; border-radius: 14px; padding: 24px 20px; background: #f6faf6; text-align: center; }
.folder-symbol { display: block; color: #186348; font-size: 36px; line-height: 1; margin-bottom: 16px; }
.folder-drop strong { font-size: 20px; display: block; overflow-wrap: anywhere; }
.folder-drop p { color: var(--muted); font-size: 16px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 52px; padding: 12px 20px; border: 1.5px solid transparent; border-radius: 11px; font-size: 18px; font-weight: 750; line-height: 1.5; white-space: normal; text-align: center; text-decoration: none; }
.button.primary { background: var(--green); color: white; border-color: var(--green); }
.button.primary:hover:not(:disabled) { background: #124f39; }
.button.secondary { background: white; color: #164d35; border-color: #7c9686; }
.button.secondary:hover:not(:disabled) { background: #edf5ef; }
.button:disabled { background: #dce6df; color: #35473d; border-color: #a8b8ac; }
.text-button { display: block; border: 0; background: none; color: #164d35; margin: 14px auto 0; text-decoration: underline; font-size: 18px; font-weight: 650; }
.hint { font-size: 16px; color: var(--muted); line-height: 1.65; overflow-wrap: anywhere; }
.help-details { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; font-size: 16px; }
summary { font-weight: 750; font-size: 18px; }
details p { color: var(--muted); font-size: 16px; margin: 12px 0 0; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-list { display: grid; gap: 10px; }
.choice { border: 1.5px solid #9ab09f; border-radius: 10px; padding: 12px 10px; display: flex; align-items: flex-start; gap: 9px; background: #fff; font-size: 18px; line-height: 1.5; }
.choice:has(input:checked) { border-color: #186348; background: #edf7ef; box-shadow: inset 0 0 0 1px #186348; }
.choice input { width: 20px; height: 20px; margin: 5px 0 0; padding: 0; flex: 0 0 auto; accent-color: #186348; }
.choice strong { font-size: 18px; }
.choice small { display: block; font-size: 16px; color: #35473d; margin-top: 4px; }
.two-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#overlayField { margin-top: 16px; }
.start-button { width: 100%; margin-top: 22px; }
.provider-panel p { overflow-wrap: anywhere; }
.provider-row { border-bottom: 1px solid #d2ded5; padding: 12px 0; }
.provider-row strong { display: block; color: var(--ink); font-size: 18px; }
.provider-row span { font-size: 16px; }
.material-list, .result-list { display: grid; gap: 18px; }
.empty-state { padding: 30px 16px; text-align: center; background: #f5f8f5; border-radius: 12px; border: 1px dashed #99afa0; }
.empty-state strong { font-size: 20px; }
.empty-state p { color: var(--muted); font-size: 16px; margin: 8px auto 0; max-width: 480px; }
.material-card, .result-card { border: 1.5px solid #a4bba9; border-radius: 13px; padding: 20px; min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-heading h3 { flex: 1; min-width: 0; }
.card-index { font-size: 18px; color: var(--muted); margin-right: 8px; font-weight: 650; }
.material-card label { margin-top: 12px; }
.material-card textarea { resize: vertical; min-height: 122px; font-size: 18px; }
.file-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; font-size: 16px; }
.file-chip { background: #edf3ee; color: #23382a; border: 1px solid #b2c7b8; padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; max-width: 100%; }
.reference-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.reference-list figure { margin: 0; width: 100px; }
.reference-list img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid #a6bbae; background: #edf3ee; }
.reference-list figcaption { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.remove-button { background: white; border: 1px solid #b77b70; color: #7d291c; font-size: 16px; border-radius: 8px; padding: 7px 12px; min-height: 40px; }
.status-tag { border: 1px solid #9eb5a4; background: #edf5ef; color: #214a32; font-size: 16px; font-weight: 700; border-radius: 999px; padding: 3px 12px; flex: 0 0 auto; }
.status-tag.error { color: #7f221a; border-color: #bc7669; background: #fff1ed; }
.copy-title { font-size: 22px; margin: 14px 0 12px; font-weight: 800; }
.copy-body { font-size: 18px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 16px; }
.copy-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.image-grid figure { margin: 0; min-width: 0; }
.image-preview { display: block; width: 100%; padding: 0; border: 1px solid #a3b7a8; background: #edf3ee; border-radius: 10px; overflow: hidden; }
.image-preview img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; }
.image-grid figcaption { font-size: 16px; color: #35473d; margin-top: 8px; }
.result-error { color: #872719; font-size: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-source { margin-top: 16px; padding-top: 14px; border-top: 1px solid #bfcec2; }
.result-source p { font-size: 16px; }
.result-source summary { font-size: 18px; }
.notice { background: #fff4db; border: 1.5px solid #bf8b21; color: #5c3c00; border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; font-size: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice.error { background: #fff1ed; color: #7d291c; border-color: #b86d5a; }
progress { width: 100%; height: 18px; accent-color: #186348; }
#progressArea { margin-bottom: 20px; }
.download-area { border-top: 1px solid #a4bba9; margin-top: 24px; padding-top: 22px; }
.download-area .button { width: 100%; }
.download-area p { font-size: 16px; color: var(--muted); margin: 12px 0 0; }
.history-area { border-bottom: 1px solid #bfcec2; padding-bottom: 18px; margin-bottom: 20px; }
.history-controls { display: flex; gap: 10px; align-items: stretch; }
.history-controls select { flex: 1; min-width: 0; }
.history-controls button { flex: 0 0 auto; }
.local-recovery { border: 1.5px solid #bd8b25; color: #523700; background: #fff8e9; border-radius: 12px; padding: 16px; margin-top: 18px; }
.local-recovery p { font-size: 16px; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 34px 0; font-size: 16px; color: #35473d; font-weight: 600; }
dialog { border: 1px solid #829e8b; border-radius: 14px; padding: 20px; width: min(800px, calc(100vw - 28px)); max-height: 94vh; overflow: auto; color: var(--ink); }
dialog::backdrop { background: #10271ec4; }
dialog img { display: block; max-width: 100%; max-height: 76vh; object-fit: contain; margin: 18px auto; }
dialog .button { float: right; }
dialog p { clear: both; font-size: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #183c29; color: white; font-size: 18px; border-radius: 12px; padding: 14px 22px; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px #10271e30; z-index: 200; text-align: center; }
@media (max-width: 1050px) {
    .workspace { grid-template-columns: minmax(320px, .95fr) minmax(0, 1.15fr); gap: 18px; }
    .panel { padding: 20px; }
    .two-fields { grid-template-columns: 1fr; }
    .choice-grid.three { grid-template-columns: 1fr; }
    .image-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .workspace { grid-template-columns: 1fr; }
    .site-header { padding: 18px 20px; flex-wrap: wrap; gap: 12px; }
    .brand { font-size: 20px; }
    main { padding: 0 20px; }
    .hero { padding-top: 28px; }
    .choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .two-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .site-header { padding: 16px; }
    main { padding: 0 14px; }
    .brand { font-size: 18px; gap: 9px; }
    .brand-mark { width: 42px; height: 42px; }
    .panel { padding: 18px 16px; border-radius: 14px; }
    .mobile-break { display: inline; }
    .hero > p { font-size: 18px; }
    .flow { gap: 12px 18px; }
    h2 { font-size: 23px; }
    .choice-grid.three, .two-fields, .image-grid { grid-template-columns: 1fr; }
    .choice { font-size: 18px; }
    .material-card, .result-card { padding: 16px 12px; }
    .card-heading { align-items: flex-start; flex-wrap: wrap; }
    .card-heading h3 { flex-basis: 60%; }
    footer { flex-direction: column; gap: 4px; }
    .folder-drop { padding: 20px 14px; }
    .history-controls { flex-direction: column; }
}
