@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans.woff2') format('woff2'); font-style: normal; font-weight: 100 1000; font-display: swap; }
@font-face { font-family: Fraunces; src: url('/fonts/fraunces.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --cream: #faf8f0;
  --surface: #fffefa;
  --ink: #25362a;
  --muted: #536055;
  --forest: #285e46;
  --forest-hover: #1b4835;
  --border: #e5e3d6;
  --blue: #285571;
  --serif: Fraunces, Georgia, serif;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .62; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #487e62; outline-offset: 3px;
}
a { color: inherit; }
svg { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
.skip { position: absolute; z-index: 4; top: 8px; left: 8px; padding: 12px; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
.top { border-bottom: 1px solid #e9e5d8; background: #fdfbf4; }
.top-inner, .shell { width: min(100% - 56px, 1072px); margin-inline: auto; }
.top-inner { min-height: 77px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font: 720 1.78rem/1 var(--serif); letter-spacing: -.055em; }
.brand img { border-radius: 11px; display: block; }
.brand-accent { color: var(--forest); }
.brand-dot { color: #be5135; }
.account { display: flex; align-items: center; gap: 9px; min-height: 44px; border: 1px solid var(--border); border-radius: 24px;
  padding: 5px 11px 5px 6px; background: var(--surface); font-size: .88rem; font-weight: 720; }
.account:hover, .icon-button:hover { background: #ebefe4; }
.account-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #e7eddc; color: var(--forest); }
.welcome { position: relative; isolation: isolate; overflow: hidden; margin-top: 32px; min-height: 270px; display: flex; align-items: center;
  border: 1px solid #d3ddc3; border-radius: 26px; background: radial-gradient(ellipse at 83% 60%, #c8d8ae 0%, #dce6cb 48%, #e8eddc 100%); }
.welcome-copy { padding: 32px 0 33px 39px; position: relative; z-index: 1; width: 65%; }
.eyebrow { width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 7px; margin-bottom: 13px; color: #345942; font-size: .77rem; letter-spacing: .115em; font-weight: 820; text-transform: uppercase; overflow-wrap: anywhere; }
.mode-dot { width: 8px; height: 8px; border-radius: 50%; background: #618750; flex: none; }
.welcome h1 { color: #233c2b; font: 650 clamp(2.7rem, 5.5vw, 4.4rem)/.98 var(--serif); letter-spacing: -.062em; }
.welcome h1 span { color: #557953; }
.welcome-copy > p:not(.eyebrow) { font-size: 1.03rem; line-height: 1.45; max-width: 38ch; margin-block: 14px 21px; color: #3c5342; }
.hero-art { position: absolute; z-index: 0; width: 36%; height: auto; object-fit: contain; right: 3%; bottom: 10px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 45px; border: 1px solid transparent; border-radius: 12px;
  padding: 8px 15px; font-size: .91rem; font-weight: 760; line-height: 1.2; text-align: center; background: transparent; }
.primary { color: #fffdf5; background: var(--forest); }
.primary:hover { background: var(--forest-hover); }
.secondary { background: var(--surface); border-color: var(--border); }
.secondary:hover { background: #f1f2e9; }
.quiet { color: var(--forest); border: 0; background: transparent; min-height: 44px; font-weight: 700; }
.quiet:hover { text-decoration: underline; }
.cook::before { content: '✦'; font-size: 1.05em; color: #f5d485; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 22px; background: #f0eee3; border: 1px solid #e8e4d7;
  border-radius: 16px; padding: 5px; }
.tab { display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; padding: 7px 5px; min-height: 47px;
  background: transparent; border-radius: 11px; color: #4f5e52; font-size: .93rem; font-weight: 760; }
.tab:hover { background: #f9f7ef; }
.tab[aria-current] { background: var(--surface); border-color: #e0e2d5; color: var(--forest); box-shadow: 0 2px 4px #263c2020; }
.tab.congelador { color: var(--blue); }
.tab.congelador[aria-current] { background: #e6f0f5; border-color: #cbdee8; }
#sync { background: #fff0d1; padding: 10px 14px; border-radius: 10px; margin-top: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 14px; }
.section-head h2 { font: 640 clamp(2.25rem, 4vw, 2.9rem)/1.02 var(--serif); letter-spacing: -.05em; }
.section-head p { margin-top: 5px; color: var(--muted); font-size: .95rem; }
.congelador .section-head h2 { color: var(--blue); }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 215px); gap: 10px; margin-bottom: 15px; }
.search-label, .category-label { display: flex; align-items: center; position: relative; min-width: 0; color: var(--muted); }
.search-label svg { position: absolute; left: 13px; pointer-events: none; }
.category-label > svg, .select-wrap > svg { position: absolute; right: 12px; pointer-events: none; }
.filters input, .filters select, .dialog-body input, .dialog-body select {
  min-width: 0; width: 100%; min-height: 44px; border: 1px solid #dcded0; background: var(--surface); border-radius: 10px; padding: 9px 11px;
}
.filters input { padding-left: 38px; }
select { appearance: none; }
.filters select, .dialog-body select { padding-right: 34px; text-overflow: ellipsis; }
.filters select { line-height: 1.2; }
.inventory { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.inventory-group + .inventory-group { margin-top: 20px; }
.inventory-label { margin: 0 0 7px; font-size: .92rem; font-weight: 800; color: var(--muted); }
.card { display: flex; flex-direction: column; gap: 7px; min-width: 0; border: 1px solid var(--border); border-radius: 17px; padding: 15px; background: var(--surface);
  box-shadow: 0 2px 3px #4a3a2410; }
.congelador .card { border-color: #dbe5e8; }
.card-kind { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .8rem; font-weight: 760; }
.category-icon { display: inline-grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; flex: none; }
.category-icon.bases { color: #396347; background: #e7eddc; }
.category-icon.salsas { color: #93452e; background: #f9e4da; }
.category-icon.proteinas { color: #774470; background: #f1e5ef; }
.category-icon.verduras { color: #476639; background: #e9efdc; }
.category-icon.preparadas { color: #805823; background: #f5ecd5; }
.icon-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 11px;
  background: transparent; color: var(--muted); }
.card-menu { margin-left: auto; margin-right: -5px; }
.card h3 { font: 640 1.38rem/1.14 var(--serif); letter-spacing: -.035em; margin-top: 1px; }
.quantity { color: var(--forest); font-size: 1.18rem; font-weight: 820; margin-bottom: 1px; }
.congelador .quantity { color: var(--blue); }
.details { display: grid; gap: 6px; color: var(--muted); font-size: .87rem; margin-bottom: 4px; }
.details div { display: flex; gap: 7px; align-items: center; }
.details dd { overflow-wrap: anywhere; }
.details strong { font-weight: 700; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; padding-top: 10px; border-top: 1px solid #eeece2; margin-top: auto; }
.card-actions .button { padding-inline: 10px; font-size: .84rem; }
.use { background: #e9efdf; color: #254e37; border-color: #e1ead6; }
.use:hover { background: #dce8cd; }
.congelador .use { background: #e5eff5; color: #244d66; border-color: #d7e6ee; }
.congelador .use:hover { background: #d6e8f3; }
.empty { display: grid; justify-items: center; text-align: center; gap: 11px; background: #fdfbf4; border: 1px dashed #d9ddcd;
  border-radius: 17px; padding: 34px 14px; }
.empty h3, .recipes h3 { font: 630 1.35rem/1.16 var(--serif); }
.empty p, .muted { color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 5px 0 12px; }
.timeline-date { color: var(--forest); font-size: .85rem; font-weight: 790; margin: 17px 0 7px; }
.timeline-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 13px; min-height: 64px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.timeline-row p { font-size: .95rem; overflow-wrap: anywhere; }
.timeline-row .muted, .timeline-row time { font-size: .83rem; color: var(--muted); }
.timeline-actions { display: flex; align-items: center; gap: 3px; }
.timeline-repeat { padding: 5px; }
.footer { display: flex; justify-content: space-between; align-items: center; padding-block: 14px 17px; margin-top: 27px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem; }
.mobile-save { display: none; }
dialog { width: min(100% - 32px, 510px); max-height: calc(100dvh - 25px); border: 1px solid #deded1; border-radius: 22px; padding: 0;
  background: #fffdf7; color: var(--ink); box-shadow: 0 20px 90px #1b34295a; overscroll-behavior: contain; }
dialog::backdrop { background: #1a2e25a3; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 15px 10px 20px;
  border-bottom: 1px solid #eeeadd; background: #fffdf7; z-index: 1; }
.dialog-head h2 { font: 640 1.7rem/1.04 var(--serif); letter-spacing: -.04em; }
.dialog-body { padding: 17px 20px 20px; }
.dialog-note { margin-bottom: 15px; color: var(--muted); line-height: 1.43; }
.taste-help { font-size: .83rem; margin-top: -4px; }
.dialog-body form, .dialog-actions { display: grid; gap: 11px; }
.dialog-actions { margin-top: 12px; }
.dialog-actions .button { justify-content: flex-start; }
.dialog-body label, .field-static { display: grid; gap: 5px; font-size: .9rem; font-weight: 730; min-width: 0; }
.field-static span { align-self: end; padding-block: 11px; }
.dialog-body input, .dialog-body select { font-size: 1rem; font-weight: 490; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.select-wrap { display: flex; align-items: center; position: relative; min-width: 0; }
.form-submit { width: 100%; min-height: 48px; margin-top: 3px; }
.form-error { color: #8b301e; background: #fae9e1; padding: 10px; border-radius: 8px; font-size: .9rem; }
.recipes { display: grid; gap: 10px; margin: 0 0 13px; padding: 0; list-style: none; }
.recipes > li { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface); overflow-wrap: anywhere; }
.recipes p, .recipes ol { margin-top: 6px; font-size: .9rem; }
.recipes ol { margin-bottom: 0; padding-left: 19px; }
.recipe-meta { color: var(--forest); font-weight: 700; }
.install-copy { display: grid; gap: 12px; line-height: 1.5; margin-bottom: 12px; }
.toast { position: fixed; z-index: 5; bottom: 22px; left: 50%; transform: translate(-50%, 6px); border-radius: 12px; padding: 11px 15px;
  color: #fffdf5; background: #254734; width: max-content; max-width: calc(100% - 24px); box-shadow: 0 4px 20px #172d2e3b;
  visibility: hidden; opacity: 0; transition: opacity .15s, transform .15s; pointer-events: none; }
.toast.visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 850px) {
  .inventory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .top-inner, .shell { width: calc(100% - 28px); }
  .top-inner { min-height: 62px; }
  .brand { gap: 7px; font-size: 1.5rem; }
  .brand img { width: 35px; height: 35px; }
  .account { font-size: .82rem; gap: 6px; }
  .welcome { margin-top: 14px; min-height: 186px; border-radius: 20px; background: radial-gradient(ellipse at right bottom, #cfdcb4 0%, #e6ecd9 82%); }
  .welcome-copy { width: 70%; padding: 11px 0 12px 16px; }
  .eyebrow { margin-bottom: 8px; font-size: .69rem; }
  .welcome h1 { font-size: clamp(2.08rem, 8.3vw, 2.65rem); line-height: 1; max-width: 9ch; }
  .welcome-copy > p:not(.eyebrow) { font-size: .875rem; margin-block: 7px 9px; line-height: 1.32; max-width: 22ch; }
  .cook { font-size: .84rem; min-height: 44px; padding-inline: 10px; }
  .hero-art { width: 44%; right: -5px; bottom: 13px; }
  .tabs { margin-top: 12px; padding: 4px; gap: 3px; border-radius: 13px; }
  .tab { gap: 4px; font-size: .83rem; min-height: 44px; }
  .tab svg { width: 17px; height: 17px; }
  .section-head { margin: 18px 0 11px; }
  .section-head h2 { font-size: 2.1rem; }
  .section-head p { font-size: .9rem; margin-top: 3px; }
  #view:not(.historial) .section-head > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; }
  .desktop-save { display: none; }
  .filters { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 7px; margin-bottom: 10px; }
  .filters select { padding-right: 23px; padding-left: 7px; font-size: .89rem; }
  .category-label > svg { right: 6px; }
  .inventory { grid-template-columns: 1fr; gap: 9px; }
  .card { padding: 11px 12px 10px; border-radius: 14px; gap: 4px; }
  .card h3 { margin-top: 1px; font-size: 1.26rem; }
  .card-kind { gap: 7px; }
  .category-icon { width: 34px; height: 34px; border-radius: 10px; }
  .details { display: flex; gap: 5px 13px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 3px; }
  .card-actions { margin-top: 3px; padding-top: 6px; }
  .timeline-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; }
  .timeline-row time { grid-column: 3; grid-row: 1; }
  .timeline-actions { grid-column: 2 / span 2; }
  .timeline-repeat { width: fit-content; padding: 0; }
  .footer { margin-bottom: clamp(80px, 13vh, 110px); font-size: .75rem; }
  .mobile-save { display: block; position: fixed; z-index: 3; bottom: 0; inset-inline: 0; padding: 9px 14px max(9px, env(safe-area-inset-bottom));
    background: #faf8f0f5; border-top: 1px solid #e9e4d7; }
  .mobile-save .button { display: flex; width: 100%; min-height: 48px; }
  .mobile-save .button::before { content: '+'; font-size: 1.3rem; font-weight: 500; line-height: 1; }
  dialog { position: fixed; margin: auto 0 0; inset: auto 0 0; width: 100%; max-width: 100%; max-height: calc(100dvh - 20px); border-radius: 20px 20px 0 0; }
  .dialog-body { padding-bottom: max(19px, env(safe-area-inset-bottom)); }
  .toast { bottom: calc(75px + env(safe-area-inset-bottom)); }
}
@media (max-width: 345px) {
  .tab { font-size: .75rem; }
  .welcome-copy > p:not(.eyebrow) { max-width: 19ch; }
  .hero-art { width: 43%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
