/* ── AR Menu design system ─────────────────────────────────
   Professional light theme: warm paper ground, ink primary,
   restrained brass accent. Inter for UI, Fraunces for display. */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/fraunces-600.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/fraunces-700.woff2') format('woff2'); }

:root {
  --bg:        #f6f5f1;
  --surface:   #ffffff;
  --surface2:  #f1efe9;
  --surface3:  #e9e6de;
  --line:      #e3e0d7;
  --line-dark: #d4d0c4;

  --ink:       #191713;
  --ink-soft:  #33302a;
  --muted:     #6d675c;
  --dim:       #9b9488;

  --brass:     #8f6b2e;
  --brass-hi:  #a87f3a;
  --brass-bg:  #f4ecdd;

  --green:     #2f6b4f;
  --green-bg:  #e7f0ea;
  --red:       #a33d2c;
  --red-bg:    #f7e9e5;
  --amber:     #93641c;
  --amber-bg:  #f6eeda;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(25, 23, 19, 0.05);
  --shadow:    0 1px 3px rgba(25, 23, 19, 0.07), 0 8px 24px rgba(25, 23, 19, 0.06);
  --shadow-lg: 0 4px 12px rgba(25, 23, 19, 0.08), 0 20px 48px rgba(25, 23, 19, 0.14);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: 'Fraunces', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brass); }
button { font-family: inherit; }

::selection { background: var(--brass-bg); }

/* ── typography ── */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; color: var(--ink); }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brass);
}
.muted { color: var(--muted); }
.dim   { color: var(--dim); }
.small { font-size: 13px; }

/* ── icons ── */
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.18em; }
.ic-lg { width: 1.5em; height: 1.5em; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; letter-spacing: -0.006em;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none; line-height: 1.25; white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: #2c2924; }
.btn-ghost {
  background: var(--surface); color: var(--ink-soft);
  border-color: var(--line-dark);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface2); border-color: var(--dim); }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(163,61,44,0.35); }
.btn-danger:hover:not(:disabled) { background: var(--red-bg); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-sm svg { width: 13.5px; height: 13.5px; }
.btn-block { width: 100%; }

/* ── forms ── */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); margin-bottom: 6px;
}
.field .hint { font-size: 12.5px; color: var(--dim); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 13px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
  font-size: 14.5px; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(25,23,19,0.07);
}
textarea { resize: vertical; min-height: 80px; }
.input-row { display: flex; gap: 12px; }
.input-row > * { flex: 1; }

/* ── cards & layout ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card h3 { font-size: 16px; margin-bottom: 3px; }
.card .card-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }

/* ── badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
}
.badge svg { width: 11px; height: 11px; }
.badge-gold  { background: var(--brass-bg); color: var(--brass); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red   { background: var(--red-bg);   color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-dim   { background: var(--surface2); color: var(--muted); }

/* ── toast ── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translate(-50%, 80px);
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 900;
  opacity: 0; transition: transform 0.3s, opacity 0.3s;
  pointer-events: none; max-width: min(90vw, 480px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

/* ── modal ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(25, 23, 19, 0.4); backdrop-filter: blur(3px);
  display: none; align-items: flex-end; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto;
  padding: 26px 24px 34px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.32, 0.9, 0.45, 1);
}
@keyframes slideUp { from { transform: translateY(48px); opacity: 0.5; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 18px; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h3 { font-size: 18px; }
.modal-x {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-x:hover { background: var(--surface2); color: var(--ink); }
.modal-x svg { width: 15px; height: 15px; }

/* ── spinner & skeleton ── */
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid var(--surface3); border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 48px 20px; text-align: center; }
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── empty state ── */
.empty {
  text-align: center; padding: 44px 24px;
  border: 1.5px dashed var(--line-dark); border-radius: var(--radius);
  color: var(--muted); background: var(--surface);
}
.empty .empty-icon {
  width: 44px; height: 44px; margin: 0 auto 12px;
  border-radius: 12px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; color: var(--dim);
}
.empty .empty-icon svg { width: 20px; height: 20px; }
.empty p { margin-bottom: 16px; font-size: 14px; }

/* model-viewer ships a thin progress bar pinned to the top edge of every
   viewer. On a page with one viewer per dish that reads as a row of stray
   bars, so it is suppressed and each card shows its own centred spinner. */
model-viewer::part(default-progress-bar) { display: none !important; }

/* ── progress bar ── */
.progress { height: 6px; background: var(--surface3); border-radius: 50px; overflow: hidden; }
.progress > div {
  height: 100%; width: 0%;
  background: var(--ink);
  border-radius: 50px; transition: width 0.2s;
}

/* ── dropzone ── */
.dropzone {
  border: 1.5px dashed var(--line-dark); border-radius: var(--radius);
  padding: 30px 20px; text-align: center; cursor: pointer;
  color: var(--muted); transition: border-color 0.15s, background 0.15s;
  position: relative; background: var(--surface);
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--ink); background: var(--surface2); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon {
  width: 42px; height: 42px; margin: 0 auto 10px;
  border-radius: 12px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
}
.dropzone .dz-icon svg { width: 19px; height: 19px; }
.dropzone .dz-main { font-weight: 600; color: var(--ink); font-size: 14px; }
.dropzone .dz-sub { font-size: 12.5px; color: var(--dim); margin-top: 4px; }

/* ── notice boxes ── */
.warn-box, .ok-box, .err-box {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13px; margin-top: 12px; line-height: 1.5;
}
.warn-box svg, .ok-box svg, .err-box svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1.5px; }
.warn-box { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(147,100,28,0.25); }
.ok-box   { background: var(--green-bg); color: var(--green); border: 1px solid rgba(47,107,79,0.25); }
.err-box  { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(163,61,44,0.25); }

/* ── utility ── */
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ── shared brand mark ── */
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 17px; height: 17px; }
/* The brand mark is artwork, not a stroked icon: the image carries its own
   ground, so it drops the dark tile the other icons sit on. */
.logo-mark[data-icon="logo"] {
  background: url("/img/logo.png") center / cover no-repeat;
}
.logo-mark[data-icon="logo"] svg { display: none; }
