:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --white: #fffefa;
  --ink: #232a25;
  --muted: #777a72;
  --green: #304d3c;
  --line: #e8e5dc;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #778f68; outline-offset: 3px; }

.site-header { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(calc((100vw - 1200px) / 2), 6.1vw); border-bottom: 1px solid rgba(48, 77, 60, .08); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font: 600 21px var(--serif); }
.brand-copy { display: grid; gap: 3px; letter-spacing: 1.65px; }
.brand-copy strong { font-size: 11px; font-weight: 700; }
.brand-copy small { color: var(--muted); font-size: 8px; letter-spacing: 2.05px; }
.header-actions { display: flex; align-items: center; gap: 25px; }
.admin-link { color: var(--green); font-size: 12px; font-weight: 600; }
.admin-link span { margin-left: 5px; }
.table-label { color: var(--muted); font-size: 12px; }

.hero { position: relative; min-height: 530px; max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 54px max(calc((100vw - 1200px) / 2), 6.1vw) 66px; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; padding-bottom: 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-size: 9px; letter-spacing: 1.7px; font-weight: 700; }
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: #83917e; }
.hero h1 { margin: 22px 0 16px; font: 500 clamp(43px, 5.2vw, 68px)/1.12 var(--serif); letter-spacing: -1.6px; }
.hero h1 em { color: var(--green); font-weight: 500; }
.hero-copy > p { max-width: 380px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.hero-cta { display: inline-flex; align-items: center; gap: 22px; margin-top: 30px; padding: 13px 17px; background: var(--green); color: white; font-size: 11px; font-weight: 600; }
.hero-cta span { font-size: 16px; }
.hero-image { width: min(100%, 495px); height: 395px; justify-self: end; background: #d7d1c4 url("https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1100&q=85") center 52% / cover; border-radius: 48% 48% 3px 3px; }
.hero-note { position: absolute; z-index: 1; right: 3.2%; bottom: 83px; color: var(--green); font-size: 9px; line-height: 1.7; letter-spacing: 1.5px; text-align: center; }

.menu-section { max-width: 1200px; margin: 0 auto; padding: 46px 0 83px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 26px; }
.section-heading h2, .admin-intro h1 { margin: 10px 0 0; font: 500 42px/1.1 var(--serif); letter-spacing: -.7px; }
.search-box { width: 235px; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); background: var(--white); color: var(--muted); }
.search-box > span { font-size: 23px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-box input::placeholder { color: #a1a198; }
.category-nav { display: flex; gap: 9px; padding: 0 0 21px; overflow-x: auto; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; padding: 9px 16px; border: 1px solid var(--line); background: transparent; color: #6d716b; cursor: pointer; font-size: 11px; transition: .2s ease; }
.category-chip:hover, .category-chip.active { border-color: var(--green); background: var(--green); color: white; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.menu-card { display: grid; grid-template-columns: 102px 1fr; gap: 15px; min-height: 128px; padding: 12px; border: 1px solid var(--line); background: var(--white); transition: transform .2s ease, box-shadow .2s ease; }
.menu-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37, 45, 37, .06); }
.menu-card img { width: 102px; height: 102px; object-fit: cover; background: #eeece4; }
.menu-card-copy { display: flex; flex-direction: column; min-width: 0; padding: 4px 2px 3px 0; }
.menu-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.menu-card h3 { margin: 0; font: 600 14px/1.35 var(--serif); }
.menu-price { flex: 0 0 auto; color: var(--green); font-size: 12px; font-weight: 700; }
.menu-card p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.featured-tag { align-self: flex-start; margin-top: auto; padding-top: 7px; color: #8c7555; font-size: 8px; letter-spacing: .75px; text-transform: uppercase; }
.empty-state { padding: 45px 20px; color: var(--muted); text-align: center; font-size: 13px; }
.menu-footnote { margin: 19px 0 0; color: #898a81; font-size: 10px; }
.site-footer { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px max(calc((100vw - 1200px) / 2), 6.1vw); border-top: 1px solid var(--line); }
.site-footer > span, .back-top { color: var(--muted); font-size: 10px; }
.back-top { color: var(--green); }

.admin-page { min-height: 100vh; }
.admin-header { background: var(--paper); }
.admin-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.admin-status span { width: 7px; height: 7px; border-radius: 50%; background: #6e9a68; }
.admin-main { max-width: 1100px; margin: auto; padding: 53px 28px 30px; }
.admin-intro { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.admin-intro h1 { font-size: 39px; }
.admin-intro p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.admin-toolbar { display: flex; align-items: center; gap: 9px; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; cursor: pointer; font-size: 10px; font-weight: 600; white-space: nowrap; }
.button-light { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-light:hover { border-color: #b7c1b4; }
.button-dark { background: var(--green); color: white; }
.button-dark:hover { background: #263d30; }
.import-button { position: relative; }
.import-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.storage-notice { display: flex; align-items: flex-start; gap: 11px; margin-top: 28px; padding: 13px 15px; border: 1px solid #e8e4d7; background: #f2f0e8; }
.notice-icon { flex: 0 0 17px; width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #827a61; border-radius: 50%; color: #716951; font: 600 10px var(--serif); }
.storage-notice p { margin: 0; color: #77766c; font-size: 10px; line-height: 1.65; }
.storage-notice strong { color: #4b5148; }
.admin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 17px 0 36px; }
.summary-card { padding: 15px 17px; border: 1px solid var(--line); background: var(--white); }
.summary-card span { display: block; color: var(--muted); font-size: 10px; }
.summary-card strong { display: block; margin-top: 8px; font: 600 25px/1 var(--serif); }
.admin-product-section { border-top: 1px solid var(--line); padding-top: 22px; }
.admin-list-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.admin-list-heading h2 { margin: 0; font: 500 24px var(--serif); }
.admin-search { width: 205px; height: 36px; }
.admin-product-list { display: grid; }
.admin-row { display: grid; grid-template-columns: 58px minmax(150px, 1fr) 120px 88px 140px; align-items: center; gap: 15px; min-height: 80px; padding: 10px 12px; border: 1px solid var(--line); border-bottom: 0; background: var(--white); }
.admin-row:last-child { border-bottom: 1px solid var(--line); }
.admin-row img { width: 58px; height: 58px; object-fit: cover; background: #eeece4; }
.admin-product-name { min-width: 0; }
.admin-product-name strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-product-name small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-category { color: var(--muted); font-size: 10px; }
.admin-price { font-size: 11px; font-weight: 700; }
.admin-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.icon-button { min-width: 34px; height: 32px; border: 1px solid var(--line); background: var(--white); color: #51594f; cursor: pointer; font-size: 11px; }
.icon-button:hover { border-color: #aeb8a9; }
.icon-button.delete:hover { border-color: #cfaaa0; color: #a44737; }
.admin-bottom { display: flex; justify-content: space-between; padding: 20px 0 0; color: var(--muted); font-size: 10px; }
.admin-bottom a { color: var(--green); }

.product-dialog { width: min(520px, calc(100vw - 28px)); max-height: min(90vh, 760px); padding: 0; border: 0; background: var(--paper); color: var(--ink); box-shadow: 0 20px 80px rgba(24, 31, 25, .22); }
.product-dialog::backdrop { background: rgba(25, 32, 27, .48); backdrop-filter: blur(2px); }
.product-form { padding: 25px 28px 24px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 21px; }
.dialog-heading h2 { margin: 8px 0 0; font: 500 28px var(--serif); }
.close-dialog { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; font-size: 20px; line-height: 1; }
.form-field { display: grid; gap: 7px; margin-bottom: 15px; color: #575d55; font-size: 10px; font-weight: 600; }
.form-field input, .form-field textarea, .form-field select { width: 100%; min-height: 40px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); font-size: 12px; font-weight: 400; resize: vertical; }
.form-field textarea { min-height: 76px; }
.form-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; }
.image-field { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.image-field .form-field { margin-bottom: 3px; }
.image-field .form-field input { border: 0; padding: 0; background: transparent; }
.image-field small { color: var(--muted); font-size: 9px; }
.image-field img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); background: var(--white); }
.checkbox-field { display: flex; align-items: center; gap: 8px; margin-top: 17px; color: #555b53; font-size: 10px; }
.checkbox-field input { accent-color: var(--green); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 5; max-width: calc(100vw - 40px); padding: 12px 16px; background: var(--green); color: white; font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1250px) {
  .menu-section { margin: 0 6.1vw; }
}
@media (max-width: 900px) {
  .hero { min-height: 475px; }
  .hero-image { height: 345px; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-intro { align-items: flex-start; flex-direction: column; }
  .admin-toolbar { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 72px; }
  .site-header { height: 68px; padding: 0 20px; }
  .brand { gap: 8px; }
  .brand-mark { width: 31px; height: 31px; font-size: 19px; }
  .brand-copy { letter-spacing: 1.2px; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy small { font-size: 7px; }
  .header-actions { gap: 12px; }
  .header-actions .admin-link { font-size: 10px; }
  .table-label { font-size: 10px; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 27px; padding: 52px 20px 45px; }
  .hero h1 { margin-top: 17px; font-size: clamp(43px, 12vw, 59px); }
  .hero-copy > p { max-width: 330px; font-size: 12px; }
  .hero-cta { margin-top: 22px; }
  .hero-image { justify-self: center; width: 88%; height: 280px; border-radius: 48% 48% 3px 3px; }
  .hero-note { right: 6px; bottom: 81px; font-size: 7px; }
  .menu-section { margin: 0; padding: 40px 20px 58px; scroll-margin-top: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 20px; }
  .section-heading h2 { font-size: 37px; }
  .search-box { width: 100%; }
  .category-nav { margin-right: -20px; }
  .menu-grid { grid-template-columns: 1fr; gap: 10px; }
  .menu-card { grid-template-columns: 88px 1fr; gap: 12px; min-height: 112px; padding: 10px; }
  .menu-card img { width: 88px; height: 90px; }
  .menu-card h3 { font-size: 13px; }
  .menu-card p { margin-top: 6px; font-size: 9px; }
  .site-footer { flex-wrap: wrap; gap: 13px; padding: 18px 20px; }
  .site-footer > span { order: 3; width: 100%; }
  .admin-status { display: none; }
  .admin-main { padding: 38px 18px 25px; }
  .admin-intro h1 { font-size: 34px; }
  .admin-toolbar { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .admin-toolbar .button { width: 100%; }
  .admin-toolbar .button-dark { grid-column: 1 / -1; }
  .admin-summary { gap: 7px; margin-bottom: 28px; }
  .summary-card { padding: 12px 10px; }
  .summary-card span { font-size: 8px; }
  .summary-card strong { font-size: 22px; }
  .admin-list-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .admin-search { width: 100%; }
  .admin-row { grid-template-columns: 47px minmax(80px, 1fr) auto; gap: 10px; padding: 9px; }
  .admin-row img { width: 47px; height: 47px; }
  .admin-category { display: none; }
  .admin-price { grid-column: 3; grid-row: 1; align-self: start; padding-top: 3px; }
  .admin-row-actions { grid-column: 2 / 4; justify-content: flex-start; margin-top: -3px; }
  .icon-button { min-width: 31px; height: 28px; }
  .product-form { padding: 21px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .admin-bottom { gap: 10px; font-size: 9px; }
}

.logout-button { min-height: 34px; padding: 0 11px; }
.login-main { min-height: calc(100vh - 82px); display: grid; place-items: center; padding: 40px 20px; }
.login-card { width: min(100%, 410px); padding: 35px; border: 1px solid var(--line); background: var(--white); }
.login-card h1 { margin: 16px 0 8px; font: 500 36px/1.15 var(--serif); }
.login-card > p:not(.login-error) { margin: 0 0 25px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.login-card .form-field { margin-bottom: 16px; }
.login-error { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #e6c6bd; background: #fbefec; color: #8c3d30; font-size: 11px; line-height: 1.5; }
.login-submit { width: 100%; margin-top: 5px; }
.login-back { display: block; margin-top: 20px; color: var(--green); font-size: 10px; text-align: center; }

@media (max-width: 600px) {
  .login-main { min-height: calc(100vh - 68px); padding: 25px 18px; }
  .login-card { padding: 27px 22px; }
  .logout-button { min-height: 31px; padding: 0 8px; font-size: 9px; }
}

.category-dialog { width: min(560px, calc(100vw - 28px)); }
.category-form { padding: 25px 28px 24px; }
.category-help { margin: -7px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.category-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.category-entry .form-field { margin-bottom: 0; }
.category-entry .button { min-height: 40px; }
.category-entry #cancel-category-edit { grid-column: 2; }
.category-list { max-height: min(330px, 45vh); margin-top: 21px; overflow-y: auto; border-top: 1px solid var(--line); }
.category-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 59px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.category-row strong { display: block; font-size: 12px; }
.category-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.category-row-actions { display: flex; flex-shrink: 0; gap: 6px; }
.category-row-actions .icon-button:disabled { cursor: not-allowed; opacity: .5; }

@media (max-width: 600px) {
  .category-form { padding: 21px 20px; }
  .category-entry { grid-template-columns: 1fr 1fr; }
  .category-entry .form-field { grid-column: 1 / -1; }
  .category-entry #cancel-category-edit { grid-column: auto; }
}
