:root {
  --warm-white: #fffdf9;
  --soft-cream: #f5efe6;
  --white: #ffffff;
  --warm-beige: #d8c3a5;
  --beige-hover: #cdb396;
  --charcoal: #2f2a26;
  --muted: #6b625b;
  --border: #e8ded2;
  --green: #7a9b76;
  --amber: #c49a6c;
  --red: #b66d62;
  --shadow: 0 12px 32px rgba(47, 42, 38, .055);
  font-family: Inter, Manrope, sans-serif;
  color: var(--charcoal);
  background: var(--warm-white);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--warm-white); color: var(--charcoal); font-family: Inter, Manrope, sans-serif; font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: #8c7255; text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgba(255,253,249,.94); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--charcoal); font-weight: 700; letter-spacing: .13em; text-transform: uppercase; font-size: 12px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border: 1px solid var(--warm-beige); border-radius: 50%; display: grid; place-items: center; color: #927657; font-family: 'Playfair Display', serif; font-size: 18px; letter-spacing: 0; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-note { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.main-wrap { width: min(1240px, calc(100% - 48px)); margin: 0 auto; flex: 1; padding: 54px 0 80px; }
.footer { width: min(1240px, calc(100% - 48px)); margin: auto auto 0; padding: 20px 0 26px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: #9a8f84; font-size: 11px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--charcoal); }
h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 14px; font-weight: 600; }
h1 em { color: #9d8060; font-weight: 600; }
h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 25px; line-height: 1.2; margin-bottom: 8px; font-weight: 600; }
h3 { font-size: 15px; margin-bottom: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.lead { max-width: 480px; font-size: 15px; line-height: 1.8; }
.eyebrow { color: #a58b6d; font-size: 10px; letter-spacing: .16em; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }
.button { min-height: 42px; border-radius: 11px; padding: 0 17px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; transition: background .18s ease, border-color .18s ease, transform .18s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: var(--charcoal); background: var(--warm-beige); border-color: var(--warm-beige); }
.button-primary:hover { background: var(--beige-hover); border-color: var(--beige-hover); }
.button-secondary { background: var(--white); border-color: var(--border); color: var(--charcoal); }
.button-secondary:hover, .button-quiet:hover { background: var(--soft-cream); }
.button-quiet { color: var(--muted); background: transparent; border-color: var(--border); min-height: 36px; }
.full-width { width: 100%; }
.text-button { background: none; border: 0; color: var(--muted); padding: 6px 0; font-size: 12px; }
.text-button:hover { color: var(--charcoal); }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--border); background: white; border-radius: 50%; font-size: 21px; color: var(--muted); }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.auth-layout { min-height: 580px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(30px, 8vw, 110px); max-width: 1040px; margin: 0 auto; }
.auth-copy { padding: 20px 0; }
.auth-note { display: flex; align-items: center; gap: 9px; margin-top: 34px; color: #8a7b6c; font-size: 11px; letter-spacing: .03em; }
.note-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.auth-panel { padding: 34px; }
.panel-heading { margin-bottom: 26px; }
label { display: block; color: var(--charcoal); font-size: 12px; font-weight: 600; margin-bottom: 15px; }
input, select, textarea { width: 100%; min-height: 43px; margin-top: 7px; padding: 10px 12px; color: var(--charcoal); border: 1px solid var(--border); border-radius: 9px; outline: none; background: #fff; font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: #bda17e; box-shadow: 0 0 0 3px rgba(216,195,165,.2); }
input::placeholder { color: #b3aaa0; }
.form-message { color: var(--red); font-size: 12px; min-height: 18px; margin: 10px 0; }
.field-help { display: block; margin-top: 5px; color: #968b80; font-size: 10px; font-weight: 400; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.page-heading h1 { font-size: clamp(30px, 3.5vw, 42px); }
.page-heading p { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 46px; }
.stat-card { background: var(--soft-cream); border-radius: 14px; padding: 18px 20px; min-height: 100px; }
.stat-card span { color: var(--muted); font-size: 11px; display: block; }
.stat-card strong { display: block; font-family: 'Playfair Display', serif; font-size: 29px; line-height: 1.2; margin-top: 7px; font-weight: 600; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.section-heading h2 { margin-bottom: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-card { border: 1px solid var(--border); background: white; border-radius: 15px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; cursor: pointer; }
.gallery-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery-cover { height: 150px; background: linear-gradient(135deg, #f5efe6, #e6d6c2); display: grid; place-items: center; color: #a48c6d; font-family: 'Playfair Display', serif; font-size: 36px; }
.gallery-cover img { width: 100%; height: 100%; object-fit: cover; }
.gallery-card-body { padding: 17px; }
.gallery-card-title { font-family: 'Playfair Display', serif; font-size: 19px; margin-bottom: 4px; }
.gallery-card-meta { color: var(--muted); font-size: 11px; margin-bottom: 14px; }
.gallery-card-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1ebe4; padding-top: 12px; margin-top: 12px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 30px; padding: 6px 10px; font-size: 10px; font-weight: 600; background: #f1ede8; color: #81766c; white-space: nowrap; }
.status-success { color: #557451; background: #edf3eb; }
.status-open { color: #8b704f; background: #f5ecdf; }
.status-waiting { color: #9a754a; background: #f7f0e5; }
.status-draft { color: #7e766e; background: #f1ede8; }
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed #d9cbbb; border-radius: 16px; }
.empty-icon { width: 54px; height: 54px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--soft-cream); color: #a48a68; font-size: 24px; }
.detail-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.detail-heading { align-items: center; }
.heading-actions { display: flex; gap: 9px; }
.notice { background: #f3f6f0; border: 1px solid #dce7d8; color: #587354; border-radius: 11px; padding: 12px 15px; margin: -15px 0 22px; font-size: 12px; overflow-wrap: anywhere; }
.detail-stats { display: flex; gap: 26px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; margin-bottom: 30px; }
.detail-stat strong { font-family: 'Playfair Display', serif; font-size: 21px; margin-right: 6px; }
.detail-stat span { color: var(--muted); font-size: 11px; }
.upload-panel { margin-bottom: 34px; }
.compact { align-items: center; margin-bottom: 0; }
.compact h2 { margin-bottom: 4px; }
.compact p { margin-bottom: 0; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-status { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--border); }
.upload-status-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.progress-track { width: 100%; height: 7px; border-radius: 20px; background: var(--soft-cream); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width .25s ease; }
.upload-status p { margin: 8px 0 0; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 35px; }
.photo-card { min-width: 0; border: 1px solid var(--border); background: white; border-radius: 13px; overflow: hidden; }
.photo-image-wrap { position: relative; background: var(--soft-cream); aspect-ratio: 4 / 3; overflow: hidden; }
.photo-image { display: block; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.image-error { background: #eee7de; }
.photo-card-body { padding: 11px; }
.photo-filename { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 7px; }
.photo-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.photo-actions .button { min-height: 30px; padding: 0 9px; font-size: 10px; border-radius: 8px; }
.photo-actions select { min-height: 31px; padding: 4px 7px; margin: 0; font-size: 10px; }
.photo-actions input[type=file] { display: none; }
.mini-file-label { min-height: 30px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; display: inline-flex; align-items: center; font-size: 10px; cursor: pointer; color: var(--muted); }
.publish-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; background: var(--soft-cream); box-shadow: none; }
.publish-panel h2 { margin-bottom: 5px; }
.publish-panel p { margin-bottom: 0; }
.dialog { border: 1px solid var(--border); border-radius: 18px; padding: 0; width: min(600px, calc(100% - 30px)); max-width: 600px; box-shadow: 0 24px 80px rgba(47,42,38,.18); }
.dialog::backdrop { background: rgba(47,42,38,.35); backdrop-filter: blur(3px); }
.dialog-form { padding: 27px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.dialog-heading h2 { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 12px; }
.client-body { background: #fffdf9; }
.client-main { max-width: 1160px; }
.client-hero { text-align: center; padding: 45px 15px 40px; border-bottom: 1px solid var(--border); margin-bottom: 38px; }
.client-hero h1 { font-size: clamp(36px, 5vw, 56px); }
.client-hero .status-pill { margin-top: 15px; }
.client-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.client-toolbar h2 { margin-bottom: 5px; }
.selection-counter { min-width: 110px; text-align: right; }
.selection-counter strong { display: block; font-family: 'Playfair Display', serif; font-size: 31px; line-height: 1; }
.selection-counter span { font-size: 10px; color: var(--muted); }
.client-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.client-photo-grid .photo-image-wrap { aspect-ratio: 1 / 1; }
.favorite-button { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,253,249,.93); color: #8c7863; font-size: 17px; box-shadow: 0 2px 8px rgba(47,42,38,.1); }
.favorite-button.selected { background: #9b755e; color: white; }
.selected-label { position: absolute; left: 10px; top: 10px; background: rgba(255,253,249,.94); border-radius: 20px; padding: 4px 8px; font-size: 9px; color: #745e49; }
.submit-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 17px; background: rgba(255,253,249,.96); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 28px rgba(47,42,38,.09); }
.submit-bar p { margin: 0; }
.client-progress { max-width: 680px; margin: 40px auto; padding: 30px; }
.client-progress h2 { margin-bottom: 7px; }
.client-progress .progress-track { margin-top: 20px; }
.client-message { min-height: 450px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.client-message h2 { margin-bottom: 8px; }
.loader { width: 30px; height: 30px; border: 3px solid var(--soft-cream); border-top-color: var(--warm-beige); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.setup-wrap { display: grid; place-items: start center; }
.setup-panel { width: min(520px, 100%); padding: 32px; }
.setup-panel h1 { font-size: 34px; }
.setup-panel > p { margin-bottom: 22px; }
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid, .client-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-layout { gap: 35px; }
}
@media (max-width: 640px) {
  .topbar { height: 62px; padding: 0 18px; }
  .topbar-note { display: none; }
  .main-wrap { width: calc(100% - 32px); padding: 32px 0 55px; }
  .footer { width: calc(100% - 32px); gap: 10px; font-size: 10px; }
  .auth-layout { display: flex; flex-direction: column; align-items: stretch; gap: 18px; min-height: 0; }
  .auth-copy { padding: 10px 0 0; }
  .auth-copy h1 { font-size: 39px; }
  .auth-copy .lead { font-size: 13px; }
  .auth-note { margin-top: 15px; }
  .auth-panel { padding: 23px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 26px; }
  .page-heading .button { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 34px; }
  .stat-card { min-height: 82px; padding: 13px; }
  .stat-card strong { font-size: 25px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-cover { height: 130px; }
  .detail-heading { flex-direction: column; align-items: flex-start; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; padding: 0 9px; font-size: 10px; }
  .detail-stats { gap: 14px; flex-wrap: wrap; }
  .compact { align-items: flex-start; flex-direction: column; }
  .compact .file-button { width: 100%; }
  .photo-grid, .client-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-card-body { padding: 9px; }
  .photo-actions .button { flex: 1; }
  .publish-panel { flex-direction: column; align-items: stretch; }
  .publish-panel .button { width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .dialog-form { padding: 21px; }
  .client-hero { padding: 24px 5px 28px; margin-bottom: 28px; }
  .client-toolbar { align-items: flex-start; }
  .selection-counter { min-width: 70px; }
  .submit-bar { align-items: stretch; flex-direction: column; bottom: 8px; }
  .submit-bar .button { width: 100%; }
  .client-progress { padding: 22px; }
}
