:root {
  color-scheme: light;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  color: #252b22;
  background: #f8f7f2;
  --ink: #252b22;
  --green: #285a42;
  --line: #dbded4;
  --muted: #576153;
  --paper: #fffefa;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #a34b27; outline-offset: 3px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { max-width: 76rem; margin: auto; padding: 1rem clamp(1.15rem, 4vw, 3.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { font: 700 2rem/1 Georgia, serif; letter-spacing: -.075em; color: var(--ink); text-decoration: none; }
.wordmark span { color: #a34b27; }
nav { display: flex; gap: clamp(.65rem, 3vw, 1.6rem); align-items: center; flex-wrap: wrap; justify-content: end; font-size: .9rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, .text-button:hover { text-decoration: underline; }
main { max-width: 76rem; margin: auto; padding: clamp(2rem, 6vw, 4.5rem) clamp(1.15rem, 4vw, 3.5rem) 4rem; }
h1, h2 { margin: 0 0 1rem; font-family: Georgia, serif; font-weight: normal; letter-spacing: -.045em; line-height: 1.08; }
h1 { font-size: clamp(2.3rem, 7vw, 5.25rem); }
h2 { font-size: 2rem; }
.empty { color: var(--muted); border-block: 1px solid var(--line); padding: 2rem 0; }
.auth { max-width: 32rem; margin: auto; }
.auth h1 { font-size: clamp(2rem, 6vw, 3rem); }
.panel { padding: clamp(1.15rem, 4vw, 2rem); border: 1px solid var(--line); background: var(--paper); border-radius: .9rem; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid #aab1a5; background: white; border-radius: .4rem; padding: .65rem .75rem; color: inherit; font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; background: var(--green); color: white; border: 1px solid transparent; border-radius: .45rem; font: 600 .95rem/1.25 "Segoe UI", system-ui, sans-serif; padding: .7rem 1rem; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #174631; }
.text-button { color: var(--green); background: transparent; padding: 0; }
.text-button:hover { background: transparent; }
.alert { padding: .75rem 1rem; background: #fff1ea; color: #792c14; border-radius: .45rem; }
.notice { color: var(--green); }
.vitrine-title { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.catalog-grid, .object-list { padding: 0; margin: 0; list-style: none; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: clamp(1rem, 3vw, 1.65rem); }
.catalog-grid:has(> :nth-child(1):last-child) { grid-template-columns: minmax(0, 23rem); }
.card { display: block; height: 100%; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; }
.card:hover { border-color: var(--green); }
.card img, .gallery img, .photo-options img { display: block; width: 100%; background: #eeeee6; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; }
.card-info { padding: 1rem 1.2rem 1.25rem; }
.card h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: .7rem 0 .4rem; overflow-wrap: anywhere; }
.status { display: inline-block; width: fit-content; white-space: nowrap; border-radius: 1rem; background: #eceee8; color: #485144; padding: .16rem .64rem; font-size: .8rem; font-weight: 600; }
.status.disponivel { color: #1a5538; background: #e0efe4; }
.status.reservado { color: #6e451c; background: #f5e9d7; }
.status.vendido { color: #653e38; background: #f1e5e1; }
.price { color: var(--green); font-weight: 650; }
.back { display: inline-block; margin-bottom: 1.1rem; }
.listing { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1rem, 5vw, 4rem); align-items: start; }
.listing-info { grid-column: 2; grid-row: 1; overflow-wrap: anywhere; }
.listing-info h1 { font-size: clamp(2.25rem, 5vw, 4.2rem); margin-top: .6rem; }
.listing .price { font-size: 1.5rem; margin: 0; }
.sku, small { color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.description { white-space: pre-wrap; }
.gallery { grid-column: 1; grid-row: 1; display: grid; gap: 1rem; }
.gallery img { max-height: 42rem; object-fit: contain; border-radius: .85rem; }
.page-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.page-title h1 { font-size: clamp(2.25rem, 6vw, 3.6rem); margin: 0; }
.contact { margin-bottom: 2.25rem; }
.inline-form { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; }
.inline-form label { width: min(100%, 21rem); }
.object-list { border-top: 1px solid var(--line); }
.object-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .45fr) auto; gap: .65rem 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: .8rem .2rem; }
.object-list a { overflow-wrap: anywhere; }
.tags, .actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.edit-form { max-width: 60rem; }
.edit-actions { margin-top: 1.15rem; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: .9rem; }
textarea { resize: vertical; }
input[readonly] { background: #efefe9; }
input[type="radio"], input[type="checkbox"] { width: auto; accent-color: var(--green); }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .5rem; }
legend { font-weight: 650; }
.photo-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 1rem; }
.photo-options img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: .3rem; margin-bottom: .35rem; }
.photo-options label, #new-cover label { display: block; font-weight: 400; font-size: .88rem; }
.secondary { color: var(--green); background: transparent; border-color: #9ca99b; }
.secondary:hover { color: #123c22; background: #e9eee7; }
.danger { color: #822f22; }

@media (max-width: 42rem) {
  .listing, .fields { grid-template-columns: minmax(0, 1fr); }
  .listing-info, .gallery { grid-area: auto; }
  .object-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .object-list .tags { grid-column: 1 / -1; }
}
