:root {
  --ink: #1F1B16;
  --muted: #5A5047;
  --soft: #6B6259;
  --line: #EDE5DA;
  --line2: #E2D8CC;
  --sand: #F6F1EA;
  --photo: #E9DCCB;
  --red: #B83A1E;
  --red-dark: #8F2C16;
  --red-soft: #FBEDE8;
  --green: #4A6A2A;
  --green-soft: #EAF0E2;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 17px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 640px; margin: 0 auto; padding-bottom: calc(96px + var(--safe-b)); min-height: 100vh; }
a { color: var(--red); }
h1, h2 { font-family: var(--display); font-weight: 800; margin: 0; line-height: 1.12; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
p { margin: 0; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #2B6CB0; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pad { padding: 0 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.hand { font-family: var(--hand); font-weight: 700; line-height: 1; }
.kicker { font-family: var(--hand); font-weight: 700; font-size: 28px; color: var(--red); line-height: 1; }
.owner { font-family: var(--hand); font-weight: 700; font-size: 23px; color: var(--green); line-height: 1; }
.muted { color: var(--soft); }
.small { font-size: 14px; }
.head { padding: 26px 20px 6px; display: flex; flex-direction: column; gap: 6px; }
.section { padding: 26px 20px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head a { font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.empty { background: var(--sand); border-radius: 18px; padding: 18px; color: var(--muted); font-size: 16px; }

/* buscador y chips */
.search { display: flex; align-items: center; gap: 10px; background: var(--sand); border-radius: 14px; padding: 0 14px; height: 52px; margin-top: 12px; }
.search svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--soft); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; font-size: 15px; font-weight: 500; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }

/* tarjetas */
.hscroll { display: flex; gap: 14px; overflow-x: auto; padding: 0 20px 4px; margin: 0 -20px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.card { flex: 0 0 230px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.thumb { position: relative; height: 150px; border-radius: 18px; background: var(--photo); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ph svg { width: 40px; height: 40px; fill: none; stroke: #A08A72; stroke-width: 1.6; }
.badge-voice { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--red); }
.badge-voice svg { width: 13px; height: 13px; fill: var(--red); }
.card-title { font-size: 18px; font-weight: 600; line-height: 1.2; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.grid .card { flex: auto; }
.grid .thumb { height: 130px; }
.grid .card-title { font-size: 16px; }
.grid .owner { font-size: 20px; }

.feed-mini { display: flex; gap: 12px; align-items: center; background: var(--sand); border-radius: 18px; padding: 12px; text-decoration: none; color: var(--ink); }
.feed-mini .mini { flex: 0 0 72px; height: 72px; border-radius: 12px; background: var(--photo); overflow: hidden; }
.feed-mini .mini img { width: 100%; height: 100%; object-fit: cover; }

/* receta */
.hero { position: relative; height: 270px; background: var(--photo); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .ph svg { width: 56px; height: 56px; }
.back { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); left: 16px; width: 44px; height: 44px; border-radius: 999px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--ink); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.back.flat { position: static; box-shadow: none; background: var(--sand); }
.back svg, .icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--sand); color: var(--muted); }
.pill.green { background: var(--green-soft); color: #3B5521; }
.voice { margin: 20px 20px 0; padding: 14px; border-radius: 18px; background: var(--red-soft); display: flex; flex-direction: column; gap: 8px; }
.voice audio { width: 100%; }
.voice video { width: 100%; border-radius: 12px; background: #000; max-height: 420px; }
.voice-title { font-size: 16px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--sand); border-radius: 999px; padding: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 999px; border: 0; background: #fff; font-size: 22px; font-weight: 600; }
.stepper span { min-width: 92px; text-align: center; font-size: 15px; font-weight: 600; }
.ing { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ing b { font-weight: 600; color: var(--muted); white-space: nowrap; }
.steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 14px; }
.step .n { flex: 0 0 32px; height: 32px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.tip { background: var(--sand); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tip .hand { font-size: 25px; color: var(--red); }

/* botones */
.btn { min-height: 52px; border-radius: 14px; border: 0; background: var(--red); color: #fff; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; text-decoration: none; width: 100%; }
.btn:active { background: var(--red-dark); }
.btn.dark { background: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.quiet { background: var(--sand); color: var(--ink); }
.btn.danger { background: #fff; color: #A3261B; border: 1.5px solid #E9B4AC; }
.btn[disabled] { opacity: .55; }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.big { min-height: 68px; border-radius: 18px; font-size: 18px; justify-content: flex-start; padding: 0 20px; gap: 14px; }
.btn.big svg { width: 28px; height: 28px; }
.btn.rec { background: #A3261B; }
.linkbtn { background: none; border: 0; padding: 8px 0; color: var(--red); font-weight: 600; font-size: 15px; }

/* formularios */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lab { font-size: 15px; font-weight: 600; }
.field .help { font-size: 14px; color: var(--soft); }
.input, .textarea, select.input { width: 100%; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line2); padding: 12px 14px; font-size: 17px; background: #fff; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { border-color: var(--ink); outline: none; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg button { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line2); background: #fff; font-size: 15px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--sand); border-radius: 14px; padding: 14px; font-size: 16px; }
.check input { width: 24px; height: 24px; flex: none; accent-color: var(--red); margin: 0; }
.preview { position: relative; border-radius: 18px; overflow: hidden; background: var(--photo); }
.preview img { width: 100%; max-height: 320px; object-fit: cover; }
.preview .x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: #fff; display: flex; align-items: center; justify-content: center; }
.preview .x svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.mic { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff; font-size: 14px; font-weight: 600; }
.mic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mic.on { background: #A3261B; color: #fff; border-color: #A3261B; }
.progress { height: 8px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.progress div { height: 100%; background: var(--red); width: 0; transition: width .2s; }

/* lo hice yo */
.post { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 999px; color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.post-photo { background: var(--photo); }
.post-photo img { width: 100%; max-height: 460px; object-fit: cover; }
.post-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.reply { background: var(--sand); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.reply .hand { font-size: 21px; color: var(--green); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.act { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.act[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.act[aria-pressed="true"] svg { fill: currentColor; }
.comment-form { display: flex; gap: 8px; }
.comment-form .input { min-height: 46px; padding: 8px 12px; font-size: 16px; }
.comment-form button { flex: none; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-weight: 600; }

/* lista */
.li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li input[type=checkbox] { width: 26px; height: 26px; flex: none; accent-color: var(--green); margin: 0; }
.li label { flex: 1; min-width: 0; font-size: 17px; }
.li.done label span:first-child { text-decoration: line-through; color: var(--soft); }
.li .from { display: block; font-size: 13px; color: var(--soft); }
.li .del { flex: none; width: 44px; height: 44px; border: 0; background: none; color: var(--soft); display: flex; align-items: center; justify-content: center; }
.li .del svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 32px 24px; }
.logo { width: 76px; height: 76px; border-radius: 22px; }
.error { background: #FCE8E5; color: #8A1F14; border-radius: 12px; padding: 12px 14px; font-size: 15px; }

/* navegación */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 8px 6px calc(10px + var(--safe-b)); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; text-decoration: none; color: var(--soft); font-size: 12px; font-weight: 600; }
.nav a svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav a.on { color: var(--red); }
.nav-plus span { width: 50px; height: 50px; margin-top: -22px; border-radius: 999px; background: var(--red); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(184,58,30,.35); }
.nav-plus span svg { stroke: #fff !important; stroke-width: 2.6 !important; }
.nav-plus { color: var(--ink) !important; }
@media (min-width: 680px) { .nav { left: 50%; transform: translateX(-50%); max-width: 640px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); z-index: 20; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 600; max-width: calc(100% - 40px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.loading { padding: 60px 20px; text-align: center; color: var(--soft); }
