/* ==========================================================================
   Müşteri sayfası (QR / NFC ile açılan sayfa)
   Mekânın kendi rengi --accent ile gelir; Dokun markası alt köşede kalır.
   ========================================================================== */

body.is-guest { background: color-mix(in srgb, var(--accent) 5%, var(--tile)); }

.g-app {
  width: 100%;
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 1rem calc(1.25rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* Üst şerit */
.g-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: calc(0.85rem + env(safe-area-inset-top)) 0 0.5rem;
}
.g-logo {
  width: 46px; height: 46px; flex: none; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: 1.3rem; font-stretch: 85%;
}
.g-logo img { width: 100%; height: 100%; object-fit: cover; }
.g-top-right { display: flex; align-items: center; gap: 0.5rem; }
.g-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 34px; padding: 0 0.75rem;
  border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  font-size: var(--fs-s); font-weight: 650; white-space: nowrap;
}
.g-table-chip { font-family: var(--font-hand); color: var(--pen); font-size: 1.3rem; font-weight: 600; border-style: dashed; border-color: var(--line-2); }
.g-lang { min-height: 34px; padding: 0 0.7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 700; font-size: var(--fs-s); }

/* Kapak + başlık */
.g-cover { margin: 0.4rem 0 0.2rem; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 16 / 7; background: var(--line); }
.g-cover img { width: 100%; height: 100%; object-fit: cover; }
.g-hero { padding: 0.9rem 0 1.1rem; }
.g-venue {
  font-size: clamp(2.3rem, 11vw, 3.35rem);
  line-height: 0.96;
  font-weight: 780;
  font-stretch: 86%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.g-tagline { margin-top: 0.6rem; color: var(--ink-2); font-size: 1.05rem; line-height: 1.4; max-width: 34ch; }

/* İndirim kartı */
.g-deal {
  background: var(--paper);
  border-radius: var(--r-xl);
  padding: 1.1rem 1.1rem 1rem;
  box-shadow: var(--shadow-1);
}
.g-deal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.g-deal-head p:first-child { font-weight: 650; color: var(--ink-2); }
.g-deal-pct { font-size: 2.25rem; line-height: 1; font-weight: 800; font-stretch: 85%; letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.g-deal-pct span { font-size: 1.05rem; font-weight: 650; color: var(--ink-3); margin-left: 0.2rem; }
.g-meter { display: flex; gap: 4px; height: 10px; margin: 0.8rem 0 0.75rem; }
.g-meter span { flex: 1 1 0; border-radius: 999px; background: var(--line); transition: background-color 0.35s var(--ease); }
.g-meter span.is-done { background: var(--accent); }
.g-deal-hint { color: var(--ink-2); font-size: var(--fs-s); }
.g-deal-example { margin-top: 0.35rem; font-size: var(--fs-s); color: var(--ink-3); }
.g-deal-example s { color: var(--ink-3); }
.g-deal-example strong { color: var(--bole); font-weight: 700; }

/* Görev butonları */
.g-tasks { display: grid; gap: 0.6rem; margin-top: 0.75rem; }
.g-task {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.85rem;
  width: 100%; min-height: 74px; padding: 0.8rem 0.9rem;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--paper);
  text-align: left; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s, background-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
a.g-task:hover { border-color: var(--line-2); }
.g-task-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 11%, transparent); color: var(--accent);
}
.g-task-title { font-weight: 680; font-size: 1.04rem; line-height: 1.25; }
.g-task-sub { font-size: var(--fs-s); font-weight: 600; color: var(--bole); margin-top: 0.1rem; }
.g-task-end { color: var(--ink-3); }
.g-task.is-done { background: var(--turq-wash); border-color: transparent; }
.g-task.is-done .g-task-icon { background: var(--turq); color: #fff; }
.g-task.is-done .g-task-sub { color: var(--turq); }
.g-task.is-waiting { border-color: var(--accent); border-width: 1.5px; }
.g-task-confirm { grid-column: 1 / -1; display: grid; gap: 0.5rem; padding-top: 0.35rem; }
.g-task-confirm p { font-size: var(--fs-s); color: var(--ink-2); font-weight: 600; }
.g-task-confirm div { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }

/* Ana eylemler */
.g-cta { margin-top: 1rem; }
.g-service { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.6rem; }
.g-service .btn { min-height: 52px; font-size: var(--fs-s); }
.g-notice {
  display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.9rem;
  padding: 0.75rem 0.9rem; border-radius: var(--r-m);
  background: var(--paper); border: 1px dashed var(--line-2); color: var(--ink-2); font-size: var(--fs-s);
}
.g-notice svg { flex: none; margin-top: 1px; color: var(--accent); }
.g-active {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-top: 0.9rem; padding: 0.85rem 1rem; border-radius: var(--r-l);
  background: var(--ink); color: #fff; text-decoration: none;
}
.g-active strong { font-weight: 700; }
.g-active span:last-child { font-size: var(--fs-s); text-decoration: underline; text-underline-offset: 3px; }

.g-foot {
  margin-top: auto; padding-top: 2rem; display: flex; justify-content: center;
}
.g-foot a { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-xs); color: var(--ink-3); text-decoration: none; }
.g-foot svg { width: 18px; height: 18px; }

/* Menü */
.g-mhead {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem;
  margin: 0 -1rem; padding: calc(0.5rem + env(safe-area-inset-top)) 1rem 0.5rem;
  background: color-mix(in srgb, var(--accent) 5%, var(--tile));
}
.g-mhead h1 { font-size: 1.12rem; font-weight: 740; font-stretch: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-disc-chip {
  display: inline-flex; align-items: center; gap: 0.3rem; min-height: 32px; padding: 0 0.7rem;
  border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; text-decoration: none; white-space: nowrap;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
}
.g-disc-chip.is-off { background: var(--bole-wash); color: var(--bole); }
.g-cats {
  position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 19;
  display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none;
  margin: 0 -1rem; padding: 0.3rem 1rem 0.7rem;
  background: color-mix(in srgb, var(--accent) 5%, var(--tile));
}
.g-cats::-webkit-scrollbar { display: none; }
.g-cat {
  flex: none; min-height: 36px; padding: 0 0.95rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--paper); font-size: var(--fs-s); font-weight: 650; white-space: nowrap;
}
.g-cat[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.g-section { scroll-margin-top: calc(112px + env(safe-area-inset-top)); margin-top: 1rem; }
.g-section h2 { font-size: 1.4rem; font-weight: 760; font-stretch: 88%; letter-spacing: -0.015em; margin: 0 0 0.55rem 0.15rem; }
.g-list { background: var(--paper); border-radius: var(--r-l); box-shadow: var(--shadow-1); overflow: hidden; }
.g-item {
  display: grid; grid-template-columns: 1fr auto; gap: 0.85rem;
  padding: 0.95rem 1rem; border-bottom: 1px solid var(--line);
}
.g-item:last-child { border-bottom: 0; }
.g-item h3 { font-size: 1.04rem; font-weight: 680; line-height: 1.25; }
.g-item p.desc {
  margin-top: 0.2rem; color: var(--ink-3); font-size: 0.9rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.g-price { margin-top: 0.45rem; display: flex; align-items: baseline; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.g-price strong { font-weight: 720; }
.g-price .is-new { color: var(--bole); }
.g-price s { color: var(--ink-3); font-size: 0.9rem; }
.g-item-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.g-thumb { width: 78px; height: 78px; border-radius: 14px; object-fit: cover; background: var(--line); }
.g-item.is-off { opacity: 0.55; }
.g-soldout { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); padding: 0.25rem 0.55rem; border-radius: 999px; background: var(--tile); }
.g-add {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent);
}
.g-stepper {
  display: inline-flex; align-items: center; gap: 0.15rem; padding: 3px;
  border-radius: 999px; border: 1.5px solid var(--accent); background: var(--paper);
}
.g-stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--accent); display: grid; place-items: center; }
.g-stepper button:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.g-stepper output { min-width: 1.5rem; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }

.g-cartbar-space { height: 88px; }
.g-cartbar {
  position: fixed; left: 50%; bottom: 0; z-index: 30; transform: translateX(-50%);
  width: min(560px, 100%); padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 5%, var(--tile)) 70%, transparent);
}
.g-cartbar .btn { justify-content: space-between; box-shadow: var(--shadow-2); }
.g-cartbar .count {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 0.4rem; border-radius: 999px;
  background: color-mix(in srgb, var(--on-accent) 22%, transparent); font-size: var(--fs-s);
}

/* Sepet (adisyon) */
.g-sheet-actions { display: grid; gap: 0.55rem; margin-top: 1rem; }
.g-sheet-actions .fine { text-align: center; color: var(--ink-3); font-size: var(--fs-xs); }
.g-line-ctrl { display: flex; gap: 0.35rem; margin-top: 0.35rem; }
.g-line-ctrl button {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2);
}
.g-note-field { margin-top: 0.9rem; }
.g-note-field .textarea { min-height: 64px; background: rgba(255, 255, 255, 0.7); }
.g-err { margin-top: 0.75rem; padding: 0.7rem 0.85rem; border-radius: var(--r-m); background: var(--bole-wash); color: var(--bole); font-size: var(--fs-s); font-weight: 600; }

/* Sipariş durumu */
.g-order { padding-top: 0.5rem; }
.g-order .adisyon { padding-top: 1.8rem; }
.g-order-stamp { position: absolute; top: 3.4rem; right: 1.1rem; }
body.is-guest .toast-host { top: calc(0.75rem + env(safe-area-inset-top)); bottom: auto; }
.g-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin: 1.3rem 0 0.6rem; }
.g-step { display: grid; justify-items: center; gap: 0.4rem; text-align: center; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.g-step i { width: 14px; height: 14px; border-radius: 50%; background: var(--line-2); display: block; }
.g-step.is-done { color: var(--ink-2); }
.g-step.is-done i { background: var(--accent); }
.g-step.is-current { color: var(--ink); }
.g-step.is-current i { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 6%, transparent); } }
.g-order-hint { text-align: center; color: var(--ink-2); font-weight: 600; margin-bottom: 1rem; }
.g-order-actions { display: grid; gap: 0.6rem; }

/* Hata / boş durum */
.g-empty { flex: 1; display: grid; place-content: center; gap: 0.6rem; text-align: center; padding: 3rem 1rem; }
.g-empty h1 { font-size: 1.6rem; font-weight: 760; font-stretch: 90%; }
.g-empty p { color: var(--ink-2); max-width: 32ch; margin: 0 auto; }
