/* «Что нового»: карточка в левом нижнем углу (на телефоне — нижний лист), вкладка в окне колокольчика и слой подсказок. */

/* ---- строка аккаунта и пункт меню ---- */

.hermes-dashboard .workspace-nav__account-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hermes-dashboard .workspace-nav__account-row .account-button {
    flex: 1 1 auto;
    min-width: 0;
}

.hermes-dashboard .account-menu__count {
    min-width: 1.25rem;
    margin-left: auto;
    padding: 0 0.375rem;
    border-radius: 999px;
    color: var(--hermes-inverse-ink);
    background: var(--hermes-inverse-bg);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

/* ---- окно ---- */

.hermes-dashboard .whats-new {
    position: fixed;
    z-index: 65;
    left: 0.75rem;
    bottom: 4.75rem;
    display: flex;
    flex-direction: column;
    width: min(25rem, calc(100vw - 1.5rem));
    max-height: min(38rem, calc(100dvh - 6.5rem));
    border: 1px solid var(--hermes-line);
    border-radius: 1rem;
    color: var(--hermes-text);
    background: var(--hermes-panel-strong);
    box-shadow:
        0 1px 0 rgb(var(--hermes-ink-rgb) / 0.04) inset,
        0 24px 60px rgb(var(--hermes-shadow-rgb) / calc(0.38 * var(--hermes-shadow-a)));
    overflow: hidden;
    transform-origin: 1.5rem 100%;
    animation: whats-new-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hermes-dashboard .workspace-console--nav-collapsed ~ .whats-new,
.hermes-dashboard .whats-new--history {
    bottom: 4.75rem;
}

@keyframes whats-new-in {
    from {
        opacity: 0;
        transform: translateY(0.5rem) scale(0.98);
    }
}

.hermes-dashboard .whats-new-scrim {
    display: none;
}

.hermes-dashboard .whats-new__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem 0.75rem 1rem;
}

.hermes-dashboard .whats-new__mark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    color: var(--hermes-accent-ink);
    background: linear-gradient(135deg, var(--hermes-accent-hi), var(--hermes-accent));
}

.hermes-dashboard .whats-new__mark svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
}

.hermes-dashboard .whats-new__heading {
    flex: 1 1 auto;
    min-width: 0;
}

.hermes-dashboard .whats-new__heading h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hermes-dashboard :is(.whats-new, .notification-center) .whats-new__heading p {
    margin: 0.0625rem 0 0;
    color: var(--hermes-soft);
    font-size: 0.75rem;
}

.hermes-dashboard .whats-new__close {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    color: var(--hermes-soft);
    background: transparent;
    cursor: pointer;
}

.hermes-dashboard .whats-new__close:hover,
.hermes-dashboard .whats-new__close:focus-visible {
    color: var(--hermes-text);
    background: var(--hermes-panel-raised);
}

.hermes-dashboard .whats-new__close svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.hermes-dashboard .whats-new__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 1rem 0.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.hermes-dashboard .whats-new__day + .whats-new__day {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hermes-line);
}

.hermes-dashboard :is(.whats-new, .notification-center) .whats-new__date {
    margin: 0 0 0.5rem;
    color: var(--hermes-soft);
    font-size: 0.75rem;
    font-weight: 650;
}

.hermes-dashboard .whats-new__item {
    animation: whats-new-item 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hermes-dashboard .whats-new__item + .whats-new__item {
    margin-top: 1rem;
}

.hermes-dashboard .whats-new__day:nth-child(2) .whats-new__item { animation-delay: 60ms; }
.hermes-dashboard .whats-new__day:nth-child(n + 3) .whats-new__item { animation-delay: 100ms; }

@keyframes whats-new-item {
    from {
        opacity: 0;
        transform: translateY(0.25rem);
    }
}

.hermes-dashboard .whats-new__media {
    position: relative;
    margin-bottom: 0.625rem;
    border: 1px solid var(--hermes-line);
    border-radius: 0.75rem;
    background: var(--hermes-image-bg);
    overflow: hidden;
}

.hermes-dashboard .whats-new__media:not([style]) {
    aspect-ratio: 16 / 9;
}

.hermes-dashboard .whats-new__media img,
.hermes-dashboard .whats-new__media video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 14rem;
    object-fit: cover;
}

.hermes-dashboard :is(.whats-new, .notification-center) .whats-new__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.35;
}

.hermes-dashboard .whats-new__new {
    display: inline-block;
    margin-right: 0.375rem;
    padding: 0 0.375rem;
    border-radius: 0.375rem;
    color: var(--hermes-success-ink);
    background: var(--hermes-success-bg);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.25rem;
    vertical-align: 0.0625rem;
}

.hermes-dashboard :is(.whats-new, .notification-center) .whats-new__text {
    margin: 0.25rem 0 0;
    color: var(--hermes-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre-line;
}

.hermes-dashboard .whats-new__show {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    padding: 0.3125rem 0.625rem 0.3125rem 0.75rem;
    border: 1px solid var(--hermes-line-strong);
    border-radius: 999px;
    color: var(--hermes-text);
    background: rgb(var(--hermes-accent-rgb) / 0.12);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 140ms ease, transform 140ms ease;
}

.hermes-dashboard .whats-new__show:hover,
.hermes-dashboard .whats-new__show:focus-visible {
    background: rgb(var(--hermes-accent-rgb) / 0.22);
}

.hermes-dashboard .whats-new__show:hover svg {
    transform: translateX(2px);
}

.hermes-dashboard .whats-new__show svg {
    width: 0.9375rem;
    height: 0.9375rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 140ms ease;
}

.hermes-dashboard .whats-new__show--inline {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
}

.hermes-dashboard .whats-new__minor {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.hermes-dashboard .whats-new__item ~ .whats-new__minor,
.hermes-dashboard .whats-new__minor:first-of-type:not(:first-child) {
    margin-top: 0.875rem;
}

.hermes-dashboard .whats-new__date + .whats-new__minor {
    margin-top: 0;
}

.hermes-dashboard .whats-new__minor li {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.25rem 0 0.25rem 0.875rem;
    color: var(--hermes-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.hermes-dashboard .whats-new__minor li::before {
    content: "";
    position: absolute;
    top: 0.75rem;
    left: 0.125rem;
    width: 0.3125rem;
    height: 0.3125rem;
    border-radius: 50%;
    background: var(--hermes-accent);
}

.hermes-dashboard .whats-new__minor-line {
    flex: 1 1 auto;
    min-width: 0;
}

.hermes-dashboard .whats-new__minor strong {
    color: var(--hermes-text);
    font-weight: 600;
}

.hermes-dashboard :is(.whats-new, .notification-center) .whats-new__empty {
    margin: 0.5rem 0 1rem;
    color: var(--hermes-soft);
    font-size: 0.8125rem;
}

.hermes-dashboard .whats-new__skeleton {
    display: grid;
    gap: 0.625rem;
    padding: 0.25rem 0 1rem;
}

.hermes-dashboard .whats-new__skeleton i {
    display: block;
    height: 3.25rem;
    border-radius: 0.625rem;
    background: linear-gradient(90deg, var(--hermes-panel-raised), var(--hermes-panel-hi), var(--hermes-panel-raised));
    background-size: 200% 100%;
    animation: whats-new-shimmer 1.2s linear infinite;
}

.hermes-dashboard .whats-new__skeleton i:first-child {
    height: 8rem;
}

@keyframes whats-new-shimmer {
    to { background-position: -200% 0; }
}

.hermes-dashboard .whats-new__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem 0.75rem 1rem;
    border-top: 1px solid var(--hermes-line);
}

.hermes-dashboard .whats-new--history .whats-new__footer {
    justify-content: flex-end;
}

.hermes-dashboard .whats-new__link {
    padding: 0.25rem 0;
    border: 0;
    color: var(--hermes-soft);
    background: transparent;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgb(var(--hermes-ink-rgb) / 0.25);
    text-underline-offset: 0.2em;
}

.hermes-dashboard .whats-new__link:hover,
.hermes-dashboard .whats-new__link:focus-visible {
    color: var(--hermes-text);
}

/* Продолжить брошенную подсказку: кнопка с текстом, а не квадратная иконка тоста. */
.hermes-dashboard .workspace-toast .whats-new-resume__go {
    width: auto;
    padding: 0 0.625rem;
    color: var(--hermes-text);
    background: rgb(var(--hermes-accent-rgb) / 0.18);
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .hermes-dashboard .whats-new-scrim {
        position: fixed;
        z-index: 64;
        inset: 0;
        display: block;
        background: var(--hermes-scrim);
        animation: whats-new-fade 200ms ease-out;
    }

    .hermes-dashboard .whats-new {
        left: 0;
        right: 0;
        /* Над экранной клавиатурой: index.html держит размеры видимой области в --hermes-viewport-*. */
        bottom: max(0px, calc(100dvh - var(--hermes-viewport-top, 0px) - var(--hermes-viewport-height, 100dvh)));
        width: 100%;
        max-height: min(calc(var(--hermes-viewport-height, 100dvh) * 0.85), calc(var(--hermes-viewport-height, 100dvh) - 3rem));
        border-width: 1px 0 0;
        border-radius: 1.25rem 1.25rem 0 0;
        padding-bottom: env(safe-area-inset-bottom);
        animation-name: whats-new-sheet;
        animation-duration: 300ms;
    }

    .hermes-dashboard .whats-new__header::before {
        content: "";
        position: absolute;
        top: 0.375rem;
        left: 50%;
        width: 2.25rem;
        height: 0.25rem;
        border-radius: 999px;
        background: rgb(var(--hermes-ink-rgb) / 0.18);
        transform: translateX(-50%);
    }

    .hermes-dashboard .whats-new__header {
        padding-top: 1.125rem;
    }

    .hermes-dashboard .whats-new__media img,
    .hermes-dashboard .whats-new__media video {
        max-height: 12rem;
    }

    .hermes-dashboard .whats-new__footer .button {
        min-height: 2.75rem;
        padding-inline: 1.25rem;
    }
}

@keyframes whats-new-sheet {
    from { transform: translateY(100%); }
}

@keyframes whats-new-fade {
    from { opacity: 0; }
}

/* ---- слой подсказки (живёт в body, вне .hermes-dashboard) ---- */

.nano-tour {
    position: fixed;
    z-index: 200;
    inset: 0;
    pointer-events: auto;
    font-family: "Manrope", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

.nano-tour__hole {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-radius: 0.75rem;
    box-shadow: 0 0 0 200vmax rgb(8 7 10 / 0.64);
    pointer-events: none;
    transition:
        left 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        top 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        width 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        border-radius 260ms ease;
}

.nano-tour--centered .nano-tour__hole {
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
}

.nano-tour__ring {
    position: fixed;
    border: 2px solid var(--hermes-accent-hi, #a294ad);
    border-radius: 0.75rem;
    pointer-events: none;
    transition:
        left 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        top 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        width 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nano-tour--centered .nano-tour__ring {
    display: none;
}

.nano-tour__ring.is-pulsing {
    animation: nano-tour-pulse 1.4s ease-out 2;
}

@keyframes nano-tour-pulse {
    0% { box-shadow: 0 0 0 0 rgb(var(--hermes-accent-rgb, 144 132 152) / 0.55); }
    70% { box-shadow: 0 0 0 0.75rem rgb(var(--hermes-accent-rgb, 144 132 152) / 0); }
    100% { box-shadow: 0 0 0 0 rgb(var(--hermes-accent-rgb, 144 132 152) / 0); }
}

.nano-tour__arrow {
    position: fixed;
    width: 34px;
    height: 34px;
    color: var(--hermes-inverse-bg-hi, #fff);
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.35));
    transform: rotate(var(--nano-tour-angle, 0deg));
    transition: left 260ms cubic-bezier(0.2, 0.8, 0.2, 1), top 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nano-tour__arrow path {
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    animation: nano-tour-draw 360ms ease-out both, nano-tour-nudge 1.6s ease-in-out 400ms infinite;
}

@keyframes nano-tour-draw {
    from { stroke-dashoffset: 60; }
    to { stroke-dashoffset: 0; }
}

@keyframes nano-tour-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.nano-tour__card {
    position: fixed;
    width: min(20rem, calc(100vw - 24px));
    padding: 0.875rem 1rem 0.875rem;
    border: 1px solid var(--hermes-line, rgb(255 255 255 / 0.1));
    border-radius: 0.875rem;
    color: var(--hermes-text, #f4f1f3);
    background: var(--hermes-panel-strong, #29282b);
    box-shadow: 0 22px 56px rgb(0 0 0 / 0.42);
    outline: none;
    transition:
        left 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        top 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 160ms ease;
}

.nano-tour--enter .nano-tour__card {
    animation: nano-tour-card-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nano-tour--locating .nano-tour__card {
    opacity: 0.6;
}

@keyframes nano-tour-card-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
}

.nano-tour--leaving {
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.nano-tour__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -0.25rem -0.375rem 0.25rem 0;
}

.nano-tour__badge {
    color: var(--hermes-soft, #999398);
    font-size: 0.75rem;
    font-weight: 650;
}

.nano-tour__close {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    color: var(--hermes-soft, #999398);
    background: transparent;
    cursor: pointer;
}

.nano-tour__close:hover,
.nano-tour__close:focus-visible {
    color: var(--hermes-text, #f4f1f3);
    background: var(--hermes-panel-raised, #2e2d32);
}

.nano-tour__close svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.nano-tour__title {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
}

.nano-tour__text {
    margin: 0;
    color: var(--hermes-muted, #c7c2c6);
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre-line;
}

.nano-tour__missing {
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    color: var(--hermes-text, #f4f1f3);
    background: rgb(var(--hermes-accent-rgb, 144 132 152) / 0.14);
    font-size: 0.75rem;
    line-height: 1.45;
}

.nano-tour__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.875rem;
}

.nano-tour__dots {
    display: flex;
    gap: 0.3125rem;
}

.nano-tour__dots i {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 999px;
    background: rgb(var(--hermes-ink-rgb, 244 241 243) / 0.2);
    transition: width 200ms ease, background-color 200ms ease;
}

.nano-tour__dots i.is-done {
    background: rgb(var(--hermes-ink-rgb, 244 241 243) / 0.45);
}

.nano-tour__dots i.is-current {
    width: 1rem;
    background: var(--hermes-accent-hi, #a294ad);
}

.nano-tour__actions {
    display: flex;
    gap: 0.375rem;
    margin-left: auto;
}

.nano-tour__button {
    min-height: 2rem;
    padding: 0 0.875rem;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 650;
    cursor: pointer;
}

.nano-tour__button--primary {
    color: var(--hermes-inverse-ink, #111);
    background: var(--hermes-inverse-bg, #f1f1f1);
}

.nano-tour__button--primary:hover,
.nano-tour__button--primary:focus-visible {
    background: var(--hermes-inverse-bg-hi, #fff);
}

.nano-tour__button--ghost {
    border-color: var(--hermes-line, rgb(255 255 255 / 0.1));
    color: var(--hermes-text, #f4f1f3);
    background: transparent;
}

.nano-tour__button--ghost:hover,
.nano-tour__button--ghost:focus-visible {
    background: var(--hermes-panel-raised, #2e2d32);
}

.nano-tour__button:focus-visible,
.nano-tour__close:focus-visible {
    outline: 2px solid var(--hermes-accent-hi, #a294ad);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .nano-tour__card {
        width: calc(100vw - 24px);
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom) * 0);
    }

    .nano-tour__button {
        min-height: 2.75rem;
        padding: 0 1.125rem;
    }

    .nano-tour__close {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hermes-dashboard .whats-new,
    .hermes-dashboard .whats-new__item,
    .hermes-dashboard .whats-new-scrim,
    .nano-tour__card,
    .nano-tour__ring.is-pulsing,
    .nano-tour__arrow path {
        animation: none;
    }

    .nano-tour__hole,
    .nano-tour__ring,
    .nano-tour__arrow,
    .nano-tour__card {
        transition: none;
    }
}

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

/* ---- вкладки «Уведомления · Что нового» в окне колокольчика ---- */

.hermes-dashboard .notification-center__tabs {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.hermes-dashboard .notification-center__tabs .segmented__option {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-width: 0;
    padding-inline: 0.5rem;
    white-space: nowrap;
}

.hermes-dashboard .notification-center__count {
    min-width: 1.125rem;
    padding: 0 0.3125rem;
    border-radius: 999px;
    color: var(--hermes-accent-ink);
    background: var(--hermes-accent);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.125rem;
    text-align: center;
}

.hermes-dashboard .notification-center__actions {
    display: flex;
    justify-content: flex-end;
    padding: 0.25rem 0.5rem 0;
}

.hermes-dashboard .whats-new__body--embedded {
    padding: 0.75rem 1rem;
}
