.native-offline {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(1.25rem + var(--immersi-safe-top, env(safe-area-inset-top, 0px)))
    calc(1.25rem + var(--immersi-safe-right, env(safe-area-inset-right, 0px)))
    calc(1.25rem + var(--immersi-safe-bottom, env(safe-area-inset-bottom, 0px)))
    calc(1.25rem + var(--immersi-safe-left, env(safe-area-inset-left, 0px)));
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.12), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(167, 139, 250, 0.14), transparent 40%),
    var(--color-bg, #0b1220);
  color: var(--color-text, #e5e7eb);
}

.native-offline__card {
  width: min(100%, 34rem);
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.45);
  padding: 1.35rem 1.25rem 1.5rem;
}

.native-offline__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.native-offline__logo {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.55);
}

.native-offline__title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.native-offline__headline {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.native-offline__text {
  margin: 0 0 1rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.88);
}

.native-offline__retry {
  width: 100%;
}

.native-offline__cache {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.native-offline__cache-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.native-offline__news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.native-offline__news-item h3 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
}

.native-offline__news-item p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.native-offline__cache-empty {
  margin: 1.1rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.95);
}

.native-offline__scene {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.native-offline__scene-meta {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.95);
}

.native-offline__scene-narrative {
  margin: 0;
  max-height: min(42vh, 18rem);
  overflow-y: auto;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.45);
  white-space: pre-wrap;
  -webkit-overflow-scrolling: touch;
}

.native-offline__scene-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.9);
}
/* literata-cyrillic-ext-400-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(data:font/woff2;base64,d09GMgABAAAAAA8QABIAAAAAHEwAAA6tAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGigbhhYcNAZgP1NUQVRQAIFUEQgKoQiZSQtAAAE2AiQDegQgBYUGB4ItDAcXJBh6GxIXo6KaFTHFXyxwTtQyHvMmk2ivMeQ3K9iCEq/hRix36hcs8AKewsUVPP8t3933Zna2zW5qryqBblsTHlWaR2JUJESoOJA5GPPnH7f1KQMsoo0Jis10VrEBRjQqRuFDsK4KLzHrIpPLaB6qsde3dxtG9VUkCp2JUOTCJVCoqoFcoyozdezK4+sUwc2/bvnT+v9QRzQnIlsnoDr1HVDR6aa+/TZYk9YRDSeI6plG+h9gleBfa6929wOAK7JQ6KoydVVq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igAAo94qiVd3DKTW1nFYNV8tg0AiHVqkDGTNoxLADc1woU6A6Qw0Pcn36oJn9vkfNuBt/JZAxHpyfdyw4ISM1umS4lEq9FuppOTRk1LARU5qd00g5VmpwTOgqVR6lRMhXaKdUUQ1+fEj39BJQKnnttYqJPb5u1EenA8oVVyqbMjr548GetFvoQr9eW/sQBDc9Q+3+BJ55e0EQK4E4CSWSWBJJxUsmuRRJcVCDFvRgBDNYTFQFJ7jB60YP1MpGpbH2cqXnUiDi2PwsqDfQj5E5KMuDynMwr0cWkCPXnkBvm58F8wb6Mw2oFlVORFQrZg2UIDSHeh4OmcN8oOJQq1GK/5uO9kM6faed2P9Zz4kL4EbJ1/+8ett11q/f70gaAGHlRn8q7lbQHU3jSoQjBkXHui3nsl7+juVcqoyAaVAAq94yInotei37QQOEZRr4BQAAAA==) format('woff2'), url(/assets/literata-cyrillic-ext-400-normal-BuNkiaAX.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* literata-cyrillic-400-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/literata-cyrillic-400-normal-CNCMA2GQ.woff2) format('woff2'), url(/assets/literata-cyrillic-400-normal-BZoHpSD9.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* literata-greek-ext-400-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/literata-greek-ext-400-normal-wlSmuZ9Y.woff2) format('woff2'), url(/assets/literata-greek-ext-400-normal-jenpRSxk.woff) format('woff');
  unicode-range: U+1F00-1FFF;
}

/* literata-greek-400-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/literata-greek-400-normal-DLCf-Z3g.woff2) format('woff2'), url(/assets/literata-greek-400-normal-CMPfP1Pr.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* literata-vietnamese-400-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/literata-vietnamese-400-normal-H9pSqQsV.woff2) format('woff2'), url(/assets/literata-vietnamese-400-normal-BvhrDK3U.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* literata-latin-ext-400-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/literata-latin-ext-400-normal-D5BsCrMl.woff2) format('woff2'), url(/assets/literata-latin-ext-400-normal-Cs2-p-8d.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* literata-latin-400-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/literata-latin-400-normal-CLtNJ872.woff2) format('woff2'), url(/assets/literata-latin-400-normal-CUhpYSl8.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* literata-cyrillic-ext-500-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(data:font/woff2;base64,d09GMgABAAAAAA9EABIAAAAAHHQAAA7jAAEAAAAAAAAAAAAA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aW7pOWGts1o95wELtyfynvzVt6jmjkhlaGrT9t4CG9QJc+9EzAH5+VTW1/yUpuRUaWjZB8DASV0rIjyFA3Ioz4wsknyPNL/w6ei60MKt1axQwvH0XWGq0/MEGs0AQKY3jXdoJ+kYGmxILVuYy01syv1aDms1UeQY1ff+bzI5NnLlUTgPwyeVrxsYX7Y6AMMsszVrY7knJ1ozyZTiiAus+CwOTF2aGKC+NDGZes9rzjUuYN8BWa/MGmmli3kgb5eSNRmXLHYNkqwJhwb1yY/9gHglMxqY091Ckr66MQ1o0cWgWz82hUZ0KqVq5JwJfLZTJGPurkqsKq2vUSjAZsdJ2eTRJ8tC91pwcqQQRulddLrEidl0uFZzAU3MmQc2FjR62hLBGdOhUNkmpNu3akJgTBn3oFs2EIqlpabyubmpUA7YYbJRhYeh91fTUEHrFcszabUu35mgG1viHbuTgVEwtXNGsRat+nCdnUSGEhhaKmMXTqjUkwjSG6bE+IFUoq408HtaiMNChhWQnkoFUJ7N6lFOruHg8BEPHGtSqVJ8e4TQPFaGx2To5zBNvs5/fWjrrGc93JjBgu8RoEA7CQ36QPxQABUIEiAiRIDJEgYIgatCCHoxgBivYsMEJbvACHmi89C94lvK/97Y6TZQe8Tw6lzFGr3MZY4yIyxptMkZbYtzWaH2kR+cyxehRH1tujIQiW1K3ya33QqLGqLFDNKYoguOyx12l/tE66AdsP9Nu6P+o4SaJ0aBf/6fNO+CC9/884+8BBBecGVbiwZbcV32XepnwmAeee0fRNTPlfddFMRUcHOmaCkzR/GDhZIysDhVls+/gPQA=) format('woff2'), url(/assets/literata-cyrillic-ext-500-normal-DsnNTbEs.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* literata-cyrillic-500-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/literata-cyrillic-500-normal-DQDv4C2e.woff2) format('woff2'), url(/assets/literata-cyrillic-500-normal-DmI56pSQ.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* literata-greek-ext-500-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/literata-greek-ext-500-normal-Ch423SOo.woff2) format('woff2'), url(/assets/literata-greek-ext-500-normal-DAV_uEdg.woff) format('woff');
  unicode-range: U+1F00-1FFF;
}

/* literata-greek-500-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/literata-greek-500-normal-BOHfHuzs.woff2) format('woff2'), url(/assets/literata-greek-500-normal-BiJAGmr4.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* literata-vietnamese-500-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/literata-vietnamese-500-normal-BO6VJZmq.woff2) format('woff2'), url(/assets/literata-vietnamese-500-normal-oKjKEVoT.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* literata-latin-ext-500-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/literata-latin-ext-500-normal-Dc3nnk63.woff2) format('woff2'), url(/assets/literata-latin-ext-500-normal-8xky3JuA.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* literata-latin-500-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/literata-latin-500-normal-Dbph1WrK.woff2) format('woff2'), url(/assets/literata-latin-500-normal-B-T_MU67.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* literata-cyrillic-ext-600-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(data:font/woff2;base64,d09GMgABAAAAAA88ABIAAAAAHIgAAA7cAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGigbhhYcNAZgP1NUQVRMAIFUEQgKoRyZSAtAAAE2AiQDegQgBYU0B4ItDAcXJBh6GzsXsxFVNzirQEn+ywTbmP6T1QVYiaTUjGKlgY0FBGhU23S0o1lrbPqwxrt1HtOvim+m65Z/cs74/Pt3Znev+CHfr0DvhaxAVjkpxTqVO7KCWrAjKhJkQ9bs3dKKRqFQqgjVXC9CEQ8KSRe2Go3QGIEq/ztA2+zMBI4SRDI3UOI8DgQDOzEaq18X1bpo/TcWDats3n0GwP/NlX9ansmWs4Csqg6ECRRQnerzdbs2sQuAx6gQBtdVSjrZD24F8P9/c6XNXzpkVwRhAS2QrlFzM0s/WaJcjiA5YHj+1pdIuGYLAKoszNWWhaurq1C+QtZVSNX9/TQDWG7QV/pBc4gxxNGJHV+3VmsQ4PJNBYUkoLtIoZwUKgR+KMDWqh81vzhqEvK3N61eivz91fOWIP9k1trlyKcAuKH0Ot5dvRwmRHIoVo1sHRgiLwpYSkItU2qOcwOb/O7/x7EpCNk8Czs2Zm7Ej+jij127/ttrFqZ9h8ZPKfj/FqZBDX/iM37bL1+9+dNC+KDk0/B/KGWKn87nB+vu4JPuTGMkQqSnTz5QH2Sw5I/wo+93ZzCeaksu//ENOF85+Hus3jIfkgH9FiRfFluOArGV8sg1YDE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QT3sgyG+Z7uhS5dO6NmtSyek2u1DJPVpfU8jpPpTrZESf7oDz9pet3Ze8z/Ysa1gq190gf9Pfcm5OA1+/6fk24GL3vz+6rIWQF4pHngQD++5Bx5fiUYcHatYqB+zX9ebPtBdcreVoF1FQLeAYfvqlG2uis2VHuCV+voG) format('woff2'), url(/assets/literata-cyrillic-ext-600-normal-DMpAXN3v.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* literata-cyrillic-600-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/literata-cyrillic-600-normal-CJ4BZrBr.woff2) format('woff2'), url(/assets/literata-cyrillic-600-normal-CFZV0quP.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* literata-greek-ext-600-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/literata-greek-ext-600-normal-C9Ui0wVq.woff2) format('woff2'), url(/assets/literata-greek-ext-600-normal-dOBTK4hz.woff) format('woff');
  unicode-range: U+1F00-1FFF;
}

/* literata-greek-600-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/literata-greek-600-normal-AXWu-DgS.woff2) format('woff2'), url(/assets/literata-greek-600-normal-yjIuBGCY.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* literata-vietnamese-600-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/literata-vietnamese-600-normal-CKzxoyei.woff2) format('woff2'), url(/assets/literata-vietnamese-600-normal-8qS4Xlwy.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* literata-latin-ext-600-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/literata-latin-ext-600-normal-iLkdh2tW.woff2) format('woff2'), url(/assets/literata-latin-ext-600-normal-DYcsrkT4.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* literata-latin-600-normal */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/literata-latin-600-normal-A9sHopYh.woff2) format('woff2'), url(/assets/literata-latin-600-normal-BFEFPlMO.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}:root {
  color-scheme: dark;

  /* Core palette */
  --token-bg-primary: #0f1115;
  --token-surface-elevated: #151922;
  --token-surface-soft: #1b2230;
  --token-text-primary: #f5f7fa;
  --token-text-secondary: #a9b3c3;
  --token-text-muted: #7e8796;

  /* Accent and states */
  --token-accent-primary: #7c5cff;
  --token-accent-strong: rgb(76 29 149);
  --token-accent-rgb: 124 92 255;
  --token-accent-deep-rgb: 76 29 149;
  --token-success: #56c288;
  --token-warning: #e6b35a;
  --token-error: #e16b6b;

  /* Ornament — тёплое золото летописи; слегка смешивается с accent в CSS */
  --token-ornament-rgb: 219 203 165;
  --token-ornament: rgb(var(--token-ornament-rgb) / 0.32);
  --token-ornament-strong: rgb(var(--token-ornament-rgb) / 0.52);
  --token-ornament-muted: rgb(var(--token-ornament-rgb) / 0.18);
  --token-ornament-silver: rgb(196 200 210 / 0.28);

  /* Border, radii, shadow */
  --token-border-subtle: rgb(255 255 255 / 0.1);
  --token-radius-sm: 10px;
  --token-radius-md: 14px;
  --token-radius-lg: 18px;
  --token-shadow-soft: 0 6px 24px rgb(0 0 0 / 0.18);
  --token-focus-ring: 0 0 0 3px rgb(124 92 255 / 0.4);

  /* Typography */
  --token-font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  --token-font-narrative: "Literata", "Georgia", "Times New Roman", serif;
  --token-text-narrative: #ebe8f4;
  --token-fs-12: 12px;
  --token-fs-14: 14px;
  --token-fs-16: 16px;
  --token-fs-20: 20px;
  --token-fs-28: 28px;
  --token-lh-body: 1.5;
  --token-lh-title: 1.25;

  /* Motion */
  --token-motion-fast: 120ms;
  --token-motion-base: 180ms;
  --token-motion-slow: 240ms;
  --token-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --token-ease-in: cubic-bezier(0.4, 0, 1, 1);
}
:root {
  color-scheme: dark;
  /* Множитель для читаемых зон; выставляется из uiFontScale (профиль). */
  --ui-font-scale: 1;
  --bg-main: var(--token-bg-primary);
  --bg-elevated: var(--token-surface-elevated);
  --bg-muted: var(--token-surface-soft);
  --accent: var(--token-accent-primary);
  --accent-rgb: var(--token-accent-rgb);
  --accent-deep-rgb: var(--token-accent-deep-rgb);
  --accent-soft: rgb(var(--accent-rgb) / 0.18);
  --accent-strong: rgb(var(--accent-rgb) / 0.6);
  --dice-grad-1: #c4b5fd;
  --dice-grad-2: #7c3aed;
  --dice-grad-3: #4c1d95;
  --text-main: var(--token-text-primary);
  --text-muted: var(--token-text-secondary);
  --text-narrative: var(--token-text-narrative);
  --border-subtle: var(--token-border-subtle);
  --radius-lg: var(--token-radius-lg);
  --radius-md: var(--token-radius-md);
  --shadow-soft: var(--token-shadow-soft);
  --transition-fast: var(--token-motion-base);
  --body-background: radial-gradient(circle at top, #141b3b 0, #050816 55%, #02040a 100%);
  --header-background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgb(var(--accent-rgb) / 0.18));
  --drawer-background: linear-gradient(165deg, #0f1430 0%, #080c1c 55%, #050816 100%);
  --home-opening-card-bg: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.11), rgba(5, 8, 22, 0.55));
  --home-quote-bg: linear-gradient(160deg, rgb(var(--accent-rgb) / 0.16), rgba(7, 10, 28, 0.82));
  --home-quote-border: rgb(var(--accent-rgb) / 0.28);
  --ornament: var(--token-ornament);
  --ornament-strong: var(--token-ornament-strong);
  --ornament-muted: var(--token-ornament-muted);
  /* Capacitor Android: --safe-area-inset-* из SystemBars; в браузере — env(). */
  --immersi-safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --immersi-safe-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
  --immersi-safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --immersi-safe-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  background: var(--body-background);
  background-attachment: fixed;
  color: var(--text-main);
  transition: background 0.35s ease-out, color 0.25s ease-out;
}

.app-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(16px + var(--immersi-safe-top)) calc(18px + var(--immersi-safe-right))
    calc(20px + var(--immersi-safe-bottom)) calc(18px + var(--immersi-safe-left));
  gap: 16px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--header-background);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  transition: background 0.35s ease-out;
}

.app-header-theme-swatches {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 7px;
  min-width: 0;
}

.app-header-theme-swatch {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.22);
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: radial-gradient(circle at 32% 28%, rgb(255 255 255 / 0.38), var(--theme-swatch));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}

.app-header-theme-swatch:hover {
  transform: scale(1.08);
  border-color: rgb(255 255 255 / 0.42);
}

.app-header-theme-swatch--active {
  transform: scale(1.12);
  box-shadow:
    0 0 0 2px var(--bg-main),
    0 0 0 4px rgb(var(--accent-rgb) / 0.75);
  border-color: rgb(255 255 255 / 0.5);
}

.app-header-theme-swatch--with-check.app-header-theme-swatch--active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.app-theme-picker {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.app-theme-picker--header {
  display: none;
}

.app-theme-picker-trigger {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}

.app-theme-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  border-radius: 999px;
  border: 1px solid var(--catalog-border, rgba(255, 255, 255, 0.12));
  background: var(--chrome-popover-bg, rgba(5, 8, 22, 0.95));
  padding: 7px 9px;
  box-shadow: var(--catalog-shadow, 0 12px 26px rgba(0, 0, 0, 0.42));
  backdrop-filter: blur(8px);
}

.app-theme-picker-swatches {
  flex: 0 0 auto;
  gap: 7px;
}

.app-theme-picker-swatch {
  width: 20px;
  height: 20px;
}

.app-header-theme-swatches--profile {
  justify-content: flex-start;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 8px;
  padding: 6px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.app-header-theme-swatch--profile {
  width: 24px;
  height: 24px;
}

.app-header-theme-swatch--profile.app-header-theme-swatch--active {
  box-shadow:
    0 0 0 2px var(--bg-main),
    0 0 0 3px rgb(var(--accent-rgb) / 0.75);
}

.app-header-theme-swatch:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.app-header-right--balance {
  width: 42px;
  min-width: 42px;
  flex-shrink: 0;
}

.app-header-onboarding-status {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: flex-end;
  gap: clamp(5px, 1.2vw, 10px);
  line-height: 1;
  min-width: 0;
  max-width: clamp(220px, 52vw, 420px);
}

.app-logo-image {
  display: block;
  height: clamp(24px, 4.2vw, 42px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.45));
}

.app-logo-slogan {
  display: inline-flex;
  align-self: flex-end;
  align-items: flex-end;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  font-style: italic;
  font-size: clamp(16px, 2.55vw, 27px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: rgb(245 245 255 / 0.84);
  white-space: nowrap;
  transform: translateY(-3px);
}

.app-header--session .app-header-theme-swatch {
  width: 18px;
  height: 18px;
}

.app-header--session .app-header-theme-swatches {
  gap: 5px;
}

@media (max-width: 480px) {
  .app-logo {
    max-width: clamp(150px, 44vw, 190px);
  }

  .app-logo-image {
    height: clamp(24px, 7.4vw, 32px);
  }

  .app-header-theme-swatch {
    width: 16px;
    height: 16px;
  }

  .app-header-theme-swatches {
    gap: 4px;
  }

  .app-header-theme-swatches--profile {
    gap: 7px;
  }

  .app-header-theme-swatch--profile {
    width: 22px;
    height: 22px;
  }
}

button.app-logo {
  position: relative;
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.app-logo-news-hint {
  position: absolute;
  top: -1px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 0.95);
  box-shadow: 0 0 0 2px rgba(12, 12, 18, 0.85);
  pointer-events: none;
}

.app-nav-drawer-item-hint-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 0.95);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14) inset;
}

button.app-logo:hover {
  opacity: 0.92;
}

button.app-logo:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.home-opening-card {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--catalog-border, var(--border-subtle));
  background: var(--home-opening-card-bg);
  box-shadow: var(--catalog-shadow, var(--shadow-soft));
  transition: background 0.35s ease-out, border-color 0.35s ease-out, box-shadow 0.35s ease-out;
}

.home-opening-quote {
  position: relative;
  margin: 0.85rem 0 0.1rem;
  padding: 1rem 1rem 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--home-quote-border);
  border-left: 4px solid var(--accent);
  background: var(--home-quote-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px rgba(4, 6, 18, 0.45);
  color: var(--text-narrative);
  transition: background 0.35s ease-out, border-color 0.35s ease-out;
  font-size: clamp(16px, 2.6vw, 19px);
  line-height: 1.72;
  font-family: var(--token-font-narrative);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

.home-opening-quote::before {
  content: "“";
  position: absolute;
  left: 0.55rem;
  top: -0.58rem;
  font-size: 2.55rem;
  line-height: 1;
  color: rgb(var(--accent-rgb) / 0.5);
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
}

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

.home-opening-quote--enter {
  animation: home-opening-quote-enter 0.42s var(--token-ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  .home-opening-quote--enter {
    animation: none;
  }
}

.home-illustration-open {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin-top: 0.8rem;
  padding: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
}

.home-illustration-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  object-fit: contain;
  object-position: center;
  animation: homeIllustrationFadeIn 0.45s var(--token-ease-out) both;
}

@keyframes homeIllustrationFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.app-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 6px;
  gap: 8px;
  max-width: min(100%, calc(100vw - 120px));
}

/* Во время сцены — меньше элементов в шапке; на узком экране не ломаем ряд */
.app-header--session .app-header-right {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
  max-width: min(100%, calc(100vw - 120px));
}

.app-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 8, 22, 0.7);
  color: var(--text-main);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.08s ease-out;
}

.app-menu-toggle:hover {
  background: rgb(var(--accent-rgb) / 0.3);
  border-color: rgb(var(--accent-rgb) / 0.9);
  transform: translateY(-1px);
}

.app-menu-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.app-menu-toggle-bars > span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.app-nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 4, 10, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-out;
  backdrop-filter: blur(4px);
}

.app-nav-drawer-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.app-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(20rem, 88vw);
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border: 0;
  border-left: 1px solid var(--border-subtle);
  background: var(--drawer-background);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
  transition: background 0.35s ease-out;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-nav-drawer--open {
  transform: translateX(0);
}

.app-nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.app-nav-drawer-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.app-nav-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.app-nav-drawer-close:hover {
  background: rgb(var(--accent-rgb) / 0.2);
  border-color: rgb(var(--accent-rgb) / 0.55);
}

.app-nav-drawer-scroll {
  flex: 1;
  overflow: auto;
  padding: 10px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-nav-drawer-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-nav-drawer-item:focus-visible,
.app-nav-drawer-close:focus-visible,
.app-menu-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.42);
}

.app-nav-drawer-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav-drawer-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15) inset;
}

.app-nav-drawer-item--current .app-nav-drawer-item-badge {
  background: rgb(var(--accent-rgb) / 0.55);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12) inset;
}

.app-nav-drawer-item--current .app-nav-drawer-item-hint-dot {
  background: rgb(var(--accent-rgb) / 0.75);
}

.app-bottom-nav {
  display: none;
}

.app-bottom-fab,
.app-bottom-fab-quick {
  display: none;
}

.app-nav-drawer-item:hover:not(:disabled) {
  background: rgb(var(--accent-rgb) / 0.18);
  border-color: rgb(var(--accent-rgb) / 0.45);
}

.app-nav-drawer-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.app-nav-drawer-item--current {
  background: rgb(var(--accent-rgb) / 0.24);
  border-color: rgb(var(--accent-rgb) / 0.55);
  box-shadow: inset 3px 0 0 var(--accent);
}

.app-nav-drawer-item--current:hover:not(:disabled) {
  background: rgb(var(--accent-rgb) / 0.32);
  border-color: rgb(var(--accent-rgb) / 0.65);
}

.app-nav-drawer-block--current {
  border-color: rgb(var(--accent-rgb) / 0.4);
  background: rgb(var(--accent-rgb) / 0.1);
  box-shadow: inset 3px 0 0 var(--accent);
}

.app-nav-drawer-item--danger:hover:not(:disabled) {
  background: rgba(220, 80, 80, 0.18);
  border-color: rgba(255, 120, 120, 0.35);
}

.app-nav-drawer-block {
  padding: 10px 12px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.app-nav-drawer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .app-root {
    padding-bottom: calc(92px + var(--immersi-safe-bottom));
  }

  .app-bottom-nav {
    position: fixed;
    left: max(10px, calc(10px + var(--immersi-safe-left)));
    right: max(10px, calc(10px + var(--immersi-safe-right)));
    bottom: max(10px, calc(10px + var(--immersi-safe-bottom)));
    z-index: 75;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgb(255 255 255 / 0.14);
    background: rgb(4 8 22 / 0.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px rgb(0 0 0 / 0.38);
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out, background 0.2s ease-out;
  }

  .app-bottom-nav--hidden {
    transform: translateY(calc(100% + 14px + var(--immersi-safe-bottom)));
    opacity: 0.01;
    pointer-events: none;
  }

  .app-bottom-nav__item {
    position: relative;
    min-height: 44px;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 12px;
    background: rgb(255 255 255 / 0.03);
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    display: inline-grid;
    grid-template-rows: auto auto;
    align-content: center;
    justify-content: center;
    justify-items: center;
    gap: 2px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
  }

  .app-bottom-nav__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(255 255 255 / 0.92);
  }

  .app-bottom-nav__icon > svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
  }

  .app-bottom-nav__label {
    font-size: 11.5px;
    line-height: 1.1;
    letter-spacing: 0.01em;
  }

  .app-bottom-nav__item--current {
    background: rgb(var(--accent-rgb) / 0.26);
    border-color: rgb(var(--accent-rgb) / 0.65);
    box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.22) inset;
    animation: app-bottom-nav-current-pop 0.2s ease-out;
  }

  .app-bottom-nav__item--current .app-bottom-nav__icon {
    color: rgb(var(--accent-rgb) / 0.95);
  }

  .app-bottom-nav__dot {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgb(var(--accent-rgb) / 0.96);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16) inset;
  }

  .app-bottom-nav__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgb(var(--accent-rgb) / 0.94);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16) inset;
  }

  .app-bottom-fab {
    position: fixed;
    right: max(14px, calc(14px + var(--immersi-safe-right)));
    bottom: calc(78px + var(--immersi-safe-bottom));
    z-index: 76;
    width: 52px;
    height: 52px;
    border: 1px solid rgb(var(--accent-rgb) / 0.72);
    border-radius: 50%;
    background: linear-gradient(165deg, rgb(var(--accent-rgb) / 0.9), rgb(var(--accent-rgb) / 0.72));
    color: #fff;
    font-size: 30px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.45);
    transition: transform 0.2s ease-out, opacity 0.2s ease-out, box-shadow 0.2s ease-out;
  }

  .app-bottom-fab:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 14px 30px rgb(0 0 0 / 0.5);
  }

  .app-bottom-fab--hidden {
    transform: translateY(calc(130% + var(--immersi-safe-bottom)));
    opacity: 0.01;
    pointer-events: none;
  }

  .app-bottom-offline-banner {
    position: fixed;
    left: max(10px, calc(10px + var(--immersi-safe-left)));
    right: max(10px, calc(10px + var(--immersi-safe-right)));
    bottom: calc(86px + var(--immersi-safe-bottom));
    z-index: 74;
    min-height: 40px;
    border: 1px solid rgb(255 120 120 / 0.4);
    border-radius: 12px;
    background: rgb(34 8 12 / 0.92);
    color: rgb(255 235 235 / 0.96);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.35);
  }

  .app-bottom-offline-banner--floating {
    bottom: calc(12px + var(--immersi-safe-bottom));
  }

  .app-bottom-offline-banner__text {
    font-size: 12px;
    line-height: 1.2;
  }

  .app-bottom-offline-banner__retry {
    border: 1px solid rgb(255 190 190 / 0.52);
    background: rgb(255 255 255 / 0.06);
    color: inherit;
    border-radius: 10px;
    min-height: 30px;
    padding: 0 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }

  .app-bottom-online-toast {
    position: fixed;
    left: max(10px, calc(10px + var(--immersi-safe-left)));
    right: max(10px, calc(10px + var(--immersi-safe-right)));
    bottom: calc(86px + var(--immersi-safe-bottom));
    z-index: 74;
    min-height: 36px;
    border: 1px solid rgb(61 220 132 / 0.42);
    border-radius: 12px;
    background: rgb(6 28 16 / 0.92);
    color: rgb(225 255 236 / 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.35);
  }

  .app-bottom-fab-quick {
    position: fixed;
    right: max(14px, calc(14px + var(--immersi-safe-right)));
    bottom: calc(136px + var(--immersi-safe-bottom));
    z-index: 77;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: app-bottom-fab-quick-enter 0.14s ease-out both;
  }

  .app-bottom-fab-quick__item {
    min-width: 112px;
    min-height: 40px;
    border: 1px solid rgb(var(--accent-rgb) / 0.45);
    border-radius: 12px;
    background: rgb(8 14 34 / 0.95);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.36);
    transition: background var(--transition-fast), border-color var(--transition-fast);
  }

  .app-bottom-fab-quick__item:hover {
    background: rgb(var(--accent-rgb) / 0.3);
    border-color: rgb(var(--accent-rgb) / 0.78);
  }
}

@keyframes app-bottom-nav-current-pop {
  from {
    transform: scale(0.97);
  }
  to {
    transform: scale(1);
  }
}

@keyframes app-bottom-fab-quick-enter {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-bottom-nav,
  .app-bottom-fab,
  .app-bottom-fab-quick__item,
  .app-bottom-nav__item,
  .app-bottom-fab-quick {
    transition-duration: 0.01ms !important;
  }

  .app-bottom-nav__item--current {
    animation: none;
  }

  .app-bottom-fab-quick {
    animation: none;
  }
}

.app-nav-drawer-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.app-nav-drawer-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 10px;
  font-size: 14px;
  background: rgba(5, 8, 22, 0.85);
  color: var(--text-main);
  cursor: pointer;
}

.app-nav-drawer-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .app-nav-drawer,
  .app-nav-drawer-backdrop {
    transition-duration: 0.01ms;
  }

  .app-menu-toggle {
    transition-duration: 0.01ms;
  }

  .app-menu-toggle:hover {
    transform: none;
  }
}

.app-main {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1.1fr);
  gap: 16px;
  height: 100%;
}

.app-main--workspace:not(.app-main--game) {
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
}

.app-main--workspace:not(.app-main--game) .side-card:not(.sheets-first-purchase-promo-card),
.app-main--onboarding .side-card:not(.sheets-first-purchase-promo-card),
.app-main--auth .side-card:not(.sheets-first-purchase-promo-card) {
  border-color: var(--catalog-border, var(--border-subtle));
  box-shadow: var(--catalog-shadow, var(--shadow-soft));
  background: var(--catalog-card-bg, radial-gradient(circle at top left, var(--accent-soft), var(--bg-elevated)));
}

.story-panel {
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-muted));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-prose {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story-prose > .story-title,
.story-prose > .story-text,
.story-prose > .story-illustration {
  width: 100%;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.story-title {
  font-size: calc(21px * var(--ui-font-scale));
  font-weight: 600;
  margin: 0 0 4px;
}

.story-speech-controls {
  max-width: 42rem;
  margin: 0 auto 0.65rem;
}

.story-speech-controls__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.story-speech-controls__primary {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  max-width: 100%;
}

.story-speech-controls__btn {
  flex-shrink: 0;
  min-height: 2.1rem;
  padding-inline: 0.85rem;
  font-size: calc(0.9rem * var(--ui-font-scale));
}

.story-speech-controls__btn--stop {
  opacity: 0.92;
}

.story-speech-controls__hint {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: calc(0.82rem * var(--ui-font-scale));
  color: var(--text-muted, rgba(255, 255, 255, 0.62));
  line-height: 1.35;
}

.story-speech-controls__error {
  margin: 0.35rem 0 0;
  font-size: calc(0.85rem * var(--ui-font-scale));
  color: var(--danger, #e57373);
}

.profile-speech-voices {
  display: grid;
  gap: 0.65rem;
}

.profile-speech-voice-group__title {
  margin: 0 0 0.35rem;
  font-size: calc(0.82rem * var(--ui-font-scale));
  color: var(--text-muted, rgba(255, 255, 255, 0.62));
}

.story-text {
  margin: 0;
  color: var(--text-narrative);
  line-height: 1.72;
  font-size: calc(16px * var(--ui-font-scale));
  font-family: var(--token-font-narrative);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.story-text__block {
  display: block;
  margin: 0 0 1.05em;
}

.story-text__block:last-child {
  margin-bottom: 0;
}

.story-generation-indicator {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0 0 0.35rem;
  padding: 0.95rem 1rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  background:
    radial-gradient(circle at 18% 14%, rgb(var(--accent-rgb) / 0.1), transparent 55%),
    rgba(7, 11, 28, 0.75);
}

.story-generation-indicator-title {
  margin: 0;
  font-size: calc(16px * var(--ui-font-scale));
  font-weight: 600;
  color: var(--text-main);
}

.story-generation-indicator-text {
  margin: 0.35rem 0 0;
  font-size: calc(14px * var(--ui-font-scale));
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.story-generation-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  flex-shrink: 0;
}

.story-generation-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.7);
  box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 0.22);
  animation: storyGenerationDotPulse 1.35s ease-in-out infinite;
}

.story-generation-dot--2 {
  animation-delay: 0.18s;
}

.story-generation-dot--3 {
  animation-delay: 0.36s;
}

.story-generation-progress {
  position: relative;
  margin-top: 0.58rem;
  height: 0.24rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgb(var(--accent-rgb) / 0.14);
}

.story-generation-progress-bar {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgb(var(--accent-rgb) / 0.35),
    rgb(var(--accent-rgb) / 0.92),
    rgb(var(--accent-rgb) / 0.35)
  );
  box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.35);
  animation: storyGenerationProgressSweep 1.7s ease-in-out infinite;
}

.story-generation-indicator-hint {
  margin: 0.35rem 0 0;
  font-size: calc(13px * var(--ui-font-scale));
  line-height: 1.4;
  color: rgb(255 255 255 / 0.66);
}

.story-generation-skeleton {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.36rem;
}

.story-generation-line {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.12);
  animation: storyGenerationLineBreathe 4.2s ease-in-out infinite;
}

.story-generation-line--phase-2 {
  animation-delay: 0.18s;
}

.story-generation-line--phase-3 {
  animation-delay: 0.36s;
}

.story-generation-line--long {
  width: 100%;
}

.story-generation-line--mid {
  width: 74%;
}

.story-generation-line--short {
  width: 52%;
}
@keyframes storyGenerationDotPulse {
  0% {
    transform: translateY(0) scale(0.86);
    box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 0.24);
    opacity: 0.5;
  }
  35% {
    transform: translateY(-1px) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(0.86);
    box-shadow: 0 0 0 0.28rem rgb(var(--accent-rgb) / 0);
    opacity: 0.55;
  }
}

@keyframes storyGenerationLineBreathe {
  0% {
    opacity: 0.62;
  }
  50% {
    opacity: 0.82;
  }
  100% {
    opacity: 0.62;
  }
}

@keyframes storyGenerationProgressSweep {
  0% {
    transform: translateX(-105%);
  }
  50% {
    transform: translateX(86%);
  }
  100% {
    transform: translateX(235%);
  }
}

.story-illustration {
  margin: 0 0 0.75rem;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  /* Подложка под letterboxing при object-fit: contain */
  background: rgba(0, 0, 0, 0.22);
}

.story-illustration-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.28s ease-out;
}

.story-illustration-image--visible {
  opacity: 1;
}

/* Пока картинка грузится или не пришла с сервера — статичная подпись, без анимации-«шима». */
.story-illustration-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.story-illustration-pending-note {
  margin: 0 0 0.65rem;
  min-height: 1.2em;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--token-text-secondary);
}

.story-illustration-no-paint-note {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--token-text-secondary);
  background: rgba(120, 160, 255, 0.07);
  border-radius: 6px;
  border-left: 3px solid rgba(120, 160, 255, 0.35);
}

.story-illustration-placeholder--loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  align-items: unset;
  justify-content: unset;
  padding: 0;
  text-align: left;
  background: rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

.story-illustration-placeholder--awaiting-file {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  align-items: unset;
  justify-content: unset;
  padding: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
}

.story-illustration-placeholder-text {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--token-text-secondary);
  max-width: 22rem;
}

.dice-fx-block {
  display: inline-block;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.5);
  background: rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.12);
  transition:
    border-color 0.45s ease,
    background-color 0.45s ease,
    box-shadow 0.45s ease;
}

.dice-fx-block--revealed {
  box-shadow: 0 0 28px rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.22);
}

.dice-fx-block--outcome-critical_fail,
.dice-fx-block--outcome-fail {
  --dice-fx-accent-rgb: 220 72 72;
  --dice-grad-1: #fecaca;
  --dice-grad-2: #dc2626;
  --dice-grad-3: #7f1d1d;
}

.dice-fx-block--outcome-strain {
  --dice-fx-accent-rgb: 232 138 52;
  --dice-grad-1: #fde6c8;
  --dice-grad-2: #ea8c2c;
  --dice-grad-3: #9a4a12;
}

.dice-fx-block--outcome-scrape {
  --dice-fx-accent-rgb: 214 178 62;
  --dice-grad-1: #faf0c4;
  --dice-grad-2: #d4af37;
  --dice-grad-3: #7a6118;
}

.dice-fx-block--outcome-success {
  --dice-fx-accent-rgb: 72 178 104;
  --dice-grad-1: #bbf7d0;
  --dice-grad-2: #22a06b;
  --dice-grad-3: #14532d;
}

.dice-fx-block--outcome-triumph,
.dice-fx-block--outcome-critical_success {
  --dice-fx-accent-rgb: 148 108 220;
  --dice-grad-1: #e9d5ff;
  --dice-grad-2: #9333ea;
  --dice-grad-3: #581c87;
}

.dice-fx-block--coop {
  margin-bottom: 0.75rem;
}

.dice-check-detail,
.story-dice-check-line .dice-check-detail {
  font-size: 0.92em;
  color: var(--text-muted);
}

.story-dice-check-line {
  line-height: 1.45;
}

.dice-check-step {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.94em;
}

.dice-fx-prompt {
  display: block;
  margin: 0 0 10px;
  color: var(--text-main);
  font-weight: 600;
  font-size: calc(16px * var(--ui-font-scale));
}

.dice-fx-continue-note {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: calc(15px * var(--ui-font-scale));
}

.dice-fx-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;
}

.dice-fx-rolling {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 6.5rem;
}

.dice-fx-d20-stage {
  perspective: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 2px;
  overflow: hidden;
}

.dice-fx-d20-spin {
  transform-style: preserve-3d;
  /* Центр вращения — как ось колеса, направленная на зрителя */
  transform-origin: 50% 50%;
  will-change: transform;
}

.dice-fx-d20-spin:not(.dice-fx-d20-spin--slowdown) {
  animation: d20Roll 3.15s linear infinite;
}

.dice-fx-d20-spin--slowdown {
  /* Линейная интерполяция между кадрами: сначала большой угол за короткое время, затем плавное замедление */
  animation: d20RollSlow 7.35s linear forwards;
}

.dice-fx-d20-graphic {
  width: 5.75rem;
  height: 5.75rem;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.dice-fx-d20-labels {
  fill: rgba(255, 255, 255, 0.96);
  font-size: 5.6px;
  font-weight: 800;
  paint-order: stroke fill;
  stroke: rgb(var(--accent-deep-rgb) / 0.78);
  stroke-width: 1.05px;
  letter-spacing: 0.06px;
  pointer-events: none;
}

.dice-fx-result {
  display: inline-block;
  margin: 0;
  color: var(--text-main);
}

.dice-fx-result--spinning {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.25rem;
  padding: 0.38rem 0.75rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.62);
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 42%),
    linear-gradient(
      135deg,
      rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.46),
      rgb(var(--dice-fx-accent-rgb, var(--accent-deep-rgb)) / 0.72)
    );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 10px 24px rgb(var(--dice-fx-accent-rgb, var(--accent-deep-rgb)) / 0.38),
    0 0 22px rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.32);
  text-shadow: 0 1px 7px rgb(var(--dice-fx-accent-rgb, var(--accent-deep-rgb)) / 0.65);
  animation: diceResultPulse 1.05s ease-in-out infinite;
}

.dice-fx-result--revealed {
  font-weight: 600;
  animation: diceOutcomeReveal 0.55s ease-out both;
}

.dice-fx-result--tier-strain {
  color: #f0b46a;
}

.dice-fx-result--tier-scrape {
  color: #e8d06a;
}

.dice-fx-result--tier-fail,
.dice-fx-result--tier-critical_fail {
  color: #f08a8a;
}

.dice-fx-result--tier-success {
  color: #7ddea3;
}

.dice-fx-result--tier-triumph,
.dice-fx-result--tier-critical_success {
  color: #d4b4ff;
}

@keyframes diceOutcomeReveal {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dice-fx-result-label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-main);
  opacity: 0.9;
}

.dice-fx-result-divider {
  line-height: 1;
  transform: translateY(-1px);
  color: var(--text-muted);
}

.dice-fx-result-value {
  min-width: 1.65em;
  text-align: center;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.015em;
  color: #ffffff;
  text-shadow:
    0 0 12px rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.55),
    0 0 28px rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.42);
}

.dice-fx-block--revealed .dice-fx-d20-labels {
  stroke: rgb(var(--dice-fx-accent-rgb, var(--accent-deep-rgb)) / 0.78);
}

@keyframes diceResultPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.05) inset,
      0 10px 24px rgb(var(--dice-fx-accent-rgb, var(--accent-deep-rgb)) / 0.38),
      0 0 22px rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.32);
  }
  50% {
    transform: translateY(-1px) scale(1.03);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 12px 28px rgb(var(--dice-fx-accent-rgb, var(--accent-deep-rgb)) / 0.46),
      0 0 30px rgb(var(--dice-fx-accent-rgb, var(--accent-rgb)) / 0.46);
  }
}

/* Вращение в плоскости экрана (как колесо с осью на зрителя): по часовой = положительный rotateZ */
@keyframes d20RollSlow {
  0% {
    transform: rotateX(14deg) rotateZ(0deg);
    animation-timing-function: linear;
  }
  /* ~78% полного оборота за первую пятую времени — быстрый старт */
  20% {
    transform: rotateX(14deg) rotateZ(700deg);
    animation-timing-function: cubic-bezier(0.12, 0.72, 0.18, 1);
  }
  100% {
    transform: rotateX(14deg) rotateZ(900deg);
  }
}

@keyframes d20Roll {
  0% {
    transform: rotateX(14deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(14deg) rotateZ(360deg);
  }
}

@keyframes d20RollReduced {
  0% {
    transform: rotateX(10deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(10deg) rotateZ(360deg);
  }
}

@keyframes d20RollSlowReduced {
  0% {
    transform: rotateX(10deg) rotateZ(0deg);
    animation-timing-function: linear;
  }
  20% {
    transform: rotateX(10deg) rotateZ(156deg);
    animation-timing-function: cubic-bezier(0.12, 0.72, 0.18, 1);
  }
  100% {
    transform: rotateX(10deg) rotateZ(200deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dice-fx-d20-spin:not(.dice-fx-d20-spin--slowdown) {
    animation: d20RollReduced 7.2s linear infinite;
  }

  .dice-fx-d20-spin--slowdown {
    animation: d20RollSlowReduced 7.5s linear forwards;
  }

  .dice-fx-result--spinning {
    animation: none;
    transform: none;
  }

  .story-generation-dot,
  .story-generation-line,
  .story-generation-progress-bar {
    animation: none;
  }
}

.status-text {
  font-size: calc(15px * var(--ui-font-scale));
  line-height: 1.45;
  color: var(--token-text-secondary);
}

.status-text--pad-xl {
  padding: 2rem;
}

.app-shell-init-placeholder {
  min-height: 3.5rem;
  padding: 2rem;
  box-sizing: border-box;
}

.branded-loading-handoff {
  display: flex;
  align-items: center;
  min-height: calc(1.5em * var(--ui-font-scale, 1));
}

.branded-loading-handoff__text {
  margin: 0;
  width: 100%;
}

.branded-loading-handoff__mark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  opacity: 1;
}

.branded-loading-handoff__quill {
  height: calc(30px * var(--ui-font-scale, 1));
  width: auto;
  max-width: min(6rem, 100%);
  display: block;
  /* PNG с альфой: без mix-blend — перо лежит на реальном фоне карточки/страницы. */
  opacity: 1;
  filter: brightness(1.04) drop-shadow(0 0 8px rgb(255 255 255 / 0.22));
}

@media (prefers-reduced-motion: no-preference) {
  .branded-loading-handoff__mark {
    animation: branded-loading-handoff-soft-in 0.42s ease-out;
  }
}

@keyframes branded-loading-handoff-soft-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.status-text.error {
  color: #ff8080;
}

.side-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  background: radial-gradient(circle at top left, var(--accent-soft), var(--bg-elevated));
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Праздничный блок про бонус к первому пополнению (золото / мята, без «тревожного» красного) */
.sheets-first-purchase-promo {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.16) 0%,
    rgba(52, 211, 153, 0.12) 42%,
    rgba(96, 165, 250, 0.1) 100%
  );
  border: 1px solid rgba(250, 204, 21, 0.32);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.07);
}

.sheets-first-purchase-promo__lead {
  margin: 0 0 6px;
  font-weight: 650;
  font-size: calc(15px * var(--ui-font-scale));
  color: #fde68a;
  letter-spacing: 0.01em;
}

.sheets-first-purchase-promo__body {
  margin: 0;
  font-size: calc(14px * var(--ui-font-scale));
  line-height: 1.45;
  color: var(--text-main);
}

.side-card.sheets-first-purchase-promo-card {
  background: linear-gradient(
    145deg,
    rgba(250, 204, 21, 0.14) 0%,
    rgba(45, 212, 191, 0.1) 38%,
    var(--bg-elevated) 72%
  );
  border-color: rgba(250, 204, 21, 0.35);
  box-shadow: 0 0 32px rgba(250, 204, 21, 0.06);
}

.sheets-first-purchase-promo-card__title {
  color: #fef3c7;
}

.sheets-first-purchase-promo-copy {
  font-size: calc(14px * var(--ui-font-scale));
  line-height: 1.5;
  color: var(--text-main);
}

.sheets-first-purchase-promo-copy__lead {
  margin: 0 0 8px;
  font-weight: 600;
  color: #fde68a;
}

.sheets-first-purchase-promo-copy p:last-child {
  margin: 0;
}

.side-card.muted {
  background: linear-gradient(145deg, var(--bg-muted), var(--bg-main));
}

.side-title {
  font-size: calc(15px * var(--ui-font-scale));
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  margin: 0 0 2px;
  color: var(--text-main);
}

.side-placeholder {
  margin: 0;
  font-size: calc(15px * var(--ui-font-scale));
  line-height: 1.5;
  color: var(--token-text-secondary);
}

.profile-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-page .side-card--mt-lg {
  margin-top: 0;
}

.profile-page__hero {
  margin-bottom: 0.15rem;
}

.profile-page__title {
  margin: 0 0 0.35rem;
  font-size: calc(26px * var(--ui-font-scale));
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-main);
}

.profile-page__lead {
  margin: 0;
  max-width: 40rem;
  font-size: calc(15px * var(--ui-font-scale));
  line-height: 1.55;
  color: var(--text-muted);
}

.profile-kv {
  display: grid;
  gap: 0.5rem;
  margin: 0.35rem 0 0;
}

.profile-kv__row {
  display: grid;
  grid-template-columns: minmax(0, 7.75rem) minmax(0, 1fr);
  gap: 0.35rem 0.85rem;
  align-items: baseline;
}

@media (max-width: 420px) {
  .profile-kv__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.profile-kv__k {
  font-size: calc(11px * var(--ui-font-scale));
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-kv__v {
  margin: 0;
  font-size: calc(15px * var(--ui-font-scale));
  line-height: 1.45;
  color: var(--text-main);
  word-break: break-word;
}

.profile-kv__v--muted {
  color: var(--text-muted);
}

.profile-font-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-font-scale__btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.profile-font-scale__btn:hover {
  color: var(--text-main);
  border-color: rgb(var(--accent-rgb) / 0.22);
  background: rgb(var(--accent-rgb) / 0.06);
}

.profile-font-scale__btn:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / 0.75);
  outline-offset: 2px;
}

.profile-font-scale__btn--active {
  color: var(--text-main);
  border-color: rgb(var(--accent-rgb) / 0.38);
  background: rgb(var(--accent-rgb) / 0.1);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.12);
}

.profile-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(7, 11, 28, 0.45);
}

.profile-toc__sep {
  color: rgb(255 255 255 / 0.18);
  font-size: calc(11px * var(--ui-font-scale));
  user-select: none;
}

.profile-toc__link {
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.profile-toc__link:hover {
  color: var(--text-main);
  border-bottom-color: rgb(var(--accent-rgb) / 0.45);
}

.profile-toc__link:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / 0.75);
  outline-offset: 3px;
  border-radius: 4px;
}

.profile-anchor-target {
  scroll-margin-top: 1.1rem;
}

.profile-account-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.profile-details {
  border: 0;
  padding: 0;
  margin: 0;
}

.profile-details__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: calc(15px * var(--ui-font-scale));
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-main);
  padding: 0 0 0.35rem;
  user-select: none;
}

.profile-details__summary-main {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-details__hint {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.92em;
}

.profile-details__summary-main .profile-details__hint {
  margin-inline-start: 0.35em;
}

.profile-details__summary::-webkit-details-marker {
  display: none;
}

.profile-details__summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: auto;
  border-right: 2px solid rgb(255 255 255 / 0.35);
  border-bottom: 2px solid rgb(255 255 255 / 0.35);
  transform: rotate(45deg);
  translate: 0 -0.12rem;
  transition: transform var(--transition-fast);
}

.profile-details[open] > .profile-details__summary::after {
  transform: rotate(225deg);
  translate: 0 0.08rem;
}

.profile-details__body {
  padding-top: 0.35rem;
}

.profile-details--in-card {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-subtle);
}

.profile-details--in-card > .profile-details__summary {
  padding-top: 0.1rem;
}

.profile-account-meta {
  margin-top: 0.15rem;
}

.profile-security-wrap,
.profile-support-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-margin-top: 1.1rem;
}

.profile-section__header {
  margin-bottom: 0;
}

.profile-section__title {
  margin-bottom: 0;
}

.profile-section__meta {
  margin-top: 0.25rem;
  font-size: calc(13px * var(--ui-font-scale));
}

.profile-section__collapsed-hint {
  margin: 0.35rem 0 0;
}

.profile-section__body {
  margin-top: 0.65rem;
}

.profile-section__collapse.collapsible-reveal--open .profile-section__body {
  margin-top: 0.65rem;
}

.profile-section--in-wrap {
  margin-top: 0;
}

.profile-section__nested-card {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

/* Android APK: хаб профиля */
.profile-page--native-hub {
  gap: 0.75rem;
}

.profile-hub-summary {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-hub-summary__name {
  margin: 0;
  font-size: calc(18px * var(--ui-font-scale));
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
}

.profile-hub-summary__email {
  margin: 0;
  font-size: calc(14px * var(--ui-font-scale));
  line-height: 1.4;
  color: var(--text-muted);
  word-break: break-word;
}

.profile-hub-summary__sheets {
  margin-top: 0.15rem;
}

.profile-hub-summary__sheets-count {
  font-size: calc(15px * var(--ui-font-scale));
  font-weight: 600;
  color: var(--text-main);
}

.profile-hub-summary__stats {
  margin-top: 0.15rem;
}

.profile-hub-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html.platform-android .profile-page--native-hub .profile-hub-grid {
  display: flex;
  flex-direction: column;
}

html.platform-android .profile-page--native-hub .sheets-first-purchase-promo-card {
  order: 0;
}

html.platform-android .profile-page--native-hub #profile-billing {
  order: 1;
}

html.platform-android .profile-page--native-hub #profile-account {
  order: 2;
}

html.platform-android .profile-page--native-hub #profile-support {
  order: 3;
}

html.platform-android .profile-page--native-hub #profile-appearance {
  order: 4;
}

html.platform-android .profile-page--native-hub #profile-security {
  order: 5;
}

html.platform-android .profile-page--native-hub #profile-moments {
  order: 6;
}

.profile-section--hub-trigger {
  border: none;
  margin: 0;
  padding: 0;
}

.profile-section__summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
}

.profile-section__subtitle {
  font-size: calc(12px * var(--ui-font-scale));
  line-height: 1.35;
  color: var(--text-muted);
  font-weight: 400;
}

.profile-section__body--overlay {
  margin-top: 0;
}

html.platform-android .profile-page--native-hub .profile-section--hub-trigger .profile-section__summary {
  display: flex;
  min-height: 52px;
}

html.platform-android .profile-page--native-hub .profile-section__title {
  margin: 0;
}

.profile-native-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
}

.profile-native-screen__panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  padding-top: var(--immersi-safe-top);
}

.profile-native-screen__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.profile-native-screen__back {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.04);
  color: var(--text-main);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.profile-native-screen__title {
  flex: 1 1 auto;
  margin: 0;
}

.profile-native-screen__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px calc(14px + var(--immersi-safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.profile-native-screen__body .profile-section__body--overlay {
  padding: 0;
}

.portrait-row {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 2px rgba(219, 203, 165, 0.3),
    inset 0 0 0 5px rgba(18, 20, 34, 0.36);
}

.portrait-frame--variant-default::after {
  box-shadow:
    inset 0 0 0 2px rgba(219, 203, 165, 0.3),
    inset 0 0 0 5px rgba(18, 20, 34, 0.36);
}

.portrait-frame--variant-rare::after {
  box-shadow:
    inset 0 0 0 2px rgba(137, 191, 255, 0.48),
    inset 0 0 0 5px rgba(19, 32, 58, 0.42);
}

.portrait-frame-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.15) contrast(1.08);
}

.app-main--workspace:not(.app-main--game) .portrait-frame-image,
.game-list-illustration-thumb__img,
.home-illustration-image {
  filter: saturate(0.58) contrast(1.04);
}

.app-main--game .portrait-frame-image {
  filter: saturate(0.15) contrast(1.08);
}

.portrait-frame-image--reveal {
  animation: portraitReveal 0.42s ease-out;
}

.app-main--workspace:not(.app-main--game) .portrait-frame-image--reveal {
  animation: portraitRevealCatalog 0.42s ease-out;
}

.portrait-frame-open {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.portrait-frame-open--fill {
  display: block;
}

.portrait-zoom-button__pending {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 2.5rem;
  background: rgba(21, 15, 10, 0.45);
}

.portrait-frame-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 0.4rem;
}

.portrait-frame--char-list {
  width: 96px;
  height: 128px;
}

.portrait-frame--game-character {
  width: 72px;
  height: 96px;
}

.portrait-frame--coop {
  width: 40px;
  height: 54px;
  border-radius: 8px;
  flex-shrink: 0;
}

.portrait-frame--coop[data-empty="true"] .portrait-frame-placeholder {
  opacity: 0.45;
}

.portrait-frame--moment {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.moment-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem 0.85rem;
  align-items: start;
}

.moment-gallery-grid__empty {
  grid-column: 1 / -1;
}

.moment-gallery-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.moment-gallery-card--just-unlocked .moment-gallery-card__frame {
  animation: achievementBadgePop 0.42s var(--token-ease-out);
}

.moment-gallery-card__open {
  display: block;
}

.moment-gallery-card__image {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.moment-gallery-card__image--scene {
  filter: saturate(0.92) contrast(1.04);
}

.moment-gallery-card__chronicle {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(219, 203, 165, 0.88);
  font-style: italic;
}

.moment-gallery-card__emblem-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.2));
}

.moment-gallery-card__emblem-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: blur(6px) saturate(0.2);
  transform: scale(1.08);
  pointer-events: none;
}

.moment-gallery-card__emblem {
  position: relative;
  z-index: 1;
  width: 72%;
  max-height: 70%;
}

.moment-emblem__glyph {
  fill: none;
  stroke: rgba(219, 203, 165, 0.92);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.moment-emblem__num {
  fill: rgba(219, 203, 165, 0.95);
  font-size: 11px;
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 600;
}

.moment-coop-collage {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 3px;
  padding: 3px;
  box-sizing: border-box;
}

.moment-coop-collage--1 {
  grid-template-columns: 1fr;
}

.moment-coop-collage--2 {
  grid-template-columns: 1fr 1fr;
}

.moment-coop-collage--3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.moment-coop-collage--3 .moment-coop-collage__cell:first-child {
  grid-column: 1 / -1;
}

.moment-coop-collage__cell {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  filter: saturate(0.2) contrast(1.05);
}

.moment-gallery-card__pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 100%;
  padding: 0.75rem;
  text-align: center;
}

.moment-gallery-card__pending-quill {
  width: 28px;
  height: 28px;
  opacity: 0.55;
  background: center / contain no-repeat url("/ui-handoff-quill.png");
}

.moment-gallery-card__pending-text {
  font-size: 0.78rem;
  color: var(--token-muted);
  line-height: 1.35;
}

.moment-gallery-card__caption {
  padding: 0 0.15rem;
}

.moment-gallery-card__title {
  display: block;
  font-size: 0.92rem;
  line-height: 1.3;
}

.moment-gallery-card__desc {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--token-muted);
}

.portrait-variant-strip {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0.45rem 0 0.6rem;
  padding: 0.1rem 0.45rem 0.2rem;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    rgba(0, 0, 0, 1) 10px,
    rgba(0, 0, 0, 1) calc(100% - 10px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    rgba(0, 0, 0, 1) 10px,
    rgba(0, 0, 0, 1) calc(100% - 10px),
    transparent 100%
  );
}

.portrait-variant-toggle {
  border: 1px solid rgba(194, 155, 89, 0.4);
  border-radius: 999px;
  background: rgba(17, 12, 9, 0.72);
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.2;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.portrait-variant-toggle:hover {
  border-color: rgba(230, 202, 146, 0.88);
  background: rgba(30, 20, 12, 0.82);
  transform: translateY(-1px);
}

.portrait-variant-toggle:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.portrait-variant-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 68px;
  border-radius: 9px;
  border: 1px solid rgba(194, 155, 89, 0.35);
  overflow: hidden;
  padding: 0;
  background: rgba(21, 15, 10, 0.55);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.portrait-variant-thumb__select {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.portrait-variant-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portrait-variant-thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(228, 199, 138, 0.9);
}

.portrait-variant-thumb.is-active {
  border-color: rgba(242, 217, 149, 1);
  box-shadow: 0 0 0 1px rgba(242, 217, 149, 0.45), 0 8px 18px rgba(0, 0, 0, 0.28);
}

.portrait-variant-thumb__select:disabled,
.portrait-variant-thumb__zoom:disabled {
  opacity: 0.65;
  cursor: default;
}

.portrait-variant-thumb:has(.portrait-variant-thumb__select:disabled) {
  transform: none;
}

.portrait-variant-thumb__zoom {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid rgba(255, 231, 177, 0.45);
  border-radius: 999px;
  background: rgba(7, 8, 14, 0.78);
  color: rgba(255, 244, 218, 0.95);
  cursor: zoom-in;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  z-index: 1;
}

.portrait-variant-thumb__zoom:hover:not(:disabled) {
  border-color: rgba(242, 217, 149, 0.95);
  background: rgba(21, 15, 10, 0.92);
}

.portrait-variant-thumb__zoom-icon {
  width: 0.72rem;
  height: 0.72rem;
  display: block;
  background: currentcolor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portrait-variant-thumb-label {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 10px;
  line-height: 1;
  color: rgba(255, 244, 218, 0.95);
  background: rgba(7, 8, 14, 0.7);
  border: 1px solid rgba(255, 231, 177, 0.35);
  border-radius: 6px;
  padding: 2px 4px;
}

@keyframes portraitReveal {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: saturate(0.05) contrast(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: saturate(0.15) contrast(1.08);
  }
}

@keyframes portraitRevealCatalog {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: saturate(0.12) contrast(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: saturate(0.58) contrast(1.04);
  }
}

.portrait-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(1, 3, 8, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.portrait-lightbox-overlay--open {
  opacity: 1;
}

.portrait-lightbox-dialog {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(5, 8, 22, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  width: min(96vw, 1280px);
  max-width: 96vw;
  max-height: 94vh;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.22s ease-out, transform 0.22s ease-out;
}

.portrait-lightbox-dialog--open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.portrait-lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 94vh;
  object-fit: contain;
}

.portrait-lightbox-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(2, 4, 10, 0.72);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.action-button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 30, 0.9);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 14px;
  margin-top: 4px;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.08s ease-out,
    box-shadow var(--transition-fast);
}

.action-button:hover {
  background: rgb(var(--accent-rgb) / 0.16);
  border-color: rgb(var(--accent-rgb) / 0.8);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.35);
}

.action-button--selected {
  background: var(--accent-strong);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.action-index {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.action-label {
  flex: 1;
  text-align: left;
}

.action-label strong {
  font-weight: 700;
}

.action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.custom-action-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.custom-action-form .cozy-form__input {
  width: 100%;
}

.custom-action-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 30, 0.9);
  color: var(--text-main);
  font-size: calc(15px * var(--ui-font-scale));
  transition: border-color var(--transition-fast);
}

.custom-action-input::placeholder {
  color: var(--text-muted);
}

.custom-action-input:focus {
  outline: none;
  border-color: rgb(var(--accent-rgb) / 0.7);
}

.custom-action-input:disabled {
  opacity: 0.6;
}

select.custom-action-input option:disabled {
  color: var(--text-muted);
  opacity: 0.85;
}

/* Алиас primary-кнопки; базовые стили — в ui/primitives.css (.ui-button) */
.custom-action-submit {
  align-self: flex-start;
}

.app-main--auth {
  max-width: 36rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  grid-template-columns: 1fr;
}

.app-main--onboarding {
  max-width: 42rem;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.app-onboarding-alt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 1rem;
}

.ui-text-link {
  margin: 0;
  padding: 0.5rem 0.15rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  font: inherit;
  font-size: calc(14px * var(--ui-font-scale, 1));
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color var(--token-motion-fast) var(--token-ease-out);
}

.ui-text-link:hover:not(:disabled) {
  color: var(--text-main);
}

.ui-text-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.38);
  border-radius: 4px;
}

.ui-text-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.participant-chat-sound-hint {
  margin: 0 0 0.5rem;
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--token-text-secondary);
}

.app-main--menu {
  max-width: 52rem;
  width: 100%;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
}

.story-create-card {
  padding: 16px 18px 18px;
  gap: 0;
}

.story-create, .cozy-form {
  display: grid;
  gap: 1.35rem;
}

.story-create__hero, .cozy-form__hero {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 0.15rem;
}

.story-create__title, .cozy-form__title {
  margin: 0;
  font-size: calc(22px * var(--ui-font-scale, 1));
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-main);
}

.story-create__lead, .cozy-form__lead {
  margin: 0;
  font-size: calc(14px * var(--ui-font-scale, 1));
  line-height: 1.5;
  color: var(--text-muted);
}

.story-create__error, .cozy-form__error {
  margin: 0;
}

.story-create__section, .cozy-form__section {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(160deg, rgb(var(--accent-rgb) / 0.05) 0%, var(--bg-elevated) 48%);
}

.story-create__section--advanced, .cozy-form__section--advanced {
  padding: 0;
  overflow: hidden;
}

.story-create__section-head, .cozy-form__section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.story-create__step, .cozy-form__step {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 700;
  color: var(--text-main);
  background: rgb(var(--accent-rgb) / 0.16);
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
}

.story-create__section-title, .cozy-form__section-title {
  margin: 0;
  font-size: calc(15px * var(--ui-font-scale, 1));
  font-weight: 650;
  color: var(--text-main);
}

.story-create__section-caption, .cozy-form__section-caption {
  margin: 0.2rem 0 0;
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--text-muted);
}

.story-create__choice-row, .cozy-form__choice-row {
  display: grid;
  gap: 0.65rem;
}

.story-create__choice-row--duo, .cozy-form__choice-row--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-create__choice, .cozy-form__choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-height: 4.5rem;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgb(7 11 28 / 0.42);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--token-motion-fast) var(--token-ease-out),
    background-color var(--token-motion-fast) var(--token-ease-out),
    box-shadow var(--token-motion-fast) var(--token-ease-out),
    transform var(--token-motion-fast) var(--token-ease-out);
}

.story-create__choice:hover:not(:disabled) , .cozy-form__choice:hover:not(:disabled)  {
  border-color: rgb(var(--accent-rgb) / 0.34);
  transform: translateY(-1px);
}

.story-create__choice--selected, .cozy-form__choice--selected {
  border-color: rgb(var(--accent-rgb) / 0.52);
  background: rgb(var(--accent-rgb) / 0.12);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.14);
}

.story-create__choice:focus-visible , .cozy-form__choice:focus-visible  {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.32);
}

.story-create__choice:disabled , .cozy-form__choice:disabled  {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.story-create__choice-icon, .cozy-form__choice-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-top: 0.05rem;
}

.story-create__choice-copy, .cozy-form__choice-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.story-create__choice-title, .cozy-form__choice-title {
  font-size: calc(14px * var(--ui-font-scale, 1));
  font-weight: 650;
}

.story-create__choice-hint, .cozy-form__choice-hint {
  font-size: calc(12px * var(--ui-font-scale, 1));
  line-height: 1.4;
  color: var(--text-muted);
}

.story-create__notice, .cozy-form__notice {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgb(250 204 21 / 0.28);
  background: rgb(250 204 21 / 0.08);
}

.story-create__notice, .cozy-form__notice p {
  margin: 0;
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--text-main);
}

.story-create__notice-action, .cozy-form__notice-action {
  justify-self: start;
}

.story-create__genre-grid, .cozy-form__genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.4rem, 1fr));
  gap: 0.55rem;
}

.story-create__genre, .cozy-form__genre {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  min-height: 5.1rem;
  padding: 0.65rem 0.45rem 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--catalog-border, var(--border-subtle));
  background: var(--catalog-tile-bg, rgb(7 11 28 / 0.38));
  color: var(--text-main);
  cursor: pointer;
  transition:
    border-color var(--token-motion-fast) var(--token-ease-out),
    background-color var(--token-motion-fast) var(--token-ease-out),
    transform var(--token-motion-fast) var(--token-ease-out);
}

.story-create__genre:hover:not(:disabled) , .cozy-form__genre:hover:not(:disabled)  {
  border-color: rgb(var(--accent-rgb) / 0.34);
  transform: translateY(-1px);
}

.story-create__genre--selected, .cozy-form__genre--selected {
  border-color: rgb(var(--accent-rgb) / 0.55);
  background: rgb(var(--accent-rgb) / 0.14);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.12);
}

.story-create__genre--disabled, .cozy-form__genre--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.story-create__genre:focus-visible , .cozy-form__genre:focus-visible  {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.32);
}

.story-create__genre-emoji, .cozy-form__genre-emoji {
  font-size: 1.45rem;
  line-height: 1;
}

.story-create__genre-name, .cozy-form__genre-name {
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.story-create__genre-badge, .cozy-form__genre-badge {
  font-size: calc(10px * var(--ui-font-scale, 1));
  color: var(--text-muted);
  text-transform: lowercase;
}

.story-create__genre-description, .cozy-form__genre-description {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--home-opening-card-bg);
  border: 1px solid var(--home-quote-border);
}

.story-create__field, .cozy-form__field {
  display: grid;
  gap: 0.4rem;
}

.story-create__field--wide, .cozy-form__field--wide {
  grid-column: 1 / -1;
}

.story-create__field-label, .cozy-form__field-label {
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.story-create__input, .cozy-form__input,
.story-create__textarea, .cozy-form__textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgb(7 11 28 / 0.55);
  color: var(--text-main);
  padding: 0.7rem 0.85rem;
  font-family: var(--token-font-family);
  font-size: calc(15px * var(--ui-font-scale, 1));
  line-height: 1.45;
  transition:
    border-color var(--token-motion-fast) var(--token-ease-out),
    box-shadow var(--token-motion-fast) var(--token-ease-out);
}

.story-create__textarea, .cozy-form__textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.story-create__textarea--lg, .cozy-form__textarea--lg {
  min-height: 8.5rem;
}

.story-create__input:focus-visible,
.story-create__textarea:focus-visible,
.cozy-form__input:focus-visible,
.cozy-form__textarea:focus-visible {
  outline: none;
  border-color: rgb(var(--accent-rgb) / 0.52);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.24);
}

.story-create__input::placeholder,
.story-create__textarea::placeholder,
.cozy-form__input::placeholder,
.cozy-form__textarea::placeholder {
  color: var(--text-muted);
}

.story-create__char-count, .cozy-form__char-count {
  justify-self: end;
  font-size: calc(11px * var(--ui-font-scale, 1));
  color: var(--text-muted);
}

.story-create__field-grid, .cozy-form__field-grid {
  display: grid;
  gap: 0.75rem;
}

.story-create__inline-hint, .cozy-form__inline-hint {
  margin: 0;
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--text-muted);
}

.story-create__ready-plots, .cozy-form__ready-plots {
  display: grid;
  gap: 0.5rem;
}

.story-create__ready-plots-scroll, .cozy-form__ready-plots-scroll {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.story-create__ready-plot, .cozy-form__ready-plot {
  flex: 0 0 min(14rem, 78vw);
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgb(7 11 28 / 0.38);
  color: var(--text-main);
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
  transition:
    border-color var(--token-motion-fast) var(--token-ease-out),
    background-color var(--token-motion-fast) var(--token-ease-out);
}

.story-create__ready-plot--selected, .cozy-form__ready-plot--selected {
  border-color: rgb(var(--accent-rgb) / 0.52);
  background: rgb(var(--accent-rgb) / 0.12);
}

.story-create__ready-plot-title, .cozy-form__ready-plot-title {
  font-size: calc(13px * var(--ui-font-scale, 1));
  font-weight: 650;
}

.story-create__ready-plot-hint, .cozy-form__ready-plot-hint {
  font-size: calc(12px * var(--ui-font-scale, 1));
  line-height: 1.4;
  color: var(--text-muted);
}

.story-create__character-chips, .cozy-form__character-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.story-create__character-chip, .cozy-form__character-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgb(7 11 28 / 0.38);
  color: var(--text-main);
  font-size: calc(13px * var(--ui-font-scale, 1));
  cursor: pointer;
  transition:
    border-color var(--token-motion-fast) var(--token-ease-out),
    background-color var(--token-motion-fast) var(--token-ease-out);
}

.story-create__character-chip--selected, .cozy-form__character-chip--selected {
  border-color: rgb(var(--accent-rgb) / 0.52);
  background: rgb(var(--accent-rgb) / 0.14);
}

.story-create__character-chip--disabled, .cozy-form__character-chip--disabled,
.story-create__character-chip:disabled , .cozy-form__character-chip:disabled  {
  opacity: 0.45;
  cursor: not-allowed;
}

.story-create__character-chip-badge, .cozy-form__character-chip-badge {
  font-size: calc(11px * var(--ui-font-scale, 1));
  color: var(--text-muted);
}

.story-create__advanced-toggle, .cozy-form__advanced-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: calc(14px * var(--ui-font-scale, 1));
  font-weight: 650;
  cursor: pointer;
}

.story-create__advanced-toggle:focus-visible , .cozy-form__advanced-toggle:focus-visible  {
  outline: none;
  box-shadow: inset 0 0 0 2px rgb(var(--accent-rgb) / 0.38);
}

.story-create__advanced-chevron, .cozy-form__advanced-chevron {
  color: var(--text-muted);
}

.story-create__advanced-body, .cozy-form__advanced-body {
  display: grid;
  gap: 0.85rem;
  padding: 0 1rem 1rem;
}

.story-create__toggle-card, .cozy-form__toggle-card {
  border-radius: 10px;
  border: 1px solid var(--home-quote-border);
  background: var(--home-opening-card-bg);
  padding: 0.7rem 0.75rem;
}

.story-create__toggle, .cozy-form__toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}

.story-create__toggle--flat, .cozy-form__toggle--flat {
  padding: 0.15rem 0;
}

.story-create__toggle, .cozy-form__toggle input {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.story-create__toggle-copy, .cozy-form__toggle-copy {
  display: grid;
  gap: 0.2rem;
}

.story-create__toggle-title, .cozy-form__toggle-title {
  font-size: calc(14px * var(--ui-font-scale, 1));
  font-weight: 600;
  color: var(--text-main);
}

.story-create__toggle-hint, .cozy-form__toggle-hint {
  font-size: calc(12px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--text-muted);
}

.story-create__style-grid, .cozy-form__style-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.story-create__style-pill, .cozy-form__style-pill {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgb(7 11 28 / 0.38);
  color: var(--text-main);
  font-size: calc(12px * var(--ui-font-scale, 1));
  cursor: pointer;
  transition:
    border-color var(--token-motion-fast) var(--token-ease-out),
    background-color var(--token-motion-fast) var(--token-ease-out);
}

.story-create__style-pill--selected, .cozy-form__style-pill--selected {
  border-color: rgb(var(--accent-rgb) / 0.52);
  background: rgb(var(--accent-rgb) / 0.14);
}

.story-create__footer, .cozy-form__footer {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.25rem;
}

.story-create__slots, .cozy-form__slots {
  margin: 0;
  font-size: calc(13px * var(--ui-font-scale, 1));
  color: var(--text-muted);
}

.story-create__slots--warn, .cozy-form__slots--warn {
  color: #f5c98a;
}

.story-create__slots-block, .cozy-form__slots-block {
  display: grid;
  gap: 0.55rem;
}

.story-create__submit, .cozy-form__submit {
  width: 100%;
  justify-content: center;
}

.story-create__choice--compact, .cozy-form__choice--compact {
  min-height: 3.25rem;
  padding: 0.55rem 0.65rem;
}

.story-create__choice--compact .story-create__choice-icon,
.story-create__choice--compact .cozy-form__choice-icon,
.cozy-form__choice--compact .story-create__choice-icon,
.cozy-form__choice--compact .cozy-form__choice-icon {
  font-size: 1.1rem;
}

.story-create__section--sticky, .cozy-form__section--sticky {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.story-create__filter-group, .cozy-form__filter-group {
  display: grid;
  gap: 0.45rem;
}

.cozy-form__filters-body {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.story-create__notice--info, .cozy-form__notice--info {
  border-color: rgb(var(--accent-rgb) / 0.28);
  background: rgb(var(--accent-rgb) / 0.08);
}

.app-nav-drawer__cozy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.app-main--auth .cozy-form__section {
  margin-top: 0.25rem;
}

.cozy-form__auth-card {
  margin-top: 0.35rem;
}

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

@media (max-width: 560px) {
  .story-create-card {
    padding: 12px 12px 14px;
  }

  .story-create__choice-row--duo, .cozy-form__choice-row--duo {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-create__genre-grid, .cozy-form__genre-grid {
    grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr));
  }
}

.auth-form {
  display: grid;
  gap: 0.75rem;
}

.auth-form .auth-form-submit {
  width: 100%;
  margin-top: 1rem;
  align-self: stretch;
  justify-content: center;
}

.auth-form--section {
  margin-top: 1rem;
}

.auth-label {
  display: grid;
  gap: 0.35rem;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-label--checkbox-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.auth-label--checkbox-top {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.auth-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-switch {
  margin-top: 1.5rem;
}

.stack-md {
  display: grid;
  gap: 0.75rem;
}

.row-wrap-sm {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mt-sm {
  margin-top: 0.5rem;
}

.mt-md {
  margin-top: 0.75rem;
}

.mt-lg {
  margin-top: 1rem;
}

.mt-xl {
  margin-top: 1.5rem;
}

.mb-sm {
  margin-bottom: 0.5rem;
}

.mb-md {
  margin-bottom: 0.75rem;
}

.mb-lg {
  margin-bottom: 1rem;
}

.mb-compact {
  margin-bottom: 0.6rem;
}

.note-tight {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.side-card--mt-md {
  margin-top: 0.75rem;
}

.side-card--mt-lg {
  margin-top: 1rem;
}

.side-card--mt-xl {
  margin-top: 1.5rem;
}

.side-card--mb-md {
  margin-bottom: 0.75rem;
}

.side-card--mb-compact {
  margin-bottom: 0.6rem;
}

/* Публичные истории: в свёрнутом блоке подсказка только на широком экране */
@media (max-width: 960px) {
  .public-collapsible-section__collapsed-hint {
    display: none;
  }
}

.admin-tab-groups {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-tab-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
}

.admin-tab-group__title {
  margin: 0 0 0.45rem;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.moderation-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.moderation-priority--ok {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.16);
}

.moderation-priority--warning {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
}

.moderation-priority--critical {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.52);
  background: rgba(239, 68, 68, 0.16);
}

.admin-list {
  display: grid;
  gap: 0.55rem;
}

.admin-list-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
}

.admin-list-row--clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-list-row--clickable:hover,
.admin-list-row--clickable:focus-visible {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.08);
  outline: none;
}

.admin-list-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.admin-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.admin-status-chip--pending {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.16);
}

.admin-status-chip--resolved {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.16);
}

.admin-status-chip--rejected {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.14);
}

.admin-status-chip--all,
.admin-status-chip--info {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.16);
}

.admin-status-chip--active {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.16);
}

.admin-status-chip--blocked {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.16);
}

.admin-status-chip--processed {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.16);
}

.admin-status-chip--warning {
  border-color: rgba(234, 179, 8, 0.5);
  background: rgba(234, 179, 8, 0.15);
}

.admin-chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(62vh, 520px);
  overflow-y: auto;
  padding: 0.25rem 0.1rem;
}

.admin-chat-message {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
}

.admin-chat-message--deleted {
  opacity: 0.72;
  border-style: dashed;
  background: rgba(239, 68, 68, 0.06);
}

.admin-chat-message__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.admin-chat-message__body {
  margin: 0.35rem 0 0;
  line-height: 1.45;
}

.admin-filter-sticky-wrap {
  position: sticky;
  top: 0.45rem;
  z-index: 4;
  padding: 0.4rem 0.45rem 0.25rem;
  margin: 0 0 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(7, 11, 28, 0.82);
  backdrop-filter: blur(4px);
}

.admin-home-illustration-schedule-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-home-illustration-preview {
  display: block;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--token-radius-md, 10px);
  border: 1px solid color-mix(in srgb, var(--token-border) 70%, transparent);
}

.admin-period-stats-table-wrap {
  overflow-x: auto;
  margin-top: 0.35rem;
}

.admin-period-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-period-stats-table th,
.admin-period-stats-table td {
  border: 1px solid rgba(148, 163, 184, 0.32);
  padding: 0.35rem 0.45rem;
  vertical-align: top;
}

.admin-period-stats-table th {
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}

.admin-period-stats-table td:first-child {
  text-align: left;
  min-width: 11rem;
}

.admin-period-stats-table td:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.admin-sheets-purchases-table th,
.admin-sheets-purchases-table td {
  vertical-align: top;
}

.admin-sheets-purchases-table tfoot th,
.admin-sheets-purchases-table tfoot td {
  font-weight: 600;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
}

.admin-period-stats-table td.admin-period-revenue-cell {
  white-space: normal;
  text-align: left;
  max-width: 14rem;
}

.admin-users-table td {
  white-space: normal;
  vertical-align: top;
}

.admin-users-table td:not(:first-child):not(:last-child) {
  text-align: right;
  white-space: nowrap;
}

.admin-users-table .admin-status-chip {
  margin-top: 0.25rem;
  display: inline-block;
}

.side-card--sticky {
  margin-top: 1rem;
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.textarea-md {
  min-height: 6rem;
  resize: vertical;
}

.textarea-sm {
  min-height: 4rem;
  resize: vertical;
}

.textarea-note {
  min-height: 5rem;
  resize: vertical;
}

.textarea-lg {
  min-height: 7rem;
  resize: vertical;
}

.hint-block {
  display: block;
  margin-top: 0.35rem;
}

.list-muted {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 14px;
}

.list-muted li {
  margin-bottom: 0.65rem;
}

.panel-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.panel-header-row--sm {
  gap: 0.5rem;
}

.panel-header-row--lg {
  gap: 1rem;
}

.panel-header-row .side-title {
  margin: 0;
}

.excerpt-block {
  margin-top: 0.25rem;
}

.mt-xs {
  margin-top: 0.35rem;
}

.mt-compact {
  margin-top: 0.4rem;
}

.row-wrap-md {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.row-wrap-soft {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.row-wrap-xs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.row-center {
  align-items: center;
}

.my-games-continue-card {
  gap: 0;
}

.my-games-continue-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.game-list-illustration-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--catalog-border, var(--border-subtle));
  background: rgb(0 0 0 / 0.12);
}

.game-list-illustration-thumb__img,
.game-list-illustration-thumb__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-list-illustration-thumb__placeholder {
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), rgb(var(--accent-rgb) / 0.04));
}

.my-games-continue-card__body {
  display: flex;
  flex: 1 1 12rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.my-games-continue-card__title {
  font-size: calc(15px * var(--ui-font-scale));
  line-height: 1.35;
  word-break: break-word;
}

.justify-between {
  justify-content: space-between;
}

.row-start {
  align-items: flex-start;
}

.stack-sm {
  display: grid;
  gap: 0.5rem;
}

.stack-xs {
  display: grid;
  gap: 0.4rem;
}

.stack-xxs {
  display: grid;
  gap: 0.35rem;
}

.self-end {
  align-self: flex-end;
}

.w-full {
  width: 100%;
}

.flex-1 {
  flex: 1;
}

.flex-1-min-12 {
  flex: 1 1 12rem;
}

.flex-1-min-16 {
  flex: 1 1 16rem;
}

.flex-1-min-22 {
  flex: 1;
  min-width: 220px;
}

.side-title--flush {
  margin-top: 0;
}

.side-title--sm {
  font-size: calc(14px * var(--ui-font-scale));
}

.side-title--archive {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: calc(16px * var(--ui-font-scale));
}

.side-placeholder--flush {
  margin-top: 0;
}

.side-placeholder--compact {
  margin-top: 0.25rem;
}

.side-placeholder--caption {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.9em;
}

.side-placeholder--meta {
  margin: 0;
  font-size: 0.88em;
}

.item-divider-md {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.item-divider-sm {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.5rem;
}

.item-divider-compact {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}

.text-main {
  color: var(--text-main);
}

.font-semibold {
  font-weight: 600;
}

.ml-sm {
  margin-left: 0.5rem;
}

.mr-xs {
  margin-right: 0.35rem;
}

.section-divider-top {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

/* Tier 1 — тонкая золотистая линия между смысловыми блоками */
.ornament-rule {
  margin: 0;
  border: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--ornament-muted) 14%,
    color-mix(in srgb, var(--ornament-strong) 72%, rgb(var(--accent-rgb) / 0.22)) 50%,
    var(--ornament-muted) 86%,
    transparent 100%
  );
}

.ornament-rule--spaced {
  margin: 0.85rem 0;
}

.ornament-rule--section {
  margin: 0.65rem 0 0.9rem;
}

/* Tier 2 — линия с центральным flourish (hero, onboarding, вехи) */
.ornament-flourish {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0;
}

.ornament-flourish--spaced {
  margin: 0.85rem 0;
}

.ornament-flourish--hero {
  margin: 0.15rem auto 0.1rem;
  max-width: min(22rem, 92%);
}

.ornament-flourish__line {
  flex: 1 1 0;
  height: 1px;
  min-width: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--ornament-muted) 18%,
    var(--ornament) 100%
  );
}

.ornament-flourish__line:last-child {
  background: linear-gradient(
    90deg,
    var(--ornament) 0%,
    var(--ornament-muted) 82%,
    transparent 100%
  );
}

.ornament-flourish__glyph {
  flex: 0 0 auto;
  width: 2rem;
  height: 0.75rem;
  overflow: visible;
}

.ornament-flourish__glyph path,
.ornament-flourish__glyph circle {
  fill: none;
  stroke: var(--ornament-strong);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ornament-flourish__glyph circle {
  fill: color-mix(in srgb, var(--ornament-strong) 55%, rgb(var(--accent-rgb) / 0.35));
  stroke: none;
}

.home-opening-card__ornament {
  margin: 0.45rem 0 0.75rem;
}

.moment-gallery-card__ornament {
  margin: 0.35rem 0 0.55rem;
  max-width: 9rem;
}

.cozy-form__section .ornament-rule--section {
  margin-top: 0.55rem;
  margin-bottom: 0.15rem;
}

.product-intro-hero .ornament-flourish--hero {
  opacity: 0.92;
}

.welcome-landing__section-ornament {
  margin: 1.1rem 0 0.85rem;
}

.native-welcome__hero .ornament-flourish--hero {
  margin-top: 0.65rem;
  max-width: min(18rem, 88%);
}

.soft-panel {
  border-radius: 12px;
  border: 1px solid var(--home-quote-border);
  background: var(--home-opening-card-bg);
  padding: 0.75rem 0.85rem;
}

.ui-button--danger-soft {
  border-color: rgb(214 86 86 / 0.36);
}

.ui-button--tiny {
  padding: 0.1rem 0.45rem;
  font-size: 12px;
}

.ui-button--split {
  justify-content: space-between;
}

.pre-wrap {
  white-space: pre-wrap;
}

.break-word {
  word-break: break-word;
}

.break-all {
  word-break: break-all;
}

.detail-box {
  margin-top: 0.55rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.reader-text {
  white-space: pre-wrap;
  line-height: 1.45;
}

.chat-scroll-panel {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 0.6rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  line-height: 1.35;
}

.chat-message-row {
  margin-bottom: 0.45rem;
  display: flex;
  gap: 0.35rem;
  justify-content: space-between;
  align-items: flex-start;
}

.chat-message-body {
  flex: 1;
  min-width: 0;
}

.chat-message-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.ui-button--chat-delete {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
}

.skill-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.02);
}

.skill-progress {
  margin-top: 0.35rem;
  height: 7px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.12);
}

.skill-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dice-grad-3), var(--dice-grad-2) 55%, var(--dice-grad-1));
}

.skill-meta {
  margin-top: 0.3rem;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, var(--immersi-safe-top)) max(1rem, var(--immersi-safe-right))
    max(1rem, var(--immersi-safe-bottom)) max(1rem, var(--immersi-safe-left));
  background: rgba(1, 3, 8, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-card {
  flex-shrink: 0;
  margin: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-muted));
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.1rem;
}

.modal-card--sm {
  max-width: 28rem;
  width: 100%;
}

.modal-card--lg {
  max-width: 44rem;
  width: 100%;
}

.admin-violation-review__text {
  max-height: min(52vh, 28rem);
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-violation-review__snippet {
  max-height: min(28vh, 14rem);
  overflow: auto;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-violation-review__plot {
  max-height: min(40vh, 20rem);
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.5;
}

.game-check-help {
  font-size: calc(14px * var(--ui-font-scale));
  line-height: 1.45;
}

.game-check-help__lead {
  margin: 0 0 1rem;
}

.game-check-help__section {
  margin-bottom: 1.1rem;
}

.game-check-help__section:last-child {
  margin-bottom: 0;
}

.game-check-help__heading {
  margin: 0 0 0.45rem;
  font-size: calc(15px * var(--ui-font-scale));
  font-weight: 600;
}

.game-check-help__formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.game-check-help__formula-part {
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: var(--surface-elevated, rgba(255, 255, 255, 0.06));
}

.game-check-help__formula-eq,
.game-check-help__formula-op {
  color: var(--text-muted);
  font-weight: 500;
}

.game-check-help__example {
  margin: 0;
}

.game-check-help__table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0;
}

.game-check-help__table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(13px * var(--ui-font-scale));
}

.game-check-help__table th,
.game-check-help__table td {
  padding: 0.35rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.game-check-help__table th {
  color: var(--text-muted);
  font-weight: 600;
}

.game-check-help__list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.game-check-help__list li + li {
  margin-top: 0.25rem;
}

.side-title--xs {
  font-size: calc(13px * var(--ui-font-scale));
}

.font-semibold-sm {
  font-weight: 600;
  font-size: 0.95rem;
}

.row-pad-xs {
  padding: 0.25rem 0;
}

.row-pad-sm {
  padding: 0.5rem 0;
}

.muted-85 {
  opacity: 0.9;
}

.muted-65 {
  opacity: 0.78;
}

.check-offset {
  margin-top: 0.2rem;
}

.app-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: 24rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.app-toast__text {
  line-height: 1.45;
  font-size: 14px;
}

.app-toast__footer {
  display: flex;
  justify-content: flex-end;
}

.app-toast__ok {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.app-toast__ok:hover {
  background: rgba(255, 255, 255, 0.32);
}

.app-toast--attention {
  max-width: min(24rem, calc(100vw - 2rem));
}

.app-toast--success {
  background: rgba(16, 185, 129, 0.92);
}

.app-toast--error {
  background: rgba(239, 68, 68, 0.92);
}

.app-toast--info {
  background: rgba(59, 130, 246, 0.92);
}

.register-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 0.55rem;
  line-height: 1.45;
}

.register-consent-label input[type="checkbox"] {
  margin-top: 0.14rem;
}

.register-captcha-wrap {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  min-height: 4.25rem;
}

.yandex-smartcaptcha-field {
  width: 100%;
  display: flex;
  justify-content: center;
}

.register-inline-link {
  border: 0;
  background: none;
  padding: 0;
  color: rgb(var(--accent-rgb) / 0.96);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font: inherit;
}

.register-inline-link:hover {
  color: #ddd3ff;
}

.register-note {
  margin: 0.4rem 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.register-legal-button {
  margin-top: 0.55rem;
  border: 1px solid rgb(var(--accent-rgb) / 0.4);
  border-radius: var(--radius-md);
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--text-main);
  text-align: left;
  padding: 0.6rem 0.72rem;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.register-legal-button:hover {
  border-color: rgb(var(--accent-rgb) / 0.72);
  background: rgb(var(--accent-rgb) / 0.22);
}

.register-age-badge {
  margin-top: 0.8rem;
  width: fit-content;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.cookie-banner {
  position: fixed;
  left: max(1rem, var(--immersi-safe-left));
  right: max(1rem, var(--immersi-safe-right));
  bottom: max(1rem, var(--immersi-safe-bottom));
  z-index: 130;
  max-width: 54rem;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--header-background);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.cookie-banner-title {
  margin: 0;
  font-weight: 700;
}

.cookie-banner-text {
  margin: 0.45rem 0 0;
  color: var(--text-main);
  line-height: 1.45;
}

.cookie-banner-link {
  color: rgb(var(--accent-rgb) / 0.96);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-options {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.cookie-banner-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-main);
  font-size: 13px;
}

.cookie-banner-option input[type="checkbox"] {
  margin-top: 0.15rem;
}

.cookie-banner-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

html[data-cookie-banner-visible="1"] .app-root {
  padding-bottom: calc(20px + var(--immersi-safe-bottom) + 5.5rem);
}

html[data-cookie-banner-visible="1"] .pwa-install-hint {
  bottom: calc(5.75rem + var(--immersi-safe-bottom));
}

.game-view-network-error {
  margin-bottom: 0.65rem;
}

@media (max-width: 600px) {
  .cookie-banner {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
  }
}

.legal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(1, 3, 8, 0.78);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.legal-modal-card {
  width: min(52rem, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-muted));
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.legal-modal-title {
  margin: 0;
  font-size: 1.05rem;
}

.legal-modal-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.legal-modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.legal-modal-section {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.legal-modal-section h2 {
  margin: 0;
  font-size: 1rem;
}

.legal-modal-section p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.legal-doc-section {
  margin-top: 0.9rem;
}

.legal-doc-toc {
  margin-top: 0.8rem;
  padding: 0.7rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.legal-doc-toc-title {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.legal-doc-toc-links {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.legal-doc-toc-link {
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--text-main);
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0.32rem 0.58rem;
  cursor: pointer;
}

.legal-doc-toc-link:hover {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: rgb(var(--accent-rgb) / 0.2);
}

.legal-doc-section-title {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-main);
}

.legal-doc-paragraph {
  margin: 0.5rem 0 0;
  color: var(--text-main);
  font-size: 0.86rem;
  line-height: 1.55;
}

.legal-doc-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-main);
  font-size: 0.86rem;
  line-height: 1.55;
}

.legal-doc-list li + li {
  margin-top: 0.35rem;
}

.legal-doc-section-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: flex-end;
}

.legal-doc-back-to-top {
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.26rem 0.52rem;
  cursor: pointer;
}

.legal-doc-back-to-top:hover {
  border-color: rgb(var(--accent-rgb) / 0.62);
  color: var(--text-main);
  background: rgb(var(--accent-rgb) / 0.16);
}

.site-footer {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.site-footer-link {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed rgb(255 255 255 / 0.24);
}

.site-footer-link:hover {
  color: var(--text-main);
  border-bottom-color: rgb(255 255 255 / 0.45);
}

.site-footer-separator {
  opacity: 0.45;
}

.site-footer-age {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.legal-static-page {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top left, var(--accent-soft), var(--bg-elevated));
  box-shadow: var(--shadow-soft);
  padding: 12px 14px 14px;
}

.app-main--legal {
  max-width: 58rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  grid-template-columns: 1fr;
}

.auth-busy-slot {
  min-height: 1.5rem;
}

.status-text--warn {
  margin: 0.35rem 0 0;
  font-size: calc(14px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: #e8c4a8;
}

.legal-static-subtitle,
.legal-static-updated {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
}

.legal-static-section {
  margin-top: 1rem;
}

.legal-static-section-title {
  margin: 0;
  font-size: 1rem;
}

.legal-static-paragraph {
  margin: 0.52rem 0 0;
  line-height: 1.55;
}

.legal-static-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.55;
}

.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(1, 3, 8, 0.86);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.age-gate-card {
  width: min(46rem, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--header-background);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.1rem;
}

.age-gate-title {
  margin: 0;
  font-size: 1.1rem;
}

.age-gate-body {
  margin-top: 0.7rem;
  color: var(--text-main);
  line-height: 1.55;
  font-size: 0.92rem;
}

.age-gate-body p {
  margin: 0.55rem 0 0;
}

.age-gate-body ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}

.age-gate-body li + li {
  margin-top: 0.35rem;
}

.age-gate-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.age-gate-card--welcome {
  text-align: center;
  padding: 1.35rem 1.25rem 1.15rem;
}

.age-gate-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.age-gate-logo {
  width: min(280px, 78vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.4));
}

.age-gate-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text-main);
}

.age-gate-emoji {
  display: inline-block;
}

.age-gate-actions--stacked {
  margin-top: 1.1rem;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
}

.age-gate-actions--stacked .ui-button {
  width: 100%;
  justify-content: center;
}

.age-gate-btn-primary {
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.age-gate-legal {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

.age-gate-legal-link {
  color: var(--accent, #c9a227);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-onboarding {
  position: fixed;
  inset: 0;
  z-index: 215;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  padding: calc(16px + var(--immersi-safe-top)) calc(18px + var(--immersi-safe-right))
    calc(20px + var(--immersi-safe-bottom)) calc(18px + var(--immersi-safe-left));
  background: var(--body-background);
  overflow: hidden;
}

.product-onboarding__header {
  flex-shrink: 0;
}

.product-onboarding__main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: auto;
}

.product-onboarding__card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: min(56rem, 100%);
  margin: 0 auto;
  min-height: min(100%, 32rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--catalog-border, rgb(255 255 255 / 0.08));
  background: var(--header-background);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--catalog-shadow, var(--shadow-soft));
  padding: clamp(1rem, 3vw, 1.6rem);
}

.product-onboarding__card--sandbox {
  border-color: rgb(var(--accent-rgb) / 0.22);
  background:
    radial-gradient(ellipse 95% 70% at 8% 0%, rgb(var(--accent-rgb) / 0.11), transparent 58%),
    var(--header-background);
}

.product-onboarding__layout {
  flex: 1 1 auto;
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: center;
}

.product-onboarding-illustration {
  order: 1;
}

.product-onboarding__copy {
  order: 2;
}

@media (min-width: 768px) {
  .product-onboarding__layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  .product-onboarding__copy {
    order: 1;
  }

  .product-onboarding-illustration {
    order: 2;
  }
}

.product-onboarding__kicker {
  margin: 0 0 0.45rem;
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.product-onboarding__title {
  margin: 0;
  font-size: calc(22px * var(--ui-font-scale, 1));
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--text-main);
}

.product-onboarding__flavor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.product-onboarding__flavor-chip {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--accent-rgb) / 0.22);
  background: rgb(var(--accent-rgb) / 0.08);
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.35;
  color: var(--text-main);
  white-space: nowrap;
}

.product-onboarding__copy--intro {
  align-self: center;
}

@media (min-width: 768px) {
  .product-onboarding__layout--sandbox {
    gap: clamp(1.15rem, 3vw, 2rem);
  }
}

.product-onboarding__body {
  margin-top: 0.85rem;
}

.product-onboarding__paragraph {
  margin: 0.55rem 0 0;
  line-height: 1.55;
  font-size: calc(14px * var(--ui-font-scale, 1));
  color: var(--text-muted);
}

.product-onboarding__paragraph--lead {
  margin-top: 0;
  font-size: calc(16px * var(--ui-font-scale, 1));
  font-weight: 500;
  color: var(--text-main);
}

.product-onboarding__body > .product-onboarding__paragraph:first-child {
  margin-top: 0;
}

.product-onboarding__list {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.55;
  font-size: calc(16px * var(--ui-font-scale, 1));
  color: var(--text-main);
}

.product-onboarding__list li + li {
  margin-top: 0.35rem;
}

.product-onboarding-illustration {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(42vh, 22rem);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.06);
}

.product-onboarding-illustration--step1 {
  background:
    radial-gradient(circle at 30% 25%, rgb(var(--accent-rgb) / 0.45), transparent 55%),
    radial-gradient(circle at 70% 80%, rgb(var(--accent-deep-rgb) / 0.35), transparent 50%),
    linear-gradient(145deg, var(--bg-elevated), var(--bg-main));
  box-shadow:
    inset 0 0 0 1px rgb(var(--accent-rgb) / 0.18),
    0 0 2.2rem rgb(var(--accent-rgb) / 0.12);
}

.product-onboarding-illustration--step1::after {
  content: "✨";
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 1;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.9;
  pointer-events: none;
  text-shadow: 0 0 14px rgb(var(--accent-rgb) / 0.55);
}

.product-onboarding__layout--sandbox .product-onboarding__copy--intro {
  padding: 0.15rem 0;
}

.product-onboarding-illustration--step2 {
  background:
    linear-gradient(90deg, var(--bg-muted) 0%, var(--bg-muted) 48%, var(--bg-elevated) 52%, var(--bg-main) 100%),
    radial-gradient(circle at 22% 40%, rgb(var(--accent-rgb) / 0.3), transparent 45%),
    radial-gradient(circle at 78% 35%, rgb(var(--accent-rgb) / 0.22), transparent 48%);
}

.product-onboarding-illustration--step3 {
  background:
    radial-gradient(circle at 50% 55%, rgb(var(--accent-rgb) / 0.2), transparent 60%),
    linear-gradient(160deg, var(--bg-elevated), var(--bg-main));
}

.product-onboarding-illustration__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-onboarding__footer {
  flex-shrink: 0;
  margin-top: clamp(1rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.product-onboarding__dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
}

.product-onboarding__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
  cursor: pointer;
  transition: transform var(--token-motion-fast) var(--token-ease-out),
    background var(--token-motion-fast) var(--token-ease-out);
}

.product-onboarding__dot--active {
  background: var(--accent);
  transform: scale(1.2);
}

.product-onboarding__dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.45);
}

.product-onboarding__next {
  width: min(22rem, 100%);
  justify-content: center;
  font-size: calc(16px * var(--ui-font-scale, 1));
  padding: 0.8rem 1.25rem;
}

.product-onboarding__skip {
  align-self: flex-end;
  margin-top: 0.25rem;
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: calc(14px * var(--ui-font-scale, 1));
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: right;
}

.product-onboarding__skip:hover {
  color: var(--text-main);
}

.product-onboarding__skip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.38);
  border-radius: 4px;
}

.guest-register-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(1, 3, 8, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.guest-register-card {
  width: min(28rem, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--header-background);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  padding: 1.15rem 1.2rem;
}

.guest-register-title {
  margin: 0;
  font-size: 1.15rem;
}

.guest-register-text {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-main);
}

.guest-register-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guest-register-actions .ui-button {
  width: 100%;
  justify-content: center;
}

.app-main--guest-gate,
.app-main--welcome {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: min(70vh, 520px);
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
}

.guest-section-gate {
  width: min(32rem, 100%);
  margin: 0 auto;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--header-background);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.guest-section-gate__title {
  margin: 0;
  font-size: 1.15rem;
}

.guest-section-gate__text {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-main);
}

.guest-section-gate__actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guest-section-gate__actions .ui-button {
  width: 100%;
  justify-content: center;
}

.guest-section-gate__login {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

.guest-world-picker {
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--header-background);
  box-shadow: var(--shadow-soft);
}

.guest-world-picker__own-story {
  margin-top: 1rem;
}

.guest-world-picker__grid,
.welcome-landing__worlds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.featured-world-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.featured-world-card--busy {
  opacity: 0.82;
}

.featured-world-card:disabled {
  cursor: wait;
}

.featured-world-card:hover:not(:disabled),
.featured-world-card:focus-visible:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
}

.featured-world-card__cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
}

.featured-world-card__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.featured-world-card__title,
.featured-world-card__tagline,
.featured-world-card__genre,
.featured-world-card__cta {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.featured-world-card__title {
  font-size: 0.98rem;
  font-weight: 600;
}

.featured-world-card__tagline {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

.featured-world-card__genre {
  font-size: 0.75rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.55));
}

.featured-world-card__cta {
  margin-top: 0.15rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent, #7dd3c0);
}

.featured-world-card--compact .featured-world-card__tagline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guest-world-picker__back {
  margin-top: 1rem;
}

.welcome-landing {
  width: min(46rem, 100%);
  margin: 0 auto;
  padding: 0 0.15rem;
}

.product-intro-hero {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.35rem);
  padding: clamp(1.15rem, 3.2vw, 1.65rem);
  border-radius: var(--radius-lg);
  border: 1px solid rgb(var(--accent-rgb) / 0.2);
  background:
    radial-gradient(ellipse 95% 75% at 0% 0%, rgb(var(--accent-rgb) / 0.14), transparent 58%),
    radial-gradient(ellipse 70% 55% at 100% 100%, rgb(var(--accent-deep-rgb) / 0.1), transparent 62%),
    linear-gradient(165deg, rgb(255 255 255 / 0.04), transparent 72%);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.product-intro-hero__headline {
  display: grid;
  gap: 0.55rem;
}

.product-intro-hero__title {
  margin: 0;
  font-size: clamp(1.7rem, 4.8vw, 2.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.product-intro-hero__tagline {
  margin: 0 auto;
  max-width: 30ch;
  font-size: calc(16px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--text-muted);
}

.product-intro-hero__highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-intro-hero__highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 4.6rem;
  padding: 0.7rem 0.45rem;
  border-radius: var(--radius-md);
  border: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(0 0 0 / 0.14);
}

.product-intro-hero__highlight-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.product-intro-hero__highlight-label {
  font-size: calc(12.5px * var(--ui-font-scale, 1));
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
}

.product-intro-hero__perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.product-intro-hero__perk {
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  border: 1px solid rgb(var(--accent-rgb) / 0.3);
  background: rgb(var(--accent-rgb) / 0.1);
}

.product-intro-hero--onboarding {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  text-align: left;
}

@media (min-width: 768px) {
  .product-intro-hero--onboarding .product-intro-hero__tagline {
    margin-left: 0;
    max-width: 34ch;
  }

  .product-intro-hero--onboarding .product-intro-hero__perks {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .product-intro-hero__highlights {
    grid-template-columns: 1fr;
  }

  .product-intro-hero__highlight {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 0;
    padding: 0.65rem 0.8rem;
    text-align: left;
  }
}

.welcome-landing__actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}

.welcome-landing__cta {
  width: min(22rem, 100%);
  justify-content: center;
  font-size: calc(16px * var(--ui-font-scale, 1));
  padding: 0.85rem 1.35rem;
}

.welcome-landing__benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.welcome-landing__benefit {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
}

.welcome-landing__benefit-title {
  margin: 0;
  font-size: 0.95rem;
}

.welcome-landing__benefit-text {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted, rgba(255, 255, 255, 0.78));
}

.welcome-landing__worlds {
  margin-top: 1.75rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--header-background);
  box-shadow: var(--shadow-soft);
}

.welcome-landing__worlds-title {
  margin: 0;
  font-size: 1.05rem;
}

.welcome-landing__worlds-lead {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted, rgba(255, 255, 255, 0.78));
}

.welcome-landing__worlds-more {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
}

.welcome-landing__login {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

.app-header--native-welcome {
  justify-content: flex-start;
}

.app-header--native-welcome .app-logo {
  cursor: default;
}

.app-main--native-welcome {
  min-height: 0;
  padding-bottom: calc(1rem + var(--immersi-safe-bottom));
}

.native-welcome {
  width: min(26rem, 100%);
  margin: 0 auto;
  padding: 0 0.15rem;
}

.native-welcome__hero {
  text-align: left;
}

.native-welcome__title {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.native-welcome__tagline {
  margin: 0.55rem 0 0;
  font-size: calc(15px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: var(--text-muted);
}

.native-welcome__worlds {
  margin-top: 1.15rem;
}

.native-welcome__worlds-grid {
  display: grid;
  gap: 0.65rem;
}

.native-welcome__actions {
  margin-top: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.native-welcome__cta {
  width: 100%;
  justify-content: center;
}

.native-welcome__login {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

@media (max-width: 960px) {
  .app-main {
    grid-template-columns: 1fr;
  }

  .side-panels--game {
    flex-direction: column;
    overflow: visible;
    gap: 10px;
  }

  .side-panels:not(.side-panels--game) .side-card {
    min-width: 0;
  }
}

/* Сворачиваемые боковые секции в игре (узкий экран) */
.side-panel-section {
  border: none;
  margin: 0;
  padding: 0;
}

.side-panel-section__summary {
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.side-panel-section__title {
  margin: 0;
  flex: 1 1 auto;
}

.side-panel-section__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.22);
  color: var(--text-main);
}

.side-panel-section__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform var(--token-motion-base) var(--token-ease-out);
  flex-shrink: 0;
  margin-right: 2px;
}

.side-panel-section--open .side-panel-section__chevron {
  transform: rotate(-135deg) translateY(2px);
}

.collapsible-reveal {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms var(--token-ease-out);
}

.collapsible-reveal--open {
  grid-template-rows: 1fr;
}

.collapsible-reveal__inner {
  min-height: 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .collapsible-reveal {
    transition: none;
  }
}

/* Сворачивается на любой ширине (справка «Броски и статы» в режиме Игра) */
.side-panels--game .side-panel-section--always-collapsible .side-panel-section__summary {
  display: flex;
}

.side-panels--game .side-panel-section--always-collapsible.side-panel-section--open .side-panel-section__collapse {
  margin-top: 8px;
}

.side-panels--game
  .side-panel-section--always-collapsible
  .side-panel-section__collapse
  > .collapsible-reveal__inner
  > .side-panel-section__body {
  display: flex;
  flex-direction: column;
}

@media (max-width: 960px) {
  .side-panels--game .side-panel-section__body > .side-title:first-child {
    display: none;
  }

  .side-panels--game .side-panel-section__summary {
    display: flex;
  }

  .side-panels--game .side-panel-section--open .side-panel-section__collapse {
    margin-top: 8px;
  }

  .side-panels--game .side-panel-section__collapse > .collapsible-reveal__inner > .side-panel-section__body {
    display: flex;
    flex-direction: column;
  }
}

.cozy-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0.5rem 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgb(214 86 86 / 0.28);
  background: rgb(214 86 86 / 0.08);
}

.cozy-error__icon {
  flex-shrink: 0;
  width: 1.35rem;
  margin-top: 0.05rem;
  font-size: 1.1rem;
  line-height: 1;
  text-align: center;
  color: rgb(245 196 196 / 0.85);
}

.cozy-error__body {
  flex: 1 1 auto;
  min-width: 0;
}

.cozy-error--network {
  border-color: rgb(var(--accent-rgb) / 0.32);
  background: rgb(var(--accent-rgb) / 0.08);
}

.cozy-error--network .cozy-error__icon {
  color: rgb(var(--accent-rgb) / 0.75);
}

.cozy-error--network .cozy-error__title {
  color: var(--text-main);
}

.cozy-error--network .cozy-error__text {
  color: var(--text-muted);
}

.cozy-error--sheets-gift {
  border-color: rgb(var(--accent-rgb) / 0.38);
  background:
    radial-gradient(circle at 12% 18%, rgb(var(--accent-rgb) / 0.14), transparent 52%),
    rgb(var(--accent-rgb) / 0.07);
}

.cozy-error--sheets-gift .cozy-error__icon {
  color: rgb(var(--accent-rgb) / 0.9);
}

.cozy-error--sheets-gift .cozy-error__title {
  color: var(--text-main);
}

.cozy-error__title {
  margin: 0 0 0.35rem;
  font-size: calc(14px * var(--ui-font-scale, 1));
  font-weight: 600;
  color: #f5c4c4;
}

.cozy-error__text {
  margin: 0;
  font-size: calc(14px * var(--ui-font-scale, 1));
  line-height: 1.5;
  color: var(--text-main);
}

.cozy-error__retry {
  margin-top: 0.65rem;
}

.ui-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  gap: 0.45rem;
}

.ui-empty-state__mark {
  width: 40px;
  height: auto;
  opacity: 0.88;
  margin-bottom: 0.25rem;
}

.ui-empty-state__title {
  margin: 0;
  font-size: calc(15px * var(--ui-font-scale, 1));
  font-weight: 600;
  color: var(--text-main);
}

.ui-empty-state__text {
  margin: 0;
  max-width: 22rem;
  font-size: calc(14px * var(--ui-font-scale, 1));
  line-height: 1.5;
  color: var(--text-muted);
}

.ui-empty-state__action {
  margin-top: 0.5rem;
}

.ui-empty-state--compact {
  padding: 0.65rem 0.5rem;
}

.ui-empty-state--compact .ui-empty-state__mark {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.35rem;
}

.ui-empty-state--in-card {
  padding: 0.85rem 0.5rem;
}

.ui-empty-state--in-card .ui-empty-state__mark {
  width: 32px;
}

.achievement-badge-grid__empty {
  grid-column: 1 / -1;
}

.ui-empty-state__text--align-start {
  text-align: left;
  max-width: none;
}

.home-news-feed {
  display: flex;
  flex-direction: column;
  margin-top: 0.65rem;
}

.home-news-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.home-news-item:first-child {
  padding-top: 0.15rem;
}

.home-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0.1rem;
}

.home-news-item__meta {
  display: block;
  margin: 0 0 0.3rem;
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.35;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.home-news-item__title {
  margin: 0 0 0.35rem;
  font-size: calc(16px * var(--ui-font-scale, 1));
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

.home-news-item__body {
  font-size: calc(15px * var(--ui-font-scale, 1));
  line-height: 1.55;
  color: var(--token-text-secondary);
}

.home-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.home-tip-card {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgb(var(--accent-rgb) / 0.14);
  background: rgb(0 0 0 / 0.12);
}

.home-tip-card--cta {
  border-color: rgb(var(--accent-rgb) / 0.28);
  background: linear-gradient(145deg, rgb(var(--accent-rgb) / 0.12), rgba(0, 0, 0, 0.18));
}

.home-tip-card__title {
  margin: 0;
  font-size: calc(15px * var(--ui-font-scale, 1));
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

.home-tip-card__text {
  margin: 0.4rem 0 0;
  font-size: calc(14px * var(--ui-font-scale, 1));
  line-height: 1.5;
  color: var(--text-muted);
}

.home-tip-card__action {
  margin-top: 0.65rem;
}

.form-field-hint {
  margin: 0.35rem 0 0;
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.45;
  color: #e8c4a8;
}

.participant-chat-empty {
  margin: 0 0 0.5rem;
}

.story-dice-checks-card {
  margin-top: 0;
}

.pwa-install-hint {
  position: fixed;
  left: max(1rem, var(--immersi-safe-left));
  right: max(1rem, var(--immersi-safe-right));
  bottom: calc(1rem + var(--immersi-safe-bottom));
  z-index: 90;
  max-width: 54rem;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--header-background);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-app-game-view="1"] .app-main--game {
  scroll-padding-bottom: calc(6rem + var(--immersi-safe-bottom));
}

@media (max-width: 960px) {
  html[data-app-game-view="1"] .app-header {
    scroll-margin-top: var(--immersi-safe-top);
  }
}

html[data-cookie-banner-visible="1"] .app-main--game .side-panels--game,
html[data-pwa-install-hint-visible="1"] .app-main--game .side-panels--game {
  padding-bottom: 5.5rem;
}

html[data-cookie-banner-visible="1"][data-pwa-install-hint-visible="1"] .app-main--game .side-panels--game {
  padding-bottom: calc(5.5rem + 4.5rem);
}

html[data-cookie-banner-visible="1"][data-app-game-view="1"] .pwa-install-hint {
  bottom: calc(5.75rem + var(--immersi-safe-bottom));
}

html[data-app-game-view="1"] .app-main--game .custom-action-form {
  scroll-margin-bottom: calc(5rem + var(--immersi-safe-bottom));
}

html.platform-android[data-native-keyboard-open="1"] .app-bottom-nav {
  transform: translateY(calc(100% + 24px + var(--immersi-safe-bottom)));
  opacity: 0.01;
  pointer-events: none;
}

html.platform-android[data-native-keyboard-open="1"] .app-bottom-fab,
html.platform-android[data-native-keyboard-open="1"] .app-bottom-fab-quick {
  transform: translateY(calc(100% + 24px + var(--immersi-safe-bottom)));
  opacity: 0.01;
  pointer-events: none;
}

html.platform-android[data-native-keyboard-open="1"] .app-root {
  padding-bottom: calc(var(--immersi-keyboard-inset, 0px) + var(--immersi-safe-bottom));
}

html.platform-android[data-native-keyboard-open="1"] .app-main--game {
  scroll-padding-bottom: calc(var(--immersi-keyboard-inset, 0px) + 6rem + var(--immersi-safe-bottom));
}

html.platform-android[data-native-keyboard-open="1"] .app-main--game .custom-action-form {
  scroll-margin-bottom: calc(var(--immersi-keyboard-inset, 0px) + 5rem + var(--immersi-safe-bottom));
}

html.platform-android[data-native-keyboard-open="1"] .app-main--game .side-panels--game {
  padding-bottom: calc(var(--immersi-keyboard-inset, 0px) + 1rem);
}

html.platform-android[data-native-keyboard-open="1"] .modal-card--bottom-sheet {
  max-height: min(88vh, calc(100vh - var(--immersi-safe-top) - var(--immersi-keyboard-inset, 0px) - 12px));
}

html.platform-android[data-native-keyboard-open="1"] .native-bottom-sheet__body {
  padding-bottom: calc(14px + var(--immersi-safe-bottom) + var(--immersi-keyboard-inset, 0px) * 0.15);
}

/* Android APK: bottom sheet для игровых панелей */
.modal-backdrop--sheet {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgb(1 3 8 / 0.62);
}

.modal-card--bottom-sheet {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 20px 20px 0 0;
  border-bottom: none;
  max-height: min(88vh, calc(100vh - var(--immersi-safe-top) - 12px));
  display: flex;
  flex-direction: column;
  padding: 0;
  animation: native-bottom-sheet-in 0.28s var(--token-ease-out);
}

.native-bottom-sheet__handle {
  width: 40px;
  height: 4px;
  margin: 10px auto 6px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.28);
  flex-shrink: 0;
}

.native-bottom-sheet__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.native-bottom-sheet__title {
  flex: 1 1 auto;
  margin: 0;
}

.native-bottom-sheet__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.04);
  color: var(--text-main);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.native-bottom-sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px calc(14px + var(--immersi-safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.side-panel-section__body--sheet {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

html.platform-android .side-panels--game.side-panels--sheet-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

html.platform-android .side-panels--game.side-panels--sheet-mode .side-panel-section--sheet-trigger .side-panel-section__summary {
  min-height: 48px;
}

html.platform-android .side-panels--game.side-panels--sheet-mode .side-panel-section__body > .side-title:first-child {
  display: block;
}

/* Android APK: pull-to-refresh */
.native-ptr {
  position: relative;
}

.native-ptr__indicator-wrap {
  position: fixed;
  top: calc(var(--immersi-safe-top) + 6px);
  left: 50%;
  z-index: 70;
  margin-left: -14px;
  pointer-events: none;
}

.native-ptr__indicator {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgb(var(--accent-rgb) / 0.35);
  border-top-color: rgb(var(--accent-rgb) / 0.95);
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.native-ptr__indicator[data-active="1"] {
  opacity: 1;
  animation: native-ptr-spin 0.8s linear infinite;
}

@keyframes native-bottom-sheet-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .modal-card--bottom-sheet {
    animation: none;
  }

  .native-ptr__indicator[data-active="1"] {
    animation: none;
  }
}

@media (max-width: 600px) {
  .pwa-install-hint {
    left: 0.6rem;
    right: 0.6rem;
    bottom: calc(0.6rem + var(--immersi-safe-bottom));
    border-radius: 16px;
  }
}

.pwa-install-hint__title {
  margin: 0 0 0.25rem;
  font-size: 14px;
  font-weight: 600;
}

.pwa-install-hint__text {
  margin: 0 0 0.65rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.pwa-install-instructions--emphasis {
  color: var(--text);
  outline: 2px solid rgb(var(--accent-rgb) / 0.55);
  outline-offset: 4px;
  border-radius: 8px;
  transition: outline-color 0.2s ease, color 0.2s ease;
}

.pwa-install-hint__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

@media (prefers-reduced-motion: reduce) {
  .achievement-badge--just-unlocked .achievement-badge__icon-img,
  .achievement-congrats-modal__glyph {
    animation: none !important;
  }

  .app-main--view-fade {
    animation: none !important;
  }

  .home-illustration-image {
    animation: none !important;
  }

  .story-generation-progress,
  .story-generation-progress-bar,
  .story-generation-dot,
  .story-generation-line {
    animation: none !important;
  }
}

.app-main--view-fade {
  animation: appMainViewFade 0.24s var(--token-ease-out) both;
}

@keyframes appMainViewFade {
  from {
    opacity: 0.82;
  }
  to {
    opacity: 1;
  }
}

.profile-sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0.5rem;
}

.profile-sound-row + .profile-sound-row {
  margin-top: 0.35rem;
}

.profile-sound-preview {
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 640px) {
  .app-logo-slogan {
    display: none;
  }

  .app-header {
    border-radius: 16px;
    align-items: center;
    padding: 10px 12px;
  }

  .app-header-right {
    align-items: center;
    max-width: min(100%, calc(100vw - 90px));
    gap: 6px;
  }

  .app-root {
    padding: calc(10px + var(--immersi-safe-top)) calc(10px + var(--immersi-safe-right))
      calc(14px + var(--immersi-safe-bottom)) calc(10px + var(--immersi-safe-left));
  }

  .story-panel {
    padding: 14px 14px 16px;
  }

  .app-header--session .ui-button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .age-gate-actions {
    justify-content: stretch;
  }

  .age-gate-actions .ui-button,
  .age-gate-actions .custom-action-submit {
    width: 100%;
  }
}

.achievement-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 5.5rem;
  max-width: 10rem;
  padding: 0.45rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

.achievement-badge--unlocked {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.08);
}

.achievement-badge--just-unlocked .achievement-badge__icon-img {
  animation: achievementBadgePop 0.42s var(--token-ease-out);
}

@keyframes achievementBadgePop {
  0% {
    transform: scale(0.88);
    opacity: 0.75;
  }
  55% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.achievement-badge__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.achievement-badge__icon-img {
  display: block;
  width: 2.65rem;
  height: 2.65rem;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.98;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 8px rgba(212, 175, 55, 0.18));
}

.achievement-badge--secret .achievement-badge__icon-img {
  opacity: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 10px rgba(180, 160, 220, 0.22));
}

.achievement-badge__label {
  font-size: calc(11px * var(--ui-font-scale, 1));
  text-align: center;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.88);
}

.achievement-full-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.achievement-progress-toggle {
  margin-top: 0.7rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.4rem 0.8rem;
  background: rgba(5, 8, 22, 0.65);
  color: var(--text-main);
  font-size: calc(13px * var(--ui-font-scale, 1));
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.achievement-progress-toggle:hover {
  background: rgb(var(--accent-rgb) / 0.22);
  border-color: rgb(var(--accent-rgb) / 0.7);
}

.achievement-progress-toggle__chevron {
  flex-shrink: 0;
  font-size: 0.85rem;
  opacity: 0.85;
  transition: transform 0.22s ease;
}

.achievement-progress-toggle[aria-expanded="true"] .achievement-progress-toggle__chevron {
  transform: rotate(180deg);
}

.achievement-progress-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.24s ease, opacity 0.2s ease;
}

.achievement-progress-collapse--expanded {
  grid-template-rows: 1fr;
  opacity: 1;
}

.achievement-progress-collapse__inner {
  min-height: 0;
  overflow: hidden;
}

.achievement-full-list__row {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.achievement-full-list__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.achievement-progress-track {
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.35rem 0 0.2rem;
  overflow: hidden;
}

.achievement-progress-track__fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.75), rgba(56, 189, 248, 0.65));
  min-width: 0;
  transition: width 0.25s ease;
}

.achievement-congrats-modal {
  text-align: center;
  max-width: 22rem;
}

.achievement-congrats-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin-bottom: 0.35rem;
}

.achievement-congrats-modal__glyph {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.98;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 14px rgba(212, 175, 55, 0.2));
  animation: achievementBadgePop 0.45s var(--token-ease-out);
}

.achievement-congrats-modal__title {
  font-size: calc(17px * var(--ui-font-scale, 1));
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.achievement-secret-pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: rgba(253, 224, 71, 0.95);
  vertical-align: middle;
}

.achievement-badge--secret {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.1);
}

.achievement-full-list__row--secret {
  opacity: 0.92;
}

/* Персонажи из библиотеки: недоступные (занятые) пункты списка — приглушённый текст */
select.character-library-select option:disabled {
  color: rgba(150, 155, 175, 0.75);
}

.site-broadcast-backdrop {
  z-index: 13050;
}

.app-exit-confirm-backdrop {
  z-index: 13100;
}

.site-broadcast-modal {
  max-height: min(80vh, 32rem);
  overflow-y: auto;
}

.ui-button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--token-font-family);
  font-size: var(--token-fs-14);
  font-weight: 600;
  line-height: 1;
  transition:
    background-color var(--token-motion-base) var(--token-ease-out),
    border-color var(--token-motion-base) var(--token-ease-out),
    color var(--token-motion-base) var(--token-ease-out),
    transform var(--token-motion-fast) var(--token-ease-out),
    box-shadow var(--token-motion-fast) var(--token-ease-out);
  cursor: pointer;
}

.ui-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ui-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.38);
}

.ui-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ui-button--primary {
  color: var(--text-main);
  background: rgb(var(--accent-rgb) / 0.13);
  border-color: rgb(var(--accent-rgb) / 0.34);
}

.ui-button--primary:hover:not(:disabled) {
  background: rgb(var(--accent-rgb) / 0.2);
  border-color: rgb(var(--accent-rgb) / 0.46);
}

.ui-button--secondary {
  color: var(--token-text-primary);
  background: transparent;
  border-color: var(--token-border-subtle);
}

.ui-button--secondary:hover:not(:disabled) {
  background: rgb(var(--accent-rgb) / 0.09);
  border-color: rgb(var(--accent-rgb) / 0.32);
}

.ui-button--ghost {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
}

.ui-button--ghost:hover:not(:disabled) {
  color: var(--text-main);
  background: rgb(var(--accent-rgb) / 0.06);
  border-color: transparent;
}

.ui-button--danger {
  color: #fcecec;
  background: rgb(214 86 86 / 0.18);
  border-color: rgb(214 86 86 / 0.38);
}

.ui-button--danger:hover:not(:disabled) {
  background: rgb(214 86 86 / 0.26);
  border-color: rgb(214 86 86 / 0.48);
}

.ui-card {
  border-radius: var(--token-radius-md);
  border: 1px solid var(--token-border-subtle);
  background: var(--token-surface-elevated);
  box-shadow: var(--token-shadow-soft);
  transition:
    transform var(--token-motion-base) var(--token-ease-out),
    border-color var(--token-motion-base) var(--token-ease-out);
}

.ui-card--interactive:hover {
  transform: translateY(-1px);
  border-color: rgb(var(--accent-rgb) / 0.32);
}

.ui-card__inner {
  padding: 16px;
}

.ui-input-wrap {
  display: grid;
  gap: 6px;
}

.ui-input-label {
  font-size: var(--token-fs-12);
  font-weight: 600;
  color: var(--token-text-secondary);
}

.ui-input {
  width: 100%;
  min-height: 44px;
  border-radius: var(--token-radius-md);
  border: 1px solid var(--token-border-subtle);
  background: rgb(7 11 28 / 0.72);
  color: var(--token-text-primary);
  padding: 0 14px;
  font-family: var(--token-font-family);
  font-size: var(--token-fs-16);
  transition:
    border-color var(--token-motion-fast) var(--token-ease-out),
    box-shadow var(--token-motion-fast) var(--token-ease-out);
}

.ui-input::placeholder {
  color: var(--token-text-muted);
}

.ui-input:focus-visible {
  outline: none;
  border-color: rgb(var(--accent-rgb) / 0.52);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.28);
}

.ui-input--error {
  border-color: rgb(225 107 107 / 0.75);
}

.ui-input-error {
  margin: 0;
  font-size: var(--token-fs-12);
  color: var(--token-error);
}

/* Единый вид с ui-button--primary для legacy-класса custom-action-submit */
button.custom-action-submit,
.custom-action-submit {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgb(var(--accent-rgb) / 0.34);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--token-font-family);
  font-size: var(--token-fs-14);
  font-weight: 600;
  line-height: 1;
  color: var(--text-main);
  background: rgb(var(--accent-rgb) / 0.13);
  transition:
    background-color var(--token-motion-base) var(--token-ease-out),
    border-color var(--token-motion-base) var(--token-ease-out),
    color var(--token-motion-base) var(--token-ease-out),
    transform var(--token-motion-fast) var(--token-ease-out),
    box-shadow var(--token-motion-fast) var(--token-ease-out);
  cursor: pointer;
}

button.custom-action-submit:hover:not(:disabled),
.custom-action-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgb(var(--accent-rgb) / 0.2);
  border-color: rgb(var(--accent-rgb) / 0.46);
}

button.custom-action-submit:focus-visible,
.custom-action-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.38);
}

button.custom-action-submit:disabled,
.custom-action-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
