@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600..900&family=Nunito+Sans:opsz,wght@6..12,400..900&display=swap");
:root {
  --bg: #f7f1ea;
  --bg-2: #fff9f4;
  --card: rgba(255, 255, 255, 0.86);
  --card-solid: #fffdf9;
  --ink: #211714;
  --muted: #7e7068;
  --faint: #a8988f;
  --line: rgba(79, 49, 38, 0.12);
  --accent: #ff5a4f;
  --accent-dark: #df4038;
  --accent-soft: #ffe7df;
  --orange: #ff8a4b;
  --sage: #70a96f;
  --sage-soft: #eaf5e7;
  --cream: #fff3e7;
  --yellow: #ffc870;
  --shadow: 0 24px 80px rgba(76, 45, 31, 0.16);
  --soft-shadow: 0 14px 38px rgba(81, 50, 35, 0.11);
  --tight-shadow: 0 8px 18px rgba(81, 50, 35, 0.10);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --sidebar-width: 258px;
  --right-width: 318px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 13% 9%, rgba(255, 138, 75, .16), transparent 25%),
    radial-gradient(circle at 83% 8%, rgba(112, 169, 111, .13), transparent 27%),
    linear-gradient(135deg, #faf4ec 0%, #f7f1ea 45%, #fffaf3 100%);
  overflow-x: hidden;
}

body::selection { background: var(--accent-soft); }

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 90, 79, .32);
  outline-offset: 2px;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.ambient {
  position: fixed;
  width: 300px;
  height: 300px;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(30px);
  opacity: .34;
  z-index: -1;
}

.ambient-one {
  left: -120px;
  top: 110px;
  background: #ffd3a6;
}

.ambient-two {
  right: -130px;
  bottom: 60px;
  background: #d9f0ca;
}

.app-shell {
  width: min(1500px, calc(100vw - 44px));
  min-height: calc(100vh - 44px);
  margin: 22px auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--right-width);
  border: 1px solid rgba(92, 60, 45, .09);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 253, 250, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.sidebar {
  min-height: 100%;
  padding: 30px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,248,242,.74));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 10px 22px rgba(255, 90, 79, .28);
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-link {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #2b211f;
  background: transparent;
  border-radius: 14px;
  font-weight: 750;
  text-align: left;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}

.side-link:hover {
  background: rgba(255, 90, 79, .08);
  transform: translateX(2px);
}

.side-link.active {
  color: var(--accent-dark);
  background: linear-gradient(90deg, rgba(255, 90, 79, .16), rgba(255, 138, 75, .06));
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.nav-icon.plus {
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 16px rgba(255, 90, 79, .22);
}

.tiny-avatar,
.mini-avatar,
.profile-avatar {
  background-image: url("assets/profile-jacqueline.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 999px;
  background-color: var(--accent-soft);
}

.tiny-avatar { width: 28px; height: 28px; }
.mini-avatar { width: 34px; height: 34px; border: 2px solid var(--accent); }

.collections {
  display: grid;
  gap: 10px;
}

.collections h2 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.collection-chip {
  min-height: 36px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  color: #352723;
  background: transparent;
  font-weight: 650;
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.collection-chip:hover {
  background: rgba(112, 169, 111, .11);
  transform: translateX(2px);
}

.collection-chip img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 9px;
}

.new-collection {
  width: fit-content;
  margin-top: 6px;
  padding: 9px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: transparent;
  font-weight: 750;
}

.recipe-cta {
  margin-top: auto;
  padding: 20px;
  min-height: 214px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 78%, rgba(255, 200, 112, .28), transparent 28%),
    linear-gradient(145deg, #fff4ed, #fff9f2 70%);
  border: 1px solid rgba(255, 90, 79, .11);
  box-shadow: var(--soft-shadow);
}

.recipe-cta::before {
  content: "🍓";
  position: absolute;
  left: 22px;
  bottom: 54px;
  font-size: 28px;
  transform: rotate(-14deg);
}

.recipe-cta .cta-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.recipe-cta p {
  margin: 0;
  max-width: 150px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.bowl-illo {
  position: absolute;
  right: 18px;
  bottom: 35px;
  font-size: 64px;
  filter: drop-shadow(0 12px 14px rgba(61, 34, 25, .12));
}

.cta-button,
.primary-action,
.secondary-action,
.small-ghost,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease);
}

.cta-button:hover,
.primary-action:hover,
.secondary-action:hover,
.icon-button:hover,
.small-ghost:hover,
.account-pill:hover,
.tab-pill:hover {
  transform: translateY(-1px);
}

.cta-button {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 14px 24px rgba(255, 90, 79, .22);
}

.primary-action {
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 16px 28px rgba(255, 90, 79, .23);
}

.secondary-action {
  padding: 0 18px;
  color: #2f2421;
  background: rgba(93, 65, 52, .07);
}

.secondary-action.full,
.primary-action.full { width: 100%; }

.icon-button,
.small-ghost {
  width: 42px;
  height: 42px;
  padding: 0;
  color: #2d211e;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
}

.main-panel {
  min-width: 0;
  padding: 22px 24px 32px;
}

.topbar {
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.mobile-brand,
.mobile-title-row { display: none; }

.search-box {
  max-width: 660px;
  height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  background: rgba(240, 232, 224, .68);
  border: 1px solid rgba(83, 57, 47, .06);
  border-radius: 999px;
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}

.search-box:focus-within {
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 28px rgba(74, 42, 30, .08);
}

.search-box span {
  font-size: 22px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-box input::placeholder { color: #8b7f77; }

.account-pill {
  height: 50px;
  padding: 0 14px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  color: #2b201e;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(78, 48, 35, .06);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.screen { display: none; }
.screen.active-screen { display: block; animation: screenIn .34s var(--ease); }

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

.feed-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab-pill,
.profile-tab {
  min-height: 44px;
  padding: 0 21px;
  border-radius: 999px;
  color: #4b3a34;
  background: transparent;
  font-weight: 850;
  white-space: nowrap;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}

.tab-pill.active,
.profile-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 14px 26px rgba(255, 90, 79, .22);
}

.feed-grid {
  column-count: 3;
  column-gap: 18px;
}

.food-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card-solid);
  border: 1px solid rgba(83, 50, 38, .08);
  box-shadow: 0 12px 30px rgba(71, 44, 33, .08);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.food-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(71, 44, 33, .13);
  border-color: rgba(255, 90, 79, .18);
}

.card-media {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #ead9cd;
}

.card-media img {
  width: 100%;
  min-height: 190px;
  max-height: 315px;
  object-fit: cover;
  transition: transform .45s var(--ease);
}

.food-card:hover .card-media img { transform: scale(1.035); }

.card-menu {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #2d2421;
  background: rgba(255, 255, 255, .88);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: var(--tight-shadow);
}

.recipe-badge,
.type-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #33251f;
  background: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 850;
  box-shadow: var(--tight-shadow);
}

.card-body { padding: 13px 14px 14px; }

.author-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin-bottom: 8px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--sage));
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(69, 42, 31, .16);
}

.author-copy {
  min-width: 0;
  line-height: 1.1;
}

.author-name {
  display: block;
  color: #3a2924;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-time {
  color: var(--faint);
  font-size: 12px;
  font-weight: 650;
}

.food-card h3 {
  margin: 6px 0 6px;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.food-card p {
  margin: 0;
  color: #67544d;
  font-size: 13.5px;
  line-height: 1.4;
}

.action-row {
  margin-top: 13px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.card-action {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6d5b53;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.card-action .heart {
  font-size: 20px;
  filter: drop-shadow(0 4px 7px rgba(255, 90, 79, .22));
}

.card-action.liked .heart { color: var(--accent); }
.card-action.saved { color: var(--ink); }

.save-button {
  justify-self: end;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #3f322d;
  background: rgba(107, 83, 70, .06);
}

.save-button.saved {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 44px;
  border: 1px dashed rgba(93, 63, 48, .18);
  border-radius: 26px;
  background: rgba(255, 255, 255, .65);
  text-align: center;
  color: var(--muted);
}

.right-panel {
  min-width: 0;
  padding: 94px 22px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-card,
.story-panel,
.activity-panel,
.profile-hero-card,
.recipe-card,
.friend-card {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(83, 50, 38, .1);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(71, 44, 33, .07);
}

.profile-card {
  padding: 22px;
}

.profile-top {
  position: relative;
  width: max-content;
  margin: 0 auto 18px;
}

.big-avatar {
  width: 82px;
  height: 82px;
  display: block;
  border: 4px solid #fff;
  outline: 3px solid var(--accent);
  box-shadow: 0 14px 30px rgba(63, 37, 27, .16);
}

.profile-top .small-ghost {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  font-size: 13px;
  background: #fff;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 18px;
  text-align: center;
}

.profile-stats strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.profile-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-card h2,
.profile-hero-card h1 {
  margin: 0 0 3px;
  font-size: 17px;
  letter-spacing: -.03em;
}

.green-text {
  margin: 0 0 8px;
  color: var(--sage);
  font-weight: 850;
  font-size: 13px;
}

.profile-card p,
.profile-hero-card p {
  color: #5c4a43;
  line-height: 1.45;
  font-size: 13px;
}

.location-line { margin: 10px 0 5px; color: var(--muted) !important; }
.profile-link { margin: 0 0 16px; color: var(--accent) !important; font-weight: 800; }

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

.panel-title h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.panel-title button {
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.story-panel,
.activity-panel { padding: 16px; }

.stories-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.story {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  background: transparent;
}

.story img {
  width: 48px;
  height: 48px;
  padding: 2px;
  object-fit: cover;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #fff;
}

.story span {
  max-width: 58px;
  color: #695950;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-list {
  display: grid;
  gap: 13px;
}

.activity-item {
  display: grid;
  grid-template-columns: 34px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.activity-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sage), var(--orange));
}

.activity-copy {
  min-width: 0;
}

.activity-copy strong {
  display: block;
  color: #352722;
  font-size: 13px;
}

.activity-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.28;
}

.activity-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
}

.section-header {
  margin: 8px 0 22px;
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 94% 20%, rgba(255, 200, 112, .24), transparent 28%),
    rgba(255,255,255,.68);
  border: 1px solid rgba(83, 50, 38, .08);
}

.section-header.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.section-header h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -.055em;
  line-height: .98;
}

.muted { color: var(--muted); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.tag-button {
  min-height: 40px;
  padding: 0 15px;
  color: #44342f;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(83, 50, 38, .08);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(71, 44, 33, .05);
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}

.tag-button.active,
.tag-button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  transform: translateY(-1px);
}

.recipe-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.recipe-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
}

.recipe-card img {
  width: 100%;
  height: 100%;
  min-height: 214px;
  object-fit: cover;
}

.recipe-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipe-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-meta span {
  padding: 6px 9px;
  color: #5d4c45;
  background: rgba(240, 229, 220, .64);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.recipe-card .secondary-action { margin-top: auto; width: fit-content; }

.friend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.friend-card {
  padding: 18px;
  overflow: hidden;
  position: relative;
}

.friend-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 70px;
  background: linear-gradient(135deg, rgba(255, 90, 79, .2), rgba(112, 169, 111, .18));
  z-index: 0;
}

.friend-card > * { position: relative; z-index: 1; }

.friend-avatar {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 18px auto 12px;
  color: #fff;
  border: 4px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--sage));
  font-size: 22px;
  font-weight: 950;
  box-shadow: var(--tight-shadow);
}

.friend-card h3,
.friend-card p { text-align: center; }
.friend-card h3 { margin: 0 0 4px; }
.friend-card p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.profile-hero-card {
  max-width: 680px;
  margin: 0 auto 18px;
  padding: 24px;
  text-align: center;
}

.profile-hero-card .profile-top { margin-bottom: 20px; }

.profile-hero-card .profile-bio {
  max-width: 430px;
  margin: 8px auto;
}

.profile-stories,
.profile-tabs,
.profile-grid {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.profile-stories { padding: 16px; margin-bottom: 18px; }

.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.bottom-nav,
.mobile-fab { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(30, 20, 16, .42);
  backdrop-filter: blur(18px);
}

.modal-backdrop.open { display: flex; animation: fadeIn .18s ease-out; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: min(760px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: var(--card-solid);
  border: 1px solid rgba(83, 50, 38, .12);
  box-shadow: 0 34px 90px rgba(35, 22, 16, .32);
  animation: modalIn .23s var(--ease);
}

.compact-modal { width: min(540px, 100%); }

@keyframes modalIn {
  from { transform: translateY(18px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.05em;
}

.close-modal {
  font-size: 26px;
  line-height: 1;
}

.quick-post-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.quick-post-row button {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #3e2f29;
  background: #fff4e9;
  border: 1px solid rgba(83, 50, 38, .08);
  border-radius: 18px;
  font-weight: 800;
}

.quick-post-row button span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eaf5e7;
  font-size: 24px;
}

.post-form {
  display: grid;
  gap: 14px;
}

.post-form label {
  display: grid;
  gap: 7px;
  color: #43322d;
  font-size: 13px;
  font-weight: 850;
}

.post-form input,
.post-form select,
.post-form textarea {
  width: 100%;
  border: 1px solid rgba(83, 50, 38, .14);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 250, 245, .74);
  padding: 12px 13px;
  outline: none;
  transition: border .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

.post-form textarea { resize: vertical; min-height: 96px; }

.post-form input:focus,
.post-form select:focus,
.post-form textarea:focus {
  border-color: rgba(255, 90, 79, .45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 90, 79, .09);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.upload-drop {
  min-height: 230px;
  display: grid !important;
  place-items: center;
  overflow: hidden;
  position: relative;
  border: 1.5px dashed rgba(255, 90, 79, .3);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 200, 112, .2), transparent 24%),
    linear-gradient(135deg, #fff5ee, #fffdf9);
  text-align: center;
  cursor: pointer;
}

.upload-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.upload-drop img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

#uploadPrompt {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

#uploadPrompt::before {
  content: "📷";
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
  border-radius: 18px;
  background: var(--accent-soft);
  font-size: 28px;
}

#uploadPrompt strong { color: var(--ink); font-size: 17px; }
#uploadPrompt small { font-size: 13px; }

.recipe-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recipe-fields[hidden] { display: none !important; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.recipe-detail img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 15px;
}

.recipe-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.recipe-columns section {
  padding: 16px;
  border-radius: 18px;
  background: rgba(250, 241, 234, .64);
}

.recipe-columns h3 { margin: 0 0 10px; }
.recipe-columns li { margin-bottom: 8px; color: #5b4a43; line-height: 1.4; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: #251915;
  box-shadow: var(--shadow);
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}

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

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 226px minmax(0, 1fr) 292px; }
  .sidebar { padding: 26px 18px; }
  .feed-grid { column-count: 2; }
  .recipe-list { grid-template-columns: 1fr; }
}

@media (max-width: 1060px) {
  .app-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .right-panel { display: none; }
  .topbar { grid-template-columns: minmax(240px, 1fr) auto auto; }
  .profile-stories { display: block; }
}

@media (min-width: 1061px) {
  .profile-stories { display: none; }
}

@media (max-width: 820px) {
  body {
    background: linear-gradient(180deg, #fffaf6 0%, #f7f1ea 100%);
  }

  .ambient { display: none; }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: block;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .sidebar { display: none; }

  .main-panel {
    padding: max(18px, env(safe-area-inset-top)) 14px calc(108px + env(safe-area-inset-bottom));
  }

  .topbar {
    display: flex;
    min-height: 54px;
    gap: 10px;
    margin-bottom: 10px;
  }

  .mobile-brand {
    display: inline-flex;
    color: var(--accent);
    font-size: 25px;
    letter-spacing: -.055em;
  }

  .mobile-brand .brand-mark { display: none; }

  .topbar .icon-button { margin-left: auto; }
  .topbar .search-box,
  .topbar .account-pill { display: none; }

  .mobile-title-row { display: none; }

  .feed-tabs {
    gap: 8px;
    margin: 8px -14px 15px;
    padding: 0 14px;
  }

  .tab-pill,
  .profile-tab {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }

  .feed-grid {
    column-count: 2;
    column-gap: 10px;
  }

  .food-card {
    margin-bottom: 11px;
    border-radius: 15px;
    box-shadow: 0 10px 22px rgba(71, 44, 33, .08);
  }

  .card-media { border-radius: 15px 15px 0 0; }
  .card-media img { min-height: 138px; max-height: 230px; }

  .card-body { padding: 9px 9px 10px; }
  .author-row { display: none; }
  .food-card h3 { font-size: 13px; margin-top: 0; }
  .food-card p { display: none; }
  .action-row { margin-top: 7px; grid-template-columns: auto 1fr auto; gap: 8px; }
  .card-action.comment-action { display: none; }
  .save-button { width: 28px; height: 28px; }
  .recipe-badge, .type-badge { font-size: 10px; padding: 5px 8px; }
  .card-menu { width: 28px; height: 28px; }

  .section-header,
  .section-header.split {
    display: block;
    padding: 20px;
    margin: 6px 0 16px;
    border-radius: 22px;
  }

  .section-header h1 { font-size: 31px; }
  .section-header .primary-action,
  .section-header .secondary-action { margin-top: 14px; }

  .tag-cloud { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -14px; }
  .tag-cloud::-webkit-scrollbar { display: none; }
  .tag-button { white-space: nowrap; }

  .recipe-list,
  .friend-grid { grid-template-columns: 1fr; }
  .recipe-card { grid-template-columns: 132px minmax(0, 1fr); border-radius: 20px; }
  .recipe-card img { min-height: 188px; }
  .recipe-card-body { padding: 14px; }
  .recipe-card h3 { font-size: 18px; }

  .profile-hero-card { padding: 20px; border-radius: 22px; }
  .profile-tabs { justify-content: flex-start; overflow-x: auto; }

  .bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 70;
    height: 70px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 7px 8px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(83, 50, 38, .1);
    box-shadow: 0 18px 50px rgba(71, 44, 33, .18);
    backdrop-filter: blur(18px);
  }

  .bottom-item {
    height: 56px;
    display: grid;
    place-items: center;
    gap: 2px;
    color: #74665e;
    background: transparent;
    border-radius: 18px;
    font-weight: 850;
  }

  .bottom-item span { font-size: 23px; line-height: 1; }
  .bottom-item small { font-size: 10px; }
  .bottom-item.active { color: var(--accent); }

  .bottom-item.center {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    box-shadow: 0 13px 28px rgba(255, 90, 79, .30);
    transform: translateY(-13px);
  }

  .bottom-item.center span { font-size: 29px; }
  .nav-mini { width: 24px; height: 24px; border: 2px solid var(--accent); }

  .mobile-fab { display: none; }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 28px 28px 0 0;
    padding: 20px;
  }

  .quick-post-row { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .quick-post-row button { min-height: 76px; font-size: 11px; border-radius: 16px; }
  .quick-post-row button span { width: 38px; height: 38px; font-size: 20px; }
  .form-grid, .recipe-fields, .recipe-columns { grid-template-columns: 1fr; }
  .modal-actions { position: sticky; bottom: -20px; padding-top: 12px; background: var(--card-solid); }
  .toast { bottom: 94px; width: max-content; max-width: calc(100vw - 30px); }
}

@media (max-width: 390px) {
  .main-panel { padding-left: 10px; padding-right: 10px; }
  .feed-tabs { margin-left: -10px; margin-right: -10px; padding: 0 10px; }
  .feed-grid { column-gap: 8px; }
  .food-card h3 { font-size: 12px; }
  .card-action { font-size: 11px; }
  .recipe-card { grid-template-columns: 1fr; }
  .recipe-card img { height: 180px; }
}

/* Backend/auth additions */
.auth-pill {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 12px 24px rgba(255, 90, 79, .24);
  white-space: nowrap;
}

.auth-pill:hover,
.text-action:hover {
  transform: translateY(-1px);
}

.text-action {
  color: var(--accent-dark);
  background: transparent;
  font-weight: 850;
  padding: 11px 14px;
  border-radius: 999px;
}

.stack-actions {
  align-items: center;
  flex-wrap: wrap;
}

.auth-modal .muted {
  margin-top: 6px;
}

.image-avatar {
  background-size: cover !important;
  background-position: center !important;
  color: transparent !important;
}

.remote-card .author-time::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 999px;
  background: var(--sage);
  vertical-align: 1px;
}

.comments-modal {
  max-width: 560px;
}

.comments-list {
  display: grid;
  gap: 12px;
  max-height: min(430px, 52vh);
  overflow: auto;
  padding-right: 4px;
}

.comment-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}

.comment-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.comment-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.comment-item p {
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.45;
}

.comment-item small,
.comment-loading {
  color: var(--muted);
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.comment-form textarea {
  resize: vertical;
  width: 100%;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, .88);
}

.empty-state.slim {
  min-height: auto;
  padding: 18px;
}

@media (max-width: 760px) {
  .auth-pill {
    display: none;
  }
}

/* Admin and real-user profile polish */
.admin-badge,
.admin-mini,
.admin-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 850;
  letter-spacing: .02em;
}

.admin-badge {
  margin: -6px 0 8px;
  padding: 7px 12px;
  color: #8a2d21;
  background: linear-gradient(135deg, #fff0e9, #ffd0c2);
  border: 1px solid rgba(255, 90, 79, .24);
  box-shadow: 0 10px 22px rgba(255, 90, 79, .10);
}

.admin-mini {
  margin-left: 6px;
  padding: 3px 7px;
  font-size: 11px;
  color: #ff5a4f;
  background: rgba(255, 90, 79, .12);
}

.admin-status {
  padding: 10px 14px;
  color: #3f806d;
  background: rgba(112, 169, 111, .13);
  border: 1px solid rgba(112, 169, 111, .18);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.admin-stats article,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--soft-shadow);
}

.admin-stats article {
  padding: 22px;
}

.admin-stats strong {
  display: block;
  font-size: 34px;
  letter-spacing: -.05em;
}

.admin-stats span {
  color: var(--muted);
  font-weight: 750;
}

.admin-panel {
  padding: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
}

.admin-row + .admin-row {
  border-top: 1px solid var(--line);
}

.admin-row img {
  width: 72px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
}

.admin-row strong,
.admin-row span {
  display: block;
}

.admin-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.danger-action {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #b9271d;
  background: rgba(255, 90, 79, .12);
  font-weight: 850;
}

.danger-action:hover {
  background: rgba(255, 90, 79, .2);
}

/* Fresh launch empty-state polish */
.empty-state {
  min-height: 300px;
  padding: 44px 28px;
  border-style: dashed;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 90, 79, .08), transparent 28%),
    radial-gradient(circle at 85% 85%, rgba(112, 169, 111, .10), transparent 34%),
    rgba(255, 255, 255, .78);
}

.empty-state > div {
  max-width: 360px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.empty-state h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 90, 79, .18), rgba(255, 200, 112, .18));
  box-shadow: var(--tight-shadow);
  font-size: 28px;
}

.empty-action {
  margin-top: 8px;
}

.mini-empty {
  width: 100%;
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed rgba(93, 63, 48, .16);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
  line-height: 1.35;
  background: rgba(255, 255, 255, .62);
}

.activity-list .mini-empty {
  min-height: 112px;
}

/* =========================================================
   BiteBoard final avatar + admin guard polish
   ========================================================= */

/* Center all text-only avatars perfectly and prevent line-height drift. */
.profile-avatar,
.mini-avatar,
.tiny-avatar,
.nav-mini,
.author-avatar,
.activity-avatar,
.friend-avatar,
.comment-avatar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.profile-avatar,
.big-avatar {
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
  font-size: 30px;
  font-weight: 850;
}

.mini-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 12px;
  font-weight: 850;
}

.tiny-avatar,
.nav-mini {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 10px;
  font-weight: 850;
}

.author-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.friend-avatar {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.profile-top {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-top .small-ghost {
  position: relative;
  margin-left: -24px;
  margin-top: 74px;
  z-index: 3;
}

[hidden] {
  display: none !important;
}

/* =========================
   BiteBoard polish + profile features
   ========================= */
button,
.primary-action,
.secondary-action,
.auth-pill,
.account-pill,
.tab-pill,
.profile-tab,
.side-link,
.pin-button {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.primary-action,
.secondary-action,
.auth-pill,
.account-pill,
.tab-pill,
.profile-tab,
.cta-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 90, 79, .10);
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

.primary-action::before,
.cta-button::before,
.tab-pill.active::before,
.profile-tab.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,.24), transparent 42%, rgba(255,255,255,.18));
  opacity: .75;
  pointer-events: none;
}

.primary-action:hover,
.cta-button:hover,
.auth-pill:hover,
.account-pill:hover,
.tab-pill:hover,
.profile-tab:hover,
.secondary-action:hover {
  transform: translateY(-2px) scale(1.01);
}

.primary-action:active,
.cta-button:active,
.auth-pill:active,
.account-pill:active,
.tab-pill:active,
.profile-tab:active,
.secondary-action:active {
  transform: translateY(0) scale(.985);
}

.primary-action,
.cta-button,
.tab-pill.active,
.profile-tab.active {
  background: linear-gradient(135deg, #ff514d 0%, #ff7644 55%, #ff9a54 100%);
  box-shadow: 0 16px 32px rgba(255, 90, 79, .26), inset 0 1px 0 rgba(255,255,255,.25);
}

.secondary-action,
.auth-pill,
.account-pill {
  background: rgba(255, 255, 255, .78);
  border-color: rgba(79, 49, 38, .10);
  box-shadow: 0 10px 24px rgba(77, 47, 35, .08), inset 0 1px 0 rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
}

.friend-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}

.friend-search {
  min-height: 50px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(79, 49, 38, .10);
  box-shadow: 0 12px 30px rgba(71, 44, 33, .07);
}

.friend-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.friend-search-count {
  flex: 0 0 auto;
  padding: 11px 14px;
  border-radius: 999px;
  color: #6b554d;
  background: rgba(255, 231, 223, .72);
  font-weight: 850;
  font-size: 13px;
}

.profile-photo-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 231, 223, .66), rgba(255, 249, 244, .78));
  border: 1px solid rgba(255, 90, 79, .12);
}

.profile-avatar-preview {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  border: 4px solid #fff;
  color: #241714;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(75, 42, 30, .14);
}

.profile-photo-picker {
  margin: 0;
}

.profile-photo-picker input {
  width: 100%;
  margin-top: 8px;
}

.profile-photo-picker small,
.optional-label {
  display: inline-block;
  margin-left: 4px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 750;
}

.pin-button {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  color: #37251f;
  background: rgba(255, 255, 255, .91);
  border: 1px solid rgba(79, 49, 38, .10);
  box-shadow: var(--tight-shadow);
  font-size: 12px;
  font-weight: 950;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}

.pin-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(71, 44, 33, .14);
}

.pin-button.pinned {
  color: #fff;
  background: linear-gradient(135deg, #ff514d, #ff8a4b);
  border-color: rgba(255,255,255,.36);
}

.pinned-card {
  border-color: rgba(255, 90, 79, .28);
  box-shadow: 0 18px 46px rgba(255, 90, 79, .12), 0 12px 30px rgba(71, 44, 33, .08);
}

.profile-pin-note {
  max-width: 980px;
  margin: -8px auto 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}

.profile-avatar,
.mini-avatar,
.tiny-avatar,
.nav-mini,
.author-avatar,
.friend-avatar,
.comment-avatar,
.activity-avatar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  transform: translateY(.5px);
  letter-spacing: -.02em;
}

.big-avatar .avatar-initials,
.profile-avatar.big-avatar .avatar-initials {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 950;
}

.mini-avatar .avatar-initials,
.tiny-avatar .avatar-initials,
.nav-mini .avatar-initials {
  font-size: 12px;
  font-weight: 950;
}

.image-avatar .avatar-initials {
  display: none;
}

@media (max-width: 700px) {
  .friend-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .friend-search-count {
    width: fit-content;
  }

  .profile-photo-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}


/* =========================
   BiteBoard universal search fix
   ========================= */
.topbar {
  position: relative;
  z-index: 40;
}

.search-box {
  position: relative;
  box-shadow: 0 10px 26px rgba(87, 50, 32, .05);
}

.search-box input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.global-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(660px, calc(100vw - 420px));
  min-width: 360px;
  z-index: 80;
}

.global-search-panel[hidden] { display: none; }

.global-search-card {
  padding: 14px;
  border: 1px solid rgba(82, 55, 43, .10);
  border-radius: 28px;
  background: rgba(255, 253, 249, .98);
  box-shadow: 0 24px 70px rgba(74, 42, 30, .18);
  backdrop-filter: blur(18px);
}

.global-search-top,
.search-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.global-search-top {
  padding: 5px 6px 12px;
  color: var(--muted);
  font-size: 13px;
}

.global-search-top strong { color: var(--ink); }

.global-search-top button,
.search-section-title button {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255, 90, 79, .09);
  font-size: 12px;
  font-weight: 850;
}

.global-search-card section + section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(82, 55, 43, .08);
}

.search-section-title {
  margin-bottom: 8px;
  padding: 0 4px;
  color: #6f625a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.search-result-row {
  width: 100%;
  min-height: 58px;
  padding: 8px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.search-result-row:hover {
  background: rgba(255, 90, 79, .07);
  transform: translateY(-1px);
}

.search-result-row img,
.search-result-icon,
.search-result-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1e7, #ffe0d8);
}

.search-result-avatar {
  border-radius: 999px;
  color: #231815;
  font-weight: 900;
}

.search-result-row strong,
.search-result-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-row strong {
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 900;
}

.search-result-row small {
  color: var(--muted);
  font-size: 12px;
}

.search-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-tag-pill {
  padding: 10px 13px;
  border-radius: 999px;
  color: #3a2924;
  background: rgba(242, 232, 224, .82);
  font-weight: 850;
}

.search-tag-pill:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
}

.search-empty {
  min-height: 160px;
  padding: 22px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
}

.search-empty strong {
  font-size: 20px;
  font-weight: 950;
}

.search-empty span {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .global-search-panel {
    width: min(660px, calc(100vw - 80px));
  }
}

@media (max-width: 780px) {
  .global-search-panel {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    width: auto;
    min-width: 0;
  }
}


/* =========================
   Public beta quality-of-life polish
   ========================= */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button:disabled,
button.is-busy,
.primary-action.is-busy,
.secondary-action.is-busy {
  cursor: wait;
  opacity: .72;
  pointer-events: none;
}

.search-box:focus-within {
  outline: 1px solid rgba(255, 90, 79, .18);
}

.global-search-panel {
  max-height: min(70vh, 620px);
  overflow: auto;
  scrollbar-width: thin;
}

.global-search-card {
  transform-origin: top left;
  animation: biteboardSearchIn .16s var(--ease);
}

@keyframes biteboardSearchIn {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.food-card,
.recipe-card,
.friend-card,
.profile-card,
.profile-hero-card,
.empty-state {
  backface-visibility: hidden;
}

.modal-card {
  max-height: min(92vh, 920px);
  overflow: auto;
}

.upload-drop input,
.profile-photo-picker input {
  cursor: pointer;
}

.profile-link,
.location-line,
.green-text,
.profile-bio {
  overflow-wrap: anywhere;
}

.empty-state .primary-action,
.search-empty .primary-action {
  justify-self: center;
}

@media (max-width: 1080px) {
  .app-shell {
    width: min(100vw - 18px, 1500px);
    margin: 9px auto 86px;
    border-radius: 26px;
  }
}

@media (max-width: 760px) {
  .global-search-panel {
    top: 68px;
    max-height: calc(100vh - 120px);
  }

  .modal-card {
    width: min(100vw - 20px, 680px);
    max-height: calc(100vh - 32px);
    border-radius: 28px;
  }

  .search-result-row {
    min-height: 64px;
  }
}

/* =========================
   BiteBoard haze + empty feed cleanup
   ========================= */
.empty-state,
.feed-grid .empty-state,
.explore-grid .empty-state,
.profile-grid .empty-state {
  background: rgba(255, 255, 255, .94) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 18px 40px rgba(65, 40, 28, .06) !important;
  border-color: rgba(95, 64, 49, .14) !important;
}

.empty-state > div {
  background: transparent !important;
  filter: none !important;
}

.empty-icon {
  background: linear-gradient(135deg, #fff0eb, #fff7e9) !important;
  box-shadow: 0 10px 24px rgba(255, 90, 79, .12) !important;
}

.empty-state h3,
.empty-state p {
  text-shadow: none !important;
  filter: none !important;
}

.empty-state h3 {
  max-width: 420px;
}

.empty-action,
.empty-state .primary-action,
.empty-state .secondary-action {
  filter: none !important;
}

/* Make the feed intro area feel intentional when the board is empty. */
.feed-grid:has(.empty-state) {
  align-items: stretch;
}

.feed-grid:has(.empty-state) .empty-state {
  min-height: 280px;
}

/* Cleaner search panel: hide fully when empty and avoid blank white strips. */
.global-search-panel[hidden],
.global-search-results[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.global-search-panel,
.global-search-results {
  filter: none !important;
}

/* =========================
   Post actions, video upload, and recipe-only cook-time fixes
   ========================= */
.form-grid.one-column {
  grid-template-columns: 1fr;
}

.field-hint {
  display: inline;
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.upload-drop video,
.upload-video-preview {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 20px;
  background: #1f1714;
}

.card-media img,
.card-media video,
.post-video {
  width: 100%;
  min-height: 190px;
  max-height: 315px;
  object-fit: cover;
  display: block;
  transition: transform .45s var(--ease);
}

.food-card:hover .card-media img,
.food-card:hover .card-media video {
  transform: scale(1.025);
}

.post-video {
  background: #160f0d;
}

.action-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.card-action,
.save-button,
.save-action {
  min-height: 36px;
  width: 100%;
  height: auto;
  padding: 8px 10px;
  justify-content: center;
  border-radius: 999px;
  color: #4e3d36;
  background: rgba(255, 244, 236, .86);
  border: 1px solid rgba(83, 50, 38, .08);
  box-shadow: 0 7px 16px rgba(71, 44, 33, .06);
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.card-action:hover,
.save-button:hover,
.save-action:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(255, 90, 79, .22);
}

.card-action .heart {
  font-size: 17px;
}

.card-action.liked,
.card-action.liked .heart,
.save-button.saved,
.save-action.saved {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: rgba(255, 90, 79, .18);
}

.action-label {
  font-weight: 850;
}

.action-count {
  opacity: .78;
  font-variant-numeric: tabular-nums;
}

.post-options-menu {
  position: fixed;
  z-index: 120;
  width: 220px;
  padding: 8px;
  display: grid;
  gap: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(83, 50, 38, .12);
  box-shadow: 0 24px 70px rgba(63, 38, 28, .2);
  backdrop-filter: blur(18px);
}

.post-options-menu button {
  min-height: 40px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  color: #352722;
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.post-options-menu button:hover {
  background: rgba(255, 90, 79, .09);
}

.post-options-menu button.danger {
  color: #b63c32;
}

.quick-post-row button[data-post-kind="video"] span {
  background: #ffe8df;
}

@media (max-width: 720px) {
  .action-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .card-action,
  .save-button,
  .save-action {
    min-height: 32px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .card-action.comment-action {
    display: inline-flex !important;
  }

  .action-label {
    display: none;
  }

  .card-media img,
  .card-media video,
  .post-video {
    min-height: 138px;
    max-height: 230px;
  }
}

/* =========================
   Auth/empty-feed layout fix
   ========================= */
.topbar {
  grid-template-columns: minmax(250px, 1fr) auto auto auto;
}

body.is-authenticated #authButton,
#authButton[hidden] {
  display: none !important;
}

/* Prevent the auth button from dropping into a blank second row. */
.auth-pill {
  width: auto;
  justify-self: end;
}

/* If the board is empty and the user is signed in, keep the CTA clean and not guest-like. */
body.is-authenticated .empty-state p {
  color: #6f5c54;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(180px, 1fr) auto auto;
  }
  .auth-pill {
    display: none;
  }
}

/* =========================
   Topbar blank-bar + profile empty-grid fix
   ========================= */

/* The old separate auth button caused the blank white bar under the search area.
   The account pill now handles sign-in/profile navigation. */
#authButton,
.auth-pill,
.topbar > #authButton,
.topbar > .auth-pill {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Search results should never reserve layout space when empty. */
#globalSearchPanel:empty,
.global-search-panel:empty,
.global-search-panel[hidden],
.global-search-results:empty,
.global-search-results[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* With the separate auth button gone, the topbar has three real desktop columns. */
.topbar {
  grid-template-columns: minmax(250px, 1fr) auto auto !important;
  align-items: center !important;
}

/* Profile tab empty states: disable masonry/columns so the card does not split,
   cut off, or drift into two choppy blocks. */
.profile-grid.profile-grid-empty,
.profile-grid:has(.empty-state) {
  column-count: initial !important;
  column-gap: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  place-items: center !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 720px !important;
  margin: 22px auto 0 !important;
}

.profile-grid.profile-grid-empty .empty-state,
.profile-grid:has(.empty-state) .empty-state {
  width: 100% !important;
  min-height: 260px !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  overflow: visible !important;
}

.profile-grid.profile-grid-empty .empty-state > div,
.profile-grid:has(.empty-state) .empty-state > div {
  width: min(100%, 520px) !important;
  display: grid !important;
  place-items: center !important;
  gap: 12px !important;
  margin: 0 auto !important;
}

.profile-grid.profile-grid-empty .empty-state h3,
.profile-grid:has(.empty-state) .empty-state h3,
.profile-grid.profile-grid-empty .empty-state p,
.profile-grid:has(.empty-state) .empty-state p {
  max-width: 520px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.profile-pin-note {
  text-align: center !important;
  margin: 16px auto 12px !important;
}

@media (max-width: 780px) {
  .topbar {
    grid-template-columns: 1fr auto !important;
  }

  .profile-grid.profile-grid-empty,
  .profile-grid:has(.empty-state) {
    max-width: 100% !important;
    margin-top: 16px !important;
  }

  .profile-grid.profile-grid-empty .empty-state,
  .profile-grid:has(.empty-state) .empty-state {
    min-height: 220px !important;
  }
}


/* =========================
   BiteBoard food-brand polish pass
   Warmer typography, cleaner empty states, less generated-looking UI.
   ========================= */
:root {
  --bg: #fbf3e9;
  --bg-2: #fffaf4;
  --card: rgba(255, 252, 247, 0.92);
  --card-solid: #fffaf3;
  --ink: #241714;
  --muted: #75655d;
  --faint: #a08b80;
  --line: rgba(70, 43, 31, 0.13);
  --accent: #f2553f;
  --accent-dark: #c83d2f;
  --accent-soft: #ffe1d8;
  --orange: #f99b45;
  --sage: #678d5b;
  --sage-soft: #edf4e9;
  --cream: #fff1df;
  --yellow: #efb44a;
  --shadow: 0 22px 64px rgba(75, 47, 33, 0.14);
  --soft-shadow: 0 12px 34px rgba(82, 52, 36, 0.10);
  --tight-shadow: 0 7px 18px rgba(82, 52, 36, 0.09);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 11% 6%, rgba(242, 85, 63, .09), transparent 24%),
    radial-gradient(circle at 92% 8%, rgba(239, 180, 74, .13), transparent 22%),
    radial-gradient(circle at 74% 96%, rgba(103, 141, 91, .10), transparent 28%),
    linear-gradient(135deg, #fbf0e5 0%, #fffaf3 52%, #f8f2e8 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3,
.brand,
.mobile-brand,
.section-header h1,
.profile-card h2,
.profile-hero-card h1,
.food-card h3,
.recipe-card h3,
.modal-card h2,
.empty-state h3 {
  font-family: var(--font-display);
  letter-spacing: -0.045em;
  font-weight: 820;
}

button,
input,
select,
textarea {
  font-family: var(--font-body);
}

.ambient {
  opacity: .18;
  filter: blur(42px);
}

.app-shell {
  background: rgba(255, 251, 245, .82);
  border-color: rgba(87, 58, 41, .11);
  box-shadow: 0 18px 55px rgba(70, 42, 30, .12);
}

.sidebar,
.right-panel,
.topbar {
  background: linear-gradient(180deg, rgba(255, 252, 247, .94), rgba(255, 247, 239, .76));
}

.brand-mark {
  border-radius: 14px;
  background: linear-gradient(145deg, #f2553f 0%, #ff7f48 58%, #f4ba58 100%);
  box-shadow: 0 10px 24px rgba(242, 85, 63, .24);
}

.side-link,
.tab-pill,
.profile-tab,
.primary-action,
.secondary-action,
.cta-button,
.account-pill,
.collection-chip,
.tag-button,
.friend-card button,
.card-action,
.save-button,
.pin-button {
  border-radius: 999px;
  font-weight: 820;
  letter-spacing: -0.015em;
}

.side-link {
  color: #38251f;
}

.side-link.active,
.tab-pill.active,
.profile-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff874a);
  box-shadow: 0 13px 28px rgba(242, 85, 63, .20);
}

.tab-pill,
.profile-tab {
  background: rgba(255, 251, 246, .74);
  border: 1px solid rgba(242, 85, 63, .14);
  min-height: 48px;
  padding-inline: 24px;
  box-shadow: none;
}

.tab-pill:not(.active):hover,
.profile-tab:not(.active):hover,
.side-link:not(.active):hover {
  background: rgba(255, 226, 216, .48);
  transform: translateY(-1px);
}

.primary-action,
.cta-button,
.empty-action {
  background: linear-gradient(135deg, #f2553f 0%, #ff8547 100%);
  color: #fff;
  border: 1px solid rgba(160, 54, 38, .08);
  box-shadow: 0 14px 32px rgba(242, 85, 63, .22);
}

.primary-action:hover,
.cta-button:hover,
.empty-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 17px 38px rgba(242, 85, 63, .28);
}

.secondary-action,
.account-pill,
.icon-button {
  background: rgba(255, 252, 248, .92);
  border: 1px solid rgba(74, 45, 32, .10);
  box-shadow: 0 8px 22px rgba(70, 43, 31, .08);
}

.search-box,
.friend-search,
.form-grid input,
.form-grid select,
.modal-card textarea,
.modal-card input,
.modal-card select {
  background: rgba(255, 250, 244, .88);
  border: 1px solid rgba(84, 54, 39, .11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76);
}

.search-box:focus-within,
.friend-search:focus-within,
.form-grid input:focus,
.form-grid select:focus,
.modal-card textarea:focus,
.modal-card input:focus,
.modal-card select:focus {
  border-color: rgba(242, 85, 63, .42);
  box-shadow: 0 0 0 4px rgba(242, 85, 63, .10), inset 0 1px 0 rgba(255,255,255,.78);
}

.section-header,
.profile-card,
.profile-hero-card,
.story-panel,
.activity-panel,
.recipe-card,
.friend-card,
.admin-panel,
.comments-card,
.modal-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,250,244,.88));
  border: 1px solid rgba(78, 49, 35, .11);
  box-shadow: 0 12px 34px rgba(70, 43, 31, .08);
}

.section-header::before,
.profile-card::before,
.profile-hero-card::before,
.food-card::before,
.empty-state::before {
  content: none !important;
}

.food-card {
  background: rgba(255, 252, 248, .94);
  border: 1px solid rgba(81, 49, 35, .12);
  border-radius: 26px;
  box-shadow: 0 12px 28px rgba(64, 39, 28, .10);
  overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}

.food-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(64, 39, 28, .13);
  border-color: rgba(242, 85, 63, .20);
}

.card-media {
  background: #f4eadf;
}

.card-media img,
.card-media video,
.post-video {
  object-fit: cover;
  filter: saturate(1.04) contrast(1.01);
}

.card-body {
  padding: 18px 18px 19px;
}

.food-card h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: .98;
  margin: 12px 0 8px;
}

.food-card p {
  color: #6f5f57;
  font-size: 15px;
  line-height: 1.5;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.card-action,
.save-button {
  min-height: 38px;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  background: rgba(248, 241, 233, .82);
  border: 1px solid rgba(78, 49, 35, .08);
  color: #66554b;
}

.card-action:hover,
.save-button:hover,
.card-action.liked,
.save-button.saved {
  color: var(--accent-dark);
  background: rgba(255, 226, 216, .78);
}

.card-menu {
  background: rgba(255, 252, 248, .92);
  border: 1px solid rgba(70, 43, 31, .10);
  box-shadow: 0 8px 20px rgba(53, 34, 24, .10);
}

.recipe-badge,
.type-badge {
  background: rgba(255, 252, 247, .94);
  border: 1px solid rgba(70, 43, 31, .10);
  color: #34251e;
}

.empty-state,
.feed-grid .empty-state,
.explore-grid .empty-state,
.profile-grid .empty-state {
  min-height: 230px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,250,244,.92));
  border: 1px dashed rgba(105, 77, 58, .18);
  box-shadow: 0 9px 26px rgba(75, 47, 33, .07);
  border-radius: 28px;
  overflow: hidden;
}

.empty-state > div {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 36px 28px;
}

.empty-state h3 {
  max-width: 360px;
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: .98;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
  color: #76675f;
  font-size: 17px;
  line-height: 1.55;
}

.empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff1df, #ffe1d8);
  box-shadow: 0 11px 26px rgba(242, 85, 63, .13);
}

.profile-grid.profile-grid-empty,
.profile-grid:has(.empty-state) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.profile-grid.profile-grid-empty .empty-state,
.profile-grid:has(.empty-state) .empty-state {
  width: min(100%, 620px);
  grid-column: 1 / -1;
}

.tiny-avatar,
.mini-avatar,
.profile-avatar {
  background-image: none;
  background-color: var(--accent-soft);
}

.avatar-initials {
  font-family: var(--font-body);
  line-height: 1;
  font-weight: 900;
  transform: translateY(.02em);
}

.author-avatar,
.profile-avatar,
.mini-avatar,
.tiny-avatar,
.nav-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3b261d;
}

.profile-avatar.big-avatar {
  box-shadow: 0 0 0 6px #fff8f1, 0 0 0 10px var(--accent), 0 18px 34px rgba(71, 42, 31, .14);
}

.feed-tabs,
.profile-tabs {
  gap: 14px;
  flex-wrap: wrap;
}

.search-panel {
  border: 1px solid rgba(70, 43, 31, .12);
  background: rgba(255, 252, 248, .97);
  box-shadow: 0 22px 60px rgba(70, 43, 31, .14);
}

.toast {
  background: #2c1c18;
  color: #fffaf5;
  box-shadow: 0 14px 40px rgba(44, 28, 24, .28);
}

.auth-status,
#authStatus {
  color: var(--muted);
}

@media (max-width: 760px) {
  .app-shell {
    width: 100vw;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .main-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .food-card h3 {
    font-size: 25px;
  }

  .action-row {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Friend codes + custom collections
   ========================= */
.collections-list {
  display: grid;
  gap: 8px;
}

.collection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.collection-row .collection-chip {
  width: 100%;
  min-width: 0;
}

.collection-row .collection-chip span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-emoji {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff0df, #ffe5dc);
  font-size: 17px;
}

.collection-remove {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #9a6f60;
  background: rgba(255, 90, 79, .08);
  font-weight: 900;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}

.collection-remove:hover {
  color: var(--accent-dark);
  background: rgba(255, 90, 79, .16);
  transform: translateY(-1px);
}

.friend-code-panel {
  margin: 8px 0 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 90, 79, .13);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 138, 75, .11), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,247,239,.78));
  box-shadow: var(--soft-shadow);
}

.friend-code-copy strong {
  display: block;
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 28px);
  letter-spacing: -.02em;
}

.friend-code-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.friend-code-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.friend-code-form label {
  color: #5e4940;
  font-size: 13px;
  font-weight: 900;
}

.friend-code-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.friend-code-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(79, 49, 38, .12);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255,255,255,.78);
  font-weight: 800;
}

.friend-code-form.disabled-panel {
  opacity: .68;
}

.friend-code-form button {
  min-width: 92px;
}

.friend-code-small {
  display: inline-flex;
  margin-top: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #7f3d32;
  background: rgba(255, 90, 79, .10);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
}

@media (max-width: 760px) {
  .friend-code-panel {
    grid-template-columns: 1fr;
  }

  .friend-code-panel > .secondary-action {
    width: 100%;
  }

  .friend-code-form > div {
    grid-template-columns: 1fr;
  }
}

/* BiteBoard admin safety controls */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 4px 14px;
  flex-wrap: wrap;
}

.admin-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 247, 240, .88);
  border: 1px solid rgba(84, 54, 39, .10);
}

.admin-tab {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: #5d463e;
  background: transparent;
  font-weight: 900;
}

.admin-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #ff5a4f, #ff8a4b);
  box-shadow: 0 10px 22px rgba(255, 90, 79, .18);
}

.admin-safety-note {
  margin: 0 4px 14px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #6d564e;
  background: linear-gradient(135deg, rgba(255, 244, 232, .95), rgba(236, 246, 229, .8));
  border: 1px solid rgba(84, 54, 39, .10);
  font-weight: 700;
}

.admin-section-body[hidden] { display: none !important; }

.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(84, 54, 39, .10);
  background: rgba(255, 252, 248, .8);
}

.admin-user-row.is-suspended {
  background: linear-gradient(135deg, rgba(255, 232, 224, .82), rgba(255, 252, 248, .88));
  border-color: rgba(255, 90, 79, .20);
}

.admin-user-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ff8a4b, #70a96f);
  font-weight: 950;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user-main {
  min-width: 0;
}

.admin-user-main strong,
.admin-user-main span,
.admin-user-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-main span,
.admin-user-main small,
.small-note {
  color: var(--muted);
  font-weight: 750;
}

.status-pill-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 13px;
  color: #3f806d;
  background: rgba(112, 169, 111, .13);
  border: 1px solid rgba(112, 169, 111, .20);
}

.status-pill-control.suspended {
  color: #a53a27;
  background: rgba(255, 90, 79, .13);
  border-color: rgba(255, 90, 79, .22);
}

.status-pill-control.deleted {
  color: #6d564e;
  background: rgba(84, 54, 39, .10);
  border-color: rgba(84, 54, 39, .16);
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.secondary-action.compact,
.danger-action.compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.admin-row video {
  width: 72px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  background: #211714;
}

@media (max-width: 860px) {
  .admin-user-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .status-pill-control,
  .admin-user-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* =========================
   Public clickable profiles
   ========================= */
.profile-open-row,
.friend-profile-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-open-row {
  width: 100%;
  padding: 0;
  border-radius: 16px;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}

.profile-open-row:hover {
  transform: translateY(-1px);
  background: rgba(255, 90, 79, .07);
}

.profile-open-row:focus-visible,
.friend-profile-button:focus-visible,
.public-profile-modal button:focus-visible {
  outline: 3px solid rgba(255, 90, 79, .32);
  outline-offset: 3px;
}

.friend-profile-button {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 6px;
  margin: -6px 0 12px;
  border-radius: 22px;
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.friend-profile-button:hover {
  background: rgba(255, 90, 79, .07);
  transform: translateY(-1px);
}

.friend-profile-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.friend-profile-copy strong {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.1;
}

.friend-profile-copy small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.public-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(37, 24, 20, .42);
  backdrop-filter: blur(12px);
}

.public-profile-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  position: relative;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 34px;
  border: 1px solid rgba(92, 60, 45, .12);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 90, 79, .11), transparent 34%),
    radial-gradient(circle at 100% 20%, rgba(255, 200, 112, .16), transparent 32%),
    var(--card-solid);
  box-shadow: 0 30px 90px rgba(40, 24, 18, .28);
}

.public-profile-modal.loading-card {
  min-height: 280px;
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.public-profile-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  box-shadow: var(--tight-shadow);
  font-size: 24px;
  line-height: 1;
}

.public-profile-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  padding-right: 48px;
}

.public-profile-avatar {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 6px solid #fff6ef;
  box-shadow: 0 0 0 4px var(--accent), var(--soft-shadow);
  color: #281a16;
  font-size: 34px;
  font-weight: 950;
  background-size: cover;
  background-position: center;
}

.public-profile-main h2 {
  margin: 0 0 5px;
  font-family: var(--display-font, inherit);
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -.05em;
  line-height: .98;
}

.public-profile-handle,
.public-profile-bio {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.public-profile-bio {
  margin-top: 10px;
  max-width: 54ch;
}

.public-profile-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-profile-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #5a4038;
  background: rgba(255, 243, 231, .88);
  border: 1px solid rgba(92, 60, 45, .10);
  font-size: 13px;
  font-weight: 850;
}

.public-profile-stats {
  margin: 26px 0 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .74);
}

.public-profile-stats span {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-right: 1px solid var(--line);
}

.public-profile-stats span:last-child { border-right: 0; }
.public-profile-stats strong { font-size: 30px; font-weight: 950; }
.public-profile-stats small { color: var(--muted); font-weight: 850; }

.public-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.public-profile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.public-profile-section-title h3 {
  margin: 0;
  font-size: 22px;
}

.public-profile-section-title span {
  color: var(--muted);
  font-weight: 800;
}

.public-profile-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.public-profile-post {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--cream);
  cursor: pointer;
  box-shadow: var(--tight-shadow);
}

.public-profile-post img,
.public-profile-post video {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  display: block;
  transition: transform .24s var(--ease);
}

.public-profile-post:hover img,
.public-profile-post:hover video {
  transform: scale(1.04);
}

.public-profile-post span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(38, 23, 18, .72), rgba(38, 23, 18, .50));
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.public-profile-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 850;
  background: rgba(255, 255, 255, .55);
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  animation: biteboard-bounce .9s infinite ease-in-out alternate;
}

.loading-dots span:nth-child(2) { animation-delay: .12s; }
.loading-dots span:nth-child(3) { animation-delay: .24s; }

@keyframes biteboard-bounce {
  from { opacity: .42; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-7px); }
}

.post-highlight-pulse {
  animation: postHighlightPulse 1.4s ease;
}

@keyframes postHighlightPulse {
  0%, 100% { box-shadow: var(--soft-shadow); }
  35% { box-shadow: 0 0 0 6px rgba(255, 90, 79, .22), var(--shadow); }
}

@media (max-width: 720px) {
  .public-profile-modal { padding: 22px; border-radius: 26px; }
  .public-profile-header { grid-template-columns: 1fr; text-align: center; justify-items: center; padding-right: 0; }
  .public-profile-meta, .public-profile-actions { justify-content: center; }
  .public-profile-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
