:root {
  color-scheme: dark;
  --purple: #390c49;
  --purple-deep: #24002f;
  --purple-shadow: #1b0027;
  --turquoise: #16c9be;
  --lime: #9cdb3e;
  --pink: #e915a2;
  --orange: #ff9f21;
  --yellow: #ffd232;
  --white: #fffdf8;
  --muted: #f0dff1;
  --line: #693075;
  --danger: #ffb5cb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--purple); color: var(--white); font-family: 'DM Sans', sans-serif; }
body.dialog-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.display-font { font-family: 'Fraunces', Georgia, serif; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.site-header { border-bottom: 2px solid rgba(255,255,255,.12); background: var(--purple); }
.header-inner, .brand-lockup, .header-actions, .footer-inner { display: flex; align-items: center; }
.header-inner { justify-content: space-between; gap: 18px; min-height: 100px; padding-block: 12px; }
.brand-lockup { min-width: 0; gap: 16px; }
.brand-mark { display: grid; width: 76px; aspect-ratio: 1; flex: 0 0 auto; place-items: center; padding: 0; overflow: hidden; cursor: pointer; border: 2px solid var(--turquoise); border-radius: 22px; background: var(--purple); box-shadow: 4px 4px 0 var(--pink); }
.brand-mark span { display: grid; width: 48px; aspect-ratio: 1; place-items: center; border: 5px solid var(--yellow); border-radius: 50% 42% 48% 38%; color: var(--white); font: 800 34px 'Fraunces', Georgia, serif; transform: rotate(-9deg); }
.brand-copy { display: grid; gap: 4px; min-width: 0; }
.brand-name { font-size: 23px; font-weight: 700; line-height: 1.15; }
.brand-subtitle { color: var(--turquoise); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.header-actions { gap: 12px; }
.header-tag { padding: 8px 14px; border: 2px solid var(--turquoise); border-radius: 999px; color: var(--yellow); font-size: 13px; font-weight: 700; white-space: nowrap; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: .58; }
.button-primary { background: var(--yellow); color: var(--purple); }
.button-secondary { border-color: #95659f; background: var(--purple); color: var(--white); }
.button-outline { border-color: var(--turquoise); background: transparent; color: var(--white); }
.button-small { min-height: 36px; padding: 7px 10px; font-size: 13px; }

.hero-section { padding-top: 28px; }
.hero-panel { position: relative; isolation: isolate; display: flex; min-height: 390px; align-items: center; overflow: hidden; border: 2px solid var(--lime); border-radius: 30px; background: var(--purple-deep); }
.hero-image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.16); }
.hero-panel::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(28,0,39,.97) 0%, rgba(28,0,39,.91) 38%, rgba(28,0,39,.35) 76%, rgba(28,0,39,.18) 100%); content: ''; }
.hero-panel::after { position: absolute; z-index: -1; right: -165px; bottom: -225px; width: 350px; height: 350px; border-radius: 48%; background: var(--pink); box-shadow: -42px -20px 0 var(--orange); content: ''; transform: rotate(-28deg); }
.hero-art { position: absolute; z-index: 0; width: 260px; height: 165px; border: 22px solid var(--lime); border-radius: 50%; pointer-events: none; transform: rotate(-22deg); }
.hero-art-top { top: -105px; left: -85px; }
.hero-art-bottom { bottom: -98px; left: 35%; width: 270px; height: 135px; border-color: var(--turquoise); transform: rotate(-16deg); }
.hero-copy { position: relative; z-index: 1; width: min(670px, 100%); padding: 54px 48px; animation: reveal .55s ease both; }
.eyebrow { color: var(--turquoise); font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.hero-copy .eyebrow { color: var(--lime); font-size: 13px; }
.hero-copy h1 { margin: 16px 0; font-size: 43px; font-weight: 700; line-height: 1.09; }
.hero-copy p { max-width: 500px; margin: 0; font-size: 18px; line-height: 1.6; }
.hero-strokes { display: flex; align-items: center; gap: 8px; margin-top: 26px; }
.hero-strokes span { height: 12px; border-radius: 999px; background: var(--turquoise); }
.hero-strokes span:nth-child(1) { width: 48px; }
.hero-strokes span:nth-child(2) { width: 28px; background: var(--pink); }
.hero-strokes span:nth-child(3) { width: 16px; background: var(--lime); }

.menu-section { padding-top: 54px; padding-bottom: 72px; }
.menu-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.section-title h2 { margin: 7px 0 9px; color: var(--yellow); font-size: 28px; }
.title-rule { display: block; width: 128px; height: 6px; border-radius: 99px; background: var(--pink); }
.search-field { width: min(330px, 100%); }
.search-field label, .form-field label, .form-stack > label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.search-field input, .form-field input, .form-field textarea, .form-field select, .form-stack input { width: 100%; min-height: 48px; padding: 10px 13px; border: 2px solid var(--turquoise); border-radius: 12px; outline: none; background: var(--white); color: var(--purple); }
.search-field input { border-radius: 16px; font-size: 16px; }
.search-field input:focus, .form-field input:focus, .form-field textarea:focus, .form-field select:focus, .form-stack input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(156,219,62,.17); }
.filter-nav { display: flex; gap: 9px; overflow-x: auto; margin: 0 0 18px; padding: 0 2px 12px; scrollbar-color: var(--turquoise) var(--purple-deep); }
.filter-button { flex: 0 0 auto; min-height: 44px; padding: 9px 18px; border: 2px solid rgba(255,255,255,.28); border-radius: 999px; background: var(--purple); color: var(--white); cursor: pointer; font-weight: 700; transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease; }
.filter-button:hover { transform: translateY(-2px); border-color: var(--turquoise); }
.filter-button.is-active { border-color: var(--yellow); background: var(--yellow); color: var(--purple); }
.menu-status { min-height: 0; margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.menu-status:not([hidden]) { min-height: 22px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-top: 5px solid var(--turquoise); border-radius: 20px; background: var(--purple); box-shadow: 0 6px 16px rgba(14,0,20,.14); transition: transform .2s ease, box-shadow .2s ease; animation: reveal .36s ease both; }
.product-card:nth-child(6n+2) { border-top-color: var(--orange); }
.product-card:nth-child(6n+3) { border-top-color: var(--pink); }
.product-card:nth-child(6n+4) { border-top-color: var(--lime); }
.product-card:nth-child(6n+5) { border-top-color: var(--yellow); }
.product-card:nth-child(6n+6) { border-top-color: var(--turquoise); }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 35px rgba(0,0,0,.28); }
.product-image { display: block; width: 100%; height: 208px; object-fit: cover; background: var(--purple-deep); }
.product-image.image-failed { visibility: hidden; }
.product-content { padding: 18px; }
.product-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.product-title { margin: 0; color: var(--white); font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.product-price { flex: 0 0 auto; color: var(--yellow); font-size: 16px; font-weight: 800; text-align: right; }
.product-description { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.availability-badge { display: inline-block; margin-top: 12px; color: var(--yellow); font-size: 13px; font-weight: 800; }
.empty-state { padding: 44px 12px; color: var(--muted); text-align: center; }

.site-footer { border-top: 4px solid var(--pink); background: var(--purple-shadow); }
.footer-inner { min-height: 82px; justify-content: space-between; gap: 16px; padding-block: 18px; }
.footer-brand { color: var(--yellow); font-size: 18px; font-weight: 700; }
.footer-note { color: var(--muted); font-size: 13px; }

.overlay { position: fixed; z-index: 20; inset: 0; display: none; align-items: center; justify-content: center; overflow-y: auto; padding: 18px; background: rgba(12,0,20,.84); }
.overlay.is-open { display: flex; }
.dialog { width: min(920px, 100%); max-height: min(92vh, 950px); overflow-y: auto; padding: clamp(18px, 4vw, 32px); border: 2px solid var(--turquoise); border-radius: 20px; background: var(--purple); box-shadow: 0 24px 80px #100016; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; color: var(--yellow); font-size: 26px; }
.icon-close { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid #95659f; border-radius: 10px; background: transparent; color: var(--white); cursor: pointer; font-size: 28px; line-height: 1; }
.dialog-intro { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }
.form-stack { display: grid; gap: 10px; }
.form-stack .button { margin-top: 8px; }
.login-status { min-height: 22px; margin: 12px 0 0; color: var(--danger); font-size: 14px; }
.admin-toolbar { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid #693075; }
.admin-status { min-height: 20px; margin: 0; color: var(--lime); font-size: 14px; }
.admin-status.is-error { color: var(--danger); }
.admin-toolbar-actions, .editor-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.admin-editor { margin: 16px 0 20px; padding: 18px; border: 1px solid var(--lime); border-radius: 14px; background: rgba(27,0,39,.45); }
.editor-title { margin: 0 0 16px; color: var(--yellow); font-size: 21px; }
.admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-field { min-width: 0; }
.form-field-wide { grid-column: 1 / -1; }
.form-field textarea { min-height: 84px; resize: vertical; }
.form-field input[type=file] { min-height: auto; padding: 8px; color: var(--purple); }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.image-preview { display: block; max-width: 100%; max-height: 190px; margin-top: 12px; border-radius: 10px; object-fit: contain; }
.availability-control { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.availability-control input { width: 18px; height: 18px; accent-color: var(--turquoise); }
.admin-list { padding-top: 2px; }
.admin-category { margin: 22px 0 8px; color: var(--yellow); font-size: 20px; }
.admin-empty { margin: 0; color: var(--muted); font-size: 14px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #390c49; }
.admin-row-name { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.qr-dialog { display: grid; width: min(420px, 100%); justify-items: center; text-align: center; }
.qr-dialog .dialog-heading { width: 100%; text-align: left; }
.qr-dialog .dialog-intro { margin: 0 0 16px; }
#qr-canvas { width: min(280px, 100%); height: auto; padding: 10px; border-radius: 10px; background: white; image-rendering: pixelated; }
#qr-download { margin-top: 16px; }

@keyframes reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1120px); }
  .header-inner { min-height: 82px; }
  .brand-lockup { gap: 12px; }
  .brand-mark { width: 58px; border-radius: 16px; }
  .brand-mark span { width: 39px; border-width: 4px; font-size: 28px; }
  .brand-name { font-size: 18px; }
  .brand-subtitle { font-size: 8px; letter-spacing: .12em; }
  .header-actions { gap: 7px; }
  .header-tag { display: none; }
  .button-outline { padding-inline: 10px; font-size: 13px; }
  .hero-section { padding-top: 16px; }
  .hero-panel { min-height: 360px; border-radius: 24px; }
  .hero-panel::before { background: linear-gradient(90deg, rgba(28,0,39,.94), rgba(28,0,39,.58)); }
  .hero-panel::after { right: -115px; bottom: -140px; width: 210px; height: 210px; }
  .hero-art-bottom { left: 20%; }
  .hero-copy { padding: 38px 24px; }
  .hero-copy h1 { max-width: 400px; font-size: 36px; }
  .hero-copy p { max-width: 360px; font-size: 16px; }
  .menu-section { padding-top: 40px; padding-bottom: 54px; }
  .menu-heading-row { align-items: stretch; flex-direction: column; gap: 20px; margin-bottom: 22px; }
  .search-field { width: 100%; }
  .product-grid { grid-template-columns: 1fr; gap: 15px; }
  .product-image { height: 220px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
  .admin-fields { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .admin-row { align-items: flex-start; flex-direction: column; }
  .admin-row-actions { width: 100%; }
  .admin-row-actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
