:root {
  --ink: #14241c;
  --muted: #3d5248;
  --line: #d5e0da;
  --paper: #f3f6f4;
  --surface: #ffffff;
  --accent: #145C40;
  --accent-ink: #ffffff;
  --bar: #84AA95;
  --bar-ink: #10241a;
  --danger: #8d2f2a;
  --ok: #1d6b45;
  --focus: #0b3d2c;
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bar {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 0 20px;
  background: var(--bar); color: var(--bar-ink);
  position: sticky; top: 0; z-index: 2;
}
.brand { font-weight: 700; font-size: 20px; letter-spacing: 0; }
.who { margin-left: auto; font-weight: 700; }
.ghost, .primary, .danger {
  border: 1px solid transparent; border-radius: 8px;
  min-height: 40px; padding: 0 14px;
}
.ghost { background: transparent; border-color: currentColor; }
.bar a.ghost { display: inline-flex; align-items: center; text-decoration: none; }
.bar a.ghost[hidden] { display: none; }
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.danger { background: var(--danger); color: #fff; }
.workspace { display: grid; grid-template-columns: 180px 1fr; min-height: calc(100vh - 64px); }
nav {
  padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; align-content: start;
  position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px);
  background: var(--paper); z-index: 1;
}
#menu { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow: auto; }
.menu-group { display: flex; flex-direction: column; gap: 2px; }
.menu-label { padding: 6px 12px 2px; font-weight: 700; }
nav button.sub { padding-left: 28px; }
.side-top { display: flex; flex-direction: column; gap: 4px; }
.side-name { font-weight: 700; padding: 0 12px 8px; }
.global-config { margin-top: auto; flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
.global-config h2 { margin: 0 12px 4px; font-size: 15px; }
nav button {
  text-align: left; background: transparent; border: 0; border-radius: 8px;
  height: 40px; padding: 0 12px; flex: 0 0 auto;
}
nav button.menu-box {
  height: auto; min-height: 88px; margin-bottom: 10px; padding: 12px;
  border: 1px solid #1c2418; border-radius: 2px; text-align: center; font-size: 18px;
  white-space: normal; line-height: 1.3;
}
nav button.on { background: var(--surface); color: var(--accent); font-weight: 700; }
nav button.menu-link {
  height: auto; min-height: 44px; margin-bottom: 8px; padding: 8px 10px;
  border: 1px solid #1c2418; border-radius: 2px; text-align: center; background: var(--surface);
}
nav button.menu-link.on { background: var(--bar); color: var(--bar-ink); }
.project-box {
  width: 220px; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid #1c2418; display: flex; flex-direction: column;
}
.project-preview { width: 100%; height: 160px; object-fit: contain; background: #fff8d0; display: block; }
.project-preview.empty { background: #fff3a0; }
.project-meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.print-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 14px; }
.print-code {
  flex: 0 0 auto; font-size: 22px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.2;
  padding: 6px 12px; border-radius: 6px; background: var(--bar); color: var(--bar-ink);
}
.print-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.print-head button { min-height: 36px; padding: 0 12px; background: var(--surface); border: 1px solid #1c2418; }
.qr-preview { display: block; width: 240px; height: 240px; margin: 12px auto; image-rendering: pixelated; background: #fff; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.promo-card { border: 1px solid #1c2418; background: var(--surface); }
.promo-card img { width: 100%; height: 96px; object-fit: contain; display: block; background: var(--paper); }
.promo-name { padding: 6px 8px 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-card button { width: 100%; min-height: 32px; border: 0; border-top: 1px solid var(--line); background: transparent; }
.guest-desk { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
.guest-phone {
  width: 320px; background: var(--guest-bg, #FBF8F4); color: var(--guest-text, #2C2A26);
  border: 1px solid #1c2418; border-radius: 28px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(20, 36, 28, 0.12);
}
.guest-banner {
  min-height: 132px; display: flex; align-items: center; justify-content: center; padding: 20px 16px;
  background: linear-gradient(180deg, var(--guest-from, #F5E6D3), var(--guest-to, #EDDCC8)) center/cover no-repeat;
}
.guest-banner.shot { min-height: 0; padding: 0; }
.guest-banner img, .guest-intro.shot img { width: 100%; display: block; }
.guest-size { margin: 0; font-size: 14px; letter-spacing: 0.04em; font-weight: 500; color: var(--guest-soft, #6B6560); }
.guest-intro {
  margin: 12px 12px 0; padding: 16px 12px; background: var(--guest-card, #fff); border-radius: 8px;
  text-align: center; letter-spacing: 0.12em; font-weight: 700; color: var(--guest-soft, #6B6560);
}
.guest-intro.shot { padding: 8px; }
.guest-tip { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
#guest-intro-pic { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-height: 88px; padding: 8px; background: var(--paper); border: 1px solid #1c2418; }
#guest-intro-pic img, #guest-intro-pic .ph { width: 120px; height: 64px; object-fit: cover; background: #efe8dc; display: block; }
.guest-tabs { display: flex; margin: 8px 12px 0; border-bottom: 2px solid #e5e2dd; }
.guest-tabs button {
  flex: 1; min-height: 42px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  background: transparent; color: var(--guest-soft, #6B6560); font-weight: 700;
}
.guest-tabs button.on { color: var(--guest-accent, #B8860B); border-bottom-color: var(--guest-accent, #B8860B); }
.guest-fall { column-count: 2; column-gap: 8px; padding: 12px 12px 20px; min-height: 160px; }
.guest-shot { position: relative; break-inside: avoid; margin: 0 0 8px; }
.guest-shot img { width: 100%; display: block; border-radius: 8px; background: #efe8dc; }
.guest-shot button {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; min-height: 26px; padding: 0;
  border: 0; border-radius: 6px; background: rgba(20, 20, 20, 0.72); color: #fff;
}
.guest-empty { padding: 28px 16px 36px; text-align: center; color: var(--guest-soft, #6B6560); }
.guest-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.guest-controls h2 { margin: 0 0 4px; font-size: 22px; }
.guest-lead { margin: 0; color: var(--muted); }
.guest-head-actions { position: relative; display: flex; gap: 8px; flex: 0 0 auto; }
.guest-head-actions a, .guest-head-actions > button {
  min-height: 36px; padding: 0 12px; border: 1px solid #1c2418; background: var(--surface);
  color: inherit; text-decoration: none; display: inline-flex; align-items: center;
}
.guest-qr {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 6; width: 220px; padding: 12px;
  background: #fff; border: 1px solid #1c2418; box-shadow: 0 12px 28px rgba(20, 36, 28, 0.16);
}
.guest-qr img { width: 196px; height: 196px; display: block; background: #fff; }
.guest-qr button { width: 100%; min-height: 32px; margin-top: 8px; border: 1px solid #1c2418; background: var(--paper); }
.guest-block { margin: 0 0 18px; padding: 14px 16px 16px; background: var(--surface); border: 1px solid #1c2418; }
.guest-block h3 { margin: 0 0 12px; font-size: 16px; }
.guest-flags, .guest-themes { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.guest-flags label, .guest-themes label { display: flex; align-items: center; gap: 8px; }
.theme-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); }
.guest-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.guest-row input[type="text"] { flex: 1; min-width: 180px; }
.guest-media { display: flex; gap: 12px; margin-top: 12px; }
.guest-media button { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-height: 88px; padding: 8px; background: var(--paper); border: 1px solid #1c2418; }
.guest-media img, .guest-media .ph { width: 120px; height: 64px; object-fit: cover; background: #efe8dc; display: block; }
.guest-block .manage-labels { margin: 12px 0 0; }
.guest-block .manage-labels button { min-height: 32px; padding: 0 10px; border: 1px solid #1c2418; background: var(--paper); }
@media (max-width: 860px) { .guest-desk { grid-template-columns: 1fr; } .guest-phone { margin: 0 auto; } }
.print-flags { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 14px; }
.print-flags label { display: flex; align-items: center; gap: 8px; }
.booth-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 920px; margin: 0 0 16px; }
.booth-scope button { min-height: 52px; font-size: 16px; font-weight: 800; border: 1px solid #1c2418; background: var(--surface); }
.booth-scope button.on { background: var(--bar); color: var(--bar-ink); }
.booth-kind { max-width: 920px; padding: 14px; margin: 0 0 16px; background: var(--surface); border: 1px solid #1c2418; }
.booth-kind h3 { margin: 0 0 6px; }
.booth-kind .toolbar { margin: 8px 0 10px; }
.booth-kind video { width: 100%; height: 96px; object-fit: cover; display: block; background: var(--paper); }
.print-templates { max-width: 520px; padding: 12px; background: var(--surface); border: 1px solid #1c2418; }
.print-templates > button, .tpl-ops button { min-height: 36px; margin: 0 6px 8px 0; padding: 0 10px; background: var(--surface); border: 1px solid #1c2418; }
.tpl-card { display: grid; grid-template-columns: 92px 1fr; gap: 8px 10px; margin-top: 14px; align-items: center; }
.tpl-card img { width: 92px; height: 72px; object-fit: contain; border: 1px solid var(--line); background: var(--paper); grid-row: span 2; }
.tpl-config select { min-height: 32px; font-weight: 700; }
dialog input[readonly] { background: #f3f6f4; color: var(--muted); }
nav button:hover { background: var(--surface); }
main { padding: 20px 24px 40px; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.toolbar input, .field input[type="text"], .field input[type="password"], .field input[type="date"], .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; min-height: 40px; padding: 8px 12px;
}
.toolbar input { max-width: 280px; }
.field textarea { min-height: 96px; resize: vertical; }
.day { margin: 22px 0 8px; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.album {
  width: 220px; background: var(--surface); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
}
.album a.cover {
  display: block; height: 148px; background: var(--bar) center/cover no-repeat;
  color: var(--bar-ink); text-decoration: none; position: relative;
}
.album .meta { padding: 10px 12px 12px; }
.album .name { font-weight: 700; }
.album .code { color: var(--muted); font-size: 13px; }
.album .actions { display: flex; gap: 8px; margin-top: 8px; }
.album .actions button { min-height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.empty { color: var(--muted); padding: 28px 0; }
dialog {
  border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 32px));
  box-shadow: 0 16px 48px rgba(20, 36, 28, 0.18);
}
dialog.wide { width: calc(100vw - 24px); height: calc(100vh - 24px); max-width: none; max-height: none; }
dialog.wide form { display: flex; flex-direction: column; height: 100%; max-height: 100%; overflow: hidden; }
.area-name { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.area-name label { font-weight: 700; white-space: nowrap; }
.area-name input { width: min(420px, 100%); min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; background: var(--surface); font-size: 16px; }
.area-edit { display: grid; grid-template-columns: minmax(240px, 300px) minmax(160px, 1fr) 156px; gap: 12px; align-items: stretch; flex: 1; min-height: 0; }
.area-fields { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; padding-right: 8px; }
.area-fields .field input, .nums input { width: 100%; min-width: 0; }
.area-fields > p { margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
.area-tools { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.area-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.area-pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.area-pick-row button, .layer-switch button { min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-main.is-template { cursor: default; }
.area-pick-row .span2 { grid-column: 1 / -1; }
.layer-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.area-font-row { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.area-font-row .ratio, .zoom-line { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.area-font-row input, .area-font-row select { flex: 1; min-width: 0; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: var(--surface); }
.area-font-row input[type="number"] { width: auto; }
#area-font-name { width: auto; }
#area-font-color { flex: 0 0 44px; padding: 2px; }
#area-view { display: flex; justify-content: safe center; align-items: safe center; flex: 1; min-height: 0; height: 100%; margin: 0; padding: 12px; box-sizing: border-box; background: #f3f1ea; border-radius: 10px; overflow: auto; position: relative; }
#view-zoom { flex: 1; width: auto; min-width: 0; }
#area-paper { position: relative; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); flex: none; overflow: hidden; }
#area-turn { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#area-margin { position: absolute; z-index: 30; box-sizing: border-box; pointer-events: none; }
#area-margin.whole { outline: 1px dashed rgba(40, 40, 40, 0.45); outline-offset: -1px; }
#slot-layer { position: absolute; inset: 0; pointer-events: none; }
#area-frame, #area-word { transform-origin: 0 0; }
.paper-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 12px; }
.paper-box h3 { margin: 0 0 8px; font-size: 15px; }
.frame-count { margin: 12px 0 0; font-size: 14px; }
.frame-note { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.frame-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 4px; }
.frame-pick { position: relative; display: inline-flex; }
.frame-pick > button, .frame-add { width: 40px; min-width: 40px; height: 36px; min-height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.frame-pick > button.on { background: var(--accent); color: var(--accent-ink); }
.layer-card.on .layer-main { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.frame-pick > button.frame-x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0; border: 0; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; line-height: 16px; }
.flip-line { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.flip-line select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 8px; }
.flip-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 700; }
.flip-check input { width: 18px; height: 18px; margin: 0; }
.layer-panel { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.layer-card { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 4px; align-items: center; }
.layer-main { display: flex; flex-direction: column; gap: 4px; width: 100%; min-height: 0; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: center; }
.layer-thumb { display: flex; align-items: center; justify-content: center; height: 64px; border: 1px solid var(--ink); border-radius: 4px; background: var(--surface); overflow: hidden; }
.layer-thumb img { width: 100%; height: 100%; object-fit: contain; }
.layer-thumb.is-template { background: transparent; }
.layer-mark { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.layer-name { font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-moves { display: flex; flex-direction: column; gap: 4px; }
.layer-moves button, .layer-copy { min-height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.layer-moves button.layer-x { color: #fff; background: var(--danger); border-color: var(--danger); }
.layer-moves button.layer-x:disabled { opacity: 0.35; }
.layer-copy { margin-top: 4px; }
.slot { position: absolute; z-index: 1; border: 2px solid rgba(0, 0, 0, 0.28); background: var(--slot, #e2b657); cursor: move; pointer-events: auto; }
.slot.on { border-color: #1a1a1a; outline: 1px solid #1a1a1a; outline-offset: 1px; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: 0; pointer-events: none; }
.slot.has-photo img { opacity: 1; }
.slot .mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42%; min-width: 36px; max-width: 84px; aspect-ratio: 1; border-radius: 50%; background: #fff; color: #1a1a1a; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 28px; pointer-events: none; }
.slot.has-photo .mark { display: none; }
.count-row, .slot-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.template-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.template-pair button { min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count-row button, .slot-row button { min-width: 36px; min-height: 36px; }
.count-row button.on, .slot-row button.on { background: var(--accent); color: var(--accent-ink); }
#area-frame { position: absolute; border: 1px dashed rgba(40, 40, 40, 0.7); box-sizing: border-box; z-index: 2; pointer-events: none; }
#area-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
#area-photo, #area-word { position: absolute; }
#area-photo { z-index: 1; background: rgba(70, 110, 190, 0.28); border: 1px solid #234; cursor: move; overflow: hidden; }
#area-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
#area-photo .cap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; }
#area-word { z-index: 20; cursor: move; line-height: 1; white-space: nowrap; }
.ph-edge { position: absolute; z-index: 4; }
.ph-n, .ph-s { left: 8px; right: 8px; height: 12px; cursor: ns-resize; }
.ph-n { top: -6px; }
.ph-s { bottom: -6px; }
.ph-w, .ph-e { top: 8px; bottom: 8px; width: 12px; cursor: ew-resize; }
.ph-w { left: -6px; }
.ph-e { right: -6px; }
.edge { position: absolute; pointer-events: auto; }
.edge-n, .edge-s { left: 0; right: 0; height: 10px; cursor: ns-resize; }
.edge-n { top: -5px; }
.edge-s { bottom: -5px; }
.edge-w, .edge-e { top: 0; bottom: 0; width: 10px; cursor: ew-resize; }
.edge-w { left: -5px; }
.edge-e { right: -5px; }
@media (max-width: 640px) { .area-edit { grid-template-columns: 1fr; } }
dialog::backdrop { background: rgba(20, 36, 28, 0.45); }
dialog form, .sheet { padding: 20px; }
dialog h2 { margin: 0 0 14px; font-size: 20px; }
.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 4px; font-size: 14px; }
.checks { display: flex; gap: 16px; }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.colors label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.colors input[type="color"] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line); background: transparent; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity 180ms ease-out;
}
#toast.show { opacity: 1; }
.user-list, .suggest-list { display: flex; flex-direction: column; gap: 8px; }
.user-row, .suggest-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
.swatch { width: 18px; height: 18px; border-radius: 4px; display: inline-block; vertical-align: -3px; margin-right: 6px; border: 1px solid var(--line); }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 0.9fr; }
.login-side { background: #145C40; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: flex-end; }
.login-side h1 { margin: 0 0 8px; font-size: 40px; font-weight: 700; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-form form { width: min(360px, 100%); }
.err { min-height: 22px; color: var(--danger); font-size: 14px; }
.album-page { min-height: 100vh; background: var(--web-back, #fff); color: var(--web-fore, #243028); }
.album-top { padding: 20px 16px 8px; }
.album-top h1 { margin: 0; font-size: 28px; color: var(--web-title, #10241a); text-wrap: balance; }
.views { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 999px; background: var(--views-back); color: var(--views-color); font-size: 13px; }
.labels { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 12px; background: var(--web-menu); }
.labels button { border: 0; background: transparent; min-height: 36px; padding: 0 12px; border-radius: 999px; white-space: nowrap; }
.labels button.on { background: var(--web-active); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid img, .grid .ph { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--web-menu); display: block; }
.suggest-box { padding: 16px; }
.manage-labels { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.manage-labels button.on { background: var(--accent); color: var(--accent-ink); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.photo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.photo-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photo-card .pad { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.menu-btn { width: 100%; }
.shot { width: 188px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 10px; }
.shot-frame { position: relative; height: 160px; border: 2px solid var(--bar); border-radius: 8px; overflow: hidden; background: var(--bar); }
.shot-frame img, .shot-frame .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-tools { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; }
.shot-tools button { width: 32px; height: 32px; border: 0; border-radius: 6px; background: rgba(255,255,255,.9); }
.shot .line { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.badge { color: var(--accent); font-size: 13px; }
.detail-top { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.labels-edit input { width: 120px; }
.model-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.model-card img { width: 120px; height: 90px; object-fit: cover; background: var(--paper); }
.model-card .ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.model-card .ops button, .model-card select { min-height: 36px; }
.nums { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; margin-bottom: 12px; }
.nums label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.nums input { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.margin-cross { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); grid-template-areas: "top top top" "left mid right" "bot bot bot"; gap: 6px 8px; align-items: center; margin: 0 0 12px; }
.margin-cross label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; }
.margin-cross input { width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--surface); }
.margin-cross .mc-top { grid-area: top; justify-self: center; width: 46%; }
.margin-cross .mc-bot { grid-area: bot; justify-self: center; width: 46%; }
.margin-cross .mc-left { grid-area: left; }
.margin-cross .mc-right { grid-area: right; }
.margin-cross .mc-mid { grid-area: mid; position: relative; width: 28px; height: 28px; }
.margin-cross .mc-mid::before, .margin-cross .mc-mid::after { content: ""; position: absolute; background: #8a9a90; border-radius: 1px; }
.margin-cross .mc-mid::before { left: 50%; top: 2px; bottom: 2px; width: 2px; transform: translateX(-50%); }
.margin-cross .mc-mid::after { top: 50%; left: 2px; right: 2px; height: 2px; transform: translateY(-50%); }
.area-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.area-table th, .area-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.area-table button { min-height: 32px; margin-right: 6px; }
.area-table tr.pinned td { background: #e3e5e3; }
.count-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.count-filter button { min-height: 36px; min-width: 52px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.count-filter button.on { background: var(--accent); color: var(--accent-ink); }
#memo:empty, #map:empty { display: none; }
@media (max-width: 800px) {
  .workspace { grid-template-columns: 1fr; }
  .bar { position: static; }
  nav { position: static; top: auto; height: auto; flex-direction: row; overflow-x: auto; }
  #menu { overflow: visible; }
  .global-config { margin-top: 0; flex-direction: row; align-items: center; }
  .global-config h2 { white-space: nowrap; }
  nav button { flex: 1; text-align: center; }
  .login-page { grid-template-columns: 1fr; }
  .login-side { min-height: 180px; }
  .colors { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #toast { transition: none; }
}
