@font-face {
  font-family: "Cormorant";
  src: url("/assets/cormorant-garamond-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #242723;
  --muted: #5e645b;
  --line: #d6d8cd;
  --paper: #f7f6f1;
  --white: #fffefa;
  --accent: #344839;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
a { color: inherit; text-underline-offset: .25em; }
:focus-visible { outline: 3px solid #747f40; outline-offset: 4px; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 2; background: var(--white); padding: .8rem; }
.skip:focus { top: 1rem; }
.site-header {
  min-height: 76px; padding: .9rem clamp(1.2rem, 5vw, 5rem);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand, h1, h2 { font-family: "Cormorant", Georgia, serif; font-weight: 500; letter-spacing: -.035em; }
.brand { font-size: clamp(1.4rem, 2vw, 1.9rem); text-decoration: none; }
.header-actions, .actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.header-actions { gap: 1.6rem; }
.header-actions a, .text-button { font-size: .89rem; font-weight: 550; }
.text-button { border: 0; background: transparent; padding: .5rem 0; color: inherit; text-decoration: underline; text-underline-offset: .25em; }
.primary, .secondary, .danger-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
  border-radius: 4px; padding: .65rem 1.15rem; font-weight: 570; font-size: .92rem;
}
.primary { background: var(--accent); border: 1px solid var(--accent); color: white; }
.primary:hover { background: #273a2a; }
.secondary { background: var(--white); color: var(--ink); border: 1px solid #b9beb0; }
.secondary:not(:disabled):hover { background: #edf0e7; }
.danger { color: #893929; }
.danger-button { border: 1px solid #873226; background: #873226; color: white; }
.startup { max-width: 68rem; margin: 3rem auto; padding: 0 1.5rem; }
.login-panel { max-width: 26rem; margin: clamp(3rem, 13vh, 8rem) auto; padding: 0 1.25rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.06; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1; }
.login-panel h1 { margin-bottom: 2rem; font-size: 3.5rem; }
.form-stack { display: grid; gap: 1rem; }
label { display: block; font-size: .91rem; font-weight: 570; }
input, textarea {
  display: block; width: 100%; margin-top: .4rem; padding: .75rem .85rem;
  border: 1px solid #b9beb0; background: var(--white); border-radius: 3px; color: var(--ink); font-size: 1rem;
}
input[type="file"] { font-size: .88rem; overflow: hidden; }
input::file-selector-button { margin-right: .7rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--ink); }
textarea { resize: vertical; min-height: 3.4rem; }
.optional, .hint, .subtitle { color: var(--muted); font-weight: 400; }
.hint { font-size: .82rem; line-height: 1.4; margin-top: -.65rem; }
.subtitle { font-size: .94rem; margin-top: .6rem; }
.message { color: var(--accent); font-size: .92rem; line-height: 1.5; }
.message.error { color: #8b3026; }
.message:empty { display: none; }
.studio { width: min(72rem, calc(100% - 2.5rem)); margin: 2rem auto 5rem; }
.sections { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.sections button { position: relative; padding: .65rem 0 .85rem; border: 0; color: var(--muted); font-weight: 550; background: transparent; }
.sections button[aria-current="page"] { color: var(--accent); }
.sections button[aria-current="page"]::after { content: ""; height: 2px; background: currentColor; position: absolute; inset: auto 0 -1px; }
.section-head { margin: 2.8rem 0 1.6rem; display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.empty { background: var(--white); border: 1px dashed #bcc2b4; padding: 2rem; border-radius: 4px; color: var(--muted); }
.photos, .inquiries { margin: 1rem 0 0; padding: 0; list-style: none; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 1rem; }
.photo-card { border: 1px solid var(--line); background: var(--white); border-radius: 3px; overflow: hidden; }
.photo-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e2e4dc; }
.photo-meta { display: grid; gap: .7rem; padding: 1rem; }
.photo-meta h3, .inquiry h3 { overflow-wrap: anywhere; font-size: 1rem; line-height: 1.45; }
.photo-tools { display: flex; gap: .5rem; align-items: center; }
.photo-tools .edit { margin-right: auto; }
.photo-tools .move { padding: .5rem .7rem; min-width: 40px; }
.inquiries { display: grid; gap: .85rem; }
.inquiry { padding: 1.1rem 1.3rem; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.inquiry-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; }
.inquiry time { font-size: .82rem; color: var(--muted); }
.inquiry a, .inquiry .body { overflow-wrap: anywhere; }
.inquiry a { display: inline-block; margin-top: .25rem; font-size: .91rem; }
.inquiry .body { line-height: 1.55; margin-top: .9rem; white-space: pre-wrap; }
dialog {
  width: min(32rem, calc(100% - 1.5rem)); max-height: min(90dvh, 56rem); overflow: auto;
  border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper);
  padding: clamp(1.1rem, 3vw, 1.8rem); box-shadow: 0 12px 60px #18201e30;
}
dialog::backdrop { background: #17201ae0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.5rem; }
.edit-preview { display: block; max-width: 100%; height: 8.5rem; object-fit: contain; margin: 0 auto 1.2rem; }
.separate { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.confirmation p { font-size: .93rem; margin-bottom: .75rem; }
#edit-status { margin-top: 1rem; }
@media (max-width: 520px) {
  .site-header { min-height: 62px; padding: .75rem 1.1rem; }
  .header-actions { gap: .75rem; }
  .header-actions a, .header-actions button { font-size: .79rem; }
  .studio { width: calc(100% - 2rem); margin-top: 1rem; }
  .section-head { margin-top: 2rem; }
  .actions { gap: .45rem; }
  .primary, .secondary, .danger-button { padding: .65rem .8rem; }
}
