:root {
  color-scheme: light;
  --ink: #183431;
  --muted: #5b7471;
  --green: #236d62;
  --line: rgba(82, 128, 119, .15);
  --field: rgba(255, 255, 255, .76);
  --error: #ae3f35;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-family: var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; color: var(--ink); background: radial-gradient(ellipse 850px 700px at -5% 5%, #c9ebe1 0, transparent 75%), radial-gradient(ellipse 850px 700px at 105% 20%, #d9ebf8 0, transparent 78%), #f0f7f5; font-size: 16px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button, input, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #238b80; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 9px 13px; border-radius: 10px; color: var(--ink); background: white; }
h1, h2, h3, p { margin: 0; }
.page-shell { width: min(1168px, calc(100% - 72px)); margin: auto; }
.page-header { padding: 47px 0 31px; }
.brand { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 14px; font-weight: 580; color: #456c65; }
.brand-separator { opacity: .65; }
.brand-symbol { position: relative; width: 26px; height: 26px; margin-right: 3px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 8px; background: linear-gradient(140deg, #fff, #b8ddd2); box-shadow: 0 3px 8px #38685810, inset 0 1px #fff; }
.brand-symbol i { position: absolute; left: 6px; width: 12px; height: 2px; border-radius: 2px; background: #398474; transform: rotate(-35deg); }
.brand-symbol i:first-child { top: 8px; }
.brand-symbol i:last-child { top: 14px; }
h1 { margin-top: 19px; font-size: clamp(33px, 4.4vw, 47px); font-weight: 680; line-height: 1.2; letter-spacing: -.055em; }
.page-description { margin-top: 10px; max-width: 40em; color: var(--muted); font-size: 16px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: 22px; align-items: start; }
.panel { min-width: 0; border: 1px solid rgba(255, 255, 255, .92); border-radius: 25px; background: rgba(255, 255, 255, .61); box-shadow: 0 12px 36px rgba(62, 102, 94, .06), inset 0 1px #fff; }
@supports (backdrop-filter: blur(20px)) { .panel { backdrop-filter: blur(20px) saturate(125%); } }
.form-panel { padding: 25px; }
.panel-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 22px; }
h2 { font-size: 20px; font-weight: 660; line-height: 1.3; letter-spacing: -.035em; }
.text-button { border: 0; border-radius: 8px; padding: 6px 1px; color: #247165; background: transparent; font-size: 14px; font-weight: 570; cursor: pointer; }
.text-button:hover { color: #164f46; text-decoration: underline; text-underline-offset: 4px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field { min-width: 0; margin-bottom: 18px; }
label { display: flex; align-items: baseline; gap: 9px; margin-bottom: 7px; color: #2b4844; font-size: 15px; font-weight: 590; }
.optional, .required-note { color: #627975; font-size: 13px; font-weight: 450; }
.required-note { color: #487a70; }
input, textarea { display: block; width: 100%; min-width: 0; border: 1px solid #d7e4df; border-radius: 12px; padding: 11px 13px; color: var(--ink); background: var(--field); font-size: 16px; line-height: 1.55; transition: border-color .16s, box-shadow .16s; }
input { min-height: 47px; }
textarea { resize: vertical; min-height: 72px; }
input::placeholder, textarea::placeholder { color: #7c908b; opacity: 1; }
input:focus, textarea:focus { border-color: #76b4a6; box-shadow: 0 0 0 3px #70af9b12; }
input[aria-invalid="true"], textarea[aria-invalid="true"], .money-input:has(input[aria-invalid="true"]) { border-color: #c17064; }
input:disabled, textarea:disabled { color: #607873; background: rgba(238, 244, 241, .66); }
.field-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-top: 4px; }
.character-count { margin-left: auto; color: #6c827d; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.field-error { margin-top: 5px; color: var(--error); font-size: 14px; line-height: 1.5; }
.field-bottom .field-error { margin-top: 0; }
.extra-details { margin: 0 0 19px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.extra-details summary { padding: 13px 0; color: #446f64; font-size: 14px; font-weight: 550; cursor: pointer; }
.extra-details summary::marker { color: #698d81; }
.extra-details-content { padding-top: 6px; }
.extra-details-content .field:last-child { margin-bottom: 14px; }
.fee-section { margin: 1px 0 22px; padding: 18px 17px 14px; border: 1px solid #dce9e4; border-radius: 16px; background: linear-gradient(120deg, #edf7f2b3, #edf5f9b3); }
.fee-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 10px; margin-bottom: 13px; }
.fee-heading h3 { font-size: 15px; font-weight: 630; }
.fee-heading p { color: #5b7971; font-size: 14px; }
.fee-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fee-field { margin: 0; }
.fee-field label { font-size: 14px; }
.money-input { display: flex; align-items: center; border: 1px solid #d2e3db; border-radius: 11px; background: #ffffffb3; }
.money-input > span { flex-shrink: 0; padding-left: 10px; color: #648278; font-size: 14px; }
.money-input input { border: 0; padding-left: 6px; padding-right: 6px; background: transparent; border-radius: 10px; font-size: 16px; font-variant-numeric: tabular-nums; }
.money-input:focus-within { border-color: #76b4a6; box-shadow: 0 0 0 3px #70af9b12; }
.money-input input:focus { box-shadow: none; }
.fee-total { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #d8e7e0; }
.fee-total p { color: #3c6359; font-size: 14px; }
.fee-total .total-hint { margin-top: 2px; color: #6b817a; font-size: 14px; }
.fee-total output { color: #236a5a; font-size: 23px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.submit-area { padding-top: 3px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 46px; border: 1px solid transparent; border-radius: 12px; padding: 10px 18px; font-size: 15px; font-weight: 600; line-height: 1.5; cursor: pointer; transition: background-color .16s, box-shadow .16s; }
.primary-button { color: #fff; background: #286d61; box-shadow: inset 0 1px rgba(255, 255, 255, .13), 0 3px 8px #2b6e5820; }
.primary-button:hover:not(:disabled) { background: #205f53; box-shadow: 0 4px 12px #2b6e582b; }
.primary-button:disabled { color: #fff; background: #84a69e; box-shadow: none; }
#generate-button { width: 100%; }
.secondary-button { color: #39695f; border-color: #cbdfd7; background: #ffffffa6; }
.secondary-button:hover:not(:disabled) { border-color: #9fc6b7; background: #fff; }
.secondary-button:disabled { color: #8aa19b; border-color: #d8e5df; background: #f1f6f3a6; }
.button-spinner { width: 15px; height: 15px; border: 2px solid #ffffff4d; border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-message { margin-top: 10px; color: var(--error); font-size: 14px; }
.result-panel { position: sticky; top: 22px; padding: 25px; }
.result-heading { margin-bottom: 18px; }
.result-heading p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.service-message { margin-bottom: 13px; padding: 11px 12px; border: 1px solid #ead6c7; border-radius: 10px; color: #795b3d; background: #fff7ecb3; font-size: 14px; }
.result-empty { display: grid; min-height: 371px; place-content: center; justify-items: center; gap: 18px; padding: 24px; border: 1px dashed #d0e0da; border-radius: 15px; color: #6a837b; background: linear-gradient(145deg, #eff8f3a3, #f0f7fbb3); text-align: center; font-size: 15px; line-height: 1.7; }
.paper-preview { width: 64px; height: 78px; padding: 24px 12px 0; border: 1px solid #d6e6df; border-radius: 11px; background: #ffffffae; box-shadow: 0 5px 15px #38725c08; transform: rotate(-5deg); }
.paper-preview i { display: block; height: 3px; margin-bottom: 8px; border-radius: 2px; background: #b8d7ca; }
.paper-preview i:last-child { width: 70%; }
.result-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 10px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #d3e6dc; border-radius: 11px; background: #eaf6efb3; }
.result-total span { color: #59796e; font-size: 14px; }
.result-total strong { color: #2b6c56; font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; }
#result-text { min-height: 370px; border-color: #d9e6df; background: #ffffffa8; line-height: 1.8; }
#result-text[readonly] { color: #647d74; }
.result-help { margin-top: 7px; color: #6c837a; font-size: 14px; }
.result-actions { display: flex; gap: 10px; margin-top: 16px; }
.result-actions .button { flex: 1; padding-inline: 10px; }
.action-message { min-height: 21px; margin-top: 9px; color: #356c59; font-size: 14px; }
.action-message.is-error { color: var(--error); }
footer { padding: 24px 0 30px; color: #6b827b; text-align: center; font-size: 13px; }
dialog { width: min(420px, calc(100% - 32px)); max-width: none; padding: 0; border: 1px solid #ffffffc9; border-radius: 21px; color: var(--ink); background: #f5fbf9; box-shadow: 0 24px 80px #193e3540; }
dialog::backdrop { background: #213c3945; backdrop-filter: blur(5px); }
.dialog-content { padding: 26px; }
.dialog-content p { margin-top: 11px; color: var(--muted); font-size: 15px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
@media (max-width: 900px) {
  .page-shell { width: min(690px, calc(100% - 40px)); }
  .page-header { padding-top: 32px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 19px; }
  .result-panel { position: static; }
  .result-empty { min-height: 245px; }
}
@media (max-width: 480px) {
  .page-shell { width: calc(100% - 28px); }
  .page-header { padding: 27px 5px 24px; }
  .brand { gap: 5px; font-size: 14px; }
  .brand-symbol { width: 23px; height: 23px; margin-right: 2px; }
  .brand-symbol i { left: 5px; }
  .brand-symbol i:first-child { top: 7px; }
  .brand-symbol i:last-child { top: 13px; }
  h1 { margin-top: 17px; font-size: clamp(31px, 8.2vw, 38px); }
  .page-description { margin-top: 10px; font-size: 15px; }
  .form-panel, .result-panel { padding: 21px 17px; border-radius: 21px; }
  .panel-heading { margin-bottom: 19px; }
  h2 { font-size: 19px; }
  .fee-section { padding-inline: 12px; }
  .fee-grid { gap: 7px; }
  .fee-field label { font-size: 14px; }
  .money-input > span { padding-left: 7px; font-size: 13px; }
  .money-input input { padding-left: 4px; font-size: 16px; }
  .fee-total output { font-size: 21px; }
  .result-empty { min-height: 220px; }
  #result-text { min-height: 345px; }
}
@media (max-width: 360px) {
  .brand-symbol { display: none; }
  .fee-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fee-field label { margin-bottom: 5px; font-size: 14px; }
  .fee-heading { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
