/* ==========================================================================
   OrbitOS Home screen (4.5)
   The layer app/home.js puts on top of the terminal. Built on Design v3 (the
   kit.css look): the theme's own background and surfaces, flat colored tiles,
   thin borders. No blur and nothing that keeps animating, so it stays light.
   It sits inside .os-root (app windows, z-index 300, open on top of it) and
   reaches up under the status bar, which goes see-through while home is bare.
   Everything that moves is in css/motion.css.
   ========================================================================== */

#hs-navbar,
#hs-navbar button,
.hs-nav-btn,
.hs button,
.hs-app,
.hs-icon,
.hs-widget,
.hs-dot,
button,
a,
[role="button"],
button:focus,
button:focus-visible,
button:active,
button:hover,
a:focus,
a:focus-visible,
a:active,
a:hover,
[role="button"]:focus,
[role="button"]:focus-visible,
[role="button"]:active,
[role="button"]:hover,
.hs-app:focus,
.hs-app:focus-visible,
.hs-app:active,
.hs-app:hover,
.hs-icon:focus,
.hs-icon:focus-visible,
.hs-icon:active,
.hs-icon:hover,
.hs-widget:focus,
.hs-widget:focus-visible,
.hs-widget:active,
.hs-widget:hover,
.hs-dot:focus,
.hs-dot:focus-visible,
.hs-dot:active,
.hs-dot:hover,
.hs-nav-btn:focus,
.hs-nav-btn:focus-visible,
.hs-nav-btn:active,
.hs-nav-btn:hover {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: none !important;
}

#home-screen.hs {
    --hs-bar: 40px;
    --hs-card: var(--surface-color, #191d25);
    --hs-line: color-mix(in srgb, var(--on-surface, #ffffff) 11%, transparent);
    --hs-line-strong: color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent);
    --hs-muted: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
    --hs-text: var(--on-surface, #e6e9ef);
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1 * var(--hs-bar));
    bottom: 0;
    z-index: 190;
    overflow: hidden;
    color: var(--hs-text);
    font-family: var(--font-main);
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    /* The theme's background, lit softly from the top in the accent color. */
    background:
        radial-gradient(130% 55% at 50% -8%, color-mix(in srgb, var(--accent-primary, #6aa4f5) 20%, transparent) 0%, transparent 70%),
        var(--background, #13161c);
}

/* A wallpaper from Look is the home screen's wallpaper. */
#home-screen.hs.hs--wall {
    /* Longhands: with no wallpaper set, the shorthand would drop the size too. */
    background-color: var(--background, #13161c);
    background-image: var(--wallpaper-image, none);
    background-position: center bottom;
    background-size: cover;
    background-repeat: no-repeat;
    --hs-text: #ffffff;
    --hs-muted: rgba(255, 255, 255, 0.72);
}

#home-screen.hs[hidden] {
    display: none;
}

.hs button {
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

/* The status bar shows the home background while nothing is open on it. */
body.new-design.home-bare #status-bar,
body.new-design.home-bare #status-bar.has-wallpaper {
    background: transparent !important;
}

body.home-front .os-root {
    overflow: visible !important;
}

/* The terminal's own screen, in one box so it can open and close like an app. */

/* ---------- The page ---------- */

.hs-page {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: calc(var(--hs-bar) + 6px) 12px calc(10px + env(safe-area-inset-bottom, 0px));
    touch-action: none;
    transform-origin: 50% 40%;
}

/* Icon sizes: what the setting asks for, shrunk when the cells are smaller.
   --lab is the room the name under it takes. */
#home-screen.hs {
    --icon: 58px;
    --lab: 26px;
    /* The cell is the page (.hs-pages, a size container) divided by rows and columns. */
    --icon-fit: min(var(--icon), calc(100cqh / var(--rows, 6) - var(--lab) - 6px), calc((100cqw - 2 * max(8px, (100cqw - 560px) / 2)) / var(--cols, 4) - 14px));
}
.hs--icon-small { --icon: 48px !important; }
.hs--icon-large { --icon: 66px !important; }
.hs--cols-5 { --icon: 52px; }
.hs--cols-5.hs--icon-large { --icon: 58px !important; }
.hs--cols-5.hs--icon-small { --icon: 44px !important; }
.hs--nolabels { --lab: 4px; }

/* ---------- Pages: a grid each, side by side ---------- */

.hs-pages {
    container-type: size;
    position: relative;
    flex: 1;
    min-height: 0;
    margin: 0 -12px;
    overflow: hidden;
}

.hs-track {
    display: flex;
    height: 100%;
    transform: translate3d(calc(var(--page, 0) * -100%), 0, 0);
    will-change: transform;
}

.hs-board {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows, 6), minmax(0, 1fr));
    padding: 0 max(8px, calc((100% - 560px) / 2));
}

.hs-board > .hs-item {
    min-width: 0;
    min-height: 0;
}

/* ---------- Widgets ---------- */

.hs-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 5px;
    padding: 12px 14px;
    border-radius: 22px;
    border: 1px solid var(--hs-line);
    /* Widgets > Widget look: how see-through they are, and (below) how much they blur behind. */
    background: color-mix(in srgb, var(--hs-card) calc(var(--w-alpha, 100) * 1%), transparent);
    color: var(--on-surface, #e6e9ef);
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.hs-widget-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.hs-widget-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hs-widget-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 7px;
    background: var(--w-hue);
    color: #ffffff;
}

.hs-widget-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2px;
    gap: 2px;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.hs-widget-body b {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-widget-body span {
    font-size: 0.78rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-widget-body .hs-wrap {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.35;
}

.hs-size-l .hs-widget-body .hs-wrap { -webkit-line-clamp: 12; }
.hs-size-m .hs-widget-body .hs-wrap { -webkit-line-clamp: 4; }

/* Lists in bigger widgets (Coming up, To-do). */
.hs-li {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 3px 0;
}

.hs-li + .hs-li {
    border-top: 1px solid var(--hs-line);
}

.hs-todo {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 3px 0;
}

.hs-todo i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--w-hue);
}

.hs-todo b {
    font-weight: 600 !important;
}

.hs-widget-body .hs-more {
    margin-top: 2px;
    font-size: 0.74rem;
}

.hs-size-s .hs-todo + .hs-more { display: none; }

/* Clock and weather */
.hs-widget.hs-w-clock {
    justify-content: center;
    gap: 2px;
    padding: 14px 18px;
    border-radius: 24px;
}

.hs-date {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-glance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.hs-clock {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
}

.hs-time {
    font-size: 3.4rem;
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hs--clock-small .hs-time {
    font-size: 2.2rem;
}

.hs-period {
    margin-left: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.hs-weather {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hs-weather:empty {
    display: none;
}

.hs-w-icon {
    display: inline-flex;
    color: #3a9be8;
}

.hs-temp {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: -0.03em;
}

.hs-cond {
    max-width: 84px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.hs-greet {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Small clock: stacked, weather under the time. */
.hs-w-clock.hs-size-s {
    padding: 12px 14px;
}

.hs-w-clock.hs-size-s .hs-glance-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.hs-w-clock.hs-size-s .hs-time {
    font-size: 2.3rem;
}

.hs-w-clock.hs-size-s .hs-temp {
    font-size: 1.15rem;
}

.hs-w-clock.hs-size-s .hs-cond,
.hs-w-clock.hs-size-s .hs-greet {
    display: none;
}

.hs-w-clock.hs-size-s .hs-date {
    font-size: 0.68rem;
}

/* Large clock: the time big in the middle. */
.hs-w-clock.hs-size-l {
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.hs-w-clock.hs-size-l .hs-glance-row {
    flex-direction: column;
    gap: 10px;
}

.hs-w-clock.hs-size-l .hs-time {
    font-size: 4.6rem;
}

.hs-w-clock.hs-size-l .hs-greet {
    font-size: 1.05rem;
}

/* Widget contents */
.hs-np {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hs-np img {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 11px;
    object-fit: cover;
}

.hs-np-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.hs-np-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    overflow: visible !important;
}

.hs-size-s .hs-np {
    flex-wrap: wrap;
}

.hs-size-s .hs-np-text {
    flex-basis: calc(100% - 54px);
}

.hs-np-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--w-hue);
    color: #ffffff;
    cursor: pointer;
}

.hs-np-btn svg {
    fill: currentColor;
}

.hs-batt {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hs-batt b {
    font-size: 1.7rem !important;
    font-weight: 300 !important;
    letter-spacing: -0.03em;
}

.hs-batt-bar {
    display: block !important;
    height: 6px;
    border-radius: 999px;
    background: var(--hs-line);
    overflow: hidden;
}

.hs-batt-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--w-hue);
}

.hs-quote {
    font-size: 0.95rem !important;
    font-style: italic;
    line-height: 1.4;
    white-space: normal !important;
    color: var(--on-surface, #e6e9ef) !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.hs-size-s .hs-quote { font-size: 0.82rem !important; -webkit-line-clamp: 4; }
.hs-size-l .hs-quote { font-size: 1.15rem !important; -webkit-line-clamp: 10; }

.hs-date-big {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.hs-size-s .hs-date-big {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}

.hs-date-big b {
    font-size: 2.6rem;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--w-hue);
}

.hs-size-s .hs-date-big b {
    font-size: 3rem;
}

.hs-date-big span {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 70%, transparent);
}

.hs-size-s .hs-wb-date {
    display: none;
}

.hs-widget-apps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: center;
    gap: 6px;
    flex: 1;
    min-height: 0;
}

.hs .hs-page .hs-widget-apps .hs-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.hs .hs-page .hs-widget-apps .hs-icon svg {
    width: 22px;
    height: 22px;
}

.hs-widget-apps .hs-label {
    color: var(--on-surface, #e6e9ef);
    text-shadow: none !important;
}

html.theme-amoled .hs-widget-icon {
    background: #ffffff;
    color: #000000;
}

/* ---------- Safe Mode note ---------- */

.hs-safe {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 8px;
    padding: 12px 12px 12px 14px;
    border-radius: 20px;
    border: 1px solid var(--hs-line);
    background: var(--hs-card);
    color: var(--on-surface, #e6e9ef);
    flex-shrink: 0;
    box-sizing: border-box;
}

.hs-safe-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #f59e0b;
    color: #ffffff;
}

.hs-safe-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.hs-safe-text b {
    font-size: 0.92rem;
    color: var(--on-surface, #e6e9ef);
}

.hs-safe-btn {
    flex-shrink: 0;
    height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Finish setting up (app/setup.js) ---------- */

.hs-setup {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hs-setup-icon {
    background: var(--accent-primary, #4f86f7);
    color: var(--background, #05080c);
}

.hs-setup-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
    cursor: pointer;
}

/* How much is done, as a thin line along the bottom. */
.hs-setup-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--accent-primary, #4f86f7);
    transform: scaleX(var(--done, 0));
    transform-origin: left;
}

html.theme-amoled .hs-setup-icon,
html.theme-amoled .hs-setup-bar {
    background: #ffffff;
    color: #000000;
}

/* ---------- Icons ---------- */

.hs-drawer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: max-content;
    gap: 18px 4px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

@media (min-width: 620px) {
    .hs-drawer-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.hs-app {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-touch-callout: none;
}

/* On the grid an app sits in the middle of its cell. */
.hs-board > .hs-app {
    justify-content: center;
}

.hs-app[hidden] {
    display: none;
}

/* Flat, like the app drawer and Store tiles. */
.hs-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 17px;
    background: var(--tile, #3b82f6);
    color: #ffffff;
}

.hs-icon svg {
    stroke: currentColor;
}

.hs-board .hs-icon,
.hs-fold .hs-icon {
    width: var(--icon-fit);
    height: var(--icon-fit);
    border-radius: calc(var(--icon-fit) * 0.29);
}

.hs-dock .hs-icon {
    width: min(var(--icon), calc((100vw - 60px) / var(--n, 4) - 12px));
    height: min(var(--icon), calc((100vw - 60px) / var(--n, 4) - 12px));
    border-radius: calc(min(var(--icon), calc((100vw - 60px) / var(--n, 4) - 12px)) * 0.29);
}

.hs-board .hs-icon > svg,
.hs-dock .hs-icon > svg,
.hs-fold .hs-icon > svg {
    width: 45%;
    height: 45%;
}

/* A photo as the icon. */
.hs-icon.has-img {
    overflow: visible;
    background: var(--hs-card);
}

.hs-icon.has-img > img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Shapes (Edit home screen > Icons). */
.hs--shape-circle .hs-icon { border-radius: 50% !important; }
.hs--shape-square .hs-icon { border-radius: 9px !important; }
.hs--nolabels .hs-board .hs-label,
.hs--nolabels .hs-fold .hs-label { display: none; }

/* Terminal wears the terminal's own mark. */

.hs-label {
    max-width: 100%;
    padding: 0 2px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.hs--wall .hs-page .hs-label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hs-app:active .hs-icon {
    filter: brightness(0.86);
}

html.theme-amoled .hs-icon:not(.hs-folder-icon):not(.has-img),
html.theme-amoled .hs-row-icon {
    background: #1c1c1c !important;
    border: 1px solid #2a2a2a;
    color: #ffffff !important;
}

/* ---------- Folders ---------- */

.hs-folder-icon {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: calc(var(--icon-fit, 58px) * 0.06);
    padding: calc(var(--icon-fit, 58px) * 0.15);
    box-sizing: border-box;
    background: color-mix(in srgb, var(--hs-card) 72%, transparent) !important;
    border: 1px solid var(--hs-line-strong);
}

.hs-folder-icon > i {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 27%;
    background: var(--tile, #3b82f6);
    color: #ffffff;
    overflow: hidden;
}

.hs-folder-icon > i svg {
    width: 62%;
    height: 62%;
}

.hs-folder-icon > i.has-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hs-fold {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: color-mix(in srgb, var(--background, #000000) 62%, transparent);
}

.hs-fold-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(340px, 100%);
    max-height: 100%;
    padding: 16px 14px 20px;
    border-radius: 30px;
    border: 1px solid var(--hs-line-strong);
    background: var(--hs-card);
    color: var(--on-surface, #e6e9ef);
    box-sizing: border-box;
    --icon-fit: min(var(--icon), 60px);
}

.hs-fold-name {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: 700 1.25rem var(--font-main);
    text-align: center;
    outline: none;
    box-sizing: border-box;
}

.hs-fold-name:focus {
    border-color: var(--hs-line-strong);
    background: color-mix(in srgb, var(--on-surface, #ffffff) 6%, transparent);
}

.hs-fold-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 6px;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.hs-fold-grid .hs-label {
    color: var(--on-surface, #e6e9ef);
    text-shadow: none !important;
}

/* ---------- Bottom: page dots, search and the dock ---------- */

.hs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    margin: 2px 0;
    flex-shrink: 0;
}

.hs-dots {
    display: flex;
    align-items: center;
    padding: 0 6px;
    border-radius: 999px;
}

.hs-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.hs-dot::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hs-text) 38%, transparent);
}

.hs-dot.is-on::after {
    width: 16px;
    background: var(--hs-text);
}

.hs-swipe {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    color: var(--hs-muted);
    cursor: pointer;
}

.hs-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    height: 44px;
    margin: 2px auto 10px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--hs-line-strong);
    background: var(--hs-card);
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: text;
    flex-shrink: 0;
    box-sizing: border-box;
}

.hs-dock {
    display: grid;
    grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
    justify-items: center;
    align-items: center;
    width: 100%;
    max-width: 440px;
    min-height: 82px;
    margin: 0 auto;
    padding: 11px 8px;
    border-radius: 30px;
    border: 1px solid var(--hs-line);
    background: var(--hs-card);
    flex-shrink: 0;
    box-sizing: border-box;
}

.hs--dock-clear .hs-dock {
    border-color: transparent;
    background: transparent;
}

.hs-dock .hs-label {
    display: none;
}

.hs--dock-labels .hs-dock .hs-label {
    display: block;
}

.hs-dock-empty {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: var(--hs-muted);
}

/* While an app is dragged over the dock: a gap where it'd go, or red when full. */
.hs-dock-gap {
    display: block;
    width: min(var(--icon), 56px);
    height: min(var(--icon), 56px);
    border-radius: 17px;
    border: 2px dashed color-mix(in srgb, var(--hs-text) 45%, transparent);
    box-sizing: border-box;
}

.hs-dock.is-full {
    box-shadow: 0 0 0 2px color-mix(in srgb, #e5534b 70%, transparent);
}

/* ---------- All apps ---------- */

.hs-drawer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--hs-bar) + 4px);
    background: var(--background, #13161c);
    color: var(--on-surface, #e6e9ef);
    transform: translate3d(0, 100%, 0);
    will-change: transform;
}

.hs-drawer[hidden] {
    display: none;
}

.hs-drawer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 4px 16px 10px;
    touch-action: none;
}

.hs-grab {
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: var(--hs-line-strong);
}

.hs-find-field {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--hs-line-strong);
    background: var(--hs-card);
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
    cursor: text;
}

.hs-find-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: none !important;
    outline: none;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--on-surface, #e6e9ef) !important;
    font-family: var(--font-main);
    /* 16px keeps iPhones from zooming in. */
    font-size: 16px;
    -webkit-user-select: text;
    user-select: text;
}

.hs-drawer-list {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 592px;
    margin: 0 auto;
    overflow-y: auto;
    padding: 0 16px calc(28px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.hs-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 4px 12px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.hs-head span {
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid var(--hs-line-strong);
    font-size: 0.7rem;
    letter-spacing: 0;
}

.hs-drawer-grid {
    padding: 14px 6px;
    border-radius: 22px;
    border: 1px solid var(--hs-line);
    background: var(--hs-card);
}

.hs-rows {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--hs-line);
    background: var(--hs-card);
}

.hs-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid var(--hs-line);
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.hs-row:last-child {
    border-bottom: none;
}

.hs-row:active {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 6%, transparent);
}

.hs-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--tile, #64748b);
    color: #ffffff;
}

.hs-row-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.hs-row-text b {
    font-size: 0.92rem;
    font-weight: 700;
}

.hs-row-text span {
    font-size: 0.78rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nothing found */
.hs-none {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 48px 16px;
    text-align: center;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.hs-none b {
    font-size: 0.95rem;
    color: var(--on-surface, #e6e9ef);
}

.hs-none span {
    font-size: 0.82rem;
}

/* ---------- Long-press menu ---------- */

.hs-menu {
    position: absolute;
    inset: 0;
    z-index: 8;
    background: color-mix(in srgb, var(--background, #000000) 50%, transparent);
}

.hs-menu-card {
    position: absolute;
    width: 250px;
    padding: 6px;
    border-radius: 22px;
    border: 1px solid var(--hs-line-strong);
    background: var(--hs-card);
    color: var(--on-surface, #e6e9ef);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.hs-menu-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--hs-line);
}

.hs-menu-head .hs-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.hs-menu-head .hs-icon > svg {
    width: 18px;
    height: 18px;
}

.hs-menu-wicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--w-hue);
    color: #ffffff;
}

.hs-menu-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hs-menu-title b {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-menu-title span {
    font-size: 0.75rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.hs-menu-sizes {
    display: flex;
    gap: 6px;
    padding: 4px 4px 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--hs-line);
}

.hs-menu-size {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    height: 58px;
    padding: 8px 4px 6px;
    border: 1px solid var(--hs-line);
    border-radius: 14px;
    background: transparent;
    color: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.hs-menu-size.is-on {
    border-color: transparent;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
}

.hs-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border: none;
    border-radius: 13px;
    background: none;
    color: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.hs-menu-item svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.hs-menu-item.is-danger {
    color: #ef4444;
}

.hs-menu-item:active {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 7%, transparent);
}

.hs-menu-item:disabled {
    opacity: 0.5;
    cursor: default;
}

.hs-app.is-held,
.hs-widget.is-held {
    z-index: 9;
}

/* Little drawings of the widget sizes. */
.hs-sz {
    display: inline-block;
    flex-shrink: 0;
    border-radius: 3px;
    border: 2px solid currentColor;
    box-sizing: border-box;
}

.hs-sz--s { width: 11px; height: 11px; }
.hs-sz--m { width: 22px; height: 11px; }
.hs-sz--l { width: 22px; height: 22px; }

/* ---------- Bar at the bottom of apps (swipe up from it to go home) ---------- */

#hs-pill {
    position: fixed;
    left: 50%;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 250;
    width: 120px;
    height: 5px;
    margin-left: -60px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent);
    pointer-events: none;
    opacity: 0;
}

#hs-pill.is-on {
    opacity: 1;
}

/* ---------- Terminal: the way back home ---------- */

/* A window (or the Terminal) being dragged by a gesture: the finger moves it,
   not the open/close animations. Selector weight beats css/motion.css. */
:root:root body .fullscreen-app.hs-drag:not(#reset-modal):not([data-hs-a]):not([data-hs-b]):not([data-hs-c]):not([data-hs-d]) {
    animation: none !important;
    will-change: transform;
    overflow: hidden;
    /* Set once when the drag starts, never animated (animating it repainted the
       whole window every frame). Scales down with the window, like a card. */
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* Apps opened from an icon grow out of it and shrink back into it. */
.fullscreen-app.hs-from {
    transform-origin: var(--hs-ox, 50%) var(--hs-oy, 50%) !important;
}

.fullscreen-app.hs-from.hs-drag {
    transform-origin: 0 0 !important;
}

/* ---------- Navigation buttons (Settings > Navigation > Buttons) ---------- */

body.nav-buttons {
    --nav-h: calc(52px + env(safe-area-inset-bottom, 0px));
}

/* Without the phone's own height (wider screens) the terminal still leaves room. */
body.nav-buttons.new-design .os-root {
    height: calc(100dvh - 40px - var(--nav-h));
}

#hs-navbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    display: none;
    align-items: center;
    justify-content: space-around;
    height: var(--nav-h, 52px);
    padding: 0 12% env(safe-area-inset-bottom, 0px);
    background: var(--background, #13161c);
    border-top: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 8%, transparent);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Nothing may paint a tile or a highlight box behind the icons (the blue square
   phones drew on a tapped button). */
#hs-navbar svg {
    pointer-events: none;
    background: none !important;
    outline: none !important;
}

#hs-navbar ::selection,
#hs-navbar::selection {
    background: transparent;
}

body.nav-shown #hs-navbar {
    display: flex;
}

.hs-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 42px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 80%, transparent);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hs-nav-btn:active {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 10%, transparent);
}

body.nav-buttons #hs-pill,
body.nav-no-pill #hs-pill {
    display: none !important;
}

/* Keyboard up: the buttons and the bar sit behind it (or float above it as a
   stray box), and the terminal is sized without them (app/script.js). */
/* Keyboard up and the browser's view panned down (app/script.js pinToKeyboard):
   OrbitOS follows the view instead of leaving an empty box above the keyboard. */
body.kb-open #status-bar { top: var(--kb-shift, 0px) !important; }
body.kb-open .os-container { margin-top: var(--kb-shift, 0px); }

body.kb-open #hs-navbar,
body.kb-open #hs-pill,
body.kb-open #as-bar {
    display: none !important;
}

/* ---------- Editing the home screen (hold an empty spot) ---------- */

/* The status bar steps aside for the edit bar. */
body.home-editing #status-bar,
body.new-design.home-editing #status-bar {
    opacity: 0 !important;
    pointer-events: none !important;
}

.hs-editbar {
    position: absolute;
    top: 6px;
    left: 12px;
    right: 12px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
}

.hs-eb-gap {
    flex: 1;
}

.hs-eb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 13px;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hs-card) 82%, transparent);
    color: var(--on-surface, #e6e9ef);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--hs-line);
}

.hs-eb--round {
    width: 32px;
    padding: 0;
}

.hs-eb--done {
    padding: 0 16px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
    box-shadow: none;
}

/* Take off: the grey minus on everything while editing. */
.hs-x {
    position: absolute;
    top: -7px;
    left: -7px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 26%, var(--hs-card));
    color: var(--on-surface, #ffffff);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.hs-x svg {
    stroke-width: 3;
}

.hs-widget > .hs-x {
    top: -6px;
    left: -6px;
}

/* Dragging: the floating copy, the spot it leaves and the one it'd take. */
.hs-ghost {
    z-index: 400 !important;
    pointer-events: none !important;
    animation: none !important;
    rotate: 0deg !important;
    will-change: transform;
}

.hs-ghost.is-up {
    scale: 1.08;
    filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.35));
}

.hs-ghost.hs-app {
    justify-content: center;
}

.hs-ghost.hs-app .hs-icon {
    width: min(var(--icon, 58px), 62px);
    height: min(var(--icon, 58px), 62px);
}

.hs-ghost .hs-label {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hs-item.is-lifted,
.hs-dock-app.is-lifted,
.is-landing {
    opacity: 0 !important;
}

.hs-dock-app.is-gone {
    display: none !important;
}

.hs-drop {
    align-self: center;
    justify-self: center;
    width: var(--icon-fit);
    height: var(--icon-fit);
    border-radius: calc(var(--icon-fit) * 0.29);
    border: 2px dashed color-mix(in srgb, var(--hs-text) 45%, transparent);
    background: color-mix(in srgb, var(--hs-text) 8%, transparent);
    box-sizing: border-box;
    pointer-events: none;
}

.hs-drop.is-wide {
    align-self: stretch;
    justify-self: stretch;
    width: auto;
    height: auto;
    margin: 5px;
    border-radius: 22px;
}

.hs-drop.is-bad {
    border-color: color-mix(in srgb, #e5534b 80%, transparent);
    background: color-mix(in srgb, #e5534b 12%, transparent);
}

.hs-item.is-merge .hs-icon {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hs-text) 55%, transparent);
}

/* The sheet: the home screen shrinks into a preview above it. */
.hs.is-sheet .hs-page {
    z-index: 2;
    background: inherit;
    border-radius: 34px;
    border: 1px solid var(--hs-line-strong);
    overflow: hidden;
    transform-origin: 50% 0;
    transform: translate3d(0, calc(var(--hs-bar) + 6px), 0) scale(0.52);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.hs.is-sheet .hs-editbar {
    visibility: hidden;
}

.hs.is-editing .hs-drawer {
    display: none;
}

.he-dim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: color-mix(in srgb, var(--background, #000000) 72%, transparent);
}

.he-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: calc(100% - var(--hs-bar) - 52% - 14px);
    min-height: 300px;
    padding: 6px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 28px 28px 0 0;
    border-top: 1px solid var(--hs-line-strong);
    background: var(--background, #13161c);
    color: var(--on-surface, #e6e9ef);
}

.he-grab {
    align-self: center;
    width: 40px;
    height: 5px;
    margin: 2px 0 8px;
    border-radius: 999px;
    background: var(--hs-line-strong);
    touch-action: none;
}

.he-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 10px;
    font-size: 1.05rem;
    touch-action: none;
}

.he-done {
    height: 36px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.he-tabs {
    display: flex;
    gap: 6px;
    padding: 0 16px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    touch-action: pan-x;
}

.he-tabs::-webkit-scrollbar {
    display: none;
}

.he-tab {
    flex-shrink: 0;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--hs-line-strong);
    background: transparent;
    color: var(--on-surface, #e6e9ef);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.he-tab.is-on {
    border-color: transparent;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
}

.he-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 16px 12px;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* ---------- Editor panes (the edit sheet and Settings share them) ---------- */

.he-pane,
.hs-settings {
    --hs-card: var(--surface-color, #191d25);
    --hs-line: color-mix(in srgb, var(--on-surface, #ffffff) 11%, transparent);
    --hs-line-strong: color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent);
    font-family: var(--font-main);
    color: var(--on-surface, #e6e9ef);
}

.he-note {
    margin: 0 4px 10px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.he-head {
    margin: 16px 4px 10px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.he-list {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--hs-line);
    background: var(--hs-card);
}

.he-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 12px 10px 14px;
}

.he-row + .he-row {
    border-top: 1px solid var(--hs-line);
}

.he-tile,
.he-add .he-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--tile, var(--w-hue, #64748b));
    color: #ffffff;
}

.he-row-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.he-row-text b {
    font-size: 0.92rem;
    font-weight: 700;
}

.he-row-text span {
    font-size: 0.77rem;
    line-height: 1.35;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.he-row-btns {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.he-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--hs-line-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--on-surface, #e6e9ef);
    cursor: pointer;
}

.he-icon-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.he-icon-btn.he-remove {
    border-color: transparent;
    background: #e5534b;
    color: #ffffff;
}

.he-add-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.he-add {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--hs-line);
    background: var(--hs-card);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.he-add-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.he-add-text b {
    font-size: 0.86rem;
}

.he-add-text span {
    font-size: 0.74rem;
    line-height: 1.3;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.he-add-plus {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
}

.he-seg {
    display: inline-flex;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--hs-line-strong);
}

.he-seg-btn {
    min-width: 40px;
    height: 30px;
    padding: 0 11px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--on-surface, #e6e9ef);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.he-seg-btn.is-on {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
}

.he-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 12px;
    border-radius: 999px;
    border: 1px solid var(--hs-line-strong);
    background: transparent;
    color: var(--on-surface, #e6e9ef);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.he-shapes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.he-shape {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px 10px;
    border-radius: 18px;
    border: 1.5px solid var(--hs-line);
    background: var(--hs-card);
    color: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.he-shape.is-on {
    border-color: var(--accent-primary, #6aa4f5);
}

.he-shape-icon {
    width: 42px;
    height: 42px;
    background: var(--accent-primary, #6aa4f5);
}

.he-shape--rounded { border-radius: 13px; }
.he-shape--circle { border-radius: 50%; }
.he-shape--square { border-radius: 7px; }

.he-walls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

.he-wall {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 65%, transparent);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.he-wall-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 5;
    overflow: hidden;
    border-radius: 14px;
    border: 2px solid var(--hs-line);
    background: var(--hs-card);
}

.he-wall-thumb canvas,
.he-wall-thumb img {
    display: block;
    width: 100%;
    height: 100%;
}

.he-wall.is-on {
    color: var(--on-surface, #e6e9ef);
}

.he-wall.is-on .he-wall-thumb {
    border-color: var(--accent-primary, #6aa4f5);
}

.he-accents {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.he-accent {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 3px solid var(--background, #13161c);
    box-shadow: 0 0 0 1.5px var(--hs-line-strong);
    background: var(--c);
    color: #0b0f19;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.he-accent.is-on {
    box-shadow: 0 0 0 2.5px var(--on-surface, #ffffff);
}

.he-edit-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 20px;
    border: none;
    background: var(--accent-primary, #6aa4f5);
    color: var(--background, #05080c);
    text-align: left;
    cursor: pointer;
}

.he-edit-cta > span {
    display: flex;
    flex-direction: column;
}

.he-edit-cta b {
    font-size: 0.95rem;
}

.he-edit-cta span span {
    font-size: 0.78rem;
    opacity: 0.8;
}

/* ---------- Navigation choice: two phones ---------- */

.nm-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.nm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px 14px;
    border-radius: 22px;
    border: 1.5px solid var(--hs-line);
    background: var(--hs-card);
    color: inherit;
    text-align: center;
    cursor: pointer;
}

.nm-card.is-on {
    border-color: var(--accent-primary, #6aa4f5);
}

.nm-title {
    margin-top: 6px;
    font-size: 0.92rem;
    font-weight: 700;
}

.nm-desc {
    font-size: 0.74rem;
    line-height: 1.35;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.nm-check {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary, #6aa4f5);
    color: var(--background, #05080c);
    opacity: 0;
    transform: scale(0.6);
}

.nm-card.is-on .nm-check {
    opacity: 1;
    transform: none;
}

.nm-phone {
    position: relative;
    display: block;
    width: 78px;
    height: 150px;
    overflow: hidden;
    border-radius: 18px;
    border: 2px solid var(--hs-line-strong);
    background: var(--background, #13161c);
}

.nm-screen {
    position: absolute;
    left: 9px;
    right: 9px;
    top: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.nm-screen i {
    aspect-ratio: 1;
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent-primary, #6aa4f5) 60%, transparent);
}

.nm-screen i:nth-child(2n) {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent);
}

.nm-pill {
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 30px;
    height: 4px;
    margin-left: -15px;
    border-radius: 999px;
    background: var(--on-surface, #ffffff);
}

.nm-finger {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 70%, transparent);
    opacity: 0;
}

.nm-buttons {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 20px;
    padding: 0 8px;
    border-top: 1px solid var(--hs-line);
}

.nm-b {
    display: block;
    width: 7px;
    height: 7px;
}

.nm-b--back {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 6px solid var(--on-surface, #ffffff);
}

.nm-b--home {
    border-radius: 50%;
    border: 1.5px solid var(--on-surface, #ffffff);
}

.nm-b--recents {
    border-radius: 2px;
    border: 1.5px solid var(--on-surface, #ffffff);
}

/* ---------- Terminal settings (app/terminal-settings.js) ---------- */

.terminal-gear {
    margin-left: 6px;
    margin-right: -6px;
}

.ts-app .ts-preview {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 34px 16px 16px;
    border-radius: 22px;
    border: 1px solid var(--ok-line);
    background: var(--surface-color, #191d25);
    color: var(--on-surface);
    line-height: 1.6;
    overflow: hidden;
}

.ts-dots {
    position: absolute;
    top: 12px;
    left: 14px;
    display: flex;
    gap: 6px;
}

.ts-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ok-line-strong);
}

.ts-prompt {
    color: var(--accent-primary, #6aa4f5);
}

.ts-caret {
    display: inline-block;
    width: 0.55em;
    height: 1.05em;
    vertical-align: text-bottom;
    background: currentColor;
}

.ts-colors-row {
    padding-bottom: 4px !important;
}

.ts-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px 14px;
}

.ts-color {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: 3px solid var(--surface-color, #191d25);
    box-shadow: 0 0 0 1.5px var(--ok-line-strong);
    background: var(--c);
    color: var(--background);
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.ts-color.is-on {
    box-shadow: 0 0 0 2.5px var(--on-surface, #ffffff);
}

.ts-app .ts-input {
    flex: 0 1 140px;
    height: 38px;
    padding: 0 12px;
    font-size: 16px;
    text-align: right;
}

.ts-field {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px;
}

.ts-add {
    padding-top: 12px;
    border-top: 1px solid var(--ok-line);
}

.ts-add-btn,
.ts-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--ok-line-strong);
    background: transparent;
    color: var(--on-surface);
    cursor: pointer;
}

.ts-remove {
    width: 36px;
    height: 36px;
    border: none;
    color: #e5534b;
}

.ts-mono {
    font-family: var(--font-mono) !important;
}

/* Phones: the prompt already says who you are, so the header keeps its title. */

/* ---------- Gesture strips along the edges (app/home.js) ---------- */

.hs-edge {
    position: fixed;
    z-index: 260;
    display: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

body.hs-edges .hs-edge--bottom {
    display: block;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(20px + env(safe-area-inset-bottom, 0px));
}

body.hs-edge-back .hs-edge--left {
    display: block;
    left: 0;
    top: 40px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 14px;
}

/* The status bar eases between see-through on home and solid over apps. */
body.new-design #status-bar {
    transition: background-color 0.25s ease !important;
}

/* Light themes: home's text and the Calm wallpaper go light too. */
#home-screen.hs.hs--light {
    --hs-text: #1b1f27;
    --hs-muted: rgba(27, 31, 39, 0.6);
}

.hs--light.hs--wall .hs-page .hs-label {
    text-shadow: none;
}

/* ---------- Widget sizes in the editor ---------- */

.he-sizes {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--hs-line-strong);
}

.he-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--on-surface, #e6e9ef);
    cursor: pointer;
}

.he-size .hs-sz--l {
    width: 16px;
    height: 16px;
}

.he-size .hs-sz--m {
    width: 20px;
    height: 10px;
}

.he-size .hs-sz--s {
    width: 10px;
    height: 10px;
}

.he-size.is-on {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
}

.he-add-sizes {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 45%, transparent);
}

.he-add-sizes .hs-sz {
    border-width: 1.5px;
}

/* A row whose control is too wide to sit beside the title goes under it. */
.he-row--wide {
    flex-wrap: wrap;
}

.he-row--wide > .he-seg {
    margin-left: 46px;
}

@media (max-width: 400px) {
    .he-row--wide > .he-seg {
        margin-left: 0;
        width: 100%;
    }

    .he-row--wide > .he-seg .he-seg-btn {
        flex: 1;
    }
}

.he-note svg {
    vertical-align: -2px;
}

/* ---------- Edit an app's icon and name (app/home-icons.js) ---------- */

.ai-edit {
    position: fixed;
    inset: 0;
    z-index: 420;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    font-family: var(--font-main);
    -webkit-tap-highlight-color: transparent;
}

.ai-edit-sheet {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: min(88dvh, 820px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: 28px 28px 0 0;
    border-top: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 18%, transparent);
    background: var(--background, #13161c);
    color: var(--on-surface, #e6e9ef);
    box-sizing: border-box;
    --line: color-mix(in srgb, var(--on-surface, #ffffff) 11%, transparent);
    --line-strong: color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent);
    --muted: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.ai-edit-grab {
    align-self: center;
    width: 40px;
    height: 5px;
    margin: 8px 0 4px;
    border-radius: 999px;
    background: var(--line-strong);
}

.ai-edit-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 4px 14px 10px;
    font-size: 1.02rem;
}

.ai-edit-x {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.ai-edit-save {
    justify-self: end;
    height: 36px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.ai-edit-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 16px 18px;
    overscroll-behavior: contain;
}

.ai-edit-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 6px 0 16px;
}

.ai-edit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: var(--tile, #3b82f6);
    color: #ffffff;
    overflow: hidden;
}

.ai-edit-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-edit-name {
    max-width: 80%;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-edit-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 4px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-color, #191d25);
}

.ai-edit-field > span {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
}

.ai-edit-field input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 10px;
    border: none;
    background: transparent;
    color: inherit;
    font: 600 1rem var(--font-main);
    outline: none;
}

.ai-edit-head {
    margin: 18px 4px 10px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.ai-edit-hues {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 10px;
}

.ai-edit-hue {
    width: 36px;
    height: 36px;
    justify-self: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--c);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.ai-edit-hue.is-on {
    box-shadow: 0 0 0 2.5px var(--background, #13161c), 0 0 0 5px var(--on-surface, #ffffff);
}

.ai-edit-photos {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: none;
}

.ai-edit-photos::-webkit-scrollbar {
    display: none;
}

.ai-edit-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-color, #191d25);
    color: inherit;
    overflow: hidden;
    cursor: pointer;
}

.ai-edit-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-edit-photo--device span {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--muted);
}

.ai-edit-photo.is-on {
    box-shadow: 0 0 0 2.5px var(--on-surface, #ffffff);
}

.ai-edit-none {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--muted);
}

.ai-edit-none svg {
    flex-shrink: 0;
}

.ai-edit-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
}

.ai-edit-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-color, #191d25);
    color: inherit;
    cursor: pointer;
}

.ai-edit-glyph.is-on {
    border-color: transparent;
    background: var(--tile, #3b82f6);
    color: #ffffff;
}

.ai-edit-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 18px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

/* Small phones: the five tabs share the width, and the sheet gets more room. */
@media (max-width: 420px) {
    .he-tabs {
        gap: 4px;
        padding: 0 12px 10px;
    }

    .he-tab {
        flex: 1 0 auto;
        padding: 0 10px;
        font-size: 0.8rem;
    }
}

@media (max-height: 700px) {
    .hs.is-sheet .hs-page {
        transform: translate3d(0, calc(var(--hs-bar) + 4px), 0) scale(0.4);
    }

    .he-sheet {
        height: calc(100% - var(--hs-bar) - 40% - 10px);
    }
}

@media (max-width: 380px) {
    .he-tab {
        padding: 0 8px;
        font-size: 0.76rem;
    }

    .he-size {
        width: 30px;
    }
}

/* Blur behind widgets: only exists while it's on (hs--wblur), since it costs on weak phones. */
.hs--wblur .hs-widget { -webkit-backdrop-filter: blur(var(--w-blur, 0px)); backdrop-filter: blur(var(--w-blur, 0px)); }

/* Sliders in the edit sheet and Settings. */
.he-slide { align-items: flex-start; }
.he-slide-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; padding-top: 2px; }
.he-slide-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.he-slide-top b { font-size: 0.92rem; font-weight: 700; }
.he-slide-val { font-size: 0.8rem; font-weight: 800; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent); }

/* Lock screen page (Settings > Lock screen). The preview uses the same --lock-* variables as the real one. */
.lk-prev-wrap { margin: 0 0 4px; }
.lk-prev {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: var(--lock-items, center);
    text-align: var(--lock-text, center);
    height: 230px;
    padding: 14px 18px;
    border-radius: 24px;
    border: 1px solid var(--hs-line-strong);
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent-primary, #4790e6) 38%, var(--hs-card)), color-mix(in srgb, #8b5cf6 22%, var(--hs-card)) 60%, var(--hs-card));
    box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--background, #13161c) calc(var(--lock-dim, 35) * 1%), transparent);
    color: var(--on-surface, #e6e9ef);
    overflow: hidden;
    box-sizing: border-box;
}
.lk-prev::before { content: ''; flex: var(--lock-top, 50) 1 0; }
.lk-prev::after { content: ''; flex: var(--lock-bottom, 50) 1 0; }
.lk-prev > * { flex-shrink: 0; }
.lk-prev-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: 8px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 25%, transparent); }
.lk-prev.lock-noicon .lk-prev-icon { display: none; }
.lk-prev-time {
    font-family: var(--lock-font, var(--font-main));
    font-weight: var(--lock-weight, 300);
    font-size: calc(2.9rem * var(--lock-scale, 1));
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--lock-color, var(--on-surface, #ffffff));
}
.lk-prev.lock-condensed .lk-prev-time { font-stretch: condensed; }
.lk-prev.lock-stacked .lk-prev-time { display: flex; flex-direction: column; align-items: var(--lock-items, center); font-size: calc(3.9rem * var(--lock-scale, 1)); line-height: 0.86; }
.lk-prev-time small { font-size: 0.22em; font-weight: 600; letter-spacing: 0; opacity: 0.8; line-height: 1.4; }
.lk-prev-date { margin-top: 6px; font-family: var(--lock-font, var(--font-main)); font-size: calc(0.8rem * var(--lock-date-scale, 1)); font-weight: 500; color: var(--lock-color, var(--on-surface, #ffffff)); opacity: 0.85; }
.lk-prev.lock-nodate .lk-prev-date { display: none; }
.lk-prev-pill { margin-top: 10px; padding: 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent); background: var(--hs-card); font-size: 0.68rem; font-weight: 600; }
.lk-block { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.lk-block + .he-row, .he-row + .lk-block, .lk-block + .lk-block { border-top: 1px solid var(--hs-line); }
.lk-block > b { font-size: 0.92rem; font-weight: 700; }
.lk-hint { font-size: 0.72rem; line-height: 1.35; color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent); }
/* One row you swipe through (36 fonts made a wall that went on forever). */
.lk-fonts { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; margin: 0 -14px; padding: 2px 14px 6px; scrollbar-width: none; }
.lk-fonts::-webkit-scrollbar { display: none; }
.lk-fonts .lk-font { flex: 0 0 auto; min-width: 104px; scroll-snap-align: start; }
.lk-font { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--hs-line-strong); background: transparent; color: var(--on-surface, #e6e9ef); text-align: left; cursor: pointer; }
.lk-font b { font-size: 1.35rem; font-weight: 400; line-height: 1.1; }
.lk-font span { font-family: var(--font-main); font-size: 0.74rem; font-weight: 700; color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent); }
.lk-font.is-on { border-color: var(--on-surface, #ffffff); background: color-mix(in srgb, var(--on-surface, #ffffff) 9%, transparent); }
.lk-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.lk-color { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid var(--hs-line-strong); background: var(--c, transparent); color: var(--on-surface, #e6e9ef); font: 700 0.85rem var(--font-main); cursor: pointer; }
.lk-color.is-accent { background: var(--accent-primary, #4790e6); border-color: transparent; }
.lk-color.is-on { box-shadow: 0 0 0 2px var(--hs-card), 0 0 0 4px var(--on-surface, #ffffff); }

@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .lk-prev-wrap, :root:not(.no-animations) body:not(.no-animations) .lk-block, :root:not(.no-animations) body:not(.no-animations) .lk-font { animation: lkIn 0.34s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
    :root:not(.no-animations) body:not(.no-animations) .lk-prev, :root:not(.no-animations) body:not(.no-animations) .lk-prev-time, :root:not(.no-animations) body:not(.no-animations) .lk-prev-date { transition: font-size 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, letter-spacing 0.18s ease; }
    :root:not(.no-animations) body:not(.no-animations) .lk-font, :root:not(.no-animations) body:not(.no-animations) .lk-color { transition: transform 0.15s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
    :root:not(.no-animations) body:not(.no-animations) .lk-font:active, :root:not(.no-animations) body:not(.no-animations) .lk-color:active { transform: scale(0.94); }
    :root:not(.no-animations) body:not(.no-animations) .hs-widget { transition: background-color 0.2s ease; }
}

@keyframes lkIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* Desktop layout shares the v3 palette and launcher, with its own saved board. */

@media (min-width: 1px) {
  body.desktop-mode {
    --nav-h: 0px !important;
  }
  body.desktop-mode .os-root {
    height: calc(100dvh - 40px) !important;
  }
  body.desktop-mode #home-screen.hs {
    --icon-fit: 58px;
  }
  body.desktop-mode .hs-page {
    padding: 64px 32px 96px;
  }
  body.desktop-mode .hs-pages {
    margin: 0;
  }
  body.desktop-mode .hs-board {
    padding: 0 max(12px, calc((100% - 1160px) / 2));
    grid-template-rows: repeat(var(--rows), minmax(0, var(--desktop-cell-height,110px)));
    align-content: start;
  }
  body.desktop-mode .hs-board > .hs-app {
    justify-content: center;
    align-self: start;
    padding-top: 12px;
  }
  body.desktop-mode .hs-dock,
  body.desktop-mode .hs-search {
    display: none;
  }
  body.desktop-mode .hs-nav {
    margin-top: 8px;
  }
  body.desktop-mode .hs-drawer {
    left: max(24px, calc((100% - 920px) / 2));
    right: max(24px, calc((100% - 920px) / 2));
    top: 64px;
    bottom: 92px;
    border: 1px solid var(--hs-line-strong);
    border-radius: 24px;
  }
  body.desktop-mode .hs-drawer-grid {
    max-width: none;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 24px 10px;
  }
  body.desktop-mode .hs-drawer-list {
    padding: 24px 32px;
  }
  body.desktop-mode #hs-navbar,
  body.desktop-mode .hs-edge,
  body.desktop-mode #hs-gesture-pill,
  body.desktop-mode #as-bar {
    display: none !important;
  }
  body.desktop-mode .os-root > .fullscreen-app:not(.ok-sheet, #app-switcher) {
    left: max(24px, calc((100% - 1280px) / 2));
    right: max(24px, calc((100% - 1280px) / 2));
    top: 16px;
    bottom: 88px;
    width: auto;
    height: auto;
    border: 1px solid color-mix(in srgb, var(--on-surface) 14%, transparent);
    border-radius: 20px;
    overflow: hidden;
  }
  /* Full screen pages that apps put straight on the page (outside their
     window) stop above the taskbar, so nothing maximized ever hides it. */
  body.desktop-mode > .fullscreen-app.ok-app:not(.ok-sheet):not(.desktop-window):not(#app-switcher) {
    max-height: calc(100dvh - var(--desktop-bar-space, 80px)) !important;
  }





  html.kbd-nav .desktop-mode .hs-app:focus-visible {
    outline: 2px solid var(--accent-primary) !important;
    outline-offset: 3px;
  }


  body.desktop-mode .hs-app:hover .hs-icon {
    filter: brightness(1.12);
  }
  html.kbd-nav body.desktop-mode
    .fullscreen-app
    :is(button, input, textarea, select):focus-visible {
    outline: 2px solid var(--accent-primary) !important;
    outline-offset: 2px;
  }
}
@media (min-width: 1px) {
  body.desktop-mode #hs-pill {
    display: none !important;
  }
}
@media (min-width: 1px) {
  body.desktop-mode .hs-drawer-list {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
  }
  body.desktop-mode .hs-drawer-top {
    max-width: none;
  }
  body.desktop-mode .hs-drawer-top .hs-find-field {
    max-width: none;
    width: 100%;
  }
  body.desktop-mode .hs-swipe {
    display: none;
  }

}
@media(max-height:540px){
 body.desktop-mode #home-screen.hs{--icon-fit:44px}
 body.desktop-mode .hs-page{padding-top:44px;padding-bottom:72px}
 body.desktop-mode .os-root>.fullscreen-app:not(.ok-sheet,#app-switcher){left:8px;right:8px;top:4px;bottom:64px;border-radius:14px}
 body.desktop-mode .xa-app .xa-header{min-height:46px;padding:5px 10px!important}
 body.desktop-mode .studio-meta{min-height:28px;padding:5px 12px}
 body.desktop-mode .studio-tabs{padding:5px 12px!important}
 body.desktop-mode .fm-sidebar{width:168px;padding:8px}
 body.desktop-mode .fm-sidebar .ok-row{padding:8px}
 body.desktop-mode .fm-crumb{padding:6px 0}
 body.desktop-mode .fm-search input{height:36px}
 body.desktop-mode .fm-tools{padding:6px 0}
 body.desktop-mode .fm-bottom{padding:4px 0;margin-top:4px}
 body.desktop-mode .hs-drawer{left:8px;right:8px;top:44px;bottom:64px}
}
.hs-offline-label{font:9px var(--font-main);color:var(--hs-muted);white-space:nowrap}
body.experience-offline #home-screen.hs{--lab:36px}
/* Keep the active editor usable when a landscape phone keyboard leaves little height. */
@media(max-height:320px){
 body.desktop-mode #desktop-taskbar:not([hidden]){display:none!important}
 body.desktop-mode .os-root>.fullscreen-app:not(.ok-sheet,#app-switcher){bottom:8px}
 body.desktop-mode .studio-meta,body.desktop-mode .studio-tabs,body.desktop-mode .studio-footer{display:none}
 body.desktop-mode .studio-pane.is-source{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
 body.desktop-mode .studio-pane.is-source>.studio-desktop-preview{display:none}
 body.desktop-mode .studio-pane.is-source>.studio-codebar{padding:4px 12px}
}
/* PC title bars and independent windows retain the shared Design v3 palette. */
.desktop-titlebar,
.desktop-resize {
  display: none;
}
body.desktop-mode .os-root > .desktop-window {
  border-radius: 10px;
  container-type: inline-size;
}
body.desktop-mode .desktop-window > .desktop-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  min-height: 38px;
  flex-shrink: 0;
  background: var(--surface-color);
  border-bottom: 1px solid
    color-mix(in srgb, var(--on-surface) 12%, transparent);
  color: var(--on-surface);
  font: 500 12px var(--font-main);
  touch-action: none;
  user-select: none;
  cursor: default;
  overflow: hidden;
}
body.desktop-mode .desktop-window:not(.desktop-active) > .desktop-titlebar {
  color: color-mix(in srgb, var(--on-surface) 65%, transparent);
}
.desktop-caption {
  padding: 0 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.desktop-window-actions {
  display: flex;
  align-self: stretch;
  flex-shrink: 0;
}
.desktop-window-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  min-height: 0 !important;
}
.desktop-window-actions button:hover {
  background: color-mix(in srgb, var(--on-surface) 10%, transparent);
}
.desktop-window-actions button[data-window-action="close"]:hover {
  background: #c42b1c;
  color: #fff;
}
body.desktop-mode .desktop-window > .desktop-resize {
  display: block;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  min-height: 18px !important;
  padding: 0;
  border: 0;
  background: linear-gradient(
    135deg,
    transparent 65%,
    color-mix(in srgb, var(--on-surface) 40%, transparent) 66%,
    transparent 71%,
    transparent 77%,
    color-mix(in srgb, var(--on-surface) 40%, transparent) 78%,
    transparent 83%
  );
  cursor: nwse-resize;
  touch-action: none;
  z-index: 5;
}
body.desktop-mode .desktop-dragging {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  will-change: left, top, width, height;
}
body.desktop-mode .desktop-dragging iframe {
  pointer-events: none;
}
#desktop-snap-preview {
  position: fixed;
  pointer-events: none;
  z-index: 590;
  background: color-mix(in srgb, var(--accent-primary) 16%, transparent);
  border: 2px solid var(--accent-primary);
  border-radius: 10px;
  box-sizing: border-box;
}
#desktop-snap-preview[hidden] {
  display: none;
}
/* A narrow window (an upright phone) gets the phone layout back: the Files
   sidebar and the App Creator side preview would squash the content. The
   .desktop-window step beats the desktop rules in xapps.css, which load later. */
@container (max-width:600px) {
  body.desktop-mode .desktop-window .studio-pane.is-source {
    grid-template-columns: minmax(0, 1fr);
  }
  body.desktop-mode .desktop-window .studio-pane.is-source > .studio-desktop-preview {
    display: none;
  }
  body.desktop-mode .desktop-window .fm-sidebar {
    display: none;
  }
}
@media (max-height: 540px) {
  body.desktop-mode .desktop-window > .desktop-titlebar {
    height: 32px;
    min-height: 32px;
  }
  .desktop-window-actions button {
    width: 42px;
  }
}
body.access-targets.desktop-mode .desktop-window > .desktop-titlebar {
  height: 48px;
  min-height: 48px;
}
body.desktop-mode .desktop-window {
  border-radius: 10px !important;
}
body.desktop-mode
  .desktop-window.desktop-settled:not(.desktop-restoring):not(.os-closing):not(
    [style*="fadeOut"]
  ) {
  animation: none !important;
}
body.desktop-mode .desktop-window.desktop-expanded > .desktop-resize {
  display: none;
}
/* Every edge and corner of a window resizes it (app/home.js). Mouse gets thin
   strips; fingers get thicker ones and big corners. */
.desktop-edge {
  display: none;
}
body.desktop-mode .desktop-window:not(.desktop-expanded, .desktop-fullscreen) > .desktop-edge {
  --e: 5px;
  --c: 14px;
  display: block;
  position: absolute;
  z-index: 6;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
@media (pointer: coarse) {
  body.desktop-mode .desktop-window > .desktop-edge { --e: 11px; --c: 28px; }
  body.desktop-mode .desktop-window > .desktop-edge[data-edge="n"] { --e: 6px; }
  body.desktop-mode .desktop-window > .desktop-resize { width: 28px; height: 28px; }
}
.desktop-edge[data-edge="n"], .desktop-edge[data-edge="s"] { left: var(--c); right: var(--c); height: var(--e); cursor: ns-resize; }
.desktop-edge[data-edge="e"], .desktop-edge[data-edge="w"] { top: var(--c); bottom: var(--c); width: var(--e); cursor: ew-resize; }
.desktop-edge[data-edge="n"] { top: 0; }
.desktop-edge[data-edge="s"] { bottom: 0; }
.desktop-edge[data-edge="e"] { right: 0; }
.desktop-edge[data-edge="w"] { left: 0; }
.desktop-edge[data-edge$="e"][data-edge^="n"], .desktop-edge[data-edge$="w"][data-edge^="n"],
.desktop-edge[data-edge$="e"][data-edge^="s"], .desktop-edge[data-edge$="w"][data-edge^="s"] { width: var(--c); height: var(--c); }
.desktop-edge[data-edge="ne"] { top: 0; right: 0; cursor: nesw-resize; }
.desktop-edge[data-edge="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.desktop-edge[data-edge="se"] { bottom: 0; right: 0; cursor: nwse-resize; }
.desktop-edge[data-edge="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
/* The grip sits over the se corner and keeps its look. */
body.desktop-mode .desktop-window > .desktop-resize { z-index: 7; }
body.desktop-mode .desktop-window.desktop-resizing {
  outline: 2px solid color-mix(in srgb, var(--accent-primary) 70%, transparent);
  outline-offset: -2px;
}
@media (max-height: 540px) {
  body.desktop-mode .studio-meta,
  body.desktop-mode .studio-footer {
    display: none;
  }
  body.desktop-mode .studio-codebar {
    padding: 4px 12px;
  }
}

/* Optional touchpad for the desktop interface. */
#orbit-virtual-mouse {
  touch-action: manipulation;
  position: fixed;
  z-index: 110000;
  right: 16px;
  bottom: 90px;
  width: 264px;
  max-width: calc(100vw - 24px);
  color: var(--on-surface);
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--on-surface) 22%, transparent);
  border-radius: 16px;
  box-shadow: 0 12px 36px #0005;
  overflow: hidden;
  font-family: var(--font-main);
  user-select: none;
}
#orbit-virtual-mouse[hidden],
#orbit-mouse-cursor[hidden] {
  display: none !important;
}
.vm-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid
    color-mix(in srgb, var(--on-surface) 12%, transparent);
}
.vm-handle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  cursor: move;
  touch-action: none;
  font-size: 0.8125rem;
}
.vm-header button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: inherit;
  font: 20px/1 var(--font-main);
  cursor: pointer;
}
.vm-header button:hover {
  background: color-mix(in srgb, var(--on-surface) 10%, transparent);
}
.vm-header button[data-vm="off"]:hover {
  background: #c42b1c;
  color: white;
}
.vm-content {
  padding: 8px;
}
.vm-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 104px;
  min-height: calc(58px * var(--access-text-size, 1));
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--on-surface) 16%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--on-surface) 4%, transparent);
  touch-action: none;
  font-size: 0.75rem;
}
.vm-pad small {
  opacity: 0.65;
  font-size: 0.6875rem;
}
.vm-pad:active {
  background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}
.vm-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}
.vm-buttons button {
  min-height: 40px;
  padding: 6px 2px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--on-surface) 16%, transparent);
  color: inherit;
  background: var(--background);
  font: 500 0.75rem var(--font-main);
  cursor: pointer;
}
.vm-buttons button[aria-pressed="true"] {
  background: var(--accent-primary);
  color: var(--background);
}
.vm-status {
  margin: 6px 2px 0;
  font-size: 0.6875rem;
  min-height: 16px;
  color: color-mix(in srgb, var(--on-surface) 70%, transparent);
}
#orbit-virtual-mouse.is-collapsed {
  width: 218px;
}
#orbit-virtual-mouse.is-collapsed .vm-content {
  display: none;
}
#orbit-virtual-mouse.is-collapsed .vm-header {
  border: 0;
}
#orbit-mouse-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110001;
  width: 26px;
  height: 30px;
  pointer-events: none;
  transform-origin: top left;
  filter: drop-shadow(0 1px 2px #0008);
}
#orbit-mouse-cursor.is-held path {
  fill: var(--accent-primary);
}
.vm-hover {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
@media (max-height: 540px) {
  #orbit-virtual-mouse {
    bottom: 68px;
    width: 248px;
  }
  .vm-pad {
    height: 58px;
  }
  .vm-content {
    padding: 6px;
  }
  .vm-status {
    font-size: 0.625rem;
  }
}
body.access-targets .vm-header button,
body.access-targets .vm-buttons button {
  min-width: 48px;
  min-height: 48px;
}
body.access-targets #orbit-virtual-mouse {
  width: 280px;
}
#orbit-mouse-touch { position: fixed; inset: 0; z-index: 109999; touch-action: none; user-select: none; }
#orbit-mouse-touch[hidden] { display: none !important; }

/* ---------- Widgets: tick to-dos off, empty states that invite a tap ---------- */
.hs-todo .hs-check {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin: -2px 0;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--w-hue);
    background: transparent;
    cursor: pointer;
}
/* A bigger tap area than the circle itself. */
.hs-todo .hs-check::before { content: ''; position: absolute; inset: -10px; }
.hs-todo .hs-check.is-done { background: var(--w-hue); }
.hs-todo .hs-check.is-done::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2.4px 2.4px 0;
    transform: rotate(45deg);
}
.hs-todo.is-done b { text-decoration: line-through; opacity: 0.55; }
.hs-empty { display: flex; flex-direction: column; gap: 4px; }
.hs-empty em { font-style: normal; font-weight: 700; font-size: 0.78rem; color: var(--w-hue); }
.hs-size-s .hs-empty em { font-size: 0.72rem; }
@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .hs-todo .hs-check { transition: background-color 0.2s ease, transform 0.15s var(--os-ease, ease); }
    :root:not(.no-animations) body:not(.no-animations) .hs-todo .hs-check:active { transform: scale(0.85); }
    :root:not(.no-animations) body:not(.no-animations) .hs-todo .hs-check.is-done { animation: osPop 0.3s var(--os-spring, ease); }
    :root:not(.no-animations) body:not(.no-animations) .hs-todo.is-done { transition: opacity 0.3s ease 0.15s, transform 0.3s ease 0.15s; opacity: 0; transform: translateX(10px); }
}

/* ---------- All apps, redone ----------
   Icons sit straight on the sheet (no boxed cards), a soft glow in the
   accent color behind, Suggested apps set off by a hairline, and an A to Z
   rail on the right edge. */
.hs-drawer {
    background:
        radial-gradient(120% 50% at 50% 0%, color-mix(in srgb, var(--accent-primary, #4790e6) 13%, transparent), transparent 70%),
        var(--background, #13161c);
}
.hs-drawer-list .hs-drawer-grid {
    padding: 4px 0;
    border: none;
    border-radius: 0;
    background: none;
    gap: 22px 2px;
}
.hs-drawer-list .hs-head { margin: 18px 6px 14px; }
.hs-drawer-list .hs-head span { border: none; background: color-mix(in srgb, var(--on-surface, #ffffff) 9%, transparent); }
.hs-drawer-suggest { padding-bottom: 20px; border-bottom: 1px solid var(--hs-line); }
.hs-drawer:has(.hs-az:not([hidden])) .hs-drawer-list { padding-right: 30px; }

.hs-az {
    position: absolute;
    right: 2px;
    top: calc(var(--hs-bar, 40px) + 96px);
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 26px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.hs-az[hidden] { display: none; }
.hs-az button {
    flex: 0 1 18px;
    min-height: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: none;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent);
    font: 800 0.64rem/1 var(--font-main);
    cursor: pointer;
}
.hs-az button.is-on { color: var(--accent-primary, #4790e6); }
.hs-az-bubble {
    position: absolute;
    right: 44px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-top: -28px;
    border-radius: 50% 50% 6px 50%;
    background: var(--accent-primary, #4790e6);
    color: #ffffff;
    font: 800 1.5rem var(--font-main);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    transform: rotate(0deg) scale(0.6);
    opacity: 0;
    pointer-events: none;
}
.hs-az-bubble.is-on { opacity: 1; transform: scale(1); }
html.theme-amoled .hs-drawer { background: #000000; }
html.theme-amoled .hs-az-bubble { background: #ffffff; color: #000000; }
@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .hs-az-bubble { transition: opacity 0.15s ease, transform 0.2s var(--os-spring, ease), top 0.08s linear; }
    :root:not(.no-animations) body:not(.no-animations) .hs-az button { transition: color 0.15s ease, transform 0.15s ease; }
    :root:not(.no-animations) body:not(.no-animations) .hs-az button.is-on { transform: scale(1.35) translateX(-3px); }
    :root:not(.no-animations) body:not(.no-animations) .hs-az:not([hidden]) { animation: hsFade 0.3s ease 0.15s both; }
    :root:not(.no-animations) body:not(.no-animations) .hs-az-hit .hs-icon { animation: osPop 0.4s var(--os-spring, ease); }
}

/* ---------- Browser shortcuts and the Browser widget ----------
   --w-hue, not --tile: themes repaint anything with an inline --tile. */
.hs-link-icon { background: var(--w-hue, #0ea5e9); }
.hs-link-icon > b { font: 800 calc(var(--icon-fit, 58px) * 0.42) / 1 var(--font-main); color: #ffffff; }
.hs-link-badge { position: absolute; right: -3px; bottom: -3px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--background, #13161c); background: #0ea5e9; color: #ffffff; font-style: normal; }
.hs-link-badge svg { width: 10px !important; height: 10px !important; }

.hs-w-browser { gap: 10px; }
.hs-bw-search { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 14px; border: 1px solid var(--hs-line); border-radius: 999px; background: color-mix(in srgb, var(--on-surface, #ffffff) 6%, transparent); color: color-mix(in srgb, var(--on-surface, #ffffff) 65%, transparent); font: 600 0.8rem var(--font-main); text-align: left; cursor: pointer; flex-shrink: 0; }
.hs-bw-search span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-bw-search svg { flex-shrink: 0; color: var(--w-hue); }
.hs-w-browser .hs-wb-browser { gap: 10px; padding-top: 0; }
.hs-bw-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 4px; flex-shrink: 0; }
.hs-size-m .hs-wb-browser { justify-content: center; }
.hs-bw-links--s { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hs-bw-link { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 0; border: none; background: none; color: inherit; cursor: pointer; }
.hs-bw-link i { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--w-hue); color: #ffffff; font: 800 1rem var(--font-main); font-style: normal; }
.hs-widget-body .hs-bw-link span { max-width: 100%; font-size: 0.68rem; font-weight: 600; color: inherit; }
.hs-bw-links--s .hs-bw-link { flex-direction: row; gap: 6px; }
.hs-bw-links--s .hs-bw-link i { width: 26px; height: 26px; border-radius: 9px; font-size: 0.78rem; flex-shrink: 0; }
.hs-size-s .hs-bw-search span { display: none; }
.hs-size-s .hs-bw-search { justify-content: center; min-height: 34px; }
.hs-bw-recent { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; border-top: 1px solid var(--hs-line); padding-top: 6px; }
.hs-bw-row { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; padding: 6px 2px; border: none; background: none; color: inherit; text-align: left; cursor: pointer; }
.hs-bw-row b, .hs-bw-row span { max-width: 100%; }
@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .hs-bw-link { animation: osPop 0.32s var(--os-ease-out, ease) backwards; animation-delay: calc(0.04s + var(--i, 0) * 30ms); }
    :root:not(.no-animations) body:not(.no-animations) :is(.hs-bw-link i, .hs-bw-search, .hs-bw-row) { transition: transform 0.15s var(--os-ease, ease), background-color 0.15s var(--os-ease, ease); }
    :root:not(.no-animations) body:not(.no-animations) .hs-bw-link:active i { transform: scale(0.88); }
    :root:not(.no-animations) body:not(.no-animations) :is(.hs-bw-search, .hs-bw-row):active { transform: scale(0.97); }
    :root:not(.no-animations) body:not(.no-animations) .hs-link-badge { animation: osPop 0.4s var(--os-spring, ease) 0.1s backwards; }
}
