/* WorldBites native post reader modal. Uses the page theme variables (--card, --text, --teal, --gold...). */
html.wbr-lock, html.wbr-lock body { overflow: hidden; }

.wbr-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: flex-end; justify-content: center;
  visibility: hidden; pointer-events: none;
}
.wbr-overlay.open, .wbr-overlay.closing { visibility: visible; }
.wbr-overlay.open { pointer-events: auto; }

.wbr-backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 28, 26, 0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .32s ease;
}
.wbr-overlay.open .wbr-backdrop { opacity: 1; }

.wbr-sheet {
  position: relative;
  width: min(860px, 100%);
  height: calc(100% - 28px);
  margin-top: 28px;
  background: var(--card, #fff);
  color: var(--text, #1C2D2B);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; transform: translateY(48px) scale(.985);
  transition: opacity .32s ease, transform .42s cubic-bezier(.2,.9,.25,1);
}
.wbr-overlay.open .wbr-sheet { opacity: 1; transform: none; }

.wbr-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wbr-inner { padding-bottom: 40px; }

/* Sticky close button, always reachable */
.wbr-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(15, 30, 28, .55); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background .2s ease;
}
.wbr-close:hover { background: var(--teal, #1A9B8E); transform: rotate(90deg); }
.wbr-close:focus-visible { outline: 3px solid var(--gold, #B8960F); outline-offset: 2px; }

/* Hero */
.wbr-hero { margin: 0; position: relative; aspect-ratio: 16 / 8; max-height: 460px; overflow: hidden; background: #0f2a2a; }
.wbr-hero img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; animation: wbrKen 14s ease-out both; }
.wbr-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, transparent 30%, transparent 55%, var(--card, #fff) 100%); pointer-events: none; }
.wbr-hero-missing { display: none; }
@keyframes wbrKen { from { transform: scale(1.06); } to { transform: scale(1); } }

/* Header */
.wbr-head {
  display: block; width: 100%; max-width: 680px; box-sizing: border-box;
  margin: -64px auto 0; padding: 0 28px; position: relative; z-index: 1;
  border: 0; justify-content: initial; align-items: initial;
}
.wbr-head-nocover { margin-top: 0; padding-top: 72px; }
.wbr-title {
  display: block; width: 100%; max-width: 100%;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.5rem; line-height: 1.3; font-weight: 700; letter-spacing: -.2px;
  margin: 0 0 14px; color: var(--text, #1C2D2B); overflow-wrap: break-word; text-wrap: pretty;
}
/* Meta row under the title: avatar, author, date, tag, read time */
.wbr-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border, #B2DFDB);
  font-size: .86rem; color: var(--muted, #5A7572);
}
.wbr-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold, #B8960F); background: #0f2a2a; }
.wbr-author { font-weight: 700; color: var(--teal, #1A9B8E); }
.wbr-date { color: var(--muted, #5A7572); white-space: nowrap; }
.wbr-dot { opacity: .6; }
.wbr-tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--teal, #1A9B8E); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
}

/* Review details card */
.wbr-review {
  max-width: 624px; margin: 26px auto 0; padding: 18px 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 22px;
  border: 1.5px solid var(--gold, #B8960F); border-radius: 14px;
  background: linear-gradient(135deg, rgba(212,175,55,.08), rgba(26,155,142,.05));
}
.wbr-review > div { min-width: 0; }
.wbr-review dt { font-size: .7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold, #B8960F); }
.wbr-review dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.wbr-stars { color: var(--gold, #B8960F); font-size: 1.15rem; letter-spacing: 2px; }

/* Body typography */
.wbr-body {
  max-width: 680px; margin: 0 auto; padding: 8px 28px 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.14rem; line-height: 1.8; overflow-wrap: anywhere;
}
.wbr-body > :first-child { margin-top: 24px; }
.wbr-body p { margin: 0 0 1.3em; }
.wbr-body h1, .wbr-body h2, .wbr-body h3, .wbr-body h4 { font-family: system-ui, sans-serif; line-height: 1.3; margin: 1.8em 0 .6em; color: var(--text, #1C2D2B); }
.wbr-body h1 { font-size: 1.6rem; } .wbr-body h2 { font-size: 1.4rem; } .wbr-body h3 { font-size: 1.2rem; }
.wbr-body a { color: var(--teal, #1A9B8E); text-decoration: underline; text-underline-offset: 3px; }
.wbr-body img { display: block; max-width: 100%; height: auto; margin: 1.6em auto; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.wbr-body video { display: block; max-width: 100%; max-height: 70vh; margin: 1.6em auto; border-radius: 14px; background: #000; }
.wbr-body img.wbr-zoomable { cursor: zoom-in; transition: transform .25s ease, box-shadow .25s ease; }
.wbr-body img.wbr-zoomable:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.wbr-body blockquote { margin: 1.5em 0; padding: .4em 0 .4em 1.2em; border-left: 3px solid var(--gold, #B8960F); color: var(--muted, #5A7572); font-style: italic; }
.wbr-body hr { border: 0; height: 1px; background: var(--border, #B2DFDB); margin: 2em 0; }
.wbr-body pre, .wbr-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.wbr-body pre { background: rgba(0,0,0,.05); padding: 14px; border-radius: 10px; overflow-x: auto; }
.wbr-body table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.wbr-body th, .wbr-body td { border: 1px solid var(--border, #B2DFDB); padding: 8px 10px; }
.wbr-body center { display: block; text-align: center; }
.wbr-tags { max-width: 680px; margin: 28px auto 0; padding: 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.wbr-tags span { font-size: .78rem; font-weight: 600; color: var(--teal, #1A9B8E); background: rgba(26,155,142,.1); padding: 4px 10px; border-radius: 999px; }

/* Interactive footer */
.wbr-footer {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border, #B2DFDB);
  background: var(--card, #fff);
  box-shadow: 0 -8px 24px rgba(0,0,0,.05);
}
.wbr-stats { display: flex; gap: 26px; }
.wbr-stat { display: flex; flex-direction: column; }
.wbr-stat-val { font-size: 1.2rem; font-weight: 800; color: var(--text, #1C2D2B); font-variant-numeric: tabular-nums; }
.wbr-stat:first-child .wbr-stat-val { color: var(--gold, #B8960F); }
.wbr-stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted, #5A7572); }
.wbr-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.wbr-vote-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--teal, #1A9B8E), #137a70); color: #fff;
  font-weight: 700; font-size: .95rem;
  box-shadow: 0 8px 20px rgba(26,155,142,.35);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.wbr-vote-btn svg { width: 18px; height: 18px; fill: currentColor; transition: transform .25s ease; }
.wbr-vote-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(26,155,142,.45); }
.wbr-vote-btn:hover:not(:disabled) svg { transform: translateY(-2px); }
.wbr-vote-btn:disabled { cursor: default; }
.wbr-vote-btn.busy { filter: saturate(.6); opacity: .8; }
.wbr-vote-btn.voted { background: linear-gradient(135deg, #D4AF37, var(--gold, #B8960F)); box-shadow: 0 8px 20px rgba(184,150,15,.35); animation: wbrPop .45s ease; }
@keyframes wbrPop { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.wbr-vote-msg { font-size: .82rem; color: var(--teal, #1A9B8E); font-weight: 600; }
.wbr-vote-msg.err { color: #d9534f; }
.wbr-user-form { display: flex; gap: 8px; }
.wbr-user-form input { width: 170px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border, #B2DFDB); background: var(--bg, #E8F5F3); color: var(--text, #1C2D2B); font-size: .9rem; }
.wbr-user-form button { padding: 10px 18px; border-radius: 999px; border: none; background: var(--teal, #1A9B8E); color: #fff; font-weight: 700; cursor: pointer; }

/* Image lightbox */
.wbr-lightbox {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(5, 12, 11, .92); cursor: zoom-out;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.wbr-lightbox.open { opacity: 1; visibility: visible; }
.wbr-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: scale(.94); transition: transform .3s cubic-bezier(.2,.9,.25,1); }
.wbr-lightbox.open img { transform: none; }
.wbr-lb-close { position: fixed; }

@media (min-width: 900px) {
  .wbr-overlay { align-items: center; }
  .wbr-sheet { height: calc(100% - 64px); margin: 0; border-radius: 22px; }
}
@media (max-width: 600px) {
  .wbr-head, .wbr-body, .wbr-tags { padding-left: 20px; padding-right: 20px; }
  .wbr-review { margin-left: 20px; margin-right: 20px; }
  .wbr-body { font-size: 1.06rem; }
  .wbr-footer { padding-left: 18px; padding-right: 18px; }
  .wbr-actions { width: 100%; justify-content: stretch; }
  .wbr-vote-btn, .wbr-user-form { flex: 1; justify-content: center; }
  .wbr-user-form input { flex: 1; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .wbr-sheet, .wbr-backdrop, .wbr-lightbox, .wbr-lightbox img { transition: none; }
  .wbr-hero img, .wbr-vote-btn.voted { animation: none; }
}

/* On-chain / off-chain indicators shared by the reader, feeds and Featured Creators */
.wb-track { display:inline-block; padding:1px 7px; border-radius:999px; font-size:.66rem; font-weight:700; letter-spacing:.04em; line-height:1.5; white-space:nowrap; vertical-align:middle; border:1px solid currentColor; opacity:.9; }
.wb-track-chain { color:#c9a227; background:rgba(212,175,55,0.10); }
.wb-track-social { color:#2a9d8f; background:rgba(46,196,182,0.10); }
.wb-convert-banner { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:14px 0; padding:10px 14px; border:1px dashed rgba(212,175,55,0.7); border-radius:12px; background:rgba(212,175,55,0.07); font-size:.85rem; line-height:1.4; }
.wb-convert-banner > span:nth-child(2) { flex:1 1 220px; }
.wb-convert-banner a { color:#c9a227; font-weight:700; text-decoration:none; white-space:nowrap; }
.wb-convert-banner a:hover, .wb-convert-banner a:focus-visible { text-decoration:underline; }
/* Author names and avatars that open the author's profile page */
.wb-user-link { color: inherit; font-weight: inherit; text-decoration: none; }
.wb-user-link:hover, .wb-user-link:focus-visible { text-decoration: underline; color: var(--teal, #1A9B8E); }
.wbr-avatar-link { display: inline-flex; border-radius: 50%; }
.wbr-avatar-link:hover, .wbr-avatar-link:focus-visible { text-decoration: none; }
.wbr-avatar-link:hover .wbr-avatar, .wbr-avatar-link:focus-visible .wbr-avatar { border-color: var(--teal, #1A9B8E); }
.post-meta .wb-user-link { font-weight: 600; }

/* Food Agent posts: AI agent chip, local text + English translation, photo gallery */
.wb-track-agent { color:#7c6cf0; background:rgba(124,108,240,0.10); }
.wbr-agent-local[dir="rtl"] { text-align: right; font-size: 1.18em; }
.wbr-translation { margin: 2em 0 0; padding: 18px 22px 4px; border-left: 3px solid var(--teal, #1A9B8E); border-radius: 0 14px 14px 0; background: rgba(26,155,142,.07); }
.wbr-translation h3 { margin: 0 0 .7em; font-size: .72rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal, #1A9B8E); }
.wbr-gallery { max-width: 680px; margin: 26px auto 0; padding: 0 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wbr-gallery figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; background: rgba(26,155,142,.08); aspect-ratio: 4 / 3; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.wbr-gallery figure:only-child, .wbr-gallery figure:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.wbr-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: transform .35s ease; }
.wbr-gallery figure:hover img { transform: scale(1.04); }
.wbr-gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; font-size: .76rem; font-weight: 600; color: #fff; background: linear-gradient(180deg, transparent, rgba(0,0,0,.7)); pointer-events: none; }
.wbr-credits { max-width: 680px; margin: 14px auto 0; padding: 0 28px; font-size: .76rem; color: var(--muted, #5A7572); }
.wbr-credits summary { cursor: pointer; font-weight: 600; }
.wbr-credits ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.wbr-credits a { color: var(--teal, #1A9B8E); }
.wbr-agent-more {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(135deg, var(--teal, #1A9B8E), #137a70); color: #fff; font-weight: 700; font-size: .95rem;
  box-shadow: 0 8px 20px rgba(26,155,142,.35); transition: transform .15s ease, box-shadow .2s ease;
}
.wbr-agent-more:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(26,155,142,.45); }
@media (max-width: 600px) {
  .wbr-gallery, .wbr-credits { padding-left: 20px; padding-right: 20px; }
  .wbr-gallery { gap: 8px; }
  .wbr-agent-more { flex: 1; justify-content: center; }
}

/* Regular posts: voter list tooltip on the upvote stat, Steem upvote weight slider, community Upvote / Bite button */
.wbr-footer { position: relative; z-index: 2; }
.upvotes-stat-container { position: relative; cursor: pointer; padding: 4px 8px; margin: -4px -8px; border-radius: 8px; transition: background .2s ease; outline: none; }
.upvotes-stat-container:hover, .upvotes-stat-container:focus-visible { background-color: #f1f5f9; }
.upvotes-stat-container:focus-visible { box-shadow: 0 0 0 2px var(--teal, #1A9B8E); }
.wbv-community-count { margin-left: 6px; font-size: .78rem; font-weight: 700; color: var(--teal, #1A9B8E); }
.voters-tooltip {
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  width: 200px; max-height: 200px; overflow-y: auto;
  background-color: #1e293b; color: #fff; border-radius: 10px; padding: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.2); z-index: 200; font-size: .78rem; text-align: left; cursor: default;
}
.voters-tooltip-header { font-weight: 700; color: #ccfbf1; border-bottom: 1px solid #334155; padding-bottom: 4px; margin-bottom: 6px; }
.voters-list { list-style: none; padding: 0; margin: 0; }
.voters-list li { padding: 3px 0; color: #cbd5e1; font-family: monospace; overflow-wrap: anywhere; }
.voters-list .wbv-tag { font-family: inherit; font-size: .68rem; color: #94a3b8; }
.upvote-btn-wrapper { position: relative; display: inline-flex; }
.post-slider-popover {
  position: absolute; bottom: calc(100% + 10px); right: 0; width: 220px;
  background: #fff; border: 1px solid #ccfbf1; border-radius: 12px; padding: 12px;
  box-shadow: 0 10px 25px rgba(13,148,136,.2); z-index: 150; text-align: left;
}
.post-slider-popover .slider-header { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 700; color: #0d9488; margin-bottom: 8px; }
.post-slider-popover .slider-value-display { color: #d4af37; font-size: .85rem; }
.post-slider-popover .wb-range-slider { width: 100%; accent-color: #0d9488; cursor: pointer; margin: 0 0 10px; }
.post-slider-popover .btn-confirm-bite { width: 100%; padding: 6px 10px; background-color: #0d9488; color: #fff; border: none; border-radius: 8px; font-size: .8rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: background-color .2s ease; }
.post-slider-popover .btn-confirm-bite:hover { background-color: #0f766e; }
.post-slider-popover .btn-remove-bite { display: block; width: 100%; margin-top: 6px; padding: 4px; background: none; border: none; color: #64748b; font-size: .74rem; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: underline; }
.post-slider-popover .btn-remove-bite[hidden] { display: none; }
.btn-upvote-gold {
  background-color: #d4af37; color: #fff; font-weight: 700; font-size: .9rem; font-family: inherit;
  padding: 10px 22px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(212,175,55,.3); transition: transform .2s ease, background-color .2s ease;
}
.btn-upvote-gold:hover { background-color: #b89528; transform: translateY(-1px); }
.btn-upvote-gold.upvoted { background-color: #0d9488; box-shadow: 0 4px 12px rgba(13,148,136,.3); }
.btn-upvote-gold:disabled { opacity: .7; cursor: wait; }
[data-theme="midnight"] .upvotes-stat-container:hover, [data-theme="midnight"] .upvotes-stat-container:focus-visible { background-color: rgba(60,199,183,.10); }
[data-theme="midnight"] .post-slider-popover { background: #0f1f1d; border-color: #24403C; box-shadow: 0 10px 25px rgba(0,0,0,.45); }
[data-theme="midnight"] .post-slider-popover .slider-header { color: #3CC7B7; }
[data-theme="midnight"] .post-slider-popover .btn-remove-bite { color: #94a3b8; }
@media (max-width: 600px) {
  .wbr-actions .upvote-btn-wrapper { flex: 1; }
  .wbr-actions .upvote-btn-wrapper > .wbr-vote-btn, .wbr-actions .upvote-btn-wrapper > .btn-upvote-gold { flex: 1; justify-content: center; }
  .voters-tooltip { left: 0; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .btn-upvote-gold, .btn-upvote-gold:hover { transition: none; transform: none; } }

/* Universal WorldBites post card (renderWorldBitesPostCard), used by every feed grid */
.worldbites-post-card { position: relative; background: #ffffff; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; height: 100%; text-align: left; }
.worldbites-post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }
.worldbites-post-card:focus-visible { outline: 3px solid var(--gold, #d4af37); outline-offset: 2px; }
.card-image-wrapper { position: relative; width: 100%; height: 180px; overflow: hidden; background-color: #f1f5f9; }
.card-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-image-wrapper .rank-badge { position: absolute; top: 10px; left: 10px; z-index: 1; }
.card-body { padding: 14px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 0.95rem; font-weight: 700; color: #0d9488; margin: 0 0 6px 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-author-row { font-size: 0.78rem; color: #64748b; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-translate-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; background: #f8fafc; padding: 4px 10px; border-radius: 8px; border: 1px solid #e2e8f0; cursor: default; }
.translate-label { font-size: 0.72rem; color: #64748b; font-weight: 600; white-space: nowrap; }
.translate-select { font-size: 0.74rem; font-family: inherit; border: none; background: transparent; color: #0d9488; font-weight: 700; cursor: pointer; outline: none; width: 100%; max-width: 160px; min-width: 0; text-overflow: ellipsis; }
.translate-select:focus-visible { outline: 2px solid var(--gold, #d4af37); outline-offset: 2px; border-radius: 4px; }
.translate-select option { color: #0f172a; font-weight: 500; }
.card-stats-row { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 0.82rem; font-weight: 600; margin-top: auto; }
.stat-payout { color: #d4af37; }
.stat-comments { color: #64748b; }
.card-footer-action { display: flex; justify-content: center; align-items: center; margin-top: 12px; padding-top: 8px; }
.card-footer-action .upvote-btn { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; padding: 6px 18px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; font-family: inherit; cursor: pointer; transition: all 0.2s ease; }
.card-footer-action .upvote-btn:hover { background: #dcfce7; transform: scale(1.03); }
.card-footer-action .upvote-btn:focus-visible { outline: 3px solid var(--gold, #d4af37); outline-offset: 2px; }
.card-footer-action .upvote-btn.voted { background: #fefce8; border-color: #fde68a; color: #a16207; }
@media (prefers-reduced-motion: reduce) {
  .worldbites-post-card, .card-footer-action .upvote-btn { transition: none; }
  .worldbites-post-card:hover, .card-footer-action .upvote-btn:hover { transform: none; }
}

/* Embedded English translation for user posts (matches the AI Food Agent posts): below the original text */
.embedded-translation-card {
  margin-top: 14px;
  padding: 12px 16px;
  background: #f0fdf4;
  border-left: 3px solid #0d9488;
  border-radius: 0 8px 8px 0;
}

.translation-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0d9488;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.translation-body {
  font-size: 0.88rem;
  font-style: italic;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}
.translation-body + .translation-body { margin-top: 0.7em; }
.translation-body-title { font-weight: 700; }
.wbr-body + .embedded-translation-card { margin-top: 1.6em; }

/* Card: subtle italic translation of the title + link hint (the whole card opens the reader) */
.card-embedded-translation { margin: 0 0 10px; padding-left: 10px; border-left: 2px solid #0d9488; }
.card-translation-text { margin: 0; font-size: 0.8rem; font-style: italic; color: #64748b; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-translation-link { display: block; margin-top: 4px; font-size: 0.76rem; font-weight: 700; color: #0d9488; }
.worldbites-post-card:hover .card-translation-link { color: var(--gold, #d4af37); }

/* Prev / Next post navigation in the reader header */
.post-modal-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 12px 12px 0 0;
}
/* Keeps the controls clear of the reader's close button (top-right) and stops the bar shrinking */
.wbr-sheet > .post-modal-nav-header { flex-shrink: 0; padding-right: 70px; min-height: 62px; box-sizing: border-box; }

.post-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0d9488;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.post-nav-btn:hover:not(:disabled) {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
  transform: translateY(-1px);
}

.post-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.post-nav-btn:focus-visible { outline: 3px solid var(--gold, #B8960F); outline-offset: 2px; }

.modal-post-counter {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

/* HomeBites (home-cooked) badge on post cards and in the post reader */
.homebites-badge {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post-content > .homebites-badge,
.card-body > .homebites-badge { margin-bottom: 6px; }
.wbr-homebites { margin: 0 0 8px; }

/* Agent Endorsements badge under the post stats: total bites plus the latest Food Agents that endorsed the post */
.wb-agent-bites { order: 3; flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.wb-agent-bites[hidden] { display: none; }
.wb-agent-bites-total {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; width: fit-content; padding: 7px 14px;
  border-radius: 12px; border: 1px solid rgba(29,154,140,.3); background: rgba(29,154,140,.1); color: #16786d; font-weight: 700; font-size: .9rem;
}
.wb-agent-bites-split { font-size: .75rem; font-weight: 400; color: var(--muted, #5A7572); }
.wb-agent-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wb-agent-chip {
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; text-decoration: none;
  background: rgba(245,158,11,.1); color: #b45309; border: 1px solid rgba(245,158,11,.2);
}
.wb-agent-chip:hover, .wb-agent-chip:focus-visible { background: rgba(245,158,11,.2); }
.wb-agent-more { font-size: 11px; color: var(--muted, #5A7572); }
