/* ──────────────────────────────────────────────────────────────────────────
   RASA GROCERY — page styles (grocery.html)

   Rides on styles.css (tokens/chrome) + css/planner.css (masthead, dialogs,
   chips). Everything grocery-specific is g-* below. Dark Luxury: #080C14,
   saffron 245,166,35, Cormorant Garamond display, no emoji, motion earns
   its place and respects prefers-reduced-motion.
   ────────────────────────────────────────────────────────────────────────── */

/* ── access states (login / locked) ─────────────────────────────────────── */

.g-state {
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
}

/* `display: flex/grid` on a class BEATS the [hidden] attribute — restate it
   (the planner hidden-vs-flex lesson). Applies to every toggled region. */
.g-state[hidden],
.grocery[hidden],
.g-suggest[hidden],
.g-cart[hidden],
.g-welcome[hidden],
.g-list-switch[hidden],
.g-toast[hidden] {
  display: none !important;
}

.g-gate {
  max-width: 560px;
  text-align: center;
  padding: 48px 40px;
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid rgba(245, 166, 35, 0.14);
  backdrop-filter: blur(10px);
  animation: gRise 0.7s ease-out both;
}

.g-gate__icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.25);
}

.g-gate__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.15;
  color: rgba(242, 221, 208, 0.96);
  margin: 12px 0 14px;
}

.g-gate__sub {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 14px;
}

.g-gate__perk {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.85);
  margin: 0 0 22px;
}

.g-gate__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.g-gate__btn {
  padding: 11px 26px;
  border-radius: 100px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(242, 221, 208, 0.85);
  border: 1px solid rgba(242, 221, 208, 0.2);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.g-gate__btn--primary {
  color: #080c14;
  background: linear-gradient(135deg, #f5a623, #e0951c);
  border-color: transparent;
}

.g-gate__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245, 166, 35, 0.18);
}

/* ── welcome strip (invited members) ────────────────────────────────────── */

.g-welcome {
  margin: 0 0 22px;
  animation: gRise 0.6s ease-out both;
}

.g-welcome__inner {
  position: relative;
  padding: 18px 44px 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(245, 166, 35, 0.22);
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.08), rgba(17, 17, 17, 0.4));
}

.g-welcome__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  color: rgba(242, 221, 208, 0.95);
  margin: 0 0 4px;
}

.g-welcome__sub {
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.g-welcome__sub a {
  color: rgba(245, 166, 35, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 166, 35, 0.35);
}

.g-welcome__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}

.g-welcome__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.g-welcome__close svg {
  width: 12px;
  height: 12px;
}

/* ── fast add ───────────────────────────────────────────────────────────── */

.g-add {
  position: sticky;
  top: var(--nav-offset);
  z-index: 20;
  margin: 0 0 18px;
}

.g-add form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: 100px;
  background: rgba(13, 17, 26, 0.92);
  border: 1px solid rgba(245, 166, 35, 0.18);
  backdrop-filter: blur(14px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.g-add form:focus-within {
  border-color: rgba(245, 166, 35, 0.45);
  box-shadow: 0 8px 32px rgba(8, 12, 20, 0.55), 0 0 0 3px rgba(245, 166, 35, 0.08);
}

.g-add__icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.g-add__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: rgba(242, 221, 208, 0.95);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 0;
  outline: none;
}

.g-add__input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.g-add__btn {
  flex: none;
  padding: 10px 22px;
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #080c14;
  background: linear-gradient(135deg, #f5a623, #e0951c);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.g-add__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(245, 166, 35, 0.25);
}

.g-suggest {
  position: absolute;
  left: 16px;
  right: 16px;
  margin-top: 8px;
  border-radius: 12px;
  background: rgba(13, 17, 26, 0.97);
  border: 1px solid rgba(245, 166, 35, 0.16);
  box-shadow: 0 18px 44px rgba(4, 6, 10, 0.6);
  overflow: hidden;
  animation: gRise 0.25s ease-out both;
}

.g-suggest__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: rgba(242, 221, 208, 0.9);
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.g-suggest__item:hover,
.g-suggest__item.is-active {
  background: rgba(245, 166, 35, 0.09);
}

.g-suggest__cat {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  flex: none;
}

/* ── store filter pills ─────────────────────────────────────────────────── */

.g-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 26px;
}

.g-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.g-pill:hover {
  border-color: rgba(245, 166, 35, 0.35);
  color: rgba(242, 221, 208, 0.85);
}

.g-pill.is-active {
  border-color: rgba(245, 166, 35, 0.55);
  background: rgba(245, 166, 35, 0.1);
  color: rgba(245, 166, 35, 0.95);
}

.g-pill__count {
  font-size: 0.62rem;
  padding: 1px 7px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.07);
}

.g-pill.is-active .g-pill__count {
  background: rgba(245, 166, 35, 0.18);
}

/* "+ Label" — the household's own stores */
.g-pill--add {
  border-style: dashed;
  border-color: rgba(245, 166, 35, 0.3);
  color: rgba(245, 166, 35, 0.75);
  background: transparent;
}

.g-pill--add:hover {
  border-color: rgba(245, 166, 35, 0.6);
  color: rgba(245, 166, 35, 1);
  background: rgba(245, 166, 35, 0.06);
}

.g-store-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.g-store-pick__manage {
  display: block;
  margin-top: 16px;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.75);
  cursor: pointer;
  border-bottom: 1px dashed rgba(245, 166, 35, 0.35);
}

.g-store-pick__manage:hover {
  color: rgba(245, 166, 35, 1);
}

/* Members can't add labels — a quiet note instead of a silently missing button */
.g-store-pick__note {
  margin: 16px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(242, 221, 208, 0.5);
}

.g-label-form {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
}

.g-label-form__input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border-radius: 100px;
  border: 1px solid rgba(245, 166, 35, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(242, 221, 208, 0.95);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}

.g-label-form__input:focus {
  border-color: rgba(245, 166, 35, 0.5);
}

/* ── groups + items ─────────────────────────────────────────────────────── */

.g-group {
  margin: 0 0 30px;
}

/* Entrance animation plays ONCE (first paint only — page.js gates the class).
   Re-renders after a check/add/delete must repaint perfectly still, or every
   click makes the whole list hop. */
.g-groups--intro .g-group {
  animation: gRise 0.5s ease-out both;
}

.g-group__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.25rem;
  color: rgba(242, 221, 208, 0.92);
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245, 166, 35, 0.12);
}

.g-group__count {
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(245, 166, 35, 0.7);
}

.g-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  /* Horizontal gestures are ours; vertical stays with the page scroll. */
  touch-action: pan-y;
}

.g-item__swipe {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 10px;
  border-radius: 10px;
  background: #0a0e16; /* opaque — hides the action zones until swiped */
  transition: transform 0.25s ease-out, background 0.25s;
  will-change: transform;
}

.g-item:hover .g-item__swipe {
  background: #0d121c;
}

/* Action zones revealed behind the row while swiping (touch devices) */
.g-item__zone {
  position: absolute;
  top: 3px;
  bottom: 3px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.15s;
}

.g-item__zone svg {
  width: 17px;
  height: 17px;
}

.g-item__zone--check {
  left: 0;
  right: 40%;
  justify-content: flex-start;
  color: rgba(139, 191, 90, 0.95);
  background: linear-gradient(90deg, rgba(139, 191, 90, 0.16), rgba(139, 191, 90, 0.02));
}

.g-item__zone--del {
  right: 0;
  left: 40%;
  justify-content: flex-end;
  color: rgba(230, 57, 70, 0.95);
  background: linear-gradient(270deg, rgba(230, 57, 70, 0.16), rgba(230, 57, 70, 0.02));
  cursor: pointer;
}

.g-item--swiping-right .g-item__zone--check,
.g-item--swiping-left .g-item__zone--del,
.g-item--swipe-open .g-item__zone--del {
  opacity: 1;
}

.g-item__check {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid rgba(245, 166, 35, 0.4);
  background: rgba(245, 166, 35, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, background 0.25s, transform 0.15s;
}

.g-item__check:hover {
  border-color: rgba(245, 166, 35, 0.8);
  transform: scale(1.06);
}

.g-item__check svg {
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.25s ease-out;
}

.g-item__check[aria-checked="true"] {
  background: rgba(245, 166, 35, 0.14);
  border-color: rgba(245, 166, 35, 0.75);
}

.g-item__check[aria-checked="true"] svg {
  opacity: 1;
  transform: scale(1);
}

.g-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.g-item__name {
  font-size: 0.95rem;
  color: rgba(242, 221, 208, 0.94);
  transition: color 0.3s;
}

.g-item__note {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.38);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Read + comment-only (free invited member) ────────────────────────────
   Hide the add bar and per-item edit affordances; leave checking-off? No —
   checking a bought item is an edit too, so gate it. Comments stay allowed. */
body.g-readonly .g-add,
body.g-readonly .g-item__zone--del,
body.g-readonly .g-item__store,
body.g-readonly .g-item__remove,
body.g-readonly #gClearAllBtn,
body.g-readonly .g-item__check {
  display: none !important;
}
/* Non-editors can't swipe-reveal actions either. */
body.g-readonly .g-item__swipe {
  pointer-events: auto;
}
body.g-readonly .g-item {
  cursor: default;
}

.g-readonly-nudge {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 28px;
  padding: 16px 22px;
  background: rgba(245, 166, 35, 0.05);
  border: 1px solid rgba(245, 166, 35, 0.15);
  border-radius: 14px;
}
.g-readonly-nudge__text {
  flex: 1;
  min-width: 240px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(242, 221, 208, 0.72);
}
.g-readonly-nudge__text strong {
  color: rgba(242, 221, 208, 0.95);
  font-weight: 600;
}
.g-readonly-nudge__cta {
  padding: 10px 22px;
  border-radius: 100px;
  background: linear-gradient(135deg, #f5a623, #d4891a);
  color: #080c14;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s, box-shadow 0.25s;
}
.g-readonly-nudge__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.22);
}

/* ── Household Notes (shared comments) ────────────────────────────────────── */
.g-notes__thread {
  max-height: 46vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 6px 0 16px;
  padding-right: 4px;
}
.g-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.g-note__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.g-note__avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: #080c14;
  background: hsl(var(--by-hue, 40) 55% 62%);
  border-color: transparent;
}
.g-note__body { flex: 1; min-width: 0; }
.g-note__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.g-note__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(242, 221, 208, 0.92);
}
.g-note__when {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(242, 221, 208, 0.4);
}
.g-note__text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(242, 221, 208, 0.78);
  margin: 0;
  word-wrap: break-word;
}
.g-notes__compose {
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
}
.g-notes__input {
  flex: 1;
  padding: 11px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(242, 221, 208, 0.92);
  font-family: inherit;
  font-size: 0.88rem;
}
.g-notes__input:focus-visible {
  outline: 2px solid rgba(245, 166, 35, 0.6);
  outline-offset: 2px;
}
.planner__action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--saffron, #f5a623);
  color: #080c14;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  margin-left: 4px;
}

/* "Who added this" — small avatar or initial circle, item attribution */
.g-item__by {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.g-item__by--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  color: #080c14;
  background: hsl(var(--by-hue, 40) 55% 62%);
  border-color: transparent;
}

/* Store tag — tappable: choose which store this item belongs to */
.g-item__store {
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
  transition: color 0.25s;
}

.g-item__store:hover {
  color: rgba(242, 221, 208, 0.8);
}

.g-item__store--indian {
  color: rgba(245, 166, 35, 0.65);
  border-bottom-color: rgba(245, 166, 35, 0.3);
}

.g-item__store--none {
  color: rgba(255, 255, 255, 0.22);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
}

.g-item__recipes {
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(139, 191, 90, 0.75);
  cursor: pointer;
  border-bottom: 1px dotted rgba(139, 191, 90, 0.4);
  transition: color 0.25s;
}

.g-item__recipes:hover {
  color: rgba(139, 191, 90, 1);
}

.g-item__qty {
  flex: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: rgba(245, 166, 35, 0.88);
  white-space: nowrap;
}

.g-item__qty--approx {
  color: rgba(245, 166, 35, 0.6);
}

/* Delete — always visible, small and friendly; warms to rose on hover */
.g-item__remove {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(230, 57, 70, 0.22);
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.06);
  color: rgba(230, 57, 70, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}

.g-item__remove:hover,
.g-item__remove:focus-visible {
  color: #e63946;
  background: rgba(230, 57, 70, 0.14);
  border-color: rgba(230, 57, 70, 0.5);
  transform: scale(1.08);
}

.g-item__remove svg {
  width: 13px;
  height: 13px;
}

.g-item--done .g-item__name {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: line-through;
  text-decoration-color: rgba(245, 166, 35, 0.4);
}

/* ── empty state ────────────────────────────────────────────────────────── */

.g-empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed rgba(245, 166, 35, 0.18);
  border-radius: 14px;
}

.g-empty__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: rgba(242, 221, 208, 0.85);
  margin: 0 0 8px;
}

.g-empty__hint {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 18px;
}

.g-empty__cta {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(245, 166, 35, 0.95);
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: rgba(245, 166, 35, 0.08);
  transition: transform 0.3s, background 0.3s;
}

.g-empty__cta:hover {
  transform: translateY(-2px);
  background: rgba(245, 166, 35, 0.14);
}

/* ── in the cart ────────────────────────────────────────────────────────── */

.g-cart {
  margin: 42px 0 0;
  padding-top: 8px;
  opacity: 0.8;
}

.g-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.g-cart__head .g-group__title {
  border-bottom: none;
  margin: 0;
  padding: 0;
}

/* ── list switcher ──────────────────────────────────────────────────────── */

.g-list-switch {
  padding: 9px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(242, 221, 208, 0.9);
  font-family: inherit;
  font-size: 0.78rem;
}

/* ── dialogs: share / staples / recipes ─────────────────────────────────── */

.g-share__lead {
  font-size: 0.86rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 16px;
}

.g-share__lead strong {
  color: rgba(245, 166, 35, 0.9);
  font-weight: 600;
}

.g-share__code {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.7rem;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 18px 10px 18px 20px;
  border-radius: 12px;
  color: rgba(245, 166, 35, 0.95);
  background: rgba(245, 166, 35, 0.06);
  border: 1px dashed rgba(245, 166, 35, 0.35);
  user-select: all;
}

/* ── Modern invite: share sheet + QR + de-emphasised code ─────────────────── */
.g-invite {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.g-invite__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 20px;
  font-size: 0.9rem;
}
.g-invite__hint {
  font-size: 0.78rem;
  color: rgba(242, 221, 208, 0.55);
  text-align: center;
  margin: 6px 0 0;
}
.g-invite__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.g-invite__qr-frame {
  width: 208px;
  max-width: 70vw;
  line-height: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.g-invite__qr-frame svg {
  width: 100%;
  height: auto;
  display: block;
}
.g-invite__actions {
  justify-content: center;
}
.g-invite__code-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}
.g-invite__code-summary {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 221, 208, 0.5);
  cursor: pointer;
  list-style: none;
  text-align: center;
}
.g-invite__code-summary::-webkit-details-marker { display: none; }
.g-invite__code-summary:hover { color: rgba(245, 166, 35, 0.8); }
.g-invite__code-note {
  font-size: 0.76rem;
  color: rgba(242, 221, 208, 0.5);
  text-align: center;
  margin: 10px 0 8px;
}

/* ── "Have a code?" join entry (empty / locked state) ─────────────────────── */
.g-join-code {
  margin: 22px auto 0;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.g-join-code__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 221, 208, 0.55);
}
.g-join-code__row {
  display: flex;
  gap: 8px;
}
.g-join-code__input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(242, 221, 208, 0.92);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-align: center;
}
.g-join-code__input:focus-visible {
  outline: 2px solid rgba(245, 166, 35, 0.6);
  outline-offset: 2px;
}

.g-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.g-member__name {
  flex: 1;
  font-size: 0.9rem;
  color: rgba(242, 221, 208, 0.9);
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-member__role {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.8);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(245, 166, 35, 0.3);
}

.g-member__since {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}

.g-staple {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.g-staple__name {
  flex: 1;
  font-size: 0.9rem;
  color: rgba(242, 221, 208, 0.9);
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-staple--low .g-staple__name {
  color: rgba(245, 166, 35, 0.9);
}

.g-staple__flag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(139, 191, 90, 0.8);
}

.g-staple-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.g-recipe-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: rgba(242, 221, 208, 0.92);
  font-size: 0.92rem;
  transition: color 0.25s, padding-left 0.25s;
}

.g-recipe-link:hover {
  color: rgba(245, 166, 35, 0.95);
  padding-left: 12px;
}

.g-recipe-link svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: rgba(245, 166, 35, 0.6);
}

/* Small chip variant used inside grocery dialogs */
/* accent chip — the affirmative action in confirm sheets (join invite) */
.pl-chip--accent {
  background: rgba(245, 166, 35, 0.14);
  border-color: rgba(245, 166, 35, 0.5);
  color: rgba(245, 166, 35, 0.95);
}
.pl-chip--accent:hover {
  background: rgba(245, 166, 35, 0.22);
  border-color: rgba(245, 166, 35, 0.7);
}

.pl-chip--small {
  font-size: 0.6rem;
  padding: 6px 13px;
}

/* Clear-all masthead action — rose-tinted so it reads as "careful" */
.g-action--danger {
  border-color: rgba(230, 57, 70, 0.28) !important;
  color: rgba(230, 57, 70, 0.85) !important;
}

.g-action--danger:hover {
  background: rgba(230, 57, 70, 0.08) !important;
  border-color: rgba(230, 57, 70, 0.5) !important;
}

/* ── toast ──────────────────────────────────────────────────────────────── */

.g-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 14px);
  z-index: 90;
  padding: 11px 22px;
  border-radius: 100px;
  background: rgba(13, 17, 26, 0.95);
  border: 1px solid rgba(245, 166, 35, 0.3);
  color: rgba(242, 221, 208, 0.95);
  font-size: 0.82rem;
  box-shadow: 0 14px 40px rgba(4, 6, 10, 0.55);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s ease-out;
  pointer-events: none;
}

.g-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── print ──────────────────────────────────────────────────────────────── */

@media print {
  .nav, .g-add, .g-pills, .planner__controls, .g-welcome, .footer,
  .g-item__remove, .g-item__recipes, .g-item__zone, .cursor-glow, #topoCanvas, .g-toast {
    display: none !important;
  }
  .g-item__swipe { background: #fff !important; }
  body.g-printing, body.g-printing .planner {
    background: #fff !important;
    color: #111 !important;
  }
  .g-item__name, .g-group__title, .planner__title, .planner__subtitle {
    color: #111 !important;
  }
  .g-item__qty { color: #333 !important; }
}

/* ── motion ─────────────────────────────────────────────────────────────── */

@keyframes gRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .g-gate, .g-welcome, .g-group, .g-suggest { animation: none; }
  .g-gate__btn, .g-add__btn, .g-empty__cta, .g-item__check,
  .g-recipe-link, .g-toast { transition: none; }
}

/* ── responsive ─────────────────────────────────────────────────────────── */

/* ── First-run guided tour ─────────────────────────────────────────
   Full-screen dimmer; the spotlit element is lifted above it (JS sets
   z-index) and ringed in saffron so it pops through the dark. The card
   anchors beside it. Dark-Luxury: Cormorant title, saffron accent,
   0.3s motion, no emoji. */
/* The first-run tour styles live in css/tour.css since 2026-09-05 (shared engine, js/tour/). */

/* ── Editable list title (owner only) ──────────────────────────────
   The <h1> is the household list's real name. For the owner it becomes
   an inline text field: a soft dotted underline hints it's editable,
   a saffron ring shows while typing. Non-owners get the plain title. */
.planner__title--editable {
  cursor: text;
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: -8px;            /* keep text visually flush with the label */
  border-bottom: 1px dashed transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.planner__title--editable:hover {
  border-bottom-color: rgba(245, 166, 35, 0.4);
}
.planner__title--editable:focus {
  outline: none;
  background: rgba(245, 166, 35, 0.06);
  border-bottom-color: rgba(245, 166, 35, 0.85);
}

@media (max-width: 640px) {
  /* --nav-h already re-declares itself at mobile; .g-add just follows it */
  .g-add__btn { padding: 10px 16px; }
  .g-item__qty { font-size: 0.72rem; }
  .g-gate { padding: 36px 22px; }
  .g-state { padding-top: 110px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE ERGONOMICS — 44px tap floor (2026-08-06)

   Measured signed-in at 390px: the ADD button rendered at 32px, the category
   pills at 32px, and the action row at 39-40px, all under Apple's 44px HIG
   minimum. A grocery list is used one-handed in a shop, so the floor matters.
   Only the touch BOX grows; type sizes are untouched.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .g-add__btn,
    .g-pill,
    .g-action,
    .planner__action {
        min-height: 44px;
    }

    .g-add__btn {
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ── The shop window (signed-out /grocery) ─────────────────────────────────
   THE LIST THAT WRITES ITSELF (2026-09-06). One lit scene: the week's plates
   on the lamp-lit table, a sheet of ruled paper below, five scroll beats
   (js/grocery/shop-scene.js). Lighting model = the planner's lamp (.tbl in
   css/planner.css): light falls from top centre; every shadow falls down.
   No per-element glows, no borders where there is a shadow, no blur on
   entrances, every mark on screen is a data record. Rows are the member's
   own .g-item furniture wearing a tappable body. */

.g-state--shop {
  display: block;
  min-height: 0;
  padding: var(--nav-offset) 24px 0;
}

/* The pinned frame. Scene height from first paint — the page must not paint
   a stub that later grows (the footer curtain/sweep retries exist for that,
   but a frame that is already the right height never needs them). */
.g-shop {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
  width: min(1200px, 100%);
  min-height: calc(100svh - var(--nav-offset));
  margin: 0 auto;
  padding: 26px 0 18px;
}
.g-shop[data-skeleton] .g-shop__pitch > :not(.section-label):not(.g-shop__title) { visibility: hidden; }

/* ── the pitch column ─────────────────────────────────────────────────── */
.g-shop__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 2.6vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: rgba(242, 221, 208, 0.96);
  margin: 10px 0 8px;
  max-width: 15ch;
}
.g-shop__kicker {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  color: rgba(245, 166, 35, 0.92);
  margin: 0 0 12px;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Proof rows — ghost serif numeral, hairline, fine print. */
.g-shop__proof {
  margin: 0 0 14px;
  padding: 0;
  border-top: 1px solid rgba(245, 166, 35, 0.14);
}
.g-shop__proof > div {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(245, 166, 35, 0.12);
}
.g-shop__proof dt {
  --glow: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  line-height: 0.95;
  padding-bottom: 0.16em; /* old-style descenders — measured ink, never boxes */
  color: rgba(245, 166, 35, calc(0.78 + var(--glow) * 0.22));
  font-variant-numeric: lining-nums tabular-nums;
}
.g-shop__proof dd {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.66);
}

.g-shop .g-gate__perk { margin-bottom: 12px; }
.g-shop__actions { justify-content: flex-start; margin: 0 0 14px; align-items: center; }
.g-gate__btn--quiet {
  border-color: transparent;
  color: rgba(255, 255, 255, 0.66);
  padding-left: 10px;
  padding-right: 10px;
}
.g-gate__btn--quiet:hover { box-shadow: none; color: rgba(242, 221, 208, 0.95); }
.g-gate__btn:focus-visible { outline: 2px solid rgba(245, 166, 35, 0.9); outline-offset: 3px; }

/* The live proof: type a dal the way your family says it. Pure client. */
.g-try { margin: 0 0 12px; }
.g-try[hidden] { display: none !important; }
.g-try__label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.85);
  margin: 0 0 8px;
}
.g-try__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 14px;
  border-radius: 100px;
  background: rgba(13, 17, 26, 0.92);
  border: 1px solid rgba(245, 166, 35, 0.18);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.g-try__bar:focus-within {
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}
.g-try__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: rgba(242, 221, 208, 0.95);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 8px 0;
  outline: none;
}
.g-try__input::placeholder { color: rgba(255, 255, 255, 0.4); }
.g-try__btn { padding: 9px 18px; min-height: 36px; }
.g-try__btn:focus-visible { outline: 2px solid rgba(242, 221, 208, 0.9); outline-offset: 3px; }
.g-try__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.g-try__chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 100px;
  border: 1px solid rgba(245, 166, 35, 0.22);
  background: transparent;
  color: rgba(245, 166, 35, 0.9);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.g-try__chip:hover { background: rgba(245, 166, 35, 0.08); border-color: rgba(245, 166, 35, 0.5); }
.g-try__chip:focus-visible { outline: 2px solid rgba(245, 166, 35, 0.9); outline-offset: 2px; }
.g-try__status {
  min-height: 1.5em;
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(242, 221, 208, 0.8);
}

.g-shop__foot {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
}
.g-shop__foot a {
  color: rgba(245, 166, 35, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 166, 35, 0.3);
}
.g-shop__foot a:hover { border-bottom-color: rgba(245, 166, 35, 0.9); }

/* ── the scene column ─────────────────────────────────────────────────── */
.g-scene { position: relative; min-width: 0; }
.g-scene__eyebrow { display: none; margin: 0 0 8px; }

/* The table: the lamp's pool of light (the planner's own three layers), the
   still-life plate as the tabletop, the week's plates standing on it. */
.g-table {
  position: relative;
  height: 190px;
  margin: 0;
  background: radial-gradient(64% 110% at 50% 12%, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.012) 62%, rgba(255, 255, 255, 0) 100%);
}
.g-table::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -60px; height: 250px;
  pointer-events: none;
  background: radial-gradient(48% 100% at 50% 0%, rgba(245, 166, 35, 0.12), transparent 70%);
}
.g-table__photo {
  position: absolute;
  inset: 0 0 46px;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  /* the plate fades into the page below and at its sides — no hard rectangle */
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 45%, transparent 100%), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}
.g-table__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; opacity: 0.78; } /* the tabletop sits UNDER the plates — the plates carry the light */
.g-table__plates {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 2.2vw, 28px);
}
.g-plate { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.g-plate .plate { --d: 96px; cursor: pointer; }
.g-plate--quiet .plate { --d: 64px; opacity: 0.62; }
.g-plate__btn:focus-visible { outline: 2px solid rgba(245, 166, 35, 0.9); outline-offset: 4px; }
.g-plate__cap {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.54rem;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  max-width: 112px;
}

/* The paper: one shadow (the lamp is above), no border. Ruled at the row pitch. */
.g-paper {
  position: relative;
  margin: 14px 0 0;
  padding: 14px 18px 12px;
  border-radius: 14px;
  background: #0b0f17;
  box-shadow: 0 28px 48px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.g-paper__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
  min-height: 24px;
}
.g-paper__count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}
.g-paper__count b { font-weight: 500; color: rgba(245, 166, 35, 0.95); }
.g-paper__rows {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  min-height: calc(var(--slots, 1) * 44px);
  background: repeating-linear-gradient(180deg, transparent 0 43px, rgba(245, 166, 35, 0.09) 43px 44px);
}
.g-paper__rows[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
.g-paper__col { min-width: 0; }

/* A row on the paper — the member's row, with a tappable body and no swipe. */
.g-item--paper { height: 44px; overflow: visible; border-radius: 8px; }
.g-item__tap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 6px;
  margin: 0;
  background: rgba(245, 166, 35, calc(var(--lift, 0) * 0.06));
  border: 0;
  border-radius: 8px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 calc(var(--lift, 0) * 10px) calc(var(--lift, 0) * 18px) calc(var(--lift, 0) * -8px) rgba(0, 0, 0, 0.85);
  transition: background 0.25s;
}
.g-item__tap:hover { background: rgba(245, 166, 35, 0.05); }
.g-item__tap:focus-visible { outline: 2px solid rgba(245, 166, 35, 0.9); outline-offset: -2px; }
.g-item--paper .g-item__check { width: 22px; height: 22px; border-radius: 6px; }
.g-item--paper .g-item__check svg { width: 13px; height: 13px; }
.g-item--paper .g-item__body { gap: 1px; }
.g-item--paper .g-item__name { font-size: 0.86rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-item--paper .g-item__note--alias {
  font-size: 0.64rem;
  line-height: 1.15;
  font-style: italic;
  color: rgba(245, 166, 35, 0.72);
}
.g-alias { transition: color 0.3s; }
.g-alias.is-hit { color: #F5A623; font-style: normal; font-weight: 600; }
.g-alias__dot { color: rgba(245, 166, 35, 0.72); }
.g-item--paper .g-item__meta { gap: 8px; line-height: 1.15; }
.g-item--paper .g-item__store {
  font-size: 0.52rem;
  border-bottom: 0;
  cursor: inherit;
  color: rgba(255, 255, 255, 0.55);
}
.g-item--paper .g-item__store--indian { color: rgba(245, 166, 35, 0.8); }
.g-item--paper .g-item__store--none { color: rgba(255, 255, 255, 0.5); }
.g-item--paper .g-shop__merged { font-size: 0.52rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(245, 166, 35, 0.85); }
.g-item--paper .g-shop__merged[hidden] { display: none; }
.g-item--paper .g-item__qty { font-size: 0.7rem; }
.g-item--paper .g-item__qty--approx { color: rgba(245, 166, 35, 0.82); }
.g-item--flash .g-item__tap { animation: gFlash 0.9s ease-out; }
@keyframes gFlash {
  0% { background: rgba(245, 166, 35, 0.22); }
  100% { background: rgba(245, 166, 35, 0); }
}
.g-item--typed .g-item__name { color: rgba(245, 166, 35, 0.95); }

/* Store dividers: in flow when the paper is settled, floating at their
   measured seat while the scene runs. */
.g-paper__store {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  height: 44px;
  padding: 0 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.9);
}
.g-paper__store b {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1;
  padding-bottom: 0.1em;
  font-variant-numeric: lining-nums tabular-nums;
}
.g-paper__store[hidden] { display: none; }
.g-paper__store.is-float {
  position: absolute;
  left: 0; top: 0;
  width: calc(50% - 9px);
  opacity: 0;
  pointer-events: none;
}
.g-paper__rows[data-cols="1"] .g-paper__store.is-float { width: 100%; }

/* Beat captions — one line, cross-faded. The finished paper shows the last. */
.g-paper__captions { position: relative; height: 1.8em; margin: 10px 0 0; }
.g-paper__cap {
  position: absolute;
  inset: 0;
  opacity: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(242, 221, 208, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html:not(.g-scene):not(.g-staged) .g-paper__cap:last-child { opacity: 1; }

.g-paper__more {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 10px 6px 4px;
  background: transparent;
  border: 0;
  border-top: 1px dashed rgba(245, 166, 35, 0.2);
  border-radius: 0;
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}
.g-paper__more b { font-weight: 500; color: rgba(245, 166, 35, 0.95); }
.g-paper__more:hover { color: rgba(242, 221, 208, 0.9); }
.g-paper__more:focus-visible { outline: 2px solid rgba(245, 166, 35, 0.9); outline-offset: 2px; }
.g-paper__more[hidden] { display: none; }

/* Slips: a plate's own line, on its way to the paper. A small chit under the
   lamp — one shadow, no border. */
.g-slips { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 3; }
.g-slip {
  position: absolute;
  left: 0; top: 0;
  opacity: 0;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(14, 18, 27, 0.94);
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.9);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.03em;
  color: rgba(242, 221, 208, 0.94);
  white-space: nowrap;
  will-change: transform, opacity;
}

/* Provenance wires: plate rim → row. Length is measured; the line is a fact. */
.g-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.g-wire { fill: none; stroke: rgba(245, 166, 35, 0.6); stroke-width: 1; stroke-linecap: round; }

/* The other phones: the same paper in someone else's hand. Bezel = one inset
   shadow (no border), screen text scaled down (never a raster). */
.g-phones {
  position: absolute;
  right: -10px;
  bottom: -30px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  z-index: 4;
  pointer-events: none;
}
.g-phone {
  position: relative;
  width: 148px;
  aspect-ratio: 9 / 17.5;
  border-radius: 22px;
  background: #0a0e16;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 26px 40px -24px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
}
.g-phone:first-child { margin-bottom: 26px; }
.g-phone::before {
  content: "";
  position: absolute;
  top: 9px; left: 50%;
  width: 34px; height: 4px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.12);
}
.g-phone:focus-visible { outline: 2px solid rgba(245, 166, 35, 0.9); outline-offset: 3px; }
.g-phone__label {
  position: absolute;
  top: 18px; left: 0; right: 0;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.46rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.8);
}
.g-phone__screen { padding: 32px 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.g-phone__head {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.78rem;
  color: rgba(242, 221, 208, 0.9);
  margin: 0 0 4px;
}
.g-phone__row { display: flex; align-items: center; gap: 5px; min-height: 16px; }
.g-phone__check {
  flex: none;
  width: 10px; height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(245, 166, 35, 0.4);
  background: rgba(245, 166, 35, 0.04);
  display: grid; place-items: center;
  color: rgba(245, 166, 35, 0.95);
}
.g-phone__check svg { width: 7px; height: 7px; opacity: 0; }
.g-phone__name { flex: 1; min-width: 0; font-size: 0.5rem; color: rgba(242, 221, 208, 0.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-phone__qty { font-family: "JetBrains Mono", monospace; font-size: 0.42rem; color: rgba(245, 166, 35, 0.8); }

/* ── staged first paint (motion allowed, scene about to build) ─────────── */
html.g-staged .g-item--paper { opacity: 0; }
html.g-staged .g-phone { opacity: 0; }
html.g-staged .g-paper__cap { opacity: 0; }
/* The static composition (no scene): the phones already show the tick. */
html:not(.g-scene) .g-phone__row:first-child .g-phone__check { background: rgba(245, 166, 35, 0.18); border-color: rgba(245, 166, 35, 0.8); }
html:not(.g-scene) .g-phone__row:first-child .g-phone__check svg { opacity: 1; }
html:not(.g-scene) .g-item--paper[data-store="indian"]:first-of-type .g-item__check { background: rgba(245, 166, 35, 0.14); border-color: rgba(245, 166, 35, 0.75); }
html:not(.g-scene) .g-item--paper[data-store="indian"]:first-of-type .g-item__check svg { opacity: 1; transform: scale(1); }

/* ── phones (≤768): the SAME artifact, re-laid — the scene first, above the
   fold; the pitch, the door and the live proof follow it. ─────────────── */
@media (max-width: 768px) {
  .g-state--shop { padding-left: 16px; padding-right: 16px; }
  .g-shop {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    min-height: calc(100svh - var(--nav-offset) - 64px);
    padding-top: 14px;
  }
  .g-shop > * { min-width: 0; }
  .g-scene { order: -1; }
  .g-scene__eyebrow { display: block; }
  .g-shop__title { max-width: none; font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .g-table { height: 110px; }
  .g-table__photo { inset: 0 0 34px; }
  .g-scene__eyebrow { margin: 0 0 4px; }
  .g-table__plates { gap: 6px; }
  .g-plate .plate { --d: 52px; }
  .g-plate--quiet .plate { --d: 40px; }
  .g-plate__cap { display: none; }
  .g-paper { padding: 12px 12px 10px; }
  .g-paper__rows { grid-template-columns: minmax(0, 1fr); }
  .g-paper__cap { white-space: normal; font-size: 0.92rem; line-height: 1.35; }
  .g-paper__captions { height: 2.7em; margin-top: 6px; padding-right: 112px; } /* the phone frame sits over the caption's right end */
  .g-phones { right: -6px; bottom: 34px; } /* clears the "+ K more" line */
  .g-phone { width: 104px; }
  .g-phone:first-child { display: none; }
  .g-try__chip, .g-try__btn { min-height: 44px; }
  .g-gate__btn { min-height: 44px; display: inline-flex; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .g-plate .plate { animation: none; }
  .g-item--flash .g-item__tap { animation: none; }
  .g-try__bar, .g-try__chip, .g-item__tap { transition: none; }
}
