:root {
  color-scheme: light;
  --canvas: #f7f8f6;
  --paper: #fff;
  --ink: #161b18;
  --muted: #52605a;
  --line: #dbe1dc;
  --green: #135942;
  --tint: #e4f1e9;
  --danger: #9e3228;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
h1, h2, h3, p, dl, dd { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.18; letter-spacing: -.035em; }
h2 { font-size: 1.25rem; line-height: 1.3; }
h3 { font-size: 1rem; }
a { color: var(--green); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid #367860; outline-offset: 3px; }
.skip { position: fixed; top: -100px; z-index: 10; padding: 12px; background: var(--paper); }
.skip:focus { top: 0; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { width: min(100% - 32px, 1320px); margin: auto; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: -.05em; }
.brand-mark { width: 29px; height: 24px; border-radius: 9px 9px 9px 3px; background: var(--green); display: grid; place-items: center; }
.brand-mark::before { content: ""; width: 4px; height: 4px; border-radius: 100%; background: #fff; box-shadow: -6px 0 #fff, 6px 0 #fff; }
.account { font-size: .87rem; color: var(--muted); overflow-wrap: anywhere; }
.account-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.account-actions button { flex-shrink: 0; }
.help-guide { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.help-guide summary { font-weight: 650; }
.help-guide[open] summary { margin-bottom: 12px; }
.help-steps { margin: 0; padding-left: 1.5em; display: grid; gap: 10px; }
.help-guide p + p { margin-top: 10px; }
.layout { width: min(100% - 32px, 1320px); margin: auto; }
main { min-width: 0; padding-block: 25px 60px; }
nav { display: flex; overflow-x: auto; padding-block: 10px; gap: 6px; border-bottom: 1px solid var(--line); }
.nav-item { border: 0; background: transparent; white-space: nowrap; color: var(--muted); }
.nav-item[aria-current="page"] { background: var(--tint); color: var(--green); }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-height: 44px; padding: 8px 14px; font-weight: 650; cursor: pointer; text-decoration: none; text-align: center; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
button:disabled { opacity: .58; cursor: default; }
button:hover:not(:disabled), .button:hover { border-color: var(--green); }
.primary { background: var(--green); color: #fff; border-color: var(--green); }
.primary:hover:not(:disabled) { background: #0d4935; }
.danger { color: var(--danger); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.page-head p, .hint, .meta { color: var(--muted); font-size: .875rem; }
.page-head p { margin-top: 7px; }
.panel, .empty { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.empty { color: var(--muted); }
.stack { display: grid; gap: 16px; min-width: 0; }
.tiny-stack { display: grid; gap: 7px; min-width: 0; }
.auth { display: grid; gap: 22px; max-width: 900px; margin: clamp(0px, 7vw, 70px) auto 0; }
.auth-copy { display: grid; gap: 12px; align-content: center; }
.auth-copy h1 { font-size: clamp(1.85rem, 8.25vw, 4.3rem); }
.auth .panel { max-width: 440px; width: 100%; }
label { display: grid; gap: 6px; font-size: .92rem; font-weight: 650; }
input, textarea, select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #c9d1cb; border-radius: 8px; background: #fff; color: var(--ink); padding: 9px 12px; font-weight: 400; }
textarea { min-height: 86px; resize: vertical; }
.check { display: flex; min-height: 44px; align-items: center; gap: 9px; }
.check input { width: 20px; min-height: 20px; accent-color: var(--green); }
.feedback { font-size: .9rem; overflow-wrap: anywhere; color: var(--green); }
.feedback:empty { display: none; }
.feedback:not(:empty) { margin-bottom: 12px; background: var(--tint); border-radius: 8px; padding: 9px 12px; }
.feedback.error:not(:empty) { color: var(--danger); background: #fcefeb; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { justify-content: space-between; }
.workspace-head { align-items: flex-start; flex-wrap: nowrap; margin-bottom: 4px; }
.project-heading { min-width: 0; flex: 1; }
.project-title { font: inherit; letter-spacing: inherit; line-height: inherit; text-align: left; justify-content: flex-start; border: 0; background: transparent; padding: 0; width: 100%; max-width: 100%; gap: 8px; }
.project-title > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-switch-hint { flex-shrink: 0; font-size: .75rem; font-weight: 400; letter-spacing: 0; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.workspace-head > button { flex-shrink: 0; }
.project-choices button { justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }
.project-choices button[aria-pressed="true"] { color: var(--green); background: var(--tint); }
.admin-projects { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr)); gap: 16px; }
.admin-filter { max-width: 360px; }
.settings-quota { padding: 14px; border-radius: 10px; color: var(--green); background: var(--tint); }
.sent-heading { padding-bottom: 8px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(92px,1fr)); gap: 8px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.metric dt { font-size: .8rem; color: var(--muted); }
.metric dd { font-size: 1.45rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 154px),1fr)); gap: 12px; }
.card { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }
.cover { display: block; width: 100%; padding: 0; border: 0; border-radius: 0; background: #eef0ee; aspect-ratio: 4/3; position: relative; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover:focus-visible { outline-offset: -4px; }
.card-body { display: grid; gap: 5px; padding: 12px 12px 3px; }
.card-actions { padding: 4px 10px 8px; justify-content: space-between; }
.card-actions button { padding-inline: 8px; }
.badge { display: inline-block; justify-self: start; font-size: .78rem; border-radius: 30px; background: #edf0ed; padding: 2px 8px; color: #39453f; }
.badge.good { background: var(--tint); color: var(--green); }
.badge.failed { color: var(--danger); background: #fcefeb; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-block: 12px; }
.row + .row { border-top: 1px solid var(--line); }
.row > :first-child { flex: 1; min-width: min(100%, 180px); }
.row a { display: inline-flex; align-items: center; min-height: 44px; }
dialog { border: 1px solid var(--line); width: min(100% - 24px, 720px); max-height: calc(100dvh - 24px); padding: 0; border-radius: 16px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px #152c2050; }
dialog::backdrop { background: #15231bc0; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; background: var(--paper); }
.dialog-body { padding: 16px; }
.photo-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; align-items: start; }
.photo-pair img { display: block; width: 100%; max-height: 55dvh; object-fit: contain; background: var(--canvas); border-radius: 8px; }
.note-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-preview-title { font-size: 1.25rem; line-height: 1.4; }
.image-settings { border-top: 1px solid var(--line); padding-top: 20px; }
.image-settings input[type="number"] { max-width: 140px; }
.image-job { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.image-progress { font-size: .92rem; }
input:disabled, textarea:disabled, select:disabled { color: var(--muted); background: var(--canvas); }
@media (min-width: 761px) {
  .topbar-inner, .layout { width: min(100% - 64px, 1320px); }
  .layout.signed-in { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 28px; }
  nav { flex-direction: column; align-self: start; position: sticky; top: 16px; padding-top: 24px; border: 0; }
  .nav-item { justify-content: flex-start; }
  main { padding-top: 32px; }
  .auth { grid-template-columns: 1fr minmax(280px, 380px); }
  .auth-copy h1 { max-width: 9em; }
  .fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .panel { padding: 23px; }
  .card { padding: 0; }
  .grid { grid-template-columns: repeat(auto-fill,minmax(min(100%, 206px),1fr)); }
}
