/* Discover: the diner-facing "find food near you" app, in the Tably brand.
   Mango Masala: kadai orange and mango on cream, ink outlines, chunky rounded cards. */
:root {
  --cream: #FFF7EC; --paper: #FFFFFF; --ink: #1F1A17; --ink2: #4A3F38; --muted: #6B5A4C; --line: #F0D9BE;
  --tomato: #C2410C; --tomato-deep: #9A3412; --tomato-soft: #FFE8D6; --lime: #FFC94A; --lime-deep: #3F6B00;
  --amber: #B45309; --ring: rgba(194, 65, 12, .35);
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }

.dz { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-bottom: 84px; }
.dz-explore { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* Header */
.dz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; }
.dz-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dz-logo { width: 38px; height: 38px; border-radius: 12px; background: var(--tomato); position: relative; flex: none; box-shadow: 3px 3px 0 var(--ink); }
.dz-logo::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--lime); right: -5px; top: -5px; border: 2px solid var(--ink); }
.dz-name { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; line-height: 1; }
.dz-tag { margin: 3px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-loc { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--lime); color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 2px 2px 0 var(--ink); flex: none; }
.dz-loc svg { width: 17px; height: 17px; }
.dz-loc:active { transform: translate(2px, 2px); box-shadow: none; }

/* Search */
.dz-search { margin: 8px 16px 4px; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 4px 4px 4px 14px; box-shadow: 3px 3px 0 var(--ink); }
.dz-search svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.dz-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; font-size: 16px; padding: 10px 0; color: var(--ink); }
.dz-search input::placeholder { color: #8D7E74; }
.dz-search button { min-height: 42px; padding: 0 18px; border: none; border-radius: 12px; background: var(--tomato); color: #fff; font-weight: 700; }

/* Chips */
.dz-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; flex: none; }
.dz-chips::-webkit-scrollbar { display: none; }
.dz-chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink2); font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.dz-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dz-chip.lime.on { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.dz-sep { flex: none; width: 1.5px; background: var(--line); margin: 6px 2px; }

/* Map + list */
.dz-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dz-mapwrap { position: relative; height: 38vh; min-height: 240px; margin: 0 16px; border-radius: 20px; overflow: hidden; border: 2px solid var(--ink); background: #EFE6D8; flex: none; }
#map { position: absolute; inset: 0; }
.dz-here { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); min-height: 38px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); font-weight: 700; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); z-index: 2; white-space: nowrap; }
.dz-list { padding: 14px 16px 32px; display: flex; flex-direction: column; gap: 12px; }
.dz-count { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.dz-count b { color: var(--ink); }

@media (min-width: 900px) {
  .dz-main { flex-direction: row-reverse; gap: 16px; padding: 0 16px 16px; height: calc(100vh - 250px); }
  .dz-mapwrap { flex: 1; height: auto; margin: 0; }
  .dz-list { width: 440px; flex: none; overflow-y: auto; padding: 0 4px 16px 0; }
}

/* Place card */
.pl { display: flex; gap: 12px; padding: 12px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; animation: pl-in .45s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.pl:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(31, 26, 23, .35); }
.pl.sel { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--tomato); }
@keyframes pl-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pl-ph { width: 80px; height: 80px; border-radius: 14px; flex: none; overflow: hidden; background: var(--tomato-soft); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--tomato); }
.pl-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-b { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pl-n { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-m { margin: 0; font-size: 13px; color: var(--ink2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pl-r { display: inline-flex; align-items: center; gap: 3px; background: var(--tomato); color: #fff; font-weight: 700; padding: 1px 7px; border-radius: 7px; font-size: 13px; }
.pl-r.none { background: var(--line); color: var(--muted); }
.pl-open { font-weight: 700; color: var(--lime-deep); background: #ECFBD0; padding: 1px 7px; border-radius: 7px; }
.pl-closed { font-weight: 600; color: var(--muted); }
.pl-acts { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.pl-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); white-space: nowrap; }
.pl-btn.go { background: var(--ink); color: #fff; }
.pl-btn svg { width: 15px; height: 15px; }
.pl-attr { margin: 2px 0 0; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-attr a { color: var(--muted); }

/* Empty, loading, setup */
.dz-box { background: var(--paper); border: 2px dashed var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.dz-box h2 { margin: 0; font-family: var(--display); font-size: 20px; letter-spacing: -0.02em; }
.dz-box p, .dz-box li { margin: 0; color: var(--ink2); font-size: 14px; line-height: 1.5; }
.dz-box ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.dz-box code { background: var(--cream); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.sk { height: 116px; border-radius: 18px; background: linear-gradient(90deg, #F6EBDD 25%, #FFF8EF 50%, #F6EBDD 75%); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.dz-mapnote { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; opacity: 0; transition: .25s; z-index: 99; max-width: 90vw; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---- App tabs: Explore, Creators, Forum, Me ---- */
.dz-tabs { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); width: calc(100% - 24px); max-width: 480px; display: flex; gap: 4px; padding: 6px; background: var(--ink); border-radius: 22px; box-shadow: 0 14px 30px -12px rgba(31, 26, 23, .5); z-index: 40; }
.dz-tab { flex: 1; min-height: 52px; border: none; border-radius: 16px; background: transparent; color: #CFC3B8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; }
.dz-tab svg { width: 22px; height: 22px; }
.dz-tab.on { background: var(--lime); color: var(--ink); font-weight: 800; }

/* ---- Community views ---- */
.cm-view { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.cm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cm-h { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.cm-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cm-btn { min-height: 42px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--ink); background: var(--tomato); color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; box-shadow: 3px 3px 0 var(--ink); flex: none; }
.cm-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.cm-btn.ghost { background: var(--paper); color: var(--ink); }
.cm-btn.lime { background: var(--lime); color: var(--ink); }
.cm-btn:disabled { opacity: .5; cursor: not-allowed; }
.cm-chips { padding: 0; overflow: visible; flex-wrap: wrap; }

.cm-card { background: var(--paper); border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; animation: pl-in .45s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 50ms); }
.cm-card.link { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.cm-card.link:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); border-color: var(--ink); }
.cm-by { display: flex; align-items: center; gap: 10px; }
.cm-av { width: 40px; height: 40px; border-radius: 50%; background: var(--tomato-soft); color: var(--tomato-deep); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 17px; flex: none; }
.cm-av.creator { background: var(--lime); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.cm-name { margin: 0; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-meta { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.cm-badge { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--ink); color: var(--lime); letter-spacing: .02em; }
.cm-kind { margin-left: auto; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 8px; background: var(--tomato-soft); color: var(--tomato-deep); white-space: nowrap; }
.cm-kind.recipe { background: #ECFBD0; color: var(--lime-deep); }
.cm-title { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.cm-body { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.55; white-space: pre-line; }
.cm-recipe { background: var(--cream); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cm-lbl { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.cm-recipe ul, .cm-recipe ol { margin: 0 0 4px; padding-left: 20px; color: var(--ink2); font-size: 14px; line-height: 1.55; }
.cm-place { margin: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.cm-place svg { width: 15px; height: 15px; color: var(--tomato); }
.cm-acts { display: flex; align-items: center; gap: 10px; }
.cm-like { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 700; font-size: 14px; color: var(--ink2); }
.cm-like svg { width: 18px; height: 18px; }
.cm-like.on { border-color: var(--tomato); color: var(--tomato); background: var(--tomato-soft); }
.cm-like.on svg { fill: currentColor; animation: heart .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes heart { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.cm-report { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; min-height: 38px; padding: 0 4px; }
.cm-report:disabled { text-decoration: none; cursor: default; }
.cm-back { align-self: flex-start; border: none; background: none; font-weight: 700; color: var(--ink2); min-height: 40px; padding: 0; display: inline-flex; align-items: center; gap: 6px; }
.cm-reply { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; display: flex; flex-direction: column; gap: 6px; }
.cm-foot { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; text-align: center; }

/* Forms (sign-in, composer) */
.cm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.cm-input { width: 100%; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 11px 14px; }
.cm-input:focus { outline: none; border-color: var(--ink); box-shadow: 3px 3px 0 var(--lime); }
textarea.cm-input { resize: vertical; min-height: 84px; line-height: 1.5; }
.cm-hint { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.cm-err { margin: 0; background: var(--tomato-soft); color: var(--tomato-deep); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.cm-demo { margin: 0; background: #FFF6D6; color: #5A4300; border: 1px dashed #C9A227; border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.cm-seg { display: flex; gap: 6px; background: var(--cream); padding: 4px; border-radius: 14px; }
.cm-seg button { flex: 1; min-height: 40px; border: none; border-radius: 11px; background: none; font-weight: 700; color: var(--ink2); }
.cm-seg button.on { background: var(--ink); color: #fff; }

/* Bottom sheet */
.cm-scrim { position: fixed; inset: 0; background: rgba(31, 26, 23, .5); z-index: 60; animation: fade .2s both; }
.cm-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--cream); border-radius: 24px 24px 0 0; border: 2px solid var(--ink); border-bottom: none; padding: 18px 16px 28px; z-index: 61; display: flex; flex-direction: column; gap: 12px; animation: up .3s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(-50%, 40px); opacity: 0; } }

/* Toasts sit above the tab bar; icons inside the back button stay small. */
#toast { bottom: 100px; }
.cm-back svg { width: 18px; height: 18px; flex: none; }
.cm-back { white-space: nowrap; }
.cm-view:not(.enter) .cm-card { animation: none; }

/* Tably logo in the header */
.dz-mark { width: 40px; height: 40px; flex: none; display: block; }

/* Notch and home bar room on phones. */
.dz-tabs { bottom: calc(12px + env(safe-area-inset-bottom)); }
.dz { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.cm-sheet { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.demo-badge { display: inline-flex; align-items: center; vertical-align: middle; font: 700 10px/1 'Inter', system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; padding: 3px 6px; border-radius: 999px; background: #FFC94A; color: #1F1A17; border: 1.5px solid #1F1A17; }
