/* Carnet de recettes — palette Beige / Pale Pink / Azalea / Ardoise.
   Polices : Gloock (titres) et Instrument Sans (texte), licence OFL, hébergées localement. */

@font-face { font-family: "Gloock"; src: url("fonts/Gloock-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Bold.woff") format("woff"); font-weight: 600 700; font-display: swap; }

:root {
  --paper: #f5efeb;          /* Beige */
  --surface: #fffcfa;
  --pale: #ffe1e6;           /* Pale Pink */
  --slate: #4e6e81;          /* ardoise : titres, liens */
  --ink: #2f3e48;            /* texte */
  --muted: #6b7a83;
  --line: #e9ded8;
  --line-strong: #d7c8c0;
  --danger: #b03a4a;
  --ok: #3d7a5c;
  --radius: 12px;
  --radius-sm: 9px;
  --display: "Gloock", "Bodoni 72", Didot, "Playfair Display", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --tabbar: 0px;
  /* Valeurs par défaut si theme.css n'est pas encore chargé */
  --accent: #f7c9d4; --accent-strong: #e6b6c2; --on-accent: #2f3e48; --accent-soft: #fbe4ea; --accent-deep: #b38d9c;
  color-scheme: light;
}
html[data-theme="dark"] {
  --paper: #1c2226; --surface: #252d32; --pale: #3a2f34; --slate: #a6c1d1; --ink: #f1eae6; --muted: #a3afb6;
  --line: #354047; --line-strong: #46535b; --danger: #f08a98; --ok: #8fd1ae; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --paper: #1c2226; --surface: #252d32; --pale: #3a2f34; --slate: #a6c1d1; --ink: #f1eae6; --muted: #a3afb6;
    --line: #354047; --line-strong: #46535b; --danger: #f08a98; --ok: #8fd1ae; color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); padding-bottom: var(--tabbar); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 .45em; color: var(--slate); letter-spacing: 0; }
h1 { font-size: clamp(2rem, 5.5vw, 3rem); }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .86em; background: var(--pale); padding: .1em .35em; border-radius: 5px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: .4rem 0; }
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.small { font-size: .88rem; }
.muted { color: var(--muted); }
.center { text-align: center; margin: 2rem 0; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ok-text { color: var(--ok); }
.danger-text { color: var(--danger); }
:focus-visible { outline: 2.5px solid var(--slate); outline-offset: 2px; }
[hidden] { display: none !important; }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 600; color: var(--slate); margin-bottom: .55rem; opacity: .9; }
.eyebrow a { color: inherit; text-decoration: none; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; padding-bottom: 72px; }
main.narrow { max-width: 760px; }

/* ---------- En-tête (ordinateur) ---------- */
.top { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.brand { font-family: var(--display); font-size: 1.45rem; color: var(--slate); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: 6px; }
.main-nav a:hover { color: var(--ink); background: var(--pale); }
.main-nav a[aria-current] { color: var(--ink); background: var(--accent-soft); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--slate); color: var(--paper); font-size: .72rem; font-weight: 700; font-style: normal; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9rem; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px; min-width: 250px; display: flex; flex-direction: column; z-index: 30; box-shadow: 0 12px 32px rgba(47, 62, 72, .12); }
.menu-panel a, .menu-panel .linklike { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); border-radius: 8px; text-align: left; width: 100%; font-size: .95rem; }
.menu-panel a:hover, .menu-panel .linklike:hover { background: var(--pale); }
.menu-panel .i { color: var(--slate); }

/* ---------- Barre d'onglets en bas (téléphone : zone du pouce) ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar: calc(64px + env(safe-area-inset-bottom)); }
  .top .main-nav, .top .add-top, .top .menu { display: none; }
  .top-in { min-height: 54px; justify-content: center; }
  .brand { font-size: 1.25rem; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 600; }
  .tabbar .i { width: 26px; height: 26px; padding: 3px; border-radius: 999px; box-sizing: content-box; }
  .tabbar a[aria-current] { color: var(--slate); }
  .tabbar a[aria-current] .i { background: var(--accent-soft); padding: 3px 14px; }
  .tabbar .tab-add .i { background: var(--accent); color: var(--on-accent); padding: 3px 14px; }
  .tabbar .badge { position: absolute; top: 0; left: calc(50% + 8px); min-width: 18px; height: 18px; font-size: .66rem; }
  main.wrap { padding-top: 20px; }
  body { font-size: 16.5px; }
}

/* ---------- Boutons, champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; touch-action: manipulation;
}
.btn:hover { border-color: var(--slate); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: .88rem; }
.btn-lg { min-height: 52px; font-size: 1.02rem; padding: 12px 22px; }
.btn-block { width: 100%; }
.btn-icon { width: 46px; min-height: 46px; padding: 0; border-radius: 999px; }
.btn-icon .i { width: 22px; height: 22px; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--slate); }
.btn.busy { position: relative; color: transparent; }
.btn.busy::after { content: attr(data-busy-label); color: var(--on-accent); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--slate); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.menu-panel .linklike { text-decoration: none; }

label { display: block; font-weight: 600; font-size: .92rem; }
label small, legend small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; min-height: 46px;
}
input, select, textarea { font-weight: 400; }
::placeholder { color: var(--muted); opacity: .75; }
textarea { resize: vertical; line-height: 1.55; }
textarea.mono { font-family: var(--mono); font-size: .92rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { display: inline-block; width: 20px; height: 20px; min-height: 0; margin: 0 8px 0 0; accent-color: var(--slate); flex: none; }
input[type=color] { padding: 2px; height: 38px; width: 50px; min-height: 0; display: inline-block; vertical-align: middle; margin: 0 0 0 6px; }
label.check { display: flex; align-items: center; font-weight: 400; min-height: 40px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 6px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.inline-controls { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 10px; }
.inline-controls input, .inline-controls select { margin-top: 0; width: auto; }
.inline-controls label input, .inline-controls label select { margin-top: 4px; }
.w-num { width: 84px !important; }
.form-error { color: var(--danger); font-size: .92rem; margin-top: 10px; }
.file-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; width: 100%; color: var(--slate); }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; min-height: 0; }
.file-btn:focus-within { outline: 2.5px solid var(--slate); }

/* ---------- Messages ---------- */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); margin: 0 0 18px; }
.flash p { margin: 0; }
.flash-ok { border-color: var(--accent); background: var(--accent-soft); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 18px); z-index: 60; display: flex; flex-direction: column; gap: 8px;
  width: min(92vw, 460px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 0; padding: 12px 12px 12px 16px;
  background: var(--ink); color: var(--paper); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(47, 62, 72, .25); font-size: .95rem;
  animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-error { background: var(--danger); color: #fff; }
.toast-x { background: none; border: 0; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 6px; opacity: .7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.notice { border: 1px solid var(--accent); background: var(--accent-soft); padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.notice > p, .notice > form { margin: 0; }
.notice.stack { display: block; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.box > :last-child { margin-bottom: 0; }
.box h2, .box h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; }
.box summary { cursor: pointer; font-weight: 600; color: var(--slate); }
.empty { text-align: center; padding: 48px 16px; max-width: 540px; margin: 0 auto; }
.empty-inline { color: var(--muted); padding: 24px 0; }
.copy { display: flex; gap: 8px; }
.copy input { margin: 0; font-family: var(--mono); font-size: .85rem; }

/* ---------- Accueil ---------- */
.today { background: var(--pale); border-radius: var(--radius); padding: 16px 18px 6px; margin-bottom: 26px; }
.today-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.35rem; }
.today-item small { display: block; font-family: var(--sans); font-size: .78rem; color: var(--muted); }
.today-item .btn { font-family: var(--sans); flex: none; }
.page-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.head-actions { display: flex; gap: 8px; }
.count { font-size: .95rem; color: var(--muted); }
.search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
.search select { margin: 0; width: auto; }
.search-box { position: relative; font-weight: 400; }
.search-box .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { margin: 0; padding-left: 44px; border-radius: 999px; min-height: 50px; }
@media (max-width: 560px) { .search { grid-template-columns: 1fr; } .search select { width: 100%; } }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; padding: 0; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -20px; margin-right: -20px; padding: 2px 20px; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chips-tags { margin-bottom: 24px; }
.chip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: .88rem; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--surface); min-height: 38px; }
.chip .i { width: 16px; height: 16px; }
.chip:hover { border-color: var(--slate); }
.chip.on { background: var(--slate); border-color: var(--slate); color: var(--paper); }
.chip-tag { font-weight: 400; color: var(--muted); background: transparent; min-height: 34px; padding: 5px 12px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 20px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr 1fr; gap: 20px 12px; } }
.card a { display: block; text-decoration: none; color: inherit; }
.card-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--pale); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card a:hover .card-img img { transform: scale(1.03); }
.card-img.none { background: linear-gradient(160deg, var(--pale), var(--accent)); display: flex; align-items: center; justify-content: center; }
.initial { font-family: var(--display); font-size: 3.4rem; color: var(--slate); opacity: .75; }
.fav-badge { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--slate);
  display: flex; align-items: center; justify-content: center; }
.fav-badge .i { width: 17px; height: 17px; }
.card-body { display: block; padding: 10px 2px 0; }
.card-title { display: block; font-family: var(--display); font-size: 1.22rem; line-height: 1.2; color: var(--ink); }
.card-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .i { width: 14px; height: 14px; }

/* ---------- Ajouter ---------- */
.choices { display: grid; gap: 12px; margin: 24px 0; }
.choice { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); }
.choice:hover { border-color: var(--accent); background: color-mix(in srgb, var(--surface) 70%, var(--pale)); }
.choice strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--slate); }
.choice small { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.choice-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--slate); display: flex; align-items: center; justify-content: center; }
.choice-icon .i { width: 26px; height: 26px; }
.tip { border-left: 3px solid var(--accent); padding-left: 12px; }
.seg { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin: 6px 0 22px; }
.seg a { padding: 8px 16px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.seg a[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.bookmarklet { cursor: grab; border-style: dashed; border-color: var(--slate); color: var(--slate); }
.bookmarklet-box details { margin-top: 10px; }
.bookmarklet-box details summary { font-weight: 600; color: var(--muted); cursor: pointer; }
kbd { font-family: var(--sans); font-size: .82em; font-weight: 700; padding: .1em .45em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }

/* ---------- Fiche recette ---------- */
.recipe-hero { display: grid; gap: 28px; align-items: center; margin-bottom: 34px; }
.recipe-hero.has-photo { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.hero-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 800px) {
  .recipe-hero.has-photo { grid-template-columns: 1fr; gap: 18px; }
  .hero-photo { margin: -20px -20px 0; width: calc(100% + 40px); max-width: none; border-radius: 0; aspect-ratio: 3 / 2; }
}
.hero-text h1 { margin-bottom: 14px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 12px; font-weight: 600; font-size: .95rem; }
.facts small { display: block; font-weight: 400; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.lede { font-size: 1.05rem; max-width: 62ch; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.recipe-grid { display: grid; grid-template-columns: minmax(270px, 360px) 1fr; gap: 48px; }
@media (max-width: 800px) { .recipe-grid { grid-template-columns: 1fr; gap: 32px; } }
.ingredients { align-self: start; position: sticky; top: 84px; }
@media (max-width: 800px) { .ingredients { position: static; } }
.ing-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--accent); }
.ing-head h2, .steps h2 { margin: 0; }
.servings { display: flex; align-items: center; gap: 6px; }
.servings label { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: .9rem; color: var(--muted); }
.servings input { width: 3.2em; text-align: center; margin: 0; padding: 6px 2px; min-height: 40px; font-weight: 700; -moz-appearance: textfield; }
.servings input::-webkit-inner-spin-button { -webkit-appearance: none; }
.step-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--slate); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.step-btn:hover { border-color: var(--slate); }
.step-btn .i { width: 18px; height: 18px; }
.ing-list { list-style: none; margin: 4px 0 18px; padding: 0; }
.ing-list li { padding: 10px 4px 10px 32px; border-bottom: 1px solid var(--line); position: relative; }
.ing-list li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface); }
.ing-list.tickable li:not(.ing-section) { cursor: pointer; user-select: none; }
.ing-list li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent-deep); }
.ing-list li.done::before { background: var(--accent); border-color: var(--accent); }
.ing-list li.done::after { content: ""; position: absolute; left: 10px; top: 14px; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ing-list li.ing-section { padding: 18px 0 6px; border-bottom: 0; font-family: var(--display); font-size: 1.15rem; color: var(--slate); }
.ing-list li.ing-section::before { display: none; }
.qu { font-weight: 700; font-variant-numeric: tabular-nums; }
.steps h2 { padding-bottom: 10px; border-bottom: 2px solid var(--accent); margin-bottom: 18px; }
.step-list { list-style: none; margin: 0; padding: 0; }
.step-list li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; margin-bottom: 20px; }
.step-list li p { margin: 0; max-width: 66ch; font-size: 1.04rem; }
.step-list .n { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--slate); font-family: var(--display); font-size: 1.05rem; display: flex; align-items: center; justify-content: center; }
.step-list li.step-section { display: block; font-family: var(--display); font-size: 1.3rem; color: var(--slate); margin: 28px 0 12px; }
mark { background: none; color: inherit; }
mark.t-time, mark.t-temp { font-weight: 700; color: var(--slate); background: var(--accent-soft); padding: 0 .3em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tips { background: var(--pale); border-radius: var(--radius); padding: 16px 20px; margin: 28px 0; }
.tips h3 { margin-bottom: .3em; }
.tips p { margin: 0; }
.recipe-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
@media (max-width: 800px) { .recipe-extra { grid-template-columns: 1fr; } }
.recipe-extra .box { margin: 0; }
.plan-form { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-form input, .plan-form select { width: auto; margin: 0; }
.recipe-foot { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 16px; }
.recipe-foot .chips { margin-bottom: 10px; }
.recipe-foot p { margin-bottom: .4em; }
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .cta-cook { display: none; }
  .sticky-cta { display: block; position: sticky; bottom: calc(var(--tabbar) + 10px); z-index: 15; margin-top: 24px; }
  .sticky-cta .btn { box-shadow: 0 8px 24px rgba(47, 62, 72, .18); }
}

/* ---------- Formulaire de recette ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }
@media (max-width: 880px) { .form-grid { grid-template-columns: 1fr; } .col-side { order: -1; } }
.col-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; align-self: start; position: sticky; top: 84px; }
@media (max-width: 880px) { .col-side { position: static; } }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb-wide { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); margin: 4px 0 6px; }
img.thumb { max-width: 200px; border-radius: var(--radius-sm); margin: 6px 0; }
.ing-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.ing-editor textarea { margin: 0; }
@media (max-width: 1100px) { .ing-editor { grid-template-columns: 1fr; } }
.ing-preview { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9rem; max-height: 480px; overflow: auto; }
.ing-preview-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.ing-preview ul { list-style: none; margin: 0; padding: 0; }
.ing-preview li { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pv-q { flex: none; min-width: 86px; font-weight: 700; color: var(--slate); }
.pv-q.none { font-weight: 400; color: var(--muted); font-style: italic; }
.pv-section { font-family: var(--display); color: var(--slate); font-size: 1.05rem; padding-top: 10px !important; }
.hint { margin-top: 4px !important; }
.import-report { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 22px; }
.import-report.warn { border-color: var(--line-strong); background: var(--pale); }
.report-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0 0 8px; }
.report-list li { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.ok-dot, .ko-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.ok-dot { background: var(--accent); color: var(--on-accent); }
.ko-dot { background: var(--line); color: var(--muted); }
.import-report p:last-child { margin-bottom: 0; }
.draft-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--pale); padding: 10px 14px; border-radius: var(--radius-sm); }
.draft-banner span { flex: 1; }
.danger { border-color: var(--danger); margin-top: 40px; }
.danger summary { color: var(--danger); }

/* ---------- Courses ---------- */
.add-items { display: flex; gap: 8px; margin-bottom: 8px; position: sticky; top: 70px; z-index: 5; background: var(--paper); padding: 6px 0; }
@media (max-width: 760px) { .add-items { top: 54px; } }
.add-items input { margin: 0; border-radius: 999px; padding-left: 18px; }
.aisle { font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--slate); margin: 26px 0 4px; }
.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-list li { display: flex; align-items: center; border-bottom: 1px solid var(--line); transition: opacity .25s; }
.shop-list li.removing { opacity: .3; }
.shop-list form { margin: 0; }
.shop-list form[data-shop-toggle] { flex: 1; }
.shop-item { display: flex; gap: 14px; align-items: center; width: 100%; padding: 13px 4px; min-height: 54px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.box-tick { flex: none; width: 24px; height: 24px; border: 2px solid var(--slate); border-radius: 7px; position: relative; }
.shop-list li.done .box-tick { background: var(--accent); border-color: var(--accent); }
.shop-list li.done .box-tick::after, .mise-item.done .box-tick::after { content: ""; position: absolute; left: 6.5px; top: 2px; width: 6px; height: 12px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.shop-list li.done .shop-label { color: var(--muted); text-decoration: line-through; }
.shop-label { font-size: 1.02rem; }
.shop-label small { display: block; color: var(--muted); font-size: .78rem; }
.x { background: none; border: 0; color: var(--muted); cursor: pointer; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.x .i { width: 18px; height: 18px; }
.x:hover { color: var(--danger); background: var(--pale); }
.shop-more { margin-top: 26px; }
.shop-more summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 8px 0; }
.all-done { font-family: var(--display); font-size: 1.4rem; color: var(--slate); text-align: center; padding: 24px 0; }

/* ---------- Planning ---------- */
.week-nav { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.plan-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plan-add select, .plan-add input { margin: 0; width: auto; }
.plan-add select[name=recipe_id] { flex: 1; min-width: 200px; }
.plan-add input[type=number] { width: 110px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
@media (max-width: 1000px) { .week { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .week { grid-template-columns: 1fr; } }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.day.today { border-color: var(--accent); box-shadow: inset 0 4px 0 var(--accent); }
.day h2 { font-size: 1.2rem; margin-bottom: 10px; }
.day h2 span { color: var(--muted); }
.slot h3 { font-family: var(--sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 10px 0 4px; }
.slot-empty { color: var(--line-strong); margin: 0; }
.meal { display: flex; align-items: center; gap: 6px; font-size: .94rem; margin-bottom: 4px; }
.meal a { flex: 1; }
.meal small { color: var(--muted); }
.meal form { margin: 0; }
.meal .x { width: 32px; height: 32px; }

/* ---------- Tableaux, administration, compte ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; font-size: .94rem; overflow: hidden; }
.table th, .table td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.table.compact td, .table.compact th { padding: 8px 10px; }
.table tr.inactive td { opacity: .55; }
.table tr.alert td { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.table input, .table select { margin: 0; }
@media (max-width: 760px) { .table { display: block; overflow-x: auto; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a[aria-current] { color: var(--slate); border-bottom-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stats strong { display: block; font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1.1; color: var(--slate); }
.stats span { color: var(--muted); font-size: .88rem; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; }
.checks li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.checks li > span { display: inline-block; min-width: 66px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.checks li.ok > span { color: var(--ok); }
.checks li.ko > span { color: var(--danger); }
.checks small { display: block; color: var(--muted); margin: 3px 0 0 66px; }
.secrets dt { font-weight: 600; font-size: .85rem; margin-top: 10px; }
.secrets dd { margin: 3px 0 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--slate); }
.swatch-custom { display: inline-flex; align-items: center; font-weight: 400; margin-left: 6px; }
.radios { display: flex; gap: 18px; flex-wrap: wrap; }
.pk-list { list-style: none; padding: 0; margin: 0 0 16px; }
.pk-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.pk-list li small { grid-column: 1; }
.pk-list li > form:last-child:not(.pk-rename) { grid-column: 2; grid-row: 1 / 3; }
.pk-rename { display: flex; gap: 6px; }
.pk-rename input { margin: 0; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list a, .link-list button { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); width: 100%; font-size: 1rem; }
.link-list .i { color: var(--slate); }
.link-list form { margin: 0; }
.book-list { max-height: 440px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface); }
.book-list .eyebrow { margin: 14px 0 4px; }
.book-list .eyebrow:first-child { margin-top: 0; }

/* ---------- Pages d'accueil invité ---------- */
body.guest { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px;
  background: linear-gradient(180deg, var(--pale) 0 34%, var(--paper) 34%); }
.guest-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px; box-shadow: 0 20px 50px rgba(78, 110, 129, .1); }
.guest-card h1 { font-size: 2.2rem; }
.guest-brand { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: var(--slate); margin-bottom: 16px; }
.steps-simple { padding-left: 20px; }
.steps-simple li { margin-bottom: 8px; }

/* ---------- Mode cuisine ---------- */
body.cook { background: var(--paper); padding: 0; overscroll-behavior: none; }
.cook-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; --step-size: clamp(1.45rem, 4.4vw, 2.05rem); }
.cook-app.text-l { --step-size: clamp(1.75rem, 5.4vw, 2.5rem); }
.cook-app.text-xl { --step-size: clamp(2.1rem, 6.6vw, 3rem); }
.cook-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; position: sticky; top: 0; background: var(--paper); z-index: 10; }
.cook-close, .cook-tool { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--slate);
  display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; font: 700 1rem var(--display); text-decoration: none; }
.cook-close .i, .cook-tool .i { width: 22px; height: 22px; }
.cook-title { flex: 1; min-width: 0; text-align: center; line-height: 1.2; }
.cook-title strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-title span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.cook-progress { height: 4px; background: var(--line); }
.cook-progress span { display: block; height: 100%; width: 0; background: var(--slate); transition: width .3s ease; }
.timers { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 0; scrollbar-width: none; }
.timer { flex: none; display: flex; align-items: center; gap: 8px; background: var(--slate); color: var(--paper); border-radius: 999px; padding: 6px 6px 6px 14px; }
.timer .i { width: 20px; height: 20px; }
.timer-text { display: flex; flex-direction: column; line-height: 1.1; }
.timer-text strong { font-variant-numeric: tabular-nums; font-size: 1.15rem; }
.timer-text small { font-size: .7rem; opacity: .85; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.timer-btn .i { width: 18px; height: 18px; }
.timer.paused { opacity: .75; }
.timer.done { background: var(--danger); animation: ring 1s infinite; }
@keyframes ring { 50% { transform: scale(1.04); } }
.cook-stage { flex: 1; padding: 18px 18px 120px; max-width: 860px; width: 100%; margin: 0 auto; }
.cook-card { animation: fade .25s ease-out; }
.cook-card.enter-next { animation: slide-l .28s ease-out; }
.cook-card.enter-prev { animation: slide-r .28s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-l { from { opacity: 0; transform: translateX(28px); } }
@keyframes slide-r { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .cook-card, .cook-card.enter-next, .cook-card.enter-prev, .toast { animation: none; } }
.cook-h { font-size: clamp(2rem, 7vw, 3rem); }
.step-text { font-size: var(--step-size); line-height: 1.38; color: var(--ink); margin: 6px 0 26px; }
.time-chip { display: inline-flex; align-items: center; gap: .25em; font: inherit; font-weight: 700; color: var(--slate); background: var(--accent-soft);
  border: 2px solid var(--accent); border-radius: .5em; padding: 0 .3em; cursor: pointer; line-height: 1.25; vertical-align: baseline; }
.time-chip .i { width: .8em; height: .8em; }
.time-chip:active { transform: scale(.97); }
.step-text .t-temp { font-size: inherit; }
.step-ing { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.step-ing-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--slate); font-weight: 700; margin: 0 0 6px; }
.step-ing ul { list-style: none; margin: 0; padding: 0; font-size: calc(var(--step-size) * .62); }
.step-ing li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.step-ing li:last-child { border-bottom: 0; }
.step-ing strong { color: var(--slate); }
.servings.big { justify-content: flex-start; gap: 14px; margin: 4px 0 18px; }
.servings.big .step-btn { width: 52px; height: 52px; }
.servings-val { font-weight: 700; font-size: 1.15rem; min-width: 7em; text-align: center; }
.mise { list-style: none; margin: 0 0 22px; padding: 0; font-size: calc(var(--step-size) * .66); }
.mise li { border-bottom: 1px solid var(--line); }
.mise li.ing-section { font-family: var(--display); color: var(--slate); padding: 16px 0 6px; border: 0; }
.mise-item { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; padding: 12px 2px; cursor: pointer; min-height: 56px; }
.mise-item.done { color: var(--muted); }
.mise-item.done .mise-text { text-decoration: line-through; }
.mise-item.done .box-tick { background: var(--accent); border-color: var(--accent); }
.mise strong { color: var(--slate); }
.mise-item.done strong { color: inherit; }
.resume { margin-bottom: 18px; border-color: var(--slate); color: var(--slate); }
.end-card .btn { margin-top: 10px; }
.cook-nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 70%, transparent); z-index: 10; }
.cook-nav .btn { min-height: 62px; font-size: 1.1rem; border-radius: 16px; }
.cook-nav .btn .i { width: 26px; height: 26px; }
@media (min-width: 900px) { .cook-nav { max-width: 860px; margin: 0 auto; } }
.sheet { position: fixed; inset: 0; background: rgba(28, 34, 38, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-panel { background: var(--paper); width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; border-radius: 22px 22px 0 0;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); animation: sheet-in .25s ease-out; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; }
.sheet-sub { margin-top: 18px; }
.jump-list { padding-left: 22px; margin: 0; }
.jump-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.jump-list li.current { font-weight: 700; }
.jump-list .linklike { text-decoration: none; color: var(--ink); text-align: left; }
body.sheet-open { overflow: hidden; }

/* ---------- Impression : la fiche seule ---------- */
@media print {
  :root, html[data-theme] { --paper: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #ccc; --tabbar: 0px; }
  .top, .tabbar, .actions, .servings button, .recipe-extra, form[data-ajax], .toasts, .sticky-cta, .recipe-foot .chips { display: none !important; }
  body { font-size: 11pt; }
  main.wrap { padding: 0; max-width: none; }
  .recipe-hero.has-photo { grid-template-columns: 1fr 1fr; }
  .recipe-grid { grid-template-columns: 34% 1fr; gap: 24px; }
  .ingredients { position: static; }
  .servings input { border: 0; }
  a { color: inherit; text-decoration: none; }
  .step-list li, .ing-list li { break-inside: avoid; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .main-nav a { transition: border-color .15s, background-color .15s, color .15s; }
}

/* ---------- Saisie d'une recette (une colonne, éditeur ligne par ligne) ---------- */
.rf-head, .rform { max-width: 760px; margin-left: auto; margin-right: auto; }
.rf-head h1 { margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.rf-shortcut { margin-bottom: 18px; }
.rf-head + .flash, .rf-head ~ .import-report, .rf-head ~ .draft-banner { max-width: 760px; margin-left: auto; margin-right: auto; }
.draft-banner { margin-bottom: 16px; }
.rf-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
@media (max-width: 560px) { .rf-sec { padding: 16px 14px; margin-left: -6px; margin-right: -6px; } }
.rf-sec > * + * { margin-top: 14px; }
.rf-sec-head h2 { margin: 0 0 2px; }
.rf-sec-head p { margin: 0; }
@media (hover: none) { .kbd-hint { display: none; } }
.field label, .field .label { display: block; font-weight: 600; font-size: .92rem; }
.field-msg { color: var(--danger); font-size: .88rem; margin: 6px 0 0; min-height: 0; }
.field-msg:empty { display: none; }
.field-hint { font-size: .8rem; color: var(--slate); margin: 4px 0 0; min-height: 1.1em; font-weight: 600; }
.field-hint.bad { color: var(--muted); font-weight: 400; }
input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
.input-title { font-family: var(--display); font-size: 1.55rem; padding: 12px 14px; min-height: 56px; color: var(--slate); }
.input-title::placeholder { font-family: var(--display); }
@media (max-width: 560px) { .input-title { font-size: 1.3rem; } .dropzone { height: 120px; } }

.dropzone { position: relative; display: flex; align-items: center; justify-content: center; height: 150px; border: 2px dashed var(--line-strong);
  border-radius: var(--radius); background: var(--paper); cursor: pointer; overflow: hidden; font-weight: 400; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--slate); background: var(--pale); }
.dropzone:focus-within { outline: 2.5px solid var(--slate); outline-offset: 2px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; margin: 0; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: var(--slate); padding: 10px; }
.dz-empty .i { width: 30px; height: 30px; margin-bottom: 4px; }
.dz-empty small { color: var(--muted); }
.dz-change { display: none; position: absolute; right: 10px; bottom: 10px; align-items: center; gap: 6px; background: var(--surface); color: var(--slate);
  border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .85rem; }
.dropzone.has-photo { border-style: solid; height: auto; aspect-ratio: 16 / 9; }
.dropzone.has-photo .dz-empty { display: none; }
.dropzone.has-photo .dz-change { display: inline-flex; }

.rf-facts { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .rf-facts { grid-template-columns: 1fr 1fr; } }
.stepper { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.stepper input { width: 3.6em; text-align: center; margin: 0; font-weight: 700; -moz-appearance: textfield; padding: 8px 2px; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper .step-btn { width: 44px; height: 44px; flex: none; }

.le-list { list-style: none; margin: 0; padding: 0; }
.le-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; align-items: start; padding: 4px 0; border-bottom: 1px solid var(--line); }
.le-row:last-child { border-bottom: 0; }
.le-num { padding-top: 13px; text-align: center; font-family: var(--display); color: var(--slate); font-size: 1.05rem; }
.le-ingredients .le-row:not(.is-section) .le-num::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-deep); margin-top: 6px; }
.le-steps .le-num { width: 26px; height: 26px; margin-top: 10px; padding: 0; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.le-row.is-section .le-num { background: none; }
.le-input { margin: 0; border-color: transparent; background: transparent; padding: 9px 10px; min-height: 44px; resize: none; overflow: hidden; line-height: 1.5; }
.le-input:hover { border-color: var(--line); }
.le-input:focus { background: var(--surface); }
.is-section .le-input { font-family: var(--display); font-size: 1.2rem; color: var(--slate); }
.le-row.is-section { padding-top: 12px; }
.le-hint { margin: 0 10px 6px; font-size: .8rem; color: var(--slate); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.le-hint:empty { display: none; }
.le-hint .i { width: 14px; height: 14px; }
.le-hint.none { color: var(--muted); font-style: italic; }
.le-acts { display: flex; gap: 2px; padding-top: 5px; }
.le-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.le-btn:hover { background: var(--pale); color: var(--slate); }
.le-btn .i { width: 17px; height: 17px; }
.le-btn:nth-child(1) .i { transform: rotate(90deg); }
.le-btn:nth-child(2) .i { transform: rotate(90deg); }
.le-btn:nth-child(3):hover { color: var(--danger); }
@media (hover: hover) { .le-acts { opacity: 0; transition: opacity .15s; } .le-row:hover .le-acts, .le-row:focus-within .le-acts { opacity: 1; } }
@media (hover: none) { .le-btn:nth-child(1), .le-btn:nth-child(2) { display: none; } .le-row:focus-within .le-btn { display: inline-flex; } }
.le-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.rf-more { padding: 0; }
.rf-more > summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.rf-more > summary::-webkit-details-marker { display: none; }
.rf-more > summary strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--slate); }
.rf-more > summary small { color: var(--muted); margin-left: 6px; }
.rf-more > summary::after { content: "+"; font-size: 1.4rem; color: var(--slate); margin-left: auto; }
.rf-more[open] > summary::after { content: "–"; }
.rf-more > .stack { padding: 0 22px 22px; }
.chip-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; font-weight: 400; }
.chip-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 15px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.chip-radio input:checked + span { background: var(--slate); border-color: var(--slate); color: var(--paper); }
.chip-radio input:focus-visible + span { outline: 2.5px solid var(--slate); outline-offset: 2px; }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-suggest .chip { cursor: pointer; }

.savebar { position: sticky; bottom: calc(var(--tabbar) + 8px); z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 10px 10px 18px; margin-top: 20px; box-shadow: 0 10px 30px rgba(47, 62, 72, .14); }
.savebar .btn { flex: none; }
@media (max-width: 480px) { .save-status { display: none; } .savebar { padding: 8px; } .savebar .btn { width: 100%; } }
