:root {
  color-scheme: light;
  --ground:#f2f4ee; --surface:#ffffff; --raised:#f5f6f0; --active:#e9ede4;
  --border:#e0e5db; --control:#bbc6b7; --ink:#283c31; --muted:#536454;
  --primary:#283d31; --accent:#4a684e; --error:#a12d2a;
  --font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-family:var(--font); font-size:14px; line-height:1.65; color:var(--ink); background:var(--ground); font-synthesis:none;
}
* { box-sizing:border-box; }
body { margin:0; }
button,input,select,textarea { font:inherit; }
a { color:var(--ink); text-underline-offset:4px; }
a:hover { text-decoration:underline; }
button { min-height:40px; padding:8px 15px; border:1px solid var(--control); border-radius:6px; color:var(--ink); background:var(--surface); cursor:pointer; transition:background-color .15s,border-color .15s; }
button:hover { background:var(--raised); border-color:#7e937d; }
button:active { background:var(--active); }
button:disabled { cursor:default; background:#e8ece3; color:#526250; border-color:#c7d0c1; }
.primary { color:#fff; background:var(--primary); border-color:var(--primary); }
.primary:hover { color:#fff; background:#3d5743; border-color:#3d5743; }
.primary:disabled { color:#fff; background:#667760; border-color:#667760; }
.text-button { min-height:36px; border-color:transparent; background:transparent; padding:5px 8px; text-decoration:underline; text-underline-offset:4px; }
.text-button:hover { border-color:transparent; background:var(--raised); }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
[hidden] { display:none!important; }
.sr-only,.skip-link { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.skip-link:focus { position:fixed; top:8px; left:8px; width:auto; height:auto; padding:12px; clip:auto; background:#fff; z-index:10; }
.site-header,.site-footer,.workspace { width:min(1120px,calc(100% - 48px)); margin-inline:auto; }
.site-header { display:flex; align-items:center; justify-content:space-between; min-height:76px; gap:24px; }
.brand { display:flex; align-items:center; gap:11px; text-decoration:none; }
.brand img { object-fit:contain; }
.brand>span { display:grid; font-weight:600; font-size:17px; line-height:1.35; }
.brand small { font-size:11px; font-weight:500; letter-spacing:.08em; margin-top:3px; }
.back-link { font-size:14px; text-decoration:none; white-space:nowrap; }
.back-link span { margin-left:8px; }
.workspace { padding-top:16px; }
.page-heading { margin-bottom:20px; }
h1 { margin:0 0 8px; font-size:24px; line-height:1.35; font-weight:600; letter-spacing:0; }
h2 { margin:0 0 10px; font-size:20px; line-height:1.45; font-weight:600; }
h3 { margin:0 0 6px; font-size:14px; line-height:1.5; font-weight:600; }
p { margin:0; }
.page-heading p,.section-description { color:var(--muted); font-size:14px; }
.tabs { display:flex; flex-wrap:wrap; gap:0 24px; margin-bottom:24px; border-bottom:1px solid var(--border); }
.tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; padding:11px 2px; color:var(--muted); }
.tabs button[aria-selected=true] { color:var(--ink); border-bottom-color:var(--accent); font-weight:600; }
/* 1120 = 800 + 24 + 296；窄屏先缩说明列，低于 860 时上下排列。 */
.work-layout { display:grid; grid-template-columns:minmax(0,1fr) 296px; gap:24px; align-items:start; }
.work-sheet { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:28px; min-width:0; }
.support-guide { padding:4px 0; min-width:0; color:var(--muted); }
.support-guide h2 { font-size:16px; color:var(--ink); margin-bottom:24px; }
.guide-list { margin:0; padding:0; list-style:none; display:grid; gap:24px; }
.guide-list h3,.identity-note h3 { color:var(--ink); }
.guide-list p,.identity-note p { font-size:14px; line-height:1.8; }
.identity-note { margin-block:28px 24px; padding:18px; background:#e8ede2; border-radius:8px; }
fieldset { min-width:0; margin:0; padding:0; border:0; }
.section-description { margin-bottom:24px; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; }
.category-row { grid-template-columns:180px minmax(0,1fr); }
.field { display:grid; gap:7px; margin-bottom:20px; min-width:0; }
label { font-weight:500; }
.label-row { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:8px; }
.label-row output { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
input,select,textarea { width:100%; min-width:0; min-height:44px; border:1px solid var(--control); border-radius:6px; padding:10px 12px; background:#fff; color:var(--ink); }
input::placeholder,textarea::placeholder { color:#687364; opacity:1; }
input[aria-invalid=true],textarea[aria-invalid=true] { border-color:var(--error); }
input:disabled,select:disabled,textarea:disabled { color:#586650; background:#f0f2ec; opacity:1; }
textarea { resize:vertical; line-height:1.8; }
.field-hint { color:var(--muted); font-size:12px; line-height:1.7; }
.field-error { color:var(--error); font-size:13px; line-height:1.6; }
.optional { color:var(--muted); font-weight:400; margin-left:6px; font-size:12px; }
.form-end { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:20px; }
.form-end p { max-width:38em; }
.lookup-form { max-width:530px; }
.input-action { display:flex; min-width:0; }
.input-action input { border-top-right-radius:0; border-bottom-right-radius:0; }
.input-action button { flex:none; border-left:0; border-top-left-radius:0; border-bottom-left-radius:0; }
.feedback { margin:0 0 20px; padding:14px 16px; border-radius:8px; color:#304c34; background:#e9efe3; overflow-wrap:anywhere; }
.feedback.error,.feedback.warning { color:#7a302b; background:#fcf0eb; }
.preview-hint { margin:0 0 16px; color:var(--muted); font-size:13px; }
.account-banner { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 0; margin-bottom:14px; }
.account-banner strong { font-weight:600; }
.login-gate { max-width:570px; padding-block:8px; }
.login-gate h3 { font-size:18px; margin-bottom:12px; }
.login-gate>p { color:var(--muted); margin-bottom:12px; }
.login-gate .actions { margin-bottom:0; }
.button-link { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 15px; border:1px solid var(--control); border-radius:6px; text-decoration:none; }
.button-link:hover { text-decoration:none; }
.button-link.primary { border-color:var(--primary); }
.quota-status { margin-bottom:24px; color:var(--muted); font-size:13px; }
.mine-list { display:grid; gap:0; }
.mine-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; padding:20px 0; border-bottom:1px solid var(--border); }
.mine-row:first-child { padding-top:8px; }
.mine-row h3 { font-size:16px; overflow-wrap:anywhere; }
.mine-row .status-chip { margin-top:8px; }
.mine-row button { white-space:nowrap; }
.empty-state { color:var(--muted); padding-block:20px; }
.receipt-heading { display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.receipt-values { margin:24px 0 16px; padding:20px; background:var(--raised); border-radius:8px; }
.receipt-values>div+div { margin-top:20px; }
dt { color:var(--muted); font-size:12px; margin-bottom:6px; }
dd { margin:0; display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; }
code { font-family:ui-monospace,Consolas,monospace; font-size:14px; letter-spacing:0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; word-break:break-word; }
#receipt-code { user-select:all; }
.actions { display:flex; flex-wrap:wrap; gap:10px; margin-block:20px 16px; }
.check-row { display:flex; align-items:center; gap:10px; min-height:44px; font-size:13px; font-weight:400; }
.check-row input { width:18px; min-height:18px; height:18px; flex:none; margin:0; accent-color:var(--accent); }
.ticket-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.ticket-heading h2 { overflow-wrap:anywhere; }
.status-chip { flex:none; white-space:nowrap; font-size:12px; padding:3px 9px; border-radius:4px; color:#3d4c40; background:#e9ede7; }
.status-progress { background:#e8eee1; color:#3f5535; }
.status-resolved { background:#e8efe8; color:#36523b; }
.ticket-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-block:24px 8px; }
.ticket-toolbar>div { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
#last-refreshed { margin-bottom:24px; }
.messages { display:grid; gap:24px; }
.message { min-width:0; padding:0 0 22px; border-bottom:1px solid var(--border); }
.message.team { background:var(--raised); border:0; border-radius:8px; padding:18px; }
.message-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:6px 12px; margin-bottom:10px; }
.message-heading strong { font-size:14px; font-weight:600; }
.message time { color:var(--muted); font-size:12px; }
.message-body { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.85; }
#reply-form { margin-top:28px; }
.resolved-note { margin-top:24px; padding:18px; border-radius:8px; background:var(--raised); }
.resolved-note p { color:var(--muted); margin:6px 0 14px; }
.file-section { margin-block:24px; }
.file-disclosure { margin-block:4px 12px; }
.file-disclosure summary { min-height:44px; padding-block:10px; cursor:pointer; font-weight:500; }
.file-disclosure summary .file-limit { float:right; font-weight:400; }
.file-disclosure[open] summary { margin-bottom:8px; }
.file-section .label-row { margin-bottom:8px; }
.file-input { padding:8px; background:var(--raised); font-size:12px; }
.file-input::file-selector-button { font:inherit; border:1px solid var(--control); border-radius:4px; padding:6px 10px; margin-right:10px; color:var(--ink); background:#fff; cursor:pointer; }
.file-section>.field-hint { margin-top:8px; }
.file-list,.saved-file-list { margin:14px 0; padding:0; list-style:none; display:grid; gap:10px; }
.file-item { display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px; border:1px solid var(--border); border-radius:8px; }
.file-item>img { display:block; width:64px; height:48px; object-fit:cover; border-radius:4px; }
.file-name { overflow-wrap:anywhere; font-size:13px; }
.file-kind { display:grid; place-items:center; width:64px; height:48px; background:var(--raised); color:var(--muted); font-size:12px; border-radius:4px; }
.file-item>.local-preview { grid-column:1/-1; width:auto; height:auto; max-width:100%; max-height:400px; justify-self:center; object-fit:contain; }
.file-state { color:var(--muted); font-size:12px; }
.file-state.error { color:var(--error); }
.file-actions { display:flex; flex-wrap:wrap; gap:6px; }
.file-actions button { min-height:36px; font-size:12px; padding:6px 9px; }
.saved-file { padding:14px; border:1px solid var(--border); border-radius:8px; min-width:0; }
.saved-file-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; }
.saved-file img { display:block; width:auto; max-width:100%; height:auto; max-height:560px; margin:14px auto 0; object-fit:contain; }
.site-footer { margin-top:32px; padding-block:24px; display:flex; justify-content:space-between; gap:16px; color:var(--muted); font-size:12px; }
.site-footer a { color:var(--muted); text-decoration:none; }
@media(max-width:1040px) { .work-layout { grid-template-columns:minmax(0,1fr) 240px; } .work-sheet { padding:24px; } .field-row { gap:16px; } .category-row { grid-template-columns:150px minmax(0,1fr); } }
@media(max-width:860px) { .work-layout { grid-template-columns:1fr; } .support-guide { padding-top:8px; } .guide-list { grid-template-columns:1fr 1fr 1fr; gap:20px; } .identity-note { margin-block:24px 16px; } }
@media(max-width:600px) {
  :root { font-size:14px; }
  .site-header,.site-footer,.workspace { width:calc(100% - 36px); }
  .site-header { min-height:68px; gap:16px; }
  .brand>span { font-size:16px; } .brand small { font-size:11px; }
  .workspace { padding-top:18px; }
  h1 { font-size:24px; } h2 { font-size:20px; }
  .page-heading { margin-bottom:20px; }
  .tabs { gap:22px; margin-bottom:20px; }
  .tabs button { min-height:44px; }
  .work-sheet { border:0; border-radius:0; padding:22px 18px; margin-inline:-18px; }
  .field-row,.category-row { grid-template-columns:1fr; gap:0; }
  input,select,textarea { font-size:16px; }
  button { min-height:44px; }
  .form-end { flex-direction:column; align-items:stretch; gap:14px; }
  .form-end>button { width:100%; }
  .guide-list { grid-template-columns:1fr; gap:20px; }
  .support-guide h2 { margin-bottom:20px; }
  .ticket-heading,.ticket-toolbar { flex-direction:column; align-items:flex-start; gap:12px; }
  .ticket-toolbar>div { justify-content:flex-start; }
  .receipt-values { padding:16px; }
  .actions { display:grid; grid-template-columns:1fr; }
  .actions button { width:100%; }
  .button-link { min-height:44px; width:100%; }
  .account-banner { align-items:flex-start; }
  .mine-row { grid-template-columns:1fr; }
  .mine-row>button { justify-self:start; }
  .file-item { grid-template-columns:56px minmax(0,1fr); gap:10px; }
  .file-item>img { width:56px; height:48px; }
  .file-actions { grid-column:2; }
  .file-actions button { min-height:44px; }
  .site-footer { flex-direction:column; gap:8px; }
}
@media(prefers-reduced-motion:reduce) { button { transition:none; } }
