:root {
    --font-main: "Montserrat", "Segoe UI", Arial, sans-serif;
    --bg-start: #092d35;
    --bg-mid: #2f5d65;
    --bg-end: #081b21;
    --panel: rgba(8, 39, 47, 0.78);
    --panel-strong: rgba(10, 47, 57, 0.92);
    --panel-soft: rgba(255, 255, 255, 0.06);
    --line: rgba(192, 250, 255, 0.18);
    --line-strong: rgba(192, 250, 255, 0.36);
    --text: #f4fbfb;
    --muted: #a7bbc0;
    --muted-strong: #c8d9dc;
    --accent: #80dbe2;
    --accent-deep: #02667b;
    --accent-dark: #447884;
    --gold-soft: #f8d88c;
    --gold-strong: #ffd45b;
    --cool-soft: #a8edf4;
    --cool-strong: #39e4f2;
    --line-green: #39c86a;
    --line-red: #7f1227;
    --line-red-light: #ff4962;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
    --radius: 14px;

    /* Matrix digit tuning: change these values to try fonts and sizes. */
    --matrix-digit-font: var(--font-main);
    --matrix-digit-size-min: 3.75rem;
    --matrix-digit-size-fluid: 6.6vw;
    --matrix-digit-size-max: 5.25rem;
    --matrix-digit-mobile-min: 1.85rem;
    --matrix-digit-mobile-fluid: 9.8vw;
    --matrix-digit-mobile-max: 3.05rem;
    --matrix-digit-weight: 800;
    --matrix-digit-padding: 12px;
    --digit-rise-duration: 1.26s;
    --digit-rise-delay: 114ms;
    --matrix-digit-depth: 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 18px rgba(0, 0, 0, 0.24);
    --matrix-trace-glow: rgba(139, 255, 187, 0.72);
    --picker-bg: rgb(7, 49, 58); /* Calendar popup panel background. */
    /* Shimmer knobs:
       pass-duration changes wave speed, pause-duration changes waiting time. */
    --digit-shimmer-pass-duration: 1.5s; /* скорость прохода: больше = медленнее (моя правка)*/
    --digit-shimmer-pause-duration: 3.5s; /* пауза между проходами (моя правка)*/
}

[data-theme="light"] {
    --bg-start: #f8f0db;
    --bg-mid: #ffe6c9;
    --bg-end: #bb7143;
    --panel: rgba(255, 248, 232, 0.84);
    --panel-strong: rgba(255, 251, 241, 0.96);
    --panel-soft: rgba(187, 113, 67, 0.1);
    --line: rgba(86, 68, 51, 0.2);
    --line-strong: rgba(86, 68, 51, 0.34);
    --text: #283438;
    --muted: #756b60;
    --muted-strong: #3e4b4e;
    --accent: #0a7884;
    --accent-deep: #0b4753;
    --accent-dark: #447884;
    --emerald-strong: #50C878;
    --emerald-soft: #9FE2BF;
    --cool-soft: #6C9BD2;
    --cool-strong: #0F52BA;
    --matrix-digit-depth: 0 1px 0 rgba(255, 255, 255, 0.44), 0 4px 10px rgba(82, 61, 43, 0.14);
    --matrix-trace-glow: rgba(255, 174, 0, 0.56);
    --picker-bg: rgb(255, 247, 231);
    --shadow: 0 22px 70px rgba(119, 78, 46, 0.2);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--bg-end);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-main);
    color: var(--text);
    background:
        radial-gradient(circle at 18% 8%, rgba(192, 250, 255, 0.12), transparent 34%),
        radial-gradient(circle at 86% 18%, rgba(251, 144, 56, 0.1), transparent 32%),
        linear-gradient(140deg, var(--bg-start) 0%, var(--bg-mid) 48%, var(--bg-end) 100%);
    background-size: 140% 140%;
    animation: pageGradient 22s ease-in-out infinite;
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 78%);
}

[data-theme="light"] body::before {
    background:
        linear-gradient(90deg, rgba(68, 120, 132, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(68, 120, 132, 0.08) 1px, transparent 1px);
}

button,
input,
a {
    font: inherit;
}

a {
    color: inherit;
}

.mc-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 24px;
    align-items: center;
    padding: 14px clamp(18px, 4vw, 48px);
    background: rgba(2, 18, 25, 0.72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

[data-theme="light"] .mc-header {
    background: rgba(255, 248, 232, 0.78);
}

.mc-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    text-decoration: none;
}

.mc-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(40, 216, 232, 0.34));
}

.mc-brand-text {
    display: grid;
    gap: 0;
    color: var(--text);
    font-size: clamp(1rem, 2vw, 1.18rem);
    font-weight: 800;
    line-height: 1.08;
}

.mc-brand-text strong {
    color: var(--accent);
}

.mc-nav {
    display: flex;
    gap: 22px;
    align-items: center;
}

.mc-nav a {
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease;
}

.mc-nav a:hover,
.mc-nav a:focus-visible {
    color: var(--accent);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 7px 10px;
    color: var(--muted-strong);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.theme-toggle__track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: rgba(40, 216, 232, 0.18);
    border: 1px solid var(--line-strong);
}

.theme-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(40, 216, 232, 0.8);
    transition: transform 180ms ease;
}

[data-theme="light"] .theme-toggle__thumb {
    transform: translateX(18px);
}

.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 72px;
}

.calc-hero {
    position: relative;
    z-index: 25;
    width: min(920px, 100%);
    margin: 0 auto 28px;
}

.calc-hero,
.result-grid,
.cta-strip,
.community-strip {
    display: grid;
    margin-bottom: 28px;
}

.calc-hero > *,
.result-grid > *,
.cta-strip > *,
.community-strip > * {
    min-width: 0;
}

.calc-hero__copy,
.matrix-panel,
.cta-strip,
.community-strip {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

[data-theme="dark"] .calc-hero__copy,
[data-theme="dark"] .matrix-panel,
[data-theme="dark"] .community-strip {
    /* Original dark data-card colors; page background can change separately. */
    --panel: rgba(4, 32, 43, 0.78);
    --panel-strong: rgba(5, 43, 55, 0.92);
    --line: rgba(117, 229, 238, 0.22);
    --line-strong: rgba(117, 229, 238, 0.42);
    --accent: #28d8e8;
    --accent-dark: #006c69;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

[data-theme="light"] .matrix-panel {
    --panel: rgba(255, 243, 220, 0.94);
    --panel-strong: rgba(255, 247, 232, 0.98);
    --panel-soft: rgba(155, 105, 58, 0.11);
    --line: rgba(105, 79, 53, 0.26);
    --line-strong: rgba(105, 79, 53, 0.44);
    background:
        linear-gradient(180deg, rgba(255, 249, 235, 0.98), rgba(255, 238, 209, 0.92));
}

.calc-hero__copy {
    position: relative;
    overflow: visible;
    padding: clamp(30px, 5vw, 52px);
    scroll-margin-top: 84px;
    text-align: center;
}

.calc-hero__copy::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-dark), #c0faff, #fb9038);
    opacity: 0.82;
}

.seo-intro {
    display: grid;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto clamp(24px, 4vw, 38px);
    text-align: center;
}

.seo-intro h1 {
    margin-bottom: 4px;
    color: rgba(4, 32, 43, 0.96);
    font-size: clamp(1.75rem, 4.8vw, 3.25rem);
    font-weight: 900;
    line-height: 1.04;
    text-transform: uppercase;
}

.seo-intro p {
    margin: 0;
    color: color-mix(in srgb, #c0faff 72%, #ffffff 28%);
    font-size: clamp(0.98rem, 1.8vw, 1.16rem);
    font-weight: 700;
    line-height: 1.55;
}

[data-theme="light"] .seo-intro p {
    color: var(--accent);
}

.is-standalone-app .seo-intro {
    display: none;
}

.is-standalone-app .page-shell {
    padding-top: 8px;
}

.eyebrow {
    margin: 0 0 12px;
    color: color-mix(in srgb, #c0faff 72%, #ffffff 28%);
    font-size: clamp(1rem, 2.2vw, 1.38rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

[data-theme="light"] .eyebrow {
    color: var(--accent);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 20px;
    color: var(--text);
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: 0;
}

.lead {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 0;
    color: var(--muted-strong);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 500;
}

.input-panel {
    position: relative;
    z-index: 10;
    display: grid;
    gap: 20px;
    align-content: start;
    width: min(760px, 100%);
    margin: clamp(28px, 4vw, 42px) auto 0;
    padding: 0;
}

.field,
.date-field {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.field span,
.date-field legend {
    color: var(--muted-strong);
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
}

.field input,
.date-segments,
.picker-year input {
    width: 100%;
    min-height: 78px;
    color: var(--text);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input {
    padding: 0 22px;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 800;
}

.field input:focus,
.date-segments:focus-within,
.picker-year input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(40, 216, 232, 0.14);
}

::placeholder {
    color: color-mix(in srgb, var(--muted) 76%, transparent);
}

.date-segments {
    display: grid;
    grid-template-columns: 74px 16px 74px 16px minmax(120px, 1fr) 56px;
    align-items: center;
    padding: 0 12px 0 18px;
    font-size: clamp(1.4rem, 3.2vw, 1.95rem);
    font-weight: 900;
}

.date-segments input {
    width: 100%;
    min-width: 0;
    height: 74px;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
    text-align: center;
    font-weight: 900;
}

.date-segments input:last-of-type {
    text-align: left;
    padding-left: 8px;
}

.date-dot {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.95em;
    text-align: center;
}

.calendar-open,
.picker-nav,
.picker-month,
.ghost-button,
.calc-button,
.download-link,
.install-button,
.install-link {
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
}

.calendar-open {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--accent);
    background: rgba(40, 216, 232, 0.12);
}

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.field-error {
    min-height: 22px;
    margin: 0;
    color: #ff9eaa;
    font-size: 0.78rem;
    font-weight: 600;
}

.date-picker {
    position: absolute;
    right: 24px;
    left: 24px;
    top: 228px;
    z-index: 80;
    display: grid;
    gap: 14px;
    padding: 18px;
    background: var(--picker-bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

.picker-top {
    display: grid;
    grid-template-columns: 42px 1fr 42px minmax(106px, 0.7fr);
    gap: 10px;
    align-items: end;
}

.picker-nav,
.picker-month,
.ghost-button {
    min-height: 40px;
    color: var(--text);
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.picker-nav {
    display: grid;
    place-items: center;
}

.picker-month {
    padding: 0 14px;
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 800;
}

.picker-year {
    display: grid;
    gap: 6px;
}

.picker-year span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.picker-year input {
    min-height: 40px;
    padding: 0 10px;
    font-size: 1.06rem;
    font-weight: 800;
}

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

.year-panel {
    display: grid;
    max-height: 210px;
    overflow: auto;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    padding-right: 4px;
}

.month-grid button,
.day-grid button,
.year-panel button {
    color: var(--text);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.month-grid button,
.year-panel button {
    min-height: 38px;
    font-weight: 700;
}

.year-panel button.is-selected {
    color: #02151d;
    background: linear-gradient(135deg, var(--accent), var(--gold-strong));
}

.weekday-grid,
.day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.weekday-grid span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
}

.day-grid button {
    aspect-ratio: 1;
    min-width: 0;
    font-weight: 700;
}

.day-grid button.is-selected {
    color: #02151d;
    background: var(--accent);
    box-shadow: 0 0 22px rgba(40, 216, 232, 0.45);
}

.day-grid button.is-weekend {
    color: #ff6c7c;
}

.day-grid button.is-muted {
    opacity: 0.28;
    pointer-events: none;
}

.picker-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.ghost-button {
    padding: 0 14px;
    color: var(--muted-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.calc-button {
    min-height: 52px;
    color: #03171d;
    background: linear-gradient(135deg, var(--accent) 0%, #70f0f5 46%, var(--gold-strong) 100%);
    font-weight: 900;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 34px rgba(40, 216, 232, 0.2);
    transition: opacity 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.calc-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    filter: grayscale(0.65) saturate(0.55);
    box-shadow: none;
}

.pwa-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.install-button,
.install-link {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    font-size: 1.02rem;
    font-weight: 800;
    text-decoration: none;
}

.install-button::after,
.install-link::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
        linear-gradient(
            105deg,
            transparent 0%,
            transparent 42%,
            rgba(255, 255, 255, 0.22) 46%,
            rgba(255, 255, 255, 0.82) 50%,
            rgba(255, 255, 255, 0.28) 54%,
            transparent 58%,
            transparent 100%
        );
    background-size: 240% 100%;
    background-position: 132% 50%;
    transition:
        opacity 120ms ease,
        background-position var(--digit-shimmer-pass-duration) ease-in-out;
}

.pwa-actions.is-shimmer-reset .install-button::after,
.pwa-actions.is-shimmer-reset .install-link::after {
    opacity: 0;
    background-position: 132% 50%;
    transition: none;
}

.pwa-actions.is-shimmering .install-button::after,
.pwa-actions.is-shimmering .install-link::after {
    opacity: 1;
    background-position: -32% 50%;
}

.install-button {
    color: #03171d;
    background: linear-gradient(135deg, var(--accent) 0%, #70f0f5 100%);
    box-shadow: 0 12px 26px rgba(40, 216, 232, 0.18);
}

.install-link {
    color: #03171d;
    background: var(--gold-strong);
    border: 1px solid color-mix(in srgb, var(--gold-strong) 70%, #ffffff 30%);
    box-shadow: 0 12px 26px rgba(255, 212, 91, 0.18);
}

.install-button[hidden] {
    display: none;
}

.result-shell {
    display: grid;
    gap: 20px;
}

.result-grid {
    display: grid;
    grid-template-columns: minmax(0, 920px);
    gap: 20px;
    align-items: stretch;
    justify-content: center;
}

.matrix-panel {
    overflow: hidden;
    padding: clamp(18px, 3vw, 28px);
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.panel-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
}

.panel-icon {
    width: 19px;
    height: 19px;
    background:
        linear-gradient(var(--accent), var(--accent)) 0 0 / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 7px 0 / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 14px 0 / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 0 7px / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 7px 7px / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 14px 7px / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 0 14px / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 7px 14px / 5px 5px,
        linear-gradient(var(--accent), var(--accent)) 14px 14px / 5px 5px;
    background-repeat: no-repeat;
}

.panel-icon--legend {
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: linear-gradient(135deg, var(--gold-strong) 0 45%, var(--cool-strong) 45% 100%);
}

.result-name {
    max-width: 100%;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 900;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.birth-date {
    margin-bottom: 4px;
    color: var(--accent);
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 900;
    line-height: 1.1;
}

.dop-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.28em;
    align-items: center;
    margin-bottom: 0;
    color: var(--accent);
    font-size: clamp(1.7rem, 4vw, 2.9rem);
    font-weight: 900;
    line-height: 1.12;
}

.birth-date.is-empty-placeholder {
    color: #8ff6ff;
    font-size: clamp(1.18rem, 2.6vw, 1.9rem);
    font-style: italic;
    font-weight: 500;
}

.dop-value,
.dop-thinking {
    display: inline-flex;
}

.dop-thinking {
    appearance: none;
    position: relative;
    z-index: 5;
    align-items: center;
    gap: 0;
    margin: 0 -7px;
    padding: 0 7px;
    color: currentColor;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    line-height: 1.12;
    cursor: pointer;
    vertical-align: middle;
}

.dop-thinking:focus-visible {
    outline: 2px solid color-mix(in srgb, #ee82ee 70%, #ffffff 30%);
    outline-offset: 4px;
}

.dop-thinking__brace {
    color: currentColor;
}

.dop-thinking__value {
    display: inline-block;
    transform-origin: center 72%;
    line-height: 1.12;
    transition:
        transform 180ms ease,
        filter 180ms ease;
}

.dop-thinking__value.is-thinking-tap {
    background-image: linear-gradient(145deg, #4b0082 0%, #ee82ee 48%, #f9dcff 72%, #4b0082 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 5px 12px rgba(75, 0, 130, 0.28));
}

.dop-thinking__value.is-thinking-tap {
    transform: scale(1.22);
}

@media (hover: hover) and (pointer: fine) {
    .dop-thinking:hover .dop-thinking__value,
    .dop-thinking:focus-visible .dop-thinking__value {
        background-image: linear-gradient(145deg, #4b0082 0%, #ee82ee 48%, #f9dcff 72%, #4b0082 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(0 5px 12px rgba(75, 0, 130, 0.28));
        transform: scale(1.22);
    }
}

.dop-value__digit {
    display: inline-block;
    color: currentColor;
    transform-origin: center 72%;
    transition: transform 180ms ease, filter 180ms ease;
}

.dop-value__digit.is-related {
    transform: scale(1.15);
}

.dop-value--dop1 .dop-value__digit.is-related,
.dop-value--dop2 .dop-value__digit.is-related {
    background-image: linear-gradient(145deg, #fff8c9 0%, #d89012 18%, #fff0a6 36%, #ffcf42 48%, #8a5304 66%, #f7bd36 82%, #5f3900 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: contrast(1.08) saturate(1.12);
}

.dop-value--dop3 .dop-value__digit.is-related,
.dop-value--dop4 .dop-value__digit.is-related {
    background-image: linear-gradient(145deg, #ffffff 0%, #9fbec4 18%, #f3ffff 34%, #a8edf4 48%, #4f9aa6 66%, #d8fbff 82%, #1d5d68 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: contrast(1.12) saturate(0.92);
}

[data-theme="light"] .dop-value--dop1 .dop-value__digit.is-related {
    background-image: linear-gradient(145deg, #f2fff8 0%, var(--emerald-soft) 28%, var(--emerald-strong) 58%, #167a42 100%);
    filter: contrast(1.06) saturate(1.04) drop-shadow(0 3px 7px rgba(80, 200, 120, 0.22));
}

[data-theme="light"] .dop-value--dop2 .dop-value__digit.is-related {
    background-image: linear-gradient(145deg, #ecfff5 0%, var(--emerald-soft) 28%, #009E60 58%, #005f3a 100%);
    filter: contrast(1.06) saturate(1.04) drop-shadow(0 3px 7px rgba(0, 158, 96, 0.22));
}

[data-theme="light"] .dop-value--dop3 .dop-value__digit.is-related {
    background-image: linear-gradient(145deg, #f1f7ff 0%, #b7d0ef 28%, var(--cool-soft) 56%, #386fae 100%);
    filter: contrast(1.06) saturate(1.02) drop-shadow(0 3px 7px rgba(15, 82, 186, 0.2));
}

[data-theme="light"] .dop-value--dop4 .dop-value__digit.is-related {
    background-image: linear-gradient(145deg, #d8e8fb 0%, var(--cool-soft) 28%, var(--cool-strong) 58%, #08306d 100%);
    filter: contrast(1.08) saturate(1.04) drop-shadow(0 3px 7px rgba(15, 82, 186, 0.24));
}

.matrix-layout {
    /* Matrix stage spans the same visual axis as the input fields. */
    --matrix-stage-width: min(100%, 760px);
    --matrix-line-axis: clamp(42px, 5vw, 62px);
    --matrix-line-gap: clamp(16px, 2.1vw, 24px);
    --matrix-summary-overlap: clamp(21px, 2.5vw, 31px);
    display: block;
    width: 100%;
    padding-top: 6px;
}

.matrix-summary {
    /* Negative margin aligns the dop row with the top diagonal line marker. */
    width: var(--matrix-stage-width);
    margin: 0 auto calc(-1 * var(--matrix-summary-overlap));
    scroll-margin-top: 84px;
}

.matrix-stage {
    --line-axis: var(--matrix-line-axis);
    --line-gap: var(--matrix-line-gap);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--line-axis);
    grid-template-rows: var(--line-axis) auto var(--line-axis);
    gap: var(--line-gap);
    align-items: center;
    justify-content: center;
    width: var(--matrix-stage-width);
    margin: 0 auto;
}

.matrix-panel {
    scroll-margin-top: 84px;
}

.matrix-grid {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    z-index: 2;
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    overflow: hidden;
}

[data-theme="light"] .matrix-grid {
    background:
        linear-gradient(135deg, rgba(255, 248, 231, 0.72), rgba(244, 226, 198, 0.46));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.28),
        0 16px 34px rgba(119, 78, 46, 0.12);
}

[data-theme="light"] .matrix-cell {
    color: #5a5555;
}

.matrix-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    min-height: 0;
    aspect-ratio: 1;
    padding: var(--matrix-digit-padding);
    color: var(--text);
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    font-family: var(--matrix-digit-font);
    font-size: clamp(var(--matrix-digit-size-min), var(--matrix-digit-size-fluid), var(--matrix-digit-size-max));
    font-weight: var(--matrix-digit-weight);
    line-height: 1;
    letter-spacing: 0;
    text-shadow: var(--matrix-digit-depth);
}

.matrix-cell:nth-child(3n) {
    border-right: 0;
}

.matrix-cell:nth-child(n + 7) {
    border-bottom: 0;
}

.matrix-cell:focus-visible {
    outline: 1px solid rgba(139, 255, 187, 0.46);
    outline-offset: -4px;
}

.digit {
    flex: 0 0 auto;
    position: relative;
    display: inline-block;
    animation: digitRise var(--digit-rise-duration) ease both;
    animation-delay: calc(var(--i, 0) * var(--digit-rise-delay));
    transform-style: preserve-3d;
}

/* Active digit variant: 2-shimmer-internal. Previous variant: 1-impulse. */
.digit--dop1 {
    color: var(--gold-soft);
    background-image: linear-gradient(145deg, #fffdf0 0%, #ffeeb0 30%, #ffd45b 56%, #c98914 100%);
    background-size: 100% 100%;
    background-position: 0 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.22)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16));
    text-shadow: none;
    animation: digitRise var(--digit-rise-duration) ease both;
    animation-delay: calc(var(--i, 0) * var(--digit-rise-delay));
}

.digit--dop2 {
    color: var(--gold-strong);
    background-image: linear-gradient(145deg, #fff0a0 0%, var(--gold-strong) 34%, #eea915 58%, #7f4a03 100%);
    background-size: 100% 100%;
    background-position: 0 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.22)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16));
    text-shadow: none;
    animation: digitRise var(--digit-rise-duration) ease both;
    animation-delay: calc(var(--i, 0) * var(--digit-rise-delay));
}

.digit--dop3 {
    color: var(--cool-soft);
    background-image: linear-gradient(145deg, #ffffff 0%, #d8fbff 28%, #a8edf4 56%, #6fcfdc 100%);
    background-size: 100% 100%;
    background-position: 0 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.22)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16));
    text-shadow: none;
    animation: digitRise var(--digit-rise-duration) ease both;
    animation-delay: calc(var(--i, 0) * var(--digit-rise-delay));
}

.digit--dop4 {
    color: var(--cool-strong);
    background-image: linear-gradient(145deg, #e2ffff 0%, var(--cool-strong) 32%, #25b9ca 58%, #086f80 100%);
    background-size: 100% 100%;
    background-position: 0 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.22)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16));
    text-shadow: none;
    animation: digitRise var(--digit-rise-duration) ease both;
    animation-delay: calc(var(--i, 0) * var(--digit-rise-delay));
}

[data-theme="light"] .digit--dop1,
[data-theme="light"] .digit--dop2 {
    filter: drop-shadow(0 5px 9px rgba(115, 74, 12, 0.2)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.22));
}

[data-theme="light"] .digit--dop1 {
    background-image: linear-gradient(145deg, #f2fff8 0%, var(--emerald-soft) 28%, var(--emerald-strong) 58%, #167a42 100%);
}

[data-theme="light"] .digit--dop2 {
    background-image: linear-gradient(145deg, #ecfff5 0%, var(--emerald-soft) 28%, #009E60 58%, #005f3a 100%);
}

[data-theme="light"] .digit--dop3 {
    background-image: linear-gradient(145deg, #f1f7ff 0%, #b7d0ef 28%, var(--cool-soft) 56%, #386fae 100%);
    filter: drop-shadow(0 5px 9px rgba(15, 82, 186, 0.2)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.22));
}

[data-theme="light"] .digit--dop4 {
    background-image: linear-gradient(145deg, #d8e8fb 0%, var(--cool-soft) 28%, var(--cool-strong) 58%, #08306d 100%);
    filter: drop-shadow(0 5px 9px rgba(15, 82, 186, 0.24)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.2));
}

.digit--dop1::after,
.digit--dop2::after,
.digit--dop3::after,
.digit--dop4::after {
    content: attr(data-digit);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background-size: 240% 100%;
    background-position: 132% 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition:
        opacity 120ms ease,
        background-position var(--digit-shimmer-pass-duration) ease-in-out;
}

.matrix-grid.is-shimmer-reset .digit--dop1::after,
.matrix-grid.is-shimmer-reset .digit--dop2::after,
.matrix-grid.is-shimmer-reset .digit--dop3::after,
.matrix-grid.is-shimmer-reset .digit--dop4::after {
    opacity: 0;
    background-position: 132% 50%;
    transition: none;
}

.matrix-grid.is-shimmering .digit--dop1::after,
.matrix-grid.is-shimmering .digit--dop2::after,
.matrix-grid.is-shimmering .digit--dop3::after,
.matrix-grid.is-shimmering .digit--dop4::after {
    opacity: 1;
    background-position: -32% 50%;
}

.digit--dop1::after,
.digit--dop2::after {
    background-image: linear-gradient(105deg, transparent 0%, transparent 44%, rgba(255, 217, 91, 0.34) 47%, #ffffff 50%, rgba(255, 231, 144, 0.76) 53%, transparent 57%, transparent 100%);
}

.digit--dop3::after,
.digit--dop4::after {
    background-image: linear-gradient(105deg, transparent 0%, transparent 44%, rgba(210, 234, 238, 0.36) 47%, #ffffff 50%, rgba(236, 244, 247, 0.82) 53%, transparent 57%, transparent 100%);
}

.matrix-legend {
    display: grid;
    gap: 12px;
    width: var(--matrix-stage-width);
    min-width: 0;
    margin: clamp(34px, 5vw, 62px) auto 0;
    padding-top: clamp(14px, 2vw, 18px);
    border-top: 1px solid var(--line);
}

.matrix-legend__item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.matrix-legend__coins {
    display: inline-flex;
    align-items: center;
}

.matrix-legend__coin {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.42),
        0 5px 10px rgba(0, 0, 0, 0.2);
}

.matrix-legend__coin + .matrix-legend__coin {
    margin-left: -6px;
}

.matrix-legend__coin--dop1 {
    background-image: linear-gradient(145deg, #fffdf0 0%, #ffeeb0 30%, #ffd45b 56%, #c98914 100%);
}

.matrix-legend__coin--dop2 {
    background-image: linear-gradient(145deg, #fff0a0 0%, var(--gold-strong) 34%, #eea915 58%, #7f4a03 100%);
}

.matrix-legend__coin--dop3 {
    background-image: linear-gradient(145deg, #ffffff 0%, #d8fbff 28%, #a8edf4 56%, #6fcfdc 100%);
}

.matrix-legend__coin--dop4 {
    background-image: linear-gradient(145deg, #e2ffff 0%, var(--cool-strong) 32%, #25b9ca 58%, #086f80 100%);
}

[data-theme="light"] .matrix-legend__coin {
    border-color: rgba(91, 74, 55, 0.2);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.58),
        0 4px 9px rgba(119, 78, 46, 0.16);
}

[data-theme="light"] .matrix-legend__coin--dop3 {
    background-image: linear-gradient(145deg, #f1f7ff 0%, #b7d0ef 28%, var(--cool-soft) 56%, #386fae 100%);
}

[data-theme="light"] .matrix-legend__coin--dop4 {
    background-image: linear-gradient(145deg, #d8e8fb 0%, var(--cool-soft) 28%, var(--cool-strong) 58%, #08306d 100%);
}

[data-theme="light"] .matrix-legend__coin--dop1 {
    background-image: linear-gradient(145deg, #f2fff8 0%, var(--emerald-soft) 28%, var(--emerald-strong) 58%, #167a42 100%);
}

[data-theme="light"] .matrix-legend__coin--dop2 {
    background-image: linear-gradient(145deg, #ecfff5 0%, var(--emerald-soft) 28%, #009E60 58%, #005f3a 100%);
}

.matrix-legend__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.matrix-legend__text strong {
    color: var(--text);
    font-size: clamp(0.98rem, 1.6vw, 1.12rem);
    font-weight: 800;
    line-height: 1.18;
}

.matrix-legend__text span {
    color: var(--muted-strong);
    font-size: clamp(0.86rem, 1.35vw, 0.98rem);
    font-weight: 600;
    line-height: 1.25;
}

.dash {
    flex: 0 0 auto;
    color: var(--muted);
}

.line-stack {
    display: grid;
    align-items: center;
    justify-items: center;
}

.line-stack--right {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 100%;
    grid-template-rows: repeat(3, minmax(0, 1fr));
}

.line-stack--bottom {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.line-marker {
    appearance: none;
    display: grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: var(--radius);
    font-size: clamp(1.18rem, 2.6vw, 1.9rem);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-shadow: 0 0 12px rgba(244, 251, 251, 0.16);
    cursor: pointer;
    transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.line-marker:hover,
.line-marker:focus-visible {
    color: var(--accent);
    outline: none;
    text-shadow: 0 0 18px rgba(40, 216, 232, 0.56);
}

.line-marker:focus-visible {
    box-shadow: 0 0 0 3px rgba(40, 216, 232, 0.18);
}

.line-marker.is-dominant {
    color: var(--line-green);
    text-shadow: 0 0 16px rgba(57, 200, 106, 0.44);
}

.line-marker.is-overload {
    color: var(--line-red-light);
    text-shadow: 0 0 16px rgba(127, 18, 39, 0.88);
}

.line-marker--diag-a {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
}

.line-marker--diag-b {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
    justify-self: center;
}

.matrix-trace {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    z-index: 4;
    width: 100%;
    height: 100%;
    opacity: 0;
    overflow: visible;
    pointer-events: none;
    transition: opacity 120ms ease;
    mix-blend-mode: screen;
}

[data-theme="light"] .matrix-trace {
    mix-blend-mode: normal;
}

.matrix-trace.is-active {
    opacity: 1;
}

.matrix-trace__glow {
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
}

.matrix-trace__glow {
    stroke: var(--matrix-trace-glow);
    stroke-width: 18;
    filter:
        blur(6px)
        drop-shadow(0 0 14px rgba(139, 255, 187, 0.9))
        drop-shadow(0 0 28px rgba(72, 232, 142, 0.42));
}

[data-theme="light"] .matrix-trace__glow {
    filter:
        blur(6px)
        drop-shadow(0 0 13px rgba(255, 174, 0, 0.5))
        drop-shadow(0 0 26px rgba(255, 140, 0, 0.28));
}

.cta-strip {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-top: clamp(16px, 3vw, 34px);
    padding: 22px 24px;
    color: #102a2e;
    background:
        linear-gradient(135deg, rgba(255, 235, 176, 0.98) 0%, rgba(255, 198, 91, 0.96) 45%, rgba(255, 132, 56, 0.92) 100%);
    border-color: rgba(255, 255, 255, 0.28);
}

.cta-strip h3 {
    margin-bottom: 6px;
    color: #102a2e;
    font-size: clamp(1.22rem, 2.2vw, 1.5rem);
    line-height: 1.2;
}

.cta-strip p {
    margin-bottom: 0;
    color: #19393c;
    font-size: clamp(0.98rem, 1.45vw, 1.08rem);
    font-weight: 650;
}

.cta-strip p + p {
    margin-top: 10px;
}

.cta-strip__note {
    display: inline;
    color: rgba(16, 42, 46, 0.7);
    font-size: 0.84em;
    font-style: italic;
    font-weight: 500;
}

.cta-strip__icon {
    width: 66px;
    height: 66px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(16, 42, 46, 0.2));
}

.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    color: #f4fbfb;
    background: #092d35;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 14px 28px rgba(9, 45, 53, 0.24);
}

.community-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
}

.community-strip h3 {
    margin-bottom: 6px;
    color: var(--text);
    font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.community-strip p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 0.96rem;
    font-weight: 600;
}

.community-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.community-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    color: #03171d;
    background: var(--accent);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 900;
    text-decoration: none;
}

.install-page .mc-header {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.install-shell {
    display: grid;
    min-height: calc(100vh - 96px);
    align-items: center;
}

.install-panel {
    width: min(860px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 52px);
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.install-panel h1 {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(1.55rem, 3.4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.18;
    text-align: center;
}

.install-panel .lead {
    margin-bottom: clamp(24px, 4vw, 34px);
}

.install-steps {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.install-step {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.install-step h2 {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: clamp(1.08rem, 2.4vw, 1.3rem);
}

.install-step p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 0.98rem;
}

.offline-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.is-refreshing .matrix-panel,
.is-refreshing .legend-panel {
    animation: panelPulse 560ms ease both;
}

@keyframes panelPulse {
    0% {
        transform: translateY(4px);
        filter: brightness(0.92);
    }
    100% {
        transform: translateY(0);
        filter: brightness(1);
    }
}

@keyframes digitRise {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pageGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 980px) {
    .mc-header {
        grid-template-columns: 1fr auto;
    }

    .mc-nav {
        display: none;
    }

    .result-grid,
    .cta-strip,
    .community-strip {
        grid-template-columns: 1fr;
    }

    .cta-strip__icon {
        justify-self: center;
    }

    .community-links {
        justify-content: stretch;
    }

    .community-links a {
        flex: 1 1 180px;
    }
}

@media (max-width: 680px) {
    body {
        overflow-x: hidden;
    }

    .page-shell {
        width: 100%;
        max-width: 1220px;
        padding-right: 16px;
        padding-left: 16px;
        padding-top: 24px;
    }

    .is-standalone-app .calc-hero {
        margin-bottom: 20px;
    }

    .mc-header {
        padding: 12px 14px;
    }

    .mc-brand img {
        width: 38px;
        height: 38px;
    }

    .mc-brand-text {
        font-size: 0.95rem;
    }

    .theme-toggle__text {
        display: none;
    }

    .theme-toggle {
        padding: 6px;
    }

    .calc-hero__copy {
        width: 100%;
        min-height: auto;
        padding: 24px 18px;
    }

    .lead {
        max-width: 34ch;
        font-size: 0.98rem;
        overflow-wrap: break-word;
    }

    .input-panel {
        gap: 16px;
        margin-top: 24px;
    }

    .matrix-panel,
    .legend-panel,
    .cta-strip,
    .community-strip {
        width: 100%;
        padding: 16px;
    }

    .date-picker {
        position: fixed;
        right: 16px;
        left: 16px;
        top: 76px;
        max-height: calc(100vh - 92px);
        overflow: auto;
    }

    .date-segments {
        grid-template-columns: 46px 10px 46px 10px minmax(82px, 1fr) 42px;
        min-height: 62px;
        padding: 0 10px;
        font-size: clamp(1.1rem, 5.2vw, 1.45rem);
    }

    .date-segments input {
        height: 60px;
    }

    .field input {
        min-height: 62px;
        font-size: clamp(1.1rem, 5vw, 1.4rem);
    }

    .calendar-open {
        width: 38px;
        height: 38px;
    }

    .picker-top {
        grid-template-columns: 40px 1fr 40px;
    }

    .picker-year {
        grid-column: 1 / -1;
    }

    .matrix-stage {
        --line-axis: 28px;
        --line-gap: 8px;
        --matrix-digit-padding: 8px;
        grid-template-columns: minmax(0, 1fr) var(--line-axis);
        grid-template-rows: var(--line-axis) auto var(--line-axis);
        gap: var(--line-gap);
        width: var(--matrix-stage-width);
        margin: 0 auto;
    }

    .matrix-layout {
        --matrix-stage-width: calc(100% - 4px);
        --matrix-summary-overlap: 14px;
    }

    .line-marker {
        min-width: 28px;
        min-height: 28px;
    }

    .line-stack--right {
        justify-items: center;
    }

    .line-marker {
        min-width: 28px;
        min-height: 28px;
        font-size: clamp(0.95rem, 5.2vw, 1.35rem);
    }

    .matrix-cell {
        min-height: 0;
        font-size: clamp(var(--matrix-digit-mobile-min), var(--matrix-digit-mobile-fluid), var(--matrix-digit-mobile-max));
    }

    .matrix-legend {
        gap: 8px;
        margin-top: 26px;
        padding-top: 12px;
    }

    .matrix-legend__item {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
    }

    .matrix-legend__coin {
        width: 16px;
        height: 16px;
    }

    .matrix-legend__coin + .matrix-legend__coin {
        margin-left: -5px;
    }

    .matrix-legend__text strong {
        font-size: 0.72rem;
        font-weight: 750;
        line-height: 1.12;
    }

    .matrix-legend__text span {
        font-size: 0.62rem;
        font-weight: 560;
        line-height: 1.16;
    }

    .download-link {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .pwa-actions,
    .offline-actions,
    .community-links {
        display: grid;
    }

    .install-button,
    .install-link,
    .community-links a {
        width: 100%;
        text-align: center;
    }

    .install-shell {
        min-height: auto;
    }
}

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