* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, 'Segoe UI', Arial, sans-serif; background: #f6f5f3; color: #1d1d1f; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; background: #fff; border-bottom: 1px solid #e6e2dc; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.privacy-badge { font-size: 13px; background: #eef7ee; color: #256d2f; border-radius: 999px; padding: 5px 12px; }
.screen { max-width: 1080px; margin: 0 auto; padding: 28px 20px 120px; }
h1 { font-size: 30px; margin: 10px 0; }
h2 { font-size: 24px; } h3 { margin: 4px 0 10px; }
.lead { font-size: 17px; line-height: 1.6; max-width: 760px; }
.muted { color: #6b6b70; font-size: 14px; }
button { font: inherit; cursor: pointer; }
.primary { background: #1d4ed8; color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; }
.primary.big { font-size: 18px; padding: 14px 26px; margin: 14px 0; }
.primary:hover { background: #1e40af; }
.mini { border: 1px solid #cfcac2; background: #fff; border-radius: 8px; padding: 5px 12px; }
.mini.on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.hidden { display: none !important; }
.warn { background: #fdecea; color: #9b1c1c; padding: 10px 14px; border-radius: 8px; margin: 10px 0; font-size: 14px; }
.bullets { line-height: 2; margin-top: 18px; }
.bar { background: #e7e3dd; height: 12px; border-radius: 8px; overflow: hidden; margin: 14px 0 8px; }
.bar-fill { background: #1d4ed8; height: 100%; width: 0; transition: width .2s; }
.card { background: #fff; border: 1px solid #e6e2dc; border-radius: 14px; padding: 16px 18px; margin: 16px 0; }
.n-input { width: 110px; font-size: 18px; padding: 6px 10px; }
.face-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.face-chip { width: 108px; border: 2px solid #e2ded8; border-radius: 12px; padding: 6px; text-align: center; cursor: pointer; background: #fff; }
.face-chip.on { border-color: #1d4ed8; background: #eef2ff; }
.face-chip img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.face-num { font-weight: 700; font-size: 13px; }
.face-meta { font-size: 11px; color: #6b6b70; }
.face-couple { font-size: 11px; color: #9a3412; }
.mode-toggle { display: flex; gap: 8px; margin-bottom: 10px; }
.quota-row { display: grid; grid-template-columns: 1fr 90px 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #eee; }
.quota-name { font-weight: 700; }
.quota-detect { font-size: 12px; color: #6b6b70; }
.quota-input { width: 80px; padding: 5px 8px; font-size: 16px; }
.quota-exact { font-size: 13px; color: #1d4ed8; font-weight: 700; }
.quota-warn { grid-column: 1 / -1; background: #fff7ed; color: #9a3412; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.quota-total { font-weight: 800; margin-top: 10px; }
.quota-total.bad { color: #b91c1c; }
.split-row { display: flex; gap: 18px; }
.split-row input { width: 70px; }
.tabs { display: flex; gap: 8px; margin: 14px 0; }
.tab-btn { border: 1px solid #cfcac2; background: #fff; padding: 7px 18px; border-radius: 999px; }
.tab-btn.on { background: #1d1d1f; color: #fff; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ph-card { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid #e2ded8; background: #fff; }
.ph-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.ph-cat { font-size: 11px; padding: 4px 6px; color: #444; }
.ph-score { position: absolute; top: 6px; left: 6px; background: #1d4ed8; color: #fff; border-radius: 999px; font-size: 11px; padding: 2px 8px; font-weight: 700; }
.vid-row { display: flex; gap: 12px; background: #fff; border: 1px solid #e6e2dc; border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.vid-row img { width: 130px; border-radius: 8px; }
.vid-name { font-weight: 700; }
.vid-meta { font-size: 13px; color: #555; }
.vid-reason { font-size: 13px; color: #1d4ed8; }
.search { width: 100%; padding: 10px; font-size: 15px; margin-bottom: 10px; border: 1px solid #d8d3ca; border-radius: 10px; }
.cat-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px solid #eee; font-size: 13px; }
.cat-row.sel .cat-name { font-weight: 700; color: #1d4ed8; }
.cat-desc { color: #666; }
.panel { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 20; }
.panel-box { background: #fff; border-radius: 16px; padding: 18px; max-width: 560px; width: 92%; max-height: 88vh; overflow: auto; position: relative; }
.pp-img { width: 100%; border-radius: 10px; }
.close { position: absolute; top: 10px; left: 10px; border: 0; background: #eee; border-radius: 999px; width: 30px; height: 30px; }
.alt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.alt-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.alt-thumb:hover { border-color: #1d4ed8; }
.sticky-bottom { position: fixed; bottom: 0; right: 0; left: 0; background: #fff; border-top: 1px solid #e6e2dc; padding: 12px; text-align: center; z-index: 6; }
.summary { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 16px; line-height: 2; }
#export-summary .muted { direction: ltr; display: inline-block; }
@media (max-width: 640px) { .quota-row { grid-template-columns: 1fr 70px 70px; } }
