:root {
  color-scheme: light;
  --green: #087b4c;
  --green-dark: #075c3b;
  --green-light: #e8f4ed;
  --canvas: #f3f7f4;
  --surface: #fff;
  --text: #19352a;
  --muted: #65766c;
  --line: #dce6df;
  --amber: #8c5f12;
  --amber-light: #fff6df;
  --red: #a43737;
  --red-light: #fff0ef;
  --radius: 12px;
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid #45a97c; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.4; font-family: "Microsoft JhengHei UI", "PingFang TC", system-ui, sans-serif; }
h1 { font-size: 1.7rem; letter-spacing: -.03em; }
h2 { font-size: 1.14rem; }
h3 { font-size: 1rem; }
p, td, dd, li { overflow-wrap: anywhere; }
.app-shell { max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.app-header { min-height: 95px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.brand small { display: block; margin-top: 4px; font-size: .73rem; color: var(--muted); font-weight: 500; letter-spacing: .05em; }
.brand-mark { display: grid; place-items: center; background: var(--green); color: white; width: 39px; height: 42px; flex-shrink: 0; border-radius: 10px 10px 10px 3px; font-size: 1.15rem; }
.header-tools { display: flex; align-items: center; gap: 12px; min-width: 0; }
.identity-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.navigation { display: flex; gap: 7px; border-bottom: 1px solid var(--line); padding: 0 0 13px; overflow-x: auto; }
.navigation a { padding: 9px 18px; color: var(--muted); font-size: .94rem; font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: 8px; }
.navigation a:hover, .navigation a[aria-current="page"] { color: var(--green-dark); background: var(--green-light); }
main { min-height: 65vh; padding: 30px 0 42px; outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.page-heading p { color: var(--muted); font-size: .93rem; margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; gap: 6px; border-radius: 8px; border: 1px solid transparent; background: transparent; text-decoration: none; font-weight: 650; font-size: .88rem; line-height: 1.5; white-space: nowrap; }
.button-primary { background: var(--green); border-color: var(--green); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-secondary { border-color: #cbd9cf; background: #fff; color: var(--text); }
.button-secondary:hover:not(:disabled) { border-color: var(--green); background: #f6fbf8; }
.button-quiet { color: var(--green-dark); }
.button-quiet:hover:not(:disabled) { background: var(--green-light); }
.button-danger-text { color: var(--red); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.panel + .panel { margin-top: 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.section-heading p { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 5px; font-size: .73rem; font-weight: 600; white-space: nowrap; background: #edf1ed; color: #5b6d61; }
.badge-green { color: var(--green-dark); background: var(--green-light); }
.badge-amber { color: var(--amber); background: var(--amber-light); }
.notice { padding: 13px 16px; border: 1px solid #bbd9c5; border-radius: 8px; background: var(--green-light); color: var(--green-dark); margin-top: 18px; font-size: .92rem; overflow-wrap: anywhere; }
.notice-error { color: #852d2d; border-color: #e9c7c2; background: var(--red-light); }
.context-note, .field-hint { color: var(--muted); font-size: .84rem; line-height: 1.7; }
.context-note { margin: 17px 0; }
.field-hint { display: block; margin-top: 5px; font-weight: 400; }
.inline-warning { color: var(--amber); background: var(--amber-light); border: 1px solid #ebd6a5; border-radius: 8px; padding: 13px 15px; margin-bottom: 20px; font-size: .9rem; }
.welcome { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 30px; align-items: start; }
.welcome-copy { padding: 22px 0; }
.eyebrow { font-size: .8rem; font-weight: 700; color: var(--green-dark); margin-bottom: 13px; }
.welcome-copy h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); max-width: 520px; }
.welcome-copy > p { color: var(--muted); margin: 17px 0 24px; max-width: 540px; }
.plan-card { border-color: #b7d1be; }
.plan-price { margin: 18px 0 5px; font-size: 2rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: .83rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.plan-list { margin: 18px 0; padding-left: 21px; font-size: .91rem; }
.plan-list li + li { margin-top: 8px; }
.trial-strip { padding-top: 17px; margin-top: 20px; border-top: 1px solid var(--line); }
.trial-strip strong { display: block; margin-bottom: 4px; font-size: .96rem; }
.trial-strip p { color: var(--muted); font-size: .86rem; }
.steps { margin-top: 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-left: 22px; margin: 18px 0 0; }
.steps li { padding-left: 4px; }
.steps p { color: var(--muted); font-size: .86rem; margin-top: 6px; }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.group-grid > .panel + .panel { margin-top: 0; }
.group-card h2 { overflow-wrap: anywhere; }
.quota-row { display: flex; align-items: baseline; gap: 7px; margin: 22px 0 0; }
.quota-row strong { font-size: 1.9rem; line-height: 1.3; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.quota-row span { color: var(--muted); font-size: .85rem; }
.quota-track { height: 5px; border-radius: 4px; background: #e7eee9; margin: 13px 0; overflow: hidden; }
.quota-track span { display: block; height: 100%; background: var(--green); }
.group-meta { color: var(--muted); font-size: .82rem; margin-top: 8px; }
.group-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 23px 0 18px; }
.group-footer { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
label { display: flex; flex-direction: column; gap: 7px; font-size: .86rem; font-weight: 600; }
input[type="text"], input[type="email"], select, textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #cbd9cf; border-radius: 7px; background: #fff; color: var(--text); font-weight: 400; font-size: 1rem; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #829087; }
.checkbox-label { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; font-size: .86rem; font-weight: 400; cursor: pointer; }
input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--green); }
.filter-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.filter-row > label { width: min(100%, 330px); }
.empty-state { padding: 37px 22px; border: 1px dashed #c6d5ca; background: #fbfdfb; border-radius: var(--radius); text-align: center; }
.empty-state p { color: var(--muted); font-size: .9rem; max-width: 540px; margin: 10px auto 18px; }
.state-panel { padding: 64px 18px; text-align: center; }
.state-panel h1 { font-size: 1.3rem; margin-top: 15px; }
.state-panel p { color: var(--muted); font-size: .9rem; margin-top: 9px; }
.loading-dot { display: inline-block; width: 24px; height: 24px; border: 3px solid #d5e9dd; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.terms-layout { display: grid; gap: 20px; }
.import-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; margin: 15px 0; align-items: end; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .86rem; text-align: left; }
th { background: #f6f9f6; color: var(--muted); font-weight: 600; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.terms-table td { max-width: 250px; }
.terms-table .button { min-height: 36px; padding: 4px 8px; }
.preview { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.preview h3 { margin-bottom: 10px; }
.error-list { color: var(--red); font-size: .86rem; margin: 12px 0; padding-left: 22px; }
.draft-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; }
.draft-count { font-size: .84rem; color: var(--muted); }
.order-list { display: grid; gap: 14px; }
.order-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.order-number { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; margin-top: 6px; overflow-wrap: anywhere; }
.order-meta { color: var(--muted); font-size: .84rem; margin-top: 9px; }
.order-side { display: grid; gap: 10px; justify-items: end; }
.checkout-dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; width: min(520px, calc(100vw - 28px)); max-height: 90dvh; overflow-y: auto; }
.checkout-dialog::backdrop { background: rgb(18 40 28 / .4); }
.checkout-details { margin: 19px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; display: grid; gap: 10px; }
.checkout-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.checkout-details dt { color: var(--muted); font-size: .87rem; }
.checkout-details dd { margin: 0; text-align: right; font-weight: 650; max-width: 70%; }
.checkout-price { font-size: 1.3rem; }
.checkout-dialog form > label, .checkout-dialog form > p { margin-top: 16px; }
.checkout-dialog .button-row { justify-content: flex-end; margin-top: 23px; }
.checkout-error { color: var(--red); font-size: .86rem; }
.app-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--muted); font-size: .76rem; }
.app-footer strong { font-size: .8rem; display: block; font-weight: 600; }
.app-footer #service-info { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.app-footer nav { display: flex; flex-wrap: wrap; gap: 8px 17px; }
.skip-link { position: fixed; top: -80px; left: 15px; z-index: 20; padding: 10px 16px; color: white; background: var(--green-dark); }
.skip-link:focus { top: 12px; }
.document-shell { max-width: 760px; }
.document-body { padding-top: 17px; }
.document-body h1 { margin-bottom: 17px; }
.document-body h2 { margin: 28px 0 10px; }
.document-body p + p { margin-top: 13px; }
.document-body li + li { margin-top: 9px; }
.document-updated { color: var(--muted); font-size: .8rem; margin-top: 32px; }
@media (max-width: 720px) {
  .app-shell { padding: 0 16px; }
  .app-header { min-height: 88px; gap: 12px; }
  .identity-name { max-width: 100px; }
  .header-tools { gap: 4px; }
  .brand { font-size: .96rem; }
  .brand-mark { width: 34px; height: 38px; }
  .brand small { font-size: .67rem; }
  .navigation { gap: 3px; }
  .navigation a { padding: 9px 14px; }
  main { padding-top: 23px; }
  .page-heading { gap: 12px; margin-bottom: 19px; }
  h1 { font-size: 1.45rem; }
  .page-heading p { font-size: .86rem; }
  .panel { padding: 18px; }
  .welcome, .group-grid { grid-template-columns: 1fr; gap: 18px; }
  .welcome-copy { padding: 3px 0 0; }
  .welcome-copy h1 { font-size: 1.85rem; }
  .welcome-copy > p { margin: 14px 0 20px; }
  .steps { margin-top: 24px; }
  .steps ol { grid-template-columns: 1fr; gap: 17px; }
  .group-fields { gap: 12px; }
  .group-footer .button { flex: 1; }
  .group-footer .checkbox-label { flex-basis: 100%; }
  .import-options { grid-template-columns: 1fr; }
  .order-card { grid-template-columns: 1fr; gap: 15px; }
  .order-side { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
  .app-footer { flex-direction: column; gap: 13px; }
  .checkout-dialog { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .loading-dot { animation: none; } }
