:root {
    color-scheme: light dark;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
    font-synthesis: none;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --ios-blue: #007aff;
    --ios-red: #ff3b30;
    --ios-label: #000;
    --ios-secondary: #6d6d72;
    --ios-fill: #e3e3e8;
    --ios-background: #f2f2f7;
    --ios-card: rgba(255, 255, 255, .94);
}

html[data-platform="ios"] {
    --safe-top: max(env(safe-area-inset-top, 0px), 59px);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

html[data-platform="pending"] body {
    visibility: hidden;
}

body {
    display: grid;
    place-items: center;
    background: #0b0d16;
    color: #fff;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overscroll-behavior: none;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.myos-login-view {
    position: absolute;
    z-index: 50;
    inset: 0;
    display: grid;
    place-items: center;
    padding:
        max(28px, var(--safe-top))
        max(18px, var(--safe-right))
        max(28px, var(--safe-bottom))
        max(18px, var(--safe-left));
    overflow: auto;
}

.myos-login-window {
    width: min(100%, 420px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 28px;
    background: rgba(246, 246, 250, .88);
    color: #1c1c1e;
    box-shadow: 0 28px 70px rgba(17, 20, 42, .32);
    backdrop-filter: blur(32px) saturate(1.35);
    -webkit-backdrop-filter: blur(32px) saturate(1.35);
}

.myos-login-titlebar {
    display: none;
}

.myos-login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 30px 28px;
    text-align: center;
}

.myos-login-mark {
    display: grid;
    width: 74px;
    height: 74px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(145deg, #7d62f2, #2f78e8);
    color: #fff;
    box-shadow: 0 14px 30px rgba(55, 95, 217, .34);
    font-size: 38px;
    font-weight: 750;
    letter-spacing: -.08em;
}

.myos-login-kicker,
.myos-login-content h1,
.myos-login-subtitle,
.myos-login-error {
    margin: 0;
}

.myos-login-kicker {
    color: #6d6d72;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.myos-login-content h1 {
    margin-top: 5px;
    font-size: clamp(26px, 7vw, 34px);
    letter-spacing: -.035em;
}

.myos-login-subtitle {
    max-width: 310px;
    margin-top: 8px;
    color: #6d6d72;
    font-size: 15px;
    line-height: 1.4;
}

.myos-login-form {
    display: grid;
    width: 100%;
    gap: 12px;
    margin-top: 28px;
    text-align: left;
}

.myos-login-form label {
    display: grid;
    gap: 6px;
    color: #3a3a3c;
    font-size: 13px;
    font-weight: 620;
}

.myos-login-form input {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid rgba(60, 60, 67, .19);
    border-radius: 13px;
    outline: none;
    background: rgba(255, 255, 255, .86);
    color: #1c1c1e;
    font-size: 16px;
}

.myos-login-form input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, .15);
}

.myos-login-form button {
    height: 48px;
    border: 0;
    border-radius: 13px;
    background: #007aff;
    color: #fff;
    font-weight: 680;
}

.myos-login-form button:hover {
    background: #0069d9;
}

.myos-login-form button:disabled {
    opacity: .58;
    cursor: wait;
}

.myos-login-error {
    min-height: 18px;
    color: #c9342f;
    font-size: 13px;
    text-align: center;
}

.myos-login-classic {
    margin-top: 20px;
    color: #007aff;
    font-size: 14px;
    text-decoration: none;
}

.myos-login-classic:hover {
    text-decoration: underline;
}

.ios-device[data-platform="macos"] .myos-login-view {
    padding-top: 52px;
}

.ios-device[data-platform="macos"] .myos-login-window {
    width: min(100%, 470px);
    border-color: rgba(15, 23, 42, .22);
    border-radius: 12px;
    background: rgba(249, 250, 252, .96);
    box-shadow: 0 24px 72px rgba(15, 23, 42, .38);
}

.ios-device[data-platform="macos"] .myos-login-titlebar {
    display: flex;
    height: 38px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border-bottom: 1px solid rgba(15, 23, 42, .12);
    background: rgba(230, 232, 237, .86);
}

.ios-device[data-platform="macos"] .myos-login-titlebar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f57;
}

.ios-device[data-platform="macos"] .myos-login-titlebar span:nth-child(2) {
    background: #febc2e;
}

.ios-device[data-platform="macos"] .myos-login-titlebar span:nth-child(3) {
    background: #28c840;
}

.ios-device[data-platform="macos"] .myos-login-titlebar strong {
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-30px);
    color: #3a3a3c;
    font-size: 13px;
}

.ios-device[data-platform="macos"] .myos-login-content {
    padding: 30px 46px 32px;
}

.ios-device[data-platform="macos"] .myos-login-mark {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    font-size: 32px;
}

.ios-device[data-platform="macos"] .myos-login-content h1 {
    font-size: 28px;
}

.ios-device[data-platform="macos"] .myos-login-form {
    margin-top: 24px;
}

.ios-device[data-platform="macos"] .myos-login-form input,
.ios-device[data-platform="macos"] .myos-login-form button {
    height: 38px;
    border-radius: 7px;
    font-size: 14px;
}

@media (max-width: 520px) {
    .myos-login-view {
        align-items: end;
        padding-right: max(10px, var(--safe-right));
        padding-bottom: max(10px, var(--safe-bottom));
        padding-left: max(10px, var(--safe-left));
    }

    .myos-login-window {
        border-radius: 26px;
    }

    .myos-login-content {
        padding: 30px 22px 24px;
    }
}

.ios-device {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #18203c;
}

.ios-wallpaper {
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
        radial-gradient(circle at 74% 15%, rgba(251, 191, 36, .84) 0 4%, transparent 28%),
        radial-gradient(circle at 22% 32%, rgba(244, 114, 182, .72) 0 2%, transparent 31%),
        radial-gradient(circle at 76% 75%, rgba(56, 189, 248, .72) 0 4%, transparent 32%),
        linear-gradient(148deg, #382a63 0%, #9e426c 37%, #ef8a64 66%, #34789b 100%);
    transform: scale(1.05);
}

.macos-menu-bar,
.macos-window-controls {
    display: none;
}

.ios-device[data-wallpaper="ocean"] .ios-wallpaper {
    background:
        radial-gradient(circle at 20% 15%, rgba(125, 211, 252, .62), transparent 30%),
        radial-gradient(circle at 82% 69%, rgba(45, 212, 191, .68), transparent 34%),
        linear-gradient(145deg, #0f2854, #175d88 48%, #052d44);
}

.ios-device[data-wallpaper="night"] .ios-wallpaper {
    background:
        radial-gradient(circle at 72% 14%, rgba(139, 92, 246, .46), transparent 25%),
        radial-gradient(circle at 20% 72%, rgba(14, 165, 233, .34), transparent 28%),
        linear-gradient(155deg, #080b18, #18264c 54%, #11101f);
}

.ios-view {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding-top: var(--safe-top);
    opacity: 0;
    transform: scale(.94);
    pointer-events: none;
    transition: opacity .18s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}

.ios-view.is-active {
    z-index: 5;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.home-view {
    display: flex;
    flex-direction: column;
    padding-right: max(12px, var(--safe-right));
    padding-bottom: max(14px, var(--safe-bottom));
    padding-left: max(12px, var(--safe-left));
}

.home-header {
    flex: none;
    padding: 12px 8px 16px;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

.home-header p,
.home-header h1 {
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-spotlight-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 360px);
    min-height: 36px;
    margin: 14px auto 0;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 12px;
    background: rgba(244, 244, 249, .26);
    color: rgba(255, 255, 255, .9);
    font: inherit;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.macos-spotlight-button {
    display: none;
}

.spotlight {
    position: absolute;
    z-index: 120;
    inset: 0;
}

.spotlight-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(7, 12, 24, .42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.spotlight-panel {
    position: absolute;
    top: max(72px, calc(var(--safe-top) + 48px));
    right: max(12px, var(--safe-right));
    left: max(12px, var(--safe-left));
    max-height: min(72vh, 620px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 22px;
    background: rgba(241, 244, 249, .94);
    color: #17191f;
    box-shadow: 0 28px 90px rgba(5, 12, 26, .42);
    transform-origin: top center;
    animation: spotlightAppear .16s ease-out;
}

.spotlight-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 10px 8px 16px;
    border-bottom: 1px solid rgba(60, 60, 67, .16);
}

.spotlight-search > span {
    color: #63666d;
    font-size: 25px;
}

.spotlight-search input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #17191f;
    font: 500 20px/1.2 system-ui, sans-serif;
}

.spotlight-search button {
    width: 34px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(118, 118, 128, .16);
    color: #585b62;
    font-size: 22px;
}

.spotlight-status {
    min-height: 28px;
    padding: 8px 16px 4px;
    color: #6b6e75;
    font-size: 12px;
}

.spotlight-results {
    max-height: calc(min(72vh, 620px) - 92px);
    padding: 0 10px 12px;
    overflow-y: auto;
}

.spotlight-group h3 {
    margin: 9px 7px 5px;
    color: #777a82;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.spotlight-result {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 6px 10px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: inherit;
    text-align: left;
    gap: 10px;
}

.spotlight-result.is-selected,
.spotlight-result:hover,
.spotlight-result:focus-visible {
    outline: 0;
    background: #0a84ff;
    color: #fff;
}

.spotlight-result-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: linear-gradient(145deg, #63c7ff, #2563eb);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 5px 12px rgba(37, 99, 235, .22);
}

.spotlight-result-copy {
    min-width: 0;
}

.spotlight-result-copy strong,
.spotlight-result-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spotlight-result-copy strong {
    font-size: 14px;
}

.spotlight-result-copy small {
    margin-top: 2px;
    color: #757880;
    font-size: 11px;
}

.spotlight-result.is-selected small,
.spotlight-result:hover small,
.spotlight-result:focus-visible small {
    color: rgba(255, 255, 255, .78);
}

.spotlight-result-arrow {
    font-size: 24px;
}

.spotlight-empty {
    padding: 32px 16px 40px;
    color: #777a82;
    text-align: center;
}

@keyframes spotlightAppear {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(.98);
    }
}

.home-header p {
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
}

.home-header h1 {
    margin-top: 2px;
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.app-grid {
    --role-page-offset: 0%;
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 0 2px 104px;
    overflow: hidden;
    scrollbar-width: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.app-grid::-webkit-scrollbar,
.role-app-list::-webkit-scrollbar,
.settings-scroll::-webkit-scrollbar,
.messages-list-content::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    display: none;
}

.role-pages-track {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 0;
    transform: translate3d(var(--role-page-offset), 0, 0);
    transition: transform .32s cubic-bezier(.22, .8, .24, 1);
    will-change: transform;
}

.role-page {
    display: flex;
    flex: 0 0 100%;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.role-page-header {
    display: flex;
    flex: none;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    padding: 0 6px 14px;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

.role-page-header h2,
.role-page-header span {
    margin: 0;
}

.role-page-kicker {
    display: block;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.role-page-header h2 {
    margin-top: 2px;
    font-size: 22px;
    line-height: 1.1;
}

.role-page-count {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 650;
}

.role-app-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    gap: 20px 11px;
    min-height: 0;
    padding: 2px 0 12px;
    overflow-y: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.role-app-list .empty-state {
    grid-column: 1 / -1;
}

.role-page-nav {
    display: flex;
    flex: none;
    justify-content: center;
    align-items: center;
    gap: 14px;
    min-height: 36px;
    padding-top: 8px;
}

.role-page-nav > button,
.role-page-dots button {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
}

.role-page-nav > button {
    width: 34px;
    height: 30px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .16);
    font-size: 24px;
    line-height: 1;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.role-page-nav > button:disabled {
    opacity: .28;
}

.role-page-nav button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.role-page-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-page-dots button {
    width: 18px;
    height: 18px;
}

.role-page-dots button::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .46);
    content: "";
    transition: width .18s ease, background .18s ease;
}

.role-page-dots button[aria-current="page"]::before {
    width: 18px;
    border-radius: 5px;
    background: #fff;
}

.app-button {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 6px;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
}

.app-button:active .app-icon {
    transform: scale(.9);
    filter: brightness(.82);
}

.app-button:focus-visible .app-icon {
    outline: 3px solid rgba(255, 255, 255, .92);
    outline-offset: 3px;
}

.app-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 61px;
    height: 61px;
    overflow: visible;
    border: .5px solid rgba(255, 255, 255, .32);
    border-radius: 13.5px;
    background:
        radial-gradient(circle at 28% 16%, rgba(255, 255, 255, .34), transparent 34%),
        linear-gradient(155deg, var(--icon-a, #64748b), var(--icon-b, #334155));
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 26px;
    font-weight: 680;
    letter-spacing: -.04em;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .35),
        inset 0 -1px 0 rgba(0, 0, 0, .12),
        0 7px 16px rgba(0, 0, 0, .22);
    transition: transform .13s ease, filter .13s ease;
}

.app-icon::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12);
    content: "";
    pointer-events: none;
}

.notification-badge {
    position: absolute;
    z-index: 2;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 12px;
    background: #ff3b30;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.notification-badge[hidden] {
    display: none;
}

.app-icon.is-official {
    border-color: rgba(255, 255, 255, .2);
    background: #fff;
}

.app-icon.is-official img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.app-icon.is-light {
    color: #101114;
}

.app-name {
    width: 100%;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .75);
    white-space: nowrap;
}

.ios-device.large-icons .app-icon {
    width: 67px;
    height: 67px;
    border-radius: 16px;
}

.ios-device.large-icons .role-app-list {
    row-gap: 18px;
}

.home-loading {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 7px;
    padding-top: 58px;
}

.home-loading span,
.typing-bubble span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .76);
    animation: bounce 1.1s infinite ease-in-out;
}

.home-loading span:nth-child(2),
.typing-bubble span:nth-child(2) {
    animation-delay: .14s;
}

.home-loading span:nth-child(3),
.typing-bubble span:nth-child(3) {
    animation-delay: .28s;
}

@keyframes bounce {
    0%, 60%, 100% {
        opacity: .35;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.ios-dock {
    position: absolute;
    z-index: 8;
    right: max(12px, var(--safe-right));
    bottom: max(16px, calc(var(--safe-bottom) + 8px));
    left: max(12px, var(--safe-left));
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    min-height: 88px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .27);
    border-radius: 29px;
    background: rgba(244, 244, 249, .28);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .2);
    backdrop-filter: blur(28px) saturate(1.4);
    -webkit-backdrop-filter: blur(28px) saturate(1.4);
}

.ios-dock .app-button {
    width: 68px;
}

.ios-dock .app-name {
    display: none;
}

.native-app {
    color: var(--ios-label);
    background: var(--ios-background);
}

.desktop-window-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.desktop-window-layer > .native-app {
    pointer-events: auto;
}

.embedded-app-stage {
    position: relative;
    height: calc(100% - 50px);
    overflow: hidden;
    background: var(--ios-background);
}

.embedded-app-stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--ios-background);
}

.embedded-app-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 24px;
    color: var(--ios-secondary);
    text-align: center;
}

.embedded-app-state strong,
.embedded-app-state span {
    display: block;
}

.embedded-app-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(0, 122, 255, .2);
    border-top-color: var(--ios-blue);
    border-radius: 50%;
    animation: embeddedSpin .8s linear infinite;
}

.embedded-app-error button {
    min-height: 34px;
    padding: 7px 15px;
    border: 0;
    border-radius: 17px;
    background: var(--ios-blue);
    color: #fff;
}

@keyframes embeddedSpin {
    to {
        transform: rotate(360deg);
    }
}

.app-navigation {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(70px, 1fr) auto minmax(70px, 1fr);
    align-items: center;
    height: 50px;
    padding: 0 12px;
    border-bottom: .5px solid rgba(60, 60, 67, .22);
    background: rgba(248, 248, 250, .86);
    backdrop-filter: blur(24px) saturate(1.35);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
}

.app-navigation > strong {
    font-size: 17px;
    line-height: 1.1;
}

.nav-back,
.nav-action {
    display: flex;
    align-items: center;
    width: max-content;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ios-blue);
}

.nav-back > span:first-child {
    margin: -3px 2px 0 -4px;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
}

.nav-action {
    justify-self: end;
    padding: 0 8px;
    font-size: 24px;
}

.app-settings-action {
    font-size: 21px;
}

.nav-back:focus-visible,
.nav-action:focus-visible,
.settings-row:focus-visible,
.conversation-row:focus-visible,
.workflow-actions button:focus-visible {
    outline: 3px solid rgba(0, 122, 255, .42);
    outline-offset: 1px;
}

.settings-scroll,
.messages-list-content {
    height: calc(100% - 50px);
    padding: 10px 16px calc(44px + var(--safe-bottom));
    overflow-y: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.settings-scroll > h1,
.messages-list-content > h1 {
    margin: 4px 2px 14px;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.settings-profile {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    margin-bottom: 24px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--ios-card);
    box-shadow: 0 .5px 0 rgba(60, 60, 67, .2);
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(145deg, #5ac8fa, #007aff);
    color: #fff;
    font-size: 24px;
    font-weight: 750;
}

.profile-copy {
    min-width: 0;
}

.profile-copy strong,
.profile-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-copy strong {
    font-size: 20px;
}

.profile-copy span {
    margin-top: 2px;
    color: var(--ios-secondary);
    font-size: 13px;
}

.profile-chevron,
.settings-chevron {
    color: #c4c4c6;
    font-size: 22px;
    font-weight: 300;
}

.settings-section {
    margin: 0 0 24px;
}

.settings-section h2 {
    margin: 0 14px 7px;
    color: var(--ios-secondary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
}

.settings-group {
    overflow: hidden;
    border-radius: 12px;
    background: var(--ios-card);
    box-shadow: 0 .5px 0 rgba(60, 60, 67, .2);
}

.settings-row {
    position: relative;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 47px;
    padding: 7px 13px;
    border: 0;
    background: transparent;
    color: var(--ios-label);
    text-align: left;
}

.settings-row + .settings-row::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 55px;
    height: .5px;
    background: rgba(60, 60, 67, .2);
}

.settings-row:active,
.conversation-row:active {
    background: rgba(118, 118, 128, .1);
}

.settings-icon {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 7px;
    background: linear-gradient(145deg, var(--icon-a, #8e8e93), var(--icon-b, #636366));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.settings-label {
    min-width: 0;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-label-stack strong,
.settings-label-stack small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-label-stack small {
    margin-top: 1px;
    color: var(--ios-secondary);
    font-size: 12px;
    font-weight: 400;
}

.ios-switch {
    position: relative;
    width: 51px;
    height: 31px;
    border: 0;
    border-radius: 17px;
    background: #e9e9ea;
    transition: background .18s ease;
}

.ios-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .22);
    transition: transform .18s ease;
}

.ios-switch[aria-checked="true"] {
    background: #34c759;
}

.ios-switch[aria-checked="true"]::after {
    transform: translateX(20px);
}

.platform-setting {
    grid-template-rows: auto auto;
    padding-top: 9px;
    padding-bottom: 10px;
}

.platform-picker {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    margin-top: 2px;
    padding: 2px;
    border-radius: 9px;
    background: rgba(118, 118, 128, .13);
}

.platform-picker button {
    min-width: 0;
    min-height: 29px;
    padding: 4px 7px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ios-label);
    font-size: 12px;
}

.platform-picker button[aria-checked="true"] {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    font-weight: 650;
}

.role-preview-setting {
    grid-template-rows: auto auto;
    padding-top: 9px;
    padding-bottom: 10px;
}

.role-preview-picker {
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
}

.wallpaper-picker {
    display: flex;
    gap: 9px;
    padding: 12px;
}

.wallpaper-option {
    flex: 1;
    aspect-ratio: 1.35;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 12px;
    background: linear-gradient(145deg, #382a63, #ef8a64 62%, #34789b);
}

.wallpaper-option[data-wallpaper="ocean"] {
    background: linear-gradient(145deg, #0f2854, #27a3ae);
}

.wallpaper-option[data-wallpaper="night"] {
    background: linear-gradient(145deg, #080b18, #283766 65%, #151121);
}

.wallpaper-option[aria-pressed="true"] {
    border-color: var(--ios-blue);
}

.settings-logout {
    color: var(--ios-red);
}

.settings-error,
.composer-error {
    min-height: 18px;
    margin: 8px 12px;
    color: var(--ios-red);
    font-size: 13px;
    text-align: center;
}

.messages-list-screen,
.messages-chat-screen {
    height: 100%;
}

.messages-list-content {
    padding-right: 0;
    padding-left: 0;
}

.messages-list-content > h1,
.ios-search,
.connection-note {
    margin-right: 16px;
    margin-left: 16px;
}

.ios-search {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 11px;
    background: rgba(118, 118, 128, .13);
    color: #8e8e93;
}

.ios-search input {
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ios-label);
    font-size: 16px;
}

.connection-note {
    min-height: 20px;
    padding: 4px 0 0;
    color: var(--ios-secondary);
    font-size: 12px;
    text-align: center;
}

.connection-note.is-error {
    color: var(--ios-red);
}

.conversation-list {
    margin-top: 5px;
}

.conversation-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px;
    align-items: stretch;
}

.conversation-open {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 76px;
    padding: 9px 14px 9px 16px;
    border: 0;
    background: transparent;
    color: var(--ios-label);
    text-align: left;
}

.conversation-actions {
    display: grid;
    align-content: center;
    justify-items: stretch;
    gap: 2px;
    padding: 4px 6px 4px 0;
}

.conversation-delete {
    min-height: 34px;
    padding: 0 5px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ios-red);
    font-size: 12px;
    font-weight: 700;
}

.conversation-delete:active {
    background: rgba(255, 59, 48, .12);
}

.conversation-delete:disabled {
    opacity: .45;
}

.conversation-row.is-unread .conversation-head strong,
.conversation-row.is-unread .conversation-preview {
    font-weight: 700;
}

.conversation-row.is-unread::before {
    position: absolute;
    z-index: 2;
    top: 34px;
    left: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #007aff;
    content: "";
}

.conversation-read-toggle {
    width: 100%;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.conversation-read-toggle::before {
    display: block;
    width: 9px;
    height: 9px;
    margin: auto;
    border: 2px solid #007aff;
    border-radius: 50%;
    content: "";
}

.conversation-row.is-unread .conversation-read-toggle::before {
    background: #007aff;
}

.conversation-delete-error {
    grid-column: 1 / -1;
    padding: 0 16px 7px 81px;
    color: var(--ios-red);
    font-size: 12px;
}

.conversation-avatar,
.contact-avatar {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #64d2ff, #0a84ff 62%, #5856d6);
    color: #fff;
    font-weight: 750;
}

.conversation-avatar {
    width: 54px;
    height: 54px;
    font-size: 22px;
}

.conversation-copy {
    position: relative;
    min-width: 0;
    align-self: stretch;
    padding: 6px 0 9px;
}

.conversation-copy::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: 0;
    left: 0;
    height: .5px;
    background: rgba(60, 60, 67, .2);
}

.conversation-head {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.conversation-head strong,
.conversation-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-head time {
    flex: none;
    color: #8e8e93;
    font-size: 14px;
}

.conversation-preview {
    display: block;
    margin-top: 3px;
    color: #8e8e93;
    font-size: 15px;
}

.conversation-chevron {
    color: #c7c7cc;
    font-size: 24px;
}

.empty-state {
    padding: 74px 28px;
    color: var(--ios-secondary);
    text-align: center;
}

.empty-state strong,
.empty-state span {
    display: block;
}

.empty-state strong {
    color: var(--ios-label);
    font-size: 18px;
}

.empty-state span {
    margin-top: 5px;
    font-size: 14px;
}

.messages-chat-screen {
    position: relative;
    display: grid;
    grid-template-rows: 50px auto minmax(0, 1fr) auto auto auto;
    background: #fff;
}

.messages-chat-screen[hidden] {
    display: none;
}

.chat-navigation {
    grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
}

.chat-back {
    width: 44px;
}

.chat-contact {
    display: grid;
    justify-items: center;
    gap: 1px;
    min-width: 100px;
}

.contact-avatar {
    width: 30px;
    height: 30px;
    font-size: 14px;
}

.chat-contact strong {
    max-width: 190px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-contact small {
    color: #34c759;
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
}

.chat-contact small.is-error {
    color: var(--ios-red);
}

.workflow-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 8px 16px 5px;
    background: #fff;
}

.workflow-step {
    display: grid;
    gap: 4px;
    color: #aeaeb2;
    font-size: 10px;
    text-align: center;
}

.workflow-step::before {
    content: "";
    height: 3px;
    border-radius: 3px;
    background: #d1d1d6;
}

.workflow-step.is-complete,
.workflow-step.is-current {
    color: var(--ios-blue);
}

.workflow-step.is-complete::before,
.workflow-step.is-current::before {
    background: var(--ios-blue);
}

.workflow-step.is-current::before {
    animation: phasePulse 1.6s infinite ease-in-out;
}

@keyframes phasePulse {
    50% {
        opacity: .45;
    }
}

.chat-messages {
    min-height: 0;
    padding: 12px 11px 15px;
    overflow-y: auto;
    background: #fff;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.chat-event {
    margin: 8px 14px 15px;
    color: #8e8e93;
    font-size: 12px;
    text-align: center;
}

.bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin: 3px 0;
}

.bubble-row.user {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.message-menu-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 50%;
    background: #fff;
    color: #344054;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.message-menu-button:hover,
.message-menu-button:focus-visible {
    background: #f2f4f7;
}

.message-menu-popup {
    position: fixed;
    z-index: 10000;
    min-width: 132px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.message-menu-popup[hidden] {
    display: none;
}

.message-menu-popup button {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #b42318;
    text-align: left;
    cursor: pointer;
}

.message-menu-popup button:hover,
.message-menu-popup button:focus-visible {
    background: #ffe8e7;
}

.message-delete-error {
    max-width: 82%;
    color: #b42318;
    font-size: 12px;
}

.message-bubble {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 18px;
    background: #e9e9eb;
    color: #000;
    font-size: 16px;
    line-height: 1.28;
    overflow-wrap: anywhere;
    user-select: text;
    white-space: pre-wrap;
    -webkit-user-select: text;
}

.bubble-row.user .message-bubble {
    border-bottom-right-radius: 5px;
    background: var(--ios-blue);
    color: #fff;
}

.bubble-row.assistant .message-bubble {
    border-bottom-left-radius: 5px;
}

.message-bubble.is-error {
    background: #ffe8e7;
    color: #b42318;
}

.message-bubble.is-pending {
    opacity: .68;
}

.message-bubble.rich-message {
    white-space: normal;
}

.rich-message p,
.rich-message ul,
.rich-message ol,
.rich-message pre {
    margin: 0 0 9px;
}

.rich-message > :last-child {
    margin-bottom: 0;
}

.rich-message ul,
.rich-message ol {
    padding-left: 21px;
}

.rich-message li + li {
    margin-top: 3px;
}

.rich-message a {
    color: #0066cc;
    text-decoration: underline;
}

.rich-message code {
    padding: 1px 4px;
    border-radius: 5px;
    background: rgba(0, 0, 0, .08);
    font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rich-message pre {
    position: relative;
    max-width: 100%;
    padding: 30px 10px 10px;
    overflow-x: auto;
    border-radius: 10px;
    background: #1c1c1e;
    color: #f2f2f7;
    white-space: pre;
}

.rich-message pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.code-language {
    position: absolute;
    top: 7px;
    left: 10px;
    color: #aeaeb2;
    font-size: 10px;
}

.copy-code {
    position: absolute;
    top: 5px;
    right: 6px;
    padding: 3px 7px;
    border: 0;
    border-radius: 6px;
    background: #3a3a3c;
    color: #fff;
    font-size: 11px;
}

.message-delivery {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .78);
    font-size: 10px;
    text-align: right;
}

.progress-bubble {
    color: #636366;
    font-size: 13px;
    font-style: italic;
}

.new-message-indicator {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 108px;
    padding: 7px 13px;
    border: 0;
    border-radius: 17px;
    background: var(--ios-blue);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .18);
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    transform: translateX(-50%);
}

.new-message-indicator[hidden] {
    display: none;
}

.typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 54px;
    min-height: 35px;
}

.typing-bubble span {
    width: 7px;
    height: 7px;
    background: #8e8e93;
}

.workflow-actions {
    display: flex;
    gap: 8px;
    min-height: 0;
    padding: 0 11px;
    overflow-x: auto;
    background: #fff;
    scrollbar-width: none;
}

.workflow-actions:empty {
    display: none;
}

.workflow-actions button {
    flex: none;
    min-height: 34px;
    padding: 7px 13px;
    border: 0;
    border-radius: 17px;
    background: #e9e9eb;
    color: var(--ios-blue);
    font-size: 14px;
    font-weight: 550;
}

.workflow-actions button.primary {
    background: var(--ios-blue);
    color: #fff;
}

.workflow-actions button.destructive {
    color: var(--ios-red);
}

.workflow-actions button:disabled {
    opacity: .45;
}

.composer-error {
    margin: 0;
    padding: 4px 12px 0;
    background: #fff;
}

.composer-error:empty {
    display: none;
}

.message-composer {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding: 7px 10px max(8px, calc(var(--safe-bottom) + 5px));
    border-top: .5px solid rgba(60, 60, 67, .18);
    background: rgba(250, 250, 250, .92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.message-composer textarea {
    flex: 1;
    width: 100%;
    min-height: 36px;
    max-height: 126px;
    padding: 7px 12px;
    resize: none;
    border: 1px solid #c7c7cc;
    border-radius: 19px;
    outline: 0;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 20px;
}

.message-composer textarea:focus {
    border-color: #8e8e93;
}

.message-composer button {
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0 0 2px;
    border: 0;
    border-radius: 50%;
    background: var(--ios-blue);
    color: #fff;
    font-size: 20px;
    font-weight: 750;
}

.message-composer button:active {
    filter: brightness(.82);
}

.ios-toast {
    position: absolute;
    z-index: 120;
    top: calc(var(--safe-top) + 12px);
    left: 50%;
    max-width: calc(100% - 34px);
    padding: 9px 14px;
    border-radius: 18px;
    background: rgba(25, 25, 27, .9);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: opacity .18s ease, transform .18s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ios-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.home-indicator {
    position: absolute;
    z-index: 110;
    bottom: max(5px, calc(var(--safe-bottom) - 1px));
    left: 50%;
    width: 134px;
    height: 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .9);
    transform: translateX(-50%);
    pointer-events: none;
    transition: background .2s ease;
}

.ios-device.app-open .home-indicator {
    background: rgba(0, 0, 0, .82);
}

.ios-device.reduce-motion *,
.ios-device.reduce-motion *::before,
.ios-device.reduce-motion *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media (min-width: 600px) and (min-height: 720px) {
    body {
        padding: 16px;
        background:
            radial-gradient(circle at 50% 12%, #27304d, transparent 42%),
            #090b12;
    }

    .ios-device {
        width: min(430px, calc(100vw - 32px));
        height: min(900px, calc(100dvh - 32px));
        border: 7px solid #050506;
        border-radius: 52px;
        box-shadow: 0 32px 90px rgba(0, 0, 0, .72), inset 0 0 0 1px #3a3a3d;
    }

    .ios-view,
    .ios-wallpaper {
        border-radius: 44px;
    }

    .native-app {
        overflow: hidden;
    }
}

@media (max-width: 350px) {
    .role-app-list {
        column-gap: 5px;
    }

    .app-icon {
        width: 56px;
        height: 56px;
    }

    .nav-back > span:last-child {
        display: none;
    }
}

.ios-device:not([data-platform="macos"]) {
    --myos-home-zone: max(44px, calc(var(--safe-bottom) + 16px));
    --myos-navigation-height: 52px;
}

.ios-device:not([data-platform="macos"]) > .ios-view.native-app {
    padding-top: var(--safe-top);
}

.ios-device:not([data-platform="macos"]) .app-navigation {
    grid-template-columns: minmax(88px, 1fr) minmax(0, auto) minmax(88px, 1fr);
    height: var(--myos-navigation-height);
    padding: 0 max(8px, var(--safe-right)) 0 max(8px, var(--safe-left));
}

.ios-device:not([data-platform="macos"]) .app-navigation > strong {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ios-device:not([data-platform="macos"]) .nav-back,
.ios-device:not([data-platform="macos"]) .nav-action,
.ios-device:not([data-platform="macos"]) .nav-home[data-system-home] {
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    touch-action: manipulation;
}

.ios-device:not([data-platform="macos"]) .nav-back {
    max-width: 100%;
    gap: 2px;
    overflow: hidden;
}

.ios-device:not([data-platform="macos"]) .nav-back > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ios-device:not([data-platform="macos"]) .nav-home[data-system-home] {
    display: grid;
    justify-self: end;
    place-items: center;
    width: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ios-blue);
    font-size: 22px;
}

.ios-device:not([data-platform="macos"]) .nav-actions {
    display: flex;
    align-items: center;
    justify-self: end;
}

.ios-device:not([data-platform="macos"]) .nav-back:active,
.ios-device:not([data-platform="macos"]) .nav-action:active,
.ios-device:not([data-platform="macos"]) .nav-home[data-system-home]:active {
    background: rgba(0, 122, 255, .1);
}

.ios-device:not([data-platform="macos"]) .nav-home[data-system-home]:focus-visible {
    outline: 3px solid rgba(0, 122, 255, .42);
    outline-offset: 1px;
}

.ios-device:not([data-platform="macos"]) .embedded-app-stage {
    height: calc(100% - var(--myos-navigation-height));
}

.ios-device:not([data-platform="macos"]) .settings-scroll {
    height: calc(100% - var(--myos-navigation-height));
    padding-bottom: calc(var(--myos-home-zone) + 16px);
}

.ios-device:not([data-platform="macos"]) .messages-list-screen,
.ios-device:not([data-platform="macos"]) .messages-chat-screen {
    height: 100%;
}

.ios-device:not([data-platform="macos"]) .messages-list-content {
    height: calc(100% - var(--myos-navigation-height));
    padding-bottom: calc(var(--myos-home-zone) + 16px);
}

.ios-device:not([data-platform="macos"]) .messages-chat-screen {
    grid-template-rows: var(--myos-navigation-height) auto minmax(0, 1fr) auto auto auto;
}

.ios-device:not([data-platform="macos"]) .message-composer {
    padding-bottom: calc(var(--myos-home-zone) + 8px);
}

.ios-device:not([data-platform="macos"]) .settings-scroll > h1,
.ios-device:not([data-platform="macos"]) .messages-list-content > h1 {
    display: none;
}

.ios-device:not([data-platform="macos"]) .home-spotlight-button {
    display: none;
}

.ios-device:not([data-platform="macos"]) .home-spotlight-button,
.ios-device:not([data-platform="macos"]) .role-page-nav > button,
.ios-device:not([data-platform="macos"]) .role-page-dots button,
.ios-device:not([data-platform="macos"]) .platform-picker button,
.ios-device:not([data-platform="macos"]) .conversation-delete,
.ios-device:not([data-platform="macos"]) .conversation-read-toggle,
.ios-device:not([data-platform="macos"]) .message-menu-popup button,
.ios-device:not([data-platform="macos"]) .workflow-actions button,
.ios-device:not([data-platform="macos"]) .message-composer button,
.ios-device:not([data-platform="macos"]) .new-message-indicator,
.ios-device:not([data-platform="macos"]) .embedded-app-error button {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

.ios-device:not([data-platform="macos"]) .role-page-nav {
    min-height: 44px;
    gap: 6px;
}

.ios-device:not([data-platform="macos"]) .role-page-kicker,
.ios-device:not([data-platform="macos"]) .role-page-count {
    display: none;
}

.ios-device:not([data-platform="macos"]) .role-page-header {
    padding-bottom: 9px;
}

.ios-device:not([data-platform="macos"]) .role-page-header h2 {
    font-size: 18px;
}

.ios-device:not([data-platform="macos"]) .role-page-nav > button {
    height: 44px;
    border-radius: 22px;
}

.ios-device:not([data-platform="macos"]) .role-page-dots button {
    width: 44px;
    height: 44px;
}

.ios-device:not([data-platform="macos"]) .platform-picker button {
    padding: 7px;
}

.ios-device:not([data-platform="macos"]) .ios-search,
.ios-device:not([data-platform="macos"]) .message-composer textarea {
    min-height: 44px;
}

.ios-device:not([data-platform="macos"]) .ios-switch::before {
    position: absolute;
    inset: -7px -4px;
    content: "";
}

.ios-device:not([data-platform="macos"]) .ios-dock {
    bottom: max(52px, calc(var(--safe-bottom) + 18px));
}

.ios-device:not([data-platform="macos"]) .home-indicator[data-system-home] {
    bottom: 0;
    display: block;
    width: 148px;
    height: var(--myos-home-zone);
    padding: 0;
    border: 0;
    border-radius: 24px 24px 0 0;
    outline: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
}

.ios-device:not([data-platform="macos"]) .home-indicator[data-system-home]::before {
    position: absolute;
    bottom: max(5px, var(--safe-bottom));
    left: 50%;
    width: 134px;
    height: 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .9);
    content: "";
    transform: translateX(-50%);
    transition: background .2s ease, box-shadow .2s ease;
}

.ios-device:not([data-platform="macos"]).app-open .home-indicator[data-system-home] {
    background: transparent;
}

.ios-device:not([data-platform="macos"]).app-open .home-indicator[data-system-home]::before {
    background: rgba(0, 0, 0, .82);
}

.ios-device:not([data-platform="macos"]) .home-indicator[data-system-home]:active::before {
    background: var(--ios-blue);
}

.ios-device:not([data-platform="macos"]) .home-indicator[data-system-home]:focus-visible::before {
    background: var(--ios-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, .22);
}

.ios-device:not([data-platform="macos"]) .browser-confirmation {
    width: min(320px, calc(100% - 32px));
    max-width: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 15px;
    background: rgba(249, 249, 249, .96);
    color: var(--ios-label);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
}

.ios-device:not([data-platform="macos"]) .browser-confirmation::backdrop {
    background: rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ios-device:not([data-platform="macos"]) .browser-confirmation > div {
    padding: 20px 18px 0;
    text-align: center;
}

.ios-device:not([data-platform="macos"]) .browser-confirmation h2,
.ios-device:not([data-platform="macos"]) .browser-confirmation p {
    margin: 0;
}

.ios-device:not([data-platform="macos"]) .browser-confirmation h2 {
    font-size: 17px;
}

.ios-device:not([data-platform="macos"]) .browser-confirmation p {
    margin-top: 6px;
    color: var(--ios-secondary);
    font-size: 13px;
    line-height: 1.35;
}

.ios-device:not([data-platform="macos"]) .browser-confirmation-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 18px -18px 0;
    border-top: 1px solid rgba(60, 60, 67, .18);
    background: rgba(60, 60, 67, .18);
}

.ios-device:not([data-platform="macos"]) .browser-choice-actions {
    grid-template-columns: 1fr;
}

.ios-device:not([data-platform="macos"]) .browser-confirmation-actions button {
    min-height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .96);
    color: var(--ios-blue);
    font: inherit;
    font-size: 15px;
    touch-action: manipulation;
}

.ios-device:not([data-platform="macos"]) .browser-confirmation [data-browser-open] {
    font-weight: 700;
}

.ios-device:not([data-platform="macos"]) .browser-confirmation-actions button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(0, 122, 255, .36);
    outline-offset: -3px;
}

.ios-device .browser-choice-actions button:disabled {
    cursor: not-allowed;
    opacity: .48;
}

html[data-platform="macos"] body {
    display: block;
    padding: 0;
    background: #152238;
}

@media (max-width: 599px) {
    .ios-device:not([data-platform="macos"]) {
        position: fixed;
        inset: 0;
        width: auto;
        height: auto;
        min-height: 100%;
    }
}

@media (display-mode: standalone) {
    html[data-platform="ios"],
    html[data-platform="ios"] body {
        height: 100vh;
        min-height: 100vh;
    }

    .ios-device[data-platform="ios"] {
        height: 100vh;
        min-height: 100vh;
    }
}

.ios-device[data-platform="macos"] .nav-actions {
    display: flex;
    align-items: center;
    justify-self: end;
}

.ios-device[data-platform="macos"] .nav-home[data-system-home] {
    display: none;
}

.ios-device[data-platform="macos"] .browser-confirmation {
    width: min(360px, calc(100% - 40px));
    max-width: none;
    margin: auto;
    padding: 18px;
    border: 1px solid rgba(60, 60, 67, .2);
    border-radius: 12px;
    background: rgba(248, 249, 251, .98);
    color: #1d1d1f;
    box-shadow: 0 24px 70px rgba(9, 17, 31, .32);
}

.ios-device[data-platform="macos"] .browser-confirmation::backdrop {
    background: rgba(15, 23, 36, .24);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.ios-device[data-platform="macos"] .browser-confirmation h2,
.ios-device[data-platform="macos"] .browser-confirmation p {
    margin: 0;
}

.ios-device[data-platform="macos"] .browser-confirmation h2 {
    font-size: 16px;
}

.ios-device[data-platform="macos"] .browser-confirmation p {
    margin-top: 7px;
    color: #6e6e73;
    font-size: 13px;
}

.ios-device[data-platform="macos"] .browser-confirmation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.ios-device[data-platform="macos"] .browser-choice-actions {
    display: grid;
    grid-template-columns: 1fr;
}

.ios-device[data-platform="macos"] .browser-confirmation-actions button {
    min-height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: rgba(118, 118, 128, .14);
    color: #1d1d1f;
    font: inherit;
    font-size: 13px;
}

.ios-device[data-platform="macos"] .browser-confirmation [data-browser-open] {
    background: #007aff;
    color: #fff;
}

.ios-device[data-platform="macos"] .browser-confirmation-actions button:focus-visible {
    outline: 3px solid rgba(0, 122, 255, .3);
    outline-offset: 1px;
}

.ios-device[data-platform="macos"] {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    background: #315275;
    box-shadow: none;
}

.ios-device[data-platform="macos"] .ios-wallpaper,
.ios-device[data-platform="macos"] .ios-view {
    border-radius: 0;
}

.ios-device[data-platform="macos"] .ios-wallpaper {
    background:
        radial-gradient(circle at 18% 20%, rgba(126, 211, 255, .58), transparent 28%),
        radial-gradient(circle at 82% 78%, rgba(192, 132, 252, .52), transparent 31%),
        linear-gradient(145deg, #173451 0%, #3978a0 42%, #76558f 72%, #263b62 100%);
    transform: scale(1.03);
}

.ios-device[data-platform="macos"][data-wallpaper="ocean"] .ios-wallpaper {
    background:
        radial-gradient(circle at 19% 18%, rgba(125, 211, 252, .68), transparent 28%),
        radial-gradient(circle at 80% 72%, rgba(45, 212, 191, .62), transparent 34%),
        linear-gradient(145deg, #0d2b4d, #176b91 48%, #063b52);
}

.ios-device[data-platform="macos"][data-wallpaper="night"] .ios-wallpaper {
    background:
        radial-gradient(circle at 72% 14%, rgba(139, 92, 246, .42), transparent 26%),
        radial-gradient(circle at 18% 72%, rgba(14, 165, 233, .28), transparent 30%),
        linear-gradient(155deg, #070b16, #17284b 54%, #11101f);
}

.ios-device[data-platform="macos"] .macos-menu-bar {
    position: absolute;
    z-index: 90;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 30px;
    padding: 0 max(14px, var(--safe-right)) 0 max(14px, var(--safe-left));
    border-bottom: 1px solid rgba(255, 255, 255, .26);
    background: rgba(237, 243, 250, .72);
    color: #16191f;
    font-size: 13px;
    box-shadow: 0 1px 8px rgba(15, 23, 42, .12);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.ios-device[data-platform="macos"] .home-spotlight-button {
    display: none;
}

.ios-device[data-platform="macos"] .macos-spotlight-button {
    display: grid;
    place-items: center;
    width: 25px;
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 18px;
}

.ios-device[data-platform="macos"] .macos-spotlight-button:hover,
.ios-device[data-platform="macos"] .macos-spotlight-button:focus-visible {
    outline: 0;
    background: rgba(40, 48, 60, .12);
}

.ios-device[data-platform="macos"] .spotlight-panel {
    top: 14vh;
    right: auto;
    left: 50%;
    width: min(680px, calc(100% - 40px));
    max-height: min(70vh, 650px);
    border-radius: 18px;
    transform: translateX(-50%);
}

.ios-device[data-platform="macos"] .spotlight-results {
    max-height: calc(min(70vh, 650px) - 92px);
}

.macos-menu-left,
.macos-menu-right {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.macos-menu-left strong {
    font-size: 14px;
}

.macos-app-menu {
    position: relative;
}

.macos-user-menu {
    position: relative;
}

.ios-device[data-platform="macos"] [data-menu-user] {
    min-height: 24px;
    margin: 0 -7px;
    padding: 2px 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.ios-device[data-platform="macos"] [data-menu-user]:not(:disabled):hover,
.ios-device[data-platform="macos"] [data-menu-user][aria-expanded="true"],
.ios-device[data-platform="macos"] [data-menu-user]:focus-visible {
    outline: 0;
    background: rgba(40, 48, 60, .12);
}

.macos-user-menu-popover {
    position: absolute;
    z-index: 130;
    top: calc(100% + 3px);
    right: -6px;
    min-width: 220px;
    padding: 5px;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: 9px;
    background: rgba(248, 249, 252, .97);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .24);
    backdrop-filter: blur(24px) saturate(1.35);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
}

.macos-user-menu-popover button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 30px;
    padding: 5px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #16191f;
    font: inherit;
    text-align: left;
    gap: 18px;
}

.macos-user-menu-popover button:hover,
.macos-user-menu-popover button:focus-visible {
    outline: 0;
    background: #087af5;
    color: #fff;
}

.ios-device[data-platform="macos"] [data-menu-app] {
    min-height: 24px;
    margin: 0 -7px;
    padding: 2px 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.ios-device[data-platform="macos"] [data-menu-app]:not(:disabled):hover,
.ios-device[data-platform="macos"] [data-menu-app][aria-expanded="true"],
.ios-device[data-platform="macos"] [data-menu-app]:focus-visible {
    outline: 0;
    background: rgba(40, 48, 60, .12);
}

.ios-device[data-platform="macos"] [data-menu-app]:disabled {
    opacity: 1;
    cursor: default;
}

.macos-app-menu-popover {
    position: absolute;
    z-index: 130;
    top: calc(100% + 3px);
    left: -8px;
    width: max-content;
    min-width: 230px;
    padding: 5px;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: 9px;
    background: rgba(248, 249, 252, .96);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .24);
    backdrop-filter: blur(24px) saturate(1.35);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
}

.macos-app-menu-popover button {
    width: 100%;
    min-height: 30px;
    padding: 5px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #16191f;
    font: inherit;
    text-align: left;
}

.macos-app-menu-popover button:hover,
.macos-app-menu-popover button:focus-visible {
    outline: 0;
    background: #087af5;
    color: #fff;
}

.macos-menu-right {
    gap: 12px;
}

.macos-menu-right span,
.macos-menu-right [data-menu-user],
.macos-menu-right time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ios-device[data-platform="macos"] .home-view {
    z-index: auto;
    padding: max(48px, calc(var(--safe-top) + 38px)) 32px max(104px, calc(var(--safe-bottom) + 92px));
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.ios-device[data-platform="macos"] .home-header {
    display: flex;
    justify-content: center;
    padding: 0 2px 18px;
}

.ios-device[data-platform="macos"] .home-header p,
.ios-device[data-platform="macos"] .home-header h1 {
    display: none;
}

.ios-device[data-platform="macos"] .home-spotlight-button {
    display: flex;
    width: 260px;
    min-height: 34px;
    margin: 0;
    border-color: rgba(255, 255, 255, .28);
    border-radius: 10px;
    background: rgba(237, 243, 250, .24);
    box-shadow: 0 8px 24px rgba(12, 22, 38, .14);
}

.ios-device[data-platform="macos"] .app-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 0 110px;
    overflow-y: auto;
    touch-action: auto;
}

.ios-device[data-platform="macos"] .desktop-launchpad {
    width: min(100%, 760px);
    margin: auto;
}

.ios-device[data-platform="macos"] .desktop-app-list {
    display: grid;
    grid-template-columns: repeat(6, 88px);
    justify-content: center;
    gap: 28px 24px;
    padding: 28px 34px;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 28px;
    background: rgba(17, 29, 48, .16);
    box-shadow: 0 24px 70px rgba(8, 16, 31, .13);
    backdrop-filter: blur(24px) saturate(1.15);
    -webkit-backdrop-filter: blur(24px) saturate(1.15);
}

.ios-device[data-platform="macos"] .role-pages-track {
    display: grid;
    gap: 22px;
    width: auto;
    min-height: auto;
    transform: none;
    transition: none;
}

.ios-device[data-platform="macos"] .role-page {
    display: block;
    min-height: auto;
    padding: 14px 16px 16px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    background: rgba(18, 31, 50, .18);
    box-shadow: 0 12px 34px rgba(10, 20, 35, .12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.ios-device[data-platform="macos"] .role-page-header {
    align-items: center;
    padding: 0 2px 14px;
}

.ios-device[data-platform="macos"] .role-page-kicker,
.ios-device[data-platform="macos"] .role-page-count,
.ios-device[data-platform="macos"] .role-page-nav {
    display: none;
}

.ios-device[data-platform="macos"] .role-page-header h2 {
    margin: 0;
    font-size: 18px;
}

.ios-device[data-platform="macos"] .role-app-list {
    grid-template-columns: repeat(auto-fill, 88px);
    grid-auto-rows: 96px;
    align-content: start;
    justify-content: start;
    gap: 18px 16px;
    min-height: auto;
    padding: 0;
    overflow: visible;
}

.ios-device[data-platform="macos"] .app-button {
    width: 88px;
}

.ios-device[data-platform="macos"] .app-icon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.ios-device[data-platform="macos"].large-icons .app-icon {
    width: 72px;
    height: 72px;
    border-radius: 17px;
}

.ios-device[data-platform="macos"] .app-name {
    font-size: 12px;
    text-shadow: 0 1px 7px rgba(0, 0, 0, .9);
}

.ios-device[data-platform="macos"] .ios-dock {
    z-index: 85;
    right: auto;
    bottom: max(12px, calc(var(--safe-bottom) + 8px));
    left: 50%;
    width: max-content;
    max-width: calc(100% - 30px);
    min-height: 72px;
    gap: 7px;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 22px;
    background: rgba(235, 240, 247, .35);
    box-shadow: 0 14px 38px rgba(15, 23, 42, .34);
    transform: translateX(-50%);
}

.ios-device[data-platform="macos"] .ios-dock .app-button {
    transition: transform .18s cubic-bezier(.2, .8, .2, 1), filter .18s ease;
    transform-origin: center bottom;
}

.ios-device[data-platform="macos"] .ios-dock:hover .app-button {
    filter: brightness(.9);
}

.ios-device[data-platform="macos"] .ios-dock .app-button:hover,
.ios-device[data-platform="macos"] .ios-dock .app-button:focus-visible {
    z-index: 2;
    filter: none;
    transform: translateY(-8px) scale(1.14);
}

.ios-device[data-platform="macos"] .ios-dock .app-button[data-app-id="launchpad"] {
    margin-right: 8px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, .3);
}

.ios-device[data-platform="macos"] .ios-dock .app-button {
    width: 58px;
}

.ios-device[data-platform="macos"] .ios-dock .app-icon {
    width: 54px;
    height: 54px;
    border-radius: 13px;
}

.ios-device[data-platform="macos"] .ios-dock .app-button.is-running {
    position: relative;
}

.ios-device[data-platform="macos"] .ios-dock .app-button.is-running::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    transform: translateX(-50%);
}

.ios-device[data-platform="macos"] .ios-dock .app-button.is-current .app-icon {
    outline: 3px solid rgba(0, 122, 255, .72);
    outline-offset: 2px;
}

.app-context-menu {
    position: fixed;
    z-index: 180;
    width: 190px;
    padding: 5px;
    border: 1px solid rgba(15, 23, 42, .18);
    border-radius: 10px;
    background: rgba(248, 249, 252, .97);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .28);
    backdrop-filter: blur(24px) saturate(1.35);
}

.app-context-menu button {
    display: block;
    width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #16191f;
    font: inherit;
    text-align: left;
}

.app-context-menu button:not(:disabled):hover,
.app-context-menu button:not(:disabled):focus-visible {
    outline: 0;
    background: #087af5;
    color: #fff;
}

.app-context-menu button:disabled {
    color: #8e8e93;
}

.app-properties-dialog {
    width: min(520px, calc(100% - 32px));
    max-height: calc(100% - 48px);
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, .18);
    border-radius: 16px;
    color: var(--ios-label);
    background: var(--ios-card);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .38);
}

.app-properties-dialog::backdrop {
    background: rgba(9, 17, 31, .34);
    backdrop-filter: blur(4px);
}

.app-properties-dialog > div {
    padding: 22px;
}

.app-properties-dialog h2 {
    margin: 2px 0 18px;
}

.app-properties-dialog dl {
    display: grid;
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border-radius: 11px;
    background: rgba(60, 60, 67, .18);
}

.app-properties-dialog dl div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 12px;
    background: var(--ios-card);
}

.app-properties-dialog dt {
    color: var(--ios-secondary);
}

.app-properties-dialog dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 650;
}

.app-properties-routes {
    margin: 18px 0;
}

.app-properties-routes ul {
    display: grid;
    gap: 7px;
    margin: 8px 0 0;
    padding-left: 20px;
}

.app-properties-routes code {
    overflow-wrap: anywhere;
}

.app-properties-dialog > div > button {
    min-height: 38px;
    padding: 8px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: #087af5;
}

.ios-device[data-platform="macos"] .native-app {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(860px, calc(100% - 64px));
    height: min(720px, calc(100% - 96px));
    padding-top: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 14px;
    background: rgba(242, 242, 247, .97);
    box-shadow: 0 28px 90px rgba(9, 17, 31, .48);
    opacity: 0;
    transform: translate(-50%, -48%) scale(.97);
}

.ios-device[data-platform="macos"] .native-app.is-open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.ios-device[data-platform="macos"] .native-app.is-focused {
    border-color: rgba(255, 255, 255, .78);
    box-shadow: 0 34px 100px rgba(9, 17, 31, .58);
}

.ios-device[data-platform="macos"] .native-app:not(.is-focused) .app-navigation {
    color: rgba(31, 35, 42, .68);
    filter: saturate(.72);
}

.ios-device[data-platform="macos"] .native-app:not(.is-focused) .macos-control {
    filter: saturate(.48);
}

@media (max-width: 820px) {
    .ios-device[data-platform="macos"] .desktop-app-list {
        grid-template-columns: repeat(4, 88px);
        gap: 24px 18px;
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .ios-device[data-platform="macos"] .home-view {
        padding-right: 16px;
        padding-left: 16px;
    }

    .ios-device[data-platform="macos"] .desktop-app-list {
        grid-template-columns: repeat(3, 84px);
        gap: 22px 12px;
        padding: 22px 14px;
    }
}

.ios-device[data-platform="macos"] .settings-app {
    width: min(760px, calc(100% - 64px));
}

.ios-device[data-platform="macos"] .appstore-app {
    width: min(1080px, calc(100% - 64px));
}

.ios-device[data-platform="macos"] .app-navigation {
    height: 44px;
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
    padding: 0 12px;
    background: rgba(226, 229, 234, .9);
}

.ios-device[data-platform="macos"] .app-navigation > strong {
    font-size: 13px;
}

.ios-device[data-platform="macos"] .appstore-app .app-navigation {
    grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
}

.ios-device[data-platform="macos"] .appstore-app .app-navigation > .nav-back {
    z-index: 1;
    margin-left: 64px;
}

.ios-device[data-platform="macos"] .native-app .app-navigation > [data-view-back],
.ios-device[data-platform="macos"] .messages-list-screen > .app-navigation .nav-home,
.ios-device[data-platform="macos"] .embedded-app .app-navigation > [data-app-back] {
    visibility: hidden;
}

.ios-device[data-platform="macos"] .app-settings-action {
    display: none;
}

.ios-device[data-platform="macos"] .macos-window-controls {
    position: absolute;
    top: 0;
    left: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
}

.macos-control {
    display: grid;
    place-items: center;
    width: 13px;
    height: 13px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: rgba(45, 35, 20, .72);
    font-size: 10px;
    line-height: 1;
}

button.macos-close {
    display: grid;
    place-items: center;
    background: #ff5f57;
    color: rgba(94, 14, 10, .78);
    font-size: 11px;
    line-height: 1;
}

.macos-control span {
    opacity: 0;
}

.macos-control:hover span,
.macos-control:focus-visible span {
    opacity: 1;
}

.macos-minimize {
    background: #febc2e;
}

.macos-zoom {
    background: #28c840;
}

.macos-fullscreen {
    margin-left: 3px;
    background: #3b82f6;
    color: rgba(10, 35, 86, .82);
}

.ios-device[data-platform="macos"] .native-app:fullscreen {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    border: 0;
    border-radius: 0;
    transform: none !important;
    resize: none;
}

.macos-control:focus-visible {
    outline: 2px solid rgba(0, 122, 255, .62);
    outline-offset: 2px;
}

.ios-device[data-platform="macos"] .chat-back {
    margin-left: 68px;
}

.ios-device[data-platform="macos"] .settings-scroll,
.ios-device[data-platform="macos"] .messages-list-content {
    height: calc(100% - 44px);
    padding-bottom: 30px;
}

.ios-device[data-platform="macos"] .settings-scroll {
    padding-right: 24px;
    padding-left: 24px;
}

.ios-device[data-platform="macos"] .settings-scroll > h1,
.ios-device[data-platform="macos"] .messages-list-content > h1 {
    margin-top: 8px;
    font-size: 30px;
}

.ios-device[data-platform="macos"] .messages-chat-screen {
    grid-template-rows: 44px auto minmax(0, 1fr) auto auto auto;
}

.ios-device[data-platform="macos"] .embedded-app-stage {
    height: calc(100% - 44px);
    background: #eceef2;
}

.ios-device[data-platform="macos"] .message-composer {
    padding-bottom: 9px;
}

.ios-device[data-platform="macos"] .ios-toast {
    top: 42px;
}

.ios-device[data-platform="macos"] .home-indicator {
    display: none;
}

@media (max-width: 700px) {
    .ios-device[data-platform="macos"] .native-app,
    .ios-device[data-platform="macos"] .settings-app {
        width: calc(100% - 24px);
        height: calc(100% - 70px);
    }

    .ios-device[data-platform="macos"] .home-view {
        padding-right: 18px;
        padding-left: 18px;
    }

    .macos-menu-right [data-menu-user] {
        display: none;
    }
}

.ios-device[data-platform="macos"] .native-app.has-window-geometry,
.ios-device[data-platform="macos"] .native-app.has-window-geometry.is-open {
    right: auto;
    bottom: auto;
    transform: none;
    resize: both;
}

.ios-device[data-platform="macos"] .native-app.has-window-geometry.is-maximized {
    resize: none;
    border-radius: 10px;
}

.ios-device[data-platform="macos"] .native-app.has-window-geometry.is-dragging {
    transition: none;
    user-select: none;
}

.ios-device[data-platform="macos"] .native-app .app-navigation {
    cursor: grab;
    user-select: none;
}

.ios-device[data-platform="macos"] .native-app.is-dragging .app-navigation {
    cursor: grabbing;
}

.ios-device[data-platform="macos"] .native-app .app-navigation button,
.ios-device[data-platform="macos"] .native-app .app-navigation input,
.ios-device[data-platform="macos"] .native-app .app-navigation textarea,
.ios-device[data-platform="macos"] .native-app .app-navigation select,
.ios-device[data-platform="macos"] .native-app .app-navigation a {
    cursor: pointer;
}

.chat-readonly-banner {
    display: flex;
    gap: 6px 12px;
    align-items: center;
    margin: 0 16px 14px;
    padding: 11px 13px;
    border: 1px solid rgba(0, 122, 255, .16);
    border-radius: 13px;
    background: rgba(0, 122, 255, .08);
    color: #245986;
    font-size: 13px;
    line-height: 1.35;
}

.chat-readonly-banner strong {
    flex: none;
    color: #075da8;
}

.chat-readonly-compact {
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    justify-content: center;
    text-align: center;
}

.appstore-app {
    background: #f2f2f7;
    color: #1c1c1e;
}

.appstore-catalog,
.appstore-studio {
    height: calc(100% - 50px);
}

.appstore-scroll {
    height: 100%;
    padding: 22px max(16px, var(--safe-right)) max(38px, var(--safe-bottom)) max(16px, var(--safe-left));
    overflow: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.appstore-scroll::-webkit-scrollbar,
.studio-content::-webkit-scrollbar {
    display: none;
}

.appstore-hero {
    display: flex;
    gap: 22px;
    align-items: flex-end;
    justify-content: space-between;
    max-width: 1120px;
    margin: 0 auto 18px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    color: #fff;
    box-shadow: 0 16px 36px rgba(35, 67, 155, .18);
}

.appstore-hero h1,
.appstore-hero p,
.appstore-section-heading h2,
.appstore-suggestion h3,
.appstore-suggestion p,
.studio-heading h1,
.studio-heading p,
.studio-panel h2,
.studio-panel h3 {
    margin: 0;
}

.appstore-hero h1 {
    margin-top: 3px;
    font-size: clamp(34px, 7vw, 48px);
    letter-spacing: -.045em;
}

.appstore-hero p {
    max-width: 620px;
    margin-top: 7px;
    color: rgba(255, 255, 255, .84);
    line-height: 1.45;
}

.appstore-kicker {
    color: #6d6d72;
    font-size: 12px;
    font-weight: 720;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.appstore-hero .appstore-kicker {
    color: rgba(255, 255, 255, .68);
}

.appstore-design-button {
    flex: none;
    min-height: 46px;
    padding: 0 17px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #075da8;
    box-shadow: 0 8px 20px rgba(18, 38, 92, .16);
    font-weight: 680;
}

.appstore-design-button:hover,
.appstore-design-button:focus-visible {
    background: #f2f8ff;
}

.appstore-search {
    max-width: 1120px;
    margin: 0 auto 8px;
}

.appstore-status {
    max-width: 1120px;
    min-height: 24px;
    margin: 0 auto 8px;
    color: #6d6d72;
    font-size: 13px;
}

.appstore-access-note {
    display: flex;
    max-width: 1120px;
    gap: 7px 12px;
    align-items: center;
    margin: 0 auto 12px;
    padding: 11px 13px;
    border: 1px solid rgba(0, 122, 255, .16);
    border-radius: 13px;
    background: rgba(0, 122, 255, .08);
    color: #245986;
    font-size: 13px;
}

.appstore-access-note strong {
    flex: none;
    color: #075da8;
}

.appstore-draft-card {
    display: grid;
    max-width: 1120px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid rgba(0, 122, 255, .2);
    border-radius: 17px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 22px rgba(34, 48, 76, .07);
}

.appstore-workflows {
    max-width: 1120px;
    margin: 18px auto 24px;
}

.appstore-workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 10px;
}

.appstore-workflow-entry {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.appstore-workflow-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(60, 60, 67, .1);
    border-radius: 15px;
    background: rgba(255, 255, 255, .88);
    color: #1c1c1e;
    text-align: left;
}

.appstore-workflow-delete {
    min-width: 76px;
    padding: 0 10px;
    border: 1px solid rgba(255, 59, 48, .22);
    border-radius: 13px;
    background: rgba(255, 59, 48, .08);
    color: #c52922;
    font-size: 11px;
    font-weight: 680;
}

.appstore-workflow-delete.is-confirming {
    background: #ff3b30;
    color: #fff;
}

.appstore-workflow-delete:disabled {
    border-color: rgba(60, 60, 67, .1);
    background: rgba(60, 60, 67, .06);
    color: #8e8e93;
}

.appstore-workflow-card > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.appstore-workflow-card small,
.appstore-workflow-card em {
    color: #6d6d72;
    font-size: 11px;
    font-style: normal;
}

.appstore-workflow-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appstore-workflow-card em {
    color: #007aff;
}

.appstore-workflow-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #64d2ff, #007aff);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.studio-inline-status {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 122, 255, .09);
    color: #075da8;
    font-size: 13px;
}

.appstore-draft-card small,
.appstore-draft-card strong {
    display: block;
}

.appstore-draft-card small {
    color: #007aff;
    font-size: 10px;
    font-weight: 720;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.appstore-draft-card p {
    margin: 3px 0 0;
    color: #6d6d72;
    font-size: 13px;
}

.appstore-draft-card button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 11px;
    background: #007aff;
    color: #fff;
    font-weight: 680;
}

.appstore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
    gap: 14px;
    max-width: 1120px;
    margin: 0 auto;
}

.appstore-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 275px;
    flex-direction: column;
    padding: 17px;
    overflow: hidden;
    border: 1px solid rgba(60, 60, 67, .1);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 9px 24px rgba(34, 48, 76, .08);
}

.appstore-card > header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.appstore-card-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--icon-a), var(--icon-b));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 5px 12px rgba(18, 38, 76, .14);
    font-size: 22px;
    font-weight: 760;
}

.appstore-card-icon.is-image {
    overflow: hidden;
    background: #fff;
}

.appstore-card-icon.is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.appstore-card-heading {
    min-width: 0;
}

.appstore-card-heading small,
.appstore-card-heading strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appstore-card-heading small {
    color: #8e8e93;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
}

.appstore-card-heading strong {
    margin-top: 2px;
    font-size: 18px;
    letter-spacing: -.02em;
}

.appstore-health {
    grid-column: 1 / -1;
    display: inline-flex;
    width: fit-content;
    gap: 6px;
    align-items: center;
    color: #6d6d72;
    font-size: 12px;
}

.appstore-health i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8e8e93;
}

.health-ok .appstore-health i {
    background: #34c759;
}

.health-warning .appstore-health i {
    background: #ff9f0a;
}

.health-down .appstore-health i {
    background: #ff3b30;
}

.appstore-card > p {
    min-height: 42px;
    margin: 13px 0;
    color: #6d6d72;
    font-size: 14px;
    line-height: 1.45;
}

.appstore-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 11px;
}

.appstore-card-meta span {
    min-width: 0;
    padding: 9px 10px;
    overflow: hidden;
    border-radius: 11px;
    background: #f2f2f7;
    color: #3a3a3c;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appstore-card-meta strong {
    display: block;
    margin-bottom: 2px;
    color: #8e8e93;
    font-size: 9px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.appstore-workflow-badge {
    width: fit-content;
    margin: -2px 0 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0, 122, 255, .1);
    color: #0066cc;
    font-size: 11px;
    font-weight: 680;
}

.appstore-workflow-badge.is-error {
    background: rgba(255, 59, 48, .1);
    color: #c93400;
}

.appstore-workflow-badge.is-success {
    background: rgba(52, 199, 89, .12);
    color: #248a3d;
}

.appstore-card footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: auto;
}

.appstore-card footer button,
.appstore-suggestion button,
.studio-actions button {
    min-height: 40px;
    padding: 7px 9px;
    border: 0;
    border-radius: 11px;
    background: #e9e9ef;
    color: #1c1c1e;
    font-size: 12px;
    font-weight: 650;
}

.appstore-card footer button.primary,
.studio-actions button.primary {
    background: #007aff;
    color: #fff;
}

.appstore-card footer button:disabled {
    cursor: not-allowed;
    filter: none;
    opacity: .48;
}

.appstore-card footer button:hover,
.appstore-card footer button:focus-visible,
.appstore-suggestion button:hover,
.appstore-suggestion button:focus-visible,
.studio-actions button:hover,
.studio-actions button:focus-visible {
    filter: brightness(.96);
}

.appstore-suggestions {
    max-width: 1120px;
    margin: 34px auto 0;
}

.appstore-section-heading {
    margin-bottom: 12px;
}

.appstore-section-heading h2 {
    margin-top: 3px;
    font-size: clamp(23px, 5vw, 30px);
    letter-spacing: -.035em;
}

.appstore-suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 12px;
}

.appstore-suggestion {
    display: flex;
    min-height: 215px;
    flex-direction: column;
    padding: 17px;
    border: 1px solid rgba(60, 60, 67, .1);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
}

.appstore-suggestion h3 {
    font-size: 17px;
}

.appstore-suggestion p {
    margin-top: 7px;
    color: #6d6d72;
    font-size: 13px;
    line-height: 1.45;
}

.appstore-suggestion dl {
    display: flex;
    gap: 18px;
    margin: 15px 0;
}

.appstore-suggestion dl div {
    min-width: 0;
}

.appstore-suggestion dt {
    color: #8e8e93;
    font-size: 10px;
    text-transform: uppercase;
}

.appstore-suggestion dd {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 650;
}

.appstore-suggestion button {
    width: 100%;
    margin-top: auto;
    background: rgba(0, 122, 255, .1);
    color: #0066cc;
}

.appstore-empty,
.appstore-loading {
    grid-column: 1 / -1;
    padding: 52px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    color: #6d6d72;
    text-align: center;
}

.appstore-empty strong,
.appstore-empty span {
    display: block;
}

.appstore-empty strong {
    color: #1c1c1e;
}

.appstore-empty span {
    margin-top: 5px;
    font-size: 13px;
}

.appstore-loading {
    display: flex;
    justify-content: center;
    gap: 7px;
}

.appstore-loading span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #007aff;
    animation: phasePulse 1s infinite ease-in-out;
}

.appstore-loading span:nth-child(2) {
    animation-delay: .15s;
}

.appstore-loading span:nth-child(3) {
    animation-delay: .3s;
}

.appstore-studio {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    min-height: 0;
    background: #f2f2f7;
}

.studio-heading {
    padding: 17px 18px 11px;
    background: rgba(255, 255, 255, .84);
}

.studio-heading h1 {
    margin-top: 2px;
    font-size: clamp(24px, 5vw, 32px);
    letter-spacing: -.035em;
}

.studio-heading p {
    margin-top: 4px;
    color: #6d6d72;
    font-size: 13px;
}

.studio-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 0;
    padding: 9px 18px 13px;
    list-style: none;
    background: rgba(255, 255, 255, .84);
}

.studio-steps li {
    position: relative;
    min-width: 0;
    padding-top: 6px;
    color: #8e8e93;
    font-size: 11px;
}

.studio-steps li::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    border-radius: 3px;
    background: #d1d1d6;
}

.studio-steps li > button {
    display: grid;
    width: 100%;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.studio-steps li > button:disabled {
    cursor: default;
}

.studio-steps li > button > span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: #e5e5ea;
    color: #6d6d72;
    font-weight: 720;
}

.studio-steps li strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.studio-steps li.is-current,
.studio-steps li.is-complete {
    color: #007aff;
}

.studio-steps li.is-current::before,
.studio-steps li.is-complete::before,
.studio-steps li.is-current > button > span,
.studio-steps li.is-complete > button > span {
    background: #007aff;
    color: #fff;
}

.studio-steps li.is-selected > button {
    color: #005bb5;
}

.studio-content {
    min-height: 0;
    padding: 15px 18px;
    overflow: auto;
    overscroll-behavior: contain;
}

.studio-panel {
    max-width: 880px;
    margin: 0 auto;
}

.studio-panel .message-bubble {
    max-width: min(78%, 680px);
}

.studio-specification,
.studio-realization {
    padding: 20px;
    border: 1px solid rgba(60, 60, 67, .1);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(34, 48, 76, .07);
}

.studio-specification > header {
    display: flex;
    gap: 11px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5ea;
}

.studio-specification > header > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: rgba(0, 122, 255, .1);
    color: #007aff;
    font-size: 20px;
    font-weight: 720;
}

.studio-specification header small {
    color: #8e8e93;
    font-size: 11px;
    text-transform: uppercase;
}

.studio-specification > div {
    padding-top: 5px;
    color: #3a3a3c;
    line-height: 1.5;
}

.studio-specification > div > h2,
.studio-specification > div > h3,
.studio-specification > div > h4 {
    margin: 20px 0 8px;
    color: #1c1c1e;
    line-height: 1.25;
}

.studio-specification > div > h2 {
    font-size: 19px;
}

.studio-specification > div > h3 {
    font-size: 16px;
}

.studio-specification > div > h4 {
    font-size: 14px;
}

.studio-specification > div > p {
    margin: 7px 0 11px;
}

.specification-list {
    margin: 7px 0 15px;
    padding-left: 22px;
}

.specification-list li {
    margin: 5px 0;
    padding-left: 3px;
}

.specification-list li::marker {
    color: #007aff;
    font-weight: 700;
}

.specification-list .specification-depth-1 {
    margin-left: 22px;
    list-style-type: circle;
    color: #4f4f54;
}

.specification-list .specification-depth-2 {
    margin-left: 44px;
    list-style-type: square;
    color: #5f5f65;
}

.specification-list .specification-depth-3 {
    margin-left: 66px;
    list-style-type: square;
    color: #6d6d72;
}

.studio-specification section {
    padding: 10px 0;
    border-bottom: 1px solid #efeff4;
}

.studio-specification section:last-child {
    border-bottom: 0;
}

.studio-specification h3 {
    color: #1c1c1e;
    font-size: 15px;
}

.studio-icon-picker {
    margin: 18px 0 0;
    padding: 18px 0 0;
    border: 0;
    border-top: 1px solid #efeff4;
}

.studio-icon-picker legend {
    padding: 0;
    color: #1c1c1e;
    font-size: 17px;
    font-weight: 720;
}

.studio-icon-picker > p {
    margin: 5px 0 13px;
    color: #6d6d72;
    font-size: 13px;
}

.studio-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 10px;
}

.studio-icon-option {
    position: relative;
    display: grid;
    min-height: 112px;
    padding: 14px;
    place-items: center;
    border: 2px solid transparent;
    border-radius: 15px;
    background: #f2f2f7;
    cursor: pointer;
    text-align: center;
}

.studio-icon-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.studio-icon-option > span {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #4ca8ff, #0066d6);
    color: #fff;
    font-size: 29px;
    box-shadow: 0 7px 18px rgba(0, 102, 214, .2);
}

.studio-icon-option strong {
    margin-top: 8px;
    color: #3a3a3c;
    font-size: 13px;
}

.studio-icon-option.is-selected,
.studio-icon-option:has(input:checked) {
    border-color: #007aff;
    background: rgba(0, 122, 255, .08);
}

.studio-icon-option:focus-within {
    outline: 3px solid rgba(0, 122, 255, .28);
    outline-offset: 2px;
}

.studio-icon-picker:disabled .studio-icon-option:not(.is-selected) {
    cursor: default;
    opacity: .5;
}

.studio-realization > h2 {
    margin-bottom: 14px;
}

.studio-activity-card {
    --activity-color: #6d6d72;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--activity-color) 24%, transparent);
    border-radius: 15px;
    background: color-mix(in srgb, var(--activity-color) 8%, #fff);
}

.studio-activity-card.is-pending,
.studio-activity-card.is-starting,
.studio-activity-card.is-active {
    --activity-color: #007aff;
}

.studio-activity-card.is-stale {
    --activity-color: #c86400;
}

.studio-activity-card.is-done {
    --activity-color: #248a3d;
}

.studio-activity-card.is-cancelled {
    --activity-color: #6d6d72;
}

.studio-activity-card.is-error {
    --activity-color: #d70015;
}

.studio-activity-indicator {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--activity-color) 14%, #fff);
}

.studio-activity-indicator i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--activity-color);
}

.studio-activity-card.is-live .studio-activity-indicator::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 2px solid var(--activity-color);
    border-radius: 50%;
    animation: studioActivityPulse 1.6s ease-out infinite;
}

.studio-activity-copy {
    min-width: 0;
}

.studio-activity-copy small {
    color: #8e8e93;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.studio-activity-copy > strong {
    display: block;
    margin-top: 2px;
    color: var(--activity-color);
    font-size: 17px;
}

.studio-activity-copy p {
    margin: 4px 0 0;
    color: #5f5f65;
    font-size: 13px;
}

.studio-activity-card dl {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 2px 0 0;
}

.studio-activity-card dl div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
}

.studio-activity-card dt {
    color: #8e8e93;
    font-size: 10px;
}

.studio-activity-card dd {
    overflow: hidden;
    margin: 3px 0 0;
    color: #2c2c2e;
    font-size: 12px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.studio-activity-log {
    margin-top: 20px;
}

.studio-activity-log > h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.studio-event-list {
    display: grid;
    gap: 13px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.studio-event-list li {
    position: relative;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px;
}

.studio-event-list li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    bottom: -14px;
    left: 4px;
    width: 2px;
    background: #e5e5ea;
}

.studio-event-list li > span {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, .2);
}

.studio-event-list li.is-warning > span,
.studio-event-list li.is-stale > span {
    background: #ff9500;
    box-shadow: 0 0 0 2px rgba(255, 149, 0, .2);
}

.studio-event-list li.is-error > span,
.studio-event-list li.is-timeout > span {
    background: #ff3b30;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, .2);
}

.studio-event-list li.is-done > span,
.studio-event-list li.is-complete > span {
    background: #34c759;
    box-shadow: 0 0 0 2px rgba(52, 199, 89, .2);
}

.studio-event-list li.is-current > span {
    animation: studioEventPulse 1.4s ease-in-out infinite;
}

.studio-event-list header {
    display: flex;
    gap: 10px;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 3px;
}

.studio-event-list header strong {
    color: #3a3a3c;
    font-size: 12px;
}

.studio-event-list p {
    margin: 0;
}

.studio-event-list time {
    color: #8e8e93;
    font-size: 11px;
}

.studio-event-list ul,
.studio-event-list ol {
    margin: 5px 0;
    padding-left: 20px;
}

@keyframes studioActivityPulse {
    from {
        opacity: .65;
        transform: scale(.75);
    }
    to {
        opacity: 0;
        transform: scale(1.25);
    }
}

@keyframes studioEventPulse {
    50% {
        box-shadow: 0 0 0 5px rgba(0, 122, 255, .12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .studio-activity-card.is-live .studio-activity-indicator::after,
    .studio-event-list li.is-current > span {
        animation: none;
    }
}

.studio-result {
    margin-top: 16px;
    padding: 15px;
    border-radius: 14px;
    background: rgba(52, 199, 89, .1);
    color: #19692f;
}

.studio-result.is-error {
    background: rgba(255, 59, 48, .1);
    color: #a72a22;
}

.studio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 9px 18px;
    border-top: 1px solid rgba(60, 60, 67, .12);
    background: rgba(255, 255, 255, .92);
}

.studio-actions:empty,
.studio-error:empty {
    display: none;
}

.studio-actions button {
    min-width: 130px;
}

.studio-actions button.destructive {
    background: rgba(255, 59, 48, .1);
    color: #c93400;
}

.studio-error {
    margin: 0;
    padding: 7px 18px;
    background: #fff;
}

.studio-composer {
    border-top: 1px solid rgba(60, 60, 67, .12);
}

.appstore-app button:focus-visible,
.appstore-app input:focus-visible,
.appstore-app textarea:focus-visible {
    outline: 3px solid rgba(0, 122, 255, .28);
    outline-offset: 2px;
}

.appstore-supervision-dialog {
    width: min(calc(100% - 32px), 460px);
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: #1c1c1e;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.appstore-supervision-dialog::backdrop {
    background: rgba(10, 15, 28, .42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.appstore-supervision-dialog > div {
    padding: 22px;
    background: #fff;
}

.appstore-supervision-dialog h2,
.appstore-supervision-dialog p {
    margin: 0;
}

.appstore-supervision-dialog h2 {
    margin-top: 3px;
    font-size: 25px;
    letter-spacing: -.035em;
}

.appstore-supervision-dialog p {
    margin-top: 7px;
    color: #6d6d72;
    line-height: 1.45;
}

.appstore-supervision-dialog dl {
    display: grid;
    gap: 1px;
    margin: 18px 0;
    overflow: hidden;
    border-radius: 13px;
    background: #e5e5ea;
}

.appstore-supervision-dialog dl div {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 11px 12px;
    background: #f8f8fa;
}

.appstore-supervision-dialog dt {
    color: #6d6d72;
}

.appstore-supervision-dialog dd {
    margin: 0;
    font-weight: 650;
    text-align: right;
}

.appstore-supervision-dialog button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: #007aff;
    color: #fff;
    font-weight: 680;
}

.icon-studio-dialog {
    width: min(calc(100% - 24px), 920px);
    max-height: calc(100% - 24px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: transparent;
    color: #1c1c1e;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
}

.icon-studio-dialog::backdrop {
    background: rgba(10, 15, 28, .48);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.icon-studio-dialog > div {
    max-height: calc(100vh - 24px);
    padding: 22px;
    overflow: auto;
    background: #f7f7fa;
}

.icon-studio-dialog > div > header,
.icon-studio-dialog > div > footer,
.icon-studio-prompt > div {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.icon-studio-dialog h2,
.icon-studio-dialog p {
    margin: 0;
}

.icon-studio-dialog h2 {
    margin-top: 3px;
    font-size: 27px;
    letter-spacing: -.035em;
}

.icon-studio-dialog > div > header > button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #e5e5ea;
    color: #3a3a3c;
    font-size: 24px;
}

.icon-studio-current {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 16px;
}

.icon-studio-preview {
    display: grid;
    min-height: 118px;
    place-items: center;
    padding: 12px;
    border: 1px solid rgba(60, 60, 67, .1);
    border-radius: 16px;
    background: #fff;
}

.icon-studio-preview span:first-child {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    overflow: hidden;
    border-radius: 17px;
    background: linear-gradient(145deg, var(--icon-a), var(--icon-b));
    color: #fff;
    font-size: 28px;
    font-weight: 760;
    box-shadow: 0 8px 18px rgba(18, 38, 76, .18);
}

.icon-studio-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-studio-preview small {
    margin-top: 8px;
    color: #6d6d72;
    font-weight: 650;
}

.icon-studio-prompt {
    display: grid;
    gap: 9px;
    padding: 16px;
    border-radius: 17px;
    background: #fff;
}

.icon-studio-prompt label {
    font-size: 13px;
    font-weight: 700;
}

.icon-studio-prompt textarea {
    width: 100%;
    min-height: 86px;
    padding: 11px 12px;
    resize: vertical;
    border: 1px solid #d1d1d6;
    border-radius: 12px;
    background: #fff;
    color: #1c1c1e;
    font: inherit;
    line-height: 1.45;
}

.icon-studio-prompt button,
.icon-studio-dialog > div > footer button {
    min-height: 42px;
    padding: 8px 14px;
    border: 0;
    border-radius: 12px;
    background: #e5e5ea;
    color: #1c1c1e;
    font-weight: 680;
}

.icon-studio-prompt button.primary,
.icon-studio-dialog > div > footer button.primary {
    background: #007aff;
    color: #fff;
}

.icon-studio-prompt button:disabled,
.icon-studio-dialog > div > footer button:disabled {
    opacity: .45;
}

.icon-studio-status {
    min-height: 20px;
    padding: 12px 2px 8px;
    color: #6d6d72;
    font-size: 13px;
}

.icon-studio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.icon-studio-option {
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 18px;
    background: #fff;
    text-align: left;
}

.icon-studio-option.is-selected {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, .13);
}

.icon-studio-option img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 13px;
}

.icon-studio-option strong,
.icon-studio-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-studio-option small {
    color: #8e8e93;
}

.icon-studio-dialog > div > footer {
    margin-top: 18px;
}

@media (max-width: 680px) {
    .icon-studio-dialog > div {
        padding: 17px;
    }

    .icon-studio-current {
        grid-template-columns: 1fr;
    }

    .icon-studio-preview {
        min-height: 96px;
    }

    .icon-studio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .icon-studio-prompt > div,
    .icon-studio-dialog > div > footer {
        align-items: stretch;
        flex-direction: column;
    }
}

.ios-device[data-platform="macos"] .appstore-catalog,
.ios-device[data-platform="macos"] .appstore-studio {
    height: calc(100% - 44px);
}

.ios-device[data-platform="macos"] .appstore-scroll {
    padding: 24px 26px 32px;
}

@media (max-width: 680px) {
    .chat-readonly-banner {
        display: grid;
    }

    .chat-readonly-compact {
        display: flex;
        padding: 7px 11px;
    }

    .chat-readonly-compact span {
        display: none;
    }

    .appstore-scroll {
        padding-top: 14px;
    }

    .appstore-access-note {
        display: grid;
    }

    .appstore-draft-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .appstore-draft-card button {
        grid-column: 1 / -1;
        min-height: 44px;
    }

    .appstore-hero {
        display: grid;
        padding: 20px;
        border-radius: 20px;
    }

    .appstore-design-button {
        width: 100%;
    }

    .appstore-grid,
    .appstore-suggestion-grid {
        grid-template-columns: 1fr;
    }

    .appstore-card footer {
        grid-template-columns: 1fr;
    }

    .appstore-card footer button {
        min-height: 44px;
    }

    .studio-heading {
        padding-right: 14px;
        padding-left: 14px;
    }

    .studio-heading p {
        display: none;
    }

    .studio-steps {
        padding-right: 14px;
        padding-left: 14px;
    }

    .studio-steps li {
        text-align: center;
    }

    .studio-steps li > button {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .studio-steps li strong {
        width: 100%;
        font-size: 9px;
    }

    .studio-content {
        padding: 12px;
    }

    .studio-panel .message-bubble {
        max-width: 88%;
    }

    .studio-specification,
    .studio-realization {
        padding: 15px;
    }

    .specification-list .specification-depth-1 {
        margin-left: 14px;
    }

    .specification-list .specification-depth-2 {
        margin-left: 28px;
    }

    .specification-list .specification-depth-3 {
        margin-left: 42px;
    }

    .studio-activity-card dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .studio-activity-card dl div:last-child {
        grid-column: 1 / -1;
    }

    .studio-actions {
        display: grid;
        grid-template-columns: 1fr;
        padding: 9px 12px;
    }

    .studio-actions button {
        min-height: 44px;
    }
}

.ios-device .embedded-app.is-video-wall-overlay {
    z-index: 240;
}

.ios-device .embedded-app.is-video-wall-overlay .embedded-app-stage iframe {
    position: fixed;
    z-index: 20;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
}

.ios-device[data-platform="macos"] .native-app.is-video-wall-overlay {
    position: absolute !important;
    z-index: 240 !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    transform: none;
    resize: none;
}

html.myos-video-wall-overlay .ios-device[data-platform="macos"] .macos-menu-bar,
html.myos-video-wall-overlay .ios-device[data-platform="macos"] .ios-dock {
    visibility: hidden;
    pointer-events: none;
}
