:root {
  --ink: #120e0b;
  --ink-2: #1d1712;
  --ink-3: #2b2219;
  --bone: #f3ebdd;
  --bone-dim: rgba(243, 235, 221, 0.7);
  --bone-faint: rgba(243, 235, 221, 0.42);
  --saffron: #e8a33d;
  --saffron-deep: #c7841f;
  --chili: #d9553f;
  --leaf: #3f7d64;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-h: 56px;
  --vh: 100vh;
}

@supports (height: 100dvh) {
  :root { --vh: 100dvh; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

button:focus-visible, a:focus-visible, .feed:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

#app {
  position: relative;
  width: 100%;
  height: var(--vh);
  margin: 0 auto;
  overflow: hidden;
  background: var(--ink);
}

/* On a desktop screen the app sits in a phone-sized frame on a warm, softly lit backdrop. */
@media (min-width: 700px) and (min-height: 640px) {
  body {
    display: grid;
    place-items: center;
    background:
      radial-gradient(55% 45% at 12% 8%, rgba(232, 163, 61, 0.22), transparent 65%),
      radial-gradient(50% 45% at 88% 92%, rgba(63, 125, 100, 0.28), transparent 65%),
      radial-gradient(35% 30% at 70% 20%, rgba(217, 85, 63, 0.12), transparent 70%),
      #0a0807;
  }
  #app {
    width: 420px;
    height: min(880px, calc(100vh - 48px));
    border-radius: 40px;
    box-shadow:
      0 0 0 1px rgba(243, 235, 221, 0.1),
      0 40px 90px rgba(0, 0, 0, 0.65),
      0 0 120px rgba(232, 163, 61, 0.08);
  }
}

.screen {
  position: absolute;
  inset: 0;
}

/* ---------- Home ---------- */

.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: calc(var(--safe-top) + 32px) 28px calc(var(--safe-bottom) + 28px);
  text-align: center;
  background:
    radial-gradient(75% 45% at 50% -8%, rgba(232, 163, 61, 0.32), transparent 70%),
    radial-gradient(65% 40% at 100% 100%, rgba(63, 125, 100, 0.38), transparent 65%),
    radial-gradient(45% 35% at 0% 85%, rgba(217, 85, 63, 0.18), transparent 70%),
    linear-gradient(180deg, #1c1510 0%, var(--ink) 55%);
}

.hero {
  position: relative;
  width: 200px;
  height: 160px;
  margin-bottom: 4px;
}

.hero-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 130px;
  margin: -65px 0 0 -41px;
  border-radius: 16px;
  border: 1px solid rgba(243, 235, 221, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 14, 11, 0.85), transparent 55%);
}

.hero-card::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 22px;
  bottom: 14px;
  height: 5px;
  border-radius: 3px;
  background: rgba(243, 235, 221, 0.8);
  box-shadow: 0 -10px 0 -1px rgba(243, 235, 221, 0.45);
}

.hero-card.c1 {
  transform: rotate(-16deg) translateX(-44px) translateY(6px);
  background: radial-gradient(circle at 35% 35%, #e08a4c, #7a3b1f 70%);
}

.hero-card.c2 {
  z-index: 1;
  transform: translateY(-8px);
  width: 90px;
  height: 142px;
  margin: -71px 0 0 -45px;
  background: radial-gradient(circle at 60% 30%, #f0c05a, #8b5a1a 72%);
}

.hero-card.c3 {
  transform: rotate(16deg) translateX(44px) translateY(6px);
  background: radial-gradient(circle at 40% 40%, #9ccb62, #345228 70%);
}

.home-copy { margin-bottom: 26px; }

.home h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 8.5vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.home p {
  margin: 0;
  color: var(--bone-dim);
  font-size: 17px;
}

.shutter {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f5bd63, var(--saffron) 45%, var(--saffron-deep));
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 8px var(--saffron), 0 18px 40px rgba(232, 163, 61, 0.35);
  transition: transform 0.12s ease;
}

.shutter:active { transform: scale(0.93); }

.shutter-ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 2px solid rgba(20, 17, 13, 0.22);
}

.shutter-caption {
  font-size: 15px;
  color: var(--bone);
  margin-top: -6px;
}

.text-btn {
  margin-top: 22px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(243, 235, 221, 0.18);
  background: rgba(243, 235, 221, 0.05);
  color: var(--bone);
  font-size: 15px;
}

.text-btn:hover { background: rgba(243, 235, 221, 0.1); }

.home-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + 14px);
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--bone-faint);
}

/* ---------- Loading ---------- */

.loading {
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(232, 163, 61, 0.22), transparent 70%),
    radial-gradient(60% 40% at 100% 100%, rgba(63, 125, 100, 0.3), transparent 65%),
    var(--ink);
}

.loading-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) brightness(0.42) saturate(0.8);
  transform: scale(1.1);
}

.loading-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 32px;
  text-align: center;
}

.loading-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 24px rgba(232, 163, 61, 0.6);
  animation: breathe 1.3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.7); opacity: 0.55; }
  50% { transform: scale(1.25); opacity: 1; }
}

.loading-status {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

/* ---------- Feed ---------- */

.feed-screen { background: var(--ink); }

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 10px 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(to bottom, rgba(18, 14, 11, 0.9), rgba(18, 14, 11, 0));
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--bone);
}

.topbar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.restaurant {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.restaurant-meta {
  font-size: 12px;
  color: var(--bone-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.counter-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px 0 14px;
  border-radius: 18px;
  background: rgba(18, 14, 11, 0.55);
  border: 1px solid rgba(243, 235, 221, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.feed {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.feed::-webkit-scrollbar { display: none; }

.hint {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 6px);
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--bone-faint);
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.4s;
}

.hint.gone { opacity: 0; }

/* ---------- Card ---------- */

.card {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--ink-2);
}

.strip {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--ink-2);
}

.strip::-webkit-scrollbar { display: none; }

.strip > * {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.strip img {
  display: block;
  object-fit: cover;
  background: var(--ink-3);
}

.strip .placeholder {
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 45% at 50% 30%, rgba(232, 163, 61, 0.28), transparent 70%),
    radial-gradient(50% 40% at 90% 95%, rgba(63, 125, 100, 0.35), transparent 65%),
    linear-gradient(180deg, #2a2118, var(--ink-2));
}

.placeholder-mark {
  font-family: var(--serif);
  font-size: 140px;
  line-height: 1;
  color: rgba(243, 235, 221, 0.14);
  transform: translateY(-40px);
}

.placeholder-note {
  position: absolute;
  top: 54%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  color: var(--bone-faint);
}

/* skeleton while a dish's photos are still being found */
.card.pending .strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, var(--ink-2) 30%, var(--ink-3) 50%, var(--ink-2) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card.pending .strip::after, .loading-dot { animation: none; }
  .strip, .feed { scroll-behavior: auto; }
}

.bars {
  position: absolute;
  top: calc(var(--safe-top) + var(--topbar-h) - 6px);
  left: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.bars span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(243, 235, 221, 0.3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.bars span.on { background: var(--bone); }

.tapzones {
  position: absolute;
  top: calc(var(--safe-top) + var(--topbar-h));
  bottom: 42%;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

.tap {
  width: 30%;
  height: 100%;
}

.scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(18, 14, 11, 0.97) 0%, rgba(18, 14, 11, 0.86) 20%, rgba(18, 14, 11, 0.45) 40%, rgba(18, 14, 11, 0) 60%);
}

.card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0 84px calc(var(--safe-bottom) + 30px) 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chips:empty { display: none; }

.section, .tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  color: var(--bone-dim);
  border: 1px solid rgba(243, 235, 221, 0.28);
  border-radius: 999px;
  padding: 2px 9px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.section {
  color: var(--bone);
  background: rgba(243, 235, 221, 0.1);
}

.section:empty { display: none; }

.tag { text-transform: lowercase; }

.tag.hot {
  color: #ffb28a;
  border-color: rgba(217, 85, 63, 0.7);
  background: rgba(217, 85, 63, 0.18);
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.dish-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.price {
  font-size: 15px;
  color: var(--saffron);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price:empty { display: none; }

.menu-desc {
  margin: 8px 0 0;
  font-size: 14px;
  font-style: italic;
  color: var(--bone-dim);
  display: none;
}

.menu-desc:empty { display: none !important; }

.explain {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--bone);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card.expanded .menu-desc { display: block; }
.card.expanded .explain { display: block; -webkit-line-clamp: unset; overflow: visible; }

.card-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  min-height: 20px;
}

.more-btn {
  font-size: 13px;
  color: var(--bone-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--bone-faint);
}

.credit {
  font-size: 12px;
  color: var(--bone-faint);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.credit:hover { color: var(--bone-dim); }

.watch {
  position: absolute;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 96px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--bone);
}

.watch-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #f5bd63, var(--saffron) 50%, var(--saffron-deep));
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease;
}

.watch:active .watch-circle { transform: scale(0.92); }

.watch-label {
  font-size: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ---------- Sheets ---------- */

.sheet {
  position: absolute;
  inset: 0;
  z-index: 20;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82%;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border-radius: 18px 18px 0 0;
  border-top: 1px solid rgba(243, 235, 221, 0.1);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
  animation: rise 0.22s ease-out;
}

@keyframes rise {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px 4px 20px;
  flex: 0 0 auto;
}

.sheet-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-list {
  overflow-y: auto;
  padding: 0 0 12px;
}

.dish-list h3 {
  margin: 14px 20px 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9c8f7c;
}

.dish-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 20px;
  text-align: left;
  border-top: 1px solid rgba(243, 235, 221, 0.07);
}

.dish-row:hover, .dish-row:focus-visible { background: var(--ink-3); outline: none; }

.dish-row.current .dish-row-name { color: var(--saffron); }

.dish-row-name { font-size: 16px; }
.dish-row-price { font-size: 14px; color: var(--bone-dim); font-variant-numeric: tabular-nums; }

.video-player {
  aspect-ratio: 16 / 9;
  background: #000;
  flex: 0 0 auto;
}

.video-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-list { overflow-y: auto; padding: 8px 0 10px; }

.video-row {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 20px;
  text-align: left;
}

.video-row:hover, .video-row:focus-visible { background: var(--ink-3); outline: none; }
.video-row.current .video-row-title { color: var(--saffron); }

.video-row img {
  width: 92px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--ink-3);
  flex: 0 0 auto;
}

.video-row-title {
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-row-channel { font-size: 12px; color: var(--bone-dim); margin-top: 2px; }

/* ---------- Toast ---------- */

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(var(--safe-bottom) + 24px);
  z-index: 30;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bone);
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ---------- Video slide (first slide of a card) ---------- */

.slide-video {
  position: relative;
  overflow: hidden;
  background: #000;
}

.slide-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.video-cover {
  position: absolute;
  inset: 0;
}

.bars span.video::before {
  content: "";
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--saffron);
  opacity: 0.9;
}

.bars span.video.on::before { opacity: 1; }
.bars span.video:not(.on)::before { opacity: 0.35; }

.sound {
  position: absolute;
  right: 14px;
  top: calc(var(--safe-top) + var(--topbar-h) + 10px);
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(18, 14, 11, 0.55);
  border: 1px solid rgba(243, 235, 221, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--bone);
}

.sound .icon-on { display: none; }
.sound.on .icon-on { display: block; }
.sound.on .icon-off { display: none; }

.video-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.45) saturate(1.1);
}

.slide-video.landscape iframe {
  top: 40%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

/* Shorts in the Videos sheet: portrait player, centred */
.video-player.vertical {
  aspect-ratio: 9 / 16;
  width: auto;
  height: min(58vh, 520px);
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
}
