: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);
}

/* =========================
   BiteBoard UI alignment fixes
   ========================= */

/* 1) Avatar / initials centering */
.profile-avatar,
.avatar,
.avatar-circle,
.user-avatar,
.profile-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  line-height: 1;
  text-align: center;
}

.profile-avatar span,
.avatar span,
.avatar-circle span,
.user-avatar span,
.profile-photo span,
.profile-avatar .avatar-initials,
.avatar .avatar-initials,
.user-avatar .avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  text-align: center;
  font-weight: 700;
}

/* If avatar image exists, keep it fitted nicely */
.profile-avatar img,
.avatar img,
.avatar-circle img,
.user-avatar img,
.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Small edit/pencil button on avatar */
.profile-avatar .edit-avatar-btn,
.avatar .edit-avatar-btn,
.user-avatar .edit-avatar-btn,
.profile-photo .edit-avatar-btn {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* 2) Empty-state / tag cards */
.empty-state,
.empty-card,
.explore-empty,
.tag-empty-card,
.tag-placeholder-card {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border-radius: 28px;
  box-sizing: border-box;
}

.empty-state h3,
.empty-card h3,
.explore-empty h3,
.tag-empty-card h3,
.tag-placeholder-card h3,
.empty-state p,
.empty-card p,
.explore-empty p,
.tag-empty-card p,
.tag-placeholder-card p {
  margin: 0;
  max-width: 260px;
}

/* If you have two side-by-side empty cards */
.empty-grid,
.explore-empty-grid,
.tag-results-empty {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .empty-grid,
  .explore-empty-grid,
  .tag-results-empty {
    grid-template-columns: 1fr;
  }
}

/* 3) General card-content centering cleanup */
.card-empty-content,
.placeholder-content,
.empty-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* 4) Prevent weird text drift in cards */
.profile-card,
.sidebar-profile-card,
.empty-state,
.empty-card {
  box-sizing: border-box;
}
