/* Inherit the current mobile palette, controls and safe-area layout. */
.mobile-global-search,.mobile-camera-search{width:100%;min-width:0}
.list-tools:has(.mobile-global-search:not([hidden])){display:block}
.mobile-event-search{margin:0 0 14px;min-width:0}
.mobile-event-search form{display:flex;gap:8px;align-items:end;flex-wrap:wrap}
.mobile-event-search label{flex:1 1 100%;min-width:0;margin:0}
.mobile-event-search input{width:100%;min-width:0}
.mobile-event-search select{width:auto;max-width:145px;flex:0 0 auto}
.mobile-event-search button{width:auto;flex:0 0 auto;padding:10px 13px;min-height:44px}
.mobile-event-search .small{margin:8px 0;font-size:.78rem}
.mobile-event-search [role=status]{font-size:.85rem;overflow-wrap:anywhere}
.mobile-rules-button{margin:0 0 14px;display:flex;align-items:center;min-height:44px;max-width:100%;text-align:start}
.mobile-rules-button[hidden]{display:none}
.mobile-gen-results{display:grid;gap:8px}
.mobile-gen-result{display:flex;gap:12px;width:100%;padding:12px;text-align:start;align-items:center;min-width:0;border:1px solid var(--border,#39352d);border-radius:14px;background:var(--surface,#201d18);color:inherit}
.mobile-gen-result img{width:80px;height:60px;object-fit:cover;border-radius:8px;flex:none}
.mobile-gen-result span{min-width:0;display:grid;gap:6px;overflow-wrap:anywhere}
.mobile-gen-result strong{font-size:.9rem;font-weight:500}.mobile-gen-result small{opacity:.7;font-size:.75rem}
.mobile-rule-dialog{background:#211e19;color:#f3ede1;border:1px solid #514737;border-radius:18px;padding:18px;width:min(560px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 40px);box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain}
.mobile-rule-dialog::backdrop{background:#0009}.mobile-rule-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.mobile-rule-dialog h2{font-size:1.1rem;margin:0;overflow-wrap:anywhere}.mobile-rule-dialog header button{flex:none}
.mobile-rule-dialog form{display:grid;gap:12px}.mobile-rule-dialog label{display:block;min-width:0;font-size:.88rem}
.mobile-rule-dialog input:not([type=checkbox]),.mobile-rule-dialog textarea,.mobile-rule-dialog select{width:100%;box-sizing:border-box;background:#171510;color:inherit;border:1px solid #514737;border-radius:9px;padding:10px;font:inherit;margin-top:5px;min-height:44px}
.mobile-rule-dialog fieldset{border:1px solid #514737;border-radius:10px;max-height:180px;overflow:auto;min-width:0}
.mobile-rule-dialog fieldset label,.mobile-rule-dialog label:has(>input[type=checkbox]){display:flex;align-items:center;gap:8px;min-height:44px;overflow-wrap:anywhere}
.mobile-rule-dialog input[type=checkbox]{width:18px;height:18px;flex:none;accent-color:#e99128}
.mobile-rule-dialog button{min-height:44px}.mobile-rule-dialog [role=status]{overflow-wrap:anywhere;color:#ffc679}
.mobile-rule-card{padding:14px;margin:12px 0;border:1px solid #514737;border-radius:12px;overflow-wrap:anywhere}
.mobile-rule-card h3{margin:0 0 7px;font-size:1rem}.mobile-rule-card p{font-size:.9rem;white-space:pre-wrap}
.mobile-rule-state{font-size:.75rem;color:#ffc679}.mobile-rule-actions{display:flex;justify-content:flex-end;gap:8px}
.mobile-rule-danger{color:#ffaea0!important}.mobile-rule-dialog button:disabled{opacity:.5;cursor:default}
@media(max-width:360px){.mobile-event-search form{gap:6px}.mobile-event-search label{flex-basis:100%}.mobile-rule-dialog{padding:13px}.mobile-gen-result img{width:60px;height:48px}}
/* ---------- search/replay tab UX (2026-10-25, Claude) ---------- */
.list-tools:has(.mobile-global-search:not([hidden])){display:grid;gap:12px;margin-bottom:6px}
.mobile-event-search{margin:0;padding:14px;border:1px solid var(--border,#2c2620);border-radius:16px;background:var(--panel-bg,#1a1714)}
.mobile-event-search form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}
.mobile-event-search form>label{display:contents;color:var(--text,#f5efe8);font-size:15px;font-weight:700}
.mobile-event-search .mobile-search-title{grid-column:1/-1}
.mobile-event-search form>label>input[type=search]{grid-column:1;grid-row:2}
.mobile-event-search input[type=search]{min-height:46px;padding-left:40px!important;border-radius:12px;font-size:15px;font-weight:500;background:rgba(15,14,12,.72) url("icons/search.svg") 13px center/17px no-repeat!important}
.mobile-event-search select{grid-column:1/-1;grid-row:3;justify-self:start;width:auto;min-width:0;max-width:100%;min-height:44px;border-radius:12px}
.mobile-event-search button[type=submit]{grid-column:2;grid-row:2;flex:0 0 auto;width:auto;min-width:64px;max-width:100%;height:44px;min-height:44px;padding:0 12px;border-radius:8px;font-size:13px;font-weight:700;white-space:nowrap;word-break:normal;overflow-wrap:normal}
.mobile-event-search select[hidden]+button[type=submit]{flex:0 0 auto}
.mobile-search-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 8px}
.mobile-search-head:not(:has(:not(:empty):not([hidden]))){display:none}
.mobile-event-search .mobile-search-clear{flex:none;min-height:36px;padding:0 12px;border-radius:10px;font-size:12.5px;color:var(--muted,#bfb2a5)}
.mobile-event-search .mobile-search-clear[hidden]{display:none}
.mobile-event-search>.small{margin:10px 2px 0;font-size:12px;line-height:1.45;color:var(--subtle,#8f8478)}
.mobile-search-scope{margin:10px 2px 0;font-size:12.5px;color:var(--muted,#bfb2a5)}
.mobile-search-scope+.small{margin-top:4px}
.mobile-event-search [role=status]{flex:1;min-width:0;margin:0 2px;font-size:13px;font-weight:700;color:var(--text,#f5efe8)}
.mobile-event-search [role=status]:empty{display:none}
.mobile-gen-results:empty{display:none}
.mobile-gen-result{gap:12px;padding:8px 10px 8px 8px;border-radius:14px;background:rgba(15,14,12,.5)}
.mobile-gen-result img{width:96px;height:auto;aspect-ratio:16/9;border-radius:9px}
.mobile-gen-result>span{flex:1;gap:4px}
.mobile-gen-meta{display:flex;flex-wrap:wrap;column-gap:6px;row-gap:0;align-items:baseline;min-width:0;font-size:12px;color:var(--subtle,#8f8478);font-variant-numeric:tabular-nums;opacity:1!important}
.mobile-gen-meta b{max-width:100%;color:var(--muted,#bfb2a5);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-gen-meta span{white-space:nowrap}
@media(max-width:360px){.mobile-gen-result img{width:72px}}
.mobile-gen-result strong{font-size:14px;font-weight:600;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mobile-gen-arrow{flex:none;font-style:normal;color:var(--subtle,#8f8478)}
.mobile-rules-button{position:relative;justify-content:flex-start;gap:10px;width:100%;margin:0;padding:0 36px 0 14px;border-radius:14px;font-size:14px;font-weight:600}
.mobile-rules-button::before{content:"";flex:none;width:18px;height:18px;background:currentColor;opacity:.8;-webkit-mask:url("icons/rules-mask.svg") center/contain no-repeat;mask:url("icons/rules-mask.svg") center/contain no-repeat}
.mobile-rules-button::after{content:"\203A";position:absolute;right:14px;top:50%;transform:translateY(-52%);font-size:20px;color:var(--subtle,#8f8478)}
.mobile-camera-heading{margin:14px 2px 8px;font-size:17px;font-weight:700}
.mobile-camera-heading[hidden]{display:none}
.mobile-camera-search{margin:14px 0 4px}
.mobile-camera-search .mobile-event-search{background:rgba(15,14,12,.35)}
.mobile-rule-card{display:grid;gap:8px;background:rgba(15,14,12,.35)}
.mobile-rule-card h3{margin:0}
.mobile-rule-state{justify-self:start;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:700;background:rgba(255,255,255,.06);color:#c9bcae}
.mobile-rule-state.test{background:rgba(118,202,255,.12);color:#8fd0ff}
.mobile-rule-state.active{background:rgba(88,192,143,.14);color:#7fd6ab}
.mobile-rule-state.paused{background:rgba(242,192,102,.14);color:#f2c066}
.mobile-rule-card p.mobile-rule-condition{margin:0;padding:8px 12px;border-left:3px solid rgba(243,154,30,.55);border-radius:0 8px 8px 0;background:rgba(255,255,255,.04);color:var(--muted,#bfb2a5)}
