:root { color-scheme: light; --ink: #203b34; --muted: #69776f; --green: #245b48; --line: #e1e6dd; --paper: #fafbf7; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f3f5ef; color: var(--ink); font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a56b22; outline-offset: 4px; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1360px; margin: auto; padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 750; letter-spacing: -1px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--green); color: white; border-radius: 10px; font: italic 28px Georgia, serif; }
.brand-description { margin-left: 22px; padding-left: 24px; border-left: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 1.6px; }
.topbar-note { font-size: 12px; color: var(--muted); }
main { max-width: 1360px; margin: 0 auto; padding: 46px 40px 24px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(36px, 4vw, 52px); line-height: 1.15; letter-spacing: -2px; font-weight: 600; margin: 9px 0 12px; }
h2 { font-size: 19px; font-weight: 650; letter-spacing: -.5px; }
h3 { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.heading-dot { color: #77a378; }
.muted, small { color: var(--muted); }
.eyebrow, .subtle-label { font-size: 10px; letter-spacing: 1.6px; font-weight: 700; color: var(--muted); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
button { cursor: pointer; border: 0; border-radius: 8px; transition: background .15s, box-shadow .15s; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 25px; padding: 11px 19px; font-size: 13px; font-weight: 650; }
.primary { background: var(--green); color: white; }
.primary:hover { background: #173f31; }
.secondary { background: var(--paper); border: 1px solid #d4dccf; color: var(--ink); }
.secondary:hover { background: #e7eddf; }
button:disabled { opacity: .6; cursor: wait; }
.library-summary { display: flex; align-items: center; gap: 28px; margin: 30px 0 24px; padding: 15px 0; border-block: 1px solid #dce3d5; font-size: 13px; color: var(--muted); }
.library-summary strong { color: var(--ink); margin-right: 5px; }
.library-summary a { margin-left: auto; font-weight: 650; text-decoration: none; color: var(--green); }
.face-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.face-management { min-width: 0; display: grid; gap: 24px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 3px 8px #23382a03; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.library-panel > .panel-heading, .image-preview > .panel-heading { padding: 21px 24px; border-bottom: 1px solid var(--line); }
.person-row { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-heading { display: flex; gap: 12px; align-items: center; }
.person-avatar { display: grid; place-items: center; width: 39px; height: 39px; background: #e6ecdf; border-radius: 50%; color: #476641; font-size: 17px; font-family: Georgia, serif; }
.photo-count { font-size: 12px; }
.thumbnails { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.thumbnail { padding: 3px; margin: 0; background: transparent; border: 2px solid transparent; line-height: 0; border-radius: 10px; }
.thumbnail img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.thumbnail:hover { background: #e1e9dc; }
.thumbnail[aria-pressed="true"] { border-color: var(--green); background: #e1e9dc; }
.empty-library { text-align: center; padding: 38px 20px; }
.empty-library p { color: var(--muted); font-size: 13px; margin: 8px 0 16px; }
.empty-symbol { display: inline-grid; place-items: center; width: 48px; height: 48px; background: #eaf0e3; border-radius: 15px; font-size: 25px; margin-bottom: 15px; }
.text-link { font-size: 13px; font-weight: 650; color: var(--green); text-underline-offset: 4px; }
.upload-panel { padding: 24px; scroll-margin-top: 20px; }
.upload-panel > p { font-size: 13px; margin: 10px 0 22px; max-width: 440px; }
.step-badge { font-size: 22px; color: #78916c; }
label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 7px; }
input:not([type="hidden"]) { width: 100%; min-width: 0; border: 1px solid #d6ddd0; border-radius: 8px; background: #fff; color: var(--ink); padding: 11px 13px; }
input::placeholder { color: #889282; }
small { display: block; font-size: 11px; margin-top: 6px; }
.file-field { border: 1px dashed #b8c8af; border-radius: 10px; margin: 21px 0; padding: 18px; background: #f1f5eb; }
.file-field label { margin-bottom: 0; }
.file-field p { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
input[type="file"] { font-size: 12px; padding: 0; background: transparent; border: 0; border-radius: 0; }
input::file-selector-button { border: 1px solid #cad6c1; background: var(--paper); color: var(--ink); padding: 8px 12px; border-radius: 6px; margin-right: 12px; cursor: pointer; }
.upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.upload-footer > span { font-size: 11px; max-width: 190px; }
.upload-footer button { flex-shrink: 0; }
#status:not(:empty) { margin-top: 15px; font-size: 13px; }
.image-preview { position: sticky; top: 24px; }
.preview-stage { display: grid; place-items: center; min-height: 350px; background: #eaf0e5; padding: 22px; background-image: radial-gradient(#71866625 .7px, transparent .7px); background-size: 12px 12px; }
#preview-placeholder { text-align: center; color: #63765b; }
#preview-placeholder p { font-size: 13px; margin-top: 8px; }
.preview-frame { display: inline-grid; place-items: center; width: 78px; height: 92px; border: 1px solid #a8b89e; border-radius: 22px; margin-bottom: 22px; transform: rotate(-6deg); background: #f2f6ed; }
.preview-frame span { width: 28px; height: 35px; border: 1px solid #92a984; border-radius: 50% 50% 45% 45%; position: relative; }
.preview-frame span::after { content: ''; position: absolute; width: 42px; height: 17px; border: 1px solid #92a984; border-bottom: 0; border-radius: 50% 50% 0 0; left: -8px; top: 40px; }
#preview-image { width: 100%; max-height: 65vh; object-fit: contain; border-radius: 6px; }
.preview-caption { padding: 20px 24px; border-top: 1px solid var(--line); }
#preview-caption { margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
.page-footer { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 18px; color: var(--muted); font-size: 11px; }
.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 90px; max-width: 1000px; margin: 65px auto; }
.login-intro h1 { font: 64px/1.08 Georgia, serif; letter-spacing: -2px; margin: 18px 0 24px; }
.login-intro p { color: var(--muted); font-size: 14px; }
.login-panel { padding: 36px; }
.login-panel h2 { font-size: 25px; margin-top: 10px; }
.login-panel > p { font-size: 13px; margin: 10px 0 27px; }
.login-submit { width: 100%; margin-top: 24px; justify-content: space-between; }
.error-message { color: #9b382b; background: #faede8; padding: 10px; border-radius: 6px; font-size: 13px; margin-top: 12px; }
.login-decoration { display: flex; gap: 12px; margin-top: 38px; }
.login-decoration span { width: 35px; height: 7px; border-radius: 4px; background: #bacaaa; }
.login-decoration span:nth-child(2) { background: #d0dbc6; }
.login-decoration span:nth-child(3) { background: #e1e8da; }
@media (max-width: 900px) { .subtle-label { display: none; } .login-layout { gap: 35px; } .login-intro h1 { font-size: 50px; } }
@media (max-width: 700px) {
  .topbar-inner { padding: 16px 20px; } .brand-description, .topbar-note { display: none; }
  main { padding: 28px 18px 20px; } .face-layout { grid-template-columns: minmax(0, 1fr); }
  .image-preview { position: static; } .library-summary { flex-wrap: wrap; gap: 10px 20px; }
  .library-summary a { margin-left: 0; } .page-header { align-items: start; }
  .page-header .muted { max-width: 235px; font-size: 13px; } .secondary { gap: 10px; padding: 9px 13px; }
  .upload-panel, .person-row { padding: 20px; } .preview-stage { min-height: 270px; }
  .upload-footer { align-items: start; flex-direction: column; } .upload-footer > span { max-width: none; }
  .page-footer { gap: 20px; } .page-footer span { text-align: right; }
  .login-layout { grid-template-columns: 1fr; margin: 20px auto; gap: 30px; max-width: 440px; }
  .login-intro h1 { font-size: 46px; } .login-decoration { display: none; } .login-panel { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } button { transition: none; } }
