/* capture: стили части «камера и карточка блюда» второго захода (18.10.2026).
   Камера во весь экран (.cam), карточка блюда экраном со стрелкой (.dsh-screen),
   общие чипы с галочкой (.ddchip), окна выбора (.pick) и просмотр фото (.viewer).
   Касание везде от 44 px: где кнопка видимо меньше, зону добирает прозрачный
   ::after, внешний вид не меняется. */

/* ---------- общие: чип с галочкой, окна выбора ---------- */

.ddchip {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px 0 16px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.ddchip::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%);
}
.ddchip__i { display: grid; place-items: center; color: var(--muted); }
/* день не сегодняшний: заметно, но без тревоги */
.ddchip--sand { background: #f7ebd8; border-color: var(--sand); color: var(--sand-deep); }
.ddchip--sand .ddchip__i { color: var(--sand-deep); }

.pick { display: flex; flex-direction: column; gap: 6px; }
.pick__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 8px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  text-align: left; font-size: 16px;
}
.pick__row.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.pick__sub { flex: none; font-size: 13px; font-weight: 400; color: var(--muted); }

/* ---------- камера ---------- */

.cam .layer__head { padding-left: 8px; padding-right: 8px; }
.cam .layer__titles { text-align: center; }
.cam .layer__title { font-size: 20px; }
/* место справа под ширину «✕», чтобы заголовок стоял ровно по центру */
.cam .layer__actions { width: 44px; }
.cam .layer__body {
  gap: 10px; padding: 4px 16px calc(env(safe-area-inset-bottom) + 16px);
  overflow-x: hidden;
}

.cam__seg {
  flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 40px; padding: 4px; border-radius: 20px; background: var(--card-2);
}
.cam__segbtn {
  position: relative; min-width: 0; padding: 0 2px; border: 0; border-radius: 16px;
  background: none; color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.cam__segbtn::after { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }
.cam__segbtn.is-on { background: var(--card); color: var(--accent-dark); font-weight: 600; box-shadow: 0 1px 4px rgba(47, 43, 37, .12); }

.cam__where { flex: none; display: flex; align-items: center; gap: 8px; min-height: 36px; }
.cam__today {
  position: relative; margin-left: auto; min-height: 36px; padding: 0 4px;
  border: 0; background: none; color: var(--accent-dark); font-size: 14px; font-weight: 600;
}
.cam__today::after { content: ''; position: absolute; left: -4px; right: -4px; top: -4px; bottom: -4px; }

/* Рабочая область забирает всё, что осталось: экран без прокрутки. */
.cam__work {
  position: relative; flex: 1 1 0; min-height: 210px;
  display: flex; flex-direction: column;
}
.cam__work > * { flex: 1 1 auto; min-height: 0; }

.cam__finderwrap { display: flex; flex-direction: column; gap: 12px; }
.cam__finder {
  position: relative; flex: 1 1 auto; min-height: 0; width: 100%; padding: 0;
  display: grid; place-items: center; overflow: hidden;
  border: 0; border-radius: 24px;
  background: linear-gradient(to bottom, #e9dfcf 0 76%, #e2d6c2 76% 100%);
}
.cam__artwrap { display: block; width: min(74%, 290px); max-height: 82%; aspect-ratio: 1; }
.cam__art { display: block; width: 100%; height: 100%; }
.cam__finder--label .cam__artwrap { width: min(52%, 210px); aspect-ratio: 220 / 260; }
.cam__corner { position: absolute; width: 26px; height: 26px; border: 4px solid #fff; }
.cam__corner--tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.cam__corner--tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.cam__corner--bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.cam__corner--br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.cam__finder-hint {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 16px; background: rgba(255, 255, 255, .88);
  font-size: 13px; color: var(--muted); white-space: nowrap;
}

.cam__picks { flex: none; display: flex; gap: 10px; }
.cam__pick {
  flex: 1 1 0; height: 56px; border-radius: 28px; margin: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600;
}
.cam__pick.btn--primary { flex-grow: 1.2; box-shadow: 0 4px 12px rgba(53, 147, 90, .18); }
.cam__pick--alt { background: var(--card); border-color: #d6cfbc; color: var(--accent-dark); }
.cam__pick-i { display: grid; place-items: center; }

/* после снимков: последний крупно, лента миниатюр */
.cam__shots { display: flex; flex-direction: column; gap: 10px; }
.cam__big {
  position: relative; flex: 1 1 auto; min-height: 0;
  border-radius: 24px; overflow: hidden; background: var(--card-2);
}
.cam__big > img, .cam__big > .photo-stub { display: block; width: 100%; height: 100%; object-fit: cover; }
.cam__big > .photo-stub { display: grid; place-items: center; color: var(--muted); }
.cam__big--label > img { object-fit: contain; }
.cam__count {
  position: absolute; top: 14px; left: 14px; padding: 5px 11px; border-radius: 14px;
  background: rgba(47, 43, 37, .62); color: #fff; font-size: 12px; font-weight: 600;
}
/* Сверху 17 px: лента с прокруткой обрезает всё, что за её краем, и растяжка
   44 у «✕» на миниатюре (на 6 px выше снимка) иначе срезалась бы до 36 (06 №7).
   Место берётся у большого снимка, он тянется (flex 1). */
.cam__strip { flex: none; display: flex; gap: 12px; overflow-x: auto; padding: 17px 8px 2px 2px; scrollbar-width: none; }
.cam__strip::-webkit-scrollbar { display: none; }
.cam__thumb { position: relative; flex: none; width: 56px; height: 56px; }
.cam__thumb-pick {
  position: relative; display: block; width: 56px; height: 56px; padding: 0;
  border: 0; border-radius: 14px; overflow: hidden; background: var(--card-2);
}
.cam__thumb-pick img, .cam__thumb-pick .photo-stub { display: block; width: 100%; height: 100%; object-fit: cover; font-size: 0; }
.cam__thumb.is-on .cam__thumb-pick::after {
  content: ''; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 2.5px var(--accent);
}
.cam__thumb-del {
  position: absolute; top: -6px; right: -6px; z-index: 1;
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(47, 43, 37, .86); color: #fff;
}
.cam__thumb-del svg { width: 12px; height: 12px; }
.cam__thumb-del::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.cam__plus {
  flex: none; width: 56px; height: 56px; padding: 0; border-radius: 14px;
  border: 1.5px dashed #d6cfbc; background: none; color: var(--accent);
  display: grid; place-items: center;
}

/* строка описания с микрофоном внутри */
.cam__desc {
  flex: none; display: flex; align-items: center; gap: 6px;
  min-height: 52px; padding: 4px 4px 4px 16px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--card);
}
.cam__desc:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cam__area {
  flex: 1 1 auto; min-width: 0; max-height: 92px; padding: 9px 0;
  border: 0; background: none; outline: none; resize: none; overflow-y: auto;
  font: inherit; font-size: 15px; line-height: 1.4; color: var(--text);
}
.cam__area::placeholder { color: var(--muted); }
.cam__area.is-empty { height: 60px; overflow: hidden; }
.cam__mic {
  flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark);
}
.cam__mic.is-recording { background: var(--accent-btn); color: #fff; animation: pulse 1.4s ease-in-out infinite; }

.cam__gonote { flex: none; margin: 0; font-size: 13px; line-height: 1.35; color: var(--sand-deep); text-align: center; }
.cam__go {
  flex: none; width: 100%; height: 52px; margin: 0; border-radius: 26px;
  font-size: 16px; box-shadow: 0 4px 12px rgba(53, 147, 90, .18);
}
.cam__go.is-off { background: var(--card-2); border-color: var(--card-2); color: var(--muted); box-shadow: none; }

/* подсказка при первом открытии */
.cam__hint {
  position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2; flex: none;
  padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--bg-soft); box-shadow: var(--shadow); font-size: 14px; line-height: 1.45;
}
.cam__hint p { margin: 0 0 10px; }
.cam__hint .cam__hint-t { font-family: var(--serif); font-size: 17px; margin-bottom: 6px; }
.cam__hint-ok { min-height: 44px; border-radius: 22px; padding: 0 22px; }

/* штрихкод: рамка сканера и поле цифр */
.cam__scanhost { display: flex; flex-direction: column; }
.scan { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.scan__frame {
  position: relative; flex: 1 1 auto; min-height: 0; width: 100%; padding: 0;
  display: grid; place-items: center; overflow: hidden;
  border: 0; border-radius: 24px; background: #e9dfcf; color: var(--text);
}
.scan__art {
  display: block; width: min(62%, 230px); padding: 16px 16px 12px;
  border-radius: 12px; background: #fff; box-shadow: var(--shadow-soft);
}
.scan__bars { display: block; width: 100%; height: auto; }
.scan__corner { position: absolute; width: 26px; height: 26px; border: 4px solid #fff; }
.scan__corner--tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.scan__corner--tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.scan__corner--bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.scan__corner--br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.scan__t {
  position: absolute; left: 24px; right: 24px; bottom: 20px;
  width: fit-content; margin: 0 auto; padding: 6px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .9); font-size: 13px; line-height: 1.35; color: var(--muted); text-align: center;
}
.scan__row { flex: none; display: flex; gap: 8px; }
.scan__row .input { flex: 1 1 auto; height: 48px; border-radius: 24px; padding: 0 16px; background: var(--card); font-size: 16px; }
.scan__find {
  flex: none; min-width: 88px; height: 48px; border-radius: 24px; margin: 0;
  background: var(--card); border-color: #d6cfbc; color: var(--accent-dark); font-weight: 600;
}
.scan .scan__status { flex: none; margin: 0; font-size: 13px; }
.scan .scan__status:empty { display: none; }
.scan .scan__note { flex: none; margin: 0; font-size: 12px; }

/* этикетка после снимка */
.cam__labelbtns { flex: none; display: flex; justify-content: center; gap: 8px; }
.cam__labelbtns .chip { min-height: 36px; background: var(--card); font-size: 14px; }

/* мои блюда */
.cam__mine { display: flex; flex-direction: column; gap: 10px; }
.cam__searchwrap { position: relative; flex: none; }
.cam__searchicon { position: absolute; left: 12px; top: 11px; color: var(--muted); pointer-events: none; }
.cam__searchicon svg { width: 20px; height: 20px; }
.cam__search { height: 44px; padding-left: 42px; border-radius: 22px; background: var(--card); font-size: 15px; }
.cam__minechips { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.cam__minechips::-webkit-scrollbar { display: none; }
.cam__minechips .chip { flex: none; min-height: 36px; padding: 0 14px; font-size: 13.5px; background: var(--card); white-space: nowrap; }
.cam__minechips .chip::after { height: 44px; }
.cam__minelist { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 8px; }
.cam__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.cam__dish {
  min-width: 0; padding: 4px 2px; border: 0; background: none; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--text);
}
.cam__dish:active { background: var(--card-2); }
.cam__dishpic {
  flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--card-2);
}
.cam__dishpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam__dishletter { font-family: var(--serif); font-size: 26px; color: var(--muted); }
.cam__dishname {
  max-width: 100%; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cam__dishkcal { font-size: 12px; color: var(--muted); }
/* недавние (1.30.0): время и приём над названием, как в календаре */
.cam__dishwhen { font-size: 12px; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.cam__minetitle { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.cam__minelist > .cam__minetitle:first-child { margin-top: 2px; }
.cam__sets { display: flex; flex-direction: column; gap: 8px; }
.cam__set {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--text); text-align: left;
}
.cam__setbody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cam__setname { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam__setmeta { font-size: 12.5px; color: var(--muted); }
.cam__setplus {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark);
}
.cam__empty {
  padding: 18px 16px; border: 1.5px dashed var(--line); border-radius: 18px;
  font-size: 14px; color: var(--muted); text-align: center;
}
.cam__empty p { margin: 0 0 12px; }
.cam__empty .btn { min-height: 44px; border-radius: 22px; padding: 0 22px; color: var(--accent-dark); font-weight: 600; background: var(--card); }
.cam__none { margin: 18px 0; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- карточка блюда ---------- */

.dsh-screen .layer__body { gap: 12px; padding: 4px 16px 24px; }
/* тело экрана - колонка с прокруткой: блоки не должны сжиматься по высоте
   (у блока с overflow: hidden иначе остаётся одна линия рамки) */
.dsh-screen .layer__body > * { flex-shrink: 0; }

.dsh__photo {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0;
  border: 0; border-radius: 20px; overflow: hidden; background: var(--card-2); flex: none;
}
.dsh__photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dsh__photo > .photo-stub { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.dsh__drawn {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 12px;
  background: rgba(255, 253, 247, .92); font-size: 12px; color: var(--muted);
}
/* без снимка ниже, чем со снимком: пустая рамка не должна отодвигать числа */
.dsh__photo--empty {
  aspect-ratio: auto; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px dashed var(--line); background: var(--bg-soft);
}
.dsh__ghost { width: 70px; height: 70px; }
.dsh__addphoto {
  min-height: 44px; padding: 0 20px; border-radius: 22px;
  border: 1px solid var(--accent); background: var(--card); color: var(--accent-dark);
  font-size: 15px; font-weight: 600;
}

.dsh__name {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; min-height: 44px;
  padding: 2px 0; border: 0; background: none; color: var(--text); text-align: left;
}
.dsh__name-t { font-family: var(--serif); font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.dsh__name-i { flex: none; margin-top: 6px; color: var(--muted); }
.dsh__nameinput { font-family: var(--serif); font-size: 20px; padding: 12px 14px; }

.dsh__chips { display: flex; flex-wrap: wrap; gap: 10px 8px; margin-top: -4px; }

.dsh__kcal { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dsh__kcal-main { display: flex; align-items: baseline; gap: 6px; }
.dsh__kcal-num { font-family: var(--serif); font-size: 36px; line-height: 1; color: var(--text); }
.dsh__kcal-unit { font-size: 15px; color: var(--muted); }
.dsh__kcal-range { font-size: 13px; color: var(--muted); }

.dsh__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dsh__tile {
  min-width: 0; padding: 10px 6px 10px 10px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card);
}
.dsh__tile-l { display: block; font-size: 12px; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.dsh__tile-val { display: block; margin-top: 4px; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.1; white-space: nowrap; }
/* белок и клетчатка видны первыми */
.dsh__tile--hi { background: var(--accent-soft); border-color: var(--accent-soft); }
.dsh__tile--hi .dsh__tile-l { color: var(--accent-dark); font-weight: 600; }
.dsh__tile--hi .dsh__tile-val { color: var(--accent-dark); }

.dsh__salt { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13px; color: var(--text); }
.dsh__salt-sugar { color: var(--muted); }
.dsh__hidden, .dsh__pending, .dsh__ask { margin: 0; }
/* готовые ответы на вопрос модели (1.31.0): пунктир, как у «+» на дне */
.dsh__ask .dsh__askstep { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.dsh__opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.dsh__opt {
  min-height: 36px; padding: 0 14px; border: 1.5px dashed var(--accent); border-radius: 999px;
  background: none; color: var(--accent-dark); font: inherit; font-size: 14px; line-height: 1.2;
}
.dsh__opt:active { background: var(--accent-soft); }
.dsh__opt:disabled { opacity: .5; }

.dsh__card {
  padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--card); box-shadow: var(--shadow-soft);
}
.dsh__sech { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dsh__h { margin: 0; font-size: 15px; font-weight: 600; }
.dsh__portion-val { font-family: var(--serif); font-size: 18px; }
/* строка «порция ›»: сама порция меняется только в окне, по нажатию */
.dsh__portrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 48px; margin: -6px 0 0; padding: 0;
  border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.dsh__portrow-r { display: inline-flex; align-items: center; gap: 6px; }
.dsh__portrow-i { display: inline-flex; color: #9a9384; }
.dsh__portrow-i svg { width: 16px; height: 16px; }
.dsh__psum { margin: 0; font-family: var(--serif); font-size: 22px; text-align: center; }
.dsh__plabel { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.dsh__slider {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 44px; margin: 2px 0; background: none; accent-color: var(--accent);
}
.dsh__slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--card-2); }
.dsh__slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(47, 43, 37, .15);
}
.dsh__slider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--card-2); }
.dsh__slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }

.dsh__quick { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.dsh__q { min-height: 36px; padding: 0 14px; font-size: 13.5px; background: var(--card); }
.dsh__q.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }

.dsh__leftrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 48px; margin-top: 8px; padding: 0;
  border: 0; background: none; color: var(--text); font-size: 15px; text-align: left;
}
.dsh__switch {
  position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px;
  border: 1px solid #d6cfbc; background: var(--card-2); transition: background .15s, border-color .15s;
}
.dsh__switch-knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(47, 43, 37, .25); transition: transform .15s;
}
.dsh__leftrow[aria-checked="true"] .dsh__switch { background: var(--accent); border-color: var(--accent); }
.dsh__leftrow[aria-checked="true"] .dsh__switch-knob { transform: translateX(18px); }
.dsh__leftover { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.dsh__leftover .muted { margin: 0; font-size: 13px; }
.dsh__leftbtn {
  width: 100%; min-height: 46px; margin: 0; border-radius: 23px;
  border-color: var(--accent); background: var(--card); color: var(--accent-dark); font-weight: 600;
}
.dsh__leftbtn--alt { border-color: var(--line); color: var(--muted); font-weight: 500; }
.dsh__leftnote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.dsh__leftnote .muted { flex: 1 1 180px; margin: 0; font-size: 13px; }
.dsh__leftnote .chip { min-height: 36px; background: var(--card); }

.dsh__links {
  border-radius: 18px; border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--shadow-soft); overflow: hidden;
}
.dsh__link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 10px 14px 10px 16px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--text); text-align: left;
}
.dsh__link:first-child { border-top: 0; }
.dsh__link-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dsh__link-t { font-size: 15px; font-weight: 600; }
.dsh__link-s { font-size: 12.5px; color: var(--muted); }
.dsh__link-i { flex: none; display: grid; place-items: center; color: var(--muted); transition: transform .15s; }
.dsh__link-i.is-open { transform: rotate(90deg); }
.dsh__morebody { display: flex; flex-direction: column; gap: 16px; padding: 6px 16px 16px; }
.dsh__morebody .notice { margin: 0; }

.dsh__mix { display: flex; align-items: center; gap: 14px; }
.dsh__pie { flex: none; width: 76px; height: 76px; }
.dsh__mixtext { flex: 1 1 auto; min-width: 0; }
.dsh__mixtitle { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.dsh__legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.dsh__legend li { display: flex; align-items: center; gap: 6px; }
.dsh__legend i { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dsh__extras { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.dsh__comp .dsh__sech { margin-bottom: 4px; }
.dsh__comp .muted { font-size: 13px; }
.dsh__conf { margin: 0; font-size: 13px; }
.dsh__micro .dsh__h { margin-bottom: 6px; }
.dsh__micro .muted { font-size: 12.5px; }

.dsh__story {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--bg-soft);
}
.dsh__story-i { flex: none; color: var(--sand); }
.dsh__story-i svg { width: 20px; height: 20px; }
.dsh__story-t { margin: 0; font-size: 15px; font-weight: 600; }
.dsh__story-s { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* низ карточки закреплён: «записать» или «повторить», над ними «сохранено · вернуть» */
.dsh__foot {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  padding: 10px 16px 12px; border-top: 1px solid var(--line); background: var(--bg-soft);
}
.layer--full .dsh__foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.dsh__foot-btns, .dsh__undo { width: 100%; max-width: var(--app-w); margin: 0 auto; }
.dsh__foot-btns { display: flex; gap: 10px; }
.dsh__main { flex: 1 1 auto; height: 52px; margin: 0; border-radius: 26px; font-size: 16px; font-weight: 600; }
.dsh__main.btn--primary { box-shadow: 0 4px 12px rgba(53, 147, 90, .18); }
.dsh__second {
  flex: 0 1 auto; height: 52px; margin: 0; padding: 0 18px; border-radius: 26px;
  background: var(--card); border-color: #d6cfbc; color: var(--accent-dark); font-weight: 600; white-space: nowrap;
}
.dsh__repeat { display: flex; align-items: center; justify-content: center; gap: 8px; }
.dsh__repeat-i { display: grid; place-items: center; }
.dsh__undo {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 4px 4px 14px; border-radius: 14px; background: var(--text); color: #fff; font-size: 14px;
}
.dsh__undo-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsh__undo-b {
  flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px;
  background: none; color: #bfe3c9; font-weight: 700; font-size: 14px;
}

/* ---------- просмотр фото во весь экран ---------- */

.viewer {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 18, 15, .96); touch-action: pan-y;
}
.viewer__img { display: block; max-width: 100%; max-height: calc(100% - 150px); object-fit: contain; }
.viewer__top {
  position: absolute; left: 0; right: 0; top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px 8px 18px; color: #fff;
}
.viewer__count { font-size: 14px; color: rgba(255, 255, 255, .85); }
.viewer__close, .viewer__nav {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff;
}
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer__nav--prev { left: 10px; }
.viewer__nav--next { right: 10px; }
.viewer__cap {
  position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  margin: 0; font-size: 14px; color: rgba(255, 255, 255, .9); text-align: center;
}

@media (min-width: 620px) {
  .cam .layer__body > * { max-width: var(--app-w); }
}
