/* Карточка v13: компактная лента, четыре решения, чат и панель действий. */
.detail-view{padding-bottom:120px}.detail-workspace{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(310px,1fr);gap:22px;align-items:start}.capture-strips{display:grid;gap:12px}.capture-strip{display:flex;gap:10px;padding:12px;background:var(--white);border:1px solid var(--line);border-radius:12px;min-width:0}.capture-open{flex:1;min-width:0;padding:2px 4px;border:0;background:transparent;text-align:left;color:var(--ink);font:inherit}.capture-open strong{display:block;font-size:18px;font-weight:600}.capture-thumbs{display:flex;align-items:center;gap:6px;min-height:60px;margin-top:9px}.capture-thumbs img,.capture-placeholder,.capture-overflow{display:grid;place-items:center;width:60px;height:60px;border:1px solid var(--line);border-radius:7px;object-fit:cover;flex:none;background:var(--bg);color:var(--muted)}.capture-placeholder .icon{width:22px;height:22px}.capture-overflow{width:34px;height:34px;background:var(--blue-soft);color:var(--blue);border:0;font-size:13px}.capture-strip.codes-strip .capture-thumbs img,.capture-strip.codes-strip .capture-placeholder{width:38px;height:38px}.capture-camera{width:64px;min-width:64px;align-self:stretch;display:grid;place-items:center;border:0;border-radius:9px;background:var(--blue);color:white}.capture-camera .icon{width:25px;height:25px}.capture-camera:disabled{opacity:.4}.detail-decision{position:sticky;top:20px}.detail-decision .decision-options{grid-template-columns:1fr 1fr;gap:9px;margin-top:16px}.detail-decision .decision-option{min-height:57px;padding:13px 10px;display:flex;align-items:center;gap:9px}.detail-decision .decision-option strong{font-size:14px}.detail-decision .decision-option input{accent-color:var(--blue)}.detail-decision .decision-option:has(input:checked){background:var(--blue-soft);border-color:var(--blue)}.detail-decision .decision-option.defect:has(input:checked){background:var(--red-soft);border-color:var(--red)}.detail-decision .decision-option.dispute:has(input:checked){background:#fff4df;border-color:#d6a250}.detail-decision .decision-option.substitution:has(input:checked){background:#f4edfc;border-color:#ac88cc}.detail-decision .panel-description{font-size:12px}.detail-decision .verdict p{font-size:12px}.card-action-bar{position:fixed;z-index:10;left:50%;transform:translateX(-50%);bottom:max(14px,env(safe-area-inset-bottom));display:grid;grid-template-columns:3fr 1fr;gap:9px;width:min(1120px,calc(100% - 64px));pointer-events:none}.card-action-bar button{pointer-events:auto;min-height:56px;border-radius:10px;box-shadow:0 6px 22px #17233625}.card-action-bar .action-main{width:100%;min-width:0;font-size:14px;background:var(--blue);border-color:var(--blue);color:white;font-weight:600}.card-action-bar .action-main:disabled{opacity:1;background:#e8edf5;border-color:#d8e0ec;color:#586a80;box-shadow:0 5px 15px #17233614}.chat-open-button{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;background:white;border:1px solid var(--line);color:var(--blue);font:inherit;font-size:14px}.chat-open-button .icon{width:22px;height:22px}.chat-open-button.has-unread{background:var(--blue-soft);border-color:var(--blue)}.unread-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--red);color:white;font-size:11px;font-weight:600}.return-card .unread-label{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--blue);margin-top:12px}.return-card .unread-label .icon{width:17px;height:17px}.detail-view~.footer{padding-bottom:110px}.capture-sheet{width:min(680px,calc(100vw - 30px));max-height:88dvh;padding:0}.capture-sheet .sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:18px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:1}.capture-sheet .sheet-heading h2{font-size:20px}.capture-sheet #capture-content{padding:18px 22px 24px}.capture-sheet .gallery{margin-top:16px}.capture-sheet .photo-buttons{margin-top:0}.capture-sheet .field{margin-top:0}.capture-sheet .article-edit{margin-bottom:17px}.article-edit .button{margin-top:10px}.code-proof{padding:0 0 18px;border-bottom:1px solid var(--line);margin-bottom:18px}.code-proof small{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}.code-proof strong{display:block;overflow-wrap:anywhere;user-select:all;font-size:17px;margin-bottom:10px}.code-proof img{width:100%;max-height:230px;object-fit:contain;border-radius:8px;background:var(--bg)}.code-proof .code-actions{justify-content:flex-end;gap:8px;margin-top:10px}.code-proof .missing-photo{font-size:12px;color:var(--muted);padding:15px;background:var(--bg);border-radius:8px}.code-manual{margin-top:20px;border-top:1px solid var(--line);padding-top:17px}.code-manual label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}.code-manual input{font-size:16px}.code-manual .inline-form{margin-top:6px}.code-manual .photo-buttons{margin-top:12px}.manual-code-preview{max-width:100%;max-height:170px;object-fit:contain;display:block;margin-top:10px;border-radius:8px}.return-chat{width:min(460px,calc(100vw - 32px));height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);margin:16px 16px 16px auto;padding:0;overflow:hidden;border-radius:16px;box-shadow:0 0 40px #17233624}.return-chat[open]{display:flex;flex-direction:column}.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);flex-shrink:0}.chat-heading h2{font-size:20px}.chat-heading small{font-size:11px;color:var(--muted)}.chat-messages{flex:1;min-height:0;overflow:auto;background:var(--bg);padding:16px;display:flex;flex-direction:column;gap:10px}.chat-bubble{max-width:90%;align-self:flex-start;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:white;flex-shrink:0;min-width:0}.chat-bubble.reviewer{align-self:flex-end;background:var(--blue-soft);border-color:transparent}.chat-bubble .sender{display:block;font-size:11px;font-weight:600;color:var(--muted);margin-bottom:5px}.chat-bubble.reviewer .sender{color:var(--blue)}.chat-bubble p{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.chat-bubble time{display:block;text-align:right;font-size:10px;color:var(--muted);margin-top:7px}.chat-bubble.voice{width:90%}.chat-bubble audio{display:block;width:100%;height:40px;margin:6px 0;min-width:0}.chat-media-state{font-size:10px;color:var(--muted)}.chat-composer{padding:12px 14px max(14px,env(safe-area-inset-bottom));background:white;border-top:1px solid var(--line);flex-shrink:0}.chat-role{font-size:11px;color:var(--muted);margin-bottom:8px}.chat-role strong{color:var(--ink);font-weight:600}#chat-form{display:flex;align-items:flex-end;gap:7px}#chat-text{min-width:0;flex:1;min-height:46px;max-height:120px;resize:none;border:1px solid var(--line);border-radius:9px;background:var(--bg);font:inherit;font-size:16px;padding:11px;color:var(--ink)}.chat-mic,.chat-send{width:44px;min-width:44px;min-height:46px;padding:0;border:0;border-radius:9px;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue)}.chat-send{background:var(--blue);color:white}.chat-mic .icon,.chat-send .icon{width:21px;height:21px}.chat-recording{display:flex;align-items:center;justify-content:space-between;gap:8px;border-radius:8px;background:var(--red-soft);color:var(--red);font-size:12px;padding:6px 9px;margin-bottom:8px}.chat-recording button{background:none;border:0;color:inherit;min-height:36px;font:inherit}.chat-draft{display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:5px;align-items:center;background:var(--blue-soft);padding:6px 8px;border-radius:8px;margin-bottom:7px}.chat-draft audio{width:100%;height:35px;min-width:0}.chat-draft .icon-button{width:36px;height:36px;font-size:21px}.chat-draft small{display:block;font-size:11px;color:var(--muted);margin-bottom:3px}.chat-send-status{font-size:11px;color:var(--muted);margin-top:5px}.chat-send-status:empty{display:none}.chat-empty{font-size:13px;color:var(--muted);margin:auto;text-align:center}.chat-new-pulse{animation:chat-attention .7s ease-out 2}@keyframes chat-attention{50%{box-shadow:0 0 0 5px #2858d733}}
@media(max-width:900px){.detail-workspace{grid-template-columns:minmax(0,1fr) 310px;gap:16px}.card-action-bar{width:calc(100% - 40px)}}
@media(max-width:650px){.detail-view{padding-top:18px;padding-bottom:112px}.detail-view .back{margin-bottom:10px}.detail-view .detail-head{margin-bottom:17px}.detail-workspace{display:block}.capture-strips{gap:9px}.capture-strip{padding:8px;gap:7px;border-radius:11px}.capture-open{padding:3px 5px}.capture-open strong{font-size:16px}.capture-thumbs{min-height:42px;margin-top:9px;gap:5px}.capture-thumbs img,.capture-placeholder{width:42px;height:42px;border-radius:6px}.capture-strip.codes-strip .capture-thumbs img,.capture-strip.codes-strip .capture-placeholder{width:32px;height:32px}.capture-overflow{width:30px;height:30px}.capture-camera{width:49px;min-width:49px;border-radius:8px}.capture-camera .icon{width:23px;height:23px}.detail-decision{position:static;margin-top:14px;padding:15px 13px}.detail-decision h2{font-size:17px}.detail-decision .decision-options{margin-top:12px}.detail-decision .decision-option{min-height:46px;flex-wrap:nowrap;padding:10px;gap:8px}.detail-decision .decision-option strong{font-size:13px}.card-action-bar{width:calc(100% - 28px);gap:8px;bottom:max(12px,env(safe-area-inset-bottom))}.card-action-bar .action-main{font-size:13px;min-height:56px;padding:10px}.chat-open-button{flex-direction:column;gap:2px;font-size:11px;min-height:56px}.chat-open-button .unread-count{position:absolute;top:5px;right:5px;min-width:18px;height:18px;font-size:10px}.capture-sheet{width:100%;max-width:none;max-height:86dvh;margin:auto 0 0;border:0;border-radius:18px 18px 0 0}.capture-sheet .sheet-heading{padding:13px 17px}.capture-sheet #capture-content{padding:14px 17px 24px}.capture-sheet .sheet-heading h2{font-size:18px}.return-chat{width:100%;max-width:none;height:88dvh;max-height:88dvh;margin:auto 0 0;border:0;border-radius:19px 19px 0 0}.chat-heading{padding:13px 17px}.chat-heading h2{font-size:18px}.chat-messages{padding:12px}.chat-composer{padding:10px 12px max(14px,env(safe-area-inset-bottom))}.chat-bubble p{font-size:13px}.chat-bubble.voice{width:92%;max-width:92%}.toast{bottom:86px}.code-proof strong{font-size:16px}.code-proof img{max-height:200px}.code-manual .inline-form{flex-direction:column}.detail-view .detail-head p{display:none}}
@media(prefers-reduced-motion:reduce){.chat-new-pulse{animation:none}}

[hidden]{display:none!important}.capture-empty{font-size:12px;color:var(--muted)}.comment-entry{padding:16px 4px;display:flex;align-items:center;justify-content:space-between;gap:10px}.comment-entry .button{display:flex;align-items:center;gap:7px}.code-proof-heading{display:flex;justify-content:space-between;align-items:start;gap:10px}.code-proof-heading>div{min-width:0}.code-proof-photo{display:block;width:100%;padding:0;border:0;background:none}.code-manual>.button{margin:0 6px 8px 0}.code-proof .text-button{margin-top:12px}.capture-sheet .photo-buttons{margin-top:16px}.action-main{border:1px solid;cursor:pointer;font-family:inherit}.action-main:disabled{cursor:default}.return-card .unread-label svg{width:17px;height:17px}

#chat-drafts{max-height:28dvh;overflow:auto}button:focus-visible,textarea:focus-visible{outline:3px solid #83a6ff;outline-offset:3px}.capture-open,.capture-camera,.chat-open-button{min-height:44px}

@media(max-width:650px){main:has(.detail-view){padding-top:10px}.detail-view{padding-top:0}.comment-entry{padding:10px 4px}.comment-entry .button{font-size:12px;min-height:44px;padding:9px 10px}.detail-decision .decision-option{min-height:46px}.detail-view .detail-head h1{font-size:24px}}

/* Решения: иконки согласованного макета, радиокнопки доступны с клавиатуры. */
.detail-decision .decision-option{position:relative;cursor:pointer}
.detail-decision .decision-radio{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
.decision-icon{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.decision-option.sale .decision-icon{color:var(--green)}.decision-option.defect .decision-icon{color:var(--red)}.decision-option.dispute .decision-icon{color:#af7b21}.decision-option.substitution .decision-icon{color:#8a5aba}
.decision-option:has(.decision-radio:focus-visible){outline:3px solid #83a6ff;outline-offset:3px}
