/* เทียบสลิป: slip image + "on the slip | in the app" table */
.cmp-head{margin:-4px 0 12px}
.cmp-wrap{display:block}
.cmp-img{display:block;width:100%;border:0;padding:0;background:var(--sunken);border-radius:18px;overflow:hidden;position:relative;cursor:zoom-in;margin-bottom:12px}
.cmp-img img{display:block;width:100%;max-height:34vh;object-fit:contain;background:#fff}
.cmp-img span{position:absolute;right:10px;bottom:10px;background:rgba(0,0,0,.55);color:#fff;font-size:12px;border-radius:999px;padding:4px 10px;display:flex;gap:4px;align-items:center}
.slipsrc{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin:0 0 8px}
.slipsrc img{width:22px;height:22px}
.cmp-why{font-size:14px;margin:0 0 10px}
.cmpcard{padding:12px 12px 14px}
.cmp-title{font-weight:700;margin:0 0 8px;display:flex;gap:8px;align-items:center}
.cmp{width:100%;border-collapse:collapse;font-size:14px;margin-bottom:10px;table-layout:fixed}
.cmp th,.cmp td{padding:7px 6px;border-bottom:1px solid var(--border);vertical-align:top;text-align:left;overflow-wrap:anywhere}
.cmp thead th{font-size:12px;color:var(--muted);font-weight:600}
.cmp tbody th{width:28%;color:var(--muted);font-weight:500}
.cmp td:last-child,.cmp th:last-child{width:34px;text-align:center}
.cmp.read td:last-child{width:auto;text-align:left}
.cmp small{display:block;font-size:12px;color:var(--muted)}
.cmp small.src{margin-top:2px}
.cmp .mono{font-size:12px}
.cm{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:999px;font-weight:800;font-size:14px}
.cm.ok{background:color-mix(in srgb,var(--income) 18%,transparent);color:var(--income)}
.cm.near{background:color-mix(in srgb,var(--caution) 20%,transparent);color:var(--caution)}
.cm.diff{background:color-mix(in srgb,var(--deficit) 18%,transparent);color:var(--deficit)}
.cm.na{color:var(--muted)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.cmp-acts{display:flex;flex-direction:column;gap:10px;margin:6px 0 20px}
.cmp-acts .btn,.cmpcard .btn{display:flex;align-items:center;justify-content:center;gap:8px}
/* wide screens: image on the left, comparison on the right */
@media (min-width:900px){
  .cmp-wrap{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:20px;align-items:start}
  .cmp-img{position:sticky;top:8px}
  .cmp-img img{max-height:72vh}
}
