.gallery-wall-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.gallery-wall-tabs button { border: 1px solid var(--crisp-border,#1e2d27); background: var(--crisp-card,#121a17); color: #b4c0d0; padding: 9px 14px; border-radius: 9px; font-size: 12px; font-weight: 700; }
.gallery-wall-tabs button[aria-selected="true"] { border-color: #00e699; color: #6ee7b7; background: #17362b; }
.gallery-wall-tabs button:focus-visible, .gallery-thumbnail:focus-visible { outline: 2px solid #00e699; outline-offset: 3px; }
#galleryGrid { display: block; }
.gallery-grade-section { margin: 12px 0; }
.gallery-grade-section > h3 { margin: 12px 0 8px; font-size: 13px; color: #ddd6fe; }
.gallery-card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,320px),1fr)); gap: 12px; align-items: start; }
.gallery-compact-card, .gallery-target-card { min-width: 0; padding: 12px; border: 1px solid #3b5362; border-radius: 12px; background: var(--analytics-card,#121a17); color: #f1f5f9; font-size: 11px; }
.gallery-target-card { border-color: #a855f74d; }
.gallery-compact-card header, .gallery-target-heading { display: flex; gap: 8px; align-items: start; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.gallery-meta { color: #b4c0d0; font-size: 10px; margin: 6px 0; font-variant-numeric: var(--tw-numeric-variant,tabular-nums); }
.gallery-pnl, .gallery-target-metrics { font-family: var(--tw-numeric-font,monospace); font-variant-numeric: var(--tw-numeric-variant,tabular-nums); }
.gallery-profit { color: #6ee7b7; }.gallery-loss { color: #fda4af; }.gallery-pending { color: #fde68a; }
#execution-gallery .gallery-photo-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 8px 0; }
#execution-gallery .gallery-photo-pair > div { min-width: 0; }
.gallery-thumbnail { position: relative; display: block; height: 110px; width: 100%; padding: 0; overflow: hidden; border: 1px solid #1e2d27; border-radius: 7px; background: #16221e; color: #b4c0d0; cursor: zoom-in; }
.gallery-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-photo-empty { display: grid; place-items: center; cursor: default; }
.gallery-photo-label { position: absolute; bottom: 4px; left: 4px; border-radius: 4px; padding: 2px 4px; background: #000c; color: #f1f5f9; font-size: 9px; }
.gallery-photo-hover { position: absolute; inset: 0; display: grid; place-items: center; background: #0007; color: #f1f5f9; opacity: 0; }
.gallery-thumbnail:is(:hover,:focus-visible) .gallery-photo-hover { opacity: 1; }
.gallery-note { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 5px 0; color: #b4c0d0; }
.gallery-notes[open] .gallery-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.gallery-checklist, .gallery-notes, .gallery-attempt-history { margin-top: 7px; border: 1px solid var(--crisp-border,#1e2d27); border-radius: 7px; padding: 6px 8px; }
.gallery-checklist summary, .gallery-notes summary, .gallery-attempt-history > summary { color: #b4c0d0; cursor: pointer; font-size: 11px; }
.gallery-target-metrics { color: #b4c0d0; margin: 8px 0; font-size: 11px; }
.gallery-empty { padding: 24px; color: #b4c0d0; }
#execution-gallery .gallery-zoomable-image, #execution-gallery .gallery-photo-pair .h-40 { height: 110px; max-height: 110px; }
#execution-gallery .gallery-photo-pair img { object-fit: cover; }

.gallery-media{position:relative;min-width:0}.gallery-media-actions{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:8px;background:#000b;opacity:0;pointer-events:none;border-radius:7px}.gallery-media:is(:hover,:focus-within) .gallery-media-actions{opacity:1;pointer-events:auto}.gallery-media-actions button{border:1px solid #00E699;border-radius:999px;padding:7px;background:#15221F;color:#00E699;font-size:11px}.gallery-media-actions button:first-child{border-color:#fca5a5}.gallery-media .gallery-thumbnail{height:160px}.process-disciplined-win{box-shadow:inset 0 0 22px #00e69922;border-color:#00e699!important}.process-lucky-win{box-shadow:inset 0 0 22px #a855f733;border-color:#fbbf24!important}.process-disciplined-loss{border-left:4px solid #f87171!important}.process-score{margin-top:10px;font-size:10px;color:#d1d5db}.process-ribbon{display:flex;flex-wrap:wrap;gap:20px;padding:15px;margin:12px 0;border:1px solid #00e69933;border-radius:12px;background:#0B1311;color:#e2e8f0;font-size:12px}.daily-summary{margin:auto;max-width:620px;width:95%;max-height:85vh;overflow:auto;background:#0B1311;border:1px solid #00E699;color:#e2e8f0;padding:24px;border-radius:20px}.daily-summary::backdrop{background:#000b}.daily-summary article{margin-top:12px;border:1px solid #334155;padding:12px;border-radius:12px}.daily-summary button{border:1px solid #00e699;padding:8px 16px;border-radius:999px;color:#00e699}.daily-summary header{display:flex;justify-content:space-between}.rule-list li label{min-height:44px!important;padding:8px 14px!important;border:1px solid #37415180;border-radius:999px;background:#15221F;color:#9ca3af}.rule-list li.done label{background:#00e6991a;border-color:#00e699;color:#00e699;font-weight:500}#criteriaList>div:has(input:checked){border-color:#00e699!important;background:#00e6991a!important;color:#00e699!important}#criteriaList>div{min-height:44px;border-radius:999px!important}.rr-inputs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.rr-inputs input{width:100%;padding:8px;border:1px solid #374151;background:#15221F;border-radius:8px;color:#e2e8f0} @media(max-width:600px){.rr-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}}

.gallery-card-badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;font-size:9px;max-width:65%}.gallery-media:is(:hover,:focus-within) .gallery-media-actions{pointer-events:none}.gallery-media-actions button{pointer-events:auto}
.daily-equity-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-items:start;margin-top:14px}.daily-equity-pair .mt-6,.daily-equity-pair .process-score{margin-top:0!important}

.gallery-htf{width:40%;max-width:160px;margin:0 auto 6px;position:relative}.gallery-htf .gallery-thumbnail{width:100%;height:68px;min-height:0}.gallery-htf .gallery-thumbnail img{height:68px;width:100%;object-fit:cover}.gallery-htf .gallery-photo-label{font-size:9px;padding:2px 5px}.gallery-htf-connectors{display:block;height:8px;position:relative}.gallery-htf-connectors:before,.gallery-htf-connectors:after{content:"";position:absolute;top:0;width:20px;height:1px;background:rgb(148 163 184 / .35);transform-origin:top center}.gallery-htf-connectors:before{right:50%;transform:rotate(-25deg)}.gallery-htf-connectors:after{left:50%;transform:rotate(25deg)}

.gallery-preview-status{padding:8px;font-size:11px;color:#cbd5e1}.gallery-preview-retry{padding:6px 10px;border:1px solid #34d399;border-radius:6px}

/* Scope every compact-header rule to Gallery; other dashboard controls are unchanged. */
#execution-gallery.gallery-review,#execution-gallery.gallery-review *{box-sizing:border-box}
#tab-execution #execution-gallery.gallery-review{padding:12px;display:grid;gap:8px}
#execution-gallery.gallery-review>:is(header,form,details,div){margin:0}
#execution-gallery .guard-gallery-heading h2{margin:0;font-size:16px;line-height:1.35}
#execution-gallery .guard-gallery-heading p{margin:2px 0 0;font-size:11px;line-height:1.4;color:#94a3b8}
#execution-gallery .gallery-review-toolbar{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;padding:0;border:0;font-size:11px;color:#cbd5e1}
#execution-gallery .gallery-review-toolbar :is(select,button,a){box-sizing:border-box;min-height:32px;max-width:100%;padding:5px 9px;border:1px solid #334155;border-radius:6px;background:#0f172a;color:#e2e8f0;white-space:nowrap;font:inherit;line-height:20px}
#execution-gallery .gallery-review-toolbar a{display:inline-flex;align-items:center}
#execution-gallery .gallery-filter-label{min-width:0;max-width:100%}
#execution-gallery .gallery-review-toolbar select{width:145px;padding-right:20px}
#execution-gallery .gallery-review-toolbar [data-gallery-action]{color:#6ee7b7}
#execution-gallery .gallery-review-toolbar :is(button,select):disabled{opacity:.5;cursor:wait}
#execution-gallery .gallery-review-toolbar :is(button,select,a,input):focus-visible{outline:2px solid #34d399;outline-offset:2px}
#execution-gallery [data-review-status]{min-width:0;flex:1 1 150px;overflow-wrap:anywhere;color:#94a3b8;font-size:10px;line-height:1.4}
#execution-gallery .gallery-custom-dates{box-sizing:border-box;position:absolute;left:0;top:calc(100% + 6px);z-index:30;width:350px;max-width:100%;padding:12px;border:1px solid #334155;border-radius:8px;background:#0b1923;box-shadow:0 8px 24px #0006}
#execution-gallery .gallery-custom-dates[hidden]{display:none}
#execution-gallery .gallery-date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#execution-gallery .gallery-date-fields label{display:grid;gap:4px;min-width:0;font-size:11px}
#execution-gallery .gallery-date-fields input{min-width:0;width:100%;max-width:100%;padding:5px;border:1px solid #475569;border-radius:5px;background:#0f172a;color:#f1f5f9;font:inherit;box-sizing:border-box}
#execution-gallery .gallery-custom-dates p{margin:8px 0;font-size:10px;color:#94a3b8}
#execution-gallery .gallery-date-actions{display:flex;gap:6px;justify-content:flex-end}
#execution-gallery .gallery-date-actions button[type=submit]{border-color:#34d399;color:#6ee7b7}
#execution-gallery .execution-recorder{border:0;padding:4px 0;margin:0;font-size:11px}
#execution-gallery .gallery-card-grid{gap:10px}
#execution-gallery .gallery-compact-card{padding:10px}
#execution-gallery .gallery-compact-card header{padding-bottom:6px}
@media(min-width:900px){#execution-gallery .gallery-review-toolbar{flex-wrap:nowrap}#execution-gallery [data-review-status]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:480px){#execution-gallery .gallery-review-toolbar :is(button,a){padding:4px 7px}#execution-gallery [data-review-status]{flex-basis:100%}#execution-gallery .gallery-review-toolbar select{width:135px}}

.gallery-criteria-evidence{font-size:12px;padding:6px 0;color:#cbd5e1}
.gallery-criteria-evidence summary{cursor:pointer;min-height:32px}
.gallery-criteria-mismatch summary{color:#fca5a5}
.gallery-criteria-mismatch summary::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#ef4444}
.gallery-compact-card[data-gallery-focus=true]{outline:2px solid #ef4444;outline-offset:3px}
