
.tool-detail .thead h1 { font-size:clamp(22px,2.5vw,30px);line-height:1.25; }
.tool-detail .thead { margin:14px 0; }
.tool-detail .workspace { padding:18px; }
.tool-detail .btn { padding:9px 14px;min-height:38px;font-size:13px; }
.tool-detail .input,.tool-detail .select { min-height:38px;padding:8px 10px;font-size:14px; }
.tool-detail .field label { font-size:12px; }
.tool-detail[data-tool="son-soz"] .nw-row,.tool-detail[data-tool="color-converter"] .nw-row { padding:8px; }
.tool-detail[data-tool="color-converter"] .cc-swatch { max-height:220px; }
.tool-detail[data-tool="color-converter"] .cc-shades,.tool-detail[data-tool="color-converter"] .cc-contrast { max-height:90px;overflow:auto; }
.tool-detail[data-tool="password-generator"] #list { max-height:25dvh;overflow:auto; }
.tool-detail[data-tool="qr-generator"] .preview { min-height:180px; }
.tool-detail[data-tool="qr-generator"] canvas,.tool-detail[data-tool="qr-generator"] .preview svg { max-width:220px;max-height:220px; }
.tool-detail[data-tool="bg-remove"] .preview { min-height:160px;max-height:35dvh;overflow:hidden; }
.tool-detail[data-tool="bg-remove"] .preview img,.tool-detail[data-tool="bg-remove"] canvas { max-height:30dvh;width:auto;max-width:100%;object-fit:contain; }
.tool-detail[data-tool="foto-3x4"] #fxCanvas { max-height:38dvh;width:auto;max-width:100%; }
.tool-detail[data-tool="foto-3x4"] .fx-stage { text-align:center; }
.tool-detail[data-tool="ovozdan-matn"] .stt-opts { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.tool-detail[data-tool="ovozdan-matn"] #sttScript { margin-left:auto; }
.tool-detail[data-tool="ocr"] .cv-opts .field { margin:0; }
.tool-detail[data-tool="ocr"] .check { display:inline-flex;margin-right:12px;font-size:12px; }
.tool-detail[data-tool="ielts-kalkulyator"] #ieRoot { display:grid;grid-template-columns:1fr 320px;gap:12px; }
.tool-detail[data-tool="ielts-kalkulyator"] #ieTab { grid-column:1 / -1; }
.tool-detail[data-tool="ielts-kalkulyator"] #ieRes { grid-column:2;grid-row:2 / span 3;margin:0; }
.tool-detail[data-tool="ielts-kalkulyator"] .calc-res > :first-child { font-size:24px; }
.tool-detail[data-tool="ielts-kalkulyator"] .calc-res > :not(:first-child) { font-size:12px;padding:6px; }
.tool-detail[data-tool="ielts-kalkulyator"] .fields--ie { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tool-detail[data-tool="imlo-tekshirish"] #doc { white-space:pre-wrap;min-height:160px;max-height:45dvh;overflow:auto; }
.tool-detail[data-tool="imlo-tekshirish"] #doc mark { background:transparent;text-decoration:underline wavy #df2929;text-underline-offset:3px; }
.tool-detail[data-tool="imlo-tekshirish"].imlo-result #src { display:none; }
.tool-detail[data-tool="imlo-tekshirish"].imlo-result label[for="src"] { display:none; }
.tool-detail[data-tool="imlo-tekshirish"] .imlo-list { max-height:40dvh;overflow:auto; }
 .imlo-loading { display:none; }
 .imlo-checking .imlo-loading { position:fixed;inset:64px 0 130px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:rgba(251,251,249,.97);z-index:60;font-size:18px;font-weight:600; }
 .imlo-loading::before { content:"";width:42px;height:42px;border:4px solid #e3ebe4;border-top-color:#3f6b47;border-radius:50%;animation:imlo-spin .8s linear infinite; }
 @keyframes imlo-spin { to { transform:rotate(360deg); } }
 @media(prefers-reduced-motion:reduce){ .imlo-loading::before { animation:none; } }

.pdf-work-editor .pn-prev { overflow:auto;display:grid;place-items:center;min-height:0; }
.pdf-work-editor .pn-page { width:min(100%,320px);min-height:220px;max-height:45dvh; }
.pdf-work-panel .pn-wrap { display:block; }
.pdf-work-options .pn-opts { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
.pdf-work-options .pn-opts .fields { grid-column:1 / -1; }
.home-compact { padding-top:24px;padding-bottom:12px; }
.home-compact h1 { font-size:clamp(24px,3vw,38px); }
.home-compact .hero__sub { font-size:14px;max-width:740px;margin:8px auto 14px; }
.catalog-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
.catalog-grid .tool-card { padding:16px; }
@media(max-width:879px){
 .tool-detail .workspace { padding:10px; }
 .tool-detail .thead h1 { font-size:20px; }
 .tool-detail .btn { min-height:36px;padding:8px 10px;font-size:12px; }
 .tool-detail[data-tool="ielts-kalkulyator"] #ieRoot { grid-template-columns:1fr; }
 .tool-detail[data-tool="ielts-kalkulyator"] #ieRes { grid-column:1;grid-row:auto; }
 .tool-detail[data-tool="ovozdan-matn"] .stt-opts { flex-wrap:wrap; }
 .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px; }
 .catalog-grid .tool-card { padding:12px;min-width:0; }
 .pdf-work-editor .pn-page { width:140px;min-height:140px;max-height:22dvh; }
 .home-compact { padding-top:14px; }
}

.word-merge-layout { display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px; }
.word-merge-layout #cvList { display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));align-content:start;gap:10px; }
.word-merge-layout .fitem { flex-direction:column;min-width:0; }
.word-merge-panel { display:flex;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--line);border-radius:12px; }
.word-merge-panel #cvBar { flex-direction:column;flex-wrap:nowrap;margin-top:auto; }
.word-merge-panel #cvGo { width:100%;min-height:64px;font-size:20px; }
.tool-detail[data-tool="word-birlashtirish"].document-active .workspace { max-height:none; }
.tool-detail[data-tool="ocr"] .cv-opts { display:flex;flex-wrap:wrap;gap:12px; }
.tool-detail[data-tool="color-converter"] .cc { grid-template-columns:160px 1fr; }
.tool-detail[data-tool="hash-generator"] .nw-row { padding:8px; }
.tool-detail[data-tool="qr-generator"] #qrCreate .preview { min-height:180px;padding:10px; }
.tool-detail[data-tool="foto-3x4"] #opts { display:grid;grid-template-columns:1fr 1fr;gap:12px; }
.tool-detail[data-tool="foto-3x4"] #fxSizeNote { display:none; }
.tool-detail[data-tool="bg-remove"] .cmp__box,.tool-detail[data-tool="bg-remove"] .preview { height:240px; }
.tool-detail[data-tool="son-soz"] .nw-row { min-height:40px; }
@media(max-width:879px){ .word-merge-layout { display:flex;flex-direction:column; } .word-merge-panel { padding:8px; } .tool-detail[data-tool="color-converter"] .cc { grid-template-columns:1fr; } .tool-detail[data-tool="bg-remove"] .cmp__box,.tool-detail[data-tool="bg-remove"] .preview { height:150px; } }
.pdf-work-panel { overflow:hidden; } .pdf-work-panel h2 { flex:0 0 auto;font-size:20px; } .pdf-work-panel .pdf-work-options { flex:1;min-height:0;overflow:auto; } .pdf-work-panel .pdf-work-action { flex:0 0 auto;margin:0; } .pdf-work-panel .pn-opts > .check { grid-column:1 / -1; } @media(max-width:879px){ .pdf-work-panel .pdf-work-options { flex:0 0 auto;max-height:35%; } }
.tool-detail[data-tool="ielts-kalkulyator"] #ieRes > :not(:first-child) { display:none; } .tool-detail[data-tool="ielts-kalkulyator"] #ieRes > :first-child { padding:24px;display:flex;flex-direction:column;align-items:center;gap:12px; } .tool-detail[data-tool="ielts-kalkulyator"] #ieRes > :first-child b,.tool-detail[data-tool="ielts-kalkulyator"] #ieRes > :first-child strong { font-size:64px; } .tool-detail[data-tool="hash-generator"] .textarea { min-height:100px; } .tool-detail[data-tool="son-soz"] #num { min-height:42px !important;font-size:18px !important; }

.home-compact .pills { flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;max-width:100%;padding-bottom:6px; }
.home-compact .pill { flex:0 0 auto; }
.tool-detail[data-tool="word-birlashtirish"].document-active #drop { min-height:0;padding:6px;margin:0 auto 10px;border:0; }
.tool-detail[data-tool="word-birlashtirish"].document-active #drop .drop__hint,.tool-detail[data-tool="word-birlashtirish"].document-active #drop .drop__pro { display:none; }
@media(max-width:879px){ .word-merge-layout #cvList { grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; } .word-merge-layout .fitem { padding:6px;gap:4px; } .word-merge-layout .fitem__acts { gap:2px; } .word-merge-layout .icon-btn { width:24px;height:28px;min-width:0; } }

/* Photo editor: centered canvas and one compact settings panel. */
.tool-detail.photo-work-active { position:fixed;inset:64px 0 130px;width:100%;max-width:none;padding:0 20px;box-sizing:border-box;display:flex;flex-direction:column; }
.photo-work-active .thead { display:none; }
.tool-detail.photo-work-active .document-stage { min-height:0;height:100%;padding:0; }
.photo-work-active .tool-workspace-stage { display:flex;flex:1;min-height:0; }
.tool-detail.photo-work-active .workspace { width:100%;padding:12px 0;max-height:none;border:0;box-shadow:none;background:transparent;overflow:hidden; }
.photo-work-active #fxRoot,.photo-work-active #work { height:100%;min-height:0; }
.photo-work-active #fxEdit { height:100%;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:stretch; }
.photo-work-active .fx-stage { display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;min-width:0; }
.tool-detail.photo-work-active #fxCanvas { width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 280px);object-fit:contain;touch-action:none; }
.photo-work-active .fx-stage p { max-width:460px;text-align:center;font-size:12px; }
.photo-work-active .fx-side { display:flex;flex-direction:column;gap:9px;min-height:0;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:auto; }
.photo-work-active #fxOpts { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
.photo-work-active .field { margin:0; }
.photo-work-active .fx-side input[type=range] { width:100%; }
.photo-work-active .fx-side .check { padding:6px;font-size:12px; }
.photo-work-active .fx-dl { display:grid;gap:6px;margin-top:auto; }
.photo-work-active #fxOne { min-height:50px;font-size:16px; }
.photo-work-active #fxInfo { margin:0;font-size:11px; }
.photo-work-active #fxRoot > p.muted { display:none; }
.photo-work-active .document-stage > .ad { position:fixed;bottom:0;left:20px;right:20px;height:120px;margin:0;overflow:hidden; }
@media(max-width:879px){
 .tool-detail.photo-work-active { padding:0 10px; }
 .tool-detail.photo-work-active .workspace { padding:4px 0; }
 .photo-work-active #fxEdit { grid-template-columns:minmax(0,1fr) minmax(155px,48%);gap:8px; }
 .photo-work-active .fx-side { padding:8px;gap:6px;border-radius:10px; }
 .photo-work-active #fxOpts { grid-template-columns:1fr;gap:4px; }
 .photo-work-active .fx-stage p { display:none; }
 .photo-work-active .fx-side .btn { padding:6px;font-size:11px;min-height:32px;white-space:normal; }
 .photo-work-active .fx-side .field label { font-size:11px; }
 .photo-work-active #fxOne { min-height:44px;font-size:13px; }
 .tool-detail.photo-work-active #fxCanvas { max-height:calc(100dvh - 225px); }
}

/* Compact photo actions leave room for the entire editing panel. */
.tool-detail.photo-work-active .fx-side { gap:8px;padding:14px; }
.photo-work-active .fx-adjustments,.photo-work-active .fx-quick-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
.tool-detail.photo-work-active .fx-dl { grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
.tool-detail.photo-work-active .fx-side .btn { min-height:38px;padding:8px 6px;font-size:12px;white-space:normal; }
.tool-detail.photo-work-active #fxOne { min-height:38px;font-size:13px; }
.photo-work-active #work:has(#fxEdit[hidden]) { display:grid;place-content:center;gap:16px; }
.photo-work-active #progress { width:min(360px,80vw);margin:auto;text-align:center; }
.photo-work-active #progress::before { content:"";display:block;width:42px;height:42px;margin:0 auto 22px;border:4px solid #e3ebe4;border-top-color:var(--brand);border-radius:50%;animation:imlo-spin .8s linear infinite; }
.photo-work-active #progress .progress__track { height:6px; }
.photo-work-active #progress .progress__lbl { margin-top:12px;font-size:14px; }
@media(max-width:879px){
 .tool-detail.photo-work-active .fx-side { padding:8px;gap:6px; }
 .photo-work-active .fx-adjustments { grid-template-columns:1fr;gap:4px; }
 .tool-detail.photo-work-active .fx-dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .tool-detail.photo-work-active #fxOne { grid-column:1 / -1; }
 .tool-detail.photo-work-active .fx-side .btn { min-height:32px;font-size:10px;padding:5px 3px; }
}
@media(prefers-reduced-motion:reduce){ .photo-work-active #progress::before { animation:none; } }

/* Mobile photo editing follows a vertical preview → controls flow. */
@media(max-width:879px){
 .tool-detail.photo-work-active #fxEdit { display:flex;flex-direction:column;gap:8px; }
 .tool-detail.photo-work-active .fx-stage { flex:1 1 auto;min-height:90px; }
 .tool-detail.photo-work-active #fxCanvas { max-height:min(26dvh,200px);max-width:100%;width:auto;height:auto; }
 .tool-detail.photo-work-active .fx-side { flex:0 0 auto;overflow:visible;padding:8px;gap:6px; }
 .tool-detail.photo-work-active #fxOpts,.tool-detail.photo-work-active .fx-adjustments { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
 .tool-detail.photo-work-active .fx-side .field label { font-size:10px;line-height:1.2;margin-bottom:3px; }
 .tool-detail.photo-work-active .fx-side .select { min-height:30px;padding:5px 7px;font-size:12px; }
 .tool-detail.photo-work-active .fx-side input[type=range] { margin:2px 0;height:16px; }
 .tool-detail.photo-work-active .fx-side .check { padding:3px;font-size:11px;min-height:24px; }
 .tool-detail.photo-work-active .fx-dl { grid-template-columns:repeat(3,minmax(0,1fr));margin-top:0; }
 .tool-detail.photo-work-active #fxOne { grid-column:auto;min-height:36px;font-size:12px; }
 .tool-detail.photo-work-active .fx-side .btn { font-size:11px;min-height:32px; }
 .tool-detail.photo-work-active #fxInfo { font-size:10px;line-height:1.2; }
}
@media(max-width:879px) and (max-height:600px){
 .tool-detail.photo-work-active #fxCanvas { max-height:18dvh; }
 .tool-detail.photo-work-active .workspace { overflow:auto; }
}

/* Two-column mobile cards need their text below the icon, at full width. */
@media(max-width:879px){
 body:not(.is-pro) .catalog-grid .tool-card { display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:auto auto auto;align-content:start;gap:10px 6px;padding:12px;min-height:180px; }
 body:not(.is-pro) .catalog-grid .tool-card .ico { grid-column:1;grid-row:1;width:44px;height:44px; }
 body:not(.is-pro) .catalog-grid .tool-card .favorite-toggle { grid-column:2;grid-row:1;width:44px;height:44px;position:relative;z-index:2; }
 body:not(.is-pro) .catalog-grid .tool-card__body { grid-column:1 / -1;grid-row:2;width:100%;min-width:0; }
 body:not(.is-pro) .catalog-grid .tool-card h3 { font-size:14px;line-height:1.35;overflow-wrap:normal;word-break:normal;hyphens:none;margin:0; }
 body:not(.is-pro) .catalog-grid .tool-card p { font-size:12px;line-height:1.4;margin-top:5px;-webkit-line-clamp:2; }
 body:not(.is-pro) .catalog-grid .tool-card .card__tag { grid-column:1 / -1;grid-row:3;margin:0;max-width:100%; }
 body:not(.is-pro) .wrap > .pills { flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start; }
 body:not(.is-pro) .wrap > .pills .pill { flex:0 0 auto; }
}

.photo-work-active #fxSheetPreview { width:auto;max-width:100%;height:75px;align-self:center;border:1px solid var(--line);border-radius:4px; }
.photo-work-active #fxSheetInfo { margin:0;font-size:11px;text-align:center; }
@media(max-width:879px){ .photo-work-active #fxSheetPreview { height:44px; } .photo-work-active #fxSheetInfo { font-size:10px; } }

.photo-work-active .fx-print-settings { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 8px;align-items:center; }
.photo-work-active #fxSheetInfo { grid-column:1 / -1; }
@media(max-width:879px){ .tool-detail.photo-work-active #fxCanvas { max-height:clamp(70px,calc(100dvh - 540px),180px); } }
