@font-face { font-family: 'Cormorant Garamond'; src: url('../assets/fonts/cormorant-garamond-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../assets/fonts/lato-regular-latin.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../assets/fonts/lato-bold-latin.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
:root { color-scheme: light; font-family: 'Lato', Arial, Helvetica, sans-serif; color: #241b16; background: #f7f2eb; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; line-height: 1.5; }
a { color: #634322; }
a:hover { color: #2b1b0e; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #bc863a; outline-offset: 3px; }
.admin-shell { width: min(100% - 32px, 1100px); margin-inline: auto; }
.admin-header { background: #1d1510; color: #f8ebd3; border-bottom: 2px solid #bd8b4c; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 78px; padding-block: 12px; }
.admin-brand { margin-right: auto; color: #f8ebd3; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.35rem; font-weight: 600; text-decoration: none; }
.admin-brand span { display: block; color: #d7b983; font: 600 .64rem Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.admin-header nav { display: flex; flex-wrap: wrap; gap: 4px 15px; }
.admin-header nav a, .text-button { display: inline-flex; align-items: center; min-height: 42px; color: #f4e4cc; font-size: .85rem; text-decoration: none; }
.admin-header nav a:hover, .text-button:hover { color: #ffe3a2; }
.admin-header form { margin: 0; }
.text-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
main.admin-shell { padding-block: 30px 70px; }
.page-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title h1, .panel h1 { margin: 2px 0 8px; font: 600 clamp(2rem, 5vw, 2.8rem)/1.04 'Cormorant Garamond', Georgia, serif; }
.page-title p { margin: 0; color: #6a5a4b; }
.eyebrow { margin: 0; color: #916738 !important; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.panel { margin-bottom: 20px; padding: clamp(20px, 4vw, 34px); border: 1px solid #e0cfb7; border-radius: 14px; background: #fffdf9; box-shadow: 0 8px 30px rgba(59, 37, 19, .055); }
.panel.narrow { max-width: 590px; margin: 40px auto; }
.panel h2 { margin: 0 0 16px; font: 600 1.7rem 'Cormorant Garamond', Georgia, serif; }
.panel p { max-width: 72ch; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 1px solid #a97732; border-radius: 8px; background: #b88642; color: #1f150c; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { background: #d4a65f; color: #1f150c; }
.button--danger { border-color: #8d2828; background: #a53636; color: white; }
.button--danger:hover { background: #872323; color: white; }
.button--secondary { border-color: #725332; background: #f5e7d2; color: #3b2918; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.notice { padding: 12px 16px; border-radius: 8px; }
.notice--error { border: 1px solid #d1a3a0; background: #fff1f0; color: #8c2623; }
.notice--success { border: 1px solid #9cb893; background: #edf7e9; color: #285728; }
label { display: block; margin: 16px 0 6px; font-size: .84rem; font-weight: 700; }
label span { color: #9a332d; }
input:not([type='checkbox']):not([type='file']), select, textarea { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c9bba9; border-radius: 7px; background: white; color: #241b16; }
input[type='file'] { display: block; width: 100%; min-height: 44px; padding: 8px 0; }
textarea { min-height: 100px; resize: vertical; }
small { display: block; margin-top: 5px; color: #6b5b4b; }
.form-grid, .notes-grid { display: grid; gap: 2px 22px; }
.form-grid > div, .notes-grid > div { min-width: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; }
.form-help { color: #665647; font-size: .86rem; }
.current-photo { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 20px; padding: 10px; border: 1px solid #e0cfb7; border-radius: 9px; }
.current-photo img { max-width: 160px; max-height: 160px; object-fit: contain; }
.current-photo span { color: #705f4d; font-size: .72rem; }
.current-photo[hidden] { display: none !important; }
.current-photo--detail { display: flex; width: min(100%, 520px); }
.current-photo--detail img { display: block; width: 100%; max-width: 480px; max-height: 520px; height: auto; object-fit: contain; border-radius: 8px; }
.current-photo.is-marked-for-removal { border-color: #a53636; background: #fff1f0; opacity: .72; }
.image-upload-panel { margin-block: 24px; padding: clamp(16px, 3vw, 24px); border: 1px solid #caa774; border-radius: 12px; background: #fffaf2; }
.image-upload-panel h2 { margin: 0 0 6px; font: 600 clamp(1.45rem, 4vw, 1.85rem)/1.1 'Cormorant Garamond', Georgia, serif; }
.file-selection-status { min-height: 1.4em; color: #5d4936; font-weight: 700; overflow-wrap: anywhere; }
.confirm-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; }
.confirm-row input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px 10px; border-bottom: 1px solid #ecdfd0; vertical-align: top; }
th { color: #6f5740; font-size: .73rem; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: .89rem; }
.row-actions { white-space: nowrap; }
.row-actions a { display: inline-flex; align-items: center; min-height: 40px; margin-right: 14px; }
.danger-link { color: #a53636; }
.empty-admin { text-align: center; }
.empty-admin p { margin-inline: auto; }
.brand-form { display: grid; align-items: end; gap: 16px; }
.brand-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.brand-row { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: center; gap: 8px 12px; min-height: 92px; padding: 10px; border: 1px solid #eadaca; border-radius: 8px; }
.brand-row img { width: 60px; height: 50px; object-fit: contain; background: white; }
.brand-row strong { font-size: .81rem; }
.brand-row__placeholder { display: grid; place-items: center; width: 60px; height: 50px; border: 1px dashed #cbb79e; border-radius: 6px; color: #7b6856; font-size: .68rem; }
.brand-row__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid #eee1d2; padding-top: 7px; }
.brand-row__actions a { display: inline-flex; align-items: center; min-height: 34px; font-size: .78rem; }
.appearance-layout { display: grid; gap: 20px; align-items: start; }
.visit-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.visit-number { display: block; color: #916738; font-size: 2.8rem; line-height: 1.2; overflow-wrap: anywhere; }
.appearance-fields { min-width: 0; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; }
.color-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 9px 10px; border: 1px solid #e6d7c4; border-radius: 8px; background: #fff; }
.color-field input { width: 42px; height: 34px; padding: 0; border: 0; background: transparent; }
.range-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 20px; margin-top: 14px; }
.range-grid label { margin-top: 10px; }
.range-grid label span { display: flex; justify-content: space-between; color: inherit; }
input[type='range'] { width: 100%; accent-color: #ad7835; }
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 18px; }
.toggle-grid .confirm-row { margin-top: 5px; }
.sticky-actions { position: sticky; z-index: 4; bottom: 10px; display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid #d6c2aa; border-radius: 12px; background: rgba(255,253,249,.96); box-shadow: 0 8px 28px rgba(40,24,12,.14); backdrop-filter: blur(8px); }
.theme-preview { position: sticky; top: 18px; min-width: 0; overflow: hidden; padding: 18px; border: 1px solid #cfa45e; border-radius: 16px; background-color: var(--preview-bg-color, #f0dfc7); background-image: linear-gradient(rgba(255,255,255,calc(1 - var(--preview-opacity, .42))), rgba(255,255,255,calc(1 - var(--preview-opacity, .42)))), var(--preview-bg-image); background-size: cover; box-shadow: 0 18px 42px rgba(54,32,15,.16); }
.theme-preview__hero { padding: 24px; border-radius: 12px; background: linear-gradient(135deg, var(--preview-primary, #211712), #100b09); color: #fff; }
.theme-preview__hero small { color: var(--preview-accent, #d8af68); text-transform: uppercase; letter-spacing: .12em; }
.theme-preview__hero h2 { margin: 7px 0; color: var(--preview-accent, #d8af68); font-family: var(--preview-title-font, 'Cormorant Garamond'); font-size: 2.25rem; line-height: .95; }
.theme-preview__hero p { margin-bottom: 9px; font-family: var(--preview-body-font, 'Lato'); }
.theme-preview__hero button { min-height: 42px; margin-top: 8px; padding: 8px 15px; border: 0; border-radius: 99px; background: var(--preview-button, #d8af68); color: var(--preview-button-text, #20140b); font-family: var(--preview-ui-font, 'Lato'); font-weight: 700; }
.theme-preview__card { margin-top: 14px; padding: 18px; border: 1px solid var(--preview-border, #a27946); border-radius: 12px; background: var(--preview-card, #fffaf1); color: var(--preview-text, #17110e); }
.theme-preview__card h3 { margin: 4px 0; color: var(--preview-titles, #211712); font-family: var(--preview-title-font, 'Cormorant Garamond'); font-size: 1.8rem; }
.theme-preview__card p { font-family: var(--preview-body-font, 'Lato'); font-size: .84rem; }
.theme-preview__card strong { color: var(--preview-link, #8c6332); }
.reset-theme { border-color: #d9aa9f; }
.link-admin-list { display: grid; gap: 14px; margin-bottom: 28px; }
.link-admin-row { min-width: 0; padding: 14px 18px 20px; border: 1px solid #dfcdb7; border-radius: 10px; }
.link-admin-row legend { padding-inline: 8px; font-family: 'Cormorant Garamond'; font-size: 1.3rem; font-weight: 600; }
.inline-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.inline-actions .confirm-row { margin-top: 10px; }
.backup-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.backup-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid #eadaca; border-radius: 8px; }
code { padding: .1em .35em; border-radius: 4px; background: #f0e6d9; }
@media (min-width: 650px) { .form-grid, .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .brand-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } }
@media (min-width: 850px) { .notes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .appearance-layout { grid-template-columns: minmax(0, 1fr) 330px; } }
@media (max-width: 700px) {
  .admin-shell { width: min(100% - 20px, 1100px); }
  .header-row { align-items: flex-start; }
  .admin-header nav { order: 3; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .admin-header nav a { padding: 4px 8px; border: 1px solid rgba(220,184,126,.2); border-radius: 6px; }
  .panel { padding: 18px 14px; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .table-wrap tr { margin-bottom: 12px; padding: 10px; border: 1px solid #e5d4c0; border-radius: 9px; }
  .table-wrap td { padding: 6px 4px; border: 0; }
  .row-actions { white-space: normal; }
  .sticky-actions { bottom: 5px; }
}

.photo-framing-preview { width:200px; aspect-ratio:1 / 1.08; overflow:hidden; display:grid; place-items:center; background:#f5ead9; }
.photo-framing-preview img { width:100%; height:100%; max-width:none; max-height:none; padding:8%; object-fit:contain; }

summary { cursor:pointer; min-height:44px; padding:10px 0; }
input,select,textarea { max-width:100%; min-width:0; }
.panel,fieldset { min-width:0; overflow-wrap:anywhere; }
.row-actions { white-space:normal; }
.row-actions a,.brand-row__actions a,.admin-header nav a { min-height:44px; }
@media(max-width:640px) {
 .table-wrap { overflow:visible; }
 table,tbody,tr,td { display:block; width:100%; }
 thead { display:none; }
 tr { border:1px solid #d8c4a5; border-radius:10px; padding:8px; margin-bottom:14px; }
 td { padding:7px 4px; border:0; overflow-wrap:anywhere; }
 td::before { content:attr(data-label); display:block; font-weight:700; color:#705638; font-size:.75rem; }
 .button { max-width:100%; white-space:normal; }
  .image-upload-panel { padding: 14px 12px; }
  .image-upload-panel input[type='file'] { min-height: 48px; }
  .current-photo--detail { width: 100%; }
}

#qr-canvas { display:block; width:min(100%,360px); height:auto; margin:20px 0; image-rendering:pixelated; }

@media(max-width:430px){.color-grid{grid-template-columns:1fr}.color-field{min-height:48px}.color-field input{flex-shrink:0}.color-field span{overflow-wrap:normal}}

.category-admin-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:20px}.category-admin-card{min-width:0;border:1px solid #c4aa7c;padding:20px;border-radius:14px}.category-admin-card img{width:100%;height:180px;object-fit:contain}.category-choices{min-width:0;border:1px solid #c4aa7c;border-radius:10px;padding:16px}.category-choices .confirm-row{margin:8px 0;}

.video-admin-row{border:1px solid #c4aa7c;border-radius:12px;padding:16px;margin:16px 0;min-width:0;}

.color-field input[type='color']{width:48px;min-width:48px;max-width:48px;flex:0 0 48px;padding:0;min-height:36px;height:36px}.color-field span{min-width:0;overflow-wrap:anywhere}.sticky-actions{flex-wrap:wrap}

