:root{color-scheme:light;--kk-brand:#E61D55;--kk-brand-soft:rgba(230,29,85,.08);--ink:#25252a;--muted:#626872;--line:#ebebee;--panel:rgba(251,251,252,.97);--green:#2f9a63;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;color:var(--ink);background:#f4f4f6}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:9px;padding:8px 10px;background:transparent;color:#66666d;cursor:pointer;white-space:nowrap}button:hover{background:#eeeef1;color:var(--ink)}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid var(--kk-brand);outline-offset:3px}input,select,textarea{min-width:0;border:1px solid #e3e3e5;border-radius:10px;background:#fff;color:var(--ink);padding:9px 10px;outline:none}input:focus,select:focus,textarea:focus{border-color:#c6c6cb;box-shadow:0 0 0 3px var(--kk-brand-soft)}svg{width:18px;height:18px;display:block;flex:none}[data-icon]{display:inline-flex;align-items:center;justify-content:center}.icon-button{width:34px;height:34px;padding:8px;flex:none}.primary{background:var(--kk-brand);color:white!important}.primary:hover{background:#d2194f}.muted,small{color:var(--muted);font-size:12px}.topbar{height:66px;display:flex;align-items:center;padding:0 23px;gap:15px;background:#fff;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-size:17px;letter-spacing:-.5px}.brand img{width:26px;height:26px}.brand strong{font-weight:550}.brand span{font-weight:400;color:#626872}.local-tag{font-size:11px;border:1px solid var(--line);border-radius:6px;padding:4px 6px;color:var(--muted)}.top-actions{margin-left:auto;display:flex;gap:3px}.workspace{height:calc(100dvh - 66px);display:grid;grid-template-columns:229px minmax(0,1fr) 350px}.previews{display:flex;flex-direction:column;min-height:0;background:var(--panel);border-right:1px solid var(--line);padding:18px 12px 12px}.collection-head label,.preview-heading{font-size:12px;color:var(--muted)}.inline{display:flex;gap:4px;align-items:center}.inline select{width:100%;margin:8px 0 0}.inline button{font-size:12px}.collection-head>.inline:last-child{justify-content:space-between;margin:4px 0 16px}.preview-heading{display:flex;justify-content:space-between;padding:0 8px 8px}#preview-list{overflow:auto;flex:1}.preview-card{position:relative;margin:0 0 8px;border:1px solid transparent;border-radius:13px;padding:5px}.preview-card.active{border-color:rgba(230,29,85,.3);background:var(--kk-brand-soft)}.preview-select{width:100%;display:flex;flex-direction:column;align-items:stretch;padding:0;text-align:left;white-space:normal}.preview-select:hover{background:transparent}.preview-select img{width:100%;height:110px;object-fit:contain;background:#eaeaec;border-radius:8px}.preview-label{padding:8px 3px 4px;display:flex;align-items:center;gap:6px;font-size:12px}.preview-label span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.preview-card .remove-preview{position:absolute;right:9px;top:9px;background:rgba(255,255,255,.95);width:27px;height:27px;opacity:0}.preview-card:hover .remove-preview,.remove-preview:focus{opacity:1}.upload-button{border:1px dashed #d7d7dc;margin:12px 0 0;width:100%;padding:12px}.local-note{font-size:11px;line-height:1.5;color:#626872;margin:16px 6px 0}.review{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;background:#f4f4f6}.image-heading{height:53px;padding:0 22px;display:flex;align-items:center;gap:12px;font-size:12px;color:#6e6e75}.image-heading span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-heading span:last-child{margin-left:auto;color:#626872;white-space:nowrap}.toolbar{display:flex;gap:2px;align-items:center;align-self:center;max-width:calc(100% - 20px);padding:7px 10px;border:1px solid rgba(0,0,0,.09);border-radius:999px;background:rgba(255,255,255,.95);backdrop-filter:blur(22px);box-shadow:0 2px 5px rgba(0,0,0,.02),0 1px 1px rgba(0,0,0,.02);z-index:2}.toolbar>img{margin:0 6px}.toolbar button{font-size:12px;height:34px;padding:0 8px}.toolbar button.selected{color:var(--kk-brand);background:var(--kk-brand-soft)}.divider{display:block;height:24px;width:1px;background:#e6e6e9;margin:0 5px;flex:none}.count{min-width:24px;width:24px;height:24px!important;border-radius:50%;background:var(--kk-brand-soft);color:var(--kk-brand);display:inline-flex;align-items:center;justify-content:center;font-size:11px;padding:0!important}.toolbar .count{margin-left:6px}#viewport{flex:1;min-height:0;overflow:auto;position:relative;margin-top:10px;overscroll-behavior:contain}#stage{min-height:100%;min-width:100%;width:max-content;display:grid;place-items:center;padding:32px}#image-wrap{position:relative;flex:none;box-shadow:0 7px 28px rgba(0,0,0,.09);touch-action:none;cursor:crosshair}#image-wrap[hidden]{display:none}#image-wrap.pan{cursor:grab;touch-action:none}#preview-image{display:block;width:100%;height:100%;pointer-events:none;user-select:none}#markers{position:absolute;inset:0;pointer-events:none}.marker{position:absolute;pointer-events:auto;z-index:1}.pin{transform:translate(-50%,-50%);width:27px;height:27px;padding:0;border-radius:50%;border:2px solid #fff;background:var(--kk-brand);color:#fff;box-shadow:0 5px 18px rgba(230,29,85,.35);font-size:11px;font-weight:600}.pin:hover,.pin.active{background:var(--kk-brand);color:white;transform:translate(-50%,-50%) scale(1.15)}.area{border:2px solid var(--kk-brand);background:rgba(230,29,85,.08);border-radius:10px;padding:0;min-width:8px;min-height:8px}.area:hover,.area.active{background:rgba(230,29,85,.13);box-shadow:0 0 0 3px rgba(230,29,85,.13)}.area>span{position:absolute;left:-2px;top:-2px;width:24px;height:24px;border-radius:9px 0 8px 0;background:var(--kk-brand);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px}.pin.fixed{background:var(--green)}.area.fixed{border-color:var(--green);background:rgba(47,154,99,.08)}.area.fixed>span{background:var(--green)}#selection{position:absolute;border:2px dashed var(--kk-brand);background:var(--kk-brand-soft);pointer-events:none;border-radius:8px;z-index:5}.empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px}.empty[hidden]{display:none}.empty h1{font-size:20px;font-weight:500;letter-spacing:-.6px;margin:22px 0 0}.empty p{color:var(--muted);line-height:1.65;margin:12px 0 24px}.empty small{margin-top:12px;font-size:11px}.canvas-footer{min-height:43px;padding:4px 18px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#626872}.canvas-footer button{font-size:11px}.comments{display:flex;flex-direction:column;min-height:0;background:var(--panel);border-left:1px solid rgba(0,0,0,.08)}.comments-head{height:66px;padding:0 18px;display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--line);flex:none}.comments-head strong{font-size:16px;font-weight:500;letter-spacing:-.3px}.comments-head button{margin-left:auto}.summary{display:flex;align-items:center;gap:14px;padding:12px 18px;border-bottom:1px solid var(--line)}.summary>div{display:flex;flex-direction:column;gap:3px}.summary strong{font-size:15px;font-weight:500}.summary span{font-size:11px;color:var(--muted)}.author{margin-left:auto;max-width:126px}.author input{width:100%;padding:6px 8px;font-size:12px;margin-top:4px}.comment-tools{padding:10px;border-bottom:1px solid var(--line)}#search{width:100%;font-size:12px}.filters{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:7px}.filters button{font-size:12px}.filters .selected{background:var(--kk-brand-soft);color:var(--kk-brand)}.scope{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);padding:8px 3px 0}input[type=checkbox]{accent-color:var(--kk-brand)}#comment-list{flex:1;overflow:auto;padding:10px}.comment-card{border-radius:13px;padding:11px 9px;margin-bottom:5px;border:1px solid transparent}.comment-card:hover{background:#f5f5f6}.comment-card.active{background:#f1f1f3;border-color:#e6e6ea}.comment-top{display:flex;align-items:center;gap:8px}.comment-top .comment-focus{flex:1;min-width:0;justify-content:flex-start;padding:0;font-size:12px}.comment-top .comment-focus>.author-name{overflow:hidden;text-overflow:ellipsis}.comment-top .icon-button{height:28px;width:28px;padding:5px}.comment-card.fixed .count{background:#edf6f0;color:var(--green)}.comment-body{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 6px}.comment-meta{color:#626872;font-size:10px;line-height:1.5;overflow-wrap:anywhere}.comment-actions{display:flex;justify-content:flex-end;gap:2px}.comment-actions button{font-size:11px;padding:5px 7px}.comment-attachments{display:flex;flex-direction:column;gap:7px;margin-top:9px}.attachment{display:flex;align-items:center;gap:8px;min-width:0;font-size:12px}.attachment a{display:flex;align-items:center;gap:6px;min-width:0;color:#606069;text-decoration:none}.attachment a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment img{width:46px;height:38px;object-fit:cover;border-radius:6px}.attachment audio{width:100%;height:34px}.list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:180px;color:var(--muted);gap:8px;padding:24px;font-size:12px;line-height:1.5}.list-empty strong{font-size:14px;font-weight:500;color:#44444a}.comments-footer{padding:9px 12px 11px;border-top:1px solid var(--line)}.footer-actions{display:flex;justify-content:flex-end;gap:3px}.footer-actions button{font-size:12px}.footer-actions svg{width:16px;height:16px}#feedback{padding:10px;border:1px solid #e7e7eb;border-radius:11px;margin-bottom:8px;background:#fff;font-size:12px;line-height:1.4}#feedback.error,#editor-error{color:#b42342;background:#fff2f5}dialog{width:380px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 30px);overflow:auto;border:1px solid rgba(0,0,0,.1);border-radius:16px;background:#fff;box-shadow:0 20px 60px rgba(0,0,0,.18);padding:16px;color:var(--ink)}dialog::backdrop{background:rgba(35,35,42,.18);backdrop-filter:blur(2px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.dialog-head strong{font-size:14px;font-weight:500}.target-context{border-radius:9px;padding:9px;background:#f6f6f7;color:#626872;font-size:11px;overflow-wrap:anywhere}#comment-form>label{display:block;color:#626872;font-size:11px;margin:13px 0 6px}#revision{font-size:12px;width:100%}textarea{width:100%;resize:vertical;min-height:110px;font-size:13px;line-height:1.5}.composer-tools{display:flex;align-items:center;gap:3px;margin-top:9px}.composer-tools button{font-size:12px}.composer-tools button.recording{color:var(--kk-brand);background:var(--kk-brand-soft)}.dialog-foot{display:flex;gap:7px;align-items:center;justify-content:flex-end;margin-top:18px}.dialog-foot span{margin-right:auto;font-size:11px;color:#626872}.dialog-foot button{font-size:12px}.draft-file{display:flex;align-items:center;gap:6px;padding:6px 0;font-size:12px}.draft-file>span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draft-file audio{width:calc(100% - 35px);height:34px}#editor-error{padding:9px;border-radius:8px;font-size:12px}#help-dialog{width:480px}#help-dialog p{font-size:13px;line-height:1.65}#prompt-dialog h2{font-size:17px;font-weight:500}#prompt-dialog p{font-size:13px;line-height:1.5}#prompt-input{width:100%}.comments-hidden .workspace{grid-template-columns:229px minmax(0,1fr)}.comments-hidden .comments{display:none}.busy{cursor:progress}.busy button{pointer-events:none}@media(max-width:1150px){.workspace{grid-template-columns:187px minmax(0,1fr) 310px}.comments-hidden .workspace{grid-template-columns:187px minmax(0,1fr)}.tool-label{display:none}.preview-select img{height:90px}.canvas-footer #hint{max-width:55%}.image-heading{padding:0 14px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}[hidden]{display:none!important}
/* Alpha 0.2 — progressive disclosure, original Komment tick interaction. */
#identity{max-width:130px;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
.search-row{display:flex;gap:6px;align-items:center}.search-row #search{flex:1;min-width:0}.popover{position:relative;flex:none}.popover>summary{list-style:none;display:flex;align-items:center;justify-content:center;width:34px;height:34px;cursor:pointer;border-radius:9px;color:#626872;position:relative}.popover>summary::-webkit-details-marker{display:none}.popover>summary:hover,.popover[open]>summary{background:#f0f0f3}.popover>summary:focus-visible,.comment-details>summary:focus-visible{outline:2px solid var(--kk-brand);outline-offset:2px}.popover-panel{position:absolute;right:0;top:calc(100% + 8px);width:250px;z-index:20;background:#fff;border:1px solid #e4e4e8;border-radius:13px;box-shadow:0 8px 20px #00000014;padding:12px}.filter-totals{display:flex;gap:16px;color:var(--muted);font-size:12px;padding:2px 5px 7px}.filter-totals b{font-weight:500;color:var(--ink)}#filter-dot{position:absolute;width:5px;height:5px;border-radius:50%;background:var(--kk-brand);right:4px;top:4px}#filter-caption{font-size:11px;color:var(--muted);margin:9px 2px 0}.footer-menu .popover-panel{top:auto;bottom:calc(100% + 8px);width:205px}.footer-menu #wipe{width:100%;justify-content:flex-start;color:#b42342}.comment-card{padding:11px 9px 5px}.comment-card .status-tick{opacity:0;border:1px solid #d7d7de;border-radius:50%;width:22px;height:22px;padding:3px;color:transparent}.comment-card:hover .status-tick,.comment-card:focus-within .status-tick,.comment-card.active .status-tick{opacity:1;color:#626872}.comment-card .status-tick:hover{color:var(--green);border-color:var(--green)}.comment-card.fixed .status-tick{opacity:1;background:#edf6f0;color:var(--green);border-color:#b6d9c4}.comment-card.fixed .comment-body{color:#626872}.comment-actions{opacity:0}.comment-card:hover .comment-actions,.comment-card:focus-within .comment-actions,.comment-card.active .comment-actions{opacity:1}.comment-details>summary{font-size:11px;color:#626872;cursor:pointer;padding:5px 0;width:max-content;max-width:100%}.comment-details .comment-meta{padding:5px 0;line-height:1.7}.preview-context{font-size:11px;color:#626872;overflow-wrap:anywhere;margin-bottom:4px}.comment-attachments:empty{display:none}#author-field label{display:block;color:#626872;font-size:11px;margin:13px 0 6px}#author-field input{width:100%}@media(hover:none){.comment-card .status-tick,.comment-card .comment-actions{opacity:1}.comment-card:not(.fixed) .status-tick{color:#626872}}
/* Cloud review controls */
#rename-form{margin:8px 0 14px}#collection-name{width:100%;font-size:12px}#rename-form .inline{margin-top:7px}#rename-form button{font-size:11px}#cloud-dialog label{display:block;margin:12px 0;font-size:12px}#cloud-dialog label input{display:block;width:100%;margin-top:6px}#cloud-dialog p,#share-dialog p{font-size:13px;line-height:1.5}#cloud-error{color:#b42342}#review-url{width:100%;font-size:12px}#cloud-signed-in{display:flex;flex-direction:column;align-items:stretch;gap:8px}.footer-menu #wipe-all{color:#b42342;width:100%;justify-content:flex-start}.guest-review #new-collection,.guest-review #rename-collection,.guest-review #delete-collection,.guest-review #add-previews,.guest-review #empty-upload,.guest-review .remove-preview,.guest-review #cloud-account,.guest-review #share,.guest-review #backup,.guest-review #restore{display:none!important}.guest-review #empty h1{font-size:18px}.guest-review #empty p,.guest-review #empty small{display:none}.guest-review #empty h1::after{content:' Awaiting previews.'}#cloud-account,#share{font-size:12px}
/* Photo Komment Beta: a quieter online workspace. */
#save-state{font-size:11px;color:var(--muted);white-space:nowrap}.top-actions #share{padding:8px 16px;color:#fff}.local-note:empty{display:none}.settings-tools{display:flex;flex-direction:column;align-items:stretch;margin-top:10px;gap:4px}#maintenance,#sharing-options{margin:16px 0;font-size:12px;color:var(--muted)}#maintenance>summary,#sharing-options>summary{cursor:pointer;padding:5px 0}.signed-out .workspace{visibility:hidden}.signed-out #identity{display:none}#cloud-dialog{width:380px}#cloud-dialog #login-submit{width:100%;margin-top:8px}.guest-review #cloud-account{display:inline-flex!important}.guest-review #maintenance{display:none!important}.brand>span{color:#626872;font-weight:400}.brand strong{font-weight:550}#sharing-options button{font-size:12px}#share-message{color:var(--muted)}

/* Collection controls and shared feedback context. */
.mobile-only{display:none!important}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
button,summary{touch-action:manipulation;user-select:none;-webkit-user-select:none}
.collection-title-row{display:flex;align-items:center;justify-content:space-between;min-height:34px}
.collection-controls{display:flex;align-items:center;gap:4px;margin:0}
.collection-head>select{width:100%;font-size:13px;margin:6px 0 18px;min-height:38px}
.collection-controls select{flex:1;min-width:0;width:100%;font-size:12px}
.collection-controls .icon-button,.collection-controls .popover>summary{width:30px;height:36px;padding:6px;flex:none}
#collection-menu .popover-panel{width:205px}
#collection-menu button{width:100%;justify-content:flex-start;font-size:12px}
#delete-collection{color:#b42342}
.guest-review #collection-menu{display:none}
#viewport{touch-action:none}
.marker.pin,.marker.whole-note{z-index:2}
#whole-preview{white-space:nowrap}
.whole-note{left:auto!important;right:12px;top:12px!important;width:34px;height:34px;border-radius:10px;background:var(--kk-brand);color:#fff;border:2px solid white;box-shadow:0 3px 12px #0002}
.whole-note.fixed{background:var(--green)}
#pending-region{position:absolute;pointer-events:none;z-index:5}
#pending-region.pin{background:var(--kk-brand);outline:4px solid var(--kk-brand-soft)}
#feedback{position:fixed;right:20px;bottom:20px;z-index:60;width:max-content;max-width:min(360px,calc(100vw - 24px));margin:0;box-shadow:0 8px 28px #0002}
/* Shared messaging surfaces and controls use the same tokens at both sizes. */
:root{--surface:#fff;--surface-muted:#f4f4f6;--radius-control:12px;--radius-bubble:16px;--radius-sheet:20px;--tap-size:44px;--error:#b42342}
.preview-thumbnail{height:110px;position:relative;display:grid;place-items:center;background:#eaeaec;border-radius:8px;overflow:hidden}
.preview-select .preview-thumbnail img{position:absolute;inset:0;height:100%;width:100%;object-fit:contain}
.thumbnail-status{font-size:11px;color:var(--muted);text-align:center;padding:12px;white-space:normal;line-height:1.5}
.thumbnail-status.unavailable{color:var(--error)}
#preview-load-state{z-index:6;background:#f4f4f6}
#preview-load-state p{max-width:340px}
.upload-panel{position:fixed;right:16px;bottom:16px;width:min(390px,calc(100vw - 24px));padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sheet);box-shadow:0 8px 30px #0002;z-index:45;max-height:calc(var(--visual-height,100dvh) - 90px);overflow:auto}
.upload-head{display:flex;align-items:center;gap:8px}
.upload-head strong{flex:1;min-width:0;font-size:14px;font-weight:500}
.upload-head .icon-button{width:44px;height:44px}
#upload-summary{margin:0 0 10px;font-size:12px;color:var(--muted);line-height:1.5}
.upload-panel progress{display:block;width:100%;height:6px;appearance:none;border:0;border-radius:6px;background:#eeeef1;overflow:hidden;accent-color:var(--kk-brand)}
.upload-panel progress::-webkit-progress-bar{background:#eeeef1;border-radius:6px}
.upload-panel progress::-webkit-progress-value{background:var(--kk-brand);border-radius:6px}
.upload-panel progress::-moz-progress-bar{background:var(--kk-brand);border-radius:6px}
.upload-panel details>summary{font-size:12px;color:var(--muted);cursor:pointer;min-height:44px;padding:14px 0}
#upload-files{list-style:none;margin:0;padding:0;max-height:230px;overflow:auto;overscroll-behavior:contain}
.upload-file{padding:9px 0;border-top:1px solid var(--line)}
.upload-file-line{display:flex;align-items:center;gap:10px;font-size:12px}
.upload-file-name{min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.upload-file-line small{flex:none;font-size:11px}
.upload-file-status{font-size:11px;line-height:1.5;margin:5px 0;color:var(--muted);overflow-wrap:anywhere}
.upload-file[data-state=failed] .upload-file-status,.upload-file[data-state=skipped] .upload-file-status{color:var(--error)}
.upload-file[data-state=uploaded] .upload-file-status{color:var(--green)}
.upload-file:not([data-state=uploading]) progress{display:none}
#retry-uploads{min-height:44px;width:100%;margin-top:10px}
@media(max-width:1150px){.preview-thumbnail{height:90px}}
button,input,textarea,select{border-radius:var(--radius-control)}
.popover>summary{border-radius:var(--radius-control)}
#comment-list{background:#f7f7f9;padding:8px 10px;overscroll-behavior:contain}
.message-bubble{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-control);margin:0 0 4px;padding:0;overflow:hidden}
.message-bubble:hover{background:var(--surface)}
.message-bubble.active{border-color:var(--kk-brand);box-shadow:0 0 0 2px var(--kk-brand-soft);background:var(--kk-brand-soft)}
.message-bubble.active.fixed{border-color:#b6d9c4;box-shadow:0 0 0 2px #edf6f0;background:#f3faf5}
.message-bubble .comment-top{gap:0;min-height:44px}
.message-bubble .comment-focus{display:flex;flex:1;min-width:0;min-height:44px;gap:8px;padding:0 8px;text-align:left;border-radius:0;font-size:12px;font-weight:400;color:var(--ink)}
.message-bubble .comment-focus:hover{background:transparent}
.message-bubble .comment-focus:focus-visible{outline-offset:-3px}
.message-bubble .comment-focus .count{width:20px;min-width:20px;height:20px!important;font-size:10px;flex:none}
.comment-excerpt{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.message-time{font-size:10px;color:var(--muted);flex:none}
.comment-chevron{display:flex;color:var(--muted);flex:none}
.comment-chevron svg{width:14px;height:14px}
.expanded .comment-chevron{transform:rotate(180deg)}
.comment-content{padding:4px 12px 10px;border-top:1px solid var(--line)}
.comment-author{padding-top:6px;font-size:11px;font-weight:500;color:var(--muted)}
.message-bubble .comment-meta{margin-top:5px}
.message-bubble .comment-body{font-size:14px;line-height:1.55;margin:6px 0 10px;color:var(--ink)}
.message-bubble.fixed .comment-body{color:var(--ink)}
.message-meta{display:flex;align-items:center;gap:8px;justify-content:space-between}
.message-location{font-size:10px;line-height:1.5;color:var(--muted)}
.message-bubble .status-tick{position:relative;flex:none;width:36px;height:44px;min-width:36px;min-height:44px;opacity:0;border:0;border-radius:0;padding:0;color:var(--green);background:transparent}
.message-bubble .status-tick::before{content:'';position:absolute;width:20px;height:20px;border:1px solid #c7c7cf;border-radius:50%;background:var(--surface)}
.message-bubble .status-tick svg{position:relative;width:14px;height:14px;opacity:0}
.message-bubble:hover .status-tick,.message-bubble:focus-within .status-tick,.message-bubble.active .status-tick,.message-bubble.fixed .status-tick{opacity:1;color:var(--green)}
.message-bubble .status-tick:hover,.message-bubble.fixed .status-tick{background:transparent;border:0}
.message-bubble .status-tick:not(:disabled):hover::before{border-color:var(--green)}
.message-bubble.fixed .status-tick::before{border-color:#b6d9c4;background:#edf6f0}
.message-bubble.fixed .status-tick svg{opacity:1}
.message-bubble .status-tick:disabled{cursor:default}
.message-bubble .status-tick:focus-visible{outline-offset:-3px}
@media(hover:none){.message-bubble .status-tick{opacity:1}}
.message-bubble .comment-actions{opacity:1;margin-top:0}
.message-bubble .comment-actions button{font-size:11px;min-height:32px}
.message-bubble .comment-details>summary{font-size:11px;min-height:32px;display:flex;align-items:center;padding:4px 0}
.message-bubble .attachment a{width:100%;padding:8px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--surface);min-height:44px}
.message-bubble .attachment img{width:64px;height:64px;object-fit:contain;background:var(--surface-muted)}
.message-bubble .attachment audio{height:40px;min-width:0;flex:1}
.message-bubble .comment-attachments{margin:8px 0 10px}
.attachment-unavailable{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:var(--error)}
.attachment-unavailable button{min-width:44px;min-height:44px}
#editor{display:block;flex:none;min-width:0;background:var(--surface);padding:10px;border-top:1px solid var(--line);box-shadow:0 -3px 16px #00000004}
#editor[hidden]{display:none!important}
#comment-form{display:flex;flex-direction:column;min-height:0;gap:8px}
.composer-context{display:flex;align-items:center;gap:8px;min-height:44px;flex:none}
.composer-context>img{width:36px;height:36px;object-fit:contain;background:var(--surface-muted);border-radius:8px;flex:none}
.composer-target{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
#editor-title{font-size:12px;font-weight:550;color:var(--ink)}
#target-label{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#feedback-details{margin:0;font-size:12px;flex:none}
#editor .icon-button,#feedback-details>summary{width:var(--tap-size);height:var(--tap-size);min-width:var(--tap-size);padding:10px;border-radius:var(--radius-control)}
#feedback-details .composer-options{top:auto;bottom:calc(100% + 8px);right:-44px;width:270px;max-width:calc(100vw - 32px);max-height:calc(var(--visual-height,100dvh) - 160px);overflow:auto;border-radius:var(--radius-bubble)}
#target-context{font-size:11px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere;margin:0 0 12px}
#feedback-details label{display:block;font-size:12px;color:var(--muted);margin:10px 0 6px}
#feedback-details input,#feedback-details select{width:100%;font-size:14px;min-height:44px}
#record-option{width:100%;justify-content:flex-start;min-height:44px;margin-top:8px}
.message-input-row{display:flex;align-items:flex-end;gap:6px;flex:none}
#comment-text{flex:1;width:auto;min-width:0;min-height:44px;max-height:120px;resize:none;overflow:auto;border-radius:var(--radius-control);font-size:14px;line-height:1.45;padding:11px 12px;background:var(--surface-muted)}
#editor .composer-action{width:var(--tap-size);height:var(--tap-size);min-width:var(--tap-size);padding:10px;border-radius:50%;flex:none}
#record{touch-action:none;user-select:none;-webkit-user-select:none}
#editor .composer-action[hidden]{display:none!important}
#editor #draft-files{max-height:160px;overflow:auto;overscroll-behavior:contain;min-height:0}
#draft-files:empty{display:none}
.draft-file{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 8px;margin-bottom:6px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--surface-muted)}
.draft-file .draft-thumbnail{width:48px;height:48px;object-fit:contain;border-radius:8px;flex:none}
.draft-file-label{font-size:12px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.draft-file-label small{display:block;font-size:10px;margin-top:3px}
.draft-file audio{width:0;min-width:0;flex:1;height:40px}
.draft-file .icon-button{flex:none;margin-left:auto}
#composer-status{margin:0;padding:0 6px;color:var(--muted);font-size:11px;line-height:1.5}
#editor-error{margin:0;padding:8px 10px;color:var(--error);background:#fff2f5;border-radius:var(--radius-control);font-size:12px;line-height:1.4}
#recording-panel{padding:8px;background:var(--kk-brand-soft);border-radius:var(--radius-control)}
.recording-line{display:flex;align-items:center;gap:8px;min-width:0}
.recording-dot{width:8px;height:8px;border-radius:50%;background:var(--kk-brand);flex:none}
#record-time{font-size:13px;font-variant-numeric:tabular-nums;color:var(--kk-brand)}
#record-state{font-size:11px;line-height:1.4;flex:1;min-width:0;color:var(--ink)}
#record-hint{margin:6px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.composing .comments-footer{display:none}
.composing #pending-region{outline:3px solid var(--kk-brand-soft)}
#pending-region.pin{display:flex;align-items:center;justify-content:center;font-size:18px}

/* Phones and compact touch tablets keep the same layout in both orientations. */
@media (max-width:900px), (max-width:1100px) and (pointer:coarse){
  :root{--header-height:calc(58px + env(safe-area-inset-top));--review-bar:64px;--mode-toolbar:48px;--dock-offset:max(0px,calc(100dvh - var(--visual-top,0px) - var(--visual-height,100dvh)))}
  body{overflow:hidden}
  .mobile-only{display:flex!important}
  .topbar{height:var(--header-height);padding:env(safe-area-inset-top) 12px 0;gap:6px}
  .brand{font-size:15px;gap:6px}
  .brand img{width:24px;height:24px}
  .brand>span,.topbar .local-tag{display:none}
  .top-actions{align-items:center;gap:2px;min-width:0}
  .top-actions button,.icon-button,.popover>summary{min-width:44px;min-height:44px}
  #identity{max-width:80px;font-size:12px}
  #save-state{font-size:10px;max-width:64px;overflow:hidden;text-overflow:ellipsis}
  .top-actions #share{padding:8px 12px;font-size:12px}
  .workspace,.comments-hidden .workspace{margin-top:0;height:calc(100dvh - var(--header-height) - var(--mode-toolbar) - var(--review-bar) - env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  .review{grid-column:1;grid-row:1}
  .image-heading{display:none}
  #mobile-toolbar{position:fixed;left:0;right:0;top:auto;bottom:calc(var(--review-bar) + env(safe-area-inset-bottom) + var(--dock-offset));height:var(--mode-toolbar);padding:2px 8px;background:#fff;border-top:1px solid var(--line);z-index:35;align-items:center}
  .mode-tools{display:flex;align-items:center;gap:4px;width:100%;min-width:0;height:44px}
  #mobile-toolbar .mode-tools[hidden]{display:none!important}
  .mode-tools button{height:44px;min-width:44px;padding:6px 8px;gap:5px;font-size:12px;white-space:nowrap}
  #mobile-preview-context{display:flex;align-items:center;flex:1;min-width:0;gap:5px;color:var(--muted);font-size:12px}
  #mobile-preview-context>span[data-icon],#preview-mode-tools>span[data-icon]{flex:none}
  #mobile-collection-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--ink)}
  #mobile-preview-count{flex:none;font-size:12px;color:var(--muted)}
  .preview-tool-label{display:flex;align-items:center;min-width:0}
  #mobile-preview-name{width:100%;overflow:hidden;text-overflow:ellipsis;text-align:left}
  #preview-position{display:none}
  #comment-search-tools{width:100%;min-width:0;gap:4px}
  #comment-mode-tools #filter-menu .popover-panel{top:auto;bottom:calc(100% + 5px)}
  #placement-tools .placement-choices{display:flex;align-items:center;gap:2px;flex:1;min-width:0}
  .placement-choices button{flex:1;min-width:0;padding:6px 4px}
  .placement-choices #place-whole{flex:0 0 44px;min-width:44px;padding:0}
  .placement-choices [aria-pressed=true]{color:var(--kk-brand);background:var(--kk-brand-soft)}
  .placing #placement-hint{position:fixed;bottom:calc(var(--review-bar) + var(--mode-toolbar) + env(safe-area-inset-bottom) + var(--dock-offset) + 10px);left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 32px);height:auto;clip-path:none;margin:0;padding:6px 10px;border-radius:20px;background:#fffef9e8;box-shadow:0 2px 12px #0001;color:var(--muted);font-size:11px;white-space:normal;text-align:center;pointer-events:none}
  .toolbar,.canvas-footer{display:none}
  #viewport{margin-top:0}
  #stage{padding:16px}
  body:not(.comments-hidden) #stage{padding-bottom:calc(min(52dvh,470px) + 16px)}
  .pin{width:44px;height:44px;font-size:13px}
  .area>span{width:44px;height:44px;font-size:13px;border-radius:9px}
  .whole-note{width:44px;height:44px}
  .empty{padding:20px}
  .empty h1{font-size:20px;margin-top:16px}
  .empty p{font-size:14px}
  .empty button{min-height:48px}
  #mobile-nav{position:fixed;left:0;right:0;bottom:var(--dock-offset);height:calc(var(--review-bar) + env(safe-area-inset-bottom));padding:6px 10px calc(6px + env(safe-area-inset-bottom));gap:6px;background:#fff;border-top:1px solid var(--line);align-items:center;z-index:35}
  #mobile-nav button{position:relative;flex:1;min-width:0;height:52px;font-size:12px;gap:4px;flex-direction:column;padding:4px}
  #mobile-comment-count{position:absolute;top:2px;left:calc(50% + 8px);display:inline-flex;align-items:center;justify-content:center;min-width:14px;height:14px;padding:0 3px;border-radius:7px;background:var(--kk-brand-soft);font-size:10px;line-height:1;font-weight:500;color:var(--kk-brand)}
  #mobile-nav button[aria-pressed=true]{background:var(--kk-brand-soft);color:var(--kk-brand)}
  .previews{display:none;position:fixed;left:0;right:0;bottom:calc(var(--review-bar) + var(--mode-toolbar) + env(safe-area-inset-bottom) + var(--dock-offset));height:min(74dvh,620px);max-height:calc(var(--visual-height,100dvh) - var(--header-height) - var(--mode-toolbar) - var(--review-bar) - env(safe-area-inset-bottom));width:100%;padding:12px 16px 16px;flex-direction:column;gap:10px;border:1px solid var(--line);border-radius:20px 20px 0 0;box-shadow:0 -8px 28px #0001;z-index:31;background:#fff}
  .previews-open .previews{display:flex}
  .sheet-heading{align-items:center;justify-content:space-between;flex:none;min-height:44px}
  .sheet-heading strong{font-size:17px;font-weight:500}
  .collection-head{width:auto;flex:none}
  .collection-controls{margin:0;gap:6px}
  .collection-head>select{font-size:16px;min-height:44px;margin:6px 0 0}
  .collection-controls .icon-button,.collection-controls .popover>summary{width:44px;height:44px}
  #rename-form{position:static;margin-bottom:0}
  #rename-form input{font-size:16px}
  #rename-form button{min-height:44px}
  .preview-heading{display:none}
  #preview-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:8px;overflow:auto;min-height:0;flex:1}
  .preview-card{width:auto;margin:0;padding:5px;min-width:0}
  .preview-select img{height:110px}
  .preview-thumbnail{height:110px}
  .preview-label{font-size:12px;min-height:36px}
  .preview-card .remove-preview{opacity:1;right:7px;top:7px;width:44px;height:44px}
  .upload-button{width:100%;min-height:48px;margin:0;font-size:14px;flex:none}
  .local-note{display:none}
  #sheet-backdrop{position:fixed;inset:var(--header-height) 0 calc(var(--review-bar) + var(--mode-toolbar) + env(safe-area-inset-bottom) + var(--dock-offset));z-index:29;border:0;border-radius:0;background:#25252a30;padding:0}
  .comments{position:fixed;left:0;right:0;top:auto;bottom:calc(var(--review-bar) + var(--mode-toolbar) + env(safe-area-inset-bottom) + var(--dock-offset));width:100%;height:min(52dvh,470px);max-height:calc(var(--visual-height,100dvh) - var(--header-height) - var(--mode-toolbar) - var(--review-bar) - env(safe-area-inset-bottom));border:1px solid var(--line);border-radius:20px 20px 0 0;box-shadow:0 -8px 28px #0001;z-index:30;background:#fff}
  .comments-expanded .comments{height:calc(var(--visual-height,100dvh) - var(--header-height) - var(--mode-toolbar) - var(--review-bar) - env(safe-area-inset-bottom))}
  .comments-head{height:56px;padding:6px 14px;gap:8px}
  .comments-head #expand-comments{margin-left:auto}
  .comments-head #close-comments{margin-left:0}
  .comment-tools{padding:0 12px}
  .comment-tools:has(#filter-caption[hidden]){display:none}
  #filter-caption{margin:8px 0}
  #search{font-size:16px;min-height:44px}
  #comment-list{padding:8px 12px;overscroll-behavior:contain}
  .comment-body{font-size:14px}
  .comment-top .comment-focus{min-height:44px;font-size:13px}
  .comment-card .status-tick{opacity:1;min-width:44px;min-height:44px;padding:10px;color:#626872}
  .comment-actions{opacity:1}
  .comment-actions button,.comment-details>summary,.footer-actions button,.filters button{min-height:44px;font-size:13px}
  .comment-details>summary{display:flex;align-items:center}
  .comments-footer{padding:4px 12px}
  .footer-actions{justify-content:space-between}
  .popover-panel{max-width:calc(100vw - 32px)}
  #feedback{left:12px;right:12px;bottom:calc(var(--review-bar) + var(--mode-toolbar) + env(safe-area-inset-bottom) + var(--dock-offset) + 12px);width:auto;max-width:none;font-size:13px}
  dialog{max-width:calc(100vw - 24px);max-height:calc(var(--visual-height,100dvh) - 24px);font-size:14px}
  dialog input,dialog textarea,dialog select{font-size:16px!important}
  dialog button,dialog summary{min-height:44px}
  #editor{position:fixed;left:0;right:0;bottom:auto;top:calc(var(--visual-top,0px) + var(--visual-height,100dvh));transform:translateY(-100%);margin:0;width:100%;max-height:calc(var(--visual-height,100dvh) - 8px);padding:10px 12px calc(10px + env(safe-area-inset-bottom));border:1px solid var(--line);border-radius:var(--radius-sheet) var(--radius-sheet) 0 0;box-shadow:0 -6px 24px #00000012;z-index:50}
  #comment-form{max-height:calc(var(--visual-height,100dvh) - 30px - env(safe-area-inset-bottom))}
  #comment-text{font-size:16px;max-height:104px}
  #editor-title{font-size:13px}
  #target-label{font-size:12px}
  #feedback-details input,#feedback-details select{font-size:16px}
  #editor #draft-files{max-height:min(160px,25dvh)}
  .composing #stage{padding-bottom:calc(var(--composer-height,132px) + 16px)}
  #feedback-details .composer-options{max-height:calc(var(--visual-height,100dvh) - 150px)}
  .message-bubble .status-tick{opacity:1;min-width:44px;width:44px;min-height:44px;padding:0;border:0;border-radius:0}
  .message-bubble .comment-focus,.message-bubble .comment-actions button,.message-bubble .comment-details>summary{min-height:44px}
  .composing #feedback{bottom:calc(var(--composer-height,132px) + 12px)}
  .upload-panel{left:12px;right:12px;bottom:calc(var(--review-bar) + var(--mode-toolbar) + env(safe-area-inset-bottom) + var(--dock-offset) + 12px);width:auto;max-height:calc(var(--visual-height,100dvh) - var(--header-height) - var(--review-bar) - var(--mode-toolbar) - env(safe-area-inset-bottom) - 24px)}
  body:has(.upload-panel:not([hidden])) #feedback{display:none}
  .signed-out #mobile-nav,.signed-out #mobile-toolbar{display:none!important}
}
@media (max-height:500px) and (max-width:1100px){
  .comments{height:calc(100dvh - var(--header-height) - var(--mode-toolbar) - var(--review-bar) - env(safe-area-inset-bottom))}
}

/* Shared compact actions, recipient handoffs and the designer activity journal. */
.top-actions #share{padding:10px;background:transparent;color:var(--kk-brand);width:44px;height:44px;border-radius:var(--kk-radius-sm,10px)}
.top-actions #share:hover{background:var(--kk-brand-soft)}
.notification-bell{position:relative;width:44px;height:44px;flex-shrink:0}
.notification-bell b{position:absolute;right:0;top:0;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:var(--kk-brand);color:white;font-size:10px;line-height:17px}
.share-channels{display:grid;gap:8px;margin-top:18px;font-size:12px}
.share-channels label span{color:var(--muted);font-size:11px}
.share-channel{display:flex;gap:8px;min-width:0}.share-channel input{width:0;min-width:0;flex:1;font-size:12px}.share-channel button{min-height:44px;background:var(--kk-brand-soft);color:var(--kk-brand)}
.share-channels .remember-recipient{display:flex;align-items:center;gap:8px;min-height:44px;color:var(--muted)}.remember-recipient input{width:18px;height:18px;accent-color:var(--kk-brand)}
#forget-recipients{justify-self:start;font-size:11px}#optimization-status{margin:0;color:var(--muted);font-size:12px}
#activity-dialog{width:430px}#activity-list{max-height:55dvh;overflow:auto;overscroll-behavior:contain}.activity-entry{display:grid;justify-content:stretch;align-content:start;text-align:left;white-space:normal;width:100%;gap:4px;padding:14px 12px;border-bottom:1px solid var(--line);border-radius:0;background:transparent;font-size:13px}.activity-entry strong{font-weight:600}.activity-entry.unread{background:var(--kk-brand-soft)}.activity-entry time,.activity-context{font-size:11px;color:var(--muted)}.activity-entry span{overflow-wrap:anywhere}.activity-entry:hover{background:#f4f4f7}.activity-entry.unread strong{color:var(--kk-brand)}#activity-status{font-size:12px;color:var(--muted)}.activity-empty{color:var(--muted);font-size:13px;line-height:1.6;padding:16px 0}
@media(max-width:420px){.top-actions{gap:2px}.top-actions #identity{max-width:55px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#share-dialog{padding:16px}.share-channel{gap:4px}.share-channel button{padding:8px}.top-actions #save-state{display:none}}


/* Compact conversations with a neutral, lightly tinted palette. */
#thread-dialog{padding:0;width:520px;max-width:calc(100vw - 32px);height:680px;max-height:calc(100dvh - 64px);overflow:hidden;border-radius:20px;box-shadow:0 28px 100px #22223330}
#thread-dialog[open]{display:flex;flex-direction:column}
#thread-dialog::backdrop{background:#25252a30;backdrop-filter:none}
.thread-header{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line);background:#fff;flex:none}
.thread-header>div{min-width:0;flex:1}.thread-eyebrow{font-size:9px;letter-spacing:1.4px;color:var(--muted);font-weight:600}
.thread-header h2{font-size:17px;font-weight:600;margin:0 0 3px;letter-spacing:-.4px}.thread-header p{font-size:12px;color:var(--muted);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thread-status{font-size:11px;padding:7px 12px;border-radius:99px;background:var(--kk-brand-soft);color:var(--kk-brand)}.thread-status.is-fixed{background:#e9f4ee;color:#28774f}
#close-thread{width:40px;height:40px}
#thread-messages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px;background:#f4f6f7;display:flex;flex-direction:column;gap:6px;scrollbar-width:thin}
.thread-day{align-self:center;background:#ececef;color:#626872;font-size:10px;border-radius:7px;padding:3px 8px;margin:3px 0 5px}
.chat-message{position:relative;align-self:flex-start;background:white;border:1px solid #eaeaec;border-radius:4px 14px 14px 14px;min-width:130px;max-width:88%;padding:5px 10px;box-shadow:0 1px 2px #00000004}
.chat-message.mine{align-self:flex-end;background:#e8f0f3;border-color:#dbe6eb;border-radius:14px 4px 14px 14px}
.chat-message-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.chat-author{font-size:11px;font-weight:600;color:#516674}.chat-text{margin:2px 0 3px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;font-size:13px;color:#34343c}.chat-time{display:block;text-align:right;font-size:9px;color:#737e86;margin-top:2px}
.chat-menu{position:relative}.chat-menu>summary{list-style:none;cursor:pointer;padding:4px;color:#959099}.chat-menu>summary::-webkit-details-marker{display:none}.chat-menu svg{width:16px;height:16px}.chat-menu-panel{position:absolute;right:0;top:25px;z-index:5;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 8px 25px #0002;padding:5px;min-width:150px}.chat-menu-panel button{display:flex;width:100%;font-size:12px;min-height:36px;justify-content:flex-start}
.chat-files{font-size:12px;margin:8px 0}.chat-files>summary{cursor:pointer;color:#48677d}.chat-files .attachment audio{min-width:0;max-width:100%;width:240px}.chat-files .attachment img{width:70px;height:60px}
#thread-dialog #editor{position:static;transform:none;top:auto;left:auto;right:auto;width:auto;margin:0;border-radius:0;max-height:55%;overflow:visible;padding:8px 12px;box-shadow:none;border:0;border-top:1px solid var(--line);background:#fff;flex:none}
#thread-dialog .composer-context{display:none;margin-bottom:0;min-height:28px}#thread-dialog #editor.is-editing .composer-context{display:flex}#thread-dialog #target-thumbnail,#thread-dialog #target-label{display:none}#thread-dialog .composer-target{flex:1}#thread-dialog #editor-title{font-size:11px;color:var(--muted)}
#thread-dialog .message-input-row{border-radius:25px;background:#f6f6f8;padding:4px}#thread-dialog #comment-text{background:transparent;border:0;box-shadow:none;padding:9px 5px;font-size:13px}#thread-dialog .composer-action{width:40px;height:40px;min-width:40px}
#thread-dialog #thread-notice{flex:none;margin:0;font-size:11px;color:var(--muted);padding:3px 12px;background:#fff}#thread-new{align-self:center;background:#fff;font-size:11px;box-shadow:0 2px 12px #0001;margin:4px}
.thread-empty{margin:auto;text-align:center;color:var(--muted);font-size:13px;max-width:250px;line-height:1.7;padding:25px 0}
.thread-count{font-size:10px;color:var(--muted);padding:2px 6px;background:#eeeef1;border-radius:5px}.thread-count::before{content:'↩ ';}
@media (max-width:900px), (max-width:1100px) and (pointer:coarse){
 #thread-dialog{width:100%;max-width:100%;height:var(--visual-height,100dvh);max-height:var(--visual-height,100dvh);margin:0;border:0;border-radius:0;position:fixed;top:var(--visual-top,0px)}
 .thread-header{padding:6px 10px}.thread-header h2{font-size:16px}.thread-eyebrow{font-size:8px}#thread-messages{padding:10px;gap:5px}.chat-message{max-width:90%}#thread-dialog #editor{padding:6px 8px calc(6px + env(safe-area-inset-bottom));max-height:60%}#thread-dialog #comment-text{font-size:16px}.chat-menu>summary{padding:4px 8px}.chat-menu-panel button{min-height:44px}.thread-status{min-height:40px}
}

#thread-preview-toggle{position:relative;flex:none;width:44px;height:44px;padding:8px;background:#eef1f3;border:1px solid #e3e8ec;border-radius:9px;overflow:hidden;color:#526775}
#thread-header-thumbnail{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);object-fit:contain;background:#eef1f3}
#thread-preview-toggle[aria-expanded=true]{outline:2px solid #9aaebb;outline-offset:1px}
#thread-cover{flex:none;text-align:center;padding:8px 12px;background:#e9edf0;border-bottom:1px solid #dfe5e9;max-height:28%;overflow:auto}
.thread-cover-image{line-height:0}#thread-cover-image{max-width:100%;height:auto;max-height:min(180px,22dvh);object-fit:contain;border-radius:4px}
#thread-cover-status{font-size:11px;color:#65737e;margin:4px 0}#thread-cover-status:empty{display:none}#thread-cover-retry{font-size:12px}
#thread-dialog #feedback-details{align-self:center}#thread-dialog #feedback-details>summary{width:36px;min-width:36px;height:44px;padding:10px 8px}
#thread-dialog #feedback-details .composer-options{top:calc(100% + 8px);bottom:auto;left:auto;right:-12px;max-width:calc(100vw - 32px)}
#thread-dialog .message-input-row{gap:2px}#thread-dialog .primary:hover{background:#d2194f}
#thread-dialog .chat-message{flex-shrink:0}#thread-dialog .chat-menu>summary{position:relative}
#thread-dialog .chat-menu>summary::before{content:'';position:absolute;inset:-5px 0;min-height:34px}
@media (max-height:500px){#thread-cover-image{max-height:100px}#thread-cover{max-height:25%}}

#thread-dialog .chat-menu{margin:0}#thread-dialog .chat-menu>summary{min-height:24px;line-height:16px}#thread-dialog .chat-text{margin:2px 0 3px}

.chat-media{display:grid;gap:5px;margin:4px 0;min-width:160px;max-width:260px}.chat-attachment{min-width:0}.attachment-loading{display:block;font-size:11px;color:#65737e;min-height:48px;padding:12px 0}
#thread-dialog .chat-image-preview{display:block;padding:0;border:0;border-radius:10px;overflow:hidden;background:#e4ebf0;width:100%;min-height:48px;cursor:zoom-in}
.chat-image-preview img{display:block;width:100%;height:auto;max-height:200px;object-fit:contain}.chat-image-preview:focus-visible{outline:2px solid #436783;outline-offset:2px}
#attachment-viewer{padding:0;width:min(960px,calc(100vw - 24px));max-width:calc(100vw - 24px);height:min(800px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);border:1px solid #dce3e9;border-radius:16px;overflow:hidden;background:#f4f6f8}
#attachment-viewer[open]{display:flex;flex-direction:column}#attachment-viewer::backdrop{background:rgba(16,27,39,.78)}
#attachment-viewer header{display:flex;align-items:center;gap:12px;padding:8px 12px;background:#fff;border-bottom:1px solid #e1e7ec;flex:none}#attachment-viewer-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}#close-attachment-viewer{flex:none;width:44px;height:44px}
.attachment-viewer-body{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:12px;overflow:auto}#attachment-viewer-image{max-width:100%;max-height:100%;object-fit:contain}#attachment-viewer-status{font-size:13px;color:#526775}#attachment-viewer-status:empty{display:none}
@media(max-width:600px){#attachment-viewer{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}.attachment-viewer-body{padding:6px}#attachment-viewer header{padding-top:max(8px,env(safe-area-inset-top))}}

#thread-status{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:36px;height:44px;min-height:44px;padding:0;border:0;background:transparent;color:var(--green)}
#thread-status::before{content:'';position:absolute;width:20px;height:20px;border:1px solid #c7c7cf;border-radius:50%;background:#fff}#thread-status svg{position:relative;width:14px;height:14px;opacity:0}#thread-status[aria-checked=true]::before{border-color:#b6d9c4;background:#edf6f0}#thread-status[aria-checked=true] svg{opacity:1}#thread-status:not(:disabled):hover::before{border-color:var(--green)}
.thread-header{gap:6px}.thread-header #feedback-details{z-index:30}#thread-dialog #feedback-details>summary{width:36px;min-width:36px;height:44px}
.voice-message{display:flex;align-items:center;gap:8px;min-width:210px;max-width:260px;padding:4px 0}.voice-message audio{display:none}.voice-play{width:40px;height:40px;min-width:40px;border-radius:50%;padding:10px;background:#d1e1e8;color:#37576a}.voice-play:hover{background:#c4d7e1}.voice-play svg{width:20px;height:20px}.voice-body{flex:1;min-width:0}.voice-track{position:relative;height:32px}.voice-wave{display:flex;align-items:center;justify-content:space-between;gap:2px;height:32px;pointer-events:none}.voice-wave i{display:block;flex:1;min-width:1px;max-width:4px;border-radius:3px;background:#acbac2}.voice-wave i.played{background:#436579}
.voice-seek{position:absolute;inset:-6px 0;width:100%;height:44px;margin:0;opacity:0;cursor:pointer}.voice-track:focus-within{outline:2px solid var(--kk-brand);outline-offset:2px;border-radius:4px}.voice-time{display:block;font-size:10px;color:#647680;font-variant-numeric:tabular-nums;line-height:14px}.voice-error{font-size:10px;color:#ad2042;white-space:normal}.voice-download{width:28px;min-width:28px;height:40px;padding:5px;color:#72838d}.voice-download svg{width:16px;height:16px}
@media(max-width:380px){.thread-header{gap:2px}.voice-message{min-width:190px}.voice-download{width:24px;min-width:24px}}

/* Keep playback controls on one row and align the composer on its centre line. */
.voice-message{padding:0;gap:8px}.voice-time{flex:none;min-width:29px;text-align:right;font-size:11px;line-height:32px}.voice-body{position:relative}.voice-error:not([hidden]){display:block;margin-top:4px}.chat-media:has(.voice-message){margin:2px 0}
#thread-dialog .message-input-row{align-items:center}#thread-dialog #attach,#thread-dialog .composer-action{width:44px;height:44px;min-width:44px;align-self:center}
#thread-dialog #comment-text{line-height:22px;padding:11px 5px;min-height:44px;margin:0}
.activity-collection{font-size:12px;font-weight:500;color:#516674}.activity-context{font-size:11px}
#copy-conversation{display:flex;width:100%;justify-content:flex-start;font-size:12px;min-height:40px}
.chat-menu-panel{max-width:260px}.chat-menu-panel button{white-space:normal;text-align:left;overflow-wrap:anywhere}

#install-app{display:flex;min-height:44px;align-items:center;margin-top:10px;font-size:13px}#install-status{line-height:1.5;margin:4px 0 12px}.composer-options>label:first-child{margin-top:0!important}.chat-menu-panel{padding:6px}.chat-menu-panel button{min-height:40px;padding:8px 10px}.composer-options{padding:12px}

#cloud-dialog #install-app,#cloud-dialog #help{min-height:44px;margin:0;padding:10px;display:flex;align-items:center;font-size:13px}#cloud-error:empty{display:none}


.shortcut-setting{display:flex;align-items:center;gap:8px;min-height:44px;margin-top:10px;font-size:13px;cursor:pointer}.shortcut-setting input{width:16px;height:16px;margin:0}

/* Version history shares the existing review layout; comparison never stretches artwork. */
#version-controls{padding:0 18px 10px;flex:none;font-size:12px;max-width:100%}.version-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.version-actions select{font-size:12px;max-width:240px;padding:6px 9px}.version-actions button{font-size:12px;min-height:32px}#version-context{margin:6px 0 0;color:var(--muted);overflow-wrap:anywhere;max-height:60px;overflow:auto}#previous-feedback{font-size:11px;color:var(--kk-brand);padding:5px 0}#version-upload-dialog label{display:block;font-size:12px;margin:14px 0}#version-upload-dialog input,#version-note{display:block;width:100%;margin-top:6px}#version-upload-error{color:var(--error);font-size:12px}
#compare-dialog{width:1100px;max-width:calc(100vw - 24px);height:85dvh;padding:16px}#compare-dialog[open]{display:flex;flex-direction:column}#compare-dialog .dialog-head{flex:none}#compare-title{margin-right:auto}#compare-switch{display:none}.compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;min-height:0;flex:1}.compare-grid section{min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px}.compare-grid select{width:100%;font-size:12px}.compare-grid p{font-size:11px;color:var(--muted);margin:0;max-height:55px;overflow:auto}.compare-image{min-height:0;flex:1;overflow:auto;background:var(--surface-muted);border-radius:12px;display:flex;align-items:flex-start;justify-content:center}.compare-image img{display:block;width:100%;height:auto;object-fit:contain}.compare-image img:not([src]){display:none}
@media(max-width:900px){#version-controls{padding:6px 12px;background:var(--surface);border-bottom:1px solid var(--line)}.version-actions select{max-width:170px;flex:1}.version-actions button{min-height:36px;padding:6px 8px}#compare-dialog{height:100dvh;max-height:100dvh;max-width:100%;width:100%;margin:0;border-radius:0}.compare-grid{grid-template-columns:1fr}#compare-switch{display:inline-flex;font-size:12px}#compare-dialog[data-side=a] [data-side=b],#compare-dialog[data-side=b] [data-side=a]{display:none}}

/* Compact shortcut guide, anchored above the footer to stay on screen. */
#shortcut-menu{margin-right:auto}#shortcut-menu>.shortcut-panel{left:0;right:auto;bottom:calc(100% + 10px);top:auto;width:280px;max-width:calc(100vw - 28px);padding:12px;max-height:60dvh;overflow:auto;text-align:left;z-index:20}.shortcut-panel .shortcut-setting{display:flex;justify-content:space-between;gap:16px;margin:0 0 10px;min-height:30px;font-size:12px;font-weight:500}.shortcut-setting input[role=switch]{appearance:none;flex:none;width:28px;height:16px;border:0;border-radius:20px;background:#c6c8ce;padding:2px;margin:0;cursor:pointer;box-shadow:none}.shortcut-setting input[role=switch]::before{content:"";display:block;width:12px;height:12px;border-radius:50%;background:white;box-shadow:0 1px 2px #0002;transition:transform .15s}.shortcut-setting input[role=switch]:checked{background:var(--kk-brand)}.shortcut-setting input[role=switch]:checked::before{transform:translateX(12px)}.shortcut-setting input[role=switch]:focus-visible{outline:2px solid var(--kk-brand);outline-offset:3px}.shortcut-guide{display:grid;gap:9px;border-top:1px solid var(--line);padding-top:12px}.shortcut-guide>div{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;color:var(--muted)}.shortcut-guide kbd{font-family:inherit;font-size:10px;white-space:nowrap;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:4px;padding:2px 5px;color:var(--ink)}

#version-upload-dialog .version-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:166px;padding:24px 18px;border:1px dashed #cbd0db;border-radius:16px;background:var(--kk-brand-soft);text-align:center;cursor:pointer;transition:border-color .15s,background .15s}#version-upload-dialog .version-dropzone:hover,#version-upload-dialog .version-dropzone.drag-over,#version-upload-dialog .version-dropzone:focus-within{border-color:var(--kk-brand);background:color-mix(in srgb,var(--kk-brand) 10%,white)}#version-upload-dialog .version-dropzone:focus-within{outline:2px solid var(--kk-brand);outline-offset:3px}#version-upload-dialog .version-dropzone input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}#version-upload-dialog .version-dropzone svg{width:26px;height:26px;color:var(--kk-brand)}.version-dropzone strong{font-size:13px;font-weight:500;overflow-wrap:anywhere;max-width:100%}.version-dropzone span{font-size:11px;line-height:1.5;color:var(--muted)}#version-file-status{color:var(--kk-brand)}#version-upload-dialog .version-dropzone.has-file{border-style:solid}#version-upload-dialog .version-dropzone[aria-busy=true]{opacity:.6}#version-upload-error{color:#b42342}

/* Consistent inset chevrons for native select controls throughout the app. */
select:not([multiple]):not([size]){appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23777780' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px;padding-right:38px!important}
#cloud-dialog{width:440px;padding:22px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);overflow:auto}#cloud-dialog .dialog-head{margin-bottom:18px}#cloud-dialog .dialog-head strong{font-size:18px;font-weight:600}#cloud-dialog .settings-section{margin:0 0 14px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff}#cloud-dialog h3,#cloud-dialog .settings-caption{display:block;margin:0 0 10px;font-size:11px;font-weight:500;color:var(--muted)}#cloud-dialog #cloud-signed-in{display:block}#cloud-dialog .settings-account{display:flex;align-items:center;justify-content:space-between;gap:12px}#cloud-dialog .settings-account>div{min-width:0}#cloud-dialog #cloud-user{margin:0;font-size:13px;overflow-wrap:anywhere}#cloud-dialog .settings-caption{margin-bottom:4px}#cloud-dialog #sign-out{flex:none;border:1px solid var(--line);font-size:12px}#cloud-dialog .settings-row{width:100%;display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:10px 8px;white-space:normal;text-align:left;min-height:54px}#cloud-dialog .settings-row>span[data-icon]{color:var(--kk-brand)}#cloud-dialog .settings-row small{display:block;margin-top:4px;font-size:11px;font-weight:400;color:var(--muted)}#cloud-dialog .settings-chevron{margin-left:auto;font-size:22px;font-weight:400;color:var(--muted)}#cloud-dialog #maintenance{margin-bottom:0}#cloud-dialog #maintenance>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;padding:0;font-size:12px;color:var(--ink);min-height:26px}#cloud-dialog #maintenance>summary::-webkit-details-marker{display:none}#cloud-dialog #maintenance[open]>summary .settings-chevron{transform:rotate(90deg)}#cloud-dialog .settings-tools{margin-top:14px;padding-top:14px;border-top:1px solid var(--line);gap:6px}#cloud-dialog .settings-tools h3{margin:12px 0 3px}#cloud-dialog .settings-tools h3:first-child{margin-top:0}#cloud-dialog .settings-tools button{justify-content:flex-start;font-size:12px;min-height:38px;background:#f7f8fa;border:1px solid var(--line);padding:9px 10px;white-space:normal;text-align:left}#cloud-dialog .settings-tools button:hover{background:var(--kk-brand-soft)}.settings-button-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}#cloud-dialog #optimization-status:empty{display:none}#cloud-dialog #install-status{margin:4px 8px 10px;font-size:12px}#cloud-dialog #cloud-error:not(:empty){padding:10px 12px;background:#fff2f5;border-radius:10px;font-size:12px}#cloud-dialog #login-form>p{margin-top:0;color:var(--muted)}@media(max-width:480px){#cloud-dialog{padding:16px}.settings-button-pair{grid-template-columns:1fr}}

.storage-head{display:flex;align-items:center;justify-content:space-between;gap:12px}#cloud-dialog .storage-head h3{margin:0}#refresh-storage{font-size:11px;padding:4px 8px}#cloud-dialog #storage-collection{margin:8px 0;font-size:12px;font-weight:500;overflow-wrap:anywhere}#storage-meter{width:100%;height:7px;border:0;border-radius:99px;overflow:hidden;accent-color:var(--kk-brand)}#storage-meter::-webkit-progress-bar{background:#edf0f5}#storage-meter::-webkit-progress-value{background:var(--kk-brand);border-radius:99px}#cloud-dialog #storage-summary{font-size:12px;margin:8px 0 0}#cloud-dialog #storage-detail{font-size:11px;line-height:1.6;margin:6px 0 0;color:var(--muted)}
