:root {
    --app-height: 100svh;
    --tg-safe-top: 0px;
    --tg-safe-right: 0px;
    --tg-safe-bottom: 0px;
    --tg-safe-left: 0px;
    --bg: #05070a;
    --bg-deep: #020305;
    --surface: rgba(13, 18, 25, 0.82);
    --surface-strong: #0d1219;
    --surface-soft: rgba(18, 26, 36, 0.66);
    --surface-hover: rgba(26, 37, 50, 0.78);
    --line: rgba(178, 222, 250, 0.11);
    --line-strong: rgba(178, 222, 250, 0.2);
    --text: #f4f8fb;
    --text-soft: #cad5de;
    --muted: #82909c;
    --accent: #a8ddff;
    --accent-strong: #74c4f7;
    --accent-dim: rgba(126, 202, 249, 0.12);
    --accent-glow: rgba(113, 200, 255, 0.32);
    --success: #9be1c2;
    --danger: #ff9dac;
    --warning: #f3d69b;
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.42);
    --shadow-float: 0 18px 48px rgba(0, 0, 0, 0.48);
    --ease-out: cubic-bezier(0.2, 0.75, 0.25, 1);
    --ease-spring: cubic-bezier(0.17, 0.89, 0.32, 1.28);
    --topbar-height: 68px;
    --dock-height: 78px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    color-scheme: dark;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--bg);
    overscroll-behavior: none;
}

body {
    min-width: 320px;
    min-height: var(--app-height);
    margin: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 86% -8%, rgba(85, 161, 209, 0.1), transparent 34%),
        linear-gradient(180deg, #06090d 0%, var(--bg) 48%, var(--bg-deep) 100%);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
}

button,
a,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

img {
    display: block;
    max-width: 100%;
}

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

[hidden] {
    display: none !important;
}

.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.ambient__orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(1px);
    opacity: 0.42;
    animation: ambient-float 14s ease-in-out infinite alternate;
}

.ambient__orb--one {
    top: -18vw;
    right: -22vw;
    width: 72vw;
    height: 72vw;
    background: radial-gradient(circle, rgba(96, 186, 242, 0.16), rgba(64, 139, 187, 0.035) 46%, transparent 70%);
}

.ambient__orb--two {
    bottom: 8%;
    left: -28vw;
    width: 74vw;
    height: 74vw;
    background: radial-gradient(circle, rgba(86, 157, 211, 0.1), transparent 68%);
    animation-delay: -4s;
}

.ambient__grain {
    position: absolute;
    inset: 0;
    opacity: 0.11;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.app-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    height: var(--app-height);
    min-height: 540px;
    margin: 0 auto;
    overflow: hidden;
}

.topbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    height: calc(var(--topbar-height) + var(--tg-safe-top));
    padding: calc(13px + var(--tg-safe-top)) calc(18px + var(--tg-safe-right)) 11px calc(18px + var(--tg-safe-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(5, 7, 10, 0.96), rgba(5, 7, 10, 0.66) 72%, transparent);
    pointer-events: none;
}

.topbar > * {
    pointer-events: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.brand__mark {
    position: relative;
    width: 27px;
    height: 29px;
    display: block;
}

.brand__mark span {
    position: absolute;
    top: 4px;
    width: 13px;
    height: 20px;
    border: 1px solid rgba(180, 224, 251, 0.78);
    border-radius: 5px;
    background: linear-gradient(160deg, rgba(180, 225, 252, 0.12), rgba(55, 107, 139, 0.02));
    box-shadow: inset 0 0 12px rgba(134, 207, 250, 0.06);
}

.brand__mark span:nth-child(1) {
    left: 0;
    transform: rotate(-13deg);
}

.brand__mark span:nth-child(2) {
    left: 7px;
    top: 2px;
    z-index: 2;
    height: 23px;
    border-color: var(--accent);
    background: linear-gradient(160deg, rgba(180, 225, 252, 0.18), rgba(55, 107, 139, 0.03));
    box-shadow: 0 0 15px rgba(112, 198, 250, 0.12);
}

.brand__mark span:nth-child(3) {
    right: 0;
    transform: rotate(13deg);
}

.brand__name {
    display: inline-block;
    color: transparent;
    font-family: "Playfair Display", "Times New Roman", Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.045em;
    background: linear-gradient(
        105deg,
        #80602b 0%,
        #e6bd67 13%,
        #fff0bd 24%,
        #71bce7 39%,
        #d8efff 48%,
        #e9c775 61%,
        #a4772f 74%,
        #6eb8e2 88%,
        #d8ae59 100%
    );
    background-size: 280% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(111, 181, 224, 0.13), 0 0 18px rgba(222, 177, 84, 0.09);
    animation: reflecta-shimmer 7s linear infinite;
}

.profile-chip {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(12, 17, 23, 0.78);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.profile-chip__avatar {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: inherit;
    background:
        radial-gradient(circle at 28% 22%, rgba(190, 231, 255, 0.28), transparent 34%),
        linear-gradient(145deg, #182431, #0b1118);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.profile-chip__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-chip__status {
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(155, 225, 194, 0.55);
}

.viewport {
    position: absolute;
    inset: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    padding:
        calc(var(--topbar-height) + var(--tg-safe-top) + 8px)
        calc(18px + var(--tg-safe-right))
        calc(var(--dock-height) + var(--tg-safe-bottom) + 32px)
        calc(18px + var(--tg-safe-left));
    scroll-behavior: smooth;
}

.viewport::-webkit-scrollbar {
    display: none;
}

.page {
    min-height: 100%;
    animation: page-enter 360ms var(--ease-out) both;
}

.page--centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-head__copy {
    min-width: 0;
}

.page-head__eyebrow,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.page-head__eyebrow::before,
.eyebrow::before {
    width: 18px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, var(--accent), transparent);
}

.page-title {
    margin-bottom: 7px;
    font-size: clamp(29px, 8vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 590;
}

.page-subtitle {
    max-width: 430px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.58;
}

.section {
    margin-top: 28px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.section-title {
    margin: 0;
    font-size: 17px;
    font-weight: 590;
    letter-spacing: -0.02em;
}

.section-link {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
}

.icon-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(14, 20, 27, 0.72);
    color: var(--text-soft);
    cursor: pointer;
    transition: 180ms var(--ease-out);
}

.icon-button:hover,
.icon-button:active {
    border-color: var(--line-strong);
    background: var(--surface-hover);
    color: var(--accent);
    transform: translateY(-1px);
}

.icon-button.is-active {
    border-color: rgba(255, 157, 172, 0.25);
    color: var(--danger);
    background: rgba(255, 157, 172, 0.08);
}

.icon-button svg,
.button svg,
.dock-item svg,
.dock-draw svg,
.menu-card svg,
.quick-card svg,
.list-icon svg,
.inline-action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: 17px;
    background: linear-gradient(145deg, #d6efff, #98d6fc);
    color: #071018;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 34px rgba(86, 177, 234, 0.18), inset 0 1px rgba(255, 255, 255, 0.64);
    transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), filter 180ms var(--ease-out);
}

.button:hover,
.button:active {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 15px 38px rgba(86, 177, 234, 0.23), inset 0 1px rgba(255, 255, 255, 0.64);
}

.button:active {
    transform: translateY(0) scale(0.985);
}

.button--secondary {
    border-color: var(--line-strong);
    background: rgba(14, 21, 29, 0.78);
    color: var(--text);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.button--ghost {
    border-color: var(--line);
    background: transparent;
    color: var(--text-soft);
    box-shadow: none;
}

.button--danger {
    border-color: rgba(255, 157, 172, 0.18);
    background: rgba(255, 157, 172, 0.08);
    color: var(--danger);
    box-shadow: none;
}

.button--wide {
    width: 100%;
}

.button--compact {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 12px;
}

.button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.text-button {
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(13, 20, 27, 0.72);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge::before {
    width: 5px;
    height: 5px;
    content: "";
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.demo-badge {
    position: absolute;
    top: calc(var(--topbar-height) + var(--tg-safe-top) - 5px);
    right: calc(19px + var(--tg-safe-right));
    z-index: 12;
    padding: 3px 7px;
    border: 1px solid rgba(243, 214, 155, 0.2);
    border-radius: 999px;
    background: rgba(49, 39, 22, 0.82);
    color: var(--warning);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-hero {
    position: relative;
    min-height: 410px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 72% 18%, rgba(132, 207, 250, 0.13), transparent 31%),
        linear-gradient(150deg, rgba(19, 29, 39, 0.94), rgba(8, 12, 17, 0.94) 62%, rgba(5, 8, 11, 0.98));
    box-shadow: var(--shadow-card), inset 0 1px rgba(255, 255, 255, 0.025);
    isolation: isolate;
}

.home-hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: linear-gradient(180deg, transparent 30%, rgba(4, 7, 10, 0.2) 53%, rgba(4, 7, 10, 0.87) 100%);
}

.home-hero__visual {
    position: absolute;
    top: 26px;
    right: 13px;
    left: 13px;
    height: 232px;
    pointer-events: none;
}

.home-hero__moon {
    position: absolute;
    top: 17px;
    left: 50%;
    width: 108px;
    height: 108px;
    border: 1px solid rgba(176, 222, 251, 0.12);
    border-radius: 50%;
    background:
        radial-gradient(circle at 39% 31%, rgba(239, 249, 255, 0.65), rgba(157, 213, 247, 0.21) 40%, rgba(55, 105, 137, 0.035) 67%, transparent 69%);
    box-shadow: 0 0 80px rgba(99, 185, 238, 0.16);
    transform: translateX(-50%);
    animation: moon-breathe 5s ease-in-out infinite;
}

.home-hero__rings,
.home-hero__rings::before,
.home-hero__rings::after {
    position: absolute;
    top: 55%;
    left: 50%;
    width: 180px;
    height: 92px;
    border: 1px solid rgba(169, 218, 248, 0.1);
    border-radius: 50%;
    content: "";
    transform: translate(-50%, -50%) rotate(-8deg);
}

.home-hero__rings::before {
    top: 50%;
    width: 230px;
    height: 116px;
    transform: translate(-50%, -50%) rotate(12deg);
}

.home-hero__rings::after {
    top: 50%;
    width: 280px;
    height: 142px;
    transform: translate(-50%, -50%) rotate(-3deg);
}

.home-hero__cards {
    position: absolute;
    right: 50%;
    bottom: -12px;
    width: 162px;
    height: 204px;
    transform: translateX(50%);
}

.home-hero__cards span {
    position: absolute;
    inset: 12px 22px 6px;
    border: 1px solid rgba(173, 220, 249, 0.2);
    border-radius: 17px;
    background:
        radial-gradient(circle at 50% 38%, rgba(173, 220, 249, 0.12), transparent 23%),
        linear-gradient(155deg, rgba(20, 30, 40, 0.92), rgba(7, 11, 15, 0.94));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), inset 0 0 26px rgba(128, 201, 245, 0.04);
}

.home-hero__cards span::before,
.home-hero__cards span::after {
    position: absolute;
    content: "";
    border-radius: 50%;
}

.home-hero__cards span::before {
    inset: 33% 28%;
    border: 1px solid rgba(178, 224, 252, 0.22);
}

.home-hero__cards span::after {
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--accent);
    box-shadow: 0 0 22px rgba(125, 204, 251, 0.72);
    transform: translate(-50%, -50%);
}

.home-hero__cards span:nth-child(1) {
    transform: rotate(-11deg) translateX(-19px);
    opacity: 0.58;
}

.home-hero__cards span:nth-child(2) {
    transform: rotate(10deg) translateX(18px);
    opacity: 0.72;
}

.home-hero__cards span:nth-child(3) {
    transform: translateY(-7px);
}

.home-hero__content {
    position: relative;
    z-index: 2;
}

.home-hero__title {
    max-width: 390px;
    margin-bottom: 13px;
    font-size: clamp(33px, 9vw, 50px);
    font-weight: 570;
    line-height: 0.98;
    letter-spacing: -0.052em;
}

.home-hero__text {
    max-width: 410px;
    margin-bottom: 21px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.56;
}

.home-hero__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-hero__actions .button {
    flex: 1;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.quick-card {
    position: relative;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(155deg, rgba(16, 23, 31, 0.84), rgba(8, 12, 17, 0.88));
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: 220ms var(--ease-out);
}

.quick-card::after {
    position: absolute;
    right: -28px;
    bottom: -38px;
    width: 100px;
    height: 100px;
    content: "";
    border-radius: 50%;
    background: radial-gradient(circle, rgba(113, 195, 245, 0.11), transparent 66%);
}

.quick-card:hover,
.quick-card:active {
    border-color: var(--line-strong);
    background: linear-gradient(155deg, rgba(20, 29, 39, 0.92), rgba(9, 14, 19, 0.94));
    transform: translateY(-2px);
}

.quick-card__icon,
.list-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--accent-dim);
    color: var(--accent);
}

.quick-card__title {
    margin: 22px 0 4px;
    font-size: 15px;
    font-weight: 590;
}

.quick-card__meta {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.topic-rail,
.chip-row {
    display: flex;
    gap: 8px;
    margin-right: calc(-18px - var(--tg-safe-right));
    padding-right: calc(18px + var(--tg-safe-right));
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.topic-rail::-webkit-scrollbar,
.chip-row::-webkit-scrollbar {
    display: none;
}

.topic-chip,
.choice-chip {
    min-width: max-content;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(12, 18, 24, 0.72);
    color: var(--text-soft);
    font-size: 12px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: 180ms var(--ease-out);
}

.topic-chip:hover,
.topic-chip:active,
.choice-chip:hover,
.choice-chip:active,
.choice-chip.is-selected {
    border-color: rgba(166, 219, 252, 0.26);
    background: var(--accent-dim);
    color: var(--accent);
}

.topic-chip__symbol {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(166, 219, 252, 0.07);
    font-size: 12px;
}

.insight-note {
    position: relative;
    overflow: hidden;
    padding: 20px 20px 20px 47px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(10, 15, 21, 0.67);
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.55;
}

.insight-note::before {
    position: absolute;
    top: 20px;
    left: 19px;
    width: 14px;
    height: 14px;
    content: "";
    border: 1px solid var(--accent);
    transform: rotate(45deg);
    box-shadow: 0 0 16px rgba(126, 203, 249, 0.18);
}

.card-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.oracle-card {
    --art-a: rgba(122, 202, 250, 0.31);
    --art-b: rgba(44, 95, 129, 0.08);
    position: relative;
    width: min(100%, 392px);
    aspect-ratio: 0.69;
    overflow: hidden;
    border: 1px solid rgba(177, 222, 250, 0.21);
    border-radius: 31px;
    background: #0b1118;
    box-shadow: 0 32px 88px rgba(0, 0, 0, 0.58), 0 0 0 8px rgba(139, 210, 251, 0.018), inset 0 1px rgba(255, 255, 255, 0.05);
    isolation: isolate;
}

.oracle-card--compact {
    width: 100%;
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.oracle-card__image {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 280ms ease;
}

.oracle-card__image.is-broken {
    opacity: 0;
}

.oracle-card__fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 36%, var(--art-a), transparent 18%),
        radial-gradient(circle at 50% 56%, rgba(158, 220, 255, 0.12), transparent 38%),
        linear-gradient(155deg, #162431 0%, #0a1118 45%, #030608 100%);
}

.oracle-card__fallback::before,
.oracle-card__fallback::after {
    position: absolute;
    left: 50%;
    content: "";
    border: 1px solid rgba(178, 224, 252, 0.18);
    border-radius: 50%;
    transform: translateX(-50%);
}

.oracle-card__fallback::before {
    top: 20%;
    width: 44%;
    aspect-ratio: 1;
    box-shadow: 0 0 70px var(--art-a), inset 0 0 35px var(--art-b);
}

.oracle-card__fallback::after {
    top: 48%;
    width: 118%;
    height: 37%;
    transform: translateX(-50%) rotate(-9deg);
}

.oracle-card__orbit,
.oracle-card__orbit::before,
.oracle-card__orbit::after {
    position: absolute;
    top: 36%;
    left: 50%;
    width: 62%;
    height: 29%;
    content: "";
    border: 1px solid rgba(173, 221, 251, 0.13);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(17deg);
}

.oracle-card__orbit::before {
    top: 50%;
    width: 82%;
    height: 148%;
    transform: translate(-50%, -50%) rotate(62deg);
}

.oracle-card__orbit::after {
    top: 50%;
    width: 122%;
    height: 184%;
    transform: translate(-50%, -50%) rotate(-24deg);
}

.oracle-card__star {
    position: absolute;
    top: 35%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dff3ff;
    box-shadow: 0 0 15px #b7e4ff, 0 0 42px var(--accent-glow);
    transform: translate(-50%, -50%);
}

.oracle-card__vignette {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(180deg, rgba(1, 3, 5, 0.04), transparent 58%, rgba(1, 3, 5, 0.34) 100%),
        radial-gradient(ellipse at center, transparent 42%, rgba(2, 4, 6, 0.34) 100%);
    pointer-events: none;
}

.oracle-card__frame {
    position: absolute;
    inset: 12px;
    z-index: 4;
    border: 1px solid rgba(209, 237, 255, 0.18);
    border-radius: 22px;
    pointer-events: none;
}

.oracle-card__frame::before,
.oracle-card__frame::after {
    position: absolute;
    left: 50%;
    width: 34px;
    height: 11px;
    content: "";
    border-right: 1px solid rgba(209, 237, 255, 0.28);
    border-left: 1px solid rgba(209, 237, 255, 0.28);
    transform: translateX(-50%);
}

.oracle-card__frame::before {
    top: -1px;
    border-top: 1px solid rgba(209, 237, 255, 0.28);
    border-radius: 7px 7px 0 0;
}

.oracle-card__frame::after {
    bottom: -1px;
    border-bottom: 1px solid rgba(209, 237, 255, 0.28);
    border-radius: 0 0 7px 7px;
}

.oracle-card__favorite {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 6;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(198, 230, 250, 0.24);
    border-radius: 50%;
    background: rgba(5, 10, 15, 0.78);
    color: var(--text-soft);
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), background 180ms var(--ease-out), color 180ms var(--ease-out);
}

.oracle-card__favorite:hover,
.oracle-card__favorite:active,
.oracle-card__favorite:focus-visible {
    border-color: rgba(255, 173, 188, 0.4);
    background: rgba(26, 15, 21, 0.88);
    color: var(--danger);
    transform: translateY(-1px);
}

.oracle-card__favorite.is-active {
    border-color: rgba(255, 173, 188, 0.45);
    background: rgba(255, 125, 148, 0.14);
    color: var(--danger);
}

.oracle-card__favorite svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.oracle-card__favorite.is-active svg {
    fill: currentColor;
}

.oracle-card__favorite::after {
    position: absolute;
    right: 0;
    bottom: calc(100% + 9px);
    min-width: max-content;
    max-width: 210px;
    padding: 7px 10px;
    content: attr(data-tooltip);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(5, 9, 13, 0.94);
    color: var(--text);
    font-size: 10px;
    font-weight: 560;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 150ms ease, transform 150ms ease;
}

.oracle-card__favorite:hover::after,
.oracle-card__favorite:focus-visible::after,
.oracle-card__favorite:focus::after {
    opacity: 1;
    transform: translateY(0);
}

.oracle-card__number {
    position: absolute;
    top: 25px;
    left: 27px;
    z-index: 5;
    color: rgba(226, 243, 253, 0.72);
    font-family: ui-serif, Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.12em;
}

.oracle-card__caption {
    position: absolute;
    right: 28px;
    bottom: 28px;
    left: 28px;
    z-index: 5;
}

.oracle-card__caption-label {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.oracle-card__caption-title {
    margin: 0;
    color: var(--text);
    font-family: ui-serif, Georgia, serif;
    font-size: clamp(24px, 7vw, 34px);
    font-weight: 500;
    line-height: 1.03;
    letter-spacing: -0.025em;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.56);
}

.oracle-card.art-1 { --art-a: rgba(133, 207, 249, 0.34); --art-b: rgba(68, 119, 152, 0.12); }
.oracle-card.art-2 { --art-a: rgba(174, 225, 255, 0.28); --art-b: rgba(75, 134, 171, 0.1); }
.oracle-card.art-3 { --art-a: rgba(113, 187, 229, 0.34); --art-b: rgba(54, 100, 130, 0.14); }
.oracle-card.art-4 { --art-a: rgba(148, 214, 252, 0.3); --art-b: rgba(52, 113, 151, 0.1); }
.oracle-card.art-5 { --art-a: rgba(193, 232, 255, 0.22); --art-b: rgba(72, 125, 157, 0.09); }
.oracle-card.art-6 { --art-a: rgba(103, 177, 221, 0.36); --art-b: rgba(45, 90, 119, 0.15); }

.card-primary-actions {
    width: min(100%, 470px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 20px;
}

.card-primary-action {
    min-width: 0;
    min-height: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 7px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(10, 15, 21, 0.8);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 620;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), background 180ms var(--ease-out), color 180ms var(--ease-out);
}

.card-primary-action:hover,
.card-primary-action:active,
.card-primary-action.is-active {
    border-color: rgba(167, 219, 251, 0.27);
    background: linear-gradient(150deg, rgba(25, 39, 51, 0.86), rgba(11, 17, 23, 0.92));
    color: var(--accent);
}

.card-primary-action:active {
    transform: scale(0.985);
}

.card-primary-action svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-content-stack {
    width: min(100%, 470px);
}

.card-deep {
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(9, 14, 19, 0.86);
    animation: reveal-panel 260ms var(--ease-out) both;
}

.card-deep--structured {
    padding: 22px;
}

.structured-description {
    color: var(--text-soft);
}

.structured-description__title {
    margin: 0;
    color: var(--text);
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 760;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.structured-description__intro {
    margin-top: 19px;
}

.structured-description__block {
    margin-top: 27px;
}

.structured-description__heading {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.35;
}

.structured-description__paragraph {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.68;
    white-space: normal;
}

.structured-description__paragraph + .structured-description__paragraph {
    margin-top: 13px;
}

.structured-description__questions {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.structured-description__questions li {
    position: relative;
    padding-left: 20px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.58;
}

.structured-description__questions li::before {
    position: absolute;
    top: 0.64em;
    left: 2px;
    width: 5px;
    height: 5px;
    content: "";
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 9px var(--accent-glow);
}

.structured-description__empty {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.ai-panel {
    position: relative;
    margin-top: 15px;
    overflow: hidden;
    padding: 19px;
    border: 1px solid rgba(164, 218, 252, 0.16);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 100% 0, rgba(123, 202, 250, 0.11), transparent 42%),
        rgba(11, 17, 23, 0.86);
    animation: reveal-panel 300ms var(--ease-out) both;
}

.ai-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ai-panel__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-panel__title svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-panel__status {
    color: var(--muted);
    font-size: 9px;
}

.ai-panel__text {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.62;
}

.empty-card-intro {
    position: relative;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-back {
    position: relative;
    width: 184px;
    aspect-ratio: 0.69;
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid rgba(170, 220, 250, 0.24);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 43%, rgba(145, 214, 255, 0.16), transparent 22%),
        linear-gradient(155deg, #17232f, #080d12 58%, #040608);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.56), 0 0 50px rgba(91, 175, 226, 0.07);
    transform: rotate(-3deg);
    animation: card-hover 4s ease-in-out infinite;
}

.card-back::before {
    position: absolute;
    inset: 12px;
    content: "";
    border: 1px solid rgba(190, 229, 253, 0.18);
    border-radius: 17px;
}

.card-back::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76px;
    height: 76px;
    content: "";
    border: 1px solid rgba(190, 229, 253, 0.28);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(125, 204, 251, 0.12), inset 0 0 20px rgba(125, 204, 251, 0.06);
    transform: translate(-50%, -50%);
}

.card-back__star {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent-glow), 0 0 48px rgba(123, 203, 251, 0.3);
    transform: translate(-50%, -50%);
}

.empty-card-intro__title {
    margin-bottom: 9px;
    font-size: 29px;
    font-weight: 580;
    letter-spacing: -0.04em;
}

.empty-card-intro__text {
    max-width: 360px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.58;
}

.layout-selector {
    display: grid;
    gap: 12px;
}

.layout-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.layout-option {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(12, 18, 24, 0.72);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: 180ms var(--ease-out);
}

.layout-option:hover,
.layout-option:active,
.layout-option.is-selected {
    border-color: rgba(164, 218, 252, 0.29);
    background: linear-gradient(155deg, rgba(28, 42, 55, 0.82), rgba(11, 17, 23, 0.9));
    box-shadow: inset 0 0 25px rgba(126, 203, 249, 0.035);
}

.layout-option__count {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    margin-bottom: 17px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--accent);
    font-family: ui-serif, Georgia, serif;
    font-size: 17px;
}

.layout-option__title {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 620;
}

.layout-option__meta {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.layout-start {
    position: sticky;
    bottom: calc(var(--dock-height) + var(--tg-safe-bottom) + 12px);
    z-index: 3;
    margin-top: 18px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(6, 9, 13, 0.82);
    box-shadow: var(--shadow-float);
    backdrop-filter: blur(18px);
}

.layout-result-head {
    margin-bottom: 18px;
    text-align: center;
}

.layout-result-head__title {
    margin-bottom: 7px;
    font-size: 29px;
    font-weight: 570;
    letter-spacing: -0.04em;
}

.layout-result-head__meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.layout-cards {
    display: grid;
    gap: 14px;
}

.layout-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(17, 26, 35, 0.92), rgba(7, 11, 16, 0.97));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.23);
}

.layout-card--closed {
    min-height: 196px;
}

.layout-card__cover {
    position: relative;
    width: 100%;
    min-height: 196px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 0;
    background:
        radial-gradient(circle at 50% 44%, rgba(146, 214, 255, 0.12), transparent 23%),
        linear-gradient(155deg, rgba(23, 34, 45, 0.88), rgba(7, 11, 15, 0.96));
    color: inherit;
    cursor: pointer;
}

.layout-card__cover::before {
    position: absolute;
    inset: 12px;
    content: "";
    border: 1px solid rgba(177, 222, 250, 0.14);
    border-radius: 20px;
    pointer-events: none;
}

.layout-card__position {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-align: center;
    text-transform: uppercase;
}

.layout-card__prompt {
    position: relative;
    z-index: 2;
    margin-top: 29px;
    color: var(--muted);
    font-size: 11px;
}

.layout-card__revealed {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 20px;
    animation: reveal-panel 280ms var(--ease-out) both;
}

.layout-card__thumb {
    position: relative;
    width: 116px;
    aspect-ratio: 0.69;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: linear-gradient(155deg, #182632, #080d12);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.layout-card__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-card__thumb img.is-broken {
    opacity: 0;
}

.layout-card__thumb::after {
    position: absolute;
    inset: 0;
    content: "";
    border-radius: inherit;
    background: linear-gradient(180deg, transparent, rgba(2, 4, 6, 0.26));
    pointer-events: none;
}

.layout-card__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 15px;
}

.layout-card__front-position {
    color: var(--accent);
    font-size: 12px;
    font-weight: 760;
    line-height: 1.35;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.layout-card__details-button {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: rgba(13, 20, 27, 0.84);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
    cursor: pointer;
    transition: 180ms var(--ease-out);
}

.layout-card__details-button:hover,
.layout-card__details-button:active,
.layout-card__details-button.is-active {
    border-color: rgba(164, 218, 252, 0.3);
    background: var(--accent-dim);
    color: var(--accent);
}

.layout-card__details-button svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.layout-card__details {
    padding: 21px;
    border-top: 1px solid var(--line);
    background: rgba(7, 11, 16, 0.76);
    animation: reveal-panel 260ms var(--ease-out) both;
}

.layout-complete {
    margin-top: 17px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(11, 17, 23, 0.78);
    animation: reveal-panel 280ms var(--ease-out) both;
}

.layout-complete__text {
    margin-bottom: 14px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.55;
}

.list-stack {
    display: grid;
    gap: 10px;
}

.list-card {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    min-height: 96px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: rgba(11, 16, 22, 0.76);
    color: var(--text);
    text-align: left;
    transition: 180ms var(--ease-out);
}

.list-card:hover,
.list-card:active {
    border-color: var(--line-strong);
    background: rgba(17, 24, 32, 0.86);
}

.list-card__media {
    position: relative;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 38%, rgba(150, 216, 255, 0.17), transparent 22%),
        linear-gradient(155deg, #182632, #080d12);
}

.list-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-card__content {
    min-width: 0;
}

.list-card__label {
    margin-bottom: 4px;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 590;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-card__text {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.list-card__action {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.list-card__action:hover,
.list-card__action:active {
    background: rgba(255, 157, 172, 0.08);
    color: var(--danger);
}

.history-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(11, 16, 22, 0.76);
}

.history-card__button {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 15px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.history-card__title {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 590;
}

.history-card__meta {
    color: var(--muted);
    font-size: 10px;
}

.history-card__chevron {
    color: var(--muted);
    transition: transform 180ms var(--ease-out);
}

.history-card.is-open .history-card__chevron {
    transform: rotate(180deg);
}

.history-card__details {
    display: none;
    padding: 0 15px 15px;
}

.history-card.is-open .history-card__details {
    display: block;
    animation: reveal-panel 220ms var(--ease-out) both;
}

.history-entry {
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.history-entry__position {
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.history-entry__title {
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 580;
}

.history-entry__text {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

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

.deck-card {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 50% 25%, rgba(135, 207, 249, 0.15), transparent 23%),
        linear-gradient(155deg, #182632, #080d12 62%, #040608);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.deck-card::before {
    position: absolute;
    top: 26px;
    left: 50%;
    width: 72px;
    height: 92px;
    content: "";
    border: 1px solid rgba(183, 225, 251, 0.2);
    border-radius: 14px;
    box-shadow: -13px 7px 0 -1px rgba(10, 16, 22, 0.72), -13px 7px 0 0 rgba(183, 225, 251, 0.1), 13px 7px 0 -1px rgba(10, 16, 22, 0.72), 13px 7px 0 0 rgba(183, 225, 251, 0.1);
    transform: translateX(-50%);
}

.deck-card::after {
    position: absolute;
    top: 67px;
    left: 50%;
    width: 8px;
    height: 8px;
    content: "";
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateX(-50%);
}

.deck-card__premium {
    position: absolute;
    top: 12px;
    right: 12px;
}

.deck-card__title {
    position: relative;
    z-index: 2;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
}

.deck-card__description {
    position: relative;
    z-index: 2;
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stat-card {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 90% 0, rgba(126, 203, 249, 0.08), transparent 42%),
        rgba(11, 17, 23, 0.78);
}

.stat-card--wide {
    grid-column: 1 / -1;
    min-height: 150px;
}

.stat-card__label {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stat-card__value {
    margin: 12px 0 5px;
    color: var(--text);
    font-size: clamp(28px, 8vw, 39px);
    font-weight: 560;
    line-height: 1;
    letter-spacing: -0.045em;
}

.stat-card__meta {
    color: var(--muted);
    font-size: 10px;
}

.stat-progress {
    height: 5px;
    margin-top: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(179, 222, 250, 0.08);
}

.stat-progress span {
    display: block;
    width: var(--progress, 35%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(119, 198, 247, 0.6), var(--accent));
    box-shadow: 0 0 14px var(--accent-glow);
}

.settings-group,
.info-panel,
.form-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(11, 16, 22, 0.76);
}

.settings-group + .settings-group,
.form-card + .form-card,
.info-panel + .info-panel {
    margin-top: 12px;
}

.setting-row {
    min-height: 69px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
}

.setting-row + .setting-row {
    border-top: 1px solid var(--line);
}

.setting-row__title {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 590;
}

.setting-row__text {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.42;
}

.switch {
    position: relative;
    width: 48px;
    height: 29px;
    display: inline-block;
}

.switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.switch__track {
    position: absolute;
    inset: 0;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(40, 48, 58, 0.72);
    transition: 180ms var(--ease-out);
}

.switch__track::before {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    content: "";
    border-radius: 50%;
    background: #d6dee5;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.28);
    transition: 180ms var(--ease-out);
}

.switch input:checked + .switch__track {
    border-color: rgba(151, 215, 253, 0.34);
    background: rgba(99, 180, 229, 0.48);
}

.switch input:checked + .switch__track::before {
    background: var(--text);
    transform: translateX(19px);
}

.form-card {
    padding: 17px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field + .form-field {
    margin-top: 14px;
}

.form-label {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 580;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    min-height: 48px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(5, 9, 13, 0.72);
    color: var(--text);
    font-size: 13px;
    transition: 180ms var(--ease-out);
}

.form-textarea {
    min-height: 124px;
    resize: vertical;
    line-height: 1.5;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #68747e;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: rgba(151, 215, 253, 0.34);
    background: rgba(8, 13, 18, 0.9);
}

.form-hint {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.info-panel {
    padding: 19px;
}

.info-panel--danger {
    border-color: rgba(255, 157, 172, 0.2);
    background: linear-gradient(150deg, rgba(36, 18, 24, 0.58), rgba(11, 16, 22, 0.82));
}

.info-panel--danger .info-panel__title {
    color: var(--danger);
}

.info-panel__title {
    margin-bottom: 9px;
    font-size: 17px;
    font-weight: 590;
}

.info-panel__text {
    margin-bottom: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.63;
}

.info-panel__text + .info-panel__text {
    margin-top: 12px;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    position: relative;
    padding-left: 20px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.52;
}

.info-list li::before {
    position: absolute;
    top: 0.55em;
    left: 2px;
    width: 6px;
    height: 6px;
    content: "";
    border: 1px solid var(--accent);
    transform: rotate(45deg);
}

.support-hero {
    position: relative;
    overflow: hidden;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 83% 17%, rgba(134, 209, 252, 0.17), transparent 24%),
        linear-gradient(150deg, rgba(20, 30, 40, 0.9), rgba(7, 11, 16, 0.96));
}

.support-hero::after {
    position: absolute;
    top: 19px;
    right: 20px;
    width: 70px;
    height: 70px;
    content: "";
    border: 1px solid rgba(181, 225, 252, 0.17);
    border-radius: 50%;
    box-shadow: 0 0 36px rgba(117, 198, 247, 0.09), inset 0 0 20px rgba(117, 198, 247, 0.05);
}

.support-hero__title {
    max-width: 270px;
    margin-bottom: 9px;
    font-size: 27px;
    font-weight: 570;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.support-hero__text {
    max-width: 360px;
    margin-bottom: 20px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.58;
}

.support-hero__link {
    position: relative;
    z-index: 1;
    margin: 16px 0 0;
    color: var(--accent);
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.button-row--support {
    position: relative;
    z-index: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#stars-support .donation-panel {
    transition: border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

#stars-support.is-highlighted .donation-panel {
    border-color: rgba(151, 215, 253, 0.48);
    box-shadow: 0 0 0 4px rgba(126, 203, 249, 0.06), 0 18px 50px rgba(0, 0, 0, 0.24);
}

.donation-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 16% 0, rgba(165, 196, 255, 0.09), transparent 34%),
        linear-gradient(155deg, rgba(16, 23, 32, 0.93), rgba(7, 11, 16, 0.96));
}

.donation-panel__text {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.56;
}

.donation-terms {
    margin-top: 16px;
    border: 1px solid rgba(184, 213, 255, 0.14);
    border-radius: 15px;
    background: rgba(7, 12, 18, 0.54);
}

.donation-terms summary {
    padding: 13px 14px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 620;
    line-height: 1.35;
    cursor: pointer;
}

.donation-terms__content {
    padding: 0 14px 14px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.58;
}

.donation-terms__content p {
    margin: 0 0 10px;
}

.donation-terms__content p:last-child {
    margin-bottom: 0;
}

.donation-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 13px;
    border: 1px solid rgba(184, 213, 255, 0.13);
    border-radius: 14px;
    background: rgba(8, 13, 19, 0.7);
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.5;
    cursor: pointer;
}

.donation-consent input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--accent);
}

.donation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.donation-option {
    min-height: 66px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    padding: 14px 15px;
    border: 1px solid rgba(184, 213, 255, 0.16);
    border-radius: 17px;
    background:
        radial-gradient(circle at 82% 18%, rgba(196, 177, 255, 0.1), transparent 34%),
        rgba(11, 17, 24, 0.82);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.donation-option:hover,
.donation-option:active {
    border-color: rgba(184, 213, 255, 0.32);
    background:
        radial-gradient(circle at 82% 18%, rgba(196, 177, 255, 0.16), transparent 36%),
        rgba(15, 23, 32, 0.92);
}

.donation-option:active {
    transform: scale(0.985);
}

.donation-option__amount {
    font-size: 14px;
    font-weight: 620;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.donation-option__stars {
    color: #c9dcff;
    font-size: 13px;
    font-weight: 570;
    line-height: 1.3;
}

.donation-panel__notice {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.55;
}

.empty-state,
.error-state {
    min-height: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 10px;
    text-align: center;
}

.empty-state__icon,
.error-state__icon {
    position: relative;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin-bottom: 21px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(136, 208, 250, 0.1), rgba(10, 16, 22, 0.7));
    color: var(--accent);
}

.empty-state__icon::after,
.error-state__icon::after {
    position: absolute;
    inset: -8px;
    content: "";
    border: 1px solid rgba(166, 219, 252, 0.05);
    border-radius: 50%;
}

.empty-state__icon svg,
.error-state__icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.empty-state__title,
.error-state__title {
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 580;
    letter-spacing: -0.03em;
}

.empty-state__text,
.error-state__text {
    max-width: 340px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(173, 219, 247, 0.07);
}

.skeleton::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(100deg, transparent 15%, rgba(203, 235, 254, 0.07) 45%, transparent 75%);
    transform: translateX(-100%);
    animation: shimmer 1.4s infinite;
}

.skeleton-page {
    display: grid;
    gap: 13px;
}

.skeleton-line {
    height: 15px;
}

.skeleton-line--title {
    width: 62%;
    height: 35px;
}

.skeleton-line--short {
    width: 44%;
}

.skeleton-block {
    height: 190px;
    border-radius: var(--radius-lg);
}

.skeleton-list {
    display: grid;
    gap: 10px;
}

.skeleton-list .skeleton {
    height: 95px;
    border-radius: 19px;
}

.bottom-dock {
    position: absolute;
    right: calc(12px + var(--tg-safe-right));
    bottom: calc(9px + var(--tg-safe-bottom));
    left: calc(12px + var(--tg-safe-left));
    z-index: 30;
    height: var(--dock-height);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    padding: 7px 6px 8px;
    border: 1px solid rgba(177, 222, 250, 0.12);
    border-radius: 27px;
    background: rgba(8, 12, 17, 0.84);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(22px) saturate(1.25);
}

.dock-item {
    min-width: 0;
    height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 2px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #75818c;
    cursor: pointer;
    transition: 180ms var(--ease-out);
}

.dock-item:hover,
.dock-item:active,
.dock-item.is-active {
    color: var(--accent);
}

.dock-item.is-active {
    background: linear-gradient(180deg, rgba(139, 210, 251, 0.07), rgba(139, 210, 251, 0.015));
}

.dock-item__icon {
    height: 23px;
    display: grid;
    place-items: center;
}

.dock-item__icon svg {
    width: 21px;
    height: 21px;
}

.dock-item__label {
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
    font-weight: 570;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dock-draw {
    position: relative;
    height: 69px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #071018;
    cursor: pointer;
}

.dock-draw::before {
    position: absolute;
    top: -17px;
    left: 50%;
    z-index: 1;
    width: 55px;
    height: 55px;
    content: "";
    border: 1px solid rgba(232, 238, 255, 0.7);
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95) 0 7%, rgba(255, 255, 255, 0.2) 15%, transparent 27%),
        radial-gradient(circle at 72% 76%, rgba(189, 167, 255, 0.54), transparent 47%),
        linear-gradient(145deg, #dceeff 0%, #b9d5ff 45%, #c8baff 100%);
    box-shadow:
        0 10px 28px rgba(120, 173, 238, 0.24),
        0 0 24px rgba(181, 153, 255, 0.16),
        inset 0 1px 2px rgba(255, 255, 255, 0.82),
        inset 0 -8px 16px rgba(123, 120, 219, 0.12);
    filter: saturate(0.9);
    transform: translateX(-50%);
    transition: 190ms var(--ease-spring);
    animation: magic-orb-glow 5.2s ease-in-out infinite;
}

.dock-draw::after {
    position: absolute;
    top: -14px;
    left: 50%;
    z-index: 1;
    width: 49px;
    height: 49px;
    content: "";
    pointer-events: none;
    border-radius: 50%;
    background: conic-gradient(
        from 12deg,
        transparent 0 18%,
        rgba(255, 255, 255, 0.16) 23%,
        transparent 30% 64%,
        rgba(170, 225, 255, 0.13) 70%,
        transparent 78% 100%
    );
    mix-blend-mode: screen;
    transform: translateX(-50%);
    animation: magic-orb-shimmer 8s linear infinite;
}

.dock-draw:hover::before,
.dock-draw:active::before {
    transform: translateX(-50%) scale(1.04);
    box-shadow:
        0 12px 31px rgba(120, 173, 238, 0.3),
        0 0 28px rgba(181, 153, 255, 0.21),
        inset 0 1px 2px rgba(255, 255, 255, 0.84),
        inset 0 -8px 16px rgba(123, 120, 219, 0.14);
}

.dock-draw:active::before {
    transform: translateX(-50%) scale(0.97);
}

.dock-draw__halo {
    position: absolute;
    top: -25px;
    left: 50%;
    width: 71px;
    height: 71px;
    border: 1px solid rgba(185, 193, 255, 0.13);
    border-radius: 50%;
    box-shadow:
        0 0 24px rgba(156, 183, 255, 0.08),
        inset 0 0 18px rgba(193, 164, 255, 0.05);
    transform: translateX(-50%);
    animation: halo-pulse 3.6s ease-in-out infinite;
}

.dock-draw__icon {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    transform: translateX(-50%);
}

.dock-draw__icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.55;
}

.dock-draw__label {
    position: absolute;
    bottom: 4px;
    left: 50%;
    color: var(--accent);
    font-size: 9px;
    font-weight: 620;
    transform: translateX(-50%);
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 2, 4, 0.67);
    backdrop-filter: blur(6px);
    animation: backdrop-in 220ms ease both;
}

.bottom-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: min(100%, 620px);
    max-height: calc(var(--app-height) - 32px - var(--tg-safe-top));
    margin: 0 auto;
    overflow: hidden;
    padding: 9px calc(18px + var(--tg-safe-right)) calc(22px + var(--tg-safe-bottom)) calc(18px + var(--tg-safe-left));
    border: 1px solid rgba(180, 224, 251, 0.14);
    border-bottom: 0;
    border-radius: 30px 30px 0 0;
    background:
        radial-gradient(circle at 80% 0, rgba(104, 186, 235, 0.09), transparent 32%),
        rgba(8, 12, 17, 0.97);
    box-shadow: 0 -28px 78px rgba(0, 0, 0, 0.58), inset 0 1px rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(28px);
    animation: sheet-up 360ms var(--ease-out) both;
}

.bottom-sheet.is-closing {
    animation: sheet-down 240ms ease-in both;
}

.sheet-backdrop.is-closing {
    animation: backdrop-out 220ms ease-in both;
}

.bottom-sheet__handle {
    width: 38px;
    height: 4px;
    margin: 0 auto 19px;
    border-radius: 999px;
    background: rgba(200, 231, 250, 0.2);
}

.bottom-sheet__content {
    max-height: calc(var(--app-height) - 80px - var(--tg-safe-top) - var(--tg-safe-bottom));
    overflow-y: auto;
    scrollbar-width: none;
}

.bottom-sheet__content::-webkit-scrollbar {
    display: none;
}

.sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.sheet-head__title {
    margin-bottom: 5px;
    font-size: 25px;
    font-weight: 580;
    letter-spacing: -0.04em;
}

.sheet-head__text {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.menu-card {
    position: relative;
    min-height: 116px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: rgba(14, 20, 27, 0.72);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: 180ms var(--ease-out);
}

.menu-card::after {
    position: absolute;
    top: -28px;
    right: -30px;
    width: 88px;
    height: 88px;
    content: "";
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 201, 249, 0.08), transparent 68%);
}

.menu-card:hover,
.menu-card:active {
    border-color: var(--line-strong);
    background: rgba(20, 29, 38, 0.84);
    transform: translateY(-2px);
}

.menu-card__icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--accent-dim);
    color: var(--accent);
}

.menu-card__label {
    margin-top: 14px;
    font-size: 13px;
    font-weight: 590;
}

.menu-card__meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.menu-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: #687580;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.menu-footer::before,
.menu-footer::after {
    width: 32px;
    height: 1px;
    content: "";
    background: var(--line);
}

.toast-stack {
    position: fixed;
    right: calc(16px + var(--tg-safe-right));
    bottom: calc(var(--dock-height) + var(--tg-safe-bottom) + 26px);
    left: calc(16px + var(--tg-safe-left));
    z-index: 150;
    width: min(calc(100% - 32px), 520px);
    margin: 0 auto;
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.toast {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(13, 19, 26, 0.95);
    box-shadow: var(--shadow-float);
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.4;
    backdrop-filter: blur(18px);
    animation: toast-in 260ms var(--ease-out) both;
}

.toast.is-leaving {
    animation: toast-out 220ms ease-in both;
}

.toast__icon {
    width: 25px;
    height: 25px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
}

.toast--success .toast__icon {
    background: rgba(155, 225, 194, 0.09);
    color: var(--success);
}

.toast--error .toast__icon {
    background: rgba(255, 157, 172, 0.09);
    color: var(--danger);
}

.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background:
        radial-gradient(circle at 50% 42%, rgba(102, 189, 241, 0.12), transparent 26%),
        #05070a;
    transition: opacity 360ms ease, visibility 360ms ease;
}

.boot-screen.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.boot-screen__symbol {
    position: relative;
    width: 72px;
    height: 80px;
    margin-bottom: 25px;
}

.boot-screen__symbol span {
    position: absolute;
    top: 8px;
    left: 22px;
    width: 40px;
    height: 58px;
    border: 1px solid rgba(188, 227, 251, 0.34);
    border-radius: 12px;
    background: linear-gradient(155deg, rgba(153, 215, 252, 0.08), rgba(7, 11, 15, 0.9));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), inset 0 0 25px rgba(137, 207, 249, 0.04);
}

.boot-screen__symbol span:nth-child(1) {
    transform: translateX(-15px) rotate(-14deg);
}

.boot-screen__symbol span:nth-child(2) {
    z-index: 2;
    border-color: rgba(188, 227, 251, 0.66);
    transform: translateY(-3px);
    box-shadow: 0 0 34px rgba(105, 192, 244, 0.1), 0 18px 42px rgba(0, 0, 0, 0.38);
}

.boot-screen__symbol span:nth-child(3) {
    transform: translateX(15px) rotate(14deg);
}

.boot-screen__name {
    margin-bottom: 27px;
    color: transparent;
    font-family: "Playfair Display", "Times New Roman", Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.055em;
    background: linear-gradient(105deg, #8b672d, #f0cf82, #7dc7ee, #f6dfa1, #609fc8, #d8aa52);
    background-size: 280% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 28px rgba(102, 175, 220, 0.16), 0 0 20px rgba(218, 171, 78, 0.11);
    animation: reflecta-shimmer 7s linear infinite;
}

.boot-screen__line {
    width: 112px;
    height: 2px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(169, 218, 248, 0.08);
}

.boot-screen__line span {
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: boot-line 1.1s ease-in-out infinite;
}

.noscript {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: grid;
    place-items: center;
    padding: 30px;
    background: var(--bg);
    color: var(--text);
    text-align: center;
}

.loading-ring {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(12, 24, 32, 0.22);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.inline-loader {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: var(--accent);
}

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

@keyframes page-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-panel {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ambient-float {
    from { transform: translate3d(-2%, -2%, 0) scale(0.96); }
    to { transform: translate3d(3%, 4%, 0) scale(1.04); }
}

@keyframes moon-breathe {
    0%, 100% { transform: translateX(-50%) scale(0.96); opacity: 0.82; }
    50% { transform: translateX(-50%) scale(1.03); opacity: 1; }
}

@keyframes card-hover {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
}

@keyframes halo-pulse {
    0%, 100% { transform: translateX(-50%) scale(0.92); opacity: 0.3; }
    50% { transform: translateX(-50%) scale(1.06); opacity: 0.62; }
}

@keyframes magic-orb-glow {
    0%, 100% {
        filter: saturate(0.86) brightness(0.98);
        background-position: 0% 50%;
    }
    50% {
        filter: saturate(1) brightness(1.04);
        background-position: 100% 50%;
    }
}

@keyframes magic-orb-shimmer {
    to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes reflecta-shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 280% 50%; }
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

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

@keyframes sheet-up {
    from { transform: translateY(104%); }
    to { transform: translateY(0); }
}

@keyframes sheet-down {
    from { transform: translateY(0); }
    to { transform: translateY(104%); }
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes backdrop-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(8px); }
}

@keyframes boot-line {
    from { transform: translateX(-120%); }
    to { transform: translateX(270%); }
}

@media (min-width: 560px) {
    .viewport {
        padding-right: calc(24px + var(--tg-safe-right));
        padding-left: calc(24px + var(--tg-safe-left));
    }

    .topbar {
        padding-right: calc(24px + var(--tg-safe-right));
        padding-left: calc(24px + var(--tg-safe-left));
    }

    .home-hero {
        min-height: 430px;
        padding: 31px;
    }

    .quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .quick-card {
        min-height: 154px;
    }

    .layout-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .deck-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-card--wide {
        grid-column: span 2;
    }
}

@media (max-width: 370px) {
    :root {
        --topbar-height: 64px;
    }

    .viewport {
        padding-right: calc(13px + var(--tg-safe-right));
        padding-left: calc(13px + var(--tg-safe-left));
    }

    .topbar {
        padding-right: calc(14px + var(--tg-safe-right));
        padding-left: calc(14px + var(--tg-safe-left));
    }

    .brand__name {
        font-size: 17px;
    }

    .bottom-dock {
        right: calc(7px + var(--tg-safe-right));
        left: calc(7px + var(--tg-safe-left));
    }

    .dock-item__label,
    .dock-draw__label {
        font-size: 8px;
    }

    .home-hero {
        min-height: 390px;
        padding: 20px;
        border-radius: 29px;
    }

    .home-hero__visual {
        transform: scale(0.86);
        transform-origin: top center;
    }

    .home-hero__title {
        font-size: 31px;
    }

    .button-row {
        grid-template-columns: 1fr;
    }

    .card-primary-actions {
        gap: 7px;
    }

    .card-primary-action {
        min-height: 66px;
        padding: 9px 5px;
        font-size: 9px;
    }

    .card-deep--structured,
    .layout-card__details {
        padding: 18px;
    }

    .layout-card__revealed {
        grid-template-columns: 91px minmax(0, 1fr);
        gap: 13px;
        padding: 16px;
    }

    .layout-card__thumb {
        width: 91px;
        border-radius: 15px;
    }

    .layout-card__details-button {
        width: 100%;
        padding-right: 10px;
        padding-left: 10px;
    }

    .menu-grid {
        gap: 8px;
    }
}

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