/* =====================================================================
   MADEBYEYAD — SPATIAL look
   Frosted glass floating over a blurred room (Eyad's own artwork, blurred),
   pill toolbars, big soft corners, sentence-case type. Loaded last on every
   Studio page; everything is scoped under .studio-app.
   ===================================================================== */

/* ---------------------------------------------------------------- tokens */
:root .studio-app:not([data-theme="dark"]):not(.cam-app) {
  --st-bg: #ececf0;
  --st-canvas-bg: rgba(206, 207, 212, .55);
  --st-panel: rgba(255, 255, 255, .52);
  --st-panel-2: rgba(255, 255, 255, .34);
  --st-raised: rgba(255, 255, 255, .62);
  --st-hover: rgba(0, 0, 0, .06);
  --st-line: rgba(0, 0, 0, .07);
  --st-line-2: rgba(0, 0, 0, .12);
  --st-text: #1c1c1f;
  --st-dim: rgba(28, 28, 31, .62);
  --st-faint: rgba(28, 28, 31, .4);
  --st-accent: #5b6cf0;
  --st-accent-hi: #4453d6;
  --st-accent-soft: rgba(91, 108, 240, .14);
  --st-sel: #4c7dff;
  --st-shadow: 0 30px 80px rgba(20, 22, 30, .18), 0 2px 10px rgba(20, 22, 30, .08);
  --sp-wall: url('../img/wall-light.webp');
  --sp-glass: rgba(255, 255, 255, .46);
  --sp-glass-strong: rgba(250, 250, 252, .74);
  --sp-stroke: rgba(255, 255, 255, .75);
  --sp-edge: rgba(0, 0, 0, .06);
  --sp-hi: rgba(255, 255, 255, .95);
  --sp-chip: rgba(0, 0, 0, .05);
  --sp-chip-h: rgba(0, 0, 0, .09);
  --sp-solid: #16171b;
  --sp-on-solid: #fff;
  --sp-drop: 0 18px 50px rgba(30, 32, 40, .16), 0 2px 6px rgba(30, 32, 40, .06);
  color-scheme: light;
}
:root .studio-app[data-theme="dark"], :root .studio-app.cam-app,
:root[data-studio-theme="dark"] .studio-app:not([data-theme="light"]) {
  --st-bg: #0b0b10;
  --st-canvas-bg: rgba(6, 6, 9, .55);
  --st-panel: rgba(26, 26, 33, .56);
  --st-panel-2: rgba(255, 255, 255, .045);
  --st-raised: rgba(255, 255, 255, .09);
  --st-hover: rgba(255, 255, 255, .09);
  --st-line: rgba(255, 255, 255, .07);
  --st-line-2: rgba(255, 255, 255, .14);
  --st-text: #f5f5f7;
  --st-dim: rgba(235, 235, 245, .64);
  --st-faint: rgba(235, 235, 245, .4);
  --st-accent: #8c9bff;
  --st-accent-hi: #a9b3ff;
  --st-accent-soft: rgba(140, 155, 255, .16);
  --st-sel: #7aa2ff;
  --st-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 2px 10px rgba(0, 0, 0, .3);
  --sp-wall: url('../img/wall-dark.webp');
  --sp-glass: rgba(30, 30, 38, .5);
  --sp-glass-strong: rgba(22, 22, 28, .84);
  --sp-stroke: rgba(255, 255, 255, .12);
  --sp-edge: rgba(0, 0, 0, .25);
  --sp-hi: rgba(255, 255, 255, .22);
  --sp-chip: rgba(255, 255, 255, .08);
  --sp-chip-h: rgba(255, 255, 255, .15);
  --sp-solid: #f5f5f7;
  --sp-on-solid: #111114;
  --sp-drop: 0 22px 60px rgba(0, 0, 0, .38), 0 2px 8px rgba(0, 0, 0, .22);
  color-scheme: dark;
}
:root .studio-app {
  --st-display: 'Studio Inter', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --st-radius: 12px;
  --st-radius-lg: 22px;
  --st-accent-text: var(--sp-on-solid);
  --sp-bf: blur(30px) saturate(1.8);
  --sp-bf-strong: blur(44px) saturate(1.9);
  --sp-ring: inset 0 1px 0 var(--sp-hi), inset 0 0 0 1px var(--sp-stroke);
  --sp-r-pill: 999px;
  --sp-r-card: 24px;
  --sp-r-win: 32px;
  --sp-bf-bar: blur(22px) saturate(1.7);
  --brand: #ff3b2f; --brand-2: #c9201c; --brand-grad: linear-gradient(145deg, #ff6a4d, #e8261f 55%, #b3121a);
}
/* no live blur (Settings ▸ Look ▸ Live frosted glass off, or slow devices): solid glass */
:root .studio-app:not(.xp-glass) { --sp-bf: none; --sp-bf-strong: none; --sp-bf-bar: none; }
:root .studio-app:not(.xp-glass):not([data-theme="dark"]) { --sp-glass: rgba(246, 246, 248, .94); --st-panel: rgba(246, 246, 248, .96); }
:root .studio-app[data-theme="dark"]:not(.xp-glass) { --sp-glass: rgba(26, 26, 32, .95); --st-panel: rgba(26, 26, 32, .96); }

/* the room: every page sits in front of the blurred artwork */
.studio-root { background: #0b0b10; }
.studio-root[data-studio-theme="light"] { background: #ececf0; }
:root .studio-app { background: transparent; font-family: var(--st-ui); }
.studio-root::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #0b0b10 url('../img/wall-dark.webp') center / cover no-repeat; transform: translateZ(0); }
.studio-root[data-studio-theme="light"]::before { background-color: #ececf0; background-image: url('../img/wall-light.webp'); }
.studio-root:has(.studio-app[data-wall="plain"])::before { background-image: none; }
:root .studio-app.is-hub::before, body.xp-home::before { display: none; }
body.xp-home { background: transparent !important; }

/* sentence case everywhere — no shouting labels */
:root .studio-app *:not(svg):not(svg *) { text-transform: none !important; }
:root .studio-app :is(.studio-label, .studio-btn, .img-panel-toggle, .vid-tab, .img-opt-tool, .t3-sub, .fl-sec-title, .cam-lookname, .studio-page-title, .hub-title, .hub-app-name, .tpl-blank-head, .studio-badge, .studio-menubar-item, .studio-switcher-item, .fls-title, .fm-sec) { letter-spacing: -.005em !important; font-family: var(--st-ui) !important; }
:root .studio-app :is(.studio-label, .img-panel-toggle, .t3-sub, .fl-sec-title, .fm-sec, .tpl-blank-head) { font-weight: 600; font-size: 12px; color: var(--st-dim); }
:root .studio-app :is(.studio-page-title, .hub-title) { font-weight: 650; letter-spacing: -.03em !important; line-height: 1; }
:root .studio-app .studio-page-title em { color: var(--st-dim); font-weight: 300; }

/* ---------------------------------------------------------------- glass primitives */
:root .studio-app :is(.studio-menu, .studio-palette, .studio-toast, .studio-dialog, .studio-sheet, .xp-tour-card, .studio-popover) {
  background: var(--sp-glass-strong); -webkit-backdrop-filter: var(--sp-bf-strong); backdrop-filter: var(--sp-bf-strong);
  border: 0; box-shadow: var(--sp-ring), var(--sp-drop); color: var(--st-text);
}
:root .studio-app .studio-dialog { border-radius: var(--sp-r-win); }
:root .studio-app .studio-dialog-head, :root .studio-app .studio-dialog-foot { border-color: var(--st-line) !important; background: transparent; }
:root .studio-app .studio-menu { border-radius: 16px; padding: 6px; }
:root .studio-app .studio-menu-item { border-radius: 8px; }
:root .studio-app .studio-menu-item:hover:not(:disabled), :root .studio-app .studio-menu-item:focus-visible { background: var(--sp-chip-h); color: var(--st-text); }
:root .studio-app .studio-toast { border-radius: var(--sp-r-pill); }
:root .studio-app .studio-scrim { background: rgba(10, 10, 14, .28); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root .studio-app .studio-card, :root .studio-app .hub-storage, :root .studio-app .hub-settings-card {
  background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf);
  border: 0; border-radius: var(--sp-r-card); box-shadow: var(--sp-ring), var(--sp-drop);
}

/* buttons: pills; primary = solid white (dark) / black (light) like visionOS */
:root .studio-app .studio-btn { border-radius: var(--sp-r-pill); border: 0; background: var(--sp-chip); box-shadow: inset 0 0 0 1px var(--st-line); color: var(--st-text); font-weight: 550; padding: 0 16px; transition: background .2s, transform .15s var(--st-ease), box-shadow .2s; }
:root .studio-app .studio-btn:hover:not(:disabled) { background: var(--sp-chip-h); }
:root .studio-app .studio-btn:active:not(:disabled) { transform: scale(.97); }
:root .studio-app .studio-btn.is-primary { background: var(--sp-solid); color: var(--sp-on-solid); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
:root .studio-app .studio-btn.is-primary:hover:not(:disabled) { background: var(--sp-solid); filter: brightness(1.08); }
:root .studio-app .studio-btn.is-ghost { background: transparent; box-shadow: none; }
:root .studio-app .studio-btn.is-ghost:hover { background: var(--sp-chip); }
:root .studio-app .studio-btn.is-danger { color: #ff6b6b; }
:root .studio-app .studio-icon-btn { border-radius: 50%; }
:root .studio-app .studio-icon-btn:hover:not(:disabled) { background: var(--sp-chip-h); }
:root .studio-app :is(.studio-input, select.studio-input, textarea.studio-input) { border-radius: 12px; border: 0; background: var(--sp-chip); box-shadow: inset 0 0 0 1px var(--st-line); }
:root .studio-app :is(.studio-input):focus { box-shadow: inset 0 0 0 1.5px var(--st-accent); outline: none; }
:root .studio-app .studio-badge { background: var(--sp-chip); color: var(--st-text); border-radius: var(--sp-r-pill); }
:root .studio-app .studio-kbd { border-radius: 8px; background: var(--sp-chip); border-color: var(--st-line); }
:root .studio-app ::selection { background: var(--st-accent); color: #fff; }
:root .studio-app input[type="range"] { accent-color: var(--st-text); }
:root .studio-app input[type="checkbox"] { accent-color: var(--st-accent); }

/* ---------------------------------------------------------------- hub header (floating pill) */
:root .studio-app .studio-hub-header, :root .studio-app .studio-hub-header.xp-menubar {
  position: sticky; top: calc(10px + var(--sat)); z-index: 50;
  width: min(1240px, calc(100% - 24px)); margin: calc(10px + var(--sat)) auto 0; min-height: 52px; padding: 7px 8px 7px 16px;
  border-radius: var(--sp-r-pill); border: 0; background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf-bar); backdrop-filter: var(--sp-bf-bar);
  box-shadow: var(--sp-ring), var(--sp-drop);
}
:root .studio-app.is-hub .studio-hub-header { padding-top: 7px; padding-left: 16px; padding-right: 8px; }
:root .studio-app .studio-brand-mark { width: 26px; height: 26px; flex: none; border-radius: 8px; color: #fff;
  background: linear-gradient(#fff, #fff) 7.5px 7px / 11px 2.6px no-repeat, linear-gradient(#fff, #fff) 7.5px 11.7px / 7px 2.6px no-repeat, linear-gradient(#fff, #fff) 7.5px 16.4px / 11px 2.6px no-repeat, var(--brand-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px -2px rgba(232, 38, 31, .55); }
:root .studio-app .studio-brand-mark > * { display: none; }
:root .studio-app .studio-brand-word { font-family: 'Studio Oswald', 'Oswald', var(--st-ui) !important; font-weight: 700; font-size: 17px; letter-spacing: .04em !important; display: inline-flex; align-items: baseline; gap: 6px; }
:root .studio-app .studio-brand-word .studio-brand-app { font-family: var(--st-ui) !important; font-weight: 500; font-size: 11px; letter-spacing: .22em !important; color: var(--st-dim); }
:root .studio-app .studio-brand-mark::after { display: none; }
:root .studio-app .studio-brand, :root .studio-app .studio-brand-app { font-family: var(--st-ui) !important; letter-spacing: -.01em !important; }
:root .studio-app .xp-menubar .studio-brand-app, :root .studio-app .studio-brand-app { color: var(--st-dim); font-weight: 400; }
:root .studio-app .studio-switcher { border-radius: var(--sp-r-pill); background: var(--sp-chip); border: 0; padding: 3px; gap: 2px; }
:root .studio-app .studio-switcher-item { border-radius: var(--sp-r-pill); color: var(--st-dim); font-family: var(--st-ui); font-weight: 550; font-size: 12.5px; }
:root .studio-app .studio-switcher-item:hover { background: var(--sp-chip); color: var(--st-text); }
:root .studio-app .studio-switcher-item.is-active { background: var(--sp-solid); color: var(--sp-on-solid); box-shadow: 0 3px 10px rgba(0,0,0,.18); }
:root .studio-app .xp-bar-btn, :root .studio-app .studio-back, :root .studio-app .studio-theme-toggle { border-radius: var(--sp-r-pill); border: 0; background: var(--sp-chip); font-family: var(--st-ui); font-weight: 550; letter-spacing: 0; }
:root .studio-app .xp-bar-btn:hover, :root .studio-app .studio-back:hover, :root .studio-app .studio-theme-toggle:hover { background: var(--sp-chip-h); }
:root .studio-app .studio-hub-footer { border: 0; justify-content: center; color: var(--st-faint); }

/* ---------------------------------------------------------------- dock (glass pill) */
:root .studio-app .xp-dock-shelf { border-radius: 32px; padding: 8px 10px; gap: 8px; border: 0; background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf-bar); backdrop-filter: var(--sp-bf-bar); box-shadow: var(--sp-ring), var(--sp-drop); }
:root .studio-app .xp-dock-item .xp-appicon { filter: none; border-radius: 50%; box-shadow: 0 6px 12px -2px rgba(0, 0, 0, .35); }
:root .studio-app .xp-dock-item.is-running::after { width: 5px; height: 5px; margin-left: -2.5px; bottom: -6px; background: var(--st-text); }
:root .studio-app .xp-dock-item::before { border-radius: var(--sp-r-pill); background: var(--sp-glass-strong); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); color: var(--st-text); box-shadow: var(--sp-ring); font-family: var(--st-ui); }
:root .studio-app .xp-dock-sep { background: var(--st-line-2); }

/* window controls → three quiet glass dots */
:root .studio-app .xp-wc { width: 12px; height: 12px; background: var(--sp-chip-h) !important; box-shadow: inset 0 0 0 1px var(--st-line-2); }
:root .studio-app .xp-wc span { color: var(--st-text); }
:root .studio-app .xp-wc.is-close:hover { background: #ff5f57 !important; }
:root .studio-app .xp-wc.is-min:hover { background: #febc2e !important; }
:root .studio-app .xp-wc.is-zoom:hover { background: #28c840 !important; }

/* tour */
:root .studio-app .xp-tour-card { border-radius: 24px; }
:root .studio-app .xp-tour-card b { font-family: var(--st-ui); letter-spacing: -.01em; font-size: 17px; }
:root .studio-app .xp-tour-hole { border-radius: 24px; box-shadow: 0 0 0 9999px rgba(8, 8, 12, .5), 0 0 0 2px rgba(255, 255, 255, .8); }
:root .studio-app .xp-step-n { background: var(--sp-solid); color: var(--sp-on-solid); }

/* ---------------------------------------------------------------- hub pages content */
:root .studio-app .hub-card, :root .studio-app .hub-app { background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); border: 0; border-radius: var(--sp-r-card); box-shadow: var(--sp-ring), var(--sp-drop); }
:root .studio-app .hub-card:hover, :root .studio-app .hub-app:hover { transform: translateY(-4px) scale(1.01); border-color: transparent; }
:root .studio-app .hub-thumb { border-radius: 16px; margin: 6px 6px 0; }
:root .studio-app .hub-chip, :root .studio-app .fl-group, :root .studio-app .fm-chip, :root .studio-app .cam-chip { border-radius: var(--sp-r-pill); border: 0; background: var(--sp-chip); color: var(--st-dim); }
:root .studio-app .hub-chip.is-active, :root .studio-app .fl-group.is-active, :root .studio-app .cam-chip.is-active { background: var(--sp-solid); color: var(--sp-on-solid); }
:root .studio-app .hub-drop { border-radius: var(--sp-r-card); border: 1.5px dashed var(--st-line-2); background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); }
:root .studio-app .hub-switch:checked { background: #34c759; }
:root .studio-app .fm-row { border-radius: 12px; border: 0; background: var(--sp-chip); }
:root .studio-app .tpl-thumb { border-radius: var(--sp-r-card); background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring); border: 0; }
:root .studio-app .tpl-art { border-radius: 8px; }
:root .studio-app .tpl-blank { border-radius: 24px; border: 0; background: var(--sp-glass); box-shadow: var(--sp-ring); }
:root .studio-app .tpl-preview-art { border-radius: var(--sp-r-card); background: var(--sp-chip); }

/* ---------------------------------------------------------------- editors: floating islands */
:root .studio-app:is(.img-app, .vid-app) { gap: 8px; padding: calc(8px + var(--sat)) calc(8px + var(--sar)) calc(8px + var(--sab)) calc(8px + var(--sal)); }
:root .studio-app .img-top { border-radius: var(--sp-r-pill); border: 0; background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring), var(--sp-drop); padding: 0 6px 0 12px; position: relative; z-index: 20; }
:root .studio-app .img-options { justify-self: center; max-width: 100%; border-radius: var(--sp-r-pill); border: 0; background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring), var(--sp-drop); padding: 0 14px; min-height: 40px; position: relative; z-index: 15; }
:root .studio-app .img-opt-tool { font-weight: 600; font-size: 12.5px; border-color: var(--st-line-2); }
:root .studio-app .img-seg { border-radius: var(--sp-r-pill); background: var(--sp-chip); border: 0; }
:root .studio-app .img-seg > * { border-radius: var(--sp-r-pill); }
:root .studio-app .studio-menubar-item { border-radius: var(--sp-r-pill); font-weight: 500; }
:root .studio-app .studio-menubar-item:hover, :root .studio-app .studio-menubar-item.is-open { background: var(--sp-chip-h); }
:root .studio-app .img-main { gap: 8px; }
:root .studio-app .img-toolbar { align-self: center; max-height: 100%; width: 52px; padding: 8px 0; gap: 3px; border: 0; border-radius: 24px; background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring), var(--sp-drop); }
:root .studio-app .img-tool { width: 38px; height: 34px; border-radius: 16px; }
:root .studio-app .img-tool:hover { background: var(--sp-chip-h); color: var(--st-text); }
:root .studio-app .img-tool.is-active { background: var(--sp-solid); color: var(--sp-on-solid); box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }
:root .studio-app .img-toolbar-sep { background: var(--st-line-2); }
:root .studio-app .img-swatch { border-radius: 50%; border-color: transparent; }
:root .studio-app .img-center { border-radius: var(--sp-r-card); overflow: hidden; box-shadow: var(--sp-ring), var(--sp-drop); background: var(--st-canvas-bg); }
:root .studio-app .img-tabs { background: var(--sp-glass); border: 0; -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); padding: 4px 6px 0; gap: 4px; height: 36px; }
:root .studio-app .img-tab { border-radius: 12px 12px 0 0; border: 0 !important; }
:root .studio-app .img-stage { background: transparent; }
:root .studio-app .img-panels { background: transparent; border: 0 !important; gap: 8px; padding: 0 2px 2px; }
:root .studio-app .img-panel { border: 0; border-radius: var(--sp-r-card); background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring); overflow: hidden; }
:root .studio-app .img-panel-head { background: transparent; height: 38px; padding: 0 8px 0 10px; }
:root .studio-app .img-panel-toggle { font-size: 13px !important; color: var(--st-text) !important; }
:root .studio-app .img-status { justify-self: center; border-radius: var(--sp-r-pill); border: 0; background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring); padding: 0 14px; max-width: 100%; }
:root .studio-app .img-app > .img-status { grid-row: auto; }
:root .studio-app .img-resize-edge { border-radius: 4px; }
:root .studio-app .img-layer, :root .studio-app .img-layer-row { border-radius: 12px; margin: 1px 6px; }
:root .studio-app .img-dock { border-radius: 24px; background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring), var(--sp-drop); border: 0; }
:root .studio-app .img-dock-tool.is-active, :root .studio-app.t3-app .img-dock-tool.is-active { background: var(--sp-solid); color: var(--sp-on-solid); border-radius: 50%; }
.studio-app[data-panels="left"] .img-toolbar, .studio-app[data-panels="left"] .img-panels { border: 0 !important; }

/* video */
:root .studio-app .vid-main { gap: 8px; background: transparent; }
:root .studio-app .vid-panel { border-radius: var(--sp-r-card); background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring); border: 0; }
:root .studio-app .vid-panel-head { border: 0; }
:root .studio-app .vid-tabs { background: transparent; border: 0; padding: 6px 8px 0; align-items: center; gap: 4px; }
:root .studio-app .vid-tab { border-radius: var(--sp-r-pill); height: 28px; font-weight: 550; font-size: 12.5px; }
:root .studio-app .vid-tab.is-active { background: var(--sp-solid); color: var(--sp-on-solid); }
:root .studio-app .vid-screen { background: transparent; }
:root .studio-app .vid-program-box { border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
:root .studio-app .vid-transport { background: transparent; border: 0; }
:root .studio-app .vid-play:hover { background: var(--sp-solid); color: var(--sp-on-solid); }
:root .studio-app .vid-resizer { background: transparent; }
:root .studio-app .vid-edge { border-radius: 4px; }

/* 3D */
:root .studio-app .t3-timeline { border: 0; background: transparent; }
:root .studio-app .t3-tl-track { border-radius: 12px; background: var(--sp-chip); border: 0; }
:root .studio-app .t3-hud-btn { border-radius: var(--sp-r-pill); background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring); border: 0; color: var(--st-text); }
:root .studio-app .t3-empty-card { border-radius: var(--sp-r-win); background: var(--sp-glass-strong); border: 0; box-shadow: var(--sp-ring), var(--sp-drop); }

/* vector pasteboard */
:root .studio-app .vec-svg { background: transparent; }

/* camera chrome */
:root .studio-app .cam-top { margin: calc(8px + var(--sat)) 10px 0; border-radius: var(--sp-r-pill); background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); box-shadow: var(--sp-ring); border: 0; }
:root .studio-app .cam-dock { background: var(--sp-glass); -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf); border: 0; border-radius: 32px 32px 0 0; box-shadow: var(--sp-ring); }
:root .studio-app .cam-panel { border-radius: var(--sp-r-win); background: var(--sp-glass-strong); -webkit-backdrop-filter: var(--sp-bf-strong); backdrop-filter: var(--sp-bf-strong); border: 0; box-shadow: var(--sp-ring), var(--sp-drop); }
:root .studio-app .cam-lookname { color: var(--st-text); font-weight: 600; }
:root .studio-app .cam-home { border-radius: 50%; }

/* phones: tighter islands */
@media (max-width: 760px) {
  :root .studio-app:is(.img-app, .vid-app) { gap: 6px; padding: calc(6px + var(--sat)) 6px calc(6px + var(--sab)); }
  :root .studio-app .studio-hub-header, :root .studio-app .studio-hub-header.xp-menubar { border-radius: 24px; width: calc(100% - 16px); }
  :root .studio-app .img-center { border-radius: 16px; }
}
@media (prefers-reduced-transparency: reduce) { :root .studio-app { --sp-bf: none; --sp-bf-strong: none; } }

/* =====================================================================
   HOME — native launcher
   ===================================================================== */
body.xp-home { min-height: 100dvh; display: flex; flex-direction: column; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
body.xp-home .studio-hub-main { flex: 1; min-height: 0; width: min(1480px, 100%); padding: 10px 24px calc(104px + var(--sab)); display: flex; }
body.xp-home .studio-hub-main > * { animation: none; }
body.xp-home .studio-hub-footer, body.xp-home .studio-hub-header .studio-switcher { display: none; }

/* the board: floating glass cards */
.hm-board { --px: 0; --py: 0; flex: 1; min-height: 0; display: grid; gap: 18px; align-content: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3.2fr);
  grid-template-areas: "hero studios studios" "cont create device"; }
.hm-hero { grid-area: hero; } .hm-studios { grid-area: studios; } .hm-continue { grid-area: cont; } .hm-create { grid-area: create; } .hm-device { grid-area: device; }
.hm-card { --d: 8; position: relative; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 32px; isolation: isolate;
  background: linear-gradient(155deg, color-mix(in srgb, #fff 9%, transparent), transparent 42%), var(--sp-glass);
  -webkit-backdrop-filter: var(--sp-bf); backdrop-filter: var(--sp-bf);
  box-shadow: var(--sp-ring), inset 0 1px 0 rgba(255, 255, 255, .28), 0 30px 70px -18px rgba(0, 0, 0, .45), 0 8px 20px -10px rgba(0, 0, 0, .3);
  translate: calc(var(--px) * var(--d) * -1px) calc(var(--py) * var(--d) * -1px);
  transition: translate .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
  animation: hm-rise .6s cubic-bezier(.2, .85, .2, 1) both; }
/* a soft specular sweep across the top of each pane of glass */
.hm-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 20% -10%, rgba(255, 255, 255, .22), transparent 60%); }
.hm-card:nth-child(2) { animation-delay: .05s; } .hm-card:nth-child(3) { animation-delay: .1s; } .hm-card:nth-child(4) { animation-delay: .15s; } .hm-card:nth-child(5) { animation-delay: .2s; }
@keyframes hm-rise { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.hm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.studio-app .hm-card-head h2 { font-family: var(--st-ui); font-size: 17px; font-weight: 650; letter-spacing: -.02em !important; }
.hm-card-note { font-size: 12px; color: var(--st-dim); }

/* hero */
.hm-hero { justify-content: space-between; padding: 26px; gap: 18px; }
.hm-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hm-greet { font-size: 14px; font-weight: 600; color: var(--st-dim); padding: 6px 12px; border-radius: 999px; background: var(--sp-chip); }
.hm-time { display: grid; justify-items: end; line-height: 1.1; }
.hm-clock { font-size: 30px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hm-day { font-size: 12px; color: var(--st-dim); }
.studio-app .hm-title { font-family: var(--st-ui); font-size: clamp(30px, 3.3vw, 50px); line-height: 1.02; font-weight: 680; letter-spacing: -.045em !important; margin: 0; text-wrap: balance; }
.hm-title em { font-style: normal; background: linear-gradient(100deg, #ff8a7a, #ffc56b 35%, #6ff0da 70%, #b49bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--sp-chip); box-shadow: var(--sp-ring), inset 0 1px 2px rgba(0, 0, 0, .12); color: var(--st-dim); transition: background .2s; }
.hm-search:focus-within { background: var(--sp-chip-h); }
.hm-search-input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--st-text); font-size: 14.5px; -webkit-user-select: text; user-select: text; }
.hm-search kbd { font: 600 11px var(--st-ui); padding: 3px 8px; border-radius: 8px; background: var(--sp-chip-h); color: var(--st-dim); }
.hm-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* studios */
.hm-apps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; flex: 1; }
.hm-app { position: relative; overflow: hidden; display: grid; align-content: start; justify-items: start; gap: 3px; padding: 14px 14px 16px; border-radius: 24px; text-decoration: none; color: var(--st-text); -webkit-tap-highlight-color: transparent;
  background: linear-gradient(165deg, color-mix(in srgb, var(--c1) 26%, transparent), color-mix(in srgb, var(--c2) 10%, transparent) 70%), var(--sp-chip);
  box-shadow: var(--sp-ring), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .35s cubic-bezier(.2, .9, .2, 1.25), box-shadow .3s, opacity .25s; animation: hm-pop .6s cubic-bezier(.2, .9, .25, 1.15) both; animation-delay: calc(.15s + var(--i) * 45ms); }
.hm-app::after { content: ''; position: absolute; width: 190px; height: 190px; right: -90px; bottom: -100px; border-radius: 50%; background: radial-gradient(closest-side, var(--c1), transparent); opacity: .4; pointer-events: none; transition: opacity .3s; }
@keyframes hm-pop { from { opacity: 0; transform: scale(.8) translateY(14px); } }
.hm-app:hover, .hm-app:focus-visible { transform: translateY(-8px) scale(1.03); box-shadow: var(--sp-ring), inset 0 1px 0 rgba(255, 255, 255, .3), 0 24px 40px -14px color-mix(in srgb, var(--c2) 70%, #000); outline: none; }
.hm-app:hover::after { opacity: .5; }
.hm-app:active { transform: scale(.96); transition-duration: .1s; }
.hm-icon { width: 62px; height: 62px; margin-bottom: 10px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 12px 18px -6px rgba(0, 0, 0, .45); transition: transform .35s cubic-bezier(.2, .9, .2, 1.3); }
.hm-icon .xp-appicon { width: 100%; height: 100%; }
.eyad-icon .eyad-icon-front { transition: transform .35s cubic-bezier(.2, .9, .2, 1.3); transform-origin: 50% 50%; }
.hm-app:hover .hm-icon { transform: scale(1.08) rotate(-4deg); }
.hm-app:hover .eyad-icon-front, .hm-chip:hover .eyad-icon-front, .xp-dock-item:hover .eyad-icon-front { transform: translateY(-2.5px) scale(1.06); }
.hm-app .xp-app-name { font-size: 17px; font-weight: 680; letter-spacing: -.02em; }
.hm-app-what { font-size: 12.5px; font-weight: 550; }
.hm-app-sub { font-size: 11px; color: var(--st-dim); line-height: 1.3; }
.hm-app.is-dim, .hm-chip.is-dim, .hm-size.is-dim, .hm-proj.is-dim { opacity: .18; }
.hm-more { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-chip { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px; text-decoration: none; color: var(--st-text); font-size: 12.5px; font-weight: 600; background: var(--sp-chip); box-shadow: var(--sp-ring); transition: transform .25s cubic-bezier(.2, .9, .2, 1.3), background .2s, opacity .25s; }
.hm-chip:hover { background: var(--sp-chip-h); transform: translateY(-3px); }
.hm-chip .xp-appicon { width: 28px; height: 28px; }
.hm-zoom { position: fixed; inset: 0; z-index: 3000; pointer-events: none; background: var(--st-bg); clip-path: circle(0 at var(--x) var(--y)); transition: clip-path .32s cubic-bezier(.4, 0, .2, 1); }
.hm-zoom.is-on { clip-path: circle(150% at var(--x) var(--y)); }

/* start new */
.hm-sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.xp-home .xp-size.hm-size { display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border: 0; border-radius: 16px; text-decoration: none; color: var(--st-text); background: var(--sp-chip); box-shadow: var(--sp-ring); transition: transform .25s cubic-bezier(.2, .9, .2, 1.2), background .2s, opacity .25s; }
body.xp-home .xp-size.hm-size:hover { background: var(--sp-chip-h); transform: translateY(-3px); }
body.xp-home .xp-size.hm-size:active { transform: scale(.97); }
.hm-size-shape { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--sp-chip); }
.hm-size-shape i { display: block; border-radius: 4px; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.55)); box-shadow: 0 3px 8px rgba(0,0,0,.25); }
:root .studio-app:not([data-theme="dark"]) .hm-size-shape i { background: linear-gradient(135deg, #fff, #e9e9ee); box-shadow: 0 3px 8px rgba(0,0,0,.14); }
.hm-size-text { display: grid; gap: 1px; min-width: 0; }
.hm-size-text b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.xp-home .hm-size-text span { font-size: 10.5px; color: var(--st-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* continue */
.hm-recent { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; flex: 1; align-content: start; }
.hm-proj { display: grid; gap: 2px; text-decoration: none; color: var(--st-text); min-width: 0; transition: transform .3s cubic-bezier(.2, .9, .2, 1.25), opacity .25s; }
.hm-proj:hover { transform: translateY(-5px); }
.hm-proj-media { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; margin-bottom: 5px; background: var(--sp-chip); box-shadow: var(--sp-ring), 0 12px 24px -10px rgba(0, 0, 0, .45); }
.hm-proj-media .hub-thumb, .hm-proj-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; margin: 0; aspect-ratio: auto; }
.hm-proj-media .xp-appicon { position: absolute; left: 7px; bottom: 7px; width: 26px; height: 26px; }
.hm-proj b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-proj > span:last-child { font-size: 10.5px; color: var(--st-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-proj:nth-child(n+4) { display: none; }
.hm-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 24px; background: var(--sp-chip); }
.hm-empty > div { display: grid; gap: 3px; } .hm-empty b { font-size: 15px; } .hm-empty .studio-dim { font-size: 12.5px; }
.hm-empty .xp-appicon { flex: none; }

/* this device */
.hm-widgets { display: grid; gap: 8px; }
.hm-widget { display: grid; grid-template-columns: 32px auto 1fr; align-items: center; column-gap: 10px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--sp-chip); box-shadow: var(--sp-ring); }
.hm-widget .sp-w-ic { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--sp-chip-h); }
.hm-widget .sp-w-label { font-size: 12px; color: var(--st-dim); }
.hm-widget b { font-size: 15px; font-weight: 650; letter-spacing: -.02em; justify-self: end; }
.hm-widget .sp-w-sub { grid-column: 2 / -1; font-size: 10.5px; color: var(--st-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-note { font-size: 11.5px; line-height: 1.4; margin: 0; }
.hm-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: var(--st-text); font: 600 12.5px var(--st-ui); cursor: pointer; opacity: 1; }
.hm-link:hover { opacity: 1; }
body.xp-home .xp-recover { border-radius: 16px; font-size: 12px; }

@media (min-width: 1101px) and (min-height: 800px) { body.xp-home { height: 100dvh; overflow: hidden; } }
@media (max-height: 799px) { .hm-board { align-content: start; } }
@media (min-width: 1101px) { .hm-size:nth-child(n+9) { display: none !important; } }
@media (max-width: 1100px) {
  .hm-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "hero hero" "studios studios" "cont cont" "create device"; align-content: start; }
  .hm-apps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body.xp-home .studio-hub-main { padding: 8px 12px calc(92px + var(--sab)); }
  .hm-board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "studios" "cont" "create" "device"; gap: 12px; }
  .hm-card { padding: 16px; border-radius: 24px; animation: hm-rise .6s cubic-bezier(.2, .85, .2, 1) both; }
  .hm-hero { padding: 18px; gap: 14px; }
  .hm-clock { font-size: 24px; }
  .hm-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-app:last-child { grid-column: 1 / -1; }
  .hm-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-proj:nth-child(n+4) { display: grid; }
  .hm-card-note { display: none; }
}
@media (max-height: 800px) and (min-width: 1101px) { .hm-card { padding: 16px; gap: 10px; } .hm-icon { width: 50px; height: 50px; margin-bottom: 6px; } .hm-size:nth-child(n+7) { display: none !important; } .hm-device .hm-note { display: none; } }
@media (prefers-reduced-motion: reduce) { .hm-app, .hm-card { animation: none !important; translate: none; } }

:root .studio-app .xp-clock { display: none; }
:root .studio-app .xp-net { border-radius: 50%; }
@media (max-width: 1500px) { :root .studio-app .studio-hub-header .studio-switcher-item:not(.is-active) > span { display: none; } :root .studio-app .studio-hub-header .studio-switcher-item { padding: 0 9px; } }
body.xp-home .xp-recent, body.xp-home .xp-now, body.xp-home .xp-quick { grid-column: auto; }
.sp-widget { background: var(--sp-glass-strong); }
.sp-widget + .sp-widget { margin-top: -18px; }
:root .studio-app .img-panel-toggle { flex: 1; justify-content: flex-start; }
/* editors' empty states: a frosted sheet over the room */
:root .studio-app :is(.vid-empty, .img-empty) { background: color-mix(in srgb, var(--st-bg) 82%, transparent); }
:root .studio-app .vid-empty { inset: 64px 8px 8px 8px; border-radius: var(--sp-r-win); box-shadow: var(--sp-ring); }
:root .studio-app .img-empty-title { font-family: var(--st-ui); font-weight: 650; letter-spacing: -.04em !important; }
:root .studio-app .studio-section-title { font-family: var(--st-ui); font-size: 22px; font-weight: 650; letter-spacing: -.02em !important; }
:root .studio-app .studio-section-head { border: 0; }
:root .studio-app .cam-mode.is-active { color: #ffd166; }
:root .studio-app .cam-message-card .studio-icon { color: var(--st-text); }
body.xp-home .studio-hub-main { padding-top: 22px; }
.hm-app { text-align: left; }
body.xp-home .hm-size-text b { color: var(--st-text); }
:root .studio-app:not([data-theme="dark"]) .hm-title em { background-image: linear-gradient(100deg, #e2366b, #f0762e 35%, #1690a8 70%, #5a3fd6); }

/* =====================================================================
   v5 — performance + devices
   Touch devices and small screens: no live blur behind big surfaces (it is the
   main cost on phones); bars keep a light blur. Glass becomes denser instead.
   ===================================================================== */
@media (pointer: coarse), (max-width: 900px) {
  :root .studio-app { --sp-bf: none; --sp-bf-strong: none; --sp-bf-bar: blur(18px) saturate(1.6); }
  :root .studio-app[data-theme="dark"], :root .studio-app.cam-app, :root[data-studio-theme="dark"] .studio-app:not([data-theme="light"]) { --sp-glass: rgba(27, 27, 34, .8); --sp-glass-strong: rgba(22, 22, 28, .96); --st-panel: rgba(27, 27, 34, .84); }
  :root .studio-app:not([data-theme="dark"]):not(.cam-app) { --sp-glass: rgba(255, 255, 255, .74); --sp-glass-strong: rgba(250, 250, 252, .97); --st-panel: rgba(255, 255, 255, .8); }
  .hm-card { translate: none; }
}
/* phones: no zoom-on-focus, comfortable tap targets, no rubber-band selection of chrome */
@media (pointer: coarse) {
  :root .studio-app :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea) { font-size: 16px; }
  :root .studio-app :is(button, a, [role="button"], label) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
}
:root .studio-app { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* phone shell: one compact header, the dock becomes a tab bar that always fits */
@media (max-width: 760px) {
  :root .studio-app .studio-hub-header .studio-switcher { display: none; }
  :root .studio-app .studio-hub-header, :root .studio-app .studio-hub-header.xp-menubar { top: calc(6px + var(--sat)); margin-top: calc(6px + var(--sat)); min-height: 48px; }
  :root .studio-app .xp-dock { left: 8px; right: 8px; bottom: calc(6px + var(--sab)); transform: none; }
  :root .studio-app .xp-dock-shelf { width: 100%; justify-content: space-between; align-items: center; gap: 0; padding: 7px 10px; border-radius: 24px; overflow: visible; }
  :root .studio-app .xp-dock-item { width: clamp(30px, 9.4vw, 44px); height: clamp(30px, 9.4vw, 44px); flex: none; transform: none; margin: 0; }
  :root .studio-app .xp-dock-item:active { transform: scale(.9); }
  :root .studio-app .xp-dock-sep, :root .studio-app .xp-dock-item[data-app="settings"] { display: none; }
  :root .studio-app .xp-dock-item.is-running::after { bottom: -5px; }
  body.xp-has-dock .studio-hub-main { padding-bottom: calc(88px + var(--sab)); }
}
/* the dock never sits on top of a dialog, sheet or tour */
body:has(.studio-scrim, .studio-sheet, .xp-tour) .xp-dock { opacity: 0; pointer-events: none; }
.xp-dock { transition: opacity .2s; }

/* home brand lockup */
.hm-brand { display: inline-flex; align-items: center; gap: 9px; }
:root .studio-app .hm-brand .studio-brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(#fff, #fff) 11px 10.5px / 16px 3.8px no-repeat, linear-gradient(#fff, #fff) 11px 17.1px / 10.2px 3.8px no-repeat, linear-gradient(#fff, #fff) 11px 23.7px / 16px 3.8px no-repeat, var(--brand-grad); }
.hm-brand b { font: 700 26px/1 'Studio Oswald', 'Oswald', sans-serif; letter-spacing: .05em; }
.hm-brand span { font: 500 12px/1 var(--st-ui); letter-spacing: .28em; color: var(--st-dim); }
.hm-brand em { font: 700 11px/1 var(--st-ui); font-style: normal; padding: 4px 7px; border-radius: 999px; background: var(--brand); color: #fff; }
.hm-greet { align-self: flex-start; background: none; padding: 0; font-size: 13px; font-weight: 500; }
.hm-title em { background-image: linear-gradient(100deg, #ff6a4d, #ff3b2f 60%, #ff8a3d) !important; }
:root .studio-app .hm-hero .studio-btn.is-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px -6px rgba(232, 38, 31, .6); }
/* 3D panels: never wider than the window */
:root .studio-app.t3-app .img-panels.t3-panels { max-width: 100%; box-sizing: border-box; padding-right: 0; }
.hm-board { align-content: safe center; }
:root .studio-app .studio-brand-mark { border: 0; outline: 0; }
@media (pointer: coarse), (max-width: 900px) {
  :root .studio-app :is(.studio-dialog, .studio-sheet, .studio-menu) { background: #17171d; }
  :root .studio-app:not([data-theme="dark"]):not(.cam-app) :is(.studio-dialog, .studio-sheet, .studio-menu) { background: #f6f6f8; }
}
/* short screens (phone landscape): a slim dock, compact header */
@media (max-height: 520px) {
  :root .studio-app .xp-dock { bottom: calc(4px + var(--sab)); }
  :root .studio-app .xp-dock-shelf { padding: 4px 8px; gap: 6px; border-radius: 24px; align-items: center; }
  :root .studio-app .xp-dock-item { width: 32px; height: 32px; transform: none; margin: 0; }
  :root .studio-app .xp-dock-sep { margin: 4px 1px; }
  :root .studio-app .xp-wcs { display: none; }
  body.xp-has-dock .studio-hub-main { padding-bottom: calc(58px + var(--sab)); }
}
@media (max-width: 1000px) { :root .studio-app .studio-hub-header .studio-switcher { display: none; } }

/* full-screen apps use the real visible height (see file-notice.js) — fixes the bottom being cut off on iPhone */
:root body.studio-app:is(.img-app, .vid-app, .cam-app) { top: 0; left: 0; right: 0; bottom: auto; height: 100vh; height: var(--app-h, 100dvh); box-sizing: border-box; }
html.studio-root:has(> body:is(.img-app, .vid-app, .cam-app)) { height: var(--app-h, 100dvh); overflow: hidden; overscroll-behavior: none; }

/* =====================================================================
   A touch of the poster look inside the editors (type + brand red only —
   layouts and controls are unchanged)
   ===================================================================== */
@font-face { font-family: 'Poster AB'; font-display: block; src: url('../fonts/archivo-black-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poster BN'; font-display: block; src: url('../fonts/bebas-neue-latin-400-normal.woff2') format('woff2'); }
:root .studio-app:is(.is-editor, .cam-app) { --brand: #f4260f; }
:root .studio-app:is(.is-editor, .cam-app) .studio-brand-mark { display: none; }
:root .studio-app:is(.is-editor, .cam-app) .studio-brand-word { font: 400 15px/1 'Poster AB', sans-serif !important; letter-spacing: -.03em !important; gap: 0; color: var(--brand); }
:root .studio-app:is(.is-editor, .cam-app) .studio-brand-word .studio-brand-app { font: inherit !important; letter-spacing: inherit !important; color: inherit; text-transform: uppercase !important; }
:root .studio-app:is(.is-editor, .cam-app) .studio-brand-word .studio-brand-app::before { content: '®'; }
:root .studio-app.is-editor :is(.img-empty-title, .t3-empty-title) { font: 400 clamp(54px, 9vw, 120px)/.82 'Poster BN', 'Poster AB', sans-serif !important; letter-spacing: 0 !important; text-transform: uppercase !important; color: var(--brand); }
:root .studio-app.is-editor .t3-empty-title { font-size: clamp(40px, 6vw, 64px) !important; }
:root .studio-app.is-editor :is(.img-empty, .vid-empty, .t3-empty-card) .studio-btn.is-primary { background: var(--sp-solid); color: var(--sp-on-solid); box-shadow: none; }
:root .studio-app.is-editor ::selection { background: var(--brand); color: #fff; }

/* =====================================================================
   COLOUR MODES everywhere. The same twelve modes as the home screen drive the
   editors: frame, paper, type colour, readable ink, and a "pop" colour that
   stays visible on black (Kamera). Settings ▸ Look ▸ Editors = "Studio glass"
   switches the editors back to the dark glass workspace.
   ===================================================================== */
:root, [data-poster="signal"] { --po-frame: #f4260f; --po-paper: #ecebe6; --po-type: #cc1c07; --po-text: #cc1c07; --po-on: #ecebe6; --po-ink: #17110f; --po-pop: #f4260f; }
[data-poster="night"]   { --po-frame: #0b0b0b; --po-paper: #0b0b0b; --po-type: #f4260f; --po-text: #e9e6df; --po-on: #0b0b0b; --po-ink: #e9e6df; --po-pop: #f4260f; }
[data-poster="redroom"] { --po-frame: #f4260f; --po-paper: #f4260f; --po-type: #0d0d0d; --po-text: #0d0d0d; --po-on: #f4260f; --po-ink: #0d0d0d; --po-pop: #f4260f; }
[data-poster="ink"]     { --po-frame: #0d0d0d; --po-paper: #ecebe6; --po-type: #0d0d0d; --po-text: #0d0d0d; --po-on: #ecebe6; --po-ink: #0d0d0d; --po-pop: #ecebe6; }
[data-poster="cobalt"]  { --po-frame: #0d0d0d; --po-paper: #1b3fd6; --po-type: #ffb8a4; --po-text: #f1eee7; --po-on: #0d0d0d; --po-ink: #f1eee7; --po-pop: #ff3418; }
[data-poster="sun"]     { --po-frame: #ff7a1a; --po-paper: #ff7a1a; --po-type: #1c1206; --po-text: #1c1206; --po-on: #ff7a1a; --po-ink: #1c1206; --po-pop: #ff7a1a; }
[data-poster="forest"]  { --po-frame: #1f3a2e; --po-paper: #1f3a2e; --po-type: #f2c230; --po-text: #f2c230; --po-on: #1f3a2e; --po-ink: #f1ead2; --po-pop: #f2c230; }
[data-poster="lime"]    { --po-frame: #0d0d0d; --po-paper: #d6ff3f; --po-type: #0d0d0d; --po-text: #0d0d0d; --po-on: #d6ff3f; --po-ink: #0d0d0d; --po-pop: #d6ff3f; }
[data-poster="blush"]   { --po-frame: #d0142c; --po-paper: #f4cfd6; --po-type: #b8102a; --po-text: #b8102a; --po-on: #f4cfd6; --po-ink: #3a0b12; --po-pop: #ff5a70; }
[data-poster="royal"]   { --po-frame: #1b3fd6; --po-paper: #ecebe6; --po-type: #1b3fd6; --po-text: #1b3fd6; --po-on: #ecebe6; --po-ink: #0f1a4a; --po-pop: #6f8cff; }
[data-poster="mono"]    { --po-frame: #ffffff; --po-paper: #ffffff; --po-type: #0d0d0d; --po-text: #0d0d0d; --po-on: #ffffff; --po-ink: #0d0d0d; --po-pop: #ffffff; }
[data-poster="clay"]    { --po-frame: #8c2f1b; --po-paper: #e9d9c3; --po-type: #8c2f1b; --po-text: #3a1a10; --po-on: #e9d9c3; --po-ink: #3a1a10; --po-pop: #e9d9c3; }

html[data-editor-look="theme"]:has(> body.is-editor) { background: var(--po-frame); }
html[data-editor-look="theme"]:has(> body.is-editor)::before { background: var(--po-frame); background-image: none; }
html[data-editor-look="theme"] body.studio-app.is-editor.is-editor.is-editor {
  --st-bg: var(--po-paper); --st-text: var(--po-ink); --st-dim: color-mix(in srgb, var(--po-ink) 68%, transparent); --st-faint: color-mix(in srgb, var(--po-ink) 44%, transparent);
  --st-line: color-mix(in srgb, var(--po-ink) 14%, transparent); --st-line-2: color-mix(in srgb, var(--po-ink) 30%, transparent);
  --st-panel: var(--po-paper); --st-panel-2: color-mix(in srgb, var(--po-ink) 5%, transparent); --st-raised: var(--po-paper); --st-hover: color-mix(in srgb, var(--po-ink) 9%, transparent);
  --st-accent: var(--po-type); --st-accent-hi: var(--po-type); --st-accent-soft: color-mix(in srgb, var(--po-type) 16%, transparent); --st-accent-text: var(--po-on);
  --st-canvas-bg: color-mix(in srgb, var(--po-paper) 84%, var(--po-ink));
  --sp-glass: var(--po-paper); --sp-glass-strong: var(--po-paper); --sp-stroke: color-mix(in srgb, var(--po-ink) 22%, transparent);
  --sp-ring: inset 0 0 0 1.5px color-mix(in srgb, var(--po-ink) 20%, transparent); --sp-drop: 0 0 0 transparent; --st-shadow: 0 0 0 1.5px color-mix(in srgb, var(--po-ink) 30%, transparent), 0 24px 60px -24px rgba(0, 0, 0, .45);
  --sp-chip: color-mix(in srgb, var(--po-ink) 7%, transparent); --sp-chip-h: color-mix(in srgb, var(--po-ink) 15%, transparent);
  --sp-solid: var(--po-type); --sp-on-solid: var(--po-on); --sp-bf: none; --sp-bf-strong: none; --sp-bf-bar: none;
  --sp-r-card: 12px; --sp-r-win: 16px; --brand: var(--po-type);
  color: var(--po-ink);
}
html[data-editor-look="theme"] body.studio-app.is-editor.is-editor.is-editor :is(.studio-dialog, .studio-sheet, .studio-menu, .studio-toast, .studio-palette, .xp-tour-card) { background: var(--po-paper); color: var(--po-ink); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--po-ink) 30%, transparent), 0 24px 60px -24px rgba(0, 0, 0, .5); }
html[data-editor-look="theme"] body.studio-app.is-editor .img-tool.is-active, html[data-editor-look="theme"] body.studio-app.is-editor .img-dock-tool.is-active { box-shadow: none; }
html[data-editor-look="theme"] body.studio-app.is-editor :is(.img-empty, .vid-empty) { background: var(--po-paper); }
html[data-editor-look="theme"] body.studio-app.is-editor .studio-btn.is-primary { box-shadow: none; }
/* Kamera stays a dark room; its accent follows the colour mode */
html[data-editor-look="theme"] body.studio-app.cam-app { --cam-y: var(--po-pop); --brand: var(--po-pop); }
html[data-editor-look="theme"] body.studio-app.is-editor :is(.img-top, .img-options, .img-toolbar, .img-panel, .img-status, .img-dock, .img-tabs, .vid-panel, .vid-dock, .t3-hud-btn, .t3-empty-card, .t3-panels > *, .t3-rail, .t3-timeline, .vec-dock) { background-color: var(--po-paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-editor-look="theme"] body.studio-app.is-editor .img-panels { background: transparent; }

/* ---- App palettes (Settings ▸ Look ▸ Apps): MADEBYEYAD black & red (default) and Graphite (pro grey).
   They feed the same tokens as the colour modes, so every editor follows without app-specific CSS. */
html[data-editor-palette="mbe"] body.studio-app:is(.is-editor, .cam-app) {
  --po-frame: #0b0b0b; --po-paper: #0b0b0b; --po-type: #f4260f; --po-text: #ece9e2; --po-on: #0b0b0b; --po-ink: #ece9e2; --po-pop: #f4260f;
}
html[data-editor-look="theme"][data-editor-palette="mbe"] body.studio-app.is-editor.is-editor.is-editor { --st-canvas-bg: #1a1a1a; }
html[data-editor-palette="graphite"] body.studio-app:is(.is-editor, .cam-app) {
  --po-frame: #1d1d1d; --po-paper: #2c2c2c; --po-type: #378ef0; --po-text: #d9d9d9; --po-on: #07101c; --po-ink: #d9d9d9; --po-pop: #378ef0;
}
html[data-editor-look="theme"][data-editor-palette="graphite"] body.studio-app.is-editor.is-editor.is-editor { --st-canvas-bg: #1f1f1f; }
html[data-editor-palette] body.studio-app.is-editor { background-color: var(--po-frame); }
html[data-editor-palette] body.studio-app.is-editor .studio-theme-toggle { display: none !important; }

/* ---- app feel everywhere (no pull-to-refresh, no rubber-band, no grey tap flashes, no image dragging) */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }
body { overscroll-behavior: none; }
img { -webkit-user-drag: none; }
html.is-app a, html.is-app img { -webkit-touch-callout: none; }
html.is-app button, html.is-app [role="button"], html.is-app .po-pill { -webkit-user-select: none; user-select: none; touch-action: manipulation; }

/* Contrast: white text on the brand red needs a slightly deeper red (4.1:1 -> 5.3:1) */
html[data-editor-palette="mbe"] :is(.studio-btn.is-primary, .studio-open-tile.is-primary) { background: #d41e09; border-color: #d41e09; color: #fff; }
html[data-editor-palette="mbe"] :is(.studio-btn.is-primary:hover, .studio-open-tile.is-primary:hover) { background: #e0210b; border-color: #e0210b; }

/* Phones: small buttons stay finger-sized */
@media (max-width: 700px) { .studio-app .studio-btn.is-small { min-height: 38px; } }

/* the empty-state button of the editors: red in the black-and-red look, blue in Graphite, the mode's own colour in "follow the colour mode", glass look keeps red */
html[data-editor-palette="graphite"] :is(.img-empty, .vid-empty, .t3-empty-card) .studio-btn.is-primary { background: var(--po-type); color: var(--po-on); }
html[data-editor-look="studio"] :is(.img-empty, .vid-empty, .t3-empty-card) .studio-btn.is-primary { background: #d41e09; color: #fff; }
html[data-editor-look="theme"]:not([data-editor-palette]) body.studio-app.is-editor :is(.img-empty, .vid-empty, .t3-empty-card) .studio-btn.is-primary { background: var(--po-type); color: var(--po-on); }
