:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, "Microsoft YaHei", sans-serif;
  color: #17372e;
  background: #edf3ee;
  --panel: #fff;
  --muted: #465f55;
  --line: #cbdad1;
  --accent: #19624c;
  --accent-dark: #104a38;
  --error: #8e2825;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-dark); }
button, select, input { font: inherit; }
button, select, input[type="date"], input[type="text"], input:not([type]) {
  min-height: 44px;
  color: #17372e;
  border: 1px solid #aabfb3;
  border-radius: 9px;
  background: #fff;
}
button { padding: .52rem .9rem; cursor: pointer; }
button:hover:not(:disabled) { background: #eaf3ee; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #218368;
  outline-offset: 2px;
}
.button-primary { background: var(--accent); border-color: var(--accent); color: white; font-weight: 650; }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }
.skip-link { position: fixed; z-index: 5; top: .65rem; left: .65rem; padding: .7rem; background: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.wrap { width: min(100% - 2.5rem, 1080px); margin-inline: auto; }
.topbar { background: #f9fcfa; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding-block: 1.25rem; }
.back-link { font-weight: 650; font-size: .87rem; text-underline-offset: .2rem; }
.identity h1 { font-size: clamp(1.65rem, 3.8vw, 2.2rem); line-height: 1.2; margin-top: .2rem; }
.operator-login-badge { display: grid; justify-items: end; gap: .2rem; max-width: 65%; text-align: right; }
#operatorLoginName, #operatorLoginSource { overflow-wrap: anywhere; }
#operatorLoginSource, .panel-heading p, .subheading p, .scope-row p, .member-meta, .photo-meta { color: var(--muted); font-size: .9rem; }
.employee-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.employee-actions button { padding: .35rem .64rem; font-size: .84rem; }
main.wrap { padding-block: 1.6rem 3rem; }
.scope-row { margin-bottom: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .65rem; }
.scope-row p { font-weight: 650; overflow-wrap: anywhere; }
.section-nav { display: flex; flex-wrap: wrap; gap: .45rem; }
.section-nav button[aria-current="page"] { font-weight: 700; color: var(--accent-dark); background: #dbeee3; border-color: #98b9a6; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: clamp(1rem, 3vw, 1.65rem); }
.panel-heading, .subheading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.panel-heading h2, .status-panel h2 { font-size: 1.27rem; margin-bottom: .18rem; }
.panel-heading button { flex-shrink: 0; }
.status-panel { max-width: 42rem; }
.status-panel p { color: var(--muted); }
.status-panel button, .status-panel form { margin-top: .8rem; }
.status-panel form, .store-form, .filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .7rem; }
.field { display: grid; gap: .24rem; max-width: 100%; font-size: .9rem; font-weight: 620; }
.field input, .field select, .member-store { min-width: 0; max-width: 100%; padding: .45rem .55rem; font-weight: 450; }
.filters, .store-form, .capture-store-picker { margin-top: .95rem; }
.capture-store-picker { width: min(100%, 20rem); }
.status-message { margin-block: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.status-message:empty { display: none; }
[data-error="true"] { color: var(--error); }
.camera { margin-top: .85rem; border-radius: 13px; background: #102a22; overflow: hidden; }
.camera video { display: block; max-height: 65vh; width: 100%; aspect-ratio: 4/3; object-fit: contain; }
.camera-actions { padding: .68rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; }
.drafts { border-top: 1px solid var(--line); margin-top: 1.15rem; padding-top: .95rem; }
.drafts h3 { font-size: 1.02rem; margin-bottom: .18rem; }
.draft-grid, .photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: .65rem; margin-top: .8rem; }
.empty-state { grid-column: 1/-1; padding: .85rem; color: var(--muted); background: #f4f8f5; border-radius: 9px; font-size: .91rem; }
.photo-card, .draft-card { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f7faf8; }
.photo-preview { display: grid; place-items: center; padding: 0; width: 100%; aspect-ratio: 4/3; border: 0; border-radius: 0; overflow: hidden; background: #e8f0eb; color: var(--muted); font-size: .84rem; }
.photo-preview:hover:not(:disabled) { background: #dfebe3; }
.photo-preview img, .draft-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-meta, .draft-meta { display: grid; gap: .08rem; padding: .52rem .65rem; overflow-wrap: anywhere; }
.photo-meta strong, .draft-meta strong { color: #17372e; font-size: .96rem; }
.draft-meta span, .draft-meta p { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.draft-meta [data-error="true"] { color: var(--error); }
.more-button { margin-top: .85rem; }
.plain-list, .member-list { display: grid; gap: .52rem; margin: .75rem 0 0; padding: 0; }
.plain-list li, .member-row { min-width: 0; list-style: none; padding: .62rem .76rem; border: 1px solid var(--line); border-radius: 9px; overflow-wrap: anywhere; background: #f9fbfa; }
.member-row, .member-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.member-row { justify-content: space-between; }
.member-summary { min-width: 0; }
.member-controls label { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: .88rem; color: var(--muted); }
.member-store { max-width: min(13rem, 100%); }
dialog { padding: 0; width: min(850px, 100% - 2rem); max-height: calc(100% - 2rem); border: 1px solid #9db9aa; border-radius: 14px; color: #17372e; background: #fff; }
dialog::backdrop { background: #0d2520d9; }
.dialog-header { display: flex; position: sticky; top: 0; align-items: center; justify-content: space-between; gap: .65rem; padding: .72rem .85rem; background: #fff; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.dialog-body { padding: .7rem; }
.dialog-body img { display: block; max-width: 100%; max-height: 75vh; margin-inline: auto; object-fit: contain; }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 1.35rem); }
  .topbar-inner { align-items: flex-start; padding-block: .8rem; gap: .55rem; }
  .operator-login-badge { max-width: 58%; }
  .employee-actions { gap: .28rem; }
  .employee-actions button { padding-inline: .5rem; }
  main.wrap { padding-top: .85rem; }
  .scope-row { display: grid; }
  .section-nav { gap: .32rem; }
  .section-nav button { padding-inline: .61rem; }
  .panel { padding: .8rem; border-radius: 12px; }
  .draft-grid, .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-row { align-items: flex-start; }
  .member-summary { width: 100%; }
  .member-store { max-width: 100%; }
}
