/* ════════════════════════════════════════════════════════════════════
   «Что приготовить?» — тёплая «домашняя» тема.
   Цвета заданы CSS-переменными: светлая и тёмная тема через
   [data-theme="dark"] на <html>. Все размеры — тап-френдли (≥40px).
   ════════════════════════════════════════════════════════════════════ */

:root{
  --bg:      #f7f1e8;
  --bg2:     #fffaf3;
  --card:    #fffdf9;
  --ink:     #43342a;
  --mut:     #8d7c6e;
  --line:    #eadfd2;
  --acc:     #d96f32;          /* терракота — основной акцент */
  --accsoft: #fae4d3;
  --accink:  #a44f1b;
  --acc2:    #6f8f4f;          /* оливковый — «всё есть» */
  --oksoft:  #e3eed7;
  --okink:   #43682e;
  --warn:    #d99a2b;          /* янтарь — «не хватает» / «скоро испортится» */
  --warnsoft:#f8eccf;
  --warnink: #8a5f10;
  --danger:  #c14b3a;          /* кирпич — «нет дома» */
  --dangersoft:#f6dcd6;
  --dangerink:#8f2f21;
  --shadow:  0 2px 10px rgba(90,60,35,.08), 0 1px 3px rgba(90,60,35,.06);
  color-scheme: light;
}
[data-theme="dark"]{
  --bg:      #211a14;
  --bg2:     #2a211a;
  --card:    #322821;
  --ink:     #f2e7da;
  --mut:     #b3a08e;
  --line:    #453830;
  --acc:     #e8854a;
  --accsoft: #4a3324;
  --accink:  #f0a97b;
  --acc2:    #93b26f;
  --oksoft:  #35422b;
  --okink:   #b3d494;
  --warn:    #e0a93f;
  --warnsoft:#453a22;
  --warnink: #eccb8a;
  --danger:  #d9705c;
  --dangersoft:#4e2e26;
  --dangerink:#f0b0a3;
  --shadow:  0 2px 10px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
  color-scheme: dark;
}

/* ── База ── */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ max-width:100%; overflow-x:hidden; }
html{ touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
body{
  margin:0;
  font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Segoe UI Emoji","Noto Color Emoji",sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.45;
  -webkit-text-size-adjust:100%;
}
button{ font-family:inherit; color:inherit; }
input,select{ font-family:inherit; color:var(--ink); }
h1,h2,h3{ margin:0; line-height:1.25; }
p{ margin:.4em 0; }
.hidden{ display:none !important; }
:focus-visible{ outline:2px solid var(--acc); outline-offset:2px; }

/* ── Шапка ── */
.topbar{
  position:sticky; top:0; z-index:20;
  background:var(--bg2);
  border-bottom:1px solid var(--line);
}
.topbar__in{
  max-width:980px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 16px;
}
.logo{ font-size:18px; letter-spacing:.2px; }
.logo b{ font-weight:800; }
.iconbtn{
  width:44px; height:44px; border-radius:12px;
  border:1px solid var(--line); background:var(--card);
  font-size:19px; cursor:pointer;
}
.iconbtn:active{ transform:scale(.94); }

/* ── Общее ── */
main{ max-width:1120px; margin:0 auto; padding:14px 16px 108px; }
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow:var(--shadow);
}
.linkbtn{
  background:none; border:0; padding:8px 4px; cursor:pointer;
  color:var(--accink); font-size:14px; font-weight:600; text-decoration:underline;
}

/* ── Хиро на кладовой ── */
.hero h1{ font-size:25px; font-weight:800; }
.hero__p{ color:var(--mut); font-size:15px; margin:8px 0 12px; }
.baselabel{
  display:flex; gap:10px; align-items:center;
  background:var(--accsoft); border-radius:12px;
  padding:12px 14px; cursor:pointer; font-size:14.5px;
}
.baselabel input{ width:20px; height:20px; accent-color:var(--acc); flex:0 0 auto; }

/* ── Поиск с автодополнением ── */
.searchwrap{ position:relative; margin:14px 0 4px; }
.search{
  width:100%; padding:13px 16px;
  border-radius:14px; border:1.5px solid var(--line);
  background:var(--card); font-size:16px;
}
.search:focus{ border-color:var(--acc); outline:none; }
.drop{
  position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:40;
  background:var(--card); border:1px solid var(--line); border-radius:14px;
  box-shadow:0 10px 28px rgba(60,35,15,.18);
  max-height:300px; overflow:auto;
}
.drop button{
  display:flex; width:100%; text-align:left; align-items:baseline; gap:8px;
  padding:12px 14px; background:none; border:0; border-bottom:1px solid var(--line);
  font-size:15px; cursor:pointer;
}
.drop button:last-child{ border-bottom:0; }
.drop button:hover{ background:var(--accsoft); }
.drop .dc{ margin-left:auto; font-size:12px; color:var(--mut); white-space:nowrap; }
.drop .dsyn{ font-size:12px; color:var(--mut); }
.drop .dnone{ padding:14px; color:var(--mut); font-size:14px; text-align:center; }

/* ── Кладовая ── */
.panhead{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:10px 0 2px; }
.panhead .cnt{ font-weight:700; font-size:15px; }
.spoil-panel{
  background:var(--warnsoft); border:1px solid var(--warn);
  border-radius:12px; padding:10px 12px; margin:10px 0 0; font-size:14px;
}
.spoil-panel b{ color:var(--warnink); }
.catnav{
  display:flex; gap:8px; overflow-x:auto; -webkit-overflow-scrolling:touch;
  padding:8px 0 6px; scrollbar-width:none;
}
.catnav::-webkit-scrollbar{ display:none; }
.catnav button{
  flex:0 0 auto; padding:8px 13px; min-height:38px;
  border-radius:999px; border:1px solid var(--line); background:var(--card);
  font-size:13.5px; cursor:pointer; white-space:nowrap;
}
.catnav button:hover{ border-color:var(--acc); }
.sect{ margin-top:16px; }
.sect__h{
  display:flex; align-items:baseline; gap:8px;
  font-size:16.5px; font-weight:800; margin:0 0 8px 2px;
}
.sect__h small{ font-size:12.5px; color:var(--mut); font-weight:600; }
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  position:relative;
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px; min-height:44px;
  border-radius:999px; border:1.5px solid var(--line);
  background:var(--card); font-size:14.5px; cursor:pointer;
  transition:border-color .12s, background .12s;
}
.chip:hover{ border-color:var(--acc); }
.chip.sel{ background:var(--accsoft); border-color:var(--acc); font-weight:600; }
.chip.base-on{ opacity:.85; cursor:default; }
.chip .wb{
  display:none;
  border:0; background:none; cursor:pointer;
  font-size:14px; line-height:1; padding:3px 4px; border-radius:8px;
}
.chip.sel .wb{ display:inline-block; color:var(--mut); }
.chip .wb.on{ background:var(--warn); color:#fff; }
.empty{ color:var(--mut); padding:14px 2px; font-size:15px; }

/* ── Кнопка «Подобрать рецепты» ── */
.fab{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:92px; z-index:30;
  background:var(--acc); color:#fff;
  border:0; border-radius:999px; padding:14px 24px;
  font-size:16px; font-weight:700; cursor:pointer;
  box-shadow:0 8px 22px rgba(210,100,40,.45);
}
.fab:active{ transform:translateX(-50%) scale(.96); }

/* ── Рецепты: режим + фильтры ── */
.seg{
  display:grid; grid-template-columns:1fr 1fr; gap:4px;
  background:var(--line); padding:4px; border-radius:14px; margin-bottom:14px;
}
.seg button{
  border:0; background:transparent; border-radius:11px;
  padding:11px 8px; min-height:46px;
  font-size:14.5px; font-weight:700; color:var(--mut); cursor:pointer;
}
.seg button.on{ background:var(--card); color:var(--ink); box-shadow:var(--shadow); }
.filters{ padding:8px 16px; margin-bottom:14px; }
.frow{
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  padding:10px 0; border-bottom:1px dashed var(--line);
}
.frow:last-child{ border-bottom:0; }
.flab{ flex:0 0 96px; font-size:13px; font-weight:700; color:var(--mut); }
.fchip{
  padding:7px 13px; min-height:38px;
  border-radius:999px; border:1.5px solid var(--line); background:var(--card);
  font-size:13.5px; cursor:pointer;
}
.fchip.on{ background:var(--acc); border-color:var(--acc); color:#fff; font-weight:600; }
.filters select{
  padding:9px 12px; border-radius:12px; border:1.5px solid var(--line);
  background:var(--card); font-size:14px; min-height:40px;
}
.exclwrap{ position:relative; flex:1 1 180px; min-width:160px; }
.excl-in{
  width:100%; padding:9px 12px; border-radius:12px; border:1.5px solid var(--line);
  background:var(--card); font-size:14px; min-height:40px;
}
.exclchips{ display:flex; flex-wrap:wrap; gap:8px; padding:10px 0 2px; }
.exclchips .chip.sel{ cursor:default; }

/* ── Результаты ── */
.rhead{ margin:4px 2px 12px; }
.rhead h2{ font-size:19px; font-weight:800; margin-bottom:4px; }
.rhead p{ color:var(--mut); font-size:14px; margin:0; }
.hint{
  background:var(--accsoft); border-radius:12px;
  padding:12px 14px; font-size:14.5px; margin:10px 0;
}
.hint b{ color:var(--accink); }
.group-h{
  display:flex; align-items:baseline; gap:8px;
  font-size:17px; font-weight:800; margin:22px 2px 10px;
}
.group-h small{ font-size:12.5px; font-weight:600; color:var(--mut); }

/* ── Сетка карточек рецептов ── */
.grid{
  display:grid; gap:14px;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
}
.rcard{
  position:relative; display:flex; flex-direction:column;
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  overflow:hidden; cursor:pointer; box-shadow:var(--shadow);
  transition:transform .1s;
}
.rcard:active{ transform:scale(.985); }
.rcard__top{
  height:92px; display:flex; align-items:center; justify-content:center;
  font-size:46px;
  background:radial-gradient(circle at 28% 20%, var(--accsoft) 0%, transparent 62%), var(--bg2);
}
.rcard__b{ padding:12px 14px 14px; display:flex; flex-direction:column; gap:7px; flex:1; }
.rtitle{ font-size:16.5px; font-weight:800; padding-right:40px; }
.meta{ display:flex; flex-wrap:wrap; gap:5px 12px; font-size:12.5px; color:var(--mut); }
.kbju{ font-size:12.5px; color:var(--mut); }
.badge{
  align-self:flex-start; margin-top:auto;
  font-size:13px; font-weight:700; padding:6px 11px; border-radius:10px;
}
.badge.ok{ background:var(--oksoft); color:var(--okink); }
.badge.m1{ background:var(--accsoft); color:var(--accink); }
.badge.m2{ background:var(--warnsoft); color:var(--warnink); }
.badge.m3{ background:var(--warnsoft); color:var(--warnink); }
.spoilbadge{
  align-self:flex-start;
  font-size:12.5px; font-weight:700; color:var(--warnink);
  background:var(--warnsoft); border-radius:8px; padding:4px 9px;
}
.cooked-badge{ font-size:12px; color:var(--mut); }
.favbtn{
  position:absolute; top:10px; right:10px;
  width:42px; height:42px; border-radius:50%;
  border:0; background:rgba(255,255,255,.9);
  font-size:18px; line-height:1; cursor:pointer;
  box-shadow:0 2px 8px rgba(60,30,10,.18);
}
[data-theme="dark"] .favbtn{ background:rgba(40,30,22,.85); }

/* ── Модальное окно рецепта ── */
.modal{ position:fixed; inset:0; z-index:60; display:flex; padding:10px; }
.modal__bg{ position:absolute; inset:0; background:rgba(38,24,12,.55); }
.modal__panel{
  position:relative; z-index:1;
  background:var(--bg2); width:100%; max-width:780px; margin:auto;
  max-height:calc(100dvh - 20px);
  border-radius:20px; overflow:auto; box-shadow:0 18px 50px rgba(30,15,5,.35);
  padding-bottom:26px;
}
.mrow{ position:sticky; top:0; z-index:2; display:flex; justify-content:flex-end; padding:10px 12px; background:linear-gradient(var(--bg2) 75%, transparent); }
.mclose{
  width:40px; height:40px; border-radius:50%; border:0; cursor:pointer;
  background:var(--card); border:1px solid var(--line); font-size:16px;
}
.mhead{ display:flex; gap:16px; align-items:center; padding:0 20px 8px; }
.memoji{
  flex:0 0 auto; width:84px; height:84px; border-radius:20px; font-size:46px;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 30% 20%, var(--accsoft) 0%, transparent 65%), var(--bg2);
}
.mtitle{ font-size:22px; font-weight:800; }
.mmeta{ display:flex; flex-wrap:wrap; gap:5px 12px; color:var(--mut); font-size:13.5px; margin-top:5px; }
.mbody{ padding:6px 20px 0; }
.msec{ font-size:16px; font-weight:800; margin:18px 0 6px; }
.servrow{ display:flex; align-items:center; gap:12px; margin:12px 0 4px; }
.servrow .lab{ font-size:14.5px; color:var(--mut); font-weight:600; }
.stepper{ display:flex; align-items:center; gap:0; border:1.5px solid var(--line); border-radius:12px; overflow:hidden; background:var(--card); }
.stepper button{
  width:42px; height:42px; border:0; background:none; font-size:20px; cursor:pointer; font-weight:700;
}
.stepper button:disabled{ opacity:.35; cursor:default; }
.stepper .val{ min-width:44px; text-align:center; font-weight:800; font-size:16px; }
.ingrow{
  display:flex; gap:10px; align-items:baseline;
  padding:9px 2px; border-bottom:1px dashed var(--line); font-size:15px;
}
.ingrow:last-child{ border-bottom:0; }
.ingrow .st{ flex:0 0 20px; text-align:center; font-weight:800; }
.ingrow .st.have{ color:var(--okink); }
.ingrow .st.sub{ color:var(--warnink); }
.ingrow .st.miss{ color:var(--dangerink); }
.ingrow .st.opt{ color:var(--mut); }
.ingrow .qty{ margin-left:auto; white-space:nowrap; color:var(--mut); font-variant-numeric:tabular-nums; }
.ingrow .subnote{ display:block; font-size:12.5px; color:var(--warnink); }
.ingrow.is-miss{ color:var(--dangerink); }
.ingrow.is-opt{ color:var(--mut); }
.steps{ margin:4px 0; padding-left:22px; }
.steps li{ margin:9px 0; }
.step-timer{
  display:inline-block; font-size:13px; font-weight:700; color:var(--accink);
  background:var(--accsoft); border-radius:8px; padding:2px 8px; margin-left:6px; white-space:nowrap;
}
.tips li{ margin:8px 0; font-size:14.5px; }
.btnrow{ display:flex; flex-wrap:wrap; gap:10px; margin:18px 0 4px; }
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 16px; min-height:48px;
  border-radius:14px; border:1.5px solid var(--line);
  background:var(--card); font-size:15px; font-weight:700; cursor:pointer;
}
.btn:active{ transform:scale(.97); }
.btn.pri{ background:var(--acc); border-color:var(--acc); color:#fff; }
.btn.green{ background:var(--acc2); border-color:var(--acc2); color:#fff; }
.btn.fav-on{ background:var(--accsoft); border-color:var(--acc); color:var(--accink); }

/* ── Режим «готовлю сейчас» ── */
.cook{
  position:fixed; inset:0; z-index:70;
  background:var(--bg2); display:flex; flex-direction:column; padding:14px;
}
.cook__top{ display:flex; align-items:center; gap:12px; }
.cook__prog{ flex:1; height:10px; border-radius:999px; background:var(--line); overflow:hidden; }
.cook__prog i{ display:block; height:100%; background:var(--acc); border-radius:999px; transition:width .25s; }
.cook__cnt{ font-size:14px; font-weight:700; color:var(--mut); white-space:nowrap; }
.cook__mid{
  flex:1; display:flex; flex-direction:column; justify-content:center;
  max-width:720px; width:100%; margin:0 auto;
}
.cook__text{
  font-size:clamp(21px, 5.2vw, 30px); font-weight:700; line-height:1.45;
}
.cook__hintline{ color:var(--mut); font-size:15px; margin-top:10px; }
.timerbox{
  display:flex; align-items:center; justify-content:center; gap:14px;
  margin:26px 0 6px; flex-wrap:wrap;
}
.timerbox .tval{
  font-size:46px; font-weight:800; font-variant-numeric:tabular-nums;
  color:var(--acc); min-width:170px; text-align:center;
}
.timerbox .tval.done{ color:var(--acc2); }
.timerbox .btn{ min-height:44px; padding:10px 14px; }
.cook__nav{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
  max-width:720px; width:100%; margin:14px auto 0;
}
.cook__nav .btn{ justify-content:center; }
.cook__nav .btn:disabled{ opacity:.4; cursor:default; }

/* ── Покупки ── */
.shophead{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:12px; }
.shophead h2{ font-size:20px; font-weight:800; }
.shophead .btn{ min-height:42px; padding:9px 14px; font-size:14px; }
.shopcat{ margin:16px 0 4px; font-size:15.5px; font-weight:800; }
.shopitem{
  display:flex; gap:12px; align-items:flex-start;
  padding:11px 4px; border-bottom:1px dashed var(--line);
}
.shopitem input[type=checkbox]{
  width:22px; height:22px; margin-top:2px; accent-color:var(--acc2); flex:0 0 auto; cursor:pointer;
}
.shopitem .sname{ font-size:15.5px; font-weight:600; }
.shopitem .sqty{ color:var(--mut); font-weight:500; }
.shopitem .from{ font-size:12px; color:var(--mut); margin-top:2px; }
.shopitem.done{ opacity:.5; }
.shopitem.done .sname{ text-decoration:line-through; }
.note{ color:var(--mut); font-size:13.5px; }

/* ── Тост ── */
.toast{
  position:fixed; bottom:150px; left:50%; transform:translateX(-50%);
  z-index:90; background:#3a2e26; color:#fff;
  padding:11px 18px; border-radius:12px; font-size:14.5px; font-weight:600;
  box-shadow:0 8px 24px rgba(0,0,0,.3); max-width:92vw; text-align:center;
}
[data-theme="dark"] .toast{ background:var(--accink); color:#241609; }

/* ── Нижняя навигация ── */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:35;
  display:grid; grid-template-columns:repeat(5, 1fr);
  background:var(--bg2); border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);
}
.tabbar button{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:9px 2px 10px; border:0; background:none; cursor:pointer;
  font-size:11.5px; color:var(--mut);
}
.tabbar .ti{ font-size:21px; line-height:1; }
.tabbar button.on{ color:var(--acc); font-weight:800; }
.tabbar .badge2{
  position:absolute; /* не используем; для простоты счётчик в подписи */
}

/* ── Адаптив ── */
@media (max-width:600px){
  main{ padding:12px 12px 108px; }
  .flab{ flex-basis:100%; }
  .mhead{ padding:0 14px 4px; gap:12px; }
  .memoji{ width:64px; height:64px; font-size:36px; border-radius:16px; }
  .mtitle{ font-size:19px; }
  .mbody{ padding:4px 14px 0; }
  .modal{ padding:6px; }
  .grid{ grid-template-columns:1fr; }
  .hero h1{ font-size:22px; }
  .tabbar button{ font-size:10px; padding:8px 0 9px; }
  .tabbar .ti{ font-size:19px; }
}

/* ═══════════ ДОПОЛНЕНИЯ ИТЕРАЦИИ 2 ═══════════ */

/* тап-зоны ≥44px для фильтров и кнопок */
.fchip{ min-height:44px; }
.btn{ min-height:48px; }
.btn.sm{ min-height:44px; padding:9px 13px; font-size:14px; }
.catnav button{ min-height:44px; }
.iconbtn{ min-height:44px; }

/* ── Списки покупок v2 ── */
.listtabs{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 4px; }
.ltab{
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 14px; min-height:44px;
  border-radius:999px; border:1.5px solid var(--line);
  background:var(--card); font-size:14px; font-weight:600; cursor:pointer;
}
.ltab span{ font-size:12px; color:var(--mut); }
.ltab.on{ background:var(--accsoft); border-color:var(--acc); color:var(--accink); }
.addrow{ position:relative; margin:10px 0 8px; }
.shopbtns{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.freqpanel{ background:var(--bg2); border:1px dashed var(--line); border-radius:12px; padding:10px 12px; margin-bottom:12px; }
.freqpanel .flab{ display:block; margin-bottom:6px; }
.shopcat{
  display:flex; align-items:center; gap:8px;
  margin:16px 0 4px; font-size:15.5px; font-weight:800;
  cursor:grab; user-select:none;
}
.shopcat .dragline{ color:var(--mut); font-weight:400; cursor:grab; }
.shopcat .catbtns{ margin-left:auto; display:flex; gap:4px; }
.ibtn{
  width:44px; height:44px; border-radius:10px; border:0; background:none;
  font-size:15px; cursor:pointer; color:var(--mut); flex:0 0 auto;
}
.ibtn:hover{ background:var(--accsoft); color:var(--accink); }
.ibtn.big{ border:1.5px solid var(--line); background:var(--card); }
.shopitem .sbody{ flex:1; min-width:0; cursor:pointer; display:block; }
.shopitem .snote{ color:var(--mut); font-weight:500; font-size:13px; }
.itemedit{
  display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end;
  background:var(--bg2); border-radius:12px; padding:10px 12px; margin:2px 0 8px 34px;
}
.itemedit label{ display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--mut); font-weight:700; }
.itemedit label.grow{ flex:1 1 160px; }
.itemedit input, .itemedit select{
  padding:9px 10px; min-height:42px; border-radius:10px;
  border:1.5px solid var(--line); background:var(--card); font-size:14.5px;
}

/* ── Обмен (QR) ── */
.exch{ margin-bottom:14px; }
.exch h3{ font-size:17px; margin-bottom:4px; }
.qrwrap{ display:flex; flex-direction:column; align-items:center; margin-top:12px; }
.qrwrap canvas{
  max-width:min(320px, 82vw); width:auto; height:auto;
  border-radius:14px; box-shadow:var(--shadow);
}
.qrmeta{ margin-top:10px; font-size:14px; font-weight:700; color:var(--mut); }
.filmctl{ display:flex; align-items:center; gap:10px; margin-top:10px; flex-wrap:wrap; justify-content:center; }
.framechips{ display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:8px; }
.fdot{
  width:26px; height:26px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-style:normal; font-size:11px; font-weight:700;
  background:var(--line); color:var(--mut);
}
.fdot.on{ background:var(--acc); color:#fff; }
.fdot.ok{ background:var(--acc2); color:#fff; }
.fdot.miss{ background:var(--dangersoft); color:var(--dangerink); }
.textcode{ width:100%; margin-top:14px; }
.textcode summary{ cursor:pointer; font-size:14px; font-weight:700; color:var(--accink); padding:8px 0; }
.textcode textarea{
  width:100%; padding:10px 12px; border-radius:12px;
  border:1.5px solid var(--line); background:var(--card);
  font-size:11.5px; font-family:ui-monospace,Consolas,monospace;
  word-break:break-all; margin-bottom:8px;
}
.scanwrap{ display:flex; justify-content:center; margin:12px 0; }
.scanwrap video{ width:min(420px, 100%); border-radius:14px; background:#000; aspect-ratio:4/3; object-fit:cover; }
.recvprog{ font-size:19px; font-weight:800; text-align:center; margin:10px 0 4px; }
.errbox{
  background:var(--dangersoft); color:var(--dangerink);
  border-radius:12px; padding:12px 14px; font-size:14.5px; font-weight:600; margin:10px 0;
}
#recvBox textarea, #pasteResult textarea{ width:100%; padding:10px 12px; border-radius:12px;
  border:1.5px solid var(--line); background:var(--card); font-size:13px; font-family:ui-monospace,Consolas,monospace; }
#restoreResult{ margin-top:10px; }
.hidden + #restoreResult:empty{ display:none; }

/* ── Плашка установки PWA ── */
.installbar{
  position:fixed; left:12px; right:12px; bottom:74px; z-index:40;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:center;
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:12px 16px; font-size:14.5px; box-shadow:0 10px 30px rgba(60,35,15,.25);
}
