/* Camera comparison block (inc/camera-compare.php) — design C "Tabbed card". */
.ls-cam {
    --ls-cam-blue: #0b5fd8;
    --ls-cam-purple: #6d28d9;
    --ls-cam-ink: #0b2545;
    --ls-cam-muted: #4a5d7a;
    --ls-cam-line: #dbe7f8;
    margin: 28px 0;
    background: #fff;
    border: 1px solid var(--ls-cam-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(7, 29, 51, .06);
    color: var(--ls-cam-ink);
}
.ls-cam-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 14px 16px 0; }
.ls-cam .ls-cam-title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 800; color: var(--ls-cam-ink); }
.ls-cam-vs { font-size: 13px; line-height: 1.4; color: var(--ls-cam-muted); font-weight: 600; }
.ls-cam-vs a { color: inherit; text-decoration: none; }
.ls-cam-vs a:hover { color: var(--ls-cam-blue); text-decoration: underline; }
.ls-cam-vs i { display: inline-block; margin: 0 6px; padding: 2px 7px; border-radius: 999px; background: linear-gradient(135deg, var(--ls-cam-blue), var(--ls-cam-purple)); color: #fff; font-style: normal; font-size: 11px; font-weight: 900; }

/* Tabs */
.ls-cam-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ls-cam-tabs::-webkit-scrollbar { display: none; }
.ls-cam .ls-cam-tab {
    flex: 0 0 auto; min-height: 0; margin: 0; padding: 7px 14px; border: 1px solid var(--ls-cam-line); border-radius: 999px;
    background: #f6f9fe; color: var(--ls-cam-muted); font: inherit; font-size: 13px; font-weight: 700; line-height: 1.3; cursor: pointer; box-shadow: none;
}
.ls-cam .ls-cam-tab:hover { border-color: var(--ls-cam-blue); color: var(--ls-cam-blue); background: #eef4fd; }
.ls-cam .ls-cam-tab.is-on { background: var(--ls-cam-blue); border-color: var(--ls-cam-blue); color: #fff; }
.ls-cam .ls-cam-tab:focus-visible { outline: 2px solid var(--ls-cam-blue); outline-offset: 2px; }
.ls-cam-head + .ls-cam-panel, .ls-cam-specs + .ls-cam-panel { margin-top: 12px; }

/* Slider */
.ls-cam-panel[hidden] { display: none; }
.ls-cam-stage { --p: 50%; position: relative; aspect-ratio: var(--ls-cam-ratio, 3 / 2); background: #e8edf5; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; }
.ls-cam .ls-cam-side { position: absolute; inset: 0; margin: 0; }
.ls-cam .ls-cam-img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ls-cam .ls-cam-b { clip-path: inset(0 0 0 var(--p)); }
.ls-cam-missing { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #8b97ab; font-size: 13px; }
.ls-cam .ls-cam-lb { position: absolute; bottom: 12px; max-width: 45%; padding: 5px 10px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 800; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .15s; }
.ls-cam-a .ls-cam-lb { left: 12px; background: rgba(11, 95, 216, .9); }
.ls-cam-b .ls-cam-lb { right: 12px; background: rgba(109, 40, 217, .9); }
.ls-cam-bar { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .35); pointer-events: none; }
.ls-cam-handle {
    position: absolute; top: 50%; left: var(--p); display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; margin: -21px 0 0 -21px; border: 2px solid var(--ls-cam-blue); border-radius: 50%;
    background: #fff; color: var(--ls-cam-blue); box-shadow: 0 3px 10px rgba(0, 0, 0, .25); pointer-events: none; transition: transform .15s;
}
.ls-cam-handle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ls-cam-stage.is-drag .ls-cam-handle { transform: scale(1.1); }
.ls-cam-range { pointer-events: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent; touch-action: pan-y; }
.ls-cam-stage:has(.ls-cam-range:focus-visible) .ls-cam-handle { outline: 3px solid #ffbf47; outline-offset: 2px; }
/* Hide a label once the line covers it. */
.ls-cam-stage.hide-a .ls-cam-a .ls-cam-lb, .ls-cam-stage.hide-b .ls-cam-b .ls-cam-lb { opacity: 0; }

/* Side by side */
.ls-cam.is-side .ls-cam-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; aspect-ratio: auto; background: #fff; cursor: default; touch-action: auto; }
.ls-cam.is-side .ls-cam-side { position: relative; inset: auto; aspect-ratio: var(--ls-cam-ratio, 3 / 2); overflow: hidden; }
.ls-cam.is-side .ls-cam-b { clip-path: none; }
.ls-cam.is-side .ls-cam-bar, .ls-cam.is-side .ls-cam-handle, .ls-cam.is-side .ls-cam-range { display: none; }
.ls-cam.is-side .ls-cam-lb { opacity: 1; max-width: calc(100% - 24px); }
.ls-cam.is-side .ls-cam-b .ls-cam-lb { right: auto; left: 12px; }

/* Footer */
.ls-cam-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; font-size: 13px; line-height: 1.4; color: var(--ls-cam-muted); }
.ls-cam-cap { min-width: 0; }
.ls-cam-count { white-space: nowrap; }
.ls-cam-seg { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--ls-cam-line); border-radius: 999px; overflow: hidden; }
.ls-cam .ls-cam-mode { margin: 0; min-height: 0; padding: 6px 12px; border: 0; border-radius: 0; background: #fff; color: var(--ls-cam-muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; box-shadow: none; }
.ls-cam .ls-cam-mode.is-on { background: var(--ls-cam-ink); color: #fff; }
.ls-cam .ls-cam-mode:focus-visible { outline: 2px solid var(--ls-cam-blue); outline-offset: -2px; }

/* Spec table */
.ls-cam-specs { margin: 12px 16px 4px; border: 1px solid var(--ls-cam-line); border-radius: 12px; overflow: hidden; }
.ls-cam-specs-hd, .ls-cam-specs-row { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
.ls-cam-specs-hd { background: #eef4fd; font-size: 14px; font-weight: 800; }
.ls-cam-specs-hd > div, .ls-cam-specs-row > div { padding: 8px 10px; min-width: 0; overflow-wrap: anywhere; }
.ls-cam-specs-hd > div + div, .ls-cam-specs-row > div + div { border-left: 1px solid var(--ls-cam-line); }
.ls-cam-specs-sec { padding: 7px 10px; border-top: 1px solid var(--ls-cam-line); background: #f6f9fe; color: var(--ls-cam-blue); font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.ls-cam-specs-row { border-top: 1px solid #edf2fa; font-size: 13.5px; line-height: 1.5; }
.ls-cam-specs-row > div { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 4px; }
.ls-cam-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #f1f5fb; color: var(--ls-cam-ink); font-size: 12.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.ls-cam-chip.is-win { background: #dcfce7; color: #166534; font-weight: 800; }
.ls-cam-specs .is-none { color: #8b97ab; }
.ls-cam-specs-note { margin: 0; padding: 8px 12px; border-top: 1px solid var(--ls-cam-line); background: #fbfcfe; color: var(--ls-cam-muted); font-size: 12px; line-height: 1.45; text-align: center; }

@media (max-width: 600px) {
    .ls-cam { margin: 22px 0; border-radius: 14px; }
    .ls-cam-head { padding: 12px 12px 0; }
    .ls-cam .ls-cam-title { font-size: 17px; }
    .ls-cam-tabs { padding: 10px 12px; }
    .ls-cam .ls-cam-tab { padding: 6px 12px; font-size: 12.5px; }
    .ls-cam .ls-cam-lb { bottom: 8px; max-width: 44%; padding: 4px 7px; font-size: 10.5px; white-space: normal; overflow: visible; }
    .ls-cam-a .ls-cam-lb { left: 8px; }
    .ls-cam-b .ls-cam-lb { right: 8px; }
    .ls-cam-handle { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
    .ls-cam-foot { padding: 10px 12px; }
    .ls-cam-specs { margin: 10px 12px 4px; }
    /* Side by side stacks on small screens so each photo stays large. */
    .ls-cam.is-side .ls-cam-stage { grid-template-columns: 1fr; }
    .ls-cam.is-side .ls-cam-b .ls-cam-lb { left: 8px; }
}

/* ---------- Winner badge, notes, "see full comparison" (tabs card) ---------- */
.ls-cam-win { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.ls-cam-win.is-a { background: #e3edff; color: var(--ls-cam-blue); }
.ls-cam-win.is-b { background: #efe7ff; color: var(--ls-cam-purple); }
.ls-cam-win.is-tie { background: #f1f5fb; color: var(--ls-cam-muted); }
.ls-cam-foot .ls-cam-win { margin-left: 6px; font-size: 11.5px; padding: 2px 8px; }
.ls-cam-note { padding: 0 16px 14px; color: #33465f; font-size: 15px; line-height: 1.65; }
.ls-cam-note p { margin: 0 0 8px; }
.ls-cam-note p:last-child { margin-bottom: 0; }
.ls-cam-note.is-tabs { padding-top: 0; font-size: 14.5px; }
.ls-cam-more { display: block; padding: 12px 16px; border-top: 1px solid var(--ls-cam-line); background: #f6f9fe; color: var(--ls-cam-blue); font-weight: 800; font-size: 14px; text-align: center; text-decoration: none; }
.ls-cam-more:hover { background: #eef4fd; text-decoration: none; }

/* ---------- Stacked layout (Camera Comparison pages) ---------- */
.ls-cam.is-stacked { margin: 20px 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.ls-cam-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 0 0 16px; padding: 16px; background: #fff; border: 1px solid var(--ls-cam-line); border-radius: 16px; }
.ls-cam-score b { display: block; font-size: 38px; line-height: 1; font-weight: 900; }
.ls-cam-score small { display: block; margin-top: 4px; color: var(--ls-cam-muted); font-size: 13px; font-weight: 700; }
.ls-cam-score-a { text-align: right; }
.ls-cam-score-a b { color: var(--ls-cam-blue); }
.ls-cam-score-b b { color: var(--ls-cam-purple); }
.ls-cam-score-mid { color: var(--ls-cam-muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.ls-cam-score-mid small { font-size: 11px; letter-spacing: 0; text-transform: none; }
.ls-cam-score-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-top: 12px; border-top: 1px solid #edf2fa; }
.ls-cam-chip2 { padding: 5px 10px; border-radius: 999px; background: #f1f5fb; color: var(--ls-cam-muted); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.ls-cam-chip2.is-a { background: #e3edff; color: var(--ls-cam-blue); }
.ls-cam-chip2.is-b { background: #efe7ff; color: var(--ls-cam-purple); }
.ls-cam-chip2:hover { text-decoration: none; filter: brightness(.96); }

.ls-cam-jump { position: sticky; top: var(--ls-cam-sticky, 0px); z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0 0 4px; padding: 10px 0; background: var(--ls-page-bg, #f4f7fc); }
.ls-cam-jump-links { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ls-cam-jump-links::-webkit-scrollbar { display: none; }
.ls-cam-jump-links a { flex: 0 0 auto; padding: 7px 13px; border: 1px solid var(--ls-cam-line); border-radius: 999px; background: #fff; color: var(--ls-cam-muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.ls-cam-jump-links a:hover, .ls-cam-jump-links a.is-on { background: var(--ls-cam-blue); border-color: var(--ls-cam-blue); color: #fff; text-decoration: none; }
.ls-cam-jump .ls-cam-seg { background: #fff; }

.ls-cam-specs-wrap { margin: 12px 0; background: #fff; border: 1px solid var(--ls-cam-line); border-radius: 14px; overflow: hidden; }
.ls-cam-specs-wrap > summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-weight: 800; cursor: pointer; list-style: none; }
.ls-cam-specs-wrap > summary::-webkit-details-marker { display: none; }
.ls-cam-specs-wrap > summary::after { content: ""; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.ls-cam-specs-wrap[open] > summary::after { transform: rotate(-135deg); }
.ls-cam-specs-wrap .ls-cam-specs { margin: 0 16px 16px; }

.ls-cam-scene { margin: 16px 0; background: #fff; border: 1px solid var(--ls-cam-line); border-radius: 16px; overflow: hidden; scroll-margin-top: 80px; }
.ls-cam-scene-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 16px; }
.ls-cam .ls-cam-scene-h h2 { flex: 1 1 200px; margin: 0; font-size: 19px; line-height: 1.3; font-weight: 800; color: var(--ls-cam-ink); }
.ls-cam-num { display: flex; flex: 0 0 28px; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: #eef4fd; color: var(--ls-cam-blue); font-weight: 900; font-size: 14px; }
.ls-cam-scene .ls-cam-note { padding-top: 14px; }
.ls-cam.is-stacked.is-side .ls-cam-stage { padding: 0; }

.ls-cam-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; scroll-margin-top: 80px; }
.ls-cam-vd { padding: 16px; background: #fff; border: 1px solid var(--ls-cam-line); border-top: 5px solid var(--ls-cam-blue); border-radius: 16px; }
.ls-cam-vd.is-b { border-top-color: var(--ls-cam-purple); }
.ls-cam .ls-cam-vd h3 { margin: 0 0 8px; font-size: 16.5px; line-height: 1.35; color: var(--ls-cam-ink); }
.ls-cam-vd ul { margin: 0 0 10px; padding-left: 18px; color: #33465f; font-size: 14.5px; line-height: 1.7; }
.ls-cam-vd-link { color: var(--ls-cam-blue); font-weight: 800; font-size: 13.5px; text-decoration: none; }

@media (max-width: 600px) {
    .ls-cam-score { padding: 14px 10px; }
    .ls-cam-score b { font-size: 30px; }
    .ls-cam-jump { flex-wrap: wrap; }
    .ls-cam-jump .ls-cam-seg { order: -1; }
    .ls-cam .ls-cam-scene-h h2 { font-size: 17px; }
    .ls-cam-verdict { grid-template-columns: 1fr; }
    .ls-cam-note { padding: 0 12px 12px; font-size: 14.5px; }
    .ls-cam-scene-h { padding: 12px; }
}

/* ---------- One fixed photo frame for both views ----------
   Slider and Side by side use the same box (16:10, at most 400px tall), so switching views or
   loading photos never moves the page (no layout shift) and each scene stays compact. */
.ls-cam .ls-cam-stage,
.ls-cam.is-side .ls-cam-stage { width: 100%; aspect-ratio: 16 / 10; max-height: 400px; height: auto; }
.ls-cam.is-side .ls-cam-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 3px; padding: 0; background: #fff; }
.ls-cam.is-side .ls-cam-side { position: relative; inset: auto; height: 100%; min-height: 0; aspect-ratio: auto; overflow: hidden; }
.ls-cam .ls-cam-img { object-position: center; }
@media (max-width: 600px) {
    .ls-cam .ls-cam-stage, .ls-cam.is-side .ls-cam-stage { aspect-ratio: 4 / 3; max-height: 320px; }
    .ls-cam.is-side .ls-cam-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ls-cam.is-side .ls-cam-lb { left: 6px !important; right: auto !important; bottom: 6px; max-width: calc(100% - 12px); }
}
