/* Onest: локальные шрифты (self-hosted), субсеты с unicode-range */
/* cyrillic-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmS-HY6EQ.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmb-HY6EQ.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* math */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xnj-HY6EQ.woff2) format('woff2');
  unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-209F, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xnx-HY6EQ.woff2) format('woff2');
  unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmQ-HY6EQ.woff2) format('woff2');
  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;
}
/* latin-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmR-HY6EQ.woff2) format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmf-HY.woff2) format('woff2');
  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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmS-HY6EQ.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmb-HY6EQ.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* math */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xnj-HY6EQ.woff2) format('woff2');
  unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-209F, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xnx-HY6EQ.woff2) format('woff2');
  unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmQ-HY6EQ.woff2) format('woff2');
  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;
}
/* latin-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmR-HY6EQ.woff2) format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmf-HY.woff2) format('woff2');
  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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmS-HY6EQ.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmb-HY6EQ.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* math */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xnj-HY6EQ.woff2) format('woff2');
  unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-209F, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xnx-HY6EQ.woff2) format('woff2');
  unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmQ-HY6EQ.woff2) format('woff2');
  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;
}
/* latin-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmR-HY6EQ.woff2) format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmf-HY.woff2) format('woff2');
  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;
}

/* JailbreakHub. Токены и роли: см. DESIGN.md */

/* Темы. Тёмная по умолчанию (задание пользователя). */
:root {
  --font: "Onest", "Segoe UI", sans-serif;
  --radius: 12px;    /* карточки, кнопки, поля, картинки */
  --radius-sm: 8px;  /* мелкие чипы и мини-кнопки */
  --radius-lg: 16px; /* диалоги и лайтбокс */
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #FAFAF9;
  --card: #FFFFFF;
  --surface: #F3F3F0;
  --text: #141414;
  --text-2: #6B6B6B;
  --line: #E6E6E3;
  --line-strong: #CFCFC9;
  --accent: #E8420A;        /* графика: 3.85:1 на bg */
  --accent-ink: #C33405;    /* мелкий текст акцентом: 5.2:1 */
  --chip-bg: #FBECE6;
  --censor: #141414;
  --btn-bg: #141414;
  --btn-bg-hover: #2E2E2B;
  --btn-fg: #FFFFFF;
  --sel-bg: #E8420A;
  --sel-fg: #FFFFFF;
  --backdrop: rgba(20, 20, 20, 0.55);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100F0E;
  --card: #191715;
  --surface: #221F1C;
  --text: #F1EFEB;
  --text-2: #A9A59E;
  --line: #2B2926;
  --line-strong: #413E3A;
  --accent: #FF6B35;        /* графика и текст: 6:1 на card */
  --accent-ink: #FF6B35;
  --chip-bg: rgba(255, 107, 53, 0.14);
  --censor: #FF6B35;
  --btn-bg: #F1EFEB;
  --btn-bg-hover: #D8D5CF;
  --btn-fg: #141312;
  --sel-bg: #FF6B35;
  --sel-fg: #141312;
  --backdrop: rgba(0, 0, 0, 0.65);
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  height: 100%;
  /* Резервируем место под скроллбар: ширина страницы не прыгает,
     когда вкладка «Промпты» становится выше экрана. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

::selection { background: var(--sel-bg); color: var(--sel-fg); }

.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;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

/* Шапка: логотип слева, кнопки справа — на одной высоте */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.icon-btn:hover { color: var(--text); background: var(--surface); }
.icon-btn:active {
  transition-duration: 0.06s, 0.06s, 0.06s;
  transform: translateY(1px);
  background: var(--surface);
  color: var(--accent);
}

.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .ic-sun { display: none; }
html[data-theme="dark"] .icon-btn .ic-sun { display: block; }
html[data-theme="dark"] .icon-btn .ic-moon { display: none; }

.topbar-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  transition: filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-mark img { width: 100%; height: 100%; display: block; }
html[data-theme="dark"] .brand-mark img { filter: invert(1); }
a.brand-mark:hover { filter: brightness(1.2); }

.wordmark {
  margin: 18px 0 0;
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.censor-wrap { position: relative; display: inline-block; }

.censor {
  position: absolute;
  top: 0.08em;
  bottom: 0.06em;
  left: -0.04em;
  right: -0.04em;
  background: var(--censor);
  transform: scaleX(0);
  transform-origin: 0% 50%;
  pointer-events: none;
}

.tagline {
  margin: 14px 0 0;
  max-width: 46ch;
  color: var(--text-2);
}

/* Вкладки */

.tabs {
  position: relative;
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab {
  appearance: none;
  background: none;
  border: 0;
  padding: 12px 2px 14px;
  min-height: 48px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab:active {
  transition-duration: 0.06s, 0.06s, 0.06s;
  transform: translateY(1px);
  background-color: var(--surface);
}

.tab:focus-visible,
.icon-btn:focus-visible,
.btn-copy:focus-visible,
.fchip:focus-visible,
.btn-ghost:focus-visible,
.search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.search input:focus-visible { outline-offset: 1px; }

.tab-indicator {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent);
}

/* Контент */

.content {
  position: relative;
  padding-top: 24px;
  min-height: 260px;
}

.wipe-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  /* Над карточками: clip-path панели создаёт контекст наложения,
     без z-index линия прячется за постами при анимации. */
  z-index: 1;
}

.empty { padding: 40px 0 16px; }

.empty-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.empty-mark svg { width: 20px; height: 20px; }

.empty h2 {
  margin: 16px 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.empty p {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text-2);
}

.state-error { padding: 40px 0 16px; }
.state-error p { margin: 0 0 16px; font-size: 14px; color: var(--text-2); }

/* Скелет загрузки */

.skel-post { padding: 8px 0; }

.skel {
  background: var(--surface);
  animation: skel-pulse 1.4s ease-in-out infinite;
}

@keyframes skel-pulse { 50% { opacity: 0.5; } }

.skel-chip { width: 72px; height: 24px; margin-bottom: 16px; }
.skel-line { height: 16px; margin-bottom: 10px; }
.skel-box { height: 88px; margin-top: 20px; }

/* Фильтры */

.filters { margin-bottom: 24px; }

.filters-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 36px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.search input::placeholder { color: var(--text-2); }
.search input:focus { border-color: var(--accent); outline: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.sort { display: flex; gap: 8px; flex-shrink: 0; }

.fchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Вторая строка фильтра: точные модели внутри выбранного семейства */
.fchips.model-exact { margin-top: 8px; }

.fchip .chip-logo {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

.fchip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  min-height: 44px;
  cursor: pointer;
  transition:
    color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fchip:hover { color: var(--text); border-color: var(--text-2); }
.fchip[aria-pressed="true"] {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--chip-bg);
}
.fchip:active {
  transition-duration: 0.06s, 0.06s, 0.06s, 0.06s;
  transform: translateY(1px);
  background-color: var(--surface);
}

.results-count {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-2);
}

/* Карточка промпта */

.post {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.post + .post { margin-top: 16px; }

.post-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

.chip-model {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--chip-bg);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chip-model .chip-logo { width: 14px; height: 14px; flex-shrink: 0; }
.chip-model img.chip-logo { background: #fff; border: 1px solid rgba(0, 0, 0, 0.08); }

.post-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.post-head-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.post-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Автор: админ — ключ и акцент, читатель — обычная подпись,
   «Аноним» — приглушённый призрак с пунктирным подчёркиванием.
   Тултип роли («Администратор»/«Пользователь») — общий .has-tip. */

.author-badge { position: relative; cursor: default; }

/* Кастомный тултип вместо браузерного title: плашка-инверсия темы */

.has-tip {
  position: relative;
  cursor: default;
}

.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 3px);
  padding: 5px 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 6;
}

.has-tip:hover::after,
.has-tip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.author-admin { color: var(--accent-ink); }

.author-anon { color: var(--text-2); font-style: italic; }
.author-anon > span {
  padding-bottom: 1px;
  border-bottom: 1px dashed currentColor;
}

.post-title {
  margin: 14px 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Выбор нескольких моделей: тумблер «Несколько», чипы с удалением */
.model-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.multi-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Кастомный чекбокс: нативный input скрыт (доступность и клавиатура сохраняются) */
.multi-toggle .checkbox-native {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
}

.checkbox-box {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: transparent;
  transition:
    background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-box svg { width: 10px; height: 10px; }

.multi-toggle:hover .checkbox-box { border-color: var(--text-2); }

.checkbox-native:checked + .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-fg);
}

.checkbox-native:focus-visible + .checkbox-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.model-input-row {
  display: flex;
  gap: 8px;
}

.model-input-row input { flex: 1 1 auto; min-width: 0; }

.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Группа чипов моделей в карточке: держится вместе, не растягивается шапкой */
.model-chips-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 5px 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--chip-bg);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
}

.model-chip .chip-logo { width: 14px; height: 14px; }

.model-chip-x {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 2px 5px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.model-chip-x:hover { opacity: 1; }

.dlg-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-2);
}

.post-desc {
  margin: 0;
  color: var(--text-2);
}

.news-body {
  margin: 14px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.news-post .post-head-meta { margin-left: 0; }

.prompt-box {
  margin-top: 20px;
  padding: 14px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.prompt-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.prompt-clamp { overflow: hidden; }

.post.collapsed .prompt-clamp { max-height: 4.8em; }
.post.collapsed .prompt-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompt-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Эмодзи в текстах: картинки Apple-стиля, размер по шрифту контекста */

.emoji-img {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.22em;
  margin: 0 1px;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 6px 0;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-ink);
  cursor: pointer;
  transition: color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-more:hover { color: var(--text); }
.btn-more svg { width: 14px; height: 14px; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.post.expanded .btn-more svg { transform: rotate(180deg); }

.post-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Голосование «Работает/Не работает» */

.vote-group {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.vote-btn svg { width: 16px; height: 16px; }
.vote-btn:hover { color: var(--text); border-color: var(--text-2); }
.vote-btn:active {
  transition-duration: 0.06s, 0.06s, 0.06s, 0.06s;
  transform: scale(0.985);
}

.vote-btn .vote-count {
  min-width: 1em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vote-btn[aria-pressed="true"] {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--chip-bg);
}

.vote-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Чат */

.chat-list {
  display: flex;
  flex-direction: column;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 8px 0;
}

.chat-msg { padding: 10px 16px; }

.chat-msg + .chat-msg { border-top: 1px solid var(--line); }

.chat-nick {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
}

.chat-text {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-empty {
  margin: 0;
  padding: 18px 16px;
  font-size: 14px;
  color: var(--text-2);
}

.chat-inputbar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.chat-inputbar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-inputbar input::placeholder { color: var(--text-2); }

.chat-inputbar input:focus {
  border-color: var(--accent);
  outline: none;
}

.chat-inputbar .btn-copy { flex-shrink: 0; }

.chat-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--accent-ink);
  font-weight: 500;
}

.chat-error:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .vote-group { margin-left: 0; width: 100%; margin-top: 10px; }
  .vote-btn { flex: 1 1 auto; justify-content: center; }
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-copy:hover { background: var(--btn-bg-hover); }
.btn-copy:active {
  transition-duration: 0.06s, 0.06s;
  transform: scale(0.985);
  opacity: 0.85;
}

.btn-copy .ic { width: 16px; height: 16px; display: block; }
.btn-copy .ic-check { display: none; }
.btn-copy.is-copied .ic-copy { display: none; }
.btn-copy.is-copied .ic-check { display: block; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ghost:hover { border-color: var(--text-2); }
.btn-ghost:active {
  transition-duration: 0.06s, 0.06s, 0.06s, 0.06s;
  transform: scale(0.985);
  background-color: var(--surface);
}

/* Вложение */

.attach { margin: 20px 0 0; }

.attach img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.attach-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.attach-file:hover { border-color: var(--text-2); }
.attach-file svg { width: 16px; height: 16px; color: var(--text-2); flex-shrink: 0; }

/* Лайтбокс */

.lightbox {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  padding: 0;
  max-width: min(92vw, 1100px);
}

.lightbox::backdrop { background: var(--backdrop); }

.lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 84vh;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--backdrop);
  color: #fff;
  cursor: pointer;
}

.lightbox-close svg { width: 20px; height: 20px; }

/* Вход и аккаунт */

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-login svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-login:hover { border-color: var(--text-2); }
.btn-login:active {
  transition-duration: 0.06s;
  transform: translateY(1px);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.user-name {
  max-width: 140px;
  padding-left: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}

/* Кнопка «Предложить промпт» */

.composer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.composer-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: var(--accent);
  color: var(--btn-fg);
  cursor: pointer;
  transition:
    filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-btn svg { width: 20px; height: 20px; }
.composer-btn:hover { filter: brightness(1.12); }
.composer-btn:active {
  transition-duration: 0.06s;
  transform: translateY(1px);
  filter: brightness(0.9);
}

.composer-btn:focus-visible,
.btn-login:focus-visible,
.dlg input:focus-visible,
.dlg textarea:focus-visible,
.dlg .fchip:focus-visible,
.dlg .btn-ghost:focus-visible,
.dlg-mini:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.composer-hint {
  font-size: 13px;
  color: var(--text-2);
}

.mod-notice {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-ink);
}

/* Диалоги: никнейм и предложение промпта */

.dlg {
  padding: 24px;
  width: min(92vw, 560px);
}

.dlg-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dlg-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.dlg-sub {
  margin: 8px 0 20px;
  font-size: 14px;
  color: var(--text-2);
}

.dlg-field { margin-bottom: 16px; }

.dlg-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.dlg-opt {
  font-weight: 400;
  color: var(--text-2);
}

.dlg input[type="text"],
.dlg input:not([type]),
.dlg textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
  transition: border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dlg input { height: 44px; }

.dlg textarea {
  resize: none;
  overflow: hidden;
  min-height: 44px;
}

.dlg textarea.is-maxed { overflow-y: auto; }

.dlg input:focus,
.dlg textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.dlg .fchips { margin-top: 0; }

.dlg-file {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dlg-file .btn-ghost { height: 44px; padding: 0 14px; }
.dlg-file .btn-ghost svg { width: 16px; height: 16px; }

.dlg-file-name {
  font-size: 13px;
  color: var(--text-2);
  word-break: break-all;
}

.dlg-mini {
  background: none;
  border: 0;
  padding: 8px 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-ink);
  cursor: pointer;
  transition: color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.dlg-mini:hover { color: var(--text); }

.dlg-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--accent-ink);
  font-weight: 500;
}

.dlg-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

/* Подвал */

.footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 20px 0 44px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}

.footer a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer a:hover { color: var(--text); }
.footer a:active { transition-duration: 0.06s; color: var(--accent); }

/* Адаптив */

@media (max-width: 560px) {
  .page { padding-top: 28px; }
  .post { padding: 20px; }
  .filters-row { flex-direction: column; align-items: stretch; }
  .sort { justify-content: flex-start; }
  .dlg { padding: 20px; }
  .user-name { max-width: 90px; }
}

/* Сниженная анимация: мгновенные состояния */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .censor { display: none; }
  .tab:active, .fchip:active, .icon-btn:active, .btn-copy:active, .btn-ghost:active { transform: none; }
  .icon-btn:active { background: var(--line-strong); color: var(--accent); }
  .skel { animation: none; }
}

/* Скругления: единый радиус для карточек, кнопок, полей и картинок */

.icon-btn, .lightbox-close { border-radius: 10px; }

.search input, .empty-mark, .post, .prompt-box, .btn-copy, .btn-ghost,
.btn-login, .composer-btn, .attach img, .attach-file, .skel,
.dlg input[type="text"], .dlg input:not([type]), .dlg textarea,
.dlg input[type="search"] {
  border-radius: var(--radius);
}

.fchip, .chip-model { border-radius: var(--radius-sm); }

.lightbox { border-radius: var(--radius-lg); overflow: hidden; }

img.chip-logo { border-radius: 4px; }

/* Страница 404 */

.e404 { padding: 48px 0 16px; }

.e404-code {
  margin: 0;
  font-size: clamp(96px, 26vw, 170px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.e404-censor {
  animation: e404-sweep 1.9s cubic-bezier(0.65, 0, 0.35, 1) 0.3s 1 both;
}

@keyframes e404-sweep {
  0%   { transform: scaleX(0); transform-origin: 0% 50%; }
  40%  { transform: scaleX(1); transform-origin: 0% 50%; }
  60%  { transform: scaleX(1); transform-origin: 100% 50%; }
  100% { transform: scaleX(0); transform-origin: 100% 50%; }
}

.e404-title {
  margin: 28px 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.e404-text {
  margin: 0 0 28px;
  max-width: 46ch;
  color: var(--text-2);
}

.e404 .btn-copy { text-decoration: none; }
