.amg-horoscope-widget,
.amg-horoscope-widget * {
    box-sizing: border-box;
}

.amg-horoscope-widget {
    --amg-bg: #071b33;
    --amg-bg-deep: #041426;
    --amg-panel: #0d2948;
    --amg-panel-soft: #102f52;
    --amg-line: rgba(143, 186, 226, .19);
    --amg-muted: #8ca6c0;
    --amg-blue: #56a9f7;
    --amg-gold: #e8d07a;
    --amg-highlight: #38e6a2;
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(103, 155, 204, .22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 86% 8%, rgba(33, 112, 180, .23), transparent 30%),
        linear-gradient(180deg, var(--amg-bg) 0%, var(--amg-bg-deep) 100%);
    box-shadow: 0 18px 42px rgba(3, 19, 35, .24);
    color: #f6f9fc;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

.amg-horoscope-widget button {
    appearance: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    letter-spacing: normal;
    text-align: inherit;
    text-transform: none;
}

.amg-horoscope-widget button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.amg-horoscope-widget h2,
.amg-horoscope-widget h3,
.amg-horoscope-widget p {
    margin: 0;
    color: inherit;
}

.amg-horoscope-widget__glow {
    position: absolute;
    z-index: -1;
    top: -130px;
    right: -120px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(112, 177, 236, .16);
    border-radius: 50%;
    box-shadow:
        0 0 0 36px rgba(61, 130, 194, .05),
        0 0 0 84px rgba(61, 130, 194, .025);
    pointer-events: none;
}

.amg-horoscope-widget__stars {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .4;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(88,170,247,.55) 0 1px, transparent 1.5px);
    background-position: 14px 19px, 58px 68px;
    background-size: 78px 82px, 116px 124px;
    mask-image: linear-gradient(180deg, #000, transparent 70%);
    pointer-events: none;
}

.amg-horoscope-widget__header {
    position: relative;
    z-index: 4;
    padding: 20px 16px 12px;
}

.amg-horoscope-widget__eyebrow {
    margin-bottom: 6px !important;
    color: var(--amg-blue) !important;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
    line-height: 1.2;
    text-transform: uppercase;
}

.amg-horoscope-widget__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.amg-horoscope-widget__title-row h2 {
    font-family: "Arial Narrow", "Roboto Condensed", Inter, Arial, sans-serif;
    font-size: clamp(24px, 7vw, 31px);
    font-stretch: condensed;
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.amg-horoscope-widget__date {
    display: inline-grid;
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 32px;
    place-items: center;
    padding: 6px 9px;
    border: 1px solid var(--amg-line);
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    color: var(--amg-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-transform: lowercase;
}

.amg-horoscope-widget__selector {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid var(--amg-line) !important;
    border-radius: 12px !important;
    background: rgba(17, 48, 82, .78) !important;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.amg-horoscope-widget__selector:hover {
    border-color: rgba(83, 169, 247, .45) !important;
    background: rgba(20, 58, 98, .94) !important;
    transform: translateY(-1px);
}

.amg-horoscope-widget__selector-symbol {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(95, 172, 243, .24);
    border-radius: 9px;
    background: linear-gradient(145deg, #173f69, #0d2c4d);
    color: var(--amg-highlight);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.amg-horoscope-widget__selector-copy {
    min-width: 0;
    padding-right: 8px;
}

.amg-horoscope-widget__selector-copy small,
.amg-horoscope-widget__selector-copy strong {
    display: block;
}

.amg-horoscope-widget__selector-copy small {
    overflow: hidden;
    margin-bottom: 2px;
    color: var(--amg-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.amg-horoscope-widget__selector-copy strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amg-horoscope-widget__selector-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #dbe9f6;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.amg-horoscope-widget__selector-action i {
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease;
}

.amg-horoscope-widget.is-chooser-open .amg-horoscope-widget__selector-action i {
    transform: translateY(2px) rotate(225deg);
}

.amg-horoscope-widget__chooser {
    position: relative;
    z-index: 6;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height .28s ease, opacity .2s ease, transform .28s ease, margin-top .28s ease;
}

.amg-horoscope-widget.is-chooser-open .amg-horoscope-widget__chooser {
    max-height: 390px;
    margin-top: 10px;
    opacity: 1;
    transform: translateY(0);
}

.amg-horoscope-widget__chooser-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #d9e8f7;
    font-size: 12px;
}

.amg-horoscope-widget__chooser-head button {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid var(--amg-line) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.04) !important;
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
}

.amg-horoscope-widget__chooser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.amg-horoscope-widget__sign-option {
    display: flex;
    min-width: 0;
    min-height: 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 3px !important;
    border: 1px solid var(--amg-line) !important;
    border-radius: 10px !important;
    background: rgba(12, 38, 67, .82) !important;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.amg-horoscope-widget__sign-option > span {
    color: var(--amg-blue);
    font-size: 20px;
    line-height: 1;
}

.amg-horoscope-widget__sign-option > strong {
    overflow: hidden;
    width: 100%;
    color: #dfeaf5;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amg-horoscope-widget__sign-option:hover,
.amg-horoscope-widget__sign-option[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--amg-highlight) 58%, transparent) !important;
    background: rgba(28, 69, 104, .95) !important;
    transform: translateY(-1px);
}

.amg-horoscope-widget__sign-option[aria-pressed="true"] > span,
.amg-horoscope-widget__sign-option[aria-pressed="true"] > strong {
    color: var(--amg-highlight);
}

.amg-horoscope-widget__forecast {
    position: relative;
    z-index: 2;
    margin: 0 14px 14px;
    padding: 14px;
    border: 1px solid var(--amg-line);
    border-radius: 15px;
    background:
        linear-gradient(180deg, rgba(17, 48, 82, .96), rgba(10, 34, 60, .96));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
    transition: opacity .16s ease, transform .16s ease, filter .16s ease;
}

.amg-horoscope-widget__forecast::before {
    content: "";
    position: absolute;
    top: 0;
    right: 22px;
    left: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(84, 169, 247, .55), transparent);
}

.amg-horoscope-widget__forecast.is-changing {
    opacity: .25;
    filter: blur(2px);
    transform: translateY(5px) scale(.985);
}

.amg-horoscope-widget__forecast.is-arriving {
    animation: amg-horoscope-arrive .42s ease both;
}

.amg-horoscope-widget__forecast-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--amg-line);
}

.amg-horoscope-widget__big-symbol {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(94, 172, 243, .28);
    border-radius: 12px;
    background: linear-gradient(145deg, #1a446f, #0b2a49);
    box-shadow: inset 0 0 0 4px rgba(255,255,255,.018);
    color: var(--amg-highlight);
    font-size: 27px;
    line-height: 1;
}

.amg-horoscope-widget__today-pill {
    display: inline-block;
    margin-bottom: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(232, 208, 122, .15);
    color: var(--amg-gold);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .1em;
    line-height: 1;
}

.amg-horoscope-widget__sign-title h3 {
    overflow: hidden;
    font-family: "Arial Narrow", "Roboto Condensed", Inter, Arial, sans-serif;
    font-size: 23px;
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amg-horoscope-widget__sign-title p {
    margin-top: 5px !important;
    color: var(--amg-muted) !important;
    font-size: 10px;
    line-height: 1.2;
}

.amg-horoscope-widget__lucky {
    min-width: 64px;
    padding-left: 10px;
    border-left: 1px solid var(--amg-line);
    text-align: center;
}

.amg-horoscope-widget__lucky span,
.amg-horoscope-widget__lucky strong {
    display: block;
}

.amg-horoscope-widget__lucky span {
    max-width: 58px;
    margin: 0 auto 4px;
    color: var(--amg-muted);
    font-size: 6.5px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: .045em;
}

.amg-horoscope-widget__lucky strong {
    color: var(--amg-highlight);
    font-size: 23px;
    font-weight: 900;
    line-height: 1;
}

.amg-horoscope-widget__opening {
    padding: 13px 1px 12px;
    color: #f3f7fb !important;
    font-size: 13.5px;
    line-height: 1.52;
}

.amg-horoscope-widget__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    margin-bottom: 11px;
}

.amg-horoscope-widget__energy,
.amg-horoscope-widget__focus {
    min-width: 0;
    min-height: 56px;
    height: 100%;
    padding: 9px 10px;
    border: 1px solid var(--amg-line);
    border-radius: 10px;
    background: rgba(4, 22, 41, .32);
}

.amg-horoscope-widget__metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.amg-horoscope-widget__metric-label > span,
.amg-horoscope-widget__focus > span {
    color: var(--amg-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.amg-horoscope-widget__metric-label strong {
    color: var(--amg-highlight);
    font-size: 23px;
    font-weight: 900;
    line-height: 1;
}

/* Число и знак процента должны выглядеть как единое значение. */
.amg-horoscope-widget__metric-label strong > span {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: none;
}

.amg-horoscope-widget__bar {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.amg-horoscope-widget__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1fbf85, var(--amg-highlight));
    box-shadow: 0 0 12px color-mix(in srgb, var(--amg-highlight) 42%, transparent);
    transition: width .45s ease;
}

.amg-horoscope-widget__focus {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.amg-horoscope-widget__focus strong {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amg-horoscope-widget__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 8px;
}

.amg-horoscope-widget__tabs button {
    min-height: 34px;
    padding: 7px 4px !important;
    border: 1px solid var(--amg-line) !important;
    border-radius: 9px !important;
    background: rgba(5, 24, 44, .45) !important;
    color: #9fb5ca;
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.amg-horoscope-widget__tabs button:hover,
.amg-horoscope-widget__tabs button[aria-selected="true"] {
    border-color: rgba(56, 230, 162, .42) !important;
    background: rgba(33, 104, 85, .24) !important;
    color: var(--amg-highlight);
}

.amg-horoscope-widget__panels {
    min-height: 91px;
    padding: 11px;
    border: 1px solid var(--amg-line);
    border-radius: 11px;
    background: rgba(4, 21, 39, .45);
}

.amg-horoscope-widget__panels [role="tabpanel"] {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.amg-horoscope-widget__panels [role="tabpanel"][hidden] {
    display: none;
}

.amg-horoscope-widget__panel-icon {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 7px;
    background: #183c62;
    color: var(--amg-blue);
    font-size: 10px;
    font-weight: 900;
}

.amg-horoscope-widget__panels p {
    color: #dce7f1 !important;
    font-size: 12.5px;
    line-height: 1.48;
}

.amg-horoscope-widget__footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px 16px;
    color: var(--amg-muted);
    font-size: 9px;
    font-weight: 650;
    line-height: 1.3;
}

.amg-horoscope-widget__footer time {
    margin-left: auto;
    color: #708ba5;
    white-space: nowrap;
}

.amg-horoscope-widget__live-dot {
    display: block;
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amg-highlight);
    box-shadow: 0 0 0 4px rgba(56, 230, 162, .1);
}

.amg-horoscope-widget:not(.amg-horoscope-widget--no-animation) .amg-horoscope-widget__glow {
    animation: amg-horoscope-orbit 18s linear infinite;
}

.amg-horoscope-widget:not(.amg-horoscope-widget--no-animation) .amg-horoscope-widget__live-dot {
    animation: amg-horoscope-pulse 2.2s ease-in-out infinite;
}

@keyframes amg-horoscope-arrive {
    0% { opacity: .1; transform: translateY(-6px) scale(.99); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes amg-horoscope-orbit {
    to { transform: rotate(360deg); }
}

@keyframes amg-horoscope-pulse {
    50% { box-shadow: 0 0 0 7px rgba(56, 230, 162, 0); }
}

@media (max-width: 370px) {
    .amg-horoscope-widget__selector-action > span {
        display: none;
    }

    .amg-horoscope-widget__selector-action {
        padding-right: 5px;
    }

    .amg-horoscope-widget__forecast {
        margin-right: 10px;
        margin-left: 10px;
        padding: 12px;
    }

    .amg-horoscope-widget__header {
        padding-right: 12px;
        padding-left: 12px;
    }

    .amg-horoscope-widget__metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 295px) {
    .amg-horoscope-widget__chooser-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .amg-horoscope-widget__forecast-head {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .amg-horoscope-widget__lucky {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0 0;
        border-top: 1px solid var(--amg-line);
        border-left: 0;
        text-align: left;
    }
}

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