:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #66736c;
  --paper: #f4f1ea;
  --surface: #fffdf8;
  --line: #d8d3c7;
  --accent: #244e3c;
  --accent-soft: #e2ebe5;
  --danger: #8c2f2f;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 70px rgb(23 32 28 / 10%); }
.login-card img { width: 76px; height: 76px; object-fit: contain; }
.login-card h1 { margin: 8px 0 10px; font: 600 32px/1.15 Georgia, serif; }
.login-card p { color: var(--muted); line-height: 1.65; }

label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: white; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(36 78 60 / 12%); }
.login-card label { margin: 24px 0 16px; }

.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 750; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; transform: none; cursor: wait; }
.button.primary { border-color: var(--accent); background: var(--accent); color: white; }
.button.ghost { background: transparent; }
.login-card .button { width: 100%; }
.status { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.app { min-height: 100vh; padding-bottom: 92px; }
.topbar { height: 86px; padding: 14px clamp(18px, 4vw, 54px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgb(255 253 248 / 92%); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand h1 { margin: 3px 0 0; font: 600 23px/1.1 Georgia, serif; }
.topbar-actions { display: flex; gap: 10px; }

.workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; max-width: 1500px; margin: 0 auto; padding: 28px clamp(18px, 4vw, 54px); }
.sidebar { align-self: start; display: grid; gap: 20px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; position: sticky; top: 114px; }
.dropzone { min-height: 170px; padding: 24px 16px; place-items: center; align-content: center; text-align: center; border: 1px dashed #9daaa3; border-radius: 14px; background: #f7faf7; cursor: pointer; transition: .2s ease; }
.dropzone.is-dragging { background: var(--accent-soft); border-color: var(--accent); transform: scale(1.01); }
.dropzone input { display: none; }
.dropzone strong { color: var(--ink); font-size: 15px; }
.dropzone small { font-weight: 500; line-height: 1.5; }
.progress { height: 7px; overflow: hidden; background: #e5e5df; border-radius: 999px; }
.progress div { width: 0; height: 100%; background: var(--accent); transition: width .2s ease; }
.guide { padding: 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; }
.guide p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }

.content { min-width: 0; }
.content-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.content-heading h2 { margin: 6px 0 0; font: 600 32px/1.1 Georgia, serif; }
.save-state { padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 750; }
.save-state.is-dirty { background: #f7e7c5; color: #745112; }
.empty { padding: 50px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; background: rgb(255 253 248 / 55%); }
.empty h3 { margin: 0 0 8px; }
.empty p { color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.photo-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgb(23 32 28 / 5%); cursor: grab; }
.photo-card.is-dragging { opacity: .45; }
.photo-card.is-drop-target { outline: 3px solid rgb(36 78 60 / 25%); }
.photo-image { position: relative; aspect-ratio: 4 / 3; background: #e8e5de; }
.photo-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cover-badge { position: absolute; top: 10px; left: 10px; padding: 6px 9px; border-radius: 999px; background: rgb(23 32 28 / 82%); color: white; font-size: 11px; font-weight: 800; }
.photo-fields { display: grid; gap: 10px; padding: 14px; }
.photo-fields input { padding: 9px 10px; font-size: 13px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.mini-button { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: white; cursor: pointer; font-size: 12px; font-weight: 700; }
.mini-button.danger { color: var(--danger); }

.actionbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; min-height: 72px; padding: 12px clamp(18px, 4vw, 54px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgb(255 253 248 / 94%); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.actionbar p { margin: 0; color: var(--muted); font-size: 13px; }
.actionbar div { display: flex; gap: 10px; }

@media (max-width: 820px) {
  .topbar { height: auto; align-items: flex-start; }
  .brand h1 { font-size: 19px; }
  .topbar-actions .button:first-child { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .actionbar { align-items: stretch; flex-direction: column; }
  .actionbar div { display: grid; grid-template-columns: 1fr 1fr 1.2fr; }
  .actionbar .button { padding-inline: 10px; font-size: 12px; }
  .app { padding-bottom: 126px; }
}

[hidden] { display: none !important; }
