/* Shared compact layout for calculator, image and voice tools. */
.compact-tool {height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#f6f8fb;color:#263449;font-size:13px}
.compact-tool *, .compact-tool *::before, .compact-tool *::after {box-sizing:border-box}
.compact-tool .airtool-header {box-shadow:none}
.compact-tool .airtool-header .airtool-header-inner {max-width:none;padding:6px 16px;min-height:44px;gap:12px;flex-wrap:nowrap}
.compact-tool .airtool-header .airtool-brand {gap:8px;flex:none}
.compact-tool .airtool-header .airtool-brand img {width:28px;height:28px;border-radius:6px}
.compact-tool .airtool-header .airtool-brand strong {font-size:14px}
.compact-tool .airtool-header .airtool-brand small {display:none}
.compact-tool .airtool-header .airtool-nav {flex-wrap:nowrap;min-width:0;overflow-x:auto}
.compact-tool .airtool-header .airtool-nav a {padding:4px 9px;font-size:12px;white-space:nowrap}
.compact-tool .tool-intro {flex:none;display:flex;align-items:center;justify-content:space-between;gap:20px;margin:8px 12px;padding:10px 16px;border-radius:10px;background:linear-gradient(105deg,#14233d 0%,#1c477e 65%,#2c72e5 100%);color:#fff}
.compact-tool .tool-intro-copy {min-width:0}
.compact-tool .tool-intro h1,.compact-tool .tool-intro h2 {margin:0;color:inherit;font-size:16px;font-weight:650;line-height:1.4}
.compact-tool .tool-intro p {margin:3px 0 0;color:#d6e3f7;font-size:12px;line-height:1.5}
.compact-tool .tool-intro-features {display:flex;flex:none;gap:7px;list-style:none;margin:0;padding:0}
.compact-tool .tool-intro-features li {padding:4px 9px;border:1px solid #ffffff40;border-radius:20px;color:#eaf2ff;font-size:11px;line-height:1.5;white-space:nowrap;background:#ffffff0a}
body:has(.compact-tool) .airtool-site-version,body.compact-tool .airtool-site-version {bottom:1px;right:10px;min-height:14px;padding:0 5px;font-size:9px;box-shadow:none;pointer-events:none}
.compact-tool .main {flex:1;min-height:0;padding:0;display:flex}
.compact-tool .main>.container {flex:1;max-width:none;margin:0;padding:0;min-height:0;min-width:0}
.compact-tool .content-grid,.compact-tool .image-tool-grid {height:100%;display:grid;grid-template-columns:430px minmax(0,1fr);gap:0;align-items:stretch;min-height:0}
.compact-tool .image-tool-grid {grid-template-columns:300px minmax(0,1fr)}
.compact-tool .card {padding:0;margin:0;border:0;border-radius:0;box-shadow:none;min-height:0;min-width:0}
.compact-tool .card h2 {font-size:14px;font-weight:600;margin:0}
.compact-tool .card h3 {font-size:12px;font-weight:600;margin:0 0 8px}
.compact-tool .card-header,.compact-tool .tool-panel-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:50px;padding:10px 16px;border-bottom:1px solid #e4e9f1;margin:0;flex:none}
.compact-tool .btn {font-size:12px;padding:7px 11px;line-height:1.4;min-height:30px;border-radius:6px;box-shadow:none;gap:5px;white-space:nowrap}
.compact-tool .btn:hover {transform:none;box-shadow:none}
.compact-tool .btn-icon {display:none}
.compact-tool input,.compact-tool textarea {font-size:12px;border-radius:6px}
.compact-tool .empty-state {padding:60px 18px;font-size:13px;color:#91a0b5}
.compact-tool .empty-icon {font-size:28px;margin-bottom:14px;opacity:.65}
.compact-tool .upload-area {border:1px dashed #bacbea;border-radius:8px;padding:16px 10px;background:white}
.compact-tool .upload-area:hover {background:#f1f6ff}
.compact-tool .upload-text {font-size:13px;font-weight:500;margin:0 0 3px}
.compact-tool .upload-hint {font-size:11px;margin:0 0 10px;color:#8c99ac}
.compact-tool .upload-content {gap:0}
.compact-tool summary {cursor:pointer;list-style:none;font-size:12px;color:#637692;user-select:none}
.compact-tool summary::-webkit-details-marker {display:none}
.compact-tool summary::after {content:'⌄';float:right;margin-left:12px;color:#8b9bb0}
.compact-tool details[open]>summary::after {content:'⌃'}
.compact-tool .tool-help {position:relative}
.compact-tool .tool-help>div {position:absolute;right:0;top:30px;width:280px;max-width:80vw;padding:14px;background:white;z-index:8;box-shadow:0 8px 32px #2138581f;border:1px solid #e3e9f1;border-radius:8px;font-size:12px;line-height:1.8}
.ccm-tool .data-input-section {min-width:0;min-height:0;border-right:1px solid #e3e9f1}
.ccm-tool .data-input-section>.card {height:100%;display:flex;flex-direction:column;background:#f7f9fc}
.ccm-tool .ccm-input-scroll {flex:1;min-height:0;overflow:auto;padding:14px}
.ccm-tool .input-section {padding:0;margin:0 0 18px;border:0}
.ccm-tool .input-form {display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ccm-tool .input-group {margin:0;min-width:0}
.ccm-tool .input-group label {font-size:11px;margin-bottom:4px}
.ccm-tool .input-group input {padding:8px;min-width:0;width:100%}
.ccm-tool .input-form>#addDataBtn {grid-column:1/-1}
.ccm-tool .data-section {margin:12px 0 0;padding:0;border:0;background:none}
.ccm-tool .data-section-header-with-inputs {display:block;margin-bottom:8px}
.ccm-tool .inline-inputs {display:flex;gap:6px;width:100%;flex-wrap:nowrap}
.ccm-tool .inline-inputs input {flex:1;width:0;min-width:0;padding:7px 6px;font-size:11px}
.ccm-tool .inline-inputs button {flex:none;width:auto}
.ccm-tool .table-container {max-height:none;margin:0;overflow:auto;border-radius:6px;background:white}
.ccm-tool .data-table {font-size:11px;min-width:380px}
.ccm-tool .data-table th,.ccm-tool .data-table td {padding:7px 5px;white-space:normal}
.ccm-tool .data-table th {font-size:10px;background:#eef3fa}
.ccm-tool .data-table .btn {padding:3px 5px;min-height:24px;font-size:10px}
.ccm-tool .calculate-section {padding:12px 14px 18px;border-top:1px solid #e3e9f1;margin:0;background:#f7f9fc;flex:none}
.ccm-tool .fitting-method-inline {display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:0;margin:0 0 8px;border:0;background:none}
.ccm-tool .fitting-label,.ccm-tool .checkbox-inline {font-size:11px}
.ccm-tool .btn-calculate {width:100%;padding:9px;font-size:13px;background:#2861e7}
.ccm-tool .message {margin-top:7px;padding:6px 8px;font-size:11px}
.ccm-tool .image-preview {margin-top:8px;padding:8px}
.ccm-tool .image-container {max-height:160px;overflow:auto}
.ccm-tool .image-container img {max-height:150px;object-fit:contain;width:100%}
.ccm-tool .preview-header {gap:6px;flex-wrap:wrap}
.ccm-tool .preview-header h4 {font-size:12px}
.ccm-tool .extract-controls {margin-top:8px;gap:6px}
.ccm-tool .results-section {min-width:0;min-height:0;background:white}
.ccm-tool .results-section>.card {display:flex;flex-direction:column;height:100%}
.ccm-tool #resultsContent {padding:18px 24px 24px;overflow:auto;flex:1;min-height:0;display:flex!important;flex-direction:column;align-items:stretch;gap:14px}
.ccm-tool #resultsContent>.confidence-badge {align-self:flex-start;font-size:11px;padding:4px 8px;margin:0;order:0}
.ccm-tool .result-grid {display:block;order:1;margin:0}
.ccm-tool .result-card {padding:14px 18px;text-align:left;background:#f1f6ff;border:1px solid #dce7fa;border-radius:8px;box-shadow:none}
.ccm-tool .result-label {justify-content:flex-start;font-size:12px;gap:4px;margin:0 0 4px}
.ccm-tool .result-label>span:first-child {display:none}
.ccm-tool .result-value {font-size:32px;line-height:1.25;margin:0;color:#245fc8}
.ccm-tool .chart-section {order:2;margin:0;padding:0;border:0}
.ccm-tool .chart-section h3 {font-size:13px;margin-bottom:8px}
.ccm-tool .ccm-markers-control {padding:8px 10px;background:#f8fafc;border:1px solid #e7edf4;border-radius:6px;margin-bottom:10px}
.ccm-tool #ccmMarkersContainer {padding-top:8px;gap:6px!important}
.ccm-tool #ccmMarkersContainer label,.ccm-tool #ccmMarkersContainer input,.ccm-tool #ccmMarkersContainer button {font-size:11px!important}
.ccm-tool .chart-container {padding:8px;border:1px solid #e7edf4;border-radius:8px;background:white}
.ccm-tool .ccm-chart {display:block;width:100%;height:auto;max-height:480px}
.ccm-tool .tech-details {order:3;margin:0;padding:10px 12px;background:#f8fafc;border:1px solid #e7edf4;border-radius:6px}
.ccm-tool .tech-grid {font-size:12px;margin-top:10px;gap:18px}
.ccm-tool .tech-item {padding:5px 0;font-size:12px}
.ccm-tool .equation-content {font-size:12px}
.image-page .image-controls {display:flex;flex-direction:column;background:#f7f9fc;border-right:1px solid #e3e9f1}
.image-page .image-controls-content {overflow:auto;padding:14px;min-height:0;flex:1}
.image-page .mode-section {margin-top:20px;padding:0;border:0}
.image-page .mode-section h2 {font-size:12px;margin-bottom:10px}
.image-page .mode-options {gap:7px}
.image-page .mode-option {padding:10px;gap:8px;border-radius:7px}
.image-page .mode-icon {font-size:18px}
.image-page .mode-option strong {font-size:12px}
.image-page .mode-option small {font-size:10px;margin-top:3px}
.image-page .mode-check {font-size:12px}
.image-page .image-results {display:flex;flex-direction:column;overflow:hidden}
.image-page .result-actions {display:flex;gap:6px;flex-wrap:wrap;margin:0;padding:0;border:0}
.image-page .result-actions[hidden] {display:none}
.image-page .result-actions .btn {width:auto;font-size:11px;padding:5px 8px;min-height:28px}
.image-page .result-panel {flex:1;min-height:0;gap:0;overflow:hidden}
.image-page .result-panel[hidden] {display:none}
.image-page .batch-summary {margin:0;padding:8px 16px;border-radius:0;font-size:11px;background:#f7f9fc;border-bottom:1px solid #e9edf3;color:#7989a0}
.image-page .batch-gallery {flex:1;min-height:0;max-height:none;overflow:auto;padding:16px;gap:14px;grid-template-columns:repeat(auto-fit,minmax(min(100%,480px),1fr));grid-auto-rows:max-content;align-content:start;align-items:start}
.image-page .batch-item {padding:10px;border-radius:8px;background:#fafbfd;overflow:hidden}
.image-page .batch-item h3 {font-size:12px;margin:0 0 8px}
.image-page .batch-preview {padding:0}
.image-page .batch-compare {align-items:flex-start}
.image-page .preview-arrow {align-self:center}
.image-page .batch-preview img {height:auto;max-height:clamp(240px,45vh,440px);object-fit:contain;object-position:center top}
.image-page .batch-preview h4 {font-size:10px;padding:5px}
.image-page .preview-tip {display:none}
.image-page .result-info {margin:0;padding:7px 16px 18px;font-size:11px;color:#91a0b4;border-top:1px solid #edf0f5;line-height:1.5}
.image-page .tool-status {margin:10px 0;padding:8px;font-size:11px;overflow-wrap:anywhere}
@media(max-width:1150px) {
  .compact-tool .content-grid {grid-template-columns:380px minmax(0,1fr)}
  .compact-tool .image-tool-grid {grid-template-columns:260px minmax(0,1fr)}
  .image-page .tool-panel-heading {flex-wrap:wrap;gap:8px}
  .ccm-tool #resultsContent {padding:16px}
}
@media(max-width:760px) {
  .compact-tool .tool-intro {margin:6px 8px;padding:10px 12px;gap:8px}
  .compact-tool .tool-intro h1,.compact-tool .tool-intro h2 {font-size:14px}
  .compact-tool .tool-intro p {font-size:11px}
  .compact-tool .tool-intro-features {display:none}
  .compact-tool {height:auto;min-height:100dvh;overflow:visible}
  .compact-tool .airtool-header .airtool-header-inner {padding:5px 10px;gap:8px;min-height:39px}
  .compact-tool .airtool-header .airtool-brand strong {display:none}
  .compact-tool .airtool-header .airtool-brand img {width:24px;height:24px}
  .compact-tool .airtool-header .airtool-nav {width:auto;gap:0}
  .compact-tool .airtool-header .airtool-nav a {font-size:11px;padding:4px 6px}
  .compact-tool .content-grid,.compact-tool .image-tool-grid {display:flex;flex-direction:column;height:auto}
  .compact-tool .main,.compact-tool .main>.container {display:block}
  .ccm-tool .data-input-section {border:0;border-bottom:1px solid #e3e9f1}
  .ccm-tool .data-input-section>.card,.ccm-tool .results-section>.card {height:auto}
  .ccm-tool .ccm-input-scroll {overflow:visible}
  .ccm-tool #resultsContent {min-height:300px;overflow:visible}
  .ccm-tool .ccm-chart {max-height:none}
  .ccm-tool .chart-container {padding:2px}
  .ccm-tool .input-form {grid-template-columns:1fr 1fr}
  .compact-tool .card-header,.compact-tool .tool-panel-heading {min-height:44px;padding:9px 12px;flex-direction:row}
  .image-page .image-controls-content {padding:12px}
  .image-page .upload-area {padding:10px}
  .image-page .upload-content {display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
  .image-page .upload-hint {margin:0}
  .image-page .mode-section {margin-top:12px}
  .image-page .mode-options {display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}
  .image-page .mode-option {display:flex;flex-direction:column;align-items:flex-start;padding:8px;gap:4px;position:relative}
  .image-page .mode-option strong {font-size:11px}
  .image-page .mode-icon {display:none}
  .image-page .mode-option small {font-size:10px;line-height:1.5}
  .image-page .mode-check {position:absolute;right:4px;top:2px}
  .image-page .result-panel {overflow:visible;display:block}
  .image-page .batch-gallery {display:grid;grid-template-columns:1fr;overflow:visible;padding:10px}
  .image-page .batch-compare {display:flex;flex-direction:row;gap:5px}
  .image-page .preview-arrow {transform:none}
  .image-page .batch-preview {width:0;flex:1}
  .image-page .batch-preview img {max-height:220px}
  .image-page .result-actions {gap:4px}
  .image-page .result-actions .btn {font-size:10px;padding:5px 6px}
}
