/* Elll Cut Identity Enforcement Layer (loaded last).
   Built from the real Elll logo (owner ruling, 2 Dec 2026):
   1. Dark by default (#0C110F canvas, #394B44 logo green blocks, #F2EFE7 paper cream primary CTA).
   2. Square everywhere (--r-card: 0px, controls --r-ctl: 3px). Zero circles, zero glow, zero gradients, zero shadows.
   3. Size does the work, never fake bold (font-synthesis: none; Avenir Latin, TheYearOfTheCamel Arabic).
   4. Phone bottom navigation bar (Editor | Brands), no text under 13px, toasts never covering bottom actions. */

/* ── Phone bottom navigation bar (Editor | Brands) ───────────────────────────── */
@media (max-width: 720px) {
  .top:not(.cut-signin-top) .wrap { flex-wrap: nowrap; padding-block: 0; }
  .top .shell-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 25;
    margin: 0;
    display: flex;
    gap: 0;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    background: var(--canvas);
    border-top: 1px solid var(--border);
  }
  .top .shell-nav-link {
    position: relative;
    flex: 1 1 0;
    flex-direction: column;
    gap: 3px;
    min-height: 54px;
    padding: 4px 4px;
    border: 0;
    background: none;
    font-size: 0.8125rem;
    color: var(--text-3);
  }
  .top .shell-nav-link .ico { display: block; width: 22px; height: 22px; }
  .top .shell-nav-link.on { color: var(--text-1); background: none; }
  .top .shell-nav-link.on::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 32px;
    height: 3px;
    margin-left: -16px;
    background: var(--text-1);
  }
  body:has(.top .shell-nav) #app { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body:has(.ve-action.ve-dock) #app,
  body:has(.bk-wiz-dock) #app { padding-bottom: calc(168px + env(safe-area-inset-bottom)); }
}

/* ── Back rule: Brands and Credits are top-level tabs/pills, never waste a row ── */
.studio-main:has(> .bk-head) > .back,
.studio-main:has(> .budget-heading) > .back { display: none; }
.studio-main:has(> .bk-head) > .bk-head,
.studio-main:has(> .budget-heading) > .budget-heading { margin-top: clamp(16px, 3vh, 28px); }

/* ── Toasts never cover the phone tab bar or the sticky action dock ──────────── */
@media (max-width: 720px) {
  body:has(.top .shell-nav) #toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  body:has(.ve-action.ve-dock) #toast,
  body:has(.bk-wiz-dock) #toast { bottom: calc(170px + env(safe-area-inset-bottom)); }
}

/* ── Subtle rise entrance (respects reduced motion) ──────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .ve-choices > .ve-choice,
  .cut-pillars > .cut-pillar {
    animation: elll-rise .28s var(--rise) backwards;
  }
  .ve-choices > .ve-choice:nth-child(2),
  .cut-pillars > .cut-pillar:nth-child(2) { animation-delay: .05s; }
  .cut-pillars > .cut-pillar:nth-child(3) { animation-delay: .1s; }
}
@keyframes elll-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Minimum 13px text everywhere ────────────────────────────────────────────── */
.pill, .credits-pill, .chip, .studio-footer, .ve-tc, .ve-session-meta, .ve-tech, .ve-versions,
.ve-dc-chk, .ve-dc-sub, .ve-dc-pass-row, .bk-playbook-list, .bk-playbook-col h4 {
  font-size: max(13px, var(--fs-xs));
}

/* ── Square everywhere: zero circles, zero shadows, 3px controls only ────────── */
*, *::before, *::after { border-radius: 0 !important; box-shadow: none !important; }
.btn, input, select, textarea, .pill, .ve-back, .avatar, .lang-btn, .iconbtn,
.ve-variant-tab, .ve-quick-chip, .ve-choice-ico, .bk-key, .tabs button, .pw-toggle,
.bk-step-pill, .bk-tone-chip, .bk-lang-btn, .bk-audio-btn, .ve-guide-pill, .ve-brand-pill {
  border-radius: var(--r-ctl) !important;
}
