/*
 * Панель управления Гермеса (/hermes, /hermes/onboarding, /hermes/workspaces/{id}, /hermes/launch).
 * Тот же язык, что у вебки Гермеса: одна колонка, меню аккаунта — единственный вход в настройки,
 * окно настроек со списком разделов слева. Цвета — только из токенов HermesLayout (--hermes-*).
 */

.hermes-shell {
    --cp-hover: color-mix(in srgb, var(--hermes-ink) 6%, transparent);
    --cp-active: color-mix(in srgb, var(--hermes-ink) 9%, transparent);
}

.hermes-shell .cp-app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    color: var(--hermes-ink);
    background: var(--hermes-paper);
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.hermes-shell :is(.cp-app, .cp-settings-backdrop) svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- шапка ---------- */

.hermes-shell .cp-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 3.5rem;
    padding: 0 0.75rem 0 1rem;
    background: var(--hermes-paper);
}

.hermes-shell .cp-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 650;
}

.hermes-shell .cp-brand__mark {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
}

.hermes-shell .cp-brand__mark path {
    fill: var(--hermes-ink);
    stroke: none;
}

.hermes-shell .cp-brand__mark .cp-brand__spark {
    fill: var(--hermes-accent);
}

.hermes-shell .cp-brand__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hermes-shell .cp-header__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.hermes-shell .cp-header .notification-bell-button {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--hermes-muted) !important;
    border-radius: 0.5rem !important;
}

.hermes-shell .cp-header .notification-bell-button:hover {
    color: var(--hermes-ink) !important;
    background: var(--cp-hover) !important;
}

.hermes-shell .cp-account-trigger {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--hermes-accent-ink);
    background: var(--hermes-accent);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    anchor-name: --cp-account;
}

.hermes-shell .cp-account-trigger:hover {
    background: var(--hermes-accent-strong);
}

/* Меню аккаунта — нативный popover: верхний слой, Escape и клик мимо закрывают его сами. */
.hermes-shell .cp-menu {
    position: fixed;
    inset: 3.25rem 0.75rem auto auto;
    width: min(17rem, calc(100vw - 1.5rem));
    max-height: min(28rem, 75dvh);
    margin: 0;
    padding: 0.375rem;
    overflow-y: auto;
    border: 1px solid var(--hermes-line);
    border-radius: 0.75rem;
    color: var(--hermes-ink);
    background: var(--hermes-surface);
    box-shadow: var(--hermes-shadow);
}

@supports (position-anchor: --cp-account) {
    .hermes-shell .cp-menu {
        position-anchor: --cp-account;
        inset: anchor(bottom) anchor(right) auto auto;
        margin-top: 0.375rem;
    }
}

.hermes-shell .cp-menu__label {
    margin: 0;
    padding: 0.375rem 0.625rem 0.25rem;
    overflow: hidden;
    color: var(--hermes-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hermes-shell .cp-menu hr {
    height: 1px;
    margin: 0.375rem 0.25rem;
    border: 0;
    background: var(--hermes-line);
}

.hermes-shell .cp-menu__item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.375rem 0.625rem;
    border: 0;
    border-radius: 0.5rem;
    color: var(--hermes-ink);
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

@media (hover: hover) {
    .hermes-shell .cp-menu__item:hover:not(:disabled) {
        background: var(--cp-hover);
    }
}

.hermes-shell .cp-menu__item:disabled {
    opacity: 0.5;
    cursor: default;
}

.hermes-shell .cp-menu__item span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hermes-shell .cp-menu__item svg {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
}

.hermes-shell .cp-menu__item--danger {
    color: var(--hermes-danger);
}

.hermes-shell .cp-menu__check {
    color: var(--hermes-accent);
}

/* ---------- центр: состояние пространства, онбординг ---------- */

.hermes-shell .cp-main {
    display: grid;
    flex: 1 1 auto;
    place-items: center;
    padding: 2rem 1rem 4rem;
}

.hermes-shell .cp-state {
    display: grid;
    justify-items: center;
    gap: 0.625rem;
    width: min(100%, 32rem);
    text-align: center;
}

.hermes-shell .cp-state h1,
.hermes-shell .cp-onboarding h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.25;
    text-wrap: balance;
}

.hermes-shell .cp-state p {
    margin: 0;
    color: var(--hermes-muted);
    text-wrap: pretty;
}

.hermes-shell .cp-state__icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.25rem;
    border-radius: 50%;
    color: var(--hermes-muted);
    background: var(--hermes-surface-muted);
}

.hermes-shell .cp-state__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.hermes-shell .cp-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.hermes-shell .cp-spinner {
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: 0.25rem;
    border: 2px solid var(--hermes-line);
    border-top-color: var(--hermes-accent);
    border-radius: 50%;
    animation: cp-spin 0.9s linear infinite;
}

.hermes-shell .cp-spinner--small {
    width: 1rem;
    height: 1rem;
    margin: 0;
    border-width: 2px;
}

@keyframes cp-spin {
    to { transform: rotate(360deg); }
}

.hermes-shell .cp-onboarding {
    display: grid;
    gap: 1.5rem;
    width: min(100%, 34rem);
}

.hermes-shell .cp-onboarding h1 {
    text-align: center;
}

.hermes-shell .cp-choices {
    overflow: hidden;
    border: 1px solid var(--hermes-line);
    border-radius: 0.875rem;
}

.hermes-shell .cp-choice + .cp-choice {
    border-top: 1px solid var(--hermes-line);
}

.hermes-shell .cp-choice__head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 0;
    color: var(--hermes-ink);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

@media (hover: hover) {
    .hermes-shell .cp-choice__head:hover:not(:disabled) {
        background: var(--cp-hover);
    }
}

.hermes-shell .cp-choice__head:disabled {
    opacity: 0.55;
    cursor: default;
}

.hermes-shell .cp-choice__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    color: var(--hermes-ink);
    background: var(--hermes-surface-soft);
}

.hermes-shell .cp-choice__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.hermes-shell .cp-choice__text {
    display: grid;
    flex: 1 1 auto;
    gap: 0.0625rem;
    min-width: 0;
}

.hermes-shell .cp-choice__text strong {
    font-size: 0.9375rem;
    font-weight: 650;
}

.hermes-shell .cp-choice__text small {
    color: var(--hermes-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.hermes-shell .cp-choice__chevron {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    color: var(--hermes-muted);
    transition: transform 160ms ease;
}

.hermes-shell .cp-choice--open .cp-choice__chevron {
    transform: rotate(180deg);
}

.hermes-shell .cp-choice__body {
    display: grid;
    gap: 0.75rem;
    padding: 0.25rem 1rem 1rem 4.125rem;
}

/* ---------- кнопки, поля, пометки ---------- */

.hermes-shell .cp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    color: var(--hermes-ink);
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.hermes-shell .cp-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.hermes-shell .cp-button svg {
    width: 1rem;
    height: 1rem;
}

.hermes-shell .cp-button--primary {
    color: var(--hermes-accent-ink);
    background: var(--hermes-accent);
}

.hermes-shell .cp-button--primary:hover:not(:disabled) {
    background: var(--hermes-accent-strong);
}

.hermes-shell .cp-button--secondary {
    border-color: var(--hermes-line-strong);
}

.hermes-shell .cp-button--secondary:hover:not(:disabled),
.hermes-shell .cp-button--ghost:hover:not(:disabled) {
    background: var(--cp-hover);
}

.hermes-shell .cp-button--ghost {
    color: var(--hermes-muted);
}

.hermes-shell .cp-button--danger {
    color: var(--hermes-danger);
}

.hermes-shell .cp-button--danger:hover:not(:disabled) {
    background: var(--hermes-danger-muted);
}

.hermes-shell .cp-button--small {
    min-height: 2rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
}

.hermes-shell .cp-link {
    color: var(--hermes-accent-strong);
    font-weight: 600;
    text-decoration: none;
}

.hermes-shell .cp-link:hover {
    text-decoration: underline;
}

.hermes-shell .cp-link--button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.hermes-shell .cp-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hermes-shell .cp-field {
    display: grid;
    gap: 0.375rem;
    min-width: 0;
}

.hermes-shell .cp-field > span {
    color: var(--hermes-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

.hermes-shell .cp-input {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--hermes-line);
    border-radius: 0.5rem;
    outline: none;
    color: var(--hermes-ink);
    background: var(--hermes-surface);
    font: inherit;
    font-size: 0.9375rem;
}

.hermes-shell select.cp-input {
    padding-right: 2rem;
}

.hermes-shell .cp-input:focus {
    border-color: var(--hermes-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hermes-accent) 18%, transparent);
}

.hermes-shell .cp-input:disabled {
    opacity: 0.6;
}

.hermes-shell .cp-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hermes-shell .cp-form-actions > .cp-grow {
    flex: 1 1 auto;
    align-self: center;
}

.hermes-shell .cp-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 0;
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    color: var(--hermes-ink);
    background: var(--hermes-surface-muted);
    font-size: 0.875rem;
    text-align: left;
}

.hermes-shell .cp-notice--warning {
    background: var(--hermes-warning-muted);
}

.hermes-shell .cp-notice--danger {
    background: var(--hermes-danger-muted);
}

.hermes-shell .cp-notice--success {
    background: var(--hermes-success-muted);
}

.hermes-shell .cp-notice > div {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.hermes-shell .cp-pill {
    flex: 0 0 auto;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    color: var(--hermes-muted);
    background: var(--hermes-surface-soft);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.hermes-shell .cp-pill--success {
    color: var(--hermes-success);
    background: var(--hermes-success-muted);
}

.hermes-shell .cp-pill--warning {
    color: var(--hermes-warning);
    background: var(--hermes-warning-muted);
}

.hermes-shell .cp-pill--danger {
    color: var(--hermes-danger);
    background: var(--hermes-danger-muted);
}

.hermes-shell .cp-muted {
    margin: 0;
    color: var(--hermes-muted);
    font-size: 0.8125rem;
}

.hermes-shell .cp-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.375rem 0.375rem 0.375rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--hermes-surface-muted);
    font-family: "JetBrains Mono", "Cascadia Code", ui-monospace, monospace;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
    flex-wrap: wrap;
}

.hermes-shell .cp-code > span {
    flex: 1 1 auto;
    min-width: 0;
    user-select: all;
}

/* ---------- окно настроек ---------- */

/* Ниже уведомлений MudBlazor (snackbar ~1500): сообщения об успехе и ошибке видны поверх окна. */
.hermes-shell .cp-settings-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: rgb(20 18 28 / 0.42);
    animation: cp-fade-in 140ms ease-out;
}

.hermes-shell.hermes-shell--dark .cp-settings-backdrop {
    background: rgb(0 0 0 / 0.62);
}

@keyframes cp-fade-in {
    from { opacity: 0; }
}

.hermes-shell .cp-settings-dialog {
    display: flex;
    flex-direction: column;
    width: min(54rem, 100%);
    height: min(40rem, 100%);
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--hermes-line);
    border-radius: 1rem;
    color: var(--hermes-ink);
    background: var(--hermes-paper);
    box-shadow: var(--hermes-shadow);
    outline: none;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.hermes-shell .cp-settings__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 3.5rem;
    padding: 0.5rem 0.75rem 0.5rem 1.25rem;
    border-bottom: 1px solid var(--hermes-line);
}

.hermes-shell .cp-settings__header h2 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hermes-shell .cp-settings__section-title,
.hermes-shell .cp-settings__back {
    display: none !important;
}

.hermes-shell .cp-icon-button {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    color: var(--hermes-muted);
    background: transparent;
    cursor: pointer;
}

@media (hover: hover) {
    .hermes-shell .cp-icon-button:hover {
        color: var(--hermes-ink);
        background: var(--cp-hover);
    }
}

.hermes-shell .cp-icon-button svg {
    width: 1.15rem;
    height: 1.15rem;
}

.hermes-shell .cp-settings__layout {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
}

.hermes-shell .cp-settings__nav {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.75rem 0.5rem;
    overflow-y: auto;
    border-right: 1px solid var(--hermes-line);
}

.hermes-shell .cp-settings__nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.25rem;
    padding: 0.375rem 0.625rem;
    border: 0;
    border-radius: 0.5rem;
    color: var(--hermes-ink);
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

@media (hover: hover) {
    .hermes-shell .cp-settings__nav-item:hover {
        background: var(--cp-hover);
    }
}

.hermes-shell .cp-settings__nav-item--active {
    background: var(--cp-active);
    font-weight: 600;
}

.hermes-shell .cp-settings__nav-item span {
    flex: 1 1 auto;
}

.hermes-shell .cp-settings__nav-item svg {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    color: var(--hermes-muted);
}

.hermes-shell .cp-settings__nav-item .cp-settings__chevron {
    display: none;
}

.hermes-shell .cp-settings__content {
    min-width: 0;
    min-height: 0;
    padding: 1.25rem 1.75rem 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.hermes-shell .cp-settings__title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.hermes-shell .cp-section {
    display: grid;
    gap: 0.75rem;
}

.hermes-shell .cp-group-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
    color: var(--hermes-muted);
    font-size: 0.8125rem;
    font-weight: 650;
}

.hermes-shell .cp-section > .cp-group-title:first-child {
    margin-top: 0;
}

.hermes-shell .cp-group-title small {
    font-size: 0.75rem;
    font-weight: 500;
}

.hermes-shell .cp-row {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: start;
    gap: 0.5rem 1.25rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--hermes-line);
}

.hermes-shell .cp-row:first-child {
    padding-top: 0;
}

.hermes-shell .cp-row__label {
    padding-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.hermes-shell .cp-row__control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.hermes-shell .cp-row__control > .cp-input {
    flex: 1 1 14rem;
    max-width: 24rem;
}

.hermes-shell .cp-row__value {
    padding-top: 0.5rem;
    font-size: 0.9375rem;
}

.hermes-shell .cp-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 1rem 1.125rem;
    border-radius: 0.75rem;
    background: var(--hermes-surface-muted);
}

.hermes-shell .cp-summary div {
    display: grid;
    gap: 0.125rem;
    min-width: 0;
}

.hermes-shell .cp-summary dt {
    color: var(--hermes-muted);
    font-size: 0.75rem;
}

.hermes-shell .cp-summary dd {
    margin: 0;
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hermes-shell .cp-list {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--hermes-line);
    border-radius: 0.75rem;
}

.hermes-shell .cp-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    min-height: 3.25rem;
    padding: 0.625rem 0.875rem;
}

.hermes-shell .cp-list__item + .cp-list__item {
    border-top: 1px solid var(--hermes-line);
}

.hermes-shell .cp-list__body {
    display: grid;
    flex-basis: 100%;
    gap: 0.75rem;
    padding: 0.25rem 0 0.25rem 2.75rem;
}

.hermes-shell .cp-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: var(--hermes-ink);
    background: var(--hermes-surface-soft);
    font-size: 0.8125rem;
    font-weight: 700;
}

.hermes-shell .cp-avatar--round {
    border-radius: 50%;
}

.hermes-shell .cp-avatar--telegram {
    color: #fff;
    background: #2aabee;
}

.hermes-shell .cp-avatar svg {
    width: 1rem;
    height: 1rem;
}

.hermes-shell .cp-list__text {
    display: grid;
    flex: 1 1 10rem;
    gap: 0.0625rem;
    min-width: 0;
}

.hermes-shell .cp-list__text strong {
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hermes-shell .cp-list__text small {
    overflow: hidden;
    color: var(--hermes-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    text-overflow: ellipsis;
}

.hermes-shell .cp-list__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
}

.hermes-shell .cp-details > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--hermes-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.hermes-shell .cp-details > summary::-webkit-details-marker {
    display: none;
}

.hermes-shell .cp-details > summary svg {
    width: 0.875rem;
    height: 0.875rem;
    transition: transform 160ms ease;
}

.hermes-shell .cp-details[open] > summary svg {
    transform: rotate(180deg);
}

.hermes-shell .cp-details > :not(summary) {
    margin-top: 0.75rem;
}

.hermes-shell .cp-confirm {
    display: grid;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: var(--hermes-warning-muted);
    font-size: 0.875rem;
}

.hermes-shell .cp-confirm p {
    margin: 0;
}

.hermes-shell .cp-journal .cp-list__item {
    min-height: 2.75rem;
}

/* ---------- фокус, телефон, анимации ---------- */

.hermes-shell .cp-app :is(button, a, input, select, summary):focus-visible,
.hermes-shell .cp-settings-dialog :is(button, a, input, select, summary):focus-visible {
    outline: 2px solid var(--hermes-focus);
    outline-offset: 2px;
}

.hermes-shell .cp-app .cp-input:focus-visible,
.hermes-shell .cp-settings-dialog .cp-input:focus-visible {
    outline: none;
}

@media (max-width: 760px) {
    .hermes-shell .cp-header {
        height: 3.25rem;
        padding: 0 0.5rem 0 0.875rem;
    }

    .hermes-shell .cp-main {
        place-items: start center;
        padding: 2.5rem 1rem 3rem;
    }

    .hermes-shell .cp-state h1,
    .hermes-shell .cp-onboarding h1 {
        font-size: 1.3125rem;
    }

    .hermes-shell .cp-choice__body {
        padding-left: 1rem;
    }

    .hermes-shell .cp-button,
    .hermes-shell .cp-input {
        min-height: 2.75rem;
        font-size: 1rem;
    }

    .hermes-shell .cp-button--small {
        min-height: 2.25rem;
        font-size: 0.875rem;
    }

    .hermes-shell .cp-state__actions .cp-button,
    .hermes-shell .cp-choice__body > .cp-button {
        width: 100%;
    }

    /* Настройки: полноэкранный лист — сначала список разделов, затем раздел с «Назад». */
    .hermes-shell .cp-settings-backdrop {
        padding: 0;
    }

    .hermes-shell .cp-settings-dialog {
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 0;
    }

    .hermes-shell .cp-settings__header {
        min-height: calc(3.25rem + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 0.375rem 0 1rem;
    }

    .hermes-shell .cp-settings--detail .cp-settings__header {
        padding-left: 0.375rem;
    }

    .hermes-shell .cp-settings--detail .cp-settings__back {
        display: grid !important;
    }

    .hermes-shell .cp-settings--detail .cp-settings__section-title {
        display: inline !important;
    }

    .hermes-shell .cp-settings--detail .cp-settings__root-title {
        display: none;
    }

    .hermes-shell .cp-settings__layout {
        display: block;
        overflow: hidden;
    }

    .hermes-shell .cp-settings__nav {
        height: 100%;
        padding: 0.75rem;
        border-right: 0;
    }

    .hermes-shell .cp-settings__nav-item {
        min-height: 3rem;
        font-size: 1rem;
    }

    .hermes-shell .cp-settings__nav-item--active {
        background: transparent;
        font-weight: 400;
    }

    .hermes-shell .cp-settings__nav-item .cp-settings__chevron {
        display: block;
    }

    .hermes-shell .cp-settings__content {
        display: none;
        height: 100%;
        padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom));
    }

    .hermes-shell .cp-settings--detail .cp-settings__nav {
        display: none;
    }

    .hermes-shell .cp-settings--detail .cp-settings__content {
        display: block;
    }

    .hermes-shell .cp-settings__title {
        display: none;
    }

    .hermes-shell .cp-row {
        grid-template-columns: 1fr;
        gap: 0.375rem;
    }

    .hermes-shell .cp-row__label,
    .hermes-shell .cp-row__value {
        padding-top: 0;
    }

    .hermes-shell .cp-row__control > .cp-input {
        max-width: none;
    }

    .hermes-shell .cp-list__body {
        padding-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hermes-shell .cp-app *,
    .hermes-shell .cp-settings-backdrop,
    .hermes-shell .cp-settings-backdrop * {
        transition: none !important;
        animation: none !important;
    }

    .hermes-shell .cp-spinner {
        animation: cp-spin 2.4s linear infinite !important;
    }
}
