/* Почта Dizord: кобальт, зелёная точка и шрифты сайта dizord.ru (Unbounded + Onest) */
@font-face { font-family: "Onest"; src: url(fonts/onest-cyrillic.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url(fonts/onest-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-cyrillic.woff2) format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-latin.woff2) format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --bg: #F0F0F7;
  --surface: #FFFFFF;
  --soft: #F7F7FC;
  --line: rgba(18, 14, 60, .11);
  --line-strong: rgba(18, 14, 60, .22);
  --ink: #12102A;
  --ink-2: #4A4866;
  --ink-3: #6F6D88;
  --green: #2A1BF5;
  --green-ink: #1A1190;
  --green-deep: #2A1BF5;
  --tint: #EEEBFF;
  --yellow: #2A1BF5;
  --yellow-hi: #3D2FFF;
  --yellow-ink: #FFFFFF;
  --danger: #B3261E;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --rail: 248px;
  --list: 392px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 600; white-space: nowrap; transition: background-color .15s; }
.btn--main { background: var(--yellow); color: var(--yellow-ink); }
.btn--main:hover { background: var(--yellow-hi); }
.btn--main:disabled { opacity: .6; cursor: default; }
.btn--line { border: 1px solid var(--line-strong); background: var(--surface); }
.btn--line:hover { background: var(--soft); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn.is-on { color: #E0A100; }
.icon-btn.is-on svg { fill: #F5B90B; }

/* ---------- вход ---------- */
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--green-deep); overflow: hidden; }
.login::after { content: "DIZORD"; position: absolute; left: 50%; bottom: -2.4vw; transform: translateX(-50%); font: 800 19vw/1 var(--display); color: rgba(255, 255, 255, .045); white-space: nowrap; pointer-events: none; }
.login__card { position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 36px 32px 32px; background: var(--surface); border-radius: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.login__logo { display: block; width: 76px; height: 76px; margin: 0 auto 14px; }
.login h1 { margin: 0 0 24px; text-align: center; font: 700 1.3rem/1.2 var(--display); color: var(--green-ink); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42, 27, 245, .18); }
.login .btn { width: 100%; height: 50px; margin-top: 6px; }
.login__err { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #FBEAE8; color: var(--danger); font-size: .875rem; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: var(--rail) var(--list) minmax(0, 1fr); height: 100vh; height: 100dvh; }

.rail { display: flex; flex-direction: column; min-height: 0; background: var(--green-deep); color: #C7D6CB; padding: 18px 12px 12px; }
.rail__brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; color: #fff; font: 700 1rem/1 var(--display); }
.rail__brand img { width: 38px; height: 38px; }
.rail .btn--main { width: 100%; height: 46px; margin-bottom: 18px; }
.rail nav { flex: 1; min-height: 0; overflow-y: auto; }
.folders { list-style: none; margin: 0; padding: 0; }
.folder { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; text-align: left; color: inherit; }
.folder:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.folder.is-active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.folder.is-active > svg { color: var(--yellow); }
.folder__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder__count { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--yellow); color: var(--yellow-ink); font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; }
.folder__count--quiet { background: none; color: #8FA596; font-weight: 500; }
.rail__head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 2px; padding-left: 12px; font-size: .8125rem; font-weight: 600; color: #8FA596; }
.rail__head .icon-btn { width: 34px; height: 34px; color: #A9BCAF; }
.rail__head .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.folder-row { position: relative; }
.folder__edit { position: absolute; top: 4px; right: 4px; width: 34px; height: 34px; background: #1A3D28; color: #C7D6CB; opacity: 0; }
.folder__edit svg.ic { width: 17px; height: 17px; }
.folder__edit:hover { background: #2A5339; color: #fff; }
.folder-row:hover .folder__edit, .folder__edit:focus-visible { opacity: 1; }
@media (hover: none) {
  .folder-row .folder__edit { opacity: 1; background: none; color: #8FA596; }
  .folder-row .folder { padding-right: 40px; }
}
.ftile { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: -3px; border-radius: 8px; flex: none; background: var(--ftile); color: var(--ftile-ink); }
.ftile svg.ic { width: 16px; height: 16px; }
.ftile--yellow { --ftile: #F2C10D; --ftile-ink: #221A00; }
.ftile--green { --ftile: #2E9E55; --ftile-ink: #FFFFFF; }
.ftile--teal { --ftile: #12908E; --ftile-ink: #FFFFFF; }
.ftile--blue { --ftile: #2F6FDE; --ftile-ink: #FFFFFF; }
.ftile--purple { --ftile: #7B57D6; --ftile-ink: #FFFFFF; }
.ftile--pink { --ftile: #D6478C; --ftile-ink: #FFFFFF; }
.ftile--red { --ftile: #D2433A; --ftile-ink: #FFFFFF; }
.ftile--orange { --ftile: #F08A3C; --ftile-ink: #2A1200; }
.rail__user { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding: 10px 0 0 8px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8125rem; }
.rail__user span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__user .icon-btn { color: #A9BCAF; }
.rail__user .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------- список ---------- */
.list { display: flex; flex-direction: column; min-height: 0; background: var(--soft); border-right: 1px solid var(--line); }
.list__head { padding: 18px 16px 12px; }
.list__title { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 10px; }
.list__title h2 { flex: 1; margin: 0; font: 700 1.15rem/1.2 var(--display); color: var(--green-ink); }
.menu-btn { display: none; }
.linkish { color: var(--green); font-size: .8125rem; font-weight: 500; }
.linkish:hover { text-decoration: underline; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42, 27, 245, .15); }
.rows { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--line); }
.row { position: relative; border-bottom: 1px solid var(--line); }
.row:hover { background: var(--surface); }
.row.is-active { background: var(--tint); }
.row.is-picked { background: #FFF8DC; }
.row__open { display: block; width: 100%; padding: 12px 16px 13px 26px; text-align: left; }
.row__pick { position: absolute; left: 1px; top: 8px; z-index: 1; display: grid; place-items: center; width: 24px; height: 28px; opacity: 0; cursor: pointer; }
.row__pick input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); cursor: pointer; }
.row:hover .row__pick, .row__pick:focus-within, .rows.is-selecting .row__pick { opacity: 1; }
.row:hover.is-unread::before, .rows.is-selecting .row.is-unread::before { display: none; }
.rows.is-selecting .row__open { padding-left: 34px; }
@media (hover: none) { .row__pick { display: none; } .rows.is-selecting .row__pick { display: grid; } }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 10px; padding: 4px 4px 4px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.bulk__count { flex: 1 0 auto; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.bulk .linkish { margin-right: 6px; }
.row__top { display: flex; align-items: baseline; gap: 10px; }
.row__who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.row__date { flex: none; font-size: .78rem; color: var(--ink-3); }
.row__subject { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__snip { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; color: var(--ink-3); }
.row__marks { float: right; display: inline-flex; gap: 4px; margin-left: 8px; color: var(--ink-3); }
.row__marks svg { width: 15px; height: 15px; }
.row__marks .star { color: #B98F00; fill: var(--yellow); }
.row.is-unread .row__who { color: var(--ink); font-weight: 600; }
.row.is-unread .row__subject { font-weight: 700; color: var(--green-ink); }
.row.is-unread::before { content: ""; position: absolute; left: 11px; top: 19px; pointer-events: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.more { display: block; width: 100%; padding: 14px; color: var(--green); font-weight: 600; }
.more:hover { background: var(--surface); }
.blank { padding: 48px 24px; text-align: center; color: var(--ink-3); }
.blank b { display: block; margin-bottom: 4px; font-weight: 600; color: var(--ink-2); }

/* ---------- письмо ---------- */
.reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.reader__bar { display: flex; align-items: center; gap: 2px; min-height: 58px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.reader__bar .sp { flex: 1; }
.back-btn { display: none; }
.reader__bar .btn { height: 38px; padding: 0 14px; font-size: .875rem; margin-right: 6px; }
.reader__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 24px clamp(16px, 3vw, 36px) 40px; }
.reader__subject { margin: 0 0 18px; font-size: 1.45rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.people { display: flex; gap: 12px; margin-bottom: 18px; }
.avatar { position: relative; display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; background: var(--tint); color: var(--green-ink); font-weight: 700; flex: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.avatar--own img { object-fit: contain; }
.avatar--1 { background: #FFF0B8; color: #5A4500; }
.avatar--2 { background: #DCE9F5; color: #1C4A70; }
.avatar--3 { background: #F3E2D6; color: #6B3A1B; }
.avatar--4 { background: #E5E0F0; color: #40336B; }
.avatar--5 { background: #D9EEEA; color: #12524A; }
.avatar--s { width: 24px; height: 24px; font-size: .72rem; }
.avatar--m { width: 34px; height: 34px; font-size: .875rem; }
.people__main { flex: 1; min-width: 0; }
.people__from b { font-weight: 600; }
.people__addr { color: var(--ink-3); font-size: .875rem; overflow-wrap: anywhere; }
.people__to { color: var(--ink-3); font-size: .875rem; overflow-wrap: anywhere; }
.people__date { flex: none; color: var(--ink-3); font-size: .85rem; }
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; background: var(--bg); font-size: .875rem; color: var(--ink-2); }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.att { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .875rem; }
.att:hover { background: var(--soft); }
.att svg { width: 17px; height: 17px; color: var(--green); }
.att__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.att__size { flex: none; color: var(--ink-3); }
.mail-frame { display: block; width: 100%; min-height: 80px; border: 0; background: #fff; }
.mail-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font: inherit; }

/* ---------- написать ---------- */
.compose { position: fixed; right: 24px; bottom: 0; z-index: 30; display: flex; flex-direction: column; width: min(680px, calc(100vw - 48px)); height: min(680px, calc(100dvh - 40px)); background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: 0 16px 60px rgba(14, 10, 60, .35); }
.compose__head { display: flex; align-items: center; padding: 8px 8px 8px 20px; border-radius: 18px 18px 0 0; background: var(--green-deep); color: #fff; font-weight: 600; }
.compose__head span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose__head .icon-btn { color: #C7D6CB; }
.compose__head .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.compose__line { display: flex; align-items: flex-start; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.compose__line > label { flex: none; width: 52px; padding-top: 12px; font-size: .875rem; color: var(--ink-3); }
.compose__line > .linkish { flex: none; padding-top: 12px; }
.compose__line input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; }
.compose__line input:focus { outline: none; }
.compose__line:focus-within { border-bottom-color: var(--green); }
.compose__editor { flex: 1; min-height: 80px; overflow-y: auto; padding: 14px 20px; line-height: 1.55; font-family: Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
.compose__editor:focus { outline: none; }
.compose__editor p { margin: 0 0 12px; }
.compose__editor blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid #D5DCD6; color: var(--ink-2); }
.compose__editor ul, .compose__editor ol { margin: 0 0 12px; padding-left: 24px; }
.compose__editor a { color: var(--green); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--soft); flex: none; scrollbar-width: thin; }
.tools__gap { width: 1px; height: 20px; margin: 0 5px; background: var(--line-strong); flex: none; }
.tool { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 5px; border-radius: 7px; font-size: .9375rem; flex: none; }
.tool svg.ic { width: 17px; height: 17px; }
.tool:hover { background: var(--bg); }
.tool.is-on { background: var(--tint); color: var(--green-ink); }
.tool-select { height: 32px; margin-right: 4px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); font-size: .8125rem; flex: none; }
.swatch { width: 20px; height: 20px; margin: 0 2px; border-radius: 50%; flex: none; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
.swatch--ink { background: #0E1A12; } .swatch--green { background: #1E7A3C; } .swatch--red { background: #B3261E; } .swatch--blue { background: #1C5FA8; } .swatch--orange { background: #B26A00; }
.compose__opts { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 20px; border-top: 1px solid var(--line); font-size: .875rem; flex: none; }
.compose__brand { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.compose__brand input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.confirm.preview { max-width: 720px; width: calc(100vw - 24px); height: min(760px, calc(100dvh - 32px)); padding: 0; overflow: hidden; }
.confirm.preview[open] { display: flex; flex-direction: column; }
.preview__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; flex: none; }
.preview__head h3 { margin: 0; font-size: 1rem; }
.preview__frame { flex: 1; min-height: 0; width: 100%; border: 0; border-top: 1px solid var(--line); background: #fff; }
.compose__files { display: flex; flex-wrap: wrap; gap: 6px; max-height: 96px; overflow-y: auto; padding: 0 20px 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--bg); font-size: .8125rem; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--ink-3); }
.chip button:hover { background: rgba(0, 0, 0, .08); color: var(--ink); }
.chip svg { width: 14px; height: 14px; }
.compose__foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.compose__status { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--ink-3); }
.compose__line { position: relative; }
.rcpt { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 44px; padding: 6px 0; cursor: text; }
.rchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 2px 0 3px; border-radius: 999px; background: var(--bg); font-size: .875rem; cursor: pointer; }
.rchip:hover { background: var(--tint); }
.rchip.is-bad { background: #FBEAE8; color: var(--danger); }
.rchip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.rchip button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--ink-3); flex: none; }
.rchip button:hover { background: rgba(0, 0, 0, .08); color: var(--ink); }
.rchip svg { width: 13px; height: 13px; }
.rcpt__field { position: relative; flex: 1; min-width: 150px; display: block; height: 30px; }
.compose__line .rcpt__field input { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none; }
.rcpt__ghost { position: absolute; inset: 0; overflow: hidden; color: var(--ink-3); line-height: 30px; white-space: pre; pointer-events: none; }
.rcpt__ghost i { font-style: normal; visibility: hidden; }
.suggest { position: absolute; left: 12px; right: 12px; top: 100%; z-index: 5; margin: 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto; border-radius: 12px; background: var(--surface); box-shadow: 0 10px 32px rgba(14, 10, 60, .25); }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.suggest li.is-on, .suggest li:hover { background: var(--tint); }
.suggest__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest b { font-weight: 600; }
.suggest__addr { color: var(--ink-3); font-size: .875rem; }
.settings textarea { display: block; width: 100%; height: 130px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; resize: vertical; }
.settings textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42, 27, 245, .18); }
.settings h3 { margin: 0 0 6px; font: 700 1.05rem/1.25 var(--display); color: var(--green-ink); }
.settings .hint { margin: 0 0 12px; font-size: .875rem; color: var(--ink-3); }
.compose__err { padding: 8px 20px; background: #FBEAE8; color: var(--danger); font-size: .875rem; }

.fab { display: none; }
.toast { position: fixed; left: 50%; top: 18px; z-index: 50; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .875rem; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); }
.scrim { display: none; }
.confirm { max-width: 400px; width: calc(100vw - 32px); padding: 24px; border: 0; border-radius: 18px; color: var(--ink); }
.confirm::backdrop { background: rgba(14, 10, 60, .5); }
.confirm p { margin: 0 0 18px; }
.confirm__btns { display: flex; justify-content: flex-end; gap: 8px; }
.confirm__btns .sp { flex: 1; }
.btn--danger { color: var(--danger); border: 1px solid rgba(179, 38, 30, .35); background: var(--surface); }
.btn--danger:hover { background: #FBEAE8; }
.picker__list { list-style: none; margin: 8px 0 14px; padding: 0; max-height: min(52vh, 420px); overflow-y: auto; }
.picker__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 6px 12px 6px 14px; border-radius: 10px; text-align: left; }
.picker__item:hover, .picker__item:focus-visible { background: var(--soft); }
.picker__item > svg { color: var(--ink-2); }
.picker__btns { justify-content: space-between; flex-wrap: wrap; }
.folder-editor__name { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.folder-editor__preview .ftile { width: 42px; height: 42px; margin: 0; border-radius: 12px; }
.folder-editor__preview .ftile svg.ic { width: 24px; height: 24px; }
.folder-editor__name input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.folder-editor__name input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42, 27, 245, .18); }
.folder-editor__name input:disabled { background: var(--soft); color: var(--ink-2); }
.folder-editor fieldset { margin: 0 0 14px; padding: 0; border: 0; }
.folder-editor legend { padding: 0; margin-bottom: 6px; font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; cursor: pointer; }
.swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch .ftile { width: 30px; height: 30px; margin: 0; border-radius: 9px; }
.swatch__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ink-2); }
.swatch:hover { background: var(--soft); }
.swatch:has(input:checked) { box-shadow: inset 0 0 0 2px var(--green); background: var(--tint); }
.swatch:has(input:checked) .swatch__icon { color: var(--green-ink); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- ноутбук ---------- */
@media (max-width: 1180px) {
  :root { --rail: 208px; --list: 320px; }
}

/* ---------- планшет и телефон: одна колонка, меню выезжает ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 272px; transform: translateX(-100%); transition: transform .2s; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .shell.is-menu .rail { transform: none; }
  .shell.is-menu .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(14, 10, 60, .5); }
  .menu-btn, .back-btn { display: inline-grid; }
  .list { border-right: 0; }
  .list__head { padding-top: 10px; }
  .list__title { margin-left: -8px; }
  .shell.has-message .list { display: none; }
  .shell:not(.has-message) .reader { display: none; }
  .reader__bar { position: sticky; top: 0; padding: 6px 8px; }
  .reader__bar .btn { display: none; }
  .fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 10; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); box-shadow: 0 8px 22px rgba(14, 10, 60, .3); }
  .shell.has-message .fab { display: none; }
  .reply-row { display: flex !important; }
  .compose { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
  .compose__head { border-radius: 0; }
  .field input, .compose__line input, .compose__editor, .search input { font-size: 16px; }
  .tools { flex-wrap: nowrap; overflow-x: auto; }
  .people { flex-wrap: wrap; }
  .people__date { width: 100%; padding-left: 54px; }
  .login__card { padding: 28px 20px 24px; border-radius: 18px; }
}
.reply-row { display: none; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.reply-row .btn { flex: 1; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
