/* Ilo Animation — library · stage · inspector · timeline */

:root {
    --k-in: #3fd69a;
    --k-out: #ff8a4c;
    --k-loop: #a983ff;
    --k-once: #4fb0ff;
    --key-rgb: 255, 210, 63;
    --key: #ffd23f;
    --card: #1b1b20;
    --tl-bg: #222224;
    --lane: #29292c;
    --lane-2: #2e2e31;
}
:root[data-theme="light"] {
    --card: #ffffff;
    --tl-bg: #e9e9ec;
    --lane: #f3f3f5;
    --lane-2: #ececef;
    --key: #e0a800;
}

.an .topbar { position: relative; }
.an-tabs { position: static; margin: 0 auto; flex: none; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }
.an-tab { border: 0; background: transparent; padding: 4px 14px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.an-tab:hover { color: var(--text); }
.an-tab.on { background: var(--bg-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.an-export-btn { height: 24px; margin-left: 2px; margin-right: 2px; }

.an-pane { flex: 1; min-height: 0; display: none; }
.an-pane.on { display: grid; }
.an-pane[data-pane="animate"] {
    grid-template-columns: var(--libw, 284px) minmax(0, 1fr) var(--inspw, 268px);
    grid-template-rows: minmax(120px, 1fr) var(--tlh, 260px);
    grid-template-areas: "lib center insp" "tl tl tl";
}
.an-puffy { grid-template-columns: 1fr 300px; }
.an-puffy .tp-stage { background: var(--stage); overflow: auto; min-height: 0; }
.an-puffy .tp-side { border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 1080px) { .an-pane[data-pane="animate"] { --libw: 236px; --inspw: 236px; } }

.an-grow { flex: 1; }
.an-field { display: flex; align-items: center; gap: 6px; }
.an-field > span { color: var(--text-3); font-size: 10.5px; white-space: nowrap; }
.an-field .seg { margin: 0; }

/* ── library ─────────────────────────────────────────── */
.an-lib { grid-area: lib; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.an-lib-head { padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.an-search { position: relative; }
.an-search svg { position: absolute; left: 8px; top: 7px; width: 13px; height: 13px; fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linecap: round; }
.an-search input { width: 100%; height: 27px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); padding: 0 8px 0 27px; font: inherit; font-size: 11.5px; outline: none; }
.an-search input:focus { border-color: var(--accent); }
.an-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.an-chip { border: 0; border-radius: 99px; padding: 3px 9px; font-size: 10.5px; background: var(--field); color: var(--text-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 4px; }
.an-chip:hover { color: var(--text); }
.an-chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.an-chip small { opacity: .55; font-size: 9.5px; }
.an-chip i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

.an-grid { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; align-content: start; grid-auto-rows: max-content; }
.an-grid::-webkit-scrollbar, .an-insp::-webkit-scrollbar, .an-tl-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.an-grid::-webkit-scrollbar-thumb, .an-insp::-webkit-scrollbar-thumb, .an-tl-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
.an-grid-h { grid-column: 1 / -1; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 6px 2px -2px; }
.an-grid-h:first-child { margin-top: 0; }
.an-card { position: relative; border-radius: 10px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); cursor: grab; overflow: hidden; transition: transform .16s var(--ease), box-shadow .16s; }
.an-card:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 16px rgba(0, 0, 0, .25); }
.an-card.used { box-shadow: inset 0 0 0 1.5px var(--accent); }
.an-card canvas { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--card); }
.an-card-meta { display: flex; align-items: center; gap: 6px; padding: 6px 8px 7px; }
.an-card-name { flex: 1; min-width: 0; font-size: 11px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.an-kdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.k-in { --k: var(--k-in); --kr: 63, 214, 154; } .k-out { --k: var(--k-out); --kr: 255, 138, 76; } .k-loop { --k: var(--k-loop); --kr: 169, 131, 255; } .k-once { --k: var(--k-once); --kr: 79, 176, 255; }
.an-kdot { background: var(--k); }
.an-fav { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border: 0; border-radius: 6px; background: rgba(0, 0, 0, .35); color: #fff; opacity: 0; cursor: pointer; display: grid; place-items: center; font-size: 12px; line-height: 1; }
.an-card:hover .an-fav, .an-fav.on { opacity: 1; }
.an-fav.on { color: var(--key); }
.an-add { position: absolute; top: 5px; left: 5px; height: 22px; padding: 0 7px; border: 0; border-radius: 6px; background: var(--accent-2); color: #fff; font-size: 10.5px; font-weight: 600; opacity: 0; cursor: pointer; }
.an-card:hover .an-add { opacity: 1; }
.an-lib-foot { padding: 6px 12px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 10.5px; }
.an-empty-lib { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 30px 10px; }

/* drag ghost */
.an-ghost { position: fixed; z-index: 100; pointer-events: none; padding: 5px 10px 5px 8px; border-radius: 7px; background: var(--k); color: #111; font-weight: 700; font-size: 11px; box-shadow: 0 8px 22px rgba(0, 0, 0, .4); transform: translate(10px, -50%); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.an-ghost small { font-weight: 500; opacity: .7; }
body.an-dragging, body.an-dragging * { cursor: grabbing !important; }

/* ── stage ───────────────────────────────────────────── */
.an-center { grid-area: center; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--stage); }
.an-stagebar { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.an-use { height: 26px; display: inline-flex; align-items: center; gap: 6px; }
.an-use svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.an-bg button { min-width: 0; }
.an-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 18px; overflow: hidden; }
.an-stage canvas { border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.an-stage.checker canvas.old-checker { background-color: #fff; background-image: linear-gradient(45deg, #ececec 25%, transparent 25%), linear-gradient(-45deg, #ececec 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ececec 75%), linear-gradient(-45deg, transparent 75%, #ececec 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.an-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 99px; background: rgba(20, 20, 24, .78); color: #ddd; font-size: 11px; backdrop-filter: blur(8px); white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.an-hint[hidden] { display: none; }
.an-hint button { border: 0; border-radius: 99px; padding: 3px 10px; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; font-size: 10.5px; }
.an-hint button:hover { background: rgba(255, 255, 255, .2); }
.an-hint button.on { background: #fff; color: #111; }
.an-stage.drop-ok::after { content: 'Drop to add'; position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 12px; display: grid; place-items: center; color: var(--accent); font-weight: 700; font-size: 13px; background: rgba(0, 0, 0, .15); pointer-events: none; }

/* ── inspector ───────────────────────────────────────── */
.an-insp { grid-area: insp; border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; background: var(--bg); }
.in-sec { padding: 12px 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.in-h { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.in-h .an-grow { flex: 1; }
.in-title { display: flex; align-items: center; gap: 8px; }
.in-title b { font-size: 14px; letter-spacing: -.01em; }
.in-badge { font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--k); color: #111; text-transform: uppercase; letter-spacing: .05em; }
.in-p { margin: 0; color: var(--text-3); font-size: 10.5px; line-height: 1.5; }
.in-row { display: flex; gap: 6px; }
.in-row .btn { flex: 1; justify-content: center; }
.in-sec .sl { grid-template-columns: 70px 1fr 44px; }
.in-sec .seg { margin: 0; }
.in-select { height: 24px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); font: inherit; padding: 0 6px; outline: none; }
.in-prop { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 4px; }
.in-prop .sl { grid-template-columns: 52px 1fr 44px; }
.keybtn { width: 18px; height: 18px; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--text-3); }
.keybtn i { width: 8px; height: 8px; transform: rotate(45deg); border: 1.5px solid currentColor; border-radius: 1px; }
.keybtn:hover { color: var(--text); }
.keybtn.has { color: var(--key); }
.keybtn.at i { background: var(--key); border-color: var(--key); }
.in-eases { display: flex; flex-wrap: wrap; gap: 4px; }
.in-eases .an-chip.on { background: var(--key); color: #111; }
.in-tip { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--field); color: var(--text-2); font-size: 10.5px; line-height: 1.5; box-shadow: inset 0 0 0 1px var(--line); }
.in-tip kbd { font: 10px var(--mono); padding: 0 4px; border-radius: 3px; background: var(--bg-3); color: var(--text); }
.in-clips { display: flex; flex-direction: column; gap: 3px; }
.in-clip { display: flex; align-items: center; gap: 7px; border: 0; background: var(--field); border-radius: 6px; padding: 5px 8px; text-align: left; cursor: pointer; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.in-clip:hover { color: var(--text); }
.in-clip span { flex: 1; }
.in-clip small { color: var(--text-3); font-family: var(--mono); font-size: 9.5px; }

/* ── timeline ────────────────────────────────────────── */
.an-timeline { grid-area: tl; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--line-2); background: var(--tl-bg); position: relative; }
.an-tl-grip { position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; z-index: 6; }
.an-tl-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-bottom: 1px solid var(--line); flex: none; }
.an-play { width: 30px; height: 26px; border-radius: 7px; background: var(--accent-2) !important; color: #fff !important; }
.an-play svg .fill { opacity: 1 !important; }
.an-time { font: 600 12px var(--mono); min-width: 74px; padding-left: 4px; font-variant-numeric: tabular-nums; }
.an-time small { color: var(--text-3); font-weight: 400; }
.an-dur, .an-chk { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 11px; white-space: nowrap; }
.an-dur input { width: 52px; height: 22px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); font: 11px var(--mono); padding: 0 5px; outline: none; }
.an-dur input:focus { border-color: var(--accent); }
.an-tip { color: var(--text-3); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.an-zoom { display: flex; align-items: center; gap: 5px; }
.an-zoom svg { width: 12px; height: 12px; fill: none; stroke: var(--text-3); stroke-width: 1.5; }
.an-zoom input { width: 90px; accent-color: var(--accent); }
@media (max-width: 1180px) { .an-tip { display: none; } }

.an-tl-body { flex: 1; min-height: 0; display: flex; }
.an-tl-labels { width: 236px; flex: none; overflow: hidden; border-right: 1px solid var(--line-2); position: relative; }
.an-tl-labels-inner { position: relative; }
.an-tl-scroll { flex: 1; min-width: 0; overflow: auto; position: relative; }
.an-tl-inner { position: relative; min-height: 100%; }
.an-ruler { position: sticky; top: 0; height: 26px; z-index: 4; background: var(--tl-bg); border-bottom: 1px solid var(--line-2); cursor: ew-resize; }
.an-ruler .tick { position: absolute; bottom: 0; width: 1px; height: 5px; background: var(--line-2); }
.an-ruler .tick.major { height: 9px; background: var(--text-3); }
.an-ruler .lbl { position: absolute; top: 4px; transform: translateX(4px); font: 9.5px var(--mono); color: var(--text-3); }
.an-ruler .end { position: absolute; top: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, .18); }
.an-ruler .endh { position: absolute; top: 0; bottom: 0; width: 9px; margin-left: -4px; cursor: ew-resize; z-index: 2; }
.an-ruler .endh::after { content: ''; position: absolute; left: 3px; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--text-3); }
.an-lanes { position: relative; }
.an-lanes .past-end { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .1) 0 6px, transparent 6px 12px); pointer-events: none; }
.an-lanes .gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); pointer-events: none; }

.lane { position: relative; border-bottom: 1px solid var(--line); background: var(--lane); }
.lane.clips { height: 46px; }
.lane.prop { height: 24px; background: var(--lane-2); }
.lane.sel { background-image: linear-gradient(rgba(229, 98, 239, .06), rgba(229, 98, 239, .06)); }
.lane.drop-ok { background-image: linear-gradient(rgba(229, 98, 239, .16), rgba(229, 98, 239, .16)); }
.lane .drop-mark { position: absolute; top: 6px; bottom: 6px; border-radius: 7px; border: 2px dashed var(--k); background: rgba(var(--kr), .18); pointer-events: none; }
.lane.add { height: 34px; background: transparent; border-bottom: 0; }

.lbl-row { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; border-bottom: 1px solid var(--line); background: var(--lane); cursor: pointer; }
.lbl-row.clips { height: 46px; }
.lbl-row.prop { height: 24px; background: var(--lane-2); padding-left: 26px; cursor: default; }
.lbl-row.sel { background-image: linear-gradient(rgba(229, 98, 239, .08), rgba(229, 98, 239, .08)); box-shadow: inset 2px 0 0 var(--accent); }
.lbl-row .tw { width: 16px; height: 16px; border: 0; background: transparent; padding: 0; color: var(--text-3); cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.lbl-row .tw svg { width: 10px; height: 10px; fill: currentColor; }
.lbl-row.open .tw { transform: rotate(90deg); }
.lbl-row .tname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lbl-row .tname b { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-row .tname small { color: var(--text-3); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-row .tdot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lbl-row .pname { flex: 1; color: var(--text-2); font-size: 10.5px; }
.lbl-row .pval { font: 10px var(--mono); color: var(--text-3); min-width: 34px; text-align: right; }
.lbl-row.add { height: 34px; background: transparent; border: 0; color: var(--text-3); font-size: 10.5px; padding-left: 10px; }
.lbl-row.add:hover { color: var(--text); }

.clip { position: absolute; top: 7px; height: 32px; border-radius: 7px; background: rgba(var(--kr), .2); box-shadow: inset 0 0 0 1px rgba(var(--kr), .55); overflow: hidden; cursor: grab; display: flex; align-items: center; min-width: 6px; transition: box-shadow .12s; }
.clip:hover { box-shadow: inset 0 0 0 1px var(--k); }
.clip.sel { box-shadow: inset 0 0 0 2px var(--k), 0 0 0 1px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .35); z-index: 2; }
.clip.drag { opacity: .85; z-index: 3; cursor: grabbing; }
.clip::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--k); }
.clip .body { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(var(--kr), .3); }
.clip .tail { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(var(--kr), .24) 0 4px, transparent 4px 8px); }
.clip .cyc { position: absolute; inset: 0; opacity: .5; }
.clip .cname { position: relative; padding: 0 10px 0 9px; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); pointer-events: none; display: flex; flex-direction: column; line-height: 1.2; }
.clip .cname small { font-weight: 500; font-size: 9.5px; color: var(--text-2); }
.clip .h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 1; }
.clip .h.l { left: 0; } .clip .h.r { right: 0; }
.clip .h::after { content: ''; position: absolute; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--text); opacity: 0; }
.clip .h.l::after { left: 3px; } .clip .h.r::after { right: 3px; }
.clip:hover .h::after, .clip.sel .h::after { opacity: .55; }
/* remove an effect: × on the block (on hover / when selected) and in the inspector list */
.clip .cdel { position: absolute; right: 9px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 0; border-radius: 50%; padding: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; line-height: 16px; cursor: pointer; opacity: 0; z-index: 3; transition: opacity .12s; }
.clip:hover .cdel, .clip.sel .cdel { opacity: 1; }
.clip .cdel:hover { background: var(--bad, #ff4d5e); }
.in-clip.sel { color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.in-clip .in-clip-x { font-style: normal; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); font-size: 12px; }
.in-clip .in-clip-x:hover { background: var(--bad, #ff4d5e); color: #fff; }
.tname.none small { color: var(--text-3); font-style: italic; }

.keysum { position: absolute; bottom: 3px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); background: var(--key); border-radius: 1.5px; z-index: 4; cursor: ew-resize; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .55); }
.keysum:hover { filter: brightness(1.2); }
.keysum.sel { background: #fff; box-shadow: 0 0 0 1.5px var(--key), 0 0 0 3px rgba(0, 0, 0, .5); }
.kf { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; transform: rotate(45deg); background: var(--key); border-radius: 2px; cursor: ew-resize; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); z-index: 1; }
.kf.hold { transform: none; border-radius: 1px; }
.kf.sel { background: #fff; box-shadow: 0 0 0 2px var(--key), 0 0 0 3px rgba(0, 0, 0, .5); }
.kline { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: rgba(var(--key-rgb), .45); pointer-events: none; }

.an-playhead { position: absolute; top: 0; bottom: 0; width: 0; z-index: 5; pointer-events: none; }
.an-playhead::before { content: ''; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: #ff4f6d; }
.an-playhead i { position: absolute; top: 2px; left: -6px; width: 12px; height: 15px; background: #ff4f6d; border-radius: 3px 3px 6px 6px; pointer-events: auto; cursor: ew-resize; }
.an-snapline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--key); z-index: 6; pointer-events: none; }

/* ── export ──────────────────────────────────────────── */
.an-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: grid; place-items: center; backdrop-filter: blur(3px); }
.an-modal[hidden] { display: none; }
.an-modal-card { width: min(560px, calc(100vw - 32px)); background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.an-modal-h { display: flex; align-items: center; justify-content: space-between; }
.an-modal-h b { font-size: 14px; }
.an-modal-h svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.an-formats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.an-format { border: 0; text-align: left; padding: 12px; border-radius: 10px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.an-format:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.an-format:disabled { opacity: .45; cursor: default; box-shadow: inset 0 0 0 1px var(--line); }
.an-format .fi { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; font: 800 10px var(--mono); color: #111; }
.an-format b { display: block; font-size: 12px; margin-bottom: 2px; }
.an-format span { color: var(--text-3); font-size: 10.5px; line-height: 1.45; }
.an-exp-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.an-progress { height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.an-progress[hidden] { display: none; }
.an-progress i { display: block; height: 100%; width: 0; background: var(--rainbow); transition: width .15s; }

.an .footer { justify-content: flex-start; }
.an .menu { position: absolute; right: 8px; top: 36px; z-index: 30; }

.an .toast { top: auto; bottom: calc(var(--tlh, 260px) + 64px); }
.an-fams { padding-top: 6px; border-top: 1px dashed var(--line); }
.an-fams[hidden] { display: none; }
.an-fams .an-chip { font-size: 10px; padding: 2px 8px; }
.an-fams .an-chip.on { background: var(--accent-2); color: #fff; }
.an-grid-h { display: flex; align-items: center; }
.an-showall { margin-left: auto; border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 10px; letter-spacing: 0; text-transform: none; cursor: pointer; padding: 2px 0; }
.an-showall:hover { text-decoration: underline; }
.an-more { grid-column: 1 / -1; text-align: center; color: var(--text-3); font-size: 10.5px; padding: 12px; }

/* layers & import */
.an-stagebar { position: relative; }
.an-sbtn { height: 26px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; }
.an-sbtn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.an-pop { position: absolute; top: 40px; left: 10px; z-index: 40; width: 320px; max-height: 70vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.an-pop[hidden] { display: none; }
.an-pop-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); }
.an-pop-h b { flex: 1; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-pop-h button { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 10.5px; padding: 2px 4px; }
.an-layers { overflow-y: auto; padding: 4px 6px; min-height: 40px; }
.an-layer { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 7px; cursor: pointer; }
.an-layer:hover { background: var(--hover); }
.an-layer input { accent-color: var(--accent); margin: 0; }
.an-layer i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.an-layer span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.an-layer small { color: var(--text-3); font-size: 10px; white-space: nowrap; }
.an-layer.off span { color: var(--text-3); }
.an-pop-actions { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.an-pop-actions .btn { flex: 1; justify-content: center; }
.an-pop-sub { padding: 6px 12px 0; color: var(--text-3); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.an-pop-note { padding: 10px 12px; color: var(--text-3); font-size: 11px; line-height: 1.5; }

/* Puffy & Chrome — looks gallery */
.an-puffy .tp-stage { display: flex; flex-direction: column; }
.pf-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 7px; padding: 12px 16px 10px; background: var(--stage); border-bottom: 1px solid var(--line); }
.pf-bar .an-search { max-width: 420px; }
.an-puffy .tp-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px 16px; align-content: start; grid-auto-rows: max-content; }
.lk-card { padding: 12px 10px 10px; }
.lk-card.dark, .pf-preview.dark { background: #16131d; }
.lk-card.dark .tp-name { color: #eee; }
.tp-wrap { display: block; }
.lk-card .tp-word { font-size: 40px; padding: 4px 0 12px; }
.pf-preview { border-radius: 14px; background: #f4efe7; padding: 18px 10px 22px; text-align: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.pf-preview .tp-word { display: inline-block; font: 900 64px/1.05 "Arial Rounded MT Bold", "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.02em; }
.pf-colors { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pf-color { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); cursor: pointer; }
.pf-color input { width: 24px; height: 24px; border: 0; padding: 0; border-radius: 50%; overflow: hidden; background: none; cursor: pointer; }
.pf-shadow { display: flex; flex-wrap: wrap; }
.pf-shadow button { flex: 1; }
.lk-bubble, .lk-balloon { color: var(--c); text-shadow: 0 1px 0 var(--d1), 0 2px 0 var(--d1), 0 3px 0 var(--d2), 0 4px 0 var(--d2), 0 5px 0 var(--d3), 0 9px 12px rgba(30,10,40,.25); }
.lk-balloon { text-shadow: 0 1px 0 var(--d2), 0 2px 0 var(--d2), 0 3px 0 var(--d3), 0 4px 0 var(--d3), 0 10px 12px rgba(30,10,40,.25); }
.lk-pearl, .lk-chrome, .lk-satin, .lk-gold, .lk-holo, .lk-gradient { background: var(--g); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lk-pearl { --g: linear-gradient(180deg, #fff 0%, var(--pa) 35%, var(--c) 70%, var(--d1) 100%); filter: drop-shadow(0 2px 0 var(--d1)) drop-shadow(0 3px 0 var(--d2)) drop-shadow(0 7px 8px rgba(0,0,0,.2)); }
.lk-chrome { --g: linear-gradient(180deg, #fff 0%, var(--l) 30%, var(--d2) 47%, var(--d3) 50%, #fff 53%, var(--c) 76%, var(--l) 100%); filter: drop-shadow(0 1px 0 var(--d3)) drop-shadow(0 3px 0 var(--d2)) drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.lk-satin { --g: linear-gradient(180deg, var(--l) 0%, var(--c) 40%, var(--d1) 62%, var(--l) 100%); filter: drop-shadow(0 2px 0 var(--d2)) drop-shadow(0 5px 7px rgba(0,0,0,.25)); }
.lk-gold { --g: linear-gradient(180deg, #fff6d6 0%, #f5ca5e 30%, #9a6a1b 47%, #4a2d06 50%, #ffe9a6 53%, #c8902e 76%, #fff1c2 100%); filter: drop-shadow(0 1px 0 #5a3a08) drop-shadow(0 3px 0 #8a5c12) drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.lk-holo { --g: linear-gradient(165deg, var(--pc), var(--pa) 30%, var(--pa2) 55%, var(--pc) 75%, var(--pa)); filter: drop-shadow(0 2px 0 var(--ad)) drop-shadow(0 6px 9px rgba(80,60,140,.28)); }
.lk-gradient { --g: linear-gradient(180deg, var(--c), var(--a) 55%, var(--a2)); filter: drop-shadow(0 2px 0 var(--ad)) drop-shadow(0 4px 0 var(--ad)) drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.lk-gummy { color: var(--c); opacity: .82; text-shadow: 0 2px 0 var(--d1), 0 4px 0 var(--d2), 0 9px 12px rgba(0,0,0,.18); }
.lk-glass { color: var(--l); opacity: .78; -webkit-text-stroke: 1.5px rgba(255,255,255,.95); text-shadow: 0 2px 0 var(--c), 0 6px 12px rgba(0,0,0,.15); }
.lk-clay, .lk-rubber { color: var(--c); text-shadow: 0 2px 0 var(--d2), 0 4px 0 var(--d3), 0 6px 0 var(--d3), 0 10px 9px rgba(0,0,0,.2); }
.lk-rubber { text-shadow: 0 2px 0 var(--d2), 0 4px 0 var(--d3), 0 6px 0 var(--d3), 0 8px 0 var(--d3), 0 11px 9px rgba(0,0,0,.25); }
.lk-sticker { color: var(--c); -webkit-text-stroke: 7px #fff; paint-order: stroke fill; text-shadow: 0 4px 0 var(--d3), 0 9px 12px rgba(0,0,0,.25); }
.lk-candy { --g: linear-gradient(180deg, var(--c), var(--a)); background: var(--g); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 4px 0 var(--ad)) drop-shadow(0 8px 9px rgba(0,0,0,.2)); }
.lk-neon { color: #fff; -webkit-text-stroke: 1.5px var(--c); text-shadow: 0 0 3px var(--c), 0 0 9px var(--c), 0 0 20px var(--c), 0 0 34px var(--c); }
.lk-retro { color: var(--c); -webkit-text-stroke: 1.5px #111; paint-order: stroke fill; text-shadow: 1px 1px 0 var(--a), 2px 2px 0 var(--a), 3px 3px 0 var(--a), 4px 4px 0 var(--a), 5px 5px 0 var(--a), 6px 6px 0 var(--a), 7px 7px 0 #111; }
.lk-comic { color: var(--c); -webkit-text-stroke: 3px #111; paint-order: stroke fill; text-shadow: 5px 5px 0 #111; }

/* picking pieces on the stage */
.an-stage canvas { cursor: pointer; }
.an-pickbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 99px; background: rgba(20, 20, 24, .86); color: #eee; font-size: 11px; box-shadow: 0 6px 20px rgba(0,0,0,.35); backdrop-filter: blur(8px); white-space: nowrap; z-index: 2; }
.an-pickbar[hidden] { display: none; }
.an-pickbar b { color: #fff; }
.an-pickbar button { border: 0; border-radius: 99px; padding: 4px 11px; cursor: pointer; font-size: 10.5px; font-weight: 600; background: rgba(255,255,255,.12); color: #fff; }
.an-pickbar button.go { background: var(--accent-2); }
.an-pickbar button:hover { filter: brightness(1.15); }
.an-stagetip { position: absolute; left: 12px; bottom: 10px; color: var(--text-3); font-size: 10.5px; pointer-events: none; }
.lbl-row .tdel { width: 18px; height: 18px; border: 0; border-radius: 5px; background: transparent; color: var(--text-3); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.lbl-row .tdel:hover { background: var(--press); color: var(--text); }

/* background & text */
.an-bgsw { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-2); background-color: #fff; background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%); background-size: 6px 6px; background-position: 0 0, 3px 3px; }
.an-pop-r { left: auto; right: 10px; }
.an-pop-text { left: auto; right: 120px; width: 360px; }
.bg-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 10px 12px; }
.bg-sw { aspect-ratio: 1; border: 0; border-radius: 7px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); padding: 0; }
.bg-sw.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.bg-sw.none { background-color: #fff; background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%); background-size: 8px 8px; background-position: 0 0, 4px 4px; }
.bg-custom { display: flex; flex-direction: column; gap: 8px; padding: 6px 12px 12px; }
.bg-custom .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tx-area { margin: 10px 12px 0; height: 64px; resize: vertical; border-radius: 8px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); font: 14px/1.3 inherit; padding: 8px; outline: none; }
.tx-area:focus { border-color: var(--accent); }
.tx-fonts { margin: 6px 12px 0; height: 190px; overflow-y: auto; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.tx-font { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.tx-font:hover { background: var(--hover); }
.tx-font.on { background: var(--accent-soft); }
.tx-font span { flex: 1; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-font small { color: var(--text-3); font-size: 10px; white-space: nowrap; }
.tx-opts { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; flex-wrap: wrap; }
.tx-opts .sl { flex: 1; min-width: 180px; }
.tx-search { margin: 8px 12px 0; }

.an-puffy .tp-side .btn { flex: none; height: 30px; }
.an-puffy .tp-side .in-row .btn { height: 28px; }
.pf-text { margin: 0; height: 52px; }
.pf-fonts { margin: 0; height: 150px; }
.an-puffy .tx-search { margin: 0; }

/* Puffy: the text bar */
.pf-textbar { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--bg); border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.pf-tb-l { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pf-tb-input { flex: 1 1 260px; min-width: 180px; height: 40px; border-radius: 10px; border: 1.5px solid var(--accent); background: var(--field); color: var(--text); font: 600 18px/1 -apple-system, "Helvetica Neue", Arial, sans-serif; padding: 0 14px; outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.pf-tb-font { display: flex; align-items: center; gap: 8px; height: 40px; max-width: 260px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); cursor: pointer; }
.pf-tb-font small, .pf-tb-size small { color: var(--text-3); font-size: 10px; }
.pf-tb-font b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.pf-tb-font i { color: var(--text-3); font-style: normal; }
.pf-tb-size { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); }
.pf-tb-size input { width: 52px; border: 0; background: transparent; color: var(--text); font: 13px var(--mono); outline: none; }
.pf-tb-go { height: 40px; padding: 0 16px; font-size: 12px; }
.pf-fontpop { top: 60px; left: auto; right: 160px; width: 340px; padding-bottom: 10px; }
.pf-fontpop .tx-fonts { height: 300px; }
.pf-bar { top: 0; }
.pf-hint { margin-top: -2px; }

/* the ilo colour picker */
.ilo-swatch { width: 26px; height: 26px; flex: none; border: 0; border-radius: 8px; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 1px rgba(0,0,0,.35); transition: transform .12s var(--ease); }
.ilo-swatch:hover { transform: scale(1.08); }
.ilo-cp { position: fixed; z-index: 200; width: 236px; padding: 10px; border-radius: 14px; background: #1e1e22; box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 10px; animation: ilo-cp-in .14s var(--ease); }
@keyframes ilo-cp-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.ilo-cp-sv { position: relative; height: 140px; border-radius: 9px; cursor: crosshair; overflow: hidden; }
.ilo-cp-w { position: absolute; inset: 0; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.ilo-cp-b { position: absolute; inset: 0; background: linear-gradient(0deg, #000, rgba(0,0,0,0)); }
.ilo-cp-k { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.ilo-cp-hue { position: relative; height: 12px; border-radius: 99px; cursor: ew-resize; background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.ilo-cp-hk { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.ilo-cp-row { display: flex; align-items: center; gap: 8px; }
.ilo-cp-chip { display: flex; width: 44px; height: 28px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.12); flex: none; }
.ilo-cp-chip i { flex: 1; }
.ilo-cp-hex { flex: 1; display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: 8px; background: #141417; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); color: #8a8a90; font: 12px var(--mono); }
.ilo-cp-hex:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }
.ilo-cp-hex input { flex: 1; min-width: 0; border: 0; background: transparent; color: #eee; font: 12px var(--mono); letter-spacing: .06em; outline: none; text-transform: uppercase; }
.ilo-cp-sw { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.ilo-cp-sw button { aspect-ratio: 1; border: 0; border-radius: 6px; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); transition: transform .1s; }
.ilo-cp-sw button:hover { transform: scale(1.15); }
.ilo-cp-cap { margin: -4px 0 -6px; color: #77777e; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pf-color { gap: 8px; }

.an-marquee { position: absolute; z-index: 7; border: 1px solid var(--key); background: rgba(var(--key-rgb), .12); border-radius: 3px; pointer-events: none; }
.an-marquee[hidden] { display: none; }
body.an-moving, body.an-moving * { cursor: move !important; }

/* Wild materials (CSS sketches; the real looks are vector, built in Illustrator) */
.lk-stack { color: var(--c); text-shadow: 3px 0 var(--a), -3px 0 var(--a), 0 3px var(--a), 0 -3px var(--a), 2px 2px var(--a), -2px 2px var(--a), 2px -2px var(--a), -2px -2px var(--a), 6px 0 var(--a2), -6px 0 var(--a2), 0 6px var(--a2), 0 -6px var(--a2), 4px 4px var(--a2), -4px 4px var(--a2), 4px -4px var(--a2), -4px -4px var(--a2), 9px 0 var(--d2), -9px 0 var(--d2), 0 9px var(--d2), 0 -9px var(--d2), 6px 6px var(--d2), -6px 6px var(--d2), 6px -6px var(--d2), -6px -6px var(--d2); }
.lk-glitch { color: var(--c); text-shadow: 3px 0 rgba(0, 229, 255, .9), -3px 0 rgba(255, 43, 214, .9); }
.lk-glitch.v-v { text-shadow: 0 3px rgba(0, 229, 255, .9), 0 -3px rgba(255, 43, 214, .9); }
.lk-glitch.v-d { text-shadow: 3px -3px rgba(0, 229, 255, .9), -3px 3px rgba(255, 43, 214, .9); }
.lk-block3d { color: var(--l); text-shadow: 1px 1px var(--a), 2px 2px var(--a), 3px 3px var(--a), 4px 4px var(--ad), 5px 5px var(--ad), 6px 6px var(--ad), 7px 7px var(--ad), 8px 8px var(--ad), 9px 9px var(--ad), 10px 10px var(--ad), 14px 16px 14px rgba(0,0,0,.3); }
.lk-foil { background: linear-gradient(165deg, var(--pa), var(--pa2) 40%, var(--pc) 70%, var(--pa)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 var(--d1)) drop-shadow(0 4px 0 var(--d2)) drop-shadow(0 9px 10px rgba(0,0,0,.25)); }
.lk-neonduo { color: var(--a); -webkit-text-stroke: 2px var(--c); paint-order: stroke fill; text-shadow: 0 0 4px var(--c), 0 0 12px var(--c), 0 0 26px var(--c); }
.lk-sticker2 { color: var(--c); -webkit-text-stroke: 6px #fff; paint-order: stroke fill; filter: drop-shadow(3px 0 0 var(--a)) drop-shadow(-3px 0 0 var(--a)) drop-shadow(0 3px 0 var(--a)) drop-shadow(0 -3px 0 var(--a)) drop-shadow(0 5px 0 var(--d3)) drop-shadow(0 10px 10px rgba(0,0,0,.2)); }
.lk-emboss { color: var(--c); text-shadow: -1px -1px 0 var(--l), 2px 2px 2px var(--d2); }
.lk-outlinepop { color: transparent; -webkit-text-stroke: 2.5px var(--c); text-shadow: 5px 5px 0 var(--a); }
.lk-shadowpop { color: var(--c); -webkit-text-stroke: 2px #111; paint-order: stroke fill; text-shadow: 5px 5px 0 var(--a); }
.lk-shadowpop.v-double { text-shadow: 5px 5px 0 var(--a), 10px 10px 0 var(--a2); }
.lk-gel { background: linear-gradient(180deg, var(--l), var(--c) 55%, var(--a)); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .95; filter: drop-shadow(0 2px 0 var(--ad)) drop-shadow(0 7px 9px rgba(0,0,0,.22)); }
.lk-stripe { background: repeating-linear-gradient(180deg, var(--c) 0 var(--bands, 25%), var(--a) var(--bands, 25%) calc(var(--bands, 25%) * 2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 var(--ad)) drop-shadow(0 4px 0 var(--ad)) drop-shadow(0 9px 10px rgba(0,0,0,.25)); }
.lk-chromegrad { background: linear-gradient(180deg, #fff 0%, var(--l) 28%, var(--d2) 48%, var(--ad) 50%, #fff 53%, var(--a) 78%, var(--pa) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 var(--d3)) drop-shadow(0 3px 0 var(--d2)) drop-shadow(0 6px 8px rgba(0,0,0,.3)); }

/* timeline header above the rows: element count + Select all */
.lbl-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 8px 0 12px; font-size: 10px; color: var(--text-3); box-sizing: border-box; }
.lbl-head .selall { border: 0; border-radius: 5px; padding: 3px 8px; background: var(--field); color: var(--text-2); font-size: 10px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.lbl-head .selall:hover { color: var(--text); }

/* selection box drawn with the mouse on the board */
.an-marquee { position: absolute; border: 1px solid #e562ef; background: rgba(229, 98, 239, .08); pointer-events: none; z-index: 3; }
.an-marquee[hidden] { display: none; }

/* minimised: the window shrinks to a bar that keeps the tool running */
.an-minibar { display: none; }
body.an-mini > *:not(.an-minibar):not(.toast) { display: none !important; }
body.an-mini .an-minibar { display: flex; align-items: center; gap: 10px; height: 100vh; padding: 0 10px 0 14px; box-sizing: border-box; background: var(--bg); }
.an-minibar .brand { margin-right: auto; }
.an-mini-live { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-2); }
.an-mini-live i { width: 7px; height: 7px; border-radius: 50%; background: #3fd69a; box-shadow: 0 0 8px rgba(63, 214, 154, .8); }
.an-minibar .btn { height: 26px; padding: 0 12px; }

/* ── docked panel (Window › Extensions › Ilo Animation Panel), or any narrow window ── */
.an-dockbar { display: none; }
body.is-dock #btn-mini, body.is-dock #btn-max { display: none; }
@media (max-width: 760px) {
    .an-pane[data-pane="animate"] {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(150px, 1fr) auto minmax(180px, 1.15fr) minmax(150px, var(--tlh-dock, 200px));
        grid-template-areas: "center" "dock" "lib" "tl";
    }
    /* a short panel scrolls instead of cutting the timeline off */
    html, body { overflow-y: auto; }
    .app.an { height: auto; min-height: 100vh; }
    .an-pane.on { flex: none; height: max(620px, calc(100vh - 40px)); }
    .an-dockbar { grid-area: dock; display: flex; margin: 0; padding: 6px 8px; gap: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); border-radius: 0; }
    .an-dockbar button { flex: 1; }
    .an-lib, .an-insp { grid-area: lib; border: 0; }
    .an-insp { display: none; }
    body[data-dock="insp"] .an-insp { display: block; }
    body[data-dock="insp"] .an-lib { display: none; }
    .an-top .brand-raw, .an-top .brand-bar { display: none; }
    .an-top .an-tab { padding: 4px 8px; }
    /* one row of icons; the names stay as tooltips */
    .an-stagebar { gap: 4px; padding: 5px 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .an-stagebar::-webkit-scrollbar { display: none; }
    .an-stagebar .an-field > span, .an-stagebar .an-grow { display: none; }
    .an-stagebar > .btn, .an-stagebar .seg { flex: none; }
    .an-sbtn { font-size: 0; padding: 0 7px; gap: 0; }
    .an-sbtn svg { margin: 0; }
    .an-use { font-size: 11px; padding: 0 9px; }
    .an-stagebar .seg button { padding: 3px 7px; font-size: 10.5px; }
    .an-top .an-tab { font-size: 11px; white-space: nowrap; }
    .an-top #btn-undo, .an-top #btn-redo, .an-top .top-actions .sep { display: none; }   /* ⌘Z / ⇧⌘Z still work */
    .an-top { gap: 6px; padding-left: 8px; padding-right: 6px; }
    .an-tl-bar { gap: 6px; padding-left: 6px; padding-right: 6px; flex-wrap: nowrap; overflow: hidden; }
    .an-tl-bar .an-chk, .an-tl-bar .sep { display: none; }
    .an-dur { font-size: 0; }
    .an-dur input { font-size: 11px; width: 46px; }
    .lbl-head { padding: 0 6px 0 8px; }
    .lbl-head span { display: none; }
    .an-tl-labels { width: 124px; }
    .an-tip, .an-zoom, #tl-tip { display: none; }
    .an-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .an-puffy { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(160px, 1fr) auto; }
    .an-puffy .tp-side { border-left: 0; border-top: 1px solid var(--line); max-height: 55vh; }
}

/* stroke rows: indented under their element; the Stroke button on rows that have one */
.lbl-row.sub2 { padding-left: 18px; }
.lbl-row.sub2 .tname b { font-weight: 600; color: var(--text-2); }
.lbl-row .tstroke { flex: none; margin-left: auto; margin-right: 4px; border: 0; border-radius: 4px; padding: 2px 6px; font-size: 9.5px; font-weight: 600; background: var(--field); color: var(--text-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.lbl-row .tstroke:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }

/* where a click in the library goes */
.an-target { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--text-3); padding: 2px 2px 0; }
.an-target:empty { display: none; }
.an-target b { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 99px; background: var(--field); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-target b i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
/* the block that was just added, and its row, light up for a moment */
@keyframes an-flash { 0% { box-shadow: 0 0 0 0 rgba(229, 98, 239, .9), inset 0 0 0 2px #fff; } 70% { box-shadow: 0 0 0 8px rgba(229, 98, 239, 0), inset 0 0 0 2px #fff; } 100% { box-shadow: 0 0 0 0 rgba(229, 98, 239, 0); } }
.clip.flash { animation: an-flash 1.2s ease-out 1; z-index: 3; }
@keyframes an-rowflash { 0%, 40% { background: rgba(229, 98, 239, .22); } 100% { background: transparent; } }
.lbl-row.flash { animation: an-rowflash 1.4s ease-out 1; }

/* the eye: hide an element */
.lbl-row .teye { flex: none; width: 18px; height: 18px; padding: 0; margin-right: 2px; border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; border-radius: 4px; }
.lbl-row .teye svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lbl-row .teye:hover { color: var(--text); background: var(--field); }
.lbl-row .teye.off { color: var(--accent); }
.lbl-row.hidden-row .tname, .lbl-row.hidden-row .tdot { opacity: .4; }
.lane.hidden-row .clip { opacity: .35; }

#seg-split[hidden] { display: none !important; }   /* artwork always comes in one row per element */

.lbl-row .tname b, .lbl-row .tname small, .an-target b { unicode-bidi: plaintext; }   /* Hebrew names read the right way */

.an-keycatch { position: fixed; left: -40px; top: 0; width: 8px; height: 8px; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* right-click menu on rows and on the board */
.an-ctx { position: fixed; z-index: 90; min-width: 190px; padding: 5px; border-radius: 9px; background: var(--bg-2, #1d1d22); box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px var(--line-2); font-size: 11.5px; }
.an-ctx[hidden] { display: none; }
.an-ctx button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 18px; border: 0; background: transparent; color: var(--text); padding: 6px 9px; border-radius: 6px; cursor: pointer; text-align: left; }
.an-ctx button:hover { background: var(--accent); color: #fff; }
.an-ctx button:disabled { color: var(--text-3); background: transparent; cursor: default; }
.an-ctx button kbd { font: inherit; font-size: 10.5px; color: var(--text-3); }
.an-ctx button:hover kbd { color: rgba(255,255,255,.75); }
.an-ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }

/* zoom on the board */
.an-stage.zoomed-old { display: block; overflow: auto; }
.an-stage.zoomed #view { display: block; margin: 18px auto; }
.an-zoombar { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(20,20,24,.82); box-shadow: 0 4px 14px rgba(0,0,0,.35); z-index: 4; }
.an-stage.zoomed .an-zoombar { position: sticky; float: right; margin: -40px 10px 10px 0; }
.an-zoombar button { border: 0; background: transparent; color: #ddd; min-width: 26px; height: 22px; border-radius: 5px; cursor: pointer; font-size: 12px; }
.an-zoombar button:hover { background: rgba(255,255,255,.12); color: #fff; }
#zoom-pct { min-width: 46px; font-size: 10.5px; font-family: var(--mono, monospace); }
.cv-list { display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.cv-list button { display: flex; justify-content: space-between; gap: 14px; border: 0; background: transparent; color: var(--text); padding: 6px 9px; border-radius: 6px; cursor: pointer; font-size: 11.5px; }
.cv-list button:hover, .cv-list button.on { background: var(--field); }
.cv-list button span { color: var(--text-3); font-family: var(--mono, monospace); font-size: 10.5px; }
.cv-custom { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-2); }
.cv-custom input { width: 62px; height: 24px; border-radius: 5px; border: 0; background: var(--field); color: var(--text); padding: 0 6px; box-shadow: inset 0 0 0 1px var(--line); }

.an-rowdrop { position: absolute; left: 6px; right: 6px; height: 2px; background: var(--accent); border-radius: 2px; z-index: 5; pointer-events: none; box-shadow: 0 0 6px var(--accent); }
body.an-rowdragging, body.an-rowdragging * { cursor: grabbing !important; }
.an-tl-labels { position: relative; }

.in-edit { width: 100%; margin: 4px 0 10px; }

/* rich tooltip card */
.an-tipcard { position: fixed; z-index: 95; max-width: 260px; padding: 10px 12px; border-radius: 10px; background: #2a2a30; color: #eee; box-shadow: 0 12px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); pointer-events: none; font-size: 11.5px; line-height: 1.45; }
.an-tipcard[hidden] { display: none; }
.an-tipcard .tc-h { display: flex; align-items: center; gap: 8px; }
.an-tipcard .tc-h b { font-size: 12.5px; font-weight: 650; color: #fff; }
.an-tipcard kbd { font: 10.5px var(--mono, monospace); padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.1); color: #ddd; }
.an-tipcard p { margin: 5px 0 0; color: #bdbdc4; }

/* ── shapes library ── */
.an-libmode { display: flex; }
.an-libmode button { flex: 1; }
.an-shopts { display: flex; flex-direction: column; gap: 7px; }
.an-shopts[hidden], .an-cats[hidden], .an-target[hidden] { display: none; }
.sh-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--text-3); }
.sh-row .seg { flex: 1; display: flex; }
.sh-row .seg button { flex: 1; padding-left: 2px; padding-right: 2px; }
.sh-pals { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.sh-pals::-webkit-scrollbar { display: none; }
.sh-pal { flex: none; border: 0; padding: 3px 4px; border-radius: 99px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; gap: 2px; cursor: pointer; }
.sh-pal i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.sh-pal:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.sh-pal.on { box-shadow: 0 0 0 2px var(--accent); }
.an-grid.an-grid-shapes { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.sh-card { cursor: pointer; }
.sh-thumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--card); }
.sh-thumb svg { width: 74%; height: 74%; transition: transform .18s var(--ease); }
.sh-card:hover .sh-thumb svg { transform: scale(1.1) rotate(-4deg); }
.sh-name { font-size: 9.5px; padding: 4px 6px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }

/* ── what is inside an element (groups, sublayers) ── */
.lbl-row .tkind { flex: none; width: 14px; height: 14px; color: var(--text-3); display: grid; place-items: center; margin-left: -2px; }
.lbl-row .tkind svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.lbl-row .tkids { flex: none; margin-left: auto; border: 0; border-radius: 4px; padding: 2px 6px 2px 14px; font-size: 9.5px; font-weight: 600; background: var(--field) no-repeat 5px 50% / 6px 6px; color: var(--text-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3 1.5 7.5 5 3 8.5z' fill='%23999'/%3E%3C/svg%3E"); }
.lbl-row .tkids.on { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 3 5 7.5 8.5 3z' fill='%23999'/%3E%3C/svg%3E"); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.lbl-row .tkids:hover { color: var(--text); }
.lbl-row .tkids + .tstroke { margin-left: 4px; }
.lbl-row.kid { height: 22px; gap: 5px; background: var(--lane-2); font-size: 10.5px; color: var(--text-2); }
.lbl-row.kid:hover { color: var(--text); background-image: linear-gradient(var(--hover), var(--hover)); }
.lbl-row.kid .kname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-row.kid small { color: var(--text-3); font-size: 9.5px; }
.lbl-row.kid.more { cursor: default; color: var(--text-3); font-style: italic; }
.lane.kid { height: 22px; background: var(--lane-2); }

/* the row's own buttons appear when you point at it (the name keeps its room) · the label column can be dragged wider */
.lbl-row.clips:not(:hover):not(.sel) .tstroke { display: none; }
.an-tl-resize { position: absolute; top: 0; bottom: 0; right: 0; width: 6px; cursor: col-resize; z-index: 5; }
.an-tl-resize:hover, .an-tl-resize.on { background: linear-gradient(90deg, transparent 4px, var(--accent) 4px 6px); }

/* ── Magic ── */
.an-magic { display: inline-flex; align-items: stretch; border-radius: 9px; overflow: hidden; box-shadow: 0 2px 10px rgba(178, 63, 196, .35); }
.an-magic-btn, .an-magic-more { border: 0; color: #fff; cursor: pointer; background: linear-gradient(110deg, #ff5fa2, #b14cff 55%, #4c7dff); background-size: 180% 100%; transition: background-position .4s var(--ease), filter .2s; }
.an-magic-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; height: 30px; font: 600 12px/1 inherit; font-family: inherit; }
.an-magic-btn svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.an-magic-more { width: 22px; display: grid; place-items: center; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .28); background-position: 100% 0; }
.an-magic-more svg { width: 9px; height: 9px; fill: none; stroke: #fff; stroke-width: 1.6; }
.an-magic:hover .an-magic-btn, .an-magic:hover .an-magic-more { background-position: 100% 0; filter: brightness(1.08); }
.an-magic-btn:active { filter: brightness(.95); }
.an-pop-magic { width: 300px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mg-moods { display: flex; flex-wrap: wrap; gap: 5px; }
.mg-pace { display: flex; } .mg-pace button { flex: 1; }
.mg-note { margin: 2px 0 0; font-size: 10.5px; line-height: 1.45; color: var(--text-3); }
.mg-go { width: 100%; }

/* ── the bar above the stage: Magic first, then one family of buttons, all the same size ── */
.an-stagebar { gap: 8px; padding: 8px 10px; }
.an-stagebar .an-magic { order: 0; }
.sb-group { display: inline-flex; align-items: center; gap: 4px; }
.sb-sep { width: 1px; height: 20px; background: var(--line-2); flex: none; }
.sb-btn { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--field); color: var(--text-2); font: 500 12px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.sb-btn:hover { background: var(--hover); color: var(--text); border-color: var(--line-2); }
.sb-btn:active { background: var(--press); }
.sb-btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sb-btn .an-bgsw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.sb-btn[hidden] { display: none; }
.an-magic-btn { height: 30px; font-size: 12px; }
.an-magic-more { height: 30px; }
.sb-mode .seg button { height: 24px; }
.an-stagebar { flex-wrap: nowrap; overflow: visible; }
.an-stagebar.sb-compact .sb-btn span, .an-stagebar.sb-compact .sb-mode > span { display: none; }
.an-stagebar.sb-compact .sb-btn { padding: 0; width: 30px; justify-content: center; }
.an-stagebar.sb-tight .an-magic-btn { font-size: 0; gap: 0; padding: 0 9px; }
.an-stagebar.sb-tight .sb-mode .seg button { padding: 0 7px; }

/* ── the transport bar of the timeline ── */
.an-tl-bar { gap: 10px; height: 42px; padding: 0 12px; }
.tb-transport { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 9px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }
.tb-btn { width: 30px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.tb-btn:hover { background: var(--hover); color: var(--text); }
.tb-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tb-btn svg .fill { fill: currentColor; stroke: none; }
.tb-btn.on { color: var(--accent); }
.tb-play { width: 36px; background: var(--accent-2); color: #fff; }
.tb-play:hover { background: var(--accent); color: #fff; }
.tb-time { display: inline-flex; align-items: baseline; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font: 600 13px/30px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); min-width: 136px; }
.tb-time span { color: var(--text-3); font-weight: 400; font-size: 11.5px; }
.tb-time span::before { content: '/ '; }
.tb-sep { width: 1px; height: 20px; background: var(--line-2); flex: none; }
.tb-dur { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.tb-dur input { width: 58px; height: 28px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); font: 12px var(--mono); padding: 0 18px 0 8px; outline: none; -moz-appearance: textfield; }
.tb-dur input::-webkit-inner-spin-button, .tb-dur input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tb-dur input:focus { border-color: var(--accent); }
.tb-dur i { font-style: normal; font: 11px var(--mono); color: var(--text-3); margin-left: -22px; pointer-events: none; }
.tb-auto { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.tb-auto input { position: absolute; opacity: 0; pointer-events: none; }
.tb-auto b { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--track); transition: background .15s; }
.tb-auto b::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tb-auto input:checked + b { background: var(--accent-2); }
.tb-auto input:checked + b::after { transform: translateX(12px); }
.tb-zoom { display: inline-flex; align-items: center; gap: 6px; }
.tb-zoom svg { width: 11px; height: 11px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; }
.tb-zoom input { width: 96px; accent-color: var(--accent); }

/* ── an element's bar on the time axis: it is there the whole time; blocks sit on top ── */
.lane-life { position: absolute; top: 7px; bottom: 7px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); overflow: hidden; }
.lane-life::before { content: ''; position: absolute; inset: 0; background: var(--tc, #888); opacity: .13; pointer-events: none; }
.lane-life.empty::before { opacity: .2; }
.lane-life span { position: relative; display: block; padding-left: 10px; font-size: 10.5px; line-height: 30px; color: var(--text-2); white-space: nowrap; pointer-events: none; }
.lane .clip { z-index: 1; }

/* ── the stage is the pasteboard: the canvas sits in it, content off the canvas stays visible (dimmed) ── */
.an-stage { padding: 0; display: block; background: #2a2a2e; }
.an-stage #view { position: absolute; inset: 0; border-radius: 0; box-shadow: none; }
.an-stage .an-zoombar, .an-stage .an-hint, .an-stage .an-pickbar, .an-stage .an-empty { z-index: 2; }
.an-stage .an-zoombar { position: absolute; }
body.an-panning, body.an-panning #view { cursor: grabbing !important; }

/* ── colours of the selected element ── */
.in-colours { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.in-sw { position: relative; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 1px 2px rgba(0, 0, 0, .3); overflow: hidden; }
.in-sw i { position: absolute; inset: 0; }
.in-sw.stroke i { inset: 0; border-radius: 7px; }
.in-sw.stroke::after { content: ''; position: absolute; inset: 7px; border-radius: 3px; background: var(--bg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.in-sw input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.in-sw:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 0 0 2px var(--accent); }
/* a template's colours: five roles, then every palette as a little strip */
.in-design { border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.in-design .in-shuffle { padding: 3px 9px; font-size: 10px; letter-spacing: 0; text-transform: none; }
.in-slots { display: flex; gap: 8px; margin: 4px 0 10px; }
.in-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; min-width: 0; }
.in-slot .in-sw { width: 32px; height: 32px; border-radius: 50%; }
.in-slot small { font-size: 9px; color: var(--text-3); white-space: nowrap; }
.in-pals { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-bottom: 4px; }
.in-pal { display: flex; height: 22px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); background: none; }
.in-pal i { flex: 1; }
.in-pal i:first-child { flex: 1.6; }
.in-pal:hover { box-shadow: 0 0 0 2px var(--accent); }
.in-pal.on { box-shadow: 0 0 0 2px var(--text-1, #fff); }

/* ── the library, big ── */
.lib-searchrow { display: flex; gap: 6px; align-items: center; }
.lib-searchrow .an-search { flex: 1; min-width: 0; }
.lib-expand { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--field); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.lib-expand:hover, .lib-expand.on { color: var(--text); background: var(--hover); }
.lib-expand.on { color: var(--accent); }
.lib-expand svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lib-backdrop { display: none; }
body.lib-big .lib-backdrop { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); }
body.lib-big .an-lib { position: fixed; top: 4%; left: 4%; right: 4%; bottom: 4%; z-index: 60; width: auto; max-width: none; border-radius: 14px; background: var(--bg); box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 0 0 1px var(--line-2); overflow: hidden; display: flex; flex-direction: column; }
body.lib-big .an-lib .an-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 14px; }
body.lib-big .an-lib .an-grid.an-grid-shapes { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
body.lib-big .an-lib .an-card-name, body.lib-big .an-lib .sh-name { font-size: 11.5px; }
body.lib-big .an-lib-head { padding: 14px 14px 10px; }

/* ── the project file, in the Export window ── */
.exp-project { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; }
.exp-project-h { display: flex; gap: 10px; align-items: flex-start; }
.exp-project-h .fi.ilo { flex: none; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font: 700 10px var(--mono); color: #fff; background: linear-gradient(120deg, #ff5fa2, #b14cff 55%, #4c7dff); }
.exp-project-h b { display: block; font-size: 12.5px; }
.exp-project-h span { display: block; font-size: 11px; color: var(--text-3); line-height: 1.45; margin-top: 2px; }
.exp-project-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.exp-project-btns .sb-btn:first-child { background: var(--accent-2); color: #fff; border-color: transparent; }
.an-offbar { top: auto; bottom: 14px; z-index: 3; }

/* ── the Layers window: Illustrator's Layers panel, every level ── */
#layers-pop { width: 380px; }
.lt-tree { max-height: min(52vh, 460px); overflow-y: auto; padding: 4px 0; border-bottom: 1px solid var(--line); }
.lt-row { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 calc(8px + var(--d) * 16px); font-size: 12px; color: var(--text); cursor: default; }
.lt-row:hover { background: var(--hover); }
.lt-row.lt-in, .lt-row.lt-el[data-el] { cursor: pointer; }
.lt-row.off { color: var(--text-3); }
.lt-row.lt-layer { font-weight: 600; }
.lt-row .lt-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-row small { color: var(--text-3); font-size: 10.5px; white-space: nowrap; }
.lt-caret { flex: none; width: 16px; height: 16px; border: 0; padding: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; cursor: pointer; transition: transform .15s; }
.lt-caret svg { width: 9px; height: 9px; fill: currentColor; }
.lt-caret.open { transform: rotate(90deg); }
.lt-caret.none { cursor: default; }
.lt-box { flex: none; width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--line-2); background: var(--field); padding: 0; cursor: pointer; position: relative; }
.lt-box.on { background: var(--accent-2); border-color: var(--accent-2); }
.lt-box.on::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lt-box.mixed { background: var(--accent-2); border-color: var(--accent-2); }
.lt-box.mixed::after { content: ''; position: absolute; left: 3px; right: 3px; top: 5.5px; height: 2px; background: #fff; border-radius: 1px; }
.lt-box.none { border-color: transparent; background: transparent; cursor: default; }
.lt-box:disabled { opacity: .4; cursor: default; }
.lt-chip { flex: none; width: 4px; height: 16px; border-radius: 2px; }
.lt-kind { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--text-3); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.lt-help { font-size: 10.5px; color: var(--text-3); padding-top: 0; }

/* ── tooltip cards with a picture, as in Illustrator ── */
.an-tipcard.rich { width: 284px; max-width: none; padding: 0; overflow: hidden; border-radius: 10px; background: #232327; box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: auto; z-index: 300; }
.an-tipcard.rich .tc-art svg { display: block; width: 100%; height: auto; }
.an-tipcard.rich .tc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.an-tipcard.rich .tc-h { display: flex; align-items: center; gap: 8px; }
.an-tipcard.rich .tc-h b { font-size: 13.5px; color: #fff; }
.an-tipcard.rich kbd { font: 11px var(--mono); padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, .1); color: #e6e6ea; }
.an-tipcard.rich p { margin: 0; font-size: 12px; line-height: 1.5; color: #c9c9d1; }
.an-tipcard.rich .tc-more { align-self: flex-end; margin-top: 4px; height: 28px; padding: 0 14px; border-radius: 99px; border: 1.5px solid #e9e9ee; background: transparent; color: #fff; font: 600 11.5px inherit; font-family: inherit; cursor: pointer; }
.an-tipcard.rich .tc-more:hover { background: rgba(255, 255, 255, .1); }

/* the bar never squeezes its groups (it switches to icons instead) — the Magic button keeps its arrow whole */
.an-stagebar > .an-magic, .an-stagebar > .sb-group, .an-stagebar > .sb-mode, .an-stagebar > .sb-sep { flex: none; }
.an-magic-btn, .an-magic-more { flex: none; padding-top: 0; padding-bottom: 0; }
.an-magic-more { width: 26px; padding: 0; }
.an-magic-more svg { width: 10px; height: 10px; }

/* ── 1.3.3 ── */
/* Magic: a star; the bar never cuts it — icons first, then the star alone, then a second line */
.an-magic-btn svg.mg-star { width: 16px; height: 16px; fill: #fff; stroke: none; overflow: visible; }
.an-magic-btn .mg-s2, .an-magic-btn .mg-s3 { transform-box: fill-box; transform-origin: center; }
.an-magic:hover .mg-s2 { animation: mg-twinkle .9s var(--ease) infinite alternate; }
.an-magic:hover .mg-s3 { animation: mg-twinkle .9s .3s var(--ease) infinite alternate; }
@keyframes mg-twinkle { from { opacity: 1; transform: scale(1); } to { opacity: .35; transform: scale(.55); } }
.an-magic { flex: none; min-width: max-content; }
.an-stagebar.sb-tight .an-magic-btn { font-size: 0; gap: 0; padding: 0 8px; width: 34px; justify-content: center; }
.an-stagebar.sb-tight .mg-label { display: none; }
.an-stagebar.sb-wrap { flex-wrap: wrap; row-gap: 6px; }
.an-stagebar.sb-wrap .an-grow { display: none; }
.an-stagebar.sb-wrap .an-pop { top: calc(100% + 4px); }

/* the project, next to Export */
.top-file { display: inline-flex; align-items: center; height: 28px; margin-right: 6px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--field); overflow: hidden; flex: none; }
.top-fbtn { height: 100%; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 0; background: transparent; color: var(--text-2); font: 500 12px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.top-fbtn + .top-fbtn { box-shadow: inset 1px 0 0 var(--line-2); }
.top-fbtn:hover { background: var(--hover); color: var(--text); }
.top-fbtn:active { background: var(--press); }
.top-fbtn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.top-fbtn.top-fmore { padding: 0 6px; }
.top-fbtn.top-fmore svg { width: 9px; height: 9px; stroke-width: 1.6; }
.menu-item small { margin-left: 8px; color: var(--text-3); font-size: 10.5px; }
.menu-item:hover small { color: rgba(255, 255, 255, .75); }
@media (max-width: 1000px) { .top-fbtn span { display: none; } .top-fbtn { padding: 0 8px; } }
@media (max-width: 760px) { .top-file { height: 26px; margin-right: 2px; } .top-fbtn { padding: 0 6px; } .top-fbtn.top-fmore { display: none; } }

/* the timeline: the row you are on, when nothing is selected; rows dragged together */
.lbl-row.cur { box-shadow: inset 2px 0 0 rgba(229, 98, 239, .45); }
.lane.clips.group-drag { background-image: linear-gradient(rgba(76, 141, 255, .07), rgba(76, 141, 255, .07)); }
.an .toast { z-index: 80; }

/* the big library: a window of its own — move it by its title, resize it from any edge, close it with ✕ */
.lib-win-h, .lib-rz { display: none; }
body.lib-big .an-lib { top: auto; left: auto; right: auto; bottom: auto; min-width: 0; }
body.lib-big .lib-win-h { display: flex; align-items: center; gap: 10px; height: 42px; flex: none; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-2, var(--bg)); cursor: move; user-select: none; }
.lib-win-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.lib-win-t > svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--text-3); stroke-width: 1.4; }
.lib-win-t b { font-size: 12.5px; font-weight: 600; color: var(--text); }
.lib-win-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--text-2); padding: 3px 9px; border-radius: 999px; background: transparent; }
.lib-win-note:empty { display: none; }
.lib-win-note i { font-style: normal; color: #3fd69a; font-weight: 700; }
.lib-win-note span { color: var(--text-3); }
.lib-win-note.on { animation: lib-note 1.6s var(--ease); }
@keyframes lib-note { 0% { background: rgba(63, 214, 154, .32); color: var(--text); } 70% { background: rgba(63, 214, 154, .14); } 100% { background: transparent; } }
.lib-win-size { display: flex; align-items: center; gap: 5px; color: var(--text-3); cursor: default; }
.lib-win-size svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.lib-win-size input { width: 96px; accent-color: var(--accent); }
.lib-win-x { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--field); color: var(--text); cursor: pointer; }
.lib-win-x:hover { background: #e5484d; border-color: #e5484d; color: #fff; }
.lib-win-x svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
body.lib-big .lib-rz { display: block; position: absolute; z-index: 3; }
.lib-rz.rz-n, .lib-rz.rz-s { left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.lib-rz.rz-e, .lib-rz.rz-w { top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.lib-rz.rz-n { top: 0; } .lib-rz.rz-s { bottom: 0; } .lib-rz.rz-e { right: 0; } .lib-rz.rz-w { left: 0; }
.lib-rz.rz-ne, .lib-rz.rz-nw, .lib-rz.rz-se, .lib-rz.rz-sw { width: 16px; height: 16px; }
.lib-rz.rz-ne { top: 0; right: 0; cursor: nesw-resize; } .lib-rz.rz-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.lib-rz.rz-nw { top: 0; left: 0; cursor: nwse-resize; } .lib-rz.rz-se { bottom: 0; right: 0; cursor: nwse-resize; }
.lib-rz.rz-se::after { content: ''; position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); border-radius: 0 0 3px 0; opacity: .7; }
body.lib-big .an-lib > .an-lib-head, body.lib-big .an-lib > .an-grid, body.lib-big .an-lib > .an-lib-foot { min-width: 0; }
body.lib-big .an-lib .an-grid { grid-template-columns: repeat(auto-fill, minmax(calc(200px * var(--libk, 1)), 1fr)); }
body.lib-big .an-lib .an-grid.an-grid-shapes { grid-template-columns: repeat(auto-fill, minmax(calc(132px * var(--libk, 1)), 1fr)); }
body.lib-moving, body.lib-moving * { user-select: none !important; }
body.lib-moving iframe, body.lib-moving canvas { pointer-events: none; }

/* a card you just added: a ring and a tick, so you see it even when the stage is behind the window */
.an-card.added { animation: card-added 1.4s var(--ease); }
.an-card.added::after { content: '✓ Added'; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); padding: 5px 11px; border-radius: 999px; background: #3fd69a; color: #08291c; font: 700 11.5px/1 inherit; font-family: inherit; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); pointer-events: none; animation: card-tick 1.4s var(--ease) forwards; z-index: 4; }
@keyframes card-added { 0% { box-shadow: inset 0 0 0 2px #3fd69a, 0 0 0 0 rgba(63, 214, 154, .6); transform: scale(.97); } 25% { transform: scale(1.02); } 60% { box-shadow: inset 0 0 0 2px #3fd69a, 0 0 0 10px rgba(63, 214, 154, 0); transform: scale(1); } 100% { box-shadow: inset 0 0 0 1.5px var(--accent); } }
@keyframes card-tick { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(.96); } }
.an-card.adding { pointer-events: none; }
.an-card.adding::after { content: 'Adding…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font: 600 11px/1 inherit; font-family: inherit; z-index: 4; }

/* the header never stacks its parts on each other: below 1100px the tabs take their place in the row */
@media (max-width: 1100px) {
    .an-top .an-tabs { position: static; transform: none; margin: 0 auto 0 10px; flex: none; }
}
@media (max-width: 560px) { .an-top .an-tabs { margin-left: 6px; } .an-top .an-tab { padding: 4px 7px; } }

/* the transport bar fits a docked panel: the time stays whole, names go to the tooltips */
.tb-time { white-space: nowrap; flex: none; }
@media (max-width: 760px) {
    .an-tl-bar { gap: 6px; }
    .tb-time { min-width: 0; padding: 0 8px; font-size: 12px; }
    .tb-time span { font-size: 10.5px; }
    .tb-sep, .tb-dur > span, .tb-auto > span, .tb-zoom svg { display: none; }
    .tb-dur input { width: 60px; }
    .tb-zoom input { width: 64px; }
    .an-tl-labels { width: 148px; }
}
@media (max-width: 440px) { .tb-zoom { display: none; } }

/* in its own window the library closes with ✕ (the expand button is for the side) */
body.lib-big #lib-expand { display: none; }
.lib-home { display: none; }
body.lib-big .lib-home { grid-area: lib; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; border-right: 1px solid var(--line); background: var(--bg); color: var(--text-3); font-size: 11.5px; line-height: 1.45; }
.lib-home svg { width: 26px; height: 26px; fill: none; stroke: var(--text-3); stroke-width: 1.2; opacity: .8; }
.lib-home b { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.lib-home .sb-btn { margin-top: 6px; }
@media (max-width: 760px) { body.lib-big .lib-home { border-right: 0; } body.lib-big[data-dock="insp"] .lib-home { display: none; } }

/* row names keep their room: Stroke shows on hover only; in a narrow panel the kind icon and the gaps step back */
.lbl-row.clips:not(:hover) .tstroke { display: none; }
@media (max-width: 760px) {
    .lbl-row { gap: 4px; padding: 0 5px 0 3px; }
    .lbl-row .tkind { display: none; }
    .lbl-row .teye { margin-right: 0; }
    .lbl-row .tkids { padding: 2px 5px 2px 12px; background-position: 4px 50%; }
    .lbl-row.clips:hover .tkids { display: none; }
}

/* a docked panel: the categories are one row that scrolls sideways (the wheel works), so the cards stay in view */
@media (max-width: 760px) {
    body:not(.lib-big) .an-lib .an-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 1px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
    body:not(.lib-big) .an-lib .an-cats::-webkit-scrollbar { display: none; }
    body:not(.lib-big) .an-lib .an-chip { flex: none; white-space: nowrap; }
    body:not(.lib-big) .an-fams { padding-top: 5px; }
}
@media (max-width: 760px) {
    .an-pane[data-pane="animate"] { grid-template-rows: minmax(130px, .85fr) auto minmax(230px, 1.35fr) minmax(150px, var(--tlh-dock, 200px)); }
    body:not(.lib-big) .an-lib-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; row-gap: 6px; padding: 7px 8px 6px; }
    body:not(.lib-big) .an-lib-head > * { grid-column: 1 / -1; }
    body:not(.lib-big) .an-lib-head > #lib-mode { grid-column: 1; align-self: center; }
    body:not(.lib-big) .an-lib-head > .lib-searchrow { grid-column: 2; }
    body:not(.lib-big) #lib-mode button { padding: 4px 8px; font-size: 10.5px; }
}

.an-dockbar button.nudge { animation: dock-nudge 1.4s var(--ease); }
@keyframes dock-nudge { 0%, 60% { background: var(--accent-2); color: #fff; } 100% { background: transparent; } }

/* fonts: the name, big, on the left; a sample in the font on the right (as in Illustrator's font menu) */
.tx-font { align-items: center; gap: 8px; padding: 7px 10px; }
.tx-font .tx-fname { flex: none; max-width: 52%; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-font .tx-fstyle { flex: none; color: var(--text-3); font-size: 10.5px; white-space: nowrap; }
.tx-font .tx-fsample { flex: 1; min-width: 0; text-align: right; font-size: 15px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-font.on .tx-fname { color: var(--accent); }
.tx-preview { margin: 8px 12px 0; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: repeating-conic-gradient(#f2f2f2 0 25%, #fff 0 50%) 0 0 / 14px 14px; overflow: hidden; }
.tx-preview[hidden] { display: none; }
.tx-preview svg { width: 94%; height: 54px; }
.an-zoombar.pulse { animation: zoom-pulse .5s var(--ease); }
@keyframes zoom-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 98, 239, .55); } 100% { box-shadow: 0 0 0 8px rgba(229, 98, 239, 0); } }
/* a row's bar can be dragged through time */
.lane-life:not(.empty) { cursor: grab; }
.lane-life:not(.empty):hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
body.an-moving, body.an-moving * { cursor: grabbing !important; }

/* Illustrator keeps its panels inside its window: when the window shrinks, the panel is squeezed with it. It never
   loses the stage or the timeline — wide and short: the timeline gives up height; narrow and short: one part at a time */
.an-dockbar .dock-tl { display: none; }
@media (min-width: 761px) and (max-height: 640px) {
    .an-pane[data-pane="animate"] { grid-template-rows: minmax(110px, 1fr) min(var(--tlh, 260px), 48vh); }
    .an-tl-bar { height: 36px; }
}
@media (max-width: 760px) and (max-height: 640px) {
    html, body { overflow: hidden; }
    .app.an { height: 100vh; min-height: 0; }
    .an-pane.on { flex: 1; height: auto; min-height: 0; }
    .an-pane[data-pane="animate"] { grid-template-rows: minmax(90px, 1fr) auto minmax(150px, 1.3fr); grid-template-areas: "center" "dock" "lib"; }
    .an-dockbar .dock-tl { display: block; }
    .an-timeline { grid-area: lib; display: none; }
    body[data-dock="tl"] .an-timeline { display: flex; }
    body[data-dock="tl"] .an-lib, body[data-dock="tl"] .an-insp { display: none; }
    body[data-dock="tl"] .an-tl-grip { display: none; }
    .app.an > .footer { display: none; }
}
@media (max-height: 640px) { .app.an > .footer { display: none; } }
.an-lib { overflow: hidden; }

/* ✕ closes Ilo Animation for real; uninstall from the ⋯ menu */
.an-close:hover { background: #e5484d; color: #fff; }
.menu-item.menu-danger { color: #ff7b7f; }
.menu-item.menu-danger:hover { background: #e5484d; color: #fff; }
.an-uninstall { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0, 0, 0, .55); }
.an-uninstall .an-modal-card { width: min(460px, calc(100vw - 32px)); padding-bottom: 16px; }
.un-p { margin: 4px 18px 10px; font-size: 12px; line-height: 1.55; color: var(--text-2); }
.un-list { margin: 0 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.un-list code { display: block; padding: 6px 8px; border-radius: 6px; background: var(--field); font: 10.5px/1.4 var(--mono); color: var(--text-2); word-break: break-all; }
.un-opt { display: flex; align-items: flex-start; gap: 8px; margin: 0 18px 8px; font-size: 11.5px; color: var(--text-2); cursor: pointer; }
.un-opt input { margin-top: 2px; accent-color: var(--accent); }
.un-btns { display: flex; justify-content: flex-end; gap: 8px; margin: 14px 18px 0; }
.un-go { background: #e5484d; color: #fff; border: 0; }
.un-go:hover { background: #f05a5f; }

/* a narrow, docked panel: Close and ⋯ always stay in view (Open, Save and Save as… are in the ⋯ menu too) */
@media (max-width: 560px) {
    .an-top .t-long, .an-top #btn-max { display: none; }
    .an-top .top-file { display: none; }
    .an-top .an-export-btn { padding: 0 10px; }
}
/* the trial badge takes its short form as soon as the header gets tight */
@media (max-width: 1000px) { .an-top .ilt-badge .lt, .an-top .ilt-badge .k { display: none; } .an-top .ilt-badge .sh { display: inline; } }
@media (max-width: 440px) {
    /* very narrow: the tabs get a row of their own under the buttons */
    .an-top { flex-wrap: wrap; height: auto; row-gap: 5px; padding-top: 5px; padding-bottom: 5px; }
    .an-top .an-tabs { order: 9; width: 100%; margin: 0; justify-content: center; }
    .an-top .an-tab { flex: 1; text-align: center; }
    .an-top .top-actions { margin-left: auto; }
    .an-top #btn-mini { display: none; }
    .an-top .an-export-btn { padding: 0 8px; }
}
@media (max-width: 290px) { .an-top .brand { display: none; } .an-top .ilt-badge .sh { display: none; } }
/* the examples strip never covers the zoom buttons: above them when the panel is narrow, words dropped when very narrow */
@media (max-width: 760px) { .an-hint { bottom: 50px; max-width: calc(100% - 20px); } }
@media (max-width: 560px) { .an-hint > span { display: none; } .an-hint { padding-left: 6px; } }

/* ─── the web app (ilotools.com/app): no panel window controls; a note where a feature needs Illustrator ─── */
.an-web #btn-mini, .an-web #btn-max, .an-web #btn-close { display: none; }
.an-webnote { display: grid; gap: 6px; justify-items: start; margin: 14px 14px 0; padding: 14px 16px; border-radius: 12px; background: rgba(180, 63, 208, 0.12); box-shadow: inset 0 0 0 1px rgba(180, 63, 208, 0.4); }
.an-webnote b { font-size: 13px; color: var(--text); }
.an-webnote span { font-size: 12px; line-height: 1.5; color: var(--text-3); max-width: 560px; }
.an-webnote .btn { margin-top: 4px; text-decoration: none; }

/* templates (web app): previews in their real proportions */
.an-webonly { display: none; }
.an-web .an-webonly { display: inline-flex; }
.an-grid.an-grid-tpl { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; align-items: start; }
.tpl-card { cursor: pointer; }
.tpl-thumb { display: flex; align-items: center; justify-content: center; padding: 6px; background: var(--card); border-radius: 8px; }
.tpl-thumb i { display: block; width: 100%; max-height: 190px; background: rgba(255,255,255,.04); border-radius: 4px; }
.tpl-thumb svg { display: block; width: 100%; max-height: 190px; height: auto; border-radius: 4px; box-shadow: 0 1px 0 rgba(0,0,0,.3); transition: transform .18s var(--ease); }
.tpl-card:hover .tpl-thumb svg { transform: translateY(-2px); }
.tpl-card.adding { opacity: .5; pointer-events: none; }

/* the language menu */
.menu-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 8px 6px; }
.menu-lang > span { width: 100%; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
.menu-chip { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: none; color: var(--text-2); font: inherit; font-size: 11px; cursor: pointer; }
.menu-chip:hover { border-color: var(--accent); color: var(--text); }
.menu-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Hebrew and Arabic read from the right: the panels, menus, pop-ups and messages turn around; the stage and the
   timeline keep time running left to right, like every video editor */
.an-rtl .an-lib, .an-rtl .an-insp, .an-rtl .an-pop, .an-rtl .menu, .an-rtl .toast, .an-rtl .an-modal-card, .an-rtl .an-webnote, .an-rtl .ilt, .an-rtl .stage-hint, .an-rtl .stage-empty, .an-rtl .an-dockbar { direction: rtl; }
.an-rtl .sl-track, .an-rtl .sl-val, .an-rtl .menu-info { direction: ltr; }
.an-rtl .menu-info { text-align: right; }
.an-rtl .an-search svg { left: auto; right: 8px; }
.an-rtl .an-search input { padding: 0 27px 0 8px; }
.an-rtl .an-tl-labels { direction: rtl; }
/* letters that need their own fonts in the interface */
.an-lang-zh { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
.an-lang-ar { font-family: -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; }
/* a phone: the canvas gets the room it needs (the page scrolls down to the library and the timeline) */
@media (max-width: 560px) {
    .an-pane.on { height: max(900px, calc(100vh - 40px)); }
    .an-pane[data-pane="animate"] { grid-template-rows: minmax(360px, 1.5fr) auto minmax(260px, 1fr) minmax(150px, var(--tlh-dock, 200px)); }
    .an-hint { max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; bottom: 8px; }
    .an-hint::-webkit-scrollbar { display: none; }
    .an-zoombar { bottom: 52px; }
}
/* your own AI */
.tpl-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; margin-bottom: 8px; border-radius: 10px; background: linear-gradient(135deg, rgba(229, 98, 239, .14), rgba(63, 214, 154, .08)); border: 1px solid rgba(229, 98, 239, .25); }
.tpl-ai input { flex: 1 1 200px; min-width: 0; height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); padding: 0 9px; font: inherit; font-size: 12px; outline: none; }
.tpl-ai input:focus { border-color: var(--accent); }
.tpl-ai .btn { height: 30px; white-space: nowrap; }
.tpl-ai-link { border: 0; background: none; color: var(--text-3); font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 2px 4px; }
.tpl-ai-link:hover { color: var(--text); }
.tpl-ai-h { display: flex; align-items: center; justify-content: space-between; }
.tpl-ai-more { grid-column: 1 / -1; justify-self: center; margin: 6px 0 10px; }
.ai-card { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.ai-p { margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.5; }
.ai-f { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ai-f > span { width: 64px; flex: none; color: var(--text-3); }
.ai-f[hidden] { display: none; }
.ai-f select, .ai-f input { flex: 1; min-width: 0; height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); padding: 0 8px; font: inherit; font-size: 12px; }
.ai-get { font-size: 11px; color: var(--accent); white-space: nowrap; }
.ai-get[hidden] { display: none; }
.ai-msg { margin: 0; min-height: 16px; font-size: 12px; color: var(--text-2); }
.ai-msg.bad { color: #ffb3b9; } .ai-msg.ok { color: #3fd69a; }
.ai-row { display: flex; gap: 8px; }
.ai-mcp { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-mcp b { font-size: 12.5px; }
.ai-code { display: flex; align-items: center; gap: 8px; }
.ai-code code { flex: 1; padding: 7px 9px; border-radius: 7px; background: var(--field); font: 11.5px var(--mono, monospace); user-select: all; overflow-x: auto; white-space: nowrap; }
.ai-pre { margin: 6px 0; padding: 8px; border-radius: 7px; background: var(--field); font: 11px var(--mono, monospace); overflow-x: auto; }
.ai-mcp summary { cursor: pointer; font-size: 11.5px; color: var(--text-2); }
.an-rtl .ai-card, .an-rtl .tpl-ai { direction: rtl; }
.an-rtl .ai-code, .an-rtl .ai-pre { direction: ltr; }
