/* Elements — library page, element drawer, element picker. Every class is prefixed el-; tokens come from base.css. */

/* ========== hero ========== */
.el-hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 220px; margin-bottom: 8px;
  border-radius: var(--r-xl); border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 85% 0%, rgba(159, 211, 224, .1), transparent 55%), linear-gradient(180deg, var(--tide), var(--deep));
  box-shadow: var(--shadow-sm);
}
.el-hero-reel { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.el-reel-track { display: flex; height: 100%; width: max-content; animation: el-drift 140s linear infinite; }
.el-reel-tile { flex: none; width: 460px; height: 100%; background: #03080e center / cover no-repeat; filter: saturate(.7) brightness(.62) contrast(1.05); }
.el-reel-tile + .el-reel-tile { box-shadow: inset 1px 0 0 rgba(2, 5, 9, .7); }
@keyframes el-drift { to { transform: translateX(-50%); } }
.el-hero-scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 90% at 80% 10%, rgba(159, 211, 224, .12), transparent 60%),
    linear-gradient(90deg, rgba(2, 5, 9, .95) 0%, rgba(2, 5, 9, .82) 36%, rgba(2, 5, 9, .4) 68%, rgba(2, 5, 9, .62) 100%),
    linear-gradient(0deg, rgba(2, 5, 9, .9), transparent 62%);
}
.el-hero-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px 34px 28px; min-height: 220px; }
.el-hero-text { display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.el-hero-text .eyebrow { color: var(--bronze); }
.el-hero-text h1 { font: 500 42px/1.02 var(--display); letter-spacing: .12em; text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }
.el-hero-sub { font-size: 20px; line-height: 1.3; color: rgba(231, 237, 233, .86); }
.el-hero-hint { color: var(--muted); font-size: 12.5px; }
.el-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.el-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.el-hero-stats { display: flex; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(2, 5, 9, .5); backdrop-filter: blur(12px); overflow: hidden; }
.el-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 11px 20px 10px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; transition: background var(--t); }
.el-stat + .el-stat { border-left: 1px solid var(--line); }
.el-stat b { font: 500 26px/1 var(--display); letter-spacing: .04em; transition: color var(--t); }
.el-stat:hover { background: rgba(159, 211, 224, .07); }
.el-stat.active { background: var(--bronze-dim); }
.el-stat.active b { color: var(--bronze-hi); }
.el-stat.active .eyebrow { color: var(--bronze); }

/* ========== toolbar ========== */
.el-toolbar { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 6px; }
.el-tool-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.el-toolbar .input.search { width: 300px; height: 36px; }
.el-kinds > button .icon { opacity: .75; }
.el-sortwrap { display: inline-flex; align-items: center; gap: 8px; }
.el-sort { width: auto; min-height: 32px; height: 32px; padding-top: 0; padding-bottom: 0; }
.el-groupswitch { font-size: 12.5px; color: var(--muted); }
.el-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); }
.el-chips::-webkit-scrollbar { display: none; }
.el-chips .chip { flex: none; height: 26px; font-size: 12px; }
.el-summary { display: flex; align-items: center; gap: 10px; min-height: 24px; margin-bottom: 12px; }

/* ========== sections & grids ========== */
.el-section + .el-section { margin-top: 40px; }
.el-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.el-section-head h2 { font-size: 15px; letter-spacing: .12em; }
.el-section-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--bronze); border: 1px solid rgba(201, 160, 99, .3); background: radial-gradient(circle, rgba(201, 160, 99, .14), transparent 70%); }
.el-section-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

.el-grid { --min: 260px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--min), 100%), 1fr)); gap: 18px 16px; align-items: start; }
.el-grid.k-character { --min: 290px; }
.el-grid.k-location { --min: 390px; }
.el-grid.k-prop { --min: 230px; }
.el-grid.v-dense { gap: 10px; }
.el-grid.v-dense.k-character { --min: 196px; }
.el-grid.v-dense.k-location { --min: 260px; }
.el-grid.v-dense.k-prop { --min: 160px; }

/* ========== card ========== */
.el-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 33, 53, .5), rgba(6, 16, 27, .78));
  transition: transform .28s var(--ease), border-color var(--t), box-shadow .28s var(--ease);
}
.el-card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow); }
.el-card.is-selected { border-color: rgba(201, 160, 99, .75); box-shadow: 0 0 0 1px rgba(201, 160, 99, .55), 0 12px 32px rgba(201, 160, 99, .12); }
.el-card.is-skeleton { pointer-events: none; overflow: hidden; }
.el-card.is-skeleton .el-meta { gap: 0; }

/* the whole card is one button; real controls sit above it */
.el-hit { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.el-hit:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }

.el-media { position: relative; overflow: hidden; border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; }
.el-card.is-dense .el-media { border-radius: calc(var(--r-lg) - 1px); }

.el-frame { width: 100%; border-radius: 0; background: radial-gradient(120% 90% at 50% 40%, #0a1726, #02060b); }
.el-frame > img { position: absolute; inset: 0; filter: brightness(.9) saturate(.95); transition: transform .6s var(--ease), filter .35s var(--ease), opacity .35s ease; }
.el-frame > img.is-whole { object-fit: contain; }
.el-card:hover .el-frame > img, .el-row:hover .el-frame > img { filter: none; }
.el-card:hover .el-frame > img { transform: scale(1.035); }
.el-fill { position: absolute; inset: -14%; background: center / cover no-repeat; filter: blur(22px) brightness(.42) saturate(1.15); opacity: 0; transition: opacity .4s ease; }
.el-fill[style*="background-image"] { opacity: 1; }
.el-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
  background: linear-gradient(180deg, rgba(2, 5, 9, .32), transparent 24%, transparent 72%, rgba(2, 5, 9, .42));
}
.el-noimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--faint); font-size: 12px; }

.el-badges { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 4px; pointer-events: none; transition: opacity var(--t); }
.el-badges .badge { height: 22px; padding: 0 7px; }
/* The strip lets clicks through to the card, except the warning badge: it takes the pointer so its reason (title) shows on hover. */
.el-badges .badge.warn, .el-row-main .badge.warn { position: relative; z-index: 2; pointer-events: auto; cursor: help; }

.el-check {
  position: absolute; top: 8px; left: 8px; z-index: 3; width: 24px; height: 24px; padding: 0;
  display: grid; place-items: center; border-radius: 7px; border: 1.5px solid rgba(231, 237, 233, .7);
  background: rgba(2, 5, 9, .55); backdrop-filter: blur(6px); color: transparent; cursor: pointer;
  opacity: 0; transform: scale(.9); transition: opacity var(--t), transform var(--t), background var(--t), border-color var(--t), color var(--t);
}
.el-card:hover .el-check, .el-check:focus-visible, .is-selecting .el-check { opacity: 1; transform: none; }
.el-check:hover { border-color: var(--bronze-hi); }
.el-check[aria-checked="true"] { opacity: 1; transform: none; background: var(--bronze); border-color: var(--bronze); color: #1a1206; }

.el-quick {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; display: flex; justify-content: flex-end; gap: 6px;
  opacity: 0; transform: translateY(6px); transition: opacity var(--t), transform var(--t); pointer-events: none;
}
.el-card:hover .el-quick, .el-card:focus-within .el-quick { opacity: 1; transform: none; pointer-events: auto; }
.is-selecting .el-quick { display: none; }
.el-quick .btn { background: rgba(2, 5, 9, .66); border-color: rgba(231, 237, 233, .16); color: var(--pearl); backdrop-filter: blur(10px); }
.el-quick .btn:hover:not(:disabled) { background: rgba(15, 33, 53, .9); border-color: rgba(201, 160, 99, .55); color: var(--bronze-hi); }
.el-quick-use:not(.icon-only) { margin-right: auto; }
.el-card.is-dense .el-quick { top: 8px; bottom: auto; left: auto; }
.el-card.is-dense:hover .el-badges, .el-card.is-dense:focus-within .el-badges { opacity: 0; }

.el-overlay-name { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; padding: 26px 10px 8px; background: linear-gradient(180deg, transparent, rgba(2, 5, 9, .9)); font-weight: 600; font-size: 12.5px; pointer-events: none; }

.el-meta { display: flex; flex-direction: column; gap: 7px; padding: 11px 13px 12px; min-width: 0; }
.el-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.el-name { flex: 1; font: 600 13.5px/1.25 var(--sans); }
.el-uses { display: inline-flex; align-items: center; gap: 4px; color: var(--bronze); font-size: 11px; }
.el-sub-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.el-tag { position: relative; z-index: 2; flex: 0 1 auto; min-width: 0; }
.el-col { flex: 0 1 auto; margin-left: auto; color: var(--faint); font-size: 11.5px; text-align: right; }
.el-expand-hint { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--bronze); font-size: 11.5px; white-space: nowrap; }

/* stacked versions */
.el-card.is-stack { box-shadow: 0 -6px 0 -3px #0d2235, 0 -11px 0 -7px #091827; }
.el-card.is-stack:hover { box-shadow: 0 -6px 0 -3px #0f2840, 0 -11px 0 -7px #0b1d30, var(--shadow); }
.el-collage { display: grid; gap: 2px; background: #02060b; }
.el-collage.n2 { grid-template-columns: 1fr 1fr; }
.el-collage.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.el-collage.n3 > :first-child { grid-row: span 2; }
.el-collage-cell { position: relative; overflow: hidden; min-height: 0; }
.el-collage-cell > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.88); transition: transform .6s var(--ease), filter .35s, opacity .35s; }
.el-collage-cell > img[data-loading] { opacity: 0; }
.el-card:hover .el-collage-cell > img { transform: scale(1.04); filter: none; }

.el-group { grid-column: 1 / -1; padding: 14px; border-radius: var(--r-xl); border: 1px solid rgba(201, 160, 99, .28); background: linear-gradient(180deg, rgba(201, 160, 99, .06), rgba(6, 16, 27, .45)); animation: rise .3s var(--ease) both; }
.el-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--bronze); min-width: 0; }
.el-group-head h3 { font: 500 14px/1.2 var(--display); letter-spacing: .08em; color: var(--pearl); }

/* ========== list ========== */
.el-list { display: flex; flex-direction: column; gap: 6px; }
.el-row {
  position: relative; display: grid; align-items: center; gap: 14px; padding: 8px 12px 8px 10px; min-width: 0;
  grid-template-columns: 26px 128px minmax(0, 2fr) minmax(0, 1.3fr) 58px 58px 92px auto;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(6, 16, 27, .6);
  transition: background var(--t), border-color var(--t);
}
.el-row:hover { background: rgba(15, 33, 53, .72); border-color: var(--line-2); }
.el-row.is-selected { border-color: rgba(201, 160, 99, .7); background: rgba(201, 160, 99, .07); }
.el-row .el-check { position: relative; top: auto; left: auto; opacity: .45; transform: none; }
.el-row:hover .el-check, .el-row .el-check[aria-checked="true"], .is-selecting .el-row .el-check { opacity: 1; }
.el-row-kind { display: grid; place-items: center; color: var(--faint); }
.el-row-thumb { width: 128px; }
.el-row-thumb .el-frame { border-radius: 8px; }
.el-row-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.el-row-main .row { min-width: 0; }
.el-row-col, .el-row-num { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12.5px; }
.el-row-col { color: var(--muted); }
.el-row-num .eyebrow { font-size: 9.5px; }
.el-row .el-quick { position: relative; inset: auto; opacity: 0; transform: none; }
.el-row:hover .el-quick, .el-row:focus-within .el-quick { opacity: 1; pointer-events: auto; }
.el-row-stackbadge { grid-column: 5 / -1; justify-self: end; }

/* ========== selection bar, drop zone ========== */
.el-bulk {
  position: fixed; left: 50%; bottom: 22px; z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 16px; border-radius: 16px; border-color: rgba(201, 160, 99, .35); animation: rise .25s var(--ease) both;
}
.el-bulk-count { color: var(--muted); white-space: nowrap; }
.el-bulk-count b { color: var(--bronze-hi); font: 500 15px var(--display); }
.el-bulk-sep { width: 1px; height: 22px; background: var(--line-2); }
/* Toasts use the same bottom-centre spot: lift them above the bar while it shows (--el-bulk-h is measured by the page). */
body:has(.el-bulk:not([hidden])) #toasts { bottom: calc(22px + var(--el-bulk-h, 52px) + 12px); }

.el-dropzone { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(2, 5, 9, .74); backdrop-filter: blur(6px); pointer-events: none; animation: fade .15s ease both; }
.el-dropzone-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 64px; text-align: center; border: 2px dashed rgba(201, 160, 99, .7); border-radius: var(--r-xl); background: rgba(6, 16, 27, .85); color: var(--muted); }
.el-dropzone-card h3 { font: 500 18px var(--display); letter-spacing: .1em; color: var(--pearl); }

/* ========== drawer ========== */
.drawer.wide.el-drawer-panel { width: min(1100px, 100vw); }
.el-drawer-panel.is-dropping::after { content: ""; position: absolute; inset: 10px; z-index: 5; pointer-events: none; border: 2px dashed var(--bronze); border-radius: var(--r-xl); background: rgba(201, 160, 99, .06); }
.el-kind-badge { flex: none; }
.el-drawer { display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }
.el-viewer { display: flex; flex-direction: column; gap: 10px; }

.el-stage { position: relative; width: 100%; max-width: calc(58vh * 16 / 9); margin: 0 auto; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: #010306; box-shadow: var(--shadow-sm); }
.el-stage-hit { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.el-stage-hit:focus-visible { outline-offset: -3px; }
.el-stage .el-frame { border-radius: 0; }
.el-stage .el-frame > img { filter: none; }
.el-stage .el-frame::after { background: none; }
.el-stage-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.el-stage-zoom { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; background: rgba(2, 5, 9, .7); border: 1px solid var(--line-2); color: var(--pearl); font-size: 12px; backdrop-filter: blur(8px); opacity: 0; transition: opacity var(--t); }
.el-stage-hit:hover .el-stage-zoom, .el-stage-hit:focus-visible .el-stage-zoom { opacity: 1; }
.el-stage-nav {
  position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(2, 5, 9, .62); color: var(--pearl); backdrop-filter: blur(8px); cursor: pointer;
  opacity: 0; transition: opacity var(--t), background var(--t), border-color var(--t);
}
.el-stage-nav.prev { left: 12px; } .el-stage-nav.next { right: 12px; }
.el-stage:hover .el-stage-nav, .el-stage-nav:focus-visible, .el-lb-stage .el-stage-nav { opacity: .92; }
.el-stage-nav:hover { background: rgba(15, 33, 53, .92); border-color: rgba(201, 160, 99, .55); color: var(--bronze-hi); }
.el-stage-count, .el-stage-label { position: absolute; top: 12px; z-index: 2; height: 24px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 99px; background: rgba(2, 5, 9, .7); border: 1px solid var(--line); font-size: 11.5px; color: var(--pearl); backdrop-filter: blur(8px); pointer-events: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-stage-count { right: 12px; font-size: 11px; }
.el-stage-label { left: 12px; }
.el-stage-empty { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; color: var(--muted); }

.el-strip { display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px 6px; }
.el-strip-item, .el-strip-add { position: relative; flex: none; width: 112px; padding: 0; border-radius: 9px; cursor: pointer; }
.el-strip-item { border: 1.5px solid transparent; background: none; opacity: .68; transition: opacity var(--t), border-color var(--t); }
.el-strip-item .el-frame { border-radius: 7px; }
.el-strip-item:hover { opacity: 1; }
.el-strip-item.active { opacity: 1; border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(201, 160, 99, .15); }
.el-strip-item.is-off .el-frame > img { filter: grayscale(1) brightness(.55); }
.el-strip-item.is-off::after { content: "OFF"; position: absolute; left: 6px; bottom: 5px; z-index: 2; font: 500 9px var(--mono); letter-spacing: .12em; color: var(--muted); }
.el-strip-cover, .el-strip-video, .el-strip-warn { position: absolute; z-index: 2; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.el-strip-cover { top: 5px; left: 5px; background: var(--bronze); color: #1a1206; }
.el-strip-video { top: 5px; right: 5px; background: rgba(2, 5, 9, .75); color: var(--pearl); }
.el-strip-warn { bottom: 5px; right: 5px; background: rgba(2, 5, 9, .8); color: var(--warn); }
.el-strip-add { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1.5px dashed var(--line-2); background: rgba(2, 5, 9, .4); color: var(--muted); transition: border-color var(--t), color var(--t); }
.el-strip-add:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--bronze); color: var(--bronze-hi); }
.el-strip-add:disabled, .el-strip-add[aria-disabled="true"] { cursor: progress; }
.el-strip-add small { font: 10.5px var(--mono); }

.el-filebar { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(6, 16, 27, .62); }
.el-filebar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.el-label-select { width: auto; min-width: 210px; min-height: 30px; height: 30px; padding-top: 0; padding-bottom: 0; }
.el-filebar-info { display: flex; gap: 14px; min-width: 0; color: var(--faint); font-size: 11px; }
.el-filebar .msg { display: flex; align-items: center; gap: 4px; }
/* saving: controls stay focusable (aria-disabled) but look and act inactive */
.el-filebar .is-busy { opacity: .55; cursor: progress; }
.el-filebar .btn[aria-disabled="true"] { cursor: progress; }

.el-drawer-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.el-drawer-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.el-pane { min-width: 0; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(15, 33, 53, .42), rgba(6, 16, 27, .5)); }
.el-pane-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 22px; }
.el-pane-head h3.eyebrow { color: var(--bronze); font-weight: 500; }
.el-save-state { margin-left: auto; color: var(--ok); font-size: 11px; }
.el-form .field > .label small { font: 11px var(--sans); letter-spacing: 0; text-transform: none; }
.el-form .hint.el-error, .el-error { color: #f08a82; }
.el-form .hint.el-warn { color: var(--warn); }
.el-form .input[readonly], .el-form .textarea[readonly] { background: rgba(2, 5, 9, .3); border-color: var(--line); }
.el-kindseg button:disabled { cursor: default; }
.el-kindseg button:disabled:not(.active) { opacity: .45; }

.el-tagfield { position: relative; display: flex; align-items: center; }
.el-tagfield .input { padding-left: 26px; padding-right: 34px; color: var(--verdigris); }
.el-at { position: absolute; left: 12px; color: var(--verdigris); pointer-events: none; }
.el-tagfield .btn { position: absolute; right: 5px; }

.el-aliases { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; padding: 5px 7px; border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(2, 5, 9, .6); cursor: text; transition: border-color var(--t), box-shadow var(--t); }
.el-aliases:focus-within { border-color: rgba(201, 160, 99, .7); box-shadow: 0 0 0 3px rgba(201, 160, 99, .14); }
.el-alias { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 4px 0 10px; border-radius: 99px; background: rgba(159, 211, 224, .1); font-size: 12.5px; }
.el-alias button { width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.el-alias button:hover { background: rgba(196, 72, 63, .25); color: #ffd0cb; }
.el-alias-input { flex: 1; min-width: 120px; height: 24px; border: 0; outline: none; background: none; }
.el-alias-input::placeholder { color: var(--faint); }
.el-metaline { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--faint); font-size: 11px; }

.el-sends { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.el-send { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; border: 1px solid transparent; background: rgba(2, 5, 9, .35); color: var(--ink); text-align: left; cursor: pointer; transition: border-color var(--t); }
.el-send:hover { border-color: var(--line-2); }
.el-send b { font-weight: 600; font-size: 12.5px; }
.el-small { font-size: 12px; }

.el-takes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.el-take { position: relative; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: #03080e; cursor: pointer; transition: border-color var(--t); }
.el-take:hover { border-color: rgba(201, 160, 99, .55); }
.el-take > img, .el-take > video { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.el-take > img[data-loading] { opacity: 0; }
.el-take-status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 10px; }
.el-take-ok { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #06200f; }

/* lightbox */
.el-lb-overlay { background: rgba(0, 0, 0, .9); padding: 16px; }
.modal.xl.el-lb-modal { max-width: min(1680px, 100%); background: #020509; }
.el-lb { display: flex; flex-direction: column; gap: 10px; }
.el-lb-stage { position: relative; display: grid; place-items: center; min-height: 40vh; border-radius: var(--r-lg); overflow: hidden; background: #000; }
.el-lb-stage > .spinner { position: absolute; top: 50%; left: 50%; margin: -10px 0 0 -10px; }
.el-lb-media { position: relative; z-index: 1; max-width: 100%; max-height: calc(100vh - 210px); object-fit: contain; transition: opacity .3s; }
.el-lb-media[data-loading] { opacity: 0; }
.el-lb-caption { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--muted); font-size: 12.5px; }

/* ========== dialogs ========== */
.el-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 18px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); background: rgba(2, 5, 9, .35); color: var(--muted); cursor: pointer; transition: border-color var(--t), background var(--t), color var(--t); }
.el-drop:hover, .el-drop.over { border-color: var(--bronze); color: var(--bronze-hi); background: var(--bronze-dim); }
.el-drop b { color: var(--ink); }
.el-drop small { font: 11px var(--mono); color: var(--faint); }
.el-tray { display: flex; flex-direction: column; gap: 6px; }
.el-tray:empty { display: none; }
.el-tray-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(2, 5, 9, .4); min-width: 0; }
.el-tray-item > .clip { flex: 1; }
.el-tray-thumb { flex: none; width: 44px; height: 30px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line); background: #03080e center / cover no-repeat; color: var(--muted); }
.el-tray-thumb.lg { width: 76px; height: 50px; }
.el-batch { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.el-batch-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(2, 5, 9, .35); min-width: 0; }
.el-batch-row.is-done { border-color: rgba(143, 224, 181, .3); }
.el-batch-row.is-error { border-color: rgba(196, 72, 63, .45); }
.el-batch-row .spinner { flex: none; }
.el-progress { height: 4px; border-radius: 99px; overflow: hidden; background: rgba(159, 211, 224, .12); }
.el-progress > span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--bronze), var(--bronze-hi)); transition: width .3s var(--ease); }

/* ========== picker ========== */
.modal.xl.el-picker-modal { height: min(880px, calc(100vh - 48px)); }
.el-picker-modal .modal-head > .mono { flex: none; }
.el-picker-modal .modal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.el-picker { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.el-picker-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.el-picker-tools .input.search { flex: 1; min-width: 200px; }
.el-picker-results { flex: 1; min-height: 200px; overflow: auto; margin: 0 -6px; padding: 6px 6px 10px; }
.el-picker-results .el-grid.k-character { --min: 220px; }
.el-picker-results .el-grid.k-location { --min: 300px; }
.el-picker-results .el-grid.k-prop { --min: 180px; }
.el-picker-results .el-section + .el-section { margin-top: 28px; }
.el-picker-hint { margin-right: auto; }

/* ========== touch & small screens ========== */
@media (hover: none) {
  .el-quick { display: none; }
  .el-frame > img { filter: none; }
}
@media (max-width: 1100px) {
  .el-row { grid-template-columns: 26px 112px minmax(0, 2fr) minmax(0, 1.2fr) 58px auto; }
  .el-row-files, .el-row-date { display: none; }
  .el-row-stackbadge { grid-column: 5 / -1; }
}
@media (max-width: 900px) {
  .el-hero-body { padding: 28px 18px 20px; }
  .el-hero-text h1 { font-size: 32px; }
  .el-hero-side { align-items: stretch; width: 100%; }
  .el-hero-stats { width: 100%; }
  .el-stat { flex: 1; padding: 10px 12px; }
  .el-hero-actions { justify-content: flex-start; }
  .el-toolbar .input.search { width: 100%; flex: 1 1 100%; order: -1; }
  .el-tool-row > .spacer { display: none; }
  .el-drawer-cols { grid-template-columns: 1fr; }
  .el-stage { max-width: none; }
  .el-takes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .el-row { grid-template-columns: 26px 96px minmax(0, 1fr) auto; gap: 10px; }
  .el-row-col, .el-row-num { display: none; }
  .el-row-stackbadge { grid-column: auto; }
  .el-grid.k-character { --min: 240px; }
  .el-grid.k-location { --min: 300px; }
}
@media (max-width: 620px) {
  .el-kinds { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .el-kinds::-webkit-scrollbar { display: none; }
  .el-kinds > button { flex: 1 0 auto; justify-content: center; padding: 0 9px; }
  .el-kinds > button .icon { display: none; }
  .el-sortwrap .eyebrow { display: none; }
}
@media (max-width: 520px) {
  .el-hero-reel { opacity: .7; }
  .el-hero-text h1 { font-size: 28px; }
  .el-hero-sub { font-size: 17px; }
  .el-stat b { font-size: 21px; }
  .el-grid.v-dense.k-character, .el-grid.v-dense.k-prop { --min: 140px; }
  .el-grid.v-dense.k-location { --min: 200px; }
  .el-bulk { left: 12px; right: 12px; transform: none; bottom: 12px; }
  body:has(.el-bulk:not([hidden])) #toasts { bottom: calc(12px + var(--el-bulk-h, 96px) + 10px); }
  .el-bulk-sep { display: none; }
  .el-label-select { min-width: 0; flex: 1 1 100%; }
  .el-dropzone-card { padding: 30px 24px; }
}
