/* ---------- Tokens ---------- */
:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #f1f3f8;
    --border: #e4e7ee;
    --text: #151823;
    --muted: #6b7183;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef0ff;
    --on-primary: #ffffff;
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --warning: #b45309;
    --warning-soft: #fff6e5;
    --success: #15803d;
    --success-soft: #e9f8ef;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 4px 16px rgb(16 24 40 / .06);
    --shadow-lg: 0 12px 40px rgb(16 24 40 / .14);
    --focus: 0 0 0 3px rgb(79 70 229 / .3);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}

/* Dark theme: used when the user picks Dark, or picks Auto and the device is in dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f1117;
        --surface: #181b24;
        --surface-2: #20242f;
        --border: #2a2f3c;
        --text: #eceef4;
        --muted: #9097a8;
        --primary: #7c74ff;
        --primary-hover: #8f88ff;
        --primary-soft: #23224a;
        --danger: #f87171;
        --danger-soft: #3a1d20;
        --warning: #fbbf24;
        --warning-soft: #3a2e14;
        --success: #4ade80;
        --success-soft: #16301f;
        --shadow: 0 1px 2px rgb(0 0 0 / .3);
        --shadow-lg: 0 12px 40px rgb(0 0 0 / .5);
        --focus: 0 0 0 3px rgb(124 116 255 / .4);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0f1117;
    --surface: #181b24;
    --surface-2: #20242f;
    --border: #2a2f3c;
    --text: #eceef4;
    --muted: #9097a8;
    --primary: #7c74ff;
    --primary-hover: #8f88ff;
    --primary-soft: #23224a;
    --danger: #f87171;
    --danger-soft: #3a1d20;
    --warning: #fbbf24;
    --warning-soft: #3a2e14;
    --success: #4ade80;
    --success-soft: #16301f;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / .5);
    --focus: 0 0 0 3px rgb(124 116 255 / .4);
    color-scheme: dark;
}

/* App tile colors */
.c-indigo { --c: #4f46e5; } .c-blue { --c: #2563eb; } .c-teal { --c: #0d9488; }
.c-green { --c: #16a34a; } .c-amber { --c: #d97706; } .c-orange { --c: #ea580c; }
.c-rose { --c: #e11d48; } .c-violet { --c: #7c3aed; } .c-slate { --c: #475569; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
}
h1, h2 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- PWA: offline bar, notification prompt ---------- */
.offline-bar {
    position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 8px 16px; background: var(--warning-soft); color: var(--warning); font-size: .875rem; font-weight: 600; text-align: center;
}
.offline-bar .icon { width: 18px; height: 18px; }
.push-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; }
.push-banner-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.push-banner-text { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; }
.push-banner-text small { font-size: .85rem; }
.push-banner-actions { display: flex; gap: 8px; margin-left: auto; }
.push-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.push-panel .push-status { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.push-panel .push-status .icon { width: 18px; height: 18px; }
.push-panel .push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-ok { color: var(--success); }
.push-off { color: var(--muted); }
.push-bad { color: var(--danger); }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    padding-top: env(safe-area-inset-top);
}
.topbar-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; gap: 8px;
    height: 60px; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark {
    display: grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
}
.brand-mark .icon { width: 18px; height: 18px; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px; }
.brand-mark.lg .icon { width: 28px; height: 28px; }
.brand-logo { display: block; height: var(--logo-h, 34px); width: auto; max-width: min(55vw, 260px); object-fit: contain; object-position: left center; }
.auth-logo-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-logo { display: block; height: calc(var(--logo-h, 34px) * 1.6); max-height: 72px; width: auto; max-width: 240px; object-fit: contain; }

/* Light/dark versions of the logo: show the one for the current theme */
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .logo-light { display: none !important; }
    :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- Account menu ---------- */
.avatar {
    display: grid; place-items: center; flex: none;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary);
    font-weight: 650; font-size: .85rem; letter-spacing: .02em;
    cursor: pointer; user-select: none;
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 240px; padding: 6px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    animation: pop .14s ease-out;
}
.menu-head { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head .muted { font-size: .85rem; }
.menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text); background: none; border: 0; font: inherit; text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item .icon { color: var(--muted); }
.menu-item.danger, .menu-item.danger .icon { color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* Theme switch (account menu) */
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; }
.menu-theme > span { display: flex; align-items: center; gap: 10px; }
.menu-theme > span .icon { color: var(--muted); }
.theme-switch { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.theme-switch button {
    display: grid; place-items: center; width: 34px; height: 30px;
    border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
}
.theme-switch button .icon { width: 17px; height: 17px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------- Page ---------- */
.page {
    max-width: 1100px; margin: 0 auto;
    padding: 20px 16px calc(40px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 16px;
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head > div > .muted { margin-top: 4px; }
.page-head-row { display: flex; align-items: center; gap: 14px; width: 100%; }
.back-link { display: inline-flex; align-items: center; gap: 2px; font-weight: 550; width: 100%; margin-left: -4px; }
.hello h1 { font-size: 1.75rem; }
.hello .muted { margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px;
    border-radius: 12px; border: 1px solid transparent;
    font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost.is-active { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn-lg { min-height: 52px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn {
    display: grid; place-items: center; flex: none;
    width: 40px; height: 40px; border-radius: 12px;
    background: transparent; border: 0; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: .25; cursor: default; background: none; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.sm .icon { width: 18px; height: 18px; }

/* ---------- Cards, lists ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.list-row + .list-row { border-top: 1px solid var(--border); }
#app-list .list-row { flex-wrap: wrap; }
#app-list .list-main { padding-left: 4px; }
.drag-handle {
    display: flex; align-items: center; align-self: stretch; padding: 0 2px 0 10px;
    color: var(--muted); cursor: grab; touch-action: none; opacity: .6;
}
.drag-handle:hover { opacity: 1; }
.drag-handle .icon { width: 18px; height: 18px; }
.list-row.is-ghost { opacity: .35; background: var(--primary-soft); }
.inline-icon { width: 15px; height: 15px; vertical-align: -3px; }
.row-feedback {
    flex-basis: 100%; display: flex; align-items: flex-start; gap: 8px;
    margin: -4px 0 14px 16px; padding: 10px 12px; border-radius: 10px; font-size: .9rem;
    animation: pop .2s ease-out;
}
.row-feedback .icon { width: 18px; height: 18px; margin-top: 1px; }
.row-feedback-error { background: var(--danger-soft); color: var(--danger); }
.row-feedback-warning { background: var(--warning-soft); color: var(--warning); }
.row-feedback-success { background: var(--success-soft); color: var(--success); }
.switch-status { font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.is-busy .switch { opacity: .6; pointer-events: none; }
.is-busy .switch-status::before {
    content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.list-row.is-dim .list-main { opacity: .55; }
.list-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 14px 0 14px 16px; color: inherit; }
a.list-main:hover .list-title { color: var(--primary); }
.list-text { display: flex; flex-direction: column; min-width: 0; }
.list-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 600; }
.list-sub { color: var(--muted); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.list-actions form { display: flex; }
.move { gap: 0; }
.chevron { color: var(--muted); display: flex; }

.badge {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
    border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap;
    background: var(--surface-2); color: var(--muted);
}
.badge-new { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.role-super_admin { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.role-admin { background: var(--primary-soft); color: var(--primary); }

/* ---------- Tabs ---------- */
.tabs {
    display: flex; gap: 4px; padding: 4px;
    background: var(--surface-2); border-radius: 14px;
    overflow-x: auto; scrollbar-width: none;
}
.tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 14px; border-radius: 10px;
    color: var(--muted); font-weight: 600; white-space: nowrap;
}
.tab .icon { width: 18px; height: 18px; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- App grid ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 18px 10px; }
.app-tile {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 6px 2px; border-radius: var(--radius); color: var(--text); text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.app-tile:active .app-icon { transform: scale(.93); }
.app-tile-text { display: flex; flex-direction: column; min-width: 0; width: 100%; }
.app-title { font-size: .875rem; font-weight: 550; line-height: 1.25; overflow-wrap: anywhere; }
.app-desc { display: none; }
.app-icon {
    display: grid; place-items: center; flex: none;
    width: 64px; height: 64px; border-radius: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c));
    color: #fff; font-size: 1.9rem; font-weight: 700; line-height: 1;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 30%, transparent), inset 0 1px 0 rgb(255 255 255 / .25);
    transition: transform .15s;
}
.app-icon.sm { width: 42px; height: 42px; border-radius: 12px; font-size: 1.3rem; box-shadow: none; }
.app-icon.lg { width: 64px; height: 64px; }

@media (min-width: 720px) {
    .app-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
    .app-tile {
        flex-direction: row; align-items: center; gap: 14px; text-align: left;
        padding: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
        transition: transform .15s, box-shadow .15s, border-color .15s;
    }
    .app-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c, var(--primary)) 30%, var(--border)); }
    .app-icon { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 16px; }
    .app-title { font-size: 1rem; font-weight: 650; }
    .tile-labels { justify-content: flex-start; }
    .app-desc {
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        color: var(--muted); font-size: .875rem; line-height: 1.35; margin-top: 2px;
    }
}

/* ---------- Home: search, edit mode, hidden apps ---------- */
.home { display: flex; flex-direction: column; gap: 16px; }
.home-tools { display: flex; gap: 8px; }
.home-tools .search { flex: 1; min-width: 0; }
.edit-toggle { flex: none; min-height: 50px; }
.search kbd {
    font: 600 .75rem/1 var(--font); color: var(--muted);
    border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }
.is-loading .search .icon { animation: pulse .8s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .3; } }
.edit-help { background: var(--primary-soft); color: var(--primary); padding: 10px 14px; border-radius: 12px; font-size: .9rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

.app-tile { position: relative; }
.app-icon-wrap { position: relative; display: flex; flex: none; }

/* The title link covers the whole tile; edit buttons sit above it */
.app-link { color: inherit; }
.app-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.app-link:focus-visible { box-shadow: none; }
.app-tile:has(.app-link:focus-visible) { box-shadow: var(--focus); border-radius: var(--radius); }
.is-editing .app-link { pointer-events: none; }

.tile-labels { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; }
.tile-labels:not(:has(> span:not([hidden]))) { display: none; }
.hidden-label, .fav-label {
    display: none; align-items: center; justify-content: center; gap: 4px;
    font-size: .75rem; font-weight: 600; color: var(--muted);
}
.hidden-label .icon, .fav-label .icon { width: 13px; height: 13px; }
.fav-label .icon { color: #f59e0b; fill: #f59e0b; }
#search-results .is-hidden .hidden-label, #search-results .is-favorite .fav-label { display: inline-flex; }
#home-apps .app-tile.is-hidden { display: none; }

.tile-btn {
    display: none; place-items: center; position: absolute; top: -8px; z-index: 2;
    width: 28px; height: 28px; padding: 0; border-radius: 50%; cursor: pointer;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgb(0 0 0 / .18);
}
.tile-btn .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.tile-hide { right: -8px; }
.tile-fav { left: -8px; color: var(--muted); }
.tile-fav .icon { stroke-width: 2; }
.is-favorite .tile-fav { color: #f59e0b; }
.is-favorite .tile-fav .icon { fill: #f59e0b; }
.tile-hide .badge-show, .is-hidden .tile-hide .badge-hide { display: none; }
.is-hidden .tile-hide .badge-show { display: block; }
.is-hidden .tile-hide { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.is-editing .tile-btn { display: grid; }
.is-editing #home-apps .app-tile.is-hidden { display: flex; }
.is-editing .app-tile.is-hidden .app-icon, .is-editing .app-tile.is-hidden .app-tile-text { opacity: .4; filter: grayscale(.7); }
.is-editing #home-apps .app-tile { cursor: grab; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.is-editing .app-tile:not(.is-hidden) .app-icon { animation: wiggle .35s ease-in-out infinite alternate; }
.is-editing .app-tile.is-chosen .app-icon, .is-editing .app-tile.is-dragging .app-icon { animation: none; }
.app-tile.is-ghost { opacity: .3; }
.app-tile.is-dragging { cursor: grabbing; }

/* Favorites section */
.app-section { display: flex; flex-direction: column; gap: 10px; }
#home-apps { display: flex; flex-direction: column; gap: 22px; }
.section-title {
    display: flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.section-title .icon { width: 14px; height: 14px; color: #f59e0b; fill: #f59e0b; }
.is-editing #favorites-grid { min-height: 104px; padding: 12px 8px; border: 2px dashed var(--border); border-radius: var(--radius); }
#favorites-grid.is-empty { display: flex; align-items: center; justify-content: center; }
.is-editing #favorites-grid.is-empty::before { content: attr(data-empty); color: var(--muted); font-size: .9rem; text-align: center; }
.edit-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.edit-help .icon { width: 15px; height: 15px; vertical-align: -3px; }

/* The user's own columns (app.js sets --cols, and --tile-h from the columns' width). Every tile is the same: the icon
   above the name, both sized from the tile (container units), the description when there's room. */
.is-fixed-grid .app-grid:not(.is-empty) { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--tile-h); }
.is-fixed-grid .app-tile {
    container-type: size; flex-direction: column; justify-content: center; align-items: center; gap: 0;
    min-width: 0; min-height: 0; padding: 8px; text-align: center; overflow: hidden;
}
.is-fixed-grid .app-tile > * { --icon: clamp(34px, min(50cqh, 46cqw), 88px); }
.is-fixed-grid .app-icon {
    width: var(--icon); height: var(--icon); border-radius: calc(var(--icon) * .28); font-size: calc(var(--icon) * .5);
}
.is-fixed-grid .app-tile-text { align-items: center; margin-top: clamp(4px, 5cqh, 12px); }
.is-fixed-grid .app-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    max-width: 100%; font-size: clamp(.72rem, min(10cqh, 9cqw), 1.05rem); line-height: 1.2; overflow-wrap: break-word;
}
.is-fixed-grid .app-desc { display: none; }
.is-fixed-grid .tile-labels { justify-content: center; }
/* Edit mode: ★ and − in the tile's top corners, so they don't cover small icons */
.is-fixed-grid .app-icon-wrap { position: static; }
.is-fixed-grid .tile-btn { top: 4px; width: 24px; height: 24px; }
.is-fixed-grid .tile-btn .icon { width: 14px; height: 14px; }
.is-fixed-grid .tile-fav { left: 4px; }
.is-fixed-grid .tile-hide { right: 4px; }
@media (max-width: 719px) {
    .is-fixed-grid .app-tile { padding: 6px 2px; }
    .is-fixed-grid .tile-btn { top: 2px; width: 20px; height: 20px; }
    .is-fixed-grid .tile-btn .icon { width: 12px; height: 12px; }
    .is-fixed-grid .tile-fav { left: 2px; }
    .is-fixed-grid .tile-hide { right: 2px; }
}
@container (max-width: 130px) or (max-height: 110px) { /* small tiles: the name on one line, like on a phone's home screen */
    .is-fixed-grid .app-title { display: block; white-space: nowrap; text-overflow: ellipsis; }
}
@container (min-height: 110px) and (min-width: 140px) {
    .is-fixed-grid .app-desc {
        display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
        max-width: 34ch; margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.35;
    }
}
@container (min-height: 150px) and (min-width: 190px) {
    .is-fixed-grid .app-desc { -webkit-line-clamp: 2; margin-top: 4px; font-size: .85rem; }
}

/* Wide and low tiles (e.g. one column): a list — the icon on the left, the name and description beside it */
.is-row-tiles .app-tile { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 8px 16px; text-align: left; }
.is-row-tiles .app-tile > * { --icon: clamp(34px, 72cqh, 72px); }
.is-row-tiles .app-tile-text { align-items: flex-start; margin-top: 0; }
.is-editing.is-row-tiles .app-tile-text { padding-right: 60px; } /* room for ★ − */
.is-row-tiles .app-title { display: block; white-space: nowrap; text-overflow: ellipsis; font-size: clamp(.95rem, 24cqh, 1.15rem); }
.is-row-tiles .tile-labels { justify-content: flex-start; }
.is-row-tiles .tile-btn { top: 50%; translate: 0 -50%; }
.is-row-tiles .tile-fav { left: auto; right: 38px; }
@container (min-height: 54px) {
    .is-row-tiles .app-desc {
        display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
        max-width: none; margin-top: 2px; color: var(--muted); font-size: .85rem; line-height: 1.35;
    }
}
@container (min-height: 96px) {
    .is-row-tiles .app-desc { -webkit-line-clamp: 2; }
}
@media (max-width: 719px) {
    .is-row-tiles .app-tile { padding: 6px 8px; }
    .is-row-tiles .tile-fav { right: 30px; }
}
.home-more { padding: 8px; text-align: center; }
.home-more[hidden] { display: none; }

/* Grid editor (in the edit panel) */
.grid-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; flex-basis: 100%; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); }
.grid-editor strong { font-weight: 700; }
.grid-stepper { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.grid-stepper > span { color: var(--primary); font-weight: 600; margin-right: 2px; }
.grid-stepper output { min-width: 2.6em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.grid-stepper .icon-btn { background: var(--surface); }
.grid-stepper .icon-btn:disabled { opacity: .4; cursor: default; }
.grid-editor .link-btn[hidden] { display: none; }

@keyframes wiggle { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }
@media (prefers-reduced-motion: reduce) { .is-editing .app-tile .app-icon { animation: none !important; } }

/* ---------- Search ---------- */
.search {
    display: flex; align-items: center; gap: 10px; padding: 0 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--muted);
}
.search:focus-within { box-shadow: var(--focus); border-color: var(--primary); }
.search input[type=search] { flex: 1; min-width: 0; border: 0; background: none; box-shadow: none; min-height: 48px; padding: 0; font: inherit; font-size: 16px; color: var(--text); outline: none; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.card.form { padding: 20px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label, .fieldset legend { font-weight: 600; font-size: .95rem; }
input[type=text], input[type=password], input[type=search], input:not([type]), select {
    width: 100%; min-height: 48px; padding: 0 14px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px;
    font: inherit; font-size: 16px; /* 16px stops iOS zoom on focus */
    transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.has-error input { border-color: var(--danger); }
.error { color: var(--danger); font-size: .875rem; }
.hint { color: var(--muted); font-size: .875rem; }
.fieldset { border: 0; border-top: 1px solid var(--border); margin: 4px 0 0; padding: 18px 0 0; display: flex; flex-direction: column; gap: 18px; }
.fieldset legend { padding: 0; float: left; width: 100%; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.form-actions .btn { flex: 1; }
.password { position: relative; display: flex; align-items: center; }
.password input { padding-right: 100px; }
.password-toggle, .password-generate { position: absolute; right: 5px; }
.password-toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; }
.password-toggle + input, .password:has(.password-toggle) input { padding-right: 52px; }

.profile { display: flex; align-items: center; gap: 14px; }
.profile > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

.name-fields { display: grid; gap: 18px; }
@media (min-width: 560px) { .name-fields { grid-template-columns: 1fr 1fr; } }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }

/* Choice cards (radio) */
.choices { display: grid; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice > span {
    display: flex; flex-direction: column; padding: 12px 14px 12px 44px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
    transition: border-color .15s, background .15s;
}
.choice > span::before {
    content: ""; position: absolute; left: 14px; top: 50%; translate: 0 -50%;
    width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface);
}
.choice small { color: var(--muted); font-size: .85rem; }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.choice input:checked + span::before { border: 6px solid var(--primary); }
.choice input:focus-visible + span { box-shadow: var(--focus); }

/* Toggle switch */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-ui {
    width: 50px; height: 30px; border-radius: 999px; background: var(--border);
    position: relative; transition: background .2s;
}
.switch-ui::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 24px; height: 24px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s;
}
.switch input:checked + .switch-ui { background: var(--success); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--focus); }
.toggle-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.toggle-row > span:first-child { display: flex; flex-direction: column; }
.toggle-row small { font-size: .85rem; }

/* Icon & color pickers */
.icon-picker { display: flex; flex-direction: column; gap: 10px; }
.icon-input { max-width: 120px; text-align: center; font-size: 1.4rem !important; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); font-size: 1.3rem; cursor: pointer;
}
.emoji:hover { background: var(--surface-2); }
.emoji-clear { font-size: .9rem; font-weight: 700; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: var(--c); color: #fff; transition: transform .15s;
}
.swatch .icon { opacity: 0; width: 18px; height: 18px; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.swatch input:checked + span .icon { opacity: 1; }
.swatch input:focus-visible + span { transform: scale(1.1); }

/* ---------- Alerts / toasts ---------- */
.alert, .toast {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 12px; font-size: .95rem;
}
.alert .icon, .toast .icon { margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-warning strong { color: inherit; }
.issue-list { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; overflow-wrap: anywhere; }
.issue-list li + li { margin-top: 4px; }
.has-error .toggle-row { border-color: var(--danger); }
.alert-info { background: var(--primary-soft); color: var(--primary); align-items: center; }
a.alert-info:hover { filter: brightness(.97); }
.alert-info > span:first-of-type { flex: 1; }
.alert-action { display: flex; align-items: center; gap: 2px; font-weight: 600; white-space: nowrap; }
.toast { background: var(--success-soft); color: var(--success); animation: pop .2s ease-out; }
.toast-error { background: var(--danger-soft); color: var(--danger); }
.toast-warning { background: var(--warning-soft); color: var(--warning); }
.toast span { flex: 1; }
.toast-close { display: flex; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .7; }

/* ---------- Empty states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 20px; }
.empty .btn { margin-top: 8px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); }
.empty-icon .icon { width: 30px; height: 30px; }
.empty-code { font-size: 3rem; font-weight: 800; color: var(--primary); letter-spacing: -.04em; }
.danger-zone { display: flex; justify-content: center; }

/* ---------- Auth pages ---------- */
.auth-body {
    background:
        radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, #6366f1 18%, transparent), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #8b5cf6 16%, transparent), transparent 60%),
        var(--bg);
}
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
    width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 24px; padding: 32px 20px; box-shadow: var(--shadow-lg);
}
.auth-head { text-align: center; }
.auth-head p { margin-top: 6px; }

/* ---------- Logo settings ---------- */
.logo-preview { display: grid; gap: 8px; min-width: 0; }
.preview-bar { min-width: 0; overflow: hidden; }
.preview-brand { flex: 0 1 auto; }
.preview-brand .brand-logo { max-width: 100%; }
.preview-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    height: 60px; padding: 0 16px; border-radius: 12px; border: 1px solid;
}
.preview-light { background: #f6f7fb; border-color: #e4e7ee; color: #151823; }
.preview-dark { background: #0f1117; border-color: #2a2f3c; color: #eceef4; }
.preview-brand, .preview-default { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 650; }
.preview-label { font-size: .75rem; font-weight: 600; opacity: .55; white-space: nowrap; }
.file-pick { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer; }
.file-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-pick input:focus-visible + .btn { box-shadow: var(--focus); }
.file-name { overflow-wrap: anywhere; }
.height-row { display: flex; align-items: center; gap: 14px; }
.height-row input[type=range] { flex: 1; accent-color: var(--primary); min-height: 32px; }
.height-input { display: flex; align-items: center; gap: 6px; }
.height-input input { width: 84px !important; text-align: right; }
.color-table { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.color-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 1fr; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); }
.color-row + .color-row { border-top: 1px solid var(--border); }
.color-head { background: var(--surface-2); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.color-all { background: var(--surface-2); }
.color-orig { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .9rem; font-weight: 600; }
.color-orig code { background: none; padding: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.swatch-mini { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgb(0 0 0 / .15); }
.swatch-multi { background: conic-gradient(#e11d48, #f59e0b, #16a34a, #2563eb, #7c3aed, #e11d48); }
.color-cell { display: flex; align-items: center; gap: 4px; }
.color-cell input[type=color] {
    width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); cursor: pointer;
}
.color-cell.is-custom input[type=color] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.cell-reset {
    width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted);
    font-size: 1rem; cursor: pointer; visibility: hidden;
}
.cell-reset:hover { background: var(--surface-2); color: var(--text); }
.color-cell.is-custom .cell-reset, .color-all .cell-reset { visibility: visible; }

.settings-errors { scroll-margin-top: 90px; }
.settings-errors a { color: inherit; font-weight: 700; text-decoration: underline; }
.settings-errors:focus { outline: none; box-shadow: var(--focus); }
.pwa-settings h3.pwa-group { margin: 6px 0 -6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pwa-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .pwa-grid { grid-template-columns: 1fr 1fr; } }
.pwa-settings select {
    width: 100%; min-height: 48px; padding: 0 12px; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; font: inherit; font-size: 16px;
}
.pwa-settings input[type=email] {
    width: 100%; min-height: 48px; padding: 0 14px; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; font: inherit; font-size: 16px;
}
.pwa-color { display: flex; align-items: center; gap: 10px; }
.pwa-color input[type=color] { width: 56px; height: 44px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.pwa-icon-choices { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
.pwa-shortcuts { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pwa-shortcut { padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; }
.pwa-shortcut:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pwa-shortcut:has(input:disabled) { opacity: .5; }

/* Previews */
.pwa-previews { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pwa-previews > div { display: flex; flex-direction: column; gap: 6px; }
.pwa-preview-caption { font-size: .75rem; font-weight: 600; color: var(--muted); }
.pwa-home-tile, .pwa-splash, .pwa-window { height: 150px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.pwa-home-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(160deg, #1e3a5f, #3b2f6b); color: #fff;
}
.pwa-home-label { font-size: .8rem; max-width: 90%; text-align: center; text-shadow: 0 1px 2px rgb(0 0 0 / .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-icon-preview {
    width: 60px; height: 60px; border-radius: 16px; overflow: hidden; flex: none; display: grid; place-items: center;
    background-size: cover; background-position: center; box-shadow: 0 4px 12px rgb(0 0 0 / .25);
}
.pwa-icon-preview svg { width: 46%; height: 46%; }
.pwa-splash { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 650; }
.pwa-window { display: flex; flex-direction: column; background: var(--surface); }
.pwa-titlebar { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: .8rem; font-weight: 600; }
.pwa-titlebar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwa-window-body { flex: 1; background: repeating-linear-gradient(180deg, var(--surface-2) 0 10px, transparent 10px 22px); margin: 12px; border-radius: 6px; opacity: .6; }

input[type=number] {
    width: 100%; min-height: 48px; padding: 0 12px; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; font: inherit; font-size: 16px;
}

/* ---------- App frame ---------- */
.app-frame { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 560px) { .app-frame { gap: 20px; } }

/* ---------- Larger screens ---------- */
@media (max-width: 559px) {
    .hide-sm { display: none; }
    .topbar-actions .btn-sm { padding: 0; width: 40px; }
}
@media (min-width: 560px) {
    .page { padding-top: 28px; gap: 20px; }
    .card.form { padding: 28px; }
    .form-actions .btn { flex: 0 0 auto; }
    .choices { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .auth-card { padding: 40px 36px; }
    .tabs { align-self: flex-start; }
    .tab { flex: 0 0 auto; }
}
@media (min-width: 900px) {
    /* Short forms stay readable at a narrow width; .page-wide pages (Settings) use the full width */
    .page:not(.page-wide):has(.form) > :is(.card.form, .page-head, .alert, .danger-zone) { width: 100%; max-width: 720px; }
}

/* Language switch (account menu) */
.menu-lang { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px; }
.menu-lang > span { display: flex; align-items: center; gap: 10px; }
.menu-lang > span .icon { color: var(--muted); }
.lang-switch { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.lang-switch button {
    height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted);
    font: inherit; font-size: .8rem; font-weight: 650; letter-spacing: .03em; cursor: pointer;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

/* ---------- Notifications: bell, "new" bar, inbox ---------- */
.bell-btn { position: relative; color: var(--muted); }
.bell-btn.is-active { color: var(--primary); }
.bell-count {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--danger); color: #fff; border: 2px solid var(--surface);
    font-size: .68rem; font-weight: 700; line-height: 14px; text-align: center;
}
.new-notice {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius);
    background: var(--primary-soft); color: var(--primary); font-size: .95rem;
}
.new-notice:hover { text-decoration: none; filter: brightness(.98); }
.new-notice-action { margin-left: auto; display: flex; align-items: center; gap: 2px; font-weight: 600; }
.inbox-tabs { align-self: stretch; }
.inbox-tabs .badge { height: 20px; padding: 0 7px; }
.inbox-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; }
.inbox-filter input[type=date] {
    min-height: 48px; padding: 0 12px; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; font: inherit; font-size: 16px;
}
.inbox-search { flex: 1 1 220px; }
.inbox-filter .btn { min-height: 48px; }
.inbox-item + .inbox-item { border-top: 1px solid var(--border); }
.inbox-link { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 12px; color: inherit; }
a.inbox-link:hover { background: var(--surface-2); text-decoration: none; }
.inbox-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; align-self: flex-start; margin-top: 7px; }
.is-unread .inbox-dot { background: var(--primary); }
.inbox-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.inbox-body { color: var(--text); overflow-wrap: anywhere; white-space: pre-line; }
.inbox-time { color: var(--muted); font-size: .8rem; }
.inbox-new { color: var(--primary); font-weight: 600; }
.is-unread .inbox-link { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.inbox-pages { display: flex; justify-content: space-between; gap: 8px; }
.inbox-pages .btn:only-child:last-child { margin-left: auto; }

/* A notification that arrives while the page is open */
.push-popup {
    position: fixed; z-index: 100; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
    display: flex; align-items: flex-start; gap: 12px; width: min(440px, calc(100vw - 20px)); padding: 14px 10px 14px 16px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); animation: push-in .25s ease-out; transition: opacity .3s, translate .3s;
}
.push-popup:hover { text-decoration: none; }
.push-popup > .icon { flex: none; color: var(--primary); margin-top: 2px; }
.push-popup > span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.push-popup small { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-line; }
.push-popup-close { flex: none; width: 30px; height: 30px; margin: -6px 0 0; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.push-popup-close:hover { background: var(--surface-2); }
.push-popup.is-leaving { opacity: 0; translate: 0 -12px; }
@keyframes push-in { from { opacity: 0; translate: 0 -16px; } }

/* "Back to hub" above an app (below the header) */
.page-back { width: auto; align-self: flex-start; margin-bottom: -6px; }
