image-to-pixel 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,418 +1,455 @@
1
- @import "./tokens.css";
2
-
3
- /* ---- base -------------------------------------------------------------- */
4
- .itp, .itp * { box-sizing: border-box; }
5
- .itp [hidden], .itp[hidden] { display: none !important; }
6
- .itp {
7
- color: var(--text);
8
- font: 400 var(--fs-md)/1.45 var(--font-ui);
9
- font-feature-settings: "ss01", "cv11";
10
- -webkit-font-smoothing: antialiased;
11
- }
12
- .itp-app {
13
- position: relative;
14
- height: 100%;
15
- min-height: 0;
16
- display: grid;
17
- grid-template-rows: 48px minmax(0, 1fr);
18
- grid-template-columns: var(--lib-w, 268px) minmax(0, 1fr) var(--insp-w, 312px);
19
- grid-template-areas: "top top top" "lib stage insp";
20
- background: var(--bg);
21
- overflow: hidden;
22
- }
23
- .itp-app[data-lib="closed"] { --lib-w: 0px; }
24
- .itp-app[data-insp="closed"] { --insp-w: 0px; }
25
- .itp button, .itp input, .itp select, .itp textarea { font: inherit; color: inherit; }
26
- .itp :focus { outline: none; }
27
- .itp :focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
28
- .itp .num, .itp output { font-variant-numeric: tabular-nums; }
29
- .itp .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
30
- .itp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
31
- .itp svg.i { width: 16px; height: 16px; max-width: none; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
32
- .itp .muted { color: var(--muted); }
33
- .itp hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
34
-
35
- /* ---- buttons ----------------------------------------------------------- */
36
- .itp-btn {
37
- display: inline-flex; align-items: center; justify-content: center; gap: 6px;
38
- height: 30px; padding: 0 10px;
39
- border: 1px solid transparent; border-radius: var(--r-sm);
40
- background: transparent; color: var(--text-2);
41
- cursor: pointer; white-space: nowrap; user-select: none;
42
- transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
43
- }
44
- .itp-btn:hover { background: var(--raised); color: var(--text); }
45
- .itp-btn[aria-pressed="true"] { background: var(--raised-2); color: var(--text); }
46
- .itp-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }
47
- .itp-btn.icon { width: 30px; padding: 0; }
48
- .itp-btn.outline { border-color: var(--line-strong); color: var(--text); }
49
- .itp-btn.outline:hover { border-color: var(--faint); }
50
- .itp-btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 550; padding: 0 12px; }
51
- .itp-btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
52
- .itp-btn.small { height: 26px; font-size: var(--fs-sm); padding: 0 8px; }
53
- .itp-btn.small.icon { width: 26px; padding: 0; }
54
- .itp-btn.block { width: 100%; }
55
- .itp-btn.danger:hover { color: var(--danger); }
56
- .itp-link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
57
- .itp-link:hover { color: var(--text); text-decoration-color: currentColor; }
58
- .itp kbd { font: 500 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--raised); }
59
-
60
- /* ---- top bar ----------------------------------------------------------- */
61
- .itp-top {
62
- grid-area: top;
63
- display: flex; align-items: center; gap: 4px;
64
- padding: 0 10px 0 8px;
65
- border-bottom: 1px solid var(--line);
66
- background: var(--panel);
67
- min-width: 0;
68
- }
69
- .itp-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px; height: 32px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
70
- .itp-brand:hover { background: var(--raised); }
71
- .itp-mark { width: 18px; height: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
72
- .itp-mark i { background: var(--text); border-radius: 1px; }
73
- .itp-mark i:nth-child(2), .itp-mark i:nth-child(4), .itp-mark i:nth-child(9) { background: var(--accent); }
74
- .itp-mark i:nth-child(6), .itp-mark i:nth-child(7) { opacity: 0.35; }
75
- .itp-top .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }
76
- .itp-file { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }
77
- .itp-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; cursor: text; padding: 2px 4px; margin: 0 -4px; border-radius: var(--r-sm); }
78
- .itp-file .name:hover { background: var(--raised); color: var(--text); }
79
- .itp-file .name[hidden] { display: none; }
80
- .itp-name-input { height: 26px; min-width: 0; max-width: 40ch; padding: 0 6px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--bg); color: var(--text); font: inherit; outline: none; }
81
- .itp-file .meta { color: var(--faint); white-space: nowrap; }
82
- .itp-top .spacer { flex: 1; }
83
- .itp-zoom { min-width: 64px; justify-content: space-between; }
84
- .itp-top .collapse-only { display: none; }
85
- .itp-top .contents { display: contents; }
86
-
87
- /* ---- side panels ------------------------------------------------------- */
88
- .itp-lib, .itp-insp {
89
- min-width: 0; min-height: 0;
90
- display: flex; flex-direction: column;
91
- background: var(--panel);
92
- overflow: hidden;
93
- }
94
- .itp-lib { grid-area: lib; border-right: 1px solid var(--line); }
95
- .itp-insp { grid-area: insp; border-left: 1px solid var(--line); }
96
- .itp-app[data-lib="closed"] .itp-lib, .itp-app[data-insp="closed"] .itp-insp { border: 0; visibility: hidden; }
97
- .itp-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
98
- .itp-panel-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
99
-
100
- /* tabs: segmented control */
101
- .itp-seg {
102
- display: inline-flex; padding: 2px; gap: 2px;
103
- background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md);
104
- width: 100%;
105
- }
106
- .itp-seg button {
107
- flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
108
- height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-sm);
109
- background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); white-space: nowrap;
110
- }
111
- .itp-seg button:hover { color: var(--text); }
112
- .itp-seg button[aria-selected="true"], .itp-seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
113
- :root[data-theme="dark"] .itp-seg button[aria-selected="true"], :root[data-theme="dark"] .itp-seg button[aria-pressed="true"] { background: var(--raised-2); }
114
- .itp-seg .count { color: var(--faint); font-variant-numeric: tabular-nums; }
115
- .itp-lib { container-type: inline-size; }
116
- /* the library tabs shrink in steps as the panel narrows: tighter spacing and smaller words first,
117
- then only the open tab keeps its word and the others become icons (their names stay as tooltips) */
118
- .itp-seg button span { overflow: hidden; text-overflow: ellipsis; }
119
- .itp-seg button svg { flex: none; }
120
- @container (max-width: 310px) {
121
- .itp-lib .itp-seg button { gap: 4px; padding: 0 5px; font-size: 12px; }
122
- }
123
- @container (max-width: 250px) {
124
- .itp-lib .itp-seg button { flex: 0 0 auto; min-width: 34px; }
125
- .itp-lib .itp-seg button[aria-selected="true"] { flex: 1 1 auto; }
126
- .itp-lib .itp-seg button:not([aria-selected="true"]) span {
127
- position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
128
- }
129
- }
130
- .itp-seg.compact { width: auto; }
131
-
132
- /* search field */
133
- .itp-search { position: relative; margin: 0 12px 8px; }
134
- .itp-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); }
135
- .itp-input, .itp-search input, .itp-select {
136
- width: 100%; height: 30px; padding: 0 9px;
137
- border: 1px solid var(--line); border-radius: var(--r-sm);
138
- background: var(--bg); color: var(--text);
139
- transition: border-color var(--dur) var(--ease);
140
- }
141
- .itp-search input { padding-left: 30px; }
142
- .itp-input:hover, .itp-select:hover, .itp-search input:hover { border-color: var(--line-strong); }
143
- .itp-input:focus-visible, .itp-select:focus-visible, .itp-search input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
144
- .itp-select { appearance: none; padding-right: 26px; cursor: pointer;
145
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2384868f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
146
- background-repeat: no-repeat; background-position: right 8px center; }
147
- .itp-select option, .itp-select optgroup { background: var(--panel); color: var(--text); }
148
- .itp textarea.itp-input { height: auto; padding: 7px 9px; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5; }
149
-
150
- /* group labels in lists */
151
- .itp-group { padding: 14px 14px 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--faint); letter-spacing: 0.01em; display: flex; align-items: center; justify-content: space-between; }
152
-
153
- /* library: files */
154
- .itp-files { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 1px; }
155
- .itp-file-row {
156
- display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;
157
- padding: 6px 6px; border-radius: var(--r-md); cursor: pointer; color: var(--text-2);
158
- border: 1px solid transparent;
159
- }
160
- .itp-file-row:hover { background: var(--raised); color: var(--text); }
161
- .itp-file-row[aria-current="true"] { background: var(--raised-2); color: var(--text); border-color: var(--line); }
162
- .itp-file-row .thumb { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; image-rendering: pixelated; background: var(--raised-2); border: 1px solid var(--line); }
163
- .itp-file-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
164
- .itp-file-row .sub { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
165
- .itp-file-row .actions { display: flex; gap: 0; }
166
- .itp-file-row .actions .itp-btn { opacity: 0; }
167
- .itp-file-row:hover .actions .itp-btn, .itp-file-row:focus-within .actions .itp-btn, .itp-file-row[aria-current="true"] .actions .itp-btn { opacity: 1; }
168
- .itp-file-row .sub { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
169
- .itp-own { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: var(--fs-xs); white-space: nowrap; }
170
- .itp-own svg.i { width: 12px; height: 12px; }
171
- @media (hover: none) { .itp-file-row .actions .itp-btn { opacity: 1; } }
172
- .itp-badge { display: inline-flex; align-items: center; height: 18px; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--raised-2); color: var(--muted); justify-content: center; }
173
- .itp-badge.accent { background: var(--accent); color: var(--accent-ink); }
174
- .itp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
175
-
176
- /* library: presets grid */
177
- .itp-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
178
- .itp-preset {
179
- display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; text-align: left;
180
- border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); cursor: pointer; overflow: hidden; color: var(--text-2);
181
- transition: border-color var(--dur) var(--ease);
182
- }
183
- .itp-preset:hover { border-color: var(--line-strong); color: var(--text); }
184
- .itp-preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
185
- .itp-preset canvas, .itp-preset .ph { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; display: block; background: var(--raised); border-bottom: 1px solid var(--line); object-fit: cover; }
186
- .itp-preset .t { padding: 0 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
187
- .itp-preset .d { padding: 0 8px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
188
-
189
- /* palette lists */
190
- .itp-pal-list { list-style: none; margin: 0; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 1px; }
191
- .itp-pal {
192
- display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; color: var(--text-2);
193
- }
194
- .itp-pal:hover { background: var(--raised); color: var(--text); }
195
- .itp-pal[aria-pressed="true"] { background: var(--raised-2); border-color: var(--line); color: var(--text); }
196
- .itp-pal .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
197
- .itp-pal .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
198
- .itp-pal .n { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
199
- .itp-strip { display: flex; height: 10px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.15); }
200
- .itp-strip i { flex: 1; }
201
-
202
- /* ---- stage ------------------------------------------------------------- */
203
- .itp-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--stage); }
204
- .itp-view { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }
205
- .itp-view.panning { cursor: grabbing; }
206
- .itp-view.picking { cursor: crosshair; }
207
- .itp-view canvas.screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
208
- .itp-split {
209
- position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none;
210
- }
211
- .itp-split::before { content: ""; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
212
- .itp-split button {
213
- pointer-events: auto; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
214
- width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); background: #fff; color: #222; cursor: ew-resize;
215
- display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
216
- }
217
- .itp-split .lbl { position: absolute; top: 12px; font-size: var(--fs-xs); padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; white-space: nowrap; }
218
- .itp-split .lbl.l { right: 10px; } .itp-split .lbl.r { left: 10px; }
219
-
220
- /* floating view controls */
221
- .itp-float { position: absolute; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }
222
- .itp-float.br { right: 12px; bottom: 12px; }
223
- .itp-float.bl { left: 12px; bottom: 12px; align-items: center; padding: 3px 10px; gap: 10px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; height: 32px; }
224
- .itp-float.bl b { color: var(--text-2); font-weight: 500; }
225
- .itp-busy { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); }
226
-
227
- /* empty state */
228
- .itp-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
229
- .itp-drop {
230
- width: min(520px, 100%); padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
231
- display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; background: color-mix(in srgb, var(--panel) 60%, transparent);
232
- }
233
- .itp-drop h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.01em; }
234
- .itp-drop p { margin: 0; color: var(--muted); max-width: 46ch; }
235
- .itp-drop .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
236
- .itp-drop .samples { display: flex; gap: 8px; margin-top: 4px; }
237
- .itp-drop .samples button { width: 64px; height: 48px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; cursor: pointer; background: var(--raised); }
238
- .itp-drop .samples button:hover { border-color: var(--accent); }
239
- .itp-drop .samples img { width: 100%; height: 100%; object-fit: cover; display: block; }
240
- .itp-dragging .itp-view::after {
241
- content: "Drop to add"; position: absolute; inset: 12px; border: 2px dashed var(--accent); border-radius: var(--r-lg);
242
- display: grid; place-items: center; color: var(--text); background: var(--accent-soft); font-weight: 500; pointer-events: none;
243
- }
244
-
245
- /* transport (video) */
246
- .itp-transport { display: none; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--panel); }
247
- .itp-stage[data-video="true"] .itp-transport { display: flex; }
248
- .itp-time { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; min-width: 108px; }
249
- .itp-time span { color: var(--faint); }
250
- .itp-scrub { flex: 1; }
251
- .itp-sound { position: relative; display: flex; align-items: center; }
252
- .itp-sound[hidden] { display: none; }
253
- /* volume: a vertical slider that pops up above the speaker button (all the way down = muted) */
254
- .itp-volpop {
255
- position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 20;
256
- display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 10px;
257
- background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
258
- font-size: var(--fs-xs); color: var(--muted); min-width: 36px;
259
- }
260
- .itp-volpop[hidden] { display: none; }
261
- .itp-vslider { --v: 0%; width: 28px; height: 108px; display: flex; justify-content: center; cursor: pointer; touch-action: none; border-radius: var(--r-sm); }
262
- .itp-vslider .track { position: relative; width: 4px; height: 100%; border-radius: 2px; background: var(--line-strong); }
263
- .itp-vslider .fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); border-radius: 2px; background: var(--accent); }
264
- .itp-vslider .thumb { position: absolute; left: 50%; bottom: var(--v); width: 12px; height: 12px; border-radius: 50%; background: var(--text); transform: translate(-50%, 50%); box-shadow: 0 0 0 2px var(--panel); }
265
- .itp-vslider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
266
-
267
- /* ---- inspector --------------------------------------------------------- */
268
- .itp-insp-head { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 10px; }
269
- .itp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
270
- .itp-stat { padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
271
- .itp-stat + .itp-stat { border-left: 1px solid var(--line); }
272
- .itp-stat .k { font-size: var(--fs-xs); color: var(--faint); }
273
- .itp-stat .v { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
274
- .itp-stat .v small { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); margin-left: 3px; }
275
-
276
- .itp-sec { border-bottom: 1px solid var(--line); }
277
- .itp-sec-head { display: flex; align-items: center; gap: 2px; padding-right: 8px; }
278
- .itp-sec-toggle {
279
- flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 12px 6px 12px 14px;
280
- border: 0; background: none; text-align: left; cursor: pointer; user-select: none; color: var(--text);
281
- }
282
- .itp-sec-toggle .title { font-weight: 550; white-space: nowrap; }
283
- .itp-sec-toggle .hint { color: var(--faint); font-weight: 400; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
284
- .itp-sec-toggle .chev { margin-left: auto; color: var(--faint); display: inline-flex; transition: transform var(--dur) var(--ease); }
285
- .itp-sec[data-open="true"] .itp-sec-toggle .chev { transform: rotate(90deg); }
286
- .itp-sec-toggle:hover .chev { color: var(--text); }
287
- .itp-sec-toggle:focus-visible { border-radius: var(--r-sm); }
288
- .itp-sec-reset { color: var(--faint); }
289
- .itp-sec-reset:hover { color: var(--text); }
290
- .itp-sec .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
291
-
292
- .itp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
293
- .itp-field > .lab { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
294
- .itp-field > .lab .val { color: var(--text); font-variant-numeric: tabular-nums; }
295
- .itp .help { color: var(--faint); font-size: var(--fs-xs); line-height: 1.4; }
296
- .itp-row { display: flex; gap: 8px; align-items: center; }
297
- .itp-row > * { min-width: 0; }
298
- .itp-row .grow { flex: 1; }
299
- .itp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
300
-
301
- /* slider with value */
302
- .itp-slider { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
303
- .itp-slider input[type="number"] { height: 26px; padding: 0 6px; text-align: right; font-size: var(--fs-sm); border-radius: 5px; }
304
- .itp-slider input[type="number"]::-webkit-inner-spin-button { opacity: 0.4; }
305
- .itp input[type="range"] {
306
- -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0;
307
- --p: 50%;
308
- }
309
- .itp input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), var(--raised-2) var(--p)); }
310
- .itp input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--raised-2); }
311
- .itp input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
312
- .itp input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
313
- .itp input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
314
- .itp input[type="range"]:focus-visible { box-shadow: none; }
315
- .itp input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }
316
- .itp input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }
317
-
318
- /* switch */
319
- .itp-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); }
320
- .itp-switch input { appearance: none; width: 28px; height: 16px; border-radius: 8px; background: var(--raised-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background var(--dur) var(--ease); margin: 0; }
321
- .itp-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
322
- .itp-switch input:checked { background: var(--accent); border-color: var(--accent); }
323
- .itp-switch input:checked::after { transform: translateX(12px); background: var(--accent-ink); }
324
-
325
- /* swatches */
326
- .itp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); gap: 4px; }
327
- .itp-swatch { aspect-ratio: 1; border-radius: 4px; border: 0; padding: 0; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25); }
328
- .itp-swatch:hover { transform: scale(1.12); z-index: 1; }
329
- .itp-swatch.add { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); display: grid; place-items: center; }
330
- .itp-swatch.add:hover { color: var(--text); }
331
- .itp-color { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); cursor: pointer; }
332
- .itp-color input[type="color"] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
333
- .itp-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
334
- .itp-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.3); }
335
- .itp-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
336
-
337
- .itp-scope { display: flex; flex-direction: column; gap: 6px; }
338
- .itp-scope .lab { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--text-2); }
339
- .itp-scope-note { color: var(--faint); font-size: var(--fs-xs); }
340
- .itp-insp[data-scope="own"] .itp-scope-note { color: var(--accent); }
341
- .itp-insp[data-scope="own"] .itp-scope .itp-seg button[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
342
-
343
- .itp-aspects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
344
- .itp-aspects button {
345
- display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 52px;
346
- border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--muted); cursor: pointer; font-size: var(--fs-xs);
347
- }
348
- .itp-aspects button:hover { border-color: var(--line-strong); color: var(--text); }
349
- .itp-aspects button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
350
- .itp-aspects i { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
351
- .itp-aspects i.orig { border-style: dashed; }
352
-
353
- .itp-insp-foot { padding: 12px 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
354
-
355
- /* ---- popovers, dialogs, toasts ---------------------------------------- */
356
- .itp-menu {
357
- position: fixed; z-index: 50; min-width: 240px; max-width: calc(100vw - 16px); padding: 5px; border-radius: var(--r-lg);
358
- background: var(--panel); box-shadow: var(--shadow-pop); display: flex; flex-direction: column;
359
- }
360
- .itp-menu[hidden] { display: none; }
361
- .itp-menu .mi {
362
- display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm);
363
- border: 0; background: none; text-align: left; cursor: pointer; color: var(--text-2);
364
- }
365
- .itp-menu .mi:hover, .itp-menu .mi:focus-visible { background: var(--raised); color: var(--text); box-shadow: none; }
366
- .itp-menu .mi:disabled { opacity: 0.4; cursor: default; background: none; }
367
- .itp-menu .mi small { display: block; color: var(--faint); font-size: var(--fs-xs); }
368
- .itp-menu .mlabel { padding: 8px 9px 4px; font-size: var(--fs-xs); color: var(--faint); }
369
- .itp-menu hr { margin: 5px 4px; }
370
-
371
- .itp-dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }
372
- .itp-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
373
- .itp-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
374
- .itp-dialog header h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
375
- .itp-dialog .content { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
376
- .itp-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
377
- .itp-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
378
- .itp-keys div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
379
- .itp-keys div span:last-child { display: flex; gap: 3px; }
380
-
381
- .itp-toasts { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
382
- .itp-toast {
383
- pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: min(520px, calc(100vw - 24px));
384
- padding: 9px 10px 9px 12px; border-radius: var(--r-md); background: var(--raised); color: var(--text); box-shadow: var(--shadow-pop); font-size: var(--fs-sm);
385
- animation: itp-in 160ms var(--ease);
386
- }
387
- .itp-toast .msg { flex: 1; }
388
- .itp-toast.error .itp-dot { background: var(--danger); }
389
- .itp-toast.ok .itp-dot { background: var(--ok); }
390
- .itp-toast.info .itp-dot { background: var(--accent); }
391
- .itp-progress { height: 3px; border-radius: 2px; background: var(--raised-2); overflow: hidden; margin-top: 6px; }
392
- .itp-progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 120ms linear; }
393
- @keyframes itp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
394
-
395
- .itp-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: itp-spin 700ms linear infinite; }
396
- @keyframes itp-spin { to { transform: rotate(360deg); } }
397
-
398
- /* ---- responsive -------------------------------------------------------- */
399
- @media (max-width: 1100px) {
400
- .itp-app { --lib-w: 232px; --insp-w: 288px; }
401
- }
402
- @media (max-width: 900px) {
403
- /* tablet: library becomes an overlay drawer */
404
- .itp-app { grid-template-columns: 0 minmax(0, 1fr) var(--insp-w, 288px); }
405
- .itp-lib { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 280px; box-shadow: var(--shadow-pop); transform: translateX(-100%); transition: transform 180ms var(--ease); visibility: hidden; }
406
- .itp-app[data-lib="open"] .itp-lib { transform: none; visibility: visible; }
407
- .itp-top .collapse-only { display: inline-flex; }
408
- .itp-file .meta { display: none; }
409
- }
410
- @media (max-width: 680px) {
411
- /* phone: stage on top, inspector as a bottom sheet */
412
- .itp-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr) auto; grid-template-areas: "top" "stage" "insp"; }
413
- .itp-insp { border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }
414
- .itp-app[data-insp="closed"] .itp-insp { max-height: 0; }
415
- .itp-top .hide-sm { display: none; }
416
- .itp-file .name { max-width: 14ch; }
417
- .itp-float.bl { display: none; }
418
- }
1
+ @import "./tokens.css";
2
+
3
+ /* ---- base -------------------------------------------------------------- */
4
+ .itp, .itp * { box-sizing: border-box; }
5
+ .itp [hidden], .itp[hidden] { display: none !important; }
6
+ .itp {
7
+ color: var(--text);
8
+ font: 400 var(--fs-md)/1.45 var(--font-ui);
9
+ font-feature-settings: "ss01", "cv11";
10
+ -webkit-font-smoothing: antialiased;
11
+ }
12
+ .itp-app {
13
+ position: relative;
14
+ height: 100%;
15
+ min-height: 0;
16
+ display: grid;
17
+ grid-template-rows: 48px minmax(0, 1fr);
18
+ grid-template-columns: var(--lib-w, 268px) minmax(0, 1fr) var(--insp-w, 312px);
19
+ grid-template-areas: "top top top" "lib stage insp";
20
+ background: var(--bg);
21
+ overflow: hidden;
22
+ }
23
+ .itp-app[data-lib="closed"] { --lib-w: 0px; }
24
+ .itp-app[data-insp="closed"] { --insp-w: 0px; }
25
+ .itp button, .itp input, .itp select, .itp textarea { font: inherit; color: inherit; }
26
+ .itp :focus { outline: none; }
27
+ .itp :focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
28
+ .itp .num, .itp output { font-variant-numeric: tabular-nums; }
29
+ .itp .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
30
+ .itp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
31
+ .itp svg.i { width: 16px; height: 16px; max-width: none; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
32
+ .itp .muted { color: var(--muted); }
33
+ .itp hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
34
+
35
+ /* ---- buttons ----------------------------------------------------------- */
36
+ .itp-btn {
37
+ display: inline-flex; align-items: center; justify-content: center; gap: 6px;
38
+ height: 30px; padding: 0 10px;
39
+ border: 1px solid transparent; border-radius: var(--r-sm);
40
+ background: transparent; color: var(--text-2);
41
+ cursor: pointer; white-space: nowrap; user-select: none;
42
+ transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
43
+ }
44
+ .itp-btn:hover { background: var(--raised); color: var(--text); }
45
+ .itp-btn[aria-pressed="true"] { background: var(--raised-2); color: var(--text); }
46
+ .itp-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }
47
+ .itp-btn.icon { width: 30px; padding: 0; }
48
+ .itp-btn.outline { border-color: var(--line-strong); color: var(--text); }
49
+ .itp-btn.outline:hover { border-color: var(--faint); }
50
+ .itp-btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 550; padding: 0 12px; }
51
+ .itp-btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
52
+ .itp-btn.small { height: 26px; font-size: var(--fs-sm); padding: 0 8px; }
53
+ .itp-btn.small.icon { width: 26px; padding: 0; }
54
+ .itp-btn.block { width: 100%; }
55
+ .itp-btn.danger:hover { color: var(--danger); }
56
+ .itp-link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
57
+ .itp-link:hover { color: var(--text); text-decoration-color: currentColor; }
58
+ .itp kbd { font: 500 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--raised); }
59
+
60
+ /* ---- top bar ----------------------------------------------------------- */
61
+ .itp-top {
62
+ grid-area: top;
63
+ display: flex; align-items: center; gap: 4px;
64
+ padding: 0 10px 0 8px;
65
+ border-bottom: 1px solid var(--line);
66
+ background: var(--panel);
67
+ min-width: 0;
68
+ }
69
+ .itp-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px; height: 32px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
70
+ .itp-brand:hover { background: var(--raised); }
71
+ .itp-mark { width: 18px; height: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
72
+ .itp-mark i { background: var(--text); border-radius: 1px; }
73
+ .itp-mark i:nth-child(2), .itp-mark i:nth-child(4), .itp-mark i:nth-child(9) { background: var(--accent); }
74
+ .itp-mark i:nth-child(6), .itp-mark i:nth-child(7) { opacity: 0.35; }
75
+ .itp-top .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }
76
+ .itp-file { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }
77
+ .itp-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; cursor: text; padding: 2px 4px; margin: 0 -4px; border-radius: var(--r-sm); }
78
+ .itp-file .name:hover { background: var(--raised); color: var(--text); }
79
+ .itp-file .name[hidden] { display: none; }
80
+ .itp-name-input { height: 26px; min-width: 0; max-width: 40ch; padding: 0 6px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--bg); color: var(--text); font: inherit; outline: none; }
81
+ .itp-file .meta { color: var(--faint); white-space: nowrap; }
82
+ .itp-top .spacer { flex: 1; }
83
+ .itp-zoom { min-width: 64px; justify-content: space-between; }
84
+ .itp-top .collapse-only { display: none; }
85
+ .itp-top .contents { display: contents; }
86
+
87
+ /* ---- side panels ------------------------------------------------------- */
88
+ .itp-lib, .itp-insp {
89
+ min-width: 0; min-height: 0;
90
+ display: flex; flex-direction: column;
91
+ background: var(--panel);
92
+ overflow: hidden;
93
+ }
94
+ .itp-lib { grid-area: lib; border-right: 1px solid var(--line); }
95
+ .itp-insp { grid-area: insp; border-left: 1px solid var(--line); }
96
+ .itp-app[data-lib="closed"] .itp-lib, .itp-app[data-insp="closed"] .itp-insp { border: 0; visibility: hidden; }
97
+ .itp-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
98
+ .itp-panel-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
99
+
100
+ /* tabs: segmented control */
101
+ .itp-seg {
102
+ display: inline-flex; padding: 2px; gap: 2px;
103
+ background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md);
104
+ width: 100%;
105
+ }
106
+ .itp-seg button {
107
+ flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
108
+ height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-sm);
109
+ background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); white-space: nowrap;
110
+ }
111
+ .itp-seg button:hover { color: var(--text); }
112
+ .itp-seg button[aria-selected="true"], .itp-seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
113
+ :root[data-theme="dark"] .itp-seg button[aria-selected="true"], :root[data-theme="dark"] .itp-seg button[aria-pressed="true"] { background: var(--raised-2); }
114
+ .itp-seg .count { color: var(--faint); font-variant-numeric: tabular-nums; }
115
+ .itp-lib { container-type: inline-size; }
116
+ /* the library tabs shrink in steps as the panel narrows: tighter spacing and smaller words first,
117
+ then only the open tab keeps its word and the others become icons (their names stay as tooltips) */
118
+ .itp-seg button span { overflow: hidden; text-overflow: ellipsis; }
119
+ .itp-seg button svg { flex: none; }
120
+ @container (max-width: 310px) {
121
+ .itp-lib .itp-seg button { gap: 4px; padding: 0 5px; font-size: 12px; }
122
+ }
123
+ @container (max-width: 250px) {
124
+ .itp-lib .itp-seg button { flex: 0 0 auto; min-width: 34px; }
125
+ .itp-lib .itp-seg button[aria-selected="true"] { flex: 1 1 auto; }
126
+ .itp-lib .itp-seg button:not([aria-selected="true"]) span {
127
+ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
128
+ }
129
+ }
130
+ .itp-seg.compact { width: auto; }
131
+
132
+ /* search field */
133
+ .itp-search { position: relative; margin: 0 12px 8px; }
134
+ .itp-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); }
135
+ .itp-input, .itp-search input, .itp-select {
136
+ width: 100%; height: 30px; padding: 0 9px;
137
+ border: 1px solid var(--line); border-radius: var(--r-sm);
138
+ background: var(--bg); color: var(--text);
139
+ transition: border-color var(--dur) var(--ease);
140
+ }
141
+ .itp-search input { padding-left: 30px; }
142
+ .itp-input:hover, .itp-select:hover, .itp-search input:hover { border-color: var(--line-strong); }
143
+ .itp-input:focus-visible, .itp-select:focus-visible, .itp-search input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
144
+ .itp-select { appearance: none; padding-right: 26px; cursor: pointer;
145
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2384868f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
146
+ background-repeat: no-repeat; background-position: right 8px center; }
147
+ .itp-select option, .itp-select optgroup { background: var(--panel); color: var(--text); }
148
+ .itp textarea.itp-input { height: auto; padding: 7px 9px; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5; }
149
+
150
+ /* group labels in lists */
151
+ .itp-group { padding: 14px 14px 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--faint); letter-spacing: 0.01em; display: flex; align-items: center; justify-content: space-between; }
152
+
153
+ /* library: files */
154
+ .itp-files { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 1px; }
155
+ .itp-file-row {
156
+ display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;
157
+ padding: 6px 6px; border-radius: var(--r-md); cursor: pointer; color: var(--text-2);
158
+ border: 1px solid transparent;
159
+ }
160
+ .itp-file-row:hover { background: var(--raised); color: var(--text); }
161
+ .itp-file-row[aria-current="true"] { background: var(--raised-2); color: var(--text); border-color: var(--line); }
162
+ .itp-file-row .thumb { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; image-rendering: pixelated; background: var(--raised-2); border: 1px solid var(--line); }
163
+ .itp-file-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
164
+ .itp-file-row .sub { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
165
+ .itp-file-row .actions { display: flex; gap: 0; }
166
+ .itp-file-row .actions .itp-btn { opacity: 0; }
167
+ .itp-file-row:hover .actions .itp-btn, .itp-file-row:focus-within .actions .itp-btn, .itp-file-row[aria-current="true"] .actions .itp-btn { opacity: 1; }
168
+ .itp-file-row .sub { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
169
+ .itp-own { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: var(--fs-xs); white-space: nowrap; }
170
+ .itp-own svg.i { width: 12px; height: 12px; }
171
+ @media (hover: none) { .itp-file-row .actions .itp-btn { opacity: 1; } }
172
+ .itp-badge { display: inline-flex; align-items: center; height: 18px; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--raised-2); color: var(--muted); justify-content: center; }
173
+ .itp-badge.accent { background: var(--accent); color: var(--accent-ink); }
174
+ .itp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
175
+
176
+ /* library: presets grid */
177
+ .itp-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
178
+ .itp-preset {
179
+ display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; text-align: left;
180
+ border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); cursor: pointer; overflow: hidden; color: var(--text-2);
181
+ transition: border-color var(--dur) var(--ease);
182
+ }
183
+ .itp-preset:hover { border-color: var(--line-strong); color: var(--text); }
184
+ .itp-preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
185
+ .itp-preset canvas, .itp-preset .ph { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; display: block; background: var(--raised); border-bottom: 1px solid var(--line); object-fit: cover; }
186
+ .itp-preset .t { padding: 0 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
187
+ .itp-preset .d { padding: 0 8px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
188
+
189
+ /* palette lists */
190
+ .itp-pal-list { list-style: none; margin: 0; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 1px; }
191
+ .itp-pal {
192
+ display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; color: var(--text-2);
193
+ }
194
+ .itp-pal:hover { background: var(--raised); color: var(--text); }
195
+ .itp-pal[aria-pressed="true"] { background: var(--raised-2); border-color: var(--line); color: var(--text); }
196
+ .itp-pal .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
197
+ .itp-pal .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
198
+ .itp-pal .n { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
199
+ .itp-strip { display: flex; height: 10px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.15); }
200
+ .itp-strip i { flex: 1; }
201
+
202
+ /* ---- stage ------------------------------------------------------------- */
203
+ .itp-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--stage); }
204
+ .itp-view { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }
205
+ .itp-view.panning { cursor: grabbing; }
206
+ .itp-view.picking { cursor: crosshair; }
207
+ .itp-view canvas.screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
208
+ .itp-split {
209
+ position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none;
210
+ }
211
+ .itp-split::before { content: ""; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
212
+ .itp-split button {
213
+ pointer-events: auto; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
214
+ width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); background: #fff; color: #222; cursor: ew-resize;
215
+ display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
216
+ }
217
+ .itp-split .lbl { position: absolute; top: 12px; font-size: var(--fs-xs); padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; white-space: nowrap; }
218
+ .itp-split .lbl.l { right: 10px; } .itp-split .lbl.r { left: 10px; }
219
+
220
+ /* floating view controls */
221
+ .itp-float { position: absolute; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }
222
+ .itp-float.br { right: 12px; bottom: 12px; }
223
+ .itp-float.bl { left: 12px; bottom: 12px; align-items: center; padding: 3px 10px; gap: 10px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; height: 32px; }
224
+ .itp-float.bl b { color: var(--text-2); font-weight: 500; }
225
+ .itp-busy { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); }
226
+
227
+ /* empty state */
228
+ .itp-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
229
+ .itp-drop {
230
+ width: min(520px, 100%); padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
231
+ display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; background: color-mix(in srgb, var(--panel) 60%, transparent);
232
+ }
233
+ .itp-drop h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.01em; }
234
+ .itp-drop p { margin: 0; color: var(--muted); max-width: 46ch; }
235
+ .itp-drop .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
236
+ .itp-drop .samples { display: flex; gap: 8px; margin-top: 4px; }
237
+ .itp-drop .samples button { width: 64px; height: 48px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; cursor: pointer; background: var(--raised); }
238
+ .itp-drop .samples button:hover { border-color: var(--accent); }
239
+ .itp-drop .samples img { width: 100%; height: 100%; object-fit: cover; display: block; }
240
+ .itp-dragging .itp-view::after {
241
+ content: "Drop to add"; position: absolute; inset: 12px; border: 2px dashed var(--accent); border-radius: var(--r-lg);
242
+ display: grid; place-items: center; color: var(--text); background: var(--accent-soft); font-weight: 500; pointer-events: none;
243
+ }
244
+
245
+ /* transport (video) */
246
+ .itp-transport { display: none; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--panel); }
247
+ .itp-stage[data-video="true"] .itp-transport { display: flex; }
248
+ .itp-time { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; min-width: 108px; }
249
+ .itp-time span { color: var(--faint); }
250
+ .itp-scrub { flex: 1; }
251
+ .itp-timeline-preview { position: absolute; z-index: 25; pointer-events: none; padding: 5px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop); }
252
+ .itp-timeline-image { position: relative; display: grid; place-items: center; height: 104px; overflow: hidden; border-radius: var(--r-sm); background: var(--raised); color: var(--muted); font-size: var(--fs-xs); }
253
+ .itp-timeline-image canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
254
+ .itp-timeline-time { display: block; padding: 5px 0 1px; text-align: center; font-size: var(--fs-xs); }
255
+ .itp-sound { position: relative; display: flex; align-items: center; }
256
+ .itp-sound[hidden] { display: none; }
257
+ /* volume: a vertical slider that pops up above the speaker button (all the way down = muted) */
258
+ .itp-volpop {
259
+ position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 20;
260
+ display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 10px;
261
+ background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
262
+ font-size: var(--fs-xs); color: var(--muted); min-width: 36px;
263
+ }
264
+ .itp-volpop[hidden] { display: none; }
265
+ .itp-vslider { --v: 0%; width: 28px; height: 108px; display: flex; justify-content: center; cursor: pointer; touch-action: none; border-radius: var(--r-sm); }
266
+ .itp-vslider .track { position: relative; width: 4px; height: 100%; border-radius: 2px; background: var(--line-strong); }
267
+ .itp-vslider .fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); border-radius: 2px; background: var(--accent); }
268
+ .itp-vslider .thumb { position: absolute; left: 50%; bottom: var(--v); width: 12px; height: 12px; border-radius: 50%; background: var(--text); transform: translate(-50%, 50%); box-shadow: 0 0 0 2px var(--panel); }
269
+ .itp-vslider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
270
+
271
+ /* ---- inspector --------------------------------------------------------- */
272
+ .itp-insp-head { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 10px; }
273
+ .itp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
274
+ .itp-stat { padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
275
+ .itp-stat + .itp-stat { border-left: 1px solid var(--line); }
276
+ .itp-stat .k { font-size: var(--fs-xs); color: var(--faint); }
277
+ .itp-stat .v { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
278
+ .itp-stat .v small { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); margin-left: 3px; }
279
+
280
+ .itp-sec { border-bottom: 1px solid var(--line); }
281
+ .itp-sec-head { display: flex; align-items: center; gap: 2px; padding-right: 8px; }
282
+ .itp-sec-toggle {
283
+ flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 12px 6px 12px 14px;
284
+ border: 0; background: none; text-align: left; cursor: pointer; user-select: none; color: var(--text);
285
+ }
286
+ .itp-sec-toggle .title { font-weight: 550; white-space: nowrap; }
287
+ .itp-sec-toggle .hint { color: var(--faint); font-weight: 400; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
288
+ .itp-sec-toggle .chev { margin-left: auto; color: var(--faint); display: inline-flex; transition: transform var(--dur) var(--ease); }
289
+ .itp-sec[data-open="true"] .itp-sec-toggle .chev { transform: rotate(90deg); }
290
+ .itp-sec-toggle:hover .chev { color: var(--text); }
291
+ .itp-sec-toggle:focus-visible { border-radius: var(--r-sm); }
292
+ .itp-sec-reset { color: var(--faint); }
293
+ .itp-sec-reset:hover { color: var(--text); }
294
+ .itp-sec .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
295
+
296
+ .itp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
297
+ .itp-field > .lab { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
298
+ .itp-field > .lab .val { color: var(--text); font-variant-numeric: tabular-nums; }
299
+ .itp .help { color: var(--faint); font-size: var(--fs-xs); line-height: 1.4; }
300
+ .itp-row { display: flex; gap: 8px; align-items: center; }
301
+ .itp-row > * { min-width: 0; }
302
+ .itp-row .grow { flex: 1; }
303
+ .itp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
304
+
305
+ /* slider with value */
306
+ .itp-slider { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
307
+ .itp-slider input[type="number"] { height: 26px; padding: 0 6px; text-align: right; font-size: var(--fs-sm); border-radius: 5px; }
308
+ .itp-slider input[type="number"]::-webkit-inner-spin-button { opacity: 0.4; }
309
+ .itp input[type="range"] {
310
+ -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0;
311
+ --p: 50%;
312
+ }
313
+ .itp input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), var(--raised-2) var(--p)); }
314
+ .itp input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--raised-2); }
315
+ .itp input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
316
+ .itp input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
317
+ .itp input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
318
+ .itp input[type="range"]:focus-visible { box-shadow: none; }
319
+ .itp input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }
320
+ .itp input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }
321
+
322
+ /* switch */
323
+ .itp-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); }
324
+ .itp-switch input { appearance: none; width: 28px; height: 16px; border-radius: 8px; background: var(--raised-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background var(--dur) var(--ease); margin: 0; }
325
+ .itp-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
326
+ .itp-switch input:checked { background: var(--accent); border-color: var(--accent); }
327
+ .itp-switch input:checked::after { transform: translateX(12px); background: var(--accent-ink); }
328
+
329
+ /* swatches */
330
+ .itp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); gap: 4px; }
331
+ .itp-swatch { aspect-ratio: 1; border-radius: 4px; border: 0; padding: 0; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25); }
332
+ .itp-swatch:hover { transform: scale(1.12); z-index: 1; }
333
+ .itp-swatch.add { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); display: grid; place-items: center; }
334
+ .itp-swatch.add:hover { color: var(--text); }
335
+ .itp-color { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); cursor: pointer; }
336
+ .itp-color input[type="color"] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
337
+ .itp-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
338
+ .itp-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.3); }
339
+ .itp-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
340
+
341
+ .itp-scope { display: flex; flex-direction: column; gap: 6px; }
342
+ .itp-scope .lab { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--text-2); }
343
+ .itp-scope-note { color: var(--faint); font-size: var(--fs-xs); }
344
+ .itp-insp[data-scope="own"] .itp-scope-note { color: var(--accent); }
345
+ .itp-insp[data-scope="own"] .itp-scope .itp-seg button[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
346
+
347
+ .itp-aspects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
348
+ .itp-aspects button {
349
+ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 52px;
350
+ border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--muted); cursor: pointer; font-size: var(--fs-xs);
351
+ }
352
+ .itp-aspects button:hover { border-color: var(--line-strong); color: var(--text); }
353
+ .itp-aspects button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
354
+ .itp-aspects i { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
355
+ .itp-aspects i.orig { border-style: dashed; }
356
+
357
+ .itp-insp-foot { padding: 12px 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
358
+
359
+ /* ---- popovers, dialogs, toasts ---------------------------------------- */
360
+ .itp-menu {
361
+ position: fixed; z-index: 50; min-width: 240px; max-width: calc(100vw - 16px); padding: 5px; border-radius: var(--r-lg);
362
+ background: var(--panel); box-shadow: var(--shadow-pop); display: flex; flex-direction: column;
363
+ }
364
+ .itp-menu[hidden] { display: none; }
365
+ .itp-menu .mi {
366
+ display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm);
367
+ border: 0; background: none; text-align: left; cursor: pointer; color: var(--text-2);
368
+ }
369
+ .itp-menu .mi:hover, .itp-menu .mi:focus-visible { background: var(--raised); color: var(--text); box-shadow: none; }
370
+ .itp-menu .mi:disabled { opacity: 0.4; cursor: default; background: none; }
371
+ .itp-menu .mi small { display: block; color: var(--faint); font-size: var(--fs-xs); }
372
+ .itp-menu .mlabel { padding: 8px 9px 4px; font-size: var(--fs-xs); color: var(--faint); }
373
+ .itp-menu hr { margin: 5px 4px; }
374
+
375
+ .itp-dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }
376
+ .itp-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
377
+ .itp-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
378
+ .itp-dialog header h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
379
+ .itp-dialog .content { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
380
+ .itp-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
381
+ /* Video frame selection replaces the main preview canvas. */
382
+ .itp-storyboard { display: flex; flex: 1; min-width: 0; min-height: 0; }
383
+ .itp-story-overlay { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; pointer-events: none; }
384
+ .itp-story-overlay > .itp-float { position: static; pointer-events: auto; }
385
+ .itp-story-head { min-width: 0; max-width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 10px; min-height: 34px; color: var(--muted); font-size: var(--fs-xs); }
386
+ .itp-story-head > .num { white-space: nowrap; color: var(--text); }
387
+ .itp-story-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
388
+ .itp-story-actions { max-width: 100%; margin-left: auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
389
+ .itp-story-zoom { display: flex; align-items: center; gap: 3px; }
390
+ .itp-story-zoom span { min-width: 38px; text-align: center; font-size: var(--fs-xs); color: var(--muted); }
391
+ .itp-story-grid { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: var(--stage); touch-action: none; }
392
+ .itp-story-canvas { display: block; width: 100%; height: 100%; cursor: grab; image-rendering: pixelated; outline: none; }
393
+ .itp-story-canvas:active { cursor: grabbing; }
394
+ .itp-transport.itp-transport-tiled { flex: none; height: auto; min-height: 54px; gap: 10px; padding: 8px 12px; }
395
+ .itp-story-time { display: flex; flex: none; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--muted); }
396
+ .itp-story-time input { width: 76px; padding: 0 5px; font-size: var(--fs-xs); }
397
+ .itp-transport-tiled > .num { font-size: var(--fs-xs); white-space: nowrap; }
398
+ /* Pointer drags are handled in JS (pointer-events: none keeps the native thumbs inert), so the
399
+ handles behave the same in every browser. */
400
+ .itp-story-range { --from: 0%; --to: 100%; position: relative; flex: 1; min-width: 48px; height: 30px; cursor: default; touch-action: none; user-select: none; }
401
+ .itp-story-range-track { position: absolute; left: 7px; right: 7px; top: 13px; height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--raised-2) var(--from), var(--accent) var(--from), var(--accent) var(--to), var(--raised-2) var(--to)); }
402
+ .itp .itp-story-range input[type="range"] { position: absolute; inset: 0; width: 100%; height: 30px; margin: 0; pointer-events: none; background: transparent; }
403
+ .itp .itp-story-range input::-webkit-slider-runnable-track { background: transparent; }
404
+ .itp .itp-story-range input::-moz-range-track, .itp .itp-story-range input::-moz-range-progress { background: transparent; }
405
+ /* match the WebKit thumb size so both engines place the thumbs on the same track geometry */
406
+ .itp .itp-story-range input::-moz-range-thumb { width: 14px; height: 14px; }
407
+ @media (max-width: 680px) {
408
+ .itp-story-overlay { left: 8px; right: 8px; bottom: 8px; }
409
+ .itp-story-status { display: none; }
410
+ .itp-transport.itp-transport-tiled { flex-wrap: wrap; gap: 6px 10px; }
411
+ .itp-story-range { order: -1; flex-basis: 100%; }
412
+ .itp-transport-tiled > .num { margin-left: auto; }
413
+ }
414
+ .itp-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
415
+ .itp-keys div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
416
+ .itp-keys div span:last-child { display: flex; gap: 3px; }
417
+
418
+ .itp-toasts { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
419
+ .itp-toast {
420
+ pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: min(520px, calc(100vw - 24px));
421
+ padding: 9px 10px 9px 12px; border-radius: var(--r-md); background: var(--raised); color: var(--text); box-shadow: var(--shadow-pop); font-size: var(--fs-sm);
422
+ animation: itp-in 160ms var(--ease);
423
+ }
424
+ .itp-toast .msg { flex: 1; }
425
+ .itp-toast.error .itp-dot { background: var(--danger); }
426
+ .itp-toast.ok .itp-dot { background: var(--ok); }
427
+ .itp-toast.info .itp-dot { background: var(--accent); }
428
+ .itp-progress { height: 3px; border-radius: 2px; background: var(--raised-2); overflow: hidden; margin-top: 6px; }
429
+ .itp-progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 120ms linear; }
430
+ @keyframes itp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
431
+
432
+ .itp-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: itp-spin 700ms linear infinite; }
433
+ @keyframes itp-spin { to { transform: rotate(360deg); } }
434
+
435
+ /* ---- responsive -------------------------------------------------------- */
436
+ @media (max-width: 1100px) {
437
+ .itp-app { --lib-w: 232px; --insp-w: 288px; }
438
+ }
439
+ @media (max-width: 900px) {
440
+ /* tablet: library becomes an overlay drawer */
441
+ .itp-app { grid-template-columns: 0 minmax(0, 1fr) var(--insp-w, 288px); }
442
+ .itp-lib { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 280px; box-shadow: var(--shadow-pop); transform: translateX(-100%); transition: transform 180ms var(--ease); visibility: hidden; }
443
+ .itp-app[data-lib="open"] .itp-lib { transform: none; visibility: visible; }
444
+ .itp-top .collapse-only { display: inline-flex; }
445
+ .itp-file .meta { display: none; }
446
+ }
447
+ @media (max-width: 680px) {
448
+ /* phone: stage on top, inspector as a bottom sheet */
449
+ .itp-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr) auto; grid-template-areas: "top" "stage" "insp"; }
450
+ .itp-insp { border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }
451
+ .itp-app[data-insp="closed"] .itp-insp { max-height: 0; }
452
+ .itp-top .hide-sm { display: none; }
453
+ .itp-file .name { max-width: 14ch; }
454
+ .itp-float.bl { display: none; }
455
+ }