/* 🎨 Cores e tipografia: altere as variáveis abaixo para mudar o aspeto do site. */
:root {
  --bg: #fff6e9;
  --dots: #f6dfc2;
  --surface: #ffffff;
  --surface-2: #fff1d6;
  --text: #2b1d16;
  --muted: #7a6458;
  --ink: #2b1d16;          /* contornos e sombras "de autocolante" */
  --accent: #ff6b4a;       /* tomate */
  --accent-ink: #ffffff;
  --butter: #ffd166;
  --mint: #7bd3b0;
  --sky: #8ecae6;
  --lilac: #c3b1e1;
  --pink: #ffafcc;
  --mark: #ffe08a;
  --ok: #2fa572;
  --danger: #d6453d;
  --radius: 18px;
  --pop: 4px 4px 0 var(--ink);
  --pop-sm: 2px 2px 0 var(--ink);
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light; /* sempre o tom pastel, também em telemóveis com modo escuro */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 17px/1.55 var(--sans);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1.6px, transparent 1.6px);
  background-size: 22px 22px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: 1.45rem; }
h2 small { font: 700 .85rem var(--sans); color: var(--muted); }
a { color: var(--accent); font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px dashed var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Botão "autocolante" reutilizável */
.chip, .primary, .result-actions button, .access-row button, .lang, .segmented, .stepper, select,
.url-row input, .text-row textarea, .access-row input {
  border: 2px solid var(--ink) !important;
  box-shadow: var(--pop-sm);
}
.chip, .primary, .result-actions button, .ing, .recent-item {
  transition: transform .12s ease, box-shadow .12s ease;
}
.chip:hover, .primary:hover, .result-actions button:hover, .ing:hover, .recent-item:hover {
  transform: translate(-1px, -1px) rotate(-.4deg);
}
.chip:active, .primary:active, .result-actions button:active, .ing:active, .recent-item:active {
  transform: translate(2px, 2px); box-shadow: none !important;
}

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 1.2rem var(--display); }
.brand img { transform: rotate(-6deg); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); font-weight: 700; font-size: .9rem;
}
.wake-emoji { font-size: 1.1rem; }
.chip[aria-pressed="true"] { background: var(--butter); color: #2b1d16; }
.chip[aria-pressed="true"] .wake-emoji { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.2) rotate(12deg); } }
.lang { display: flex; border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang a { padding: 6px 11px; font-size: .85rem; font-weight: 800; color: var(--muted); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--mint); color: #2b1d16; }
.navchip { text-decoration: none; color: var(--text); background: var(--sky); }
@media (max-width: 720px) { .chip-text { display: none; } .chip { padding: 6px 10px; } }
@media (max-width: 400px) { .brand span { font-size: .95rem; } .brand img { width: 28px; height: 28px; } }

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }

/* Pesquisa */
.search { max-width: 700px; margin: 4vh auto 0; text-align: center; }
.hero-emoji { display: flex; justify-content: center; gap: 10px; font-size: 2.4rem; margin-bottom: 8px; }
.hero-emoji span { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
.hero-emoji span:nth-child(2) { animation-delay: .2s; }
.hero-emoji span:nth-child(3) { animation-delay: .4s; }
.hero-emoji span:nth-child(4) { animation-delay: .6s; }
.hero-emoji span:nth-child(5) { animation-delay: .8s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-8deg); } }
.search h1 { position: relative; display: inline-block; }
.search h1::after {
  content: ''; position: absolute; left: 4%; right: 4%; bottom: .05em; height: .32em; z-index: -1;
  background: var(--butter); border-radius: 8px; transform: rotate(-1.2deg);
}
.tagline { color: var(--muted); font-size: 1.12rem; font-weight: 600; margin: 4px 0 26px; }
.form { text-align: left; }
.url-row { display: flex; gap: 10px; }
.url-row input, .text-row textarea, .access-row input {
  flex: 1; min-width: 0;
  padding: 14px 18px; border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--pop) !important;
}
.text-row { display: grid; gap: 10px; }
.text-row textarea { resize: vertical; }
.primary {
  padding: 0 22px; min-height: 54px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.05rem;
  box-shadow: var(--pop) !important; white-space: nowrap;
}
.primary:disabled { opacity: .6; }
.form-links { display: flex; gap: 10px; justify-content: center; margin-top: 16px; color: var(--muted); flex-wrap: wrap; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 800; text-decoration: underline wavy; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.access-row { margin-top: 16px; display: grid; gap: 6px; }
.access-row button { padding: 0 16px; border-radius: var(--radius); background: var(--butter); color: #2b1d16; font-weight: 800; }
.error {
  margin-top: 20px; padding: 12px 16px; border-radius: var(--radius); text-align: left; font-weight: 700;
  background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger);
  border: 2px solid var(--danger);
}
.loading { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 30px; color: var(--muted); text-align: left; }
.loading strong { color: var(--text); font-size: 1.05rem; }
.spinner { font-size: 2rem; width: 1em; height: 1em; flex: none; }
.spinner::before { content: '🍳'; display: block; animation: flip 1.2s ease-in-out infinite; }
@keyframes flip { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(20deg) translateY(-6px); } }
.recent { margin-top: 44px; text-align: left; }
.recent-head { display: flex; justify-content: space-between; align-items: baseline; }
.recent-head h2 { font-size: 1.15rem; }
.recent ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.recent-item {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; text-align: left;
  padding: 12px 16px; border-radius: 14px; border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--pop-sm);
}
.recent-item small { color: var(--muted); white-space: nowrap; }

/* Resultado */
.recipe-head { margin-bottom: 18px; }
.meta { color: var(--muted); margin: 0; font-weight: 600; }
.notes {
  margin: 14px 0 0; padding: 10px 16px; border-radius: 14px; font-weight: 600;
  background: var(--surface-2); border: 2px dashed var(--accent);
}
.notes::before { content: '💡 '; }

.controls {
  position: sticky; top: 64px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end;
  padding: 14px 16px; margin-bottom: 26px;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop);
}
.control { display: grid; gap: 5px; }
.control-label { font: 600 .78rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.segmented { display: flex; flex-wrap: wrap; border-radius: 14px; overflow: hidden; background: var(--surface); }
.segmented button { border: 0; border-right: 2px solid var(--ink); background: transparent; padding: 8px 14px; font-size: .95rem; font-weight: 700; }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.segmented button:not([aria-checked="true"]):hover { background: var(--surface-2); }
.stepper { display: flex; align-items: center; border-radius: 14px; overflow: hidden; background: var(--surface); }
.stepper button { width: 40px; height: 38px; border: 0; background: var(--butter); color: #2b1d16; font-size: 1.2rem; font-weight: 800; }
.stepper input { width: 58px; height: 38px; border: 0; text-align: center; background: transparent; font-weight: 800; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
select { padding: 8px 12px; border-radius: 14px; background: var(--surface); font-weight: 700; }
.checks { display: grid; gap: 2px; padding-bottom: 2px; }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 680px) {
  .controls { position: static; }
  .control:first-child { width: 100%; }
  .segmented { display: grid; grid-template-columns: 1fr 1fr; }
  .segmented button { padding: 10px 4px; white-space: nowrap; border-bottom: 2px solid var(--ink); }
  .segmented button:nth-child(2n) { border-right: 0; }
  .segmented button:nth-last-child(-n+2) { border-bottom: 0; }
}

.columns { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 34px; }
@media (max-width: 860px) { .columns { grid-template-columns: 1fr; } }
.hint { color: var(--muted); font-size: .88rem; font-weight: 600; margin: 0 0 12px; }
.group { font-size: 1.05rem; margin: 18px 0 8px; color: var(--accent); }
.ings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ing {
  position: relative; width: 100%; text-align: left;
  display: grid; gap: 3px; padding: 11px 44px 11px 14px;
  border-radius: 16px; border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--pop-sm);
  font-size: 1.04rem;
}
.ings li:nth-child(4n+1) .amt { background: var(--butter); }
.ings li:nth-child(4n+2) .amt { background: var(--mint); }
.ings li:nth-child(4n+3) .amt { background: var(--sky); }
.ings li:nth-child(4n+4) .amt { background: var(--pink); }
.amt {
  display: inline-block; font-weight: 800; color: #2b1d16; white-space: nowrap;
  padding: 0 8px; border-radius: 8px; margin-right: 2px;
}
.ing-name { font-weight: 700; }
.prep { color: var(--muted); }
.orig { font-size: .82rem; color: var(--muted); }
.swap { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 1.15rem; transition: transform .3s; }
.ing:hover .swap { transform: translateY(-50%) rotate(180deg); }
.badge { margin-left: 6px; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: var(--lilac); color: #2b1d16; vertical-align: 2px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li {
  counter-increment: s; position: relative;
  padding: 13px 16px 13px 58px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--ink); box-shadow: var(--pop-sm);
  font-size: 1.07rem; cursor: pointer; transition: opacity .2s, transform .2s;
}
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 12px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--butter); color: #2b1d16; border: 2px solid var(--ink);
  font: 700 .95rem var(--display);
}
.steps li:nth-child(4n+2)::before { background: var(--mint); }
.steps li:nth-child(4n+3)::before { background: var(--sky); }
.steps li:nth-child(4n+4)::before { background: var(--pink); }
.steps li.done { opacity: .55; transform: scale(.98); }
.steps li.done::before { content: '✔'; background: var(--ok); color: #fff; }
mark.conv { background: var(--mark); color: inherit; padding: 0 5px; border-radius: 6px; font-weight: 800; box-decoration-break: clone; }
.all-done {
  margin-top: 16px; padding: 14px; text-align: center; border-radius: 16px;
  font: 700 1.3rem var(--display);
  background: var(--mint); color: #2b1d16; border: 2px solid var(--ink); box-shadow: var(--pop);
  animation: pop .5s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes pop { from { transform: scale(.6) rotate(-4deg); opacity: 0; } }

.nutrition {
  margin-top: 40px; max-width: 480px; padding: 20px 22px;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop);
}
.nutrition table { width: 100%; border-collapse: collapse; }
.nutrition th, .nutrition td { padding: 8px 0; border-bottom: 2px dotted var(--dots); text-align: left; font-weight: 600; }
.nutrition td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.nutrition tr:first-child th, .nutrition tr:first-child td { font-weight: 800; font-size: 1.05rem; }
.nutrition tr.sub th { padding-left: 34px; color: var(--muted); font-weight: 600; }
.nutrition tr.sub td { font-weight: 600; color: var(--muted); }
.nut-emo { display: inline-block; width: 28px; }
.nutrition .hint { margin: 12px 0 0; }

.result-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.result-actions button { padding: 10px 18px; border-radius: 14px; background: var(--surface); font-weight: 800; }
#new-btn { background: var(--butter); color: #2b1d16; }

/* Janela do ingrediente */
dialog {
  border: 2px solid var(--ink); padding: 0; border-radius: 22px;
  width: min(560px, calc(100vw - 32px)); max-height: 85vh;
  background: var(--surface); color: var(--text); box-shadow: 6px 6px 0 var(--ink);
}
dialog[open] { animation: pop .35s cubic-bezier(.3, 1.5, .5, 1); }
dialog::backdrop { background: rgba(43, 29, 22, .45); backdrop-filter: blur(2px); }
.dlg-inner { padding: 22px; }
.dlg-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.dlg-head h2 { font-size: 1.6rem; }
.icon-btn { border: 2px solid var(--ink); background: var(--surface-2); width: 38px; height: 38px; border-radius: 50%; flex: none; font-size: .9rem; }
.d-orig { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.dlg-inner h3 { font-size: 1.15rem; }
.subs { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.subs li { display: grid; gap: 2px; padding: 11px 14px 11px 44px; border-radius: 14px; background: var(--surface-2); position: relative; border: 2px solid var(--ink); }
.subs li::before { content: '✨'; position: absolute; left: 14px; top: 10px; }
.subs li:nth-child(2)::before { content: '🌱'; }
.subs li:nth-child(3)::before { content: '🍀'; }
.subs li:nth-child(4)::before { content: '🌟'; }
.subs li span { color: var(--muted); font-size: .94rem; }
.subs li.empty { color: var(--muted); }
.subs li.empty::before { content: '🤷'; }
details { border-top: 2px dashed var(--dots); padding-top: 14px; }
summary { cursor: pointer; font: 700 1.05rem var(--display); margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.grid2 label { display: grid; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.grid2 input, .grid2 select { padding: 8px 10px; border-radius: 12px; border: 2px solid var(--ink); background: var(--surface); color: var(--text); font-size: .95rem; width: 100%; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.d-preview { font: 700 1.3rem var(--display); color: var(--accent); margin: 8px 0; }

.foot { text-align: center; color: var(--muted); font-size: .85rem; font-weight: 700; padding: 24px 16px 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .topbar, .controls, .result-actions, .hint, .foot, .swap, .all-done, .seo, .cached, .quota { display: none !important; }
  body { background: #fff; color: #000; }
  .ing, .steps li, .nutrition { border: 0 !important; box-shadow: none !important; padding-top: 4px; padding-bottom: 4px; }
  mark.conv, .amt { background: none !important; }
}

/* ☕ Buy Me a Coffee */
.bmc {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 14px;
  background: #ffdd00; color: #2b1d16; font-weight: 800; text-decoration: none;
  border: 2px solid var(--ink); box-shadow: var(--pop-sm); transition: transform .12s ease;
}
.bmc:hover { transform: translate(-1px, -1px) rotate(-1deg); }
.bmc-foot { margin-bottom: 12px; }
.support { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; color: var(--text); font-weight: 700; }

/* 🍪 Limite diário e cache */
.quota {
  margin: 18px auto 0; padding: 10px 16px; max-width: 560px; border-radius: 14px; font-weight: 700; font-size: .95rem;
  background: var(--surface); border: 2px dashed var(--mint); color: var(--text);
}
.quota.empty { border-color: var(--accent); }
.error { border-color: var(--accent); background: #ffe3dc; color: #8a2a17; }
.cached {
  margin: 12px 0 0; padding: 10px 16px; border-radius: 14px; font-weight: 700;
  background: #dcf5ea; border: 2px solid var(--mint);
}

/* 🔎 Conteúdo da página inicial (também ajuda o Google) */
.seo { max-width: 900px; margin: 70px auto 0; }
.seo > h2, .article h2 { font-size: 1.6rem; margin: 46px 0 16px; text-align: center; }
.seo > h2:first-child { margin-top: 0; }
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how li { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--pop); text-align: center; }
.how li:nth-child(1) { background: #fff3c4; }
.how li:nth-child(2) { background: #dcf5ea; }
.how li:nth-child(3) { background: #dff0fa; }
.how-emoji { font-size: 2.2rem; display: block; }
.how h3 { font-size: 1.2rem; margin: 6px 0; }
.how p { margin: 0; color: var(--muted); font-weight: 600; }
@media (max-width: 720px) { .how { grid-template-columns: 1fr; } }
.popular { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.popular li { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--pop-sm); text-align: center; }
.popular li span { color: var(--muted); font-weight: 700; font-size: .9rem; }
.popular li strong { font: 700 1.35rem var(--display); }
.popular li:nth-child(4n+1) strong { color: #d9480f; }
.popular li:nth-child(4n+2) strong { color: #1f8a5c; }
.popular li:nth-child(4n+3) strong { color: #1c6e9a; }
.popular li:nth-child(4n+4) strong { color: #b03a74; }
@media (max-width: 720px) { .popular { grid-template-columns: 1fr 1fr; } }
.more { text-align: center; margin-top: 16px; }
.faq { display: grid; gap: 10px; }
.faq details { padding: 4px 18px; border-radius: 16px; background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--pop-sm); }
.faq summary { padding: 10px 0; font: 600 1.08rem var(--display); margin: 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '＋'; position: absolute; right: 0; top: 10px; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: '－'; }
.faq details p { margin: 0 0 14px; color: var(--muted); font-weight: 600; }

/* 📏 Página de tabelas de conversão */
.article { max-width: 900px; }
.article h1 { text-align: center; }
.hero-emoji.small { font-size: 2rem; }
.crumbs { font-size: .88rem; font-weight: 700; color: var(--muted); margin-bottom: 18px; }
.lead { text-align: center; font-size: 1.12rem; font-weight: 600; color: var(--muted); max-width: 680px; margin: 0 auto 22px; }
.toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 10px; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 2px solid var(--ink); text-decoration: none; color: var(--text); font-size: .88rem; }
.toc li:nth-child(5n+1) a { background: #fff3c4; }
.toc li:nth-child(5n+2) a { background: #dff0fa; }
.toc li:nth-child(5n+3) a { background: #ffe1ec; }
.toc li:nth-child(5n+4) a { background: #dcf5ea; }
.toc li:nth-child(5n+5) a { background: #ece3f7; }
.card-section { scroll-margin-top: 80px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: var(--pop); background: var(--surface); }
.conv-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.conv-table th, .conv-table td { padding: 10px 12px; text-align: right; border-bottom: 2px dotted var(--dots); white-space: nowrap; }
.conv-table th[scope="row"], .conv-table thead th:first-child { text-align: left; white-space: normal; }
.conv-table thead th { background: var(--butter); font: 600 .92rem var(--display); color: #2b1d16; border-bottom: 2px solid var(--ink); }
.conv-table tbody tr:nth-child(even) { background: #fffaf2; }
.conv-table tbody tr:hover { background: #fff1d6; }
.conv-table tbody tr:last-child th, .conv-table tbody tr:last-child td { border-bottom: 0; }
.sticky-first th[scope="row"] { position: sticky; left: 0; background: inherit; min-width: 150px; }
.note { color: var(--muted); font-size: .9rem; font-weight: 600; margin: 12px 4px 0; }
.prose { font-size: 1.05rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 6px; }
.cta { text-align: center; margin: 46px 0 10px; }
.primary-link {
  display: inline-block; padding: 14px 24px; border-radius: var(--radius); text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem; border: 2px solid var(--ink); box-shadow: var(--pop);
}

.foot a { color: var(--muted); }
.foot p { margin: 6px 0; }
.foot .small { font-weight: 600; font-size: .8rem; max-width: 520px; margin: 6px auto 0; }

/* 📱 Telemóvel: campo do link em largura total */
@media (max-width: 560px) {
  .url-row { flex-direction: column; }
  .url-row .primary { width: 100%; }
}

/* 📌 Botão de favoritos e alternativas quando um site bloqueia */
.bookmarklet {
  margin: 16px auto 0; max-width: 620px; text-align: left; padding: 6px 18px;
  border-radius: 16px; background: var(--surface); border: 2px dashed var(--sky);
}
.bookmarklet summary { font: 600 1rem var(--display); padding: 8px 0; cursor: pointer; text-align: center; }
.bookmarklet p { margin: 8px 0; font-weight: 600; }
.bm-drag { text-align: center; margin: 14px 0 !important; }
.bm-link {
  display: inline-block; padding: 10px 20px; border-radius: 999px; text-decoration: none; cursor: grab;
  background: var(--accent); color: #fff; font-weight: 800; border: 2px solid var(--ink); box-shadow: var(--pop-sm);
  transform: rotate(-2deg);
}
.bm-link:active { cursor: grabbing; }
.bm-steps { margin: 0 0 8px; padding-left: 1.3rem; font-weight: 600; }
.bm-steps li { margin-bottom: 6px; }
.alts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.alt-btn {
  padding: 9px 14px; border-radius: 12px; font-weight: 800; color: #2b1d16;
  background: var(--butter); border: 2px solid var(--ink); box-shadow: var(--pop-sm);
}
.alt-btn:nth-child(2) { background: var(--sky); }

/* 🥚 Doses sem frações */
.serv-unit { font-weight: 700; color: var(--muted); font-size: .9rem; }
.serv-hint {
  margin: -12px 0 22px; padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: .92rem;
  background: #fff3c4; border: 2px dashed var(--butter);
}
.badge.warn { background: #ffe3dc; color: #8a2a17; }
.warn-dlg { width: min(460px, calc(100vw - 32px)); }
.warn-dlg h2 { font-size: 1.5rem; }
.warn-list { margin: 8px 0 18px; padding-left: 1.2rem; font-weight: 700; }
.warn-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.warn-ok { background: #ffe3dc !important; }

/* 🧾 Rodapé */
.site-foot {
  margin-top: 70px; padding: 40px 16px 28px;
  background: var(--surface); border-top: 2px solid var(--ink);
}
.foot-grid {
  max-width: 1100px; margin: 0 auto; display: grid; gap: 28px;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
}
.foot-grid h2 { font: 600 .82rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--text); font-weight: 700; text-decoration: none; }
.foot-grid a:hover { color: var(--accent); text-decoration: underline wavy; text-underline-offset: 4px; }
.foot-brand p, .foot-support p { color: var(--muted); font-weight: 600; font-size: .92rem; margin: 10px 0 14px; }
.foot-brand .brand { font-size: 1.15rem; }
.foot-social { display: flex !important; flex-wrap: wrap; gap: 8px 14px !important; }
.foot-social a { font-size: .9rem; }
.foot-bottom {
  max-width: 1100px; margin: 30px auto 0; padding-top: 18px; border-top: 2px dotted var(--dots);
  color: var(--muted); font-size: .85rem; font-weight: 700;
}
.foot-bottom p { margin: 4px 0; }
.foot-bottom .small { font-weight: 600; font-size: .78rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand, .foot-support { grid-column: 1 / -1; } }
@media print { .site-foot { display: none !important; } }

/* 📄 Páginas Sobre / Privacidade / Termos */
.doc { max-width: 760px; }
.doc h1 { text-align: left; }
.doc-body {
  padding: 8px 26px 18px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop);
}
.doc-body h2 { text-align: left !important; font-size: 1.25rem; margin: 26px 0 8px !important; }
.doc-body .muted { color: var(--muted); font-size: .88rem; font-weight: 700; }
.doc-body li { margin-bottom: 8px; }

/* Barra de controlos alinhada: tudo pelo topo, unidade das doses ao lado do −/+, opções numa linha própria */
.controls { align-items: flex-start; }
.stepper-row { display: flex; align-items: center; gap: 8px; }
.controls .checks { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 22px; padding-bottom: 0; }
