/* Private mailbox: the same compact surfaces, controls and colour tokens as Study. */
body.beta #study-main .account-mail { min-width:0; width:100%; max-width:920px; color:var(--ui-text); }
body.beta #study-main .mail-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
body.beta #study-main .mail-heading>div { min-width:0; }
body.beta #study-main .mail-heading h2 { margin:0; font-size:24px; font-weight:700; letter-spacing:-.6px; }
body.beta #study-main .mail-heading p { margin:3px 0 0; font-size:12px; line-height:1.5; color:var(--ui-muted); overflow-wrap:anywhere; }
body.beta #study-main .mail-button { display:inline-flex; justify-content:center; align-items:center; gap:7px; min-height:44px; padding:9px 12px; border:0; border-radius:12px; background:transparent; color:var(--ui-accent); font-size:13px; font-weight:600; line-height:1.4; }
body.beta #study-main .mail-button svg { width:17px; height:17px; flex:none; }
body.beta #study-main .mail-primary { background:var(--ui-accent); color:var(--ui-on-accent,#fff); }
body.beta #study-main .mail-soft { background:var(--ui-accent-soft); }
body.beta #study-main .mail-icon-button { width:44px; padding:0; background:var(--ui-surface); border:1px solid var(--ui-border); }
body.beta #study-main .mail-demo,body.beta #study-main .mail-error,body.beta #study-main .mail-notice { margin:0 0 12px; padding:10px 12px; border-radius:12px; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
body.beta #study-main .mail-demo { background:var(--ui-soft); color:var(--ui-muted); }
body.beta #study-main .mail-error { color:var(--ui-danger); background:var(--ui-danger-bg,var(--ui-soft)); }
body.beta #study-main .mail-notice { color:var(--ui-text); background:var(--ui-accent-soft); }
body.beta #study-main .mail-connect-intro { display:flex; align-items:center; gap:12px; margin:20px 0; }
body.beta #study-main .mail-connect-intro h3 { margin:0; font-size:16px; }
body.beta #study-main .mail-connect-intro p { margin:4px 0 0; color:var(--ui-muted); font-size:13px; line-height:1.5; }
body.beta #study-main .mail-symbol { display:grid; place-items:center; flex:none; width:44px; height:44px; border-radius:14px; background:var(--ui-accent-soft); color:var(--ui-accent); }
body.beta #study-main .mail-symbol svg { width:24px; height:24px; }
body.beta #study-main .mail-connect-form,body.beta #study-main .mail-compose { display:grid; gap:14px; margin:0; }
body.beta #study-main .mail-connect-form { max-width:480px; }
body.beta #study-main .mail-field { display:grid; gap:6px; min-width:0; color:var(--ui-muted); font-size:12px; }
body.beta #study-main .mail-field input,body.beta #study-main .mail-field textarea { width:100%; min-width:0; min-height:44px; padding:11px 13px; margin:0; border:1px solid var(--ui-border); border-radius:13px; background:var(--ui-surface); color:var(--ui-text); font:inherit; font-size:16px; line-height:1.5; }
body.beta #study-main .mail-field textarea { resize:vertical; min-height:190px; }
body.beta #study-main .mail-consent { display:flex; align-items:flex-start; gap:9px; color:var(--ui-muted); font-size:12px; line-height:1.5; }
body.beta #study-main .mail-consent input { flex:none; width:18px; height:18px; margin:2px 0 0; accent-color:var(--ui-accent); }
body.beta #study-main .mail-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
body.beta #study-main .mail-folders { display:flex; gap:3px; padding:3px; border-radius:15px; background:var(--ui-soft); }
body.beta #study-main .mail-folders .mail-button { min-height:38px; color:var(--ui-muted); padding:7px 11px; }
body.beta #study-main .mail-folders [aria-pressed=true] { background:var(--ui-surface); color:var(--ui-accent); box-shadow:0 1px 4px #15234309; }
body.beta #study-main .mail-search { display:flex; align-items:center; gap:9px; padding:0 12px; margin:0 0 12px; background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:13px; }
body.beta #study-main .mail-search svg { width:18px; height:18px; color:var(--ui-muted); flex:none; }
body.beta #study-main .account-mail .mail-search input,body.beta #study-main .campus-settings-panel .account-mail .mail-search input { min-width:0; width:100%; min-height:44px; padding:9px 0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--ui-text); font-size:16px; }
body.beta #study-main .mail-search:focus-within { outline:2px solid var(--ui-accent); outline-offset:2px; }
body.beta #study-main .mail-search input:focus-visible { outline:none; }
body.beta #study-main .mail-list { overflow:hidden; border:1px solid var(--ui-border); border-radius:18px; background:var(--ui-surface); }
body.beta #study-main .mail-row { display:block; width:100%; min-height:76px; padding:13px 15px; text-align:left; background:transparent; color:var(--ui-text); border:0; border-radius:0; }
body.beta #study-main .mail-row+.mail-row { border-top:1px solid var(--ui-border); }
body.beta #study-main .mail-row:focus-visible { outline-offset:-3px; }
body.beta #study-main .mail-row.is-unread { box-shadow:inset 3px 0 0 var(--ui-accent); }
body.beta #study-main .mail-row-top { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
body.beta #study-main .mail-row-top strong { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:500; }
body.beta #study-main .mail-row.is-unread .mail-row-top strong { font-weight:700; }
body.beta #study-main .mail-row-top time { flex:none; color:var(--ui-muted); font-size:10px; font-variant-numeric:tabular-nums; }
body.beta #study-main .mail-row-subject { display:flex; align-items:center; gap:8px; margin-top:5px; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
body.beta #study-main .mail-attachment-mark { margin-left:auto; color:var(--ui-muted); flex:none; }
body.beta #study-main .mail-attachment-mark svg { width:15px; height:15px; }
body.beta #study-main .mail-empty { display:grid; justify-items:center; gap:8px; padding:30px 18px; text-align:center; color:var(--ui-muted); }
body.beta #study-main .mail-empty>svg { width:28px; height:28px; opacity:.65; }
body.beta #study-main .mail-empty strong { color:var(--ui-text); font-size:14px; }
body.beta #study-main .mail-empty p { margin:0; max-width:35ch; font-size:12px; line-height:1.5; }
body.beta #study-main .mail-more { display:flex; margin:8px auto 0; }
body.beta #study-main .mail-settings { margin-top:18px; color:var(--ui-muted); font-size:12px; }
body.beta #study-main .mail-settings>summary { min-height:44px; padding:12px 0; cursor:pointer; }
body.beta #study-main .mail-notification { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:44px; color:var(--ui-text); font-size:13px; }
body.beta #study-main .mail-notification input { width:20px; height:20px; flex:none; accent-color:var(--ui-accent); }
body.beta #study-main .mail-settings p { margin:0; font-size:12px; line-height:1.5; }
body.beta #study-main .mail-muted-button { color:var(--ui-muted); padding-inline:0; }
body.beta #study-main .mail-reader-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 10px; }
body.beta #study-main .mail-reader-toolbar>.mail-button:first-child { padding-left:0; }
body.beta #study-main .mail-draft-label { color:var(--ui-muted); font-size:11px; text-align:right; }
body.beta #study-main .mail-reader { min-width:0; padding:18px; border:1px solid var(--ui-border); border-radius:20px; background:var(--ui-surface); }
body.beta #study-main .mail-message-body { min-width:0; max-width:100%; overflow-x:auto; color:var(--ui-text); font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
body.beta #study-main .mail-message-body p { margin:0 0 12px; color:inherit; font-size:inherit; line-height:inherit; }
body.beta #study-main .mail-message-body :is(h1,h2,h3,h4,h5,h6) { margin:16px 0 8px; font-size:18px; line-height:1.35; color:inherit; }
body.beta #study-main .mail-message-body > :first-child { margin-block-start:0; }
body.beta #study-main .mail-message-body > :last-child { margin-block-end:0; }
body.beta #study-main .mail-message-body table { width:100%; border-collapse:collapse; font-size:12px; }
body.beta #study-main .mail-message-body :is(td,th) { min-width:90px; border:1px solid var(--ui-border); padding:7px 9px; text-align:left; overflow-wrap:normal; word-break:normal; }
body.beta #study-main .mail-message-body blockquote { margin:12px 0; padding:4px 0 4px 12px; border-left:3px solid var(--ui-border); color:var(--ui-muted); }
body.beta #study-main .mail-message-body pre { max-width:100%; overflow-x:auto; white-space:pre-wrap; }
body.beta #study-main .mail-message-body a { color:var(--ui-accent); text-decoration:underline; }
body.beta #study-main .mail-plain { white-space:pre-wrap; }
body.beta #study-main .mail-uncertain { margin:14px 0 0; padding:14px; border-radius:14px; background:var(--ui-warning-bg,var(--ui-soft)); font-size:13px; }
body.beta #study-main .mail-uncertain p { margin:5px 0 0; font-size:12px; line-height:1.5; color:var(--ui-muted); }
@media(max-width:359px) {
 body.beta #study-main .mail-toolbar>.mail-primary { width:44px; padding:0; }
 body.beta #study-main .mail-toolbar>.mail-primary span { display:none; }
 body.beta #study-main .mail-folders .mail-button { padding-inline:8px; font-size:12px; }
 body.beta #study-main .mail-reader { padding:14px; }
}
/* Read-only mailbox, whole-mailbox search and the reconnect form. */
body.beta #study-main .mail-hint { margin:-6px 0 0; color:var(--ui-muted); font-size:12px; line-height:1.5; }
body.beta #study-main .mail-readonly { display:inline-flex; align-items:center; min-height:32px; padding:5px 10px; border-radius:10px; background:var(--ui-soft); color:var(--ui-muted); font-size:12px; font-weight:600; }
body.beta #study-main .mail-search-actions { margin:0 0 12px; }
body.beta #study-main .mail-search-actions:empty { display:none; }
body.beta #study-main .mail-search-all { width:100%; justify-content:flex-start; text-align:left; }
body.beta #study-main .mail-search-all span { min-width:0; overflow-wrap:anywhere; }
body.beta #study-main .mail-search-state { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0; padding:2px 4px 2px 12px; border-radius:12px; background:var(--ui-accent-soft); color:var(--ui-text); font-size:13px; line-height:1.5; }

/* Connect: saving the password is a choice between two plain options. */
body.beta #study-main .mail-keep { display:grid; gap:8px; margin:0; padding:0; border:0; min-width:0; }
body.beta #study-main .mail-keep-option { display:flex; align-items:flex-start; gap:11px; padding:12px 13px; border:1px solid var(--ui-border); border-radius:14px; background:var(--ui-surface); cursor:pointer; }
body.beta #study-main .mail-keep-option:has(input:checked) { border-color:var(--ui-accent); background:var(--ui-accent-soft); }
body.beta #study-main .mail-keep-option input { flex:none; width:18px; height:18px; margin:2px 0 0; accent-color:var(--ui-accent); }
body.beta #study-main .mail-keep-option span { display:grid; gap:3px; min-width:0; }
body.beta #study-main .mail-keep-option strong { font-size:14px; font-weight:600; color:var(--ui-text); }
body.beta #study-main .mail-keep-option small { font-size:12px; line-height:1.5; color:var(--ui-muted); }
body.beta #study-main .mail-session-chip { display:inline-block; margin-left:6px; padding:1px 8px; border-radius:999px; background:var(--ui-soft); font-size:11px; white-space:nowrap; }
body.beta #study-main .mail-session-note { margin:0 0 10px; }

/* The list: day sections, sender marks, a dot for unread, marks for what matters. */
body.beta #study-main .mail-count { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:var(--ui-accent); color:var(--ui-on-accent,#fff); font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; }
body.beta #study-main .mail-filters { display:flex; gap:6px; margin:0 0 12px; overflow-x:auto; scrollbar-width:none; }
body.beta #study-main .mail-filters::-webkit-scrollbar { display:none; }
body.beta #study-main .mail-chip { flex:none; min-height:36px; padding:6px 13px; border:1px solid var(--ui-border); border-radius:999px; background:var(--ui-surface); color:var(--ui-muted); font-weight:500; }
body.beta #study-main .mail-chip b { margin-left:2px; font-weight:700; font-variant-numeric:tabular-nums; color:var(--ui-text); }
body.beta #study-main .mail-chip[aria-pressed=true] { border-color:transparent; background:var(--ui-accent); color:var(--ui-on-accent,#fff); }
body.beta #study-main .mail-chip[aria-pressed=true] b { color:inherit; }
body.beta #study-main .mail-list { overflow:visible; border:0; border-radius:0; background:transparent; }
body.beta #study-main .mail-day+.mail-day { margin-top:16px; }
body.beta #study-main .mail-day h4 { margin:0 0 6px 4px; font-size:12px; font-weight:600; letter-spacing:.2px; color:var(--ui-muted); }
body.beta #study-main .mail-day-list { overflow:hidden; border:1px solid var(--ui-border); border-radius:18px; background:var(--ui-surface); }
body.beta #study-main .mail-row { display:flex; align-items:flex-start; gap:12px; min-height:68px; padding:12px 14px; }
body.beta #study-main .mail-row.is-unread { box-shadow:none; }
body.beta #study-main .mail-row:hover { background:var(--ui-soft); }
body.beta #study-main .mail-avatar { display:grid; place-items:center; flex:none; width:40px; height:40px; border-radius:50%; font-size:14px; font-weight:700; letter-spacing:.2px; color:#fff; background:#4f60cc; }
body.beta #study-main .mail-avatar[data-tone="1"] { background:#207b66; }
body.beta #study-main .mail-avatar[data-tone="2"] { background:#a95631; }
body.beta #study-main .mail-avatar[data-tone="3"] { background:#825bc9; }
body.beta #study-main .mail-avatar[data-tone="4"] { background:#296fad; }
body.beta #study-main .mail-avatar[data-tone="5"] { background:#b0577f; }
body.beta #study-main .mail-row-main { display:grid; grid-template-columns:minmax(0,1fr); gap:3px; flex:1; min-width:0; }
body.beta #study-main .mail-row-top strong { font-size:14px; color:var(--ui-muted); }
body.beta #study-main .mail-row.is-unread .mail-row-top strong { color:var(--ui-text); }
body.beta #study-main .mail-row-top time { font-size:12px; }
body.beta #study-main .mail-row.is-unread .mail-row-top time { color:var(--ui-accent); font-weight:600; }
body.beta #study-main .mail-row-subject { margin-top:0; font-size:14px; color:var(--ui-muted); }
body.beta #study-main .mail-row-subject>span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
body.beta #study-main .mail-row.is-unread .mail-row-subject { color:var(--ui-text); font-weight:600; }
body.beta #study-main .mail-row-marks { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:3px; }
body.beta #study-main .mail-tag { padding:2px 9px; border-radius:999px; font-size:11px; font-weight:700; background:var(--ui-accent-soft); color:var(--ui-accent); }
body.beta #study-main .mail-tag[data-kind=exam] { background:#e5484d24; color:var(--ui-danger,#d2383d); }
body.beta #study-main .mail-tag[data-kind=due] { background:#e2a33a2e; color:#b77a12; }
body.beta #study-main .mail-attachment-mark { display:inline-flex; align-items:center; gap:4px; margin-left:0; font-size:11px; }
body.beta #study-main .mail-attachment-mark svg { width:13px; height:13px; }
body.beta #study-main .mail-dot { flex:none; width:9px; height:9px; margin-top:6px; border-radius:50%; background:var(--ui-accent); }
/* One line on a phone: folders on the left, «написать» as a round button on the right. */
body.beta #study-main .mail-toolbar { flex-wrap:nowrap; }
body.beta #study-main .mail-folders { min-width:0; }
@media (max-width:430px) {
  body.beta #study-main .mail-toolbar>.mail-primary { flex:none; width:44px; padding:0; border-radius:14px; }
  body.beta #study-main .mail-toolbar>.mail-primary span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
}
/* Dates and deadlines found in a letter or a document. */
body.beta #study-main .mail-deadlines { margin:0 0 12px; padding:0 12px; border-radius:12px; background:var(--ui-soft); }
body.beta #study-main .mail-deadlines > summary { display:flex; align-items:center; flex-wrap:wrap; gap:2px 6px; min-height:44px; padding:6px 0; color:var(--ui-text); cursor:pointer; list-style:none; font-size:13px; font-weight:600; }
body.beta #study-main .mail-deadlines > summary::-webkit-details-marker { display:none; }
body.beta #study-main .mail-deadlines > summary:focus-visible,body.beta #study-main .mail-reply:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
body.beta #study-main .mail-deadlines > summary small { font-size:12px; font-weight:400; color:var(--ui-muted); }
body.beta #study-main .mail-deadlines > summary svg { width:16px; height:16px; flex:none; color:var(--ui-muted); }
body.beta #study-main .mail-deadlines > summary svg:last-child { margin-inline-start:auto; }
body.beta #study-main .mail-deadlines[open] { padding-bottom:12px; }
body.beta #study-main .mail-deadlines[open] > summary svg:last-child { transform:rotate(180deg); }
body.beta #study-main .mail-deadlines ul { margin:0; padding:0; list-style:none; display:grid; gap:8px; }
body.beta #study-main .mail-deadlines li { display:grid; gap:2px; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
body.beta #study-main .mail-deadlines li strong { color:var(--ui-text); }
body.beta #study-main .mail-deadlines li span { color:var(--ui-muted); font-size:13px; }
body.beta #study-main .mail-deadlines > p { margin:8px 0 0; font-size:12px; color:var(--ui-muted); }

/* Compose: recipients as chips, the line that says what kind of letter this is, people to choose from. */
body.beta #study-main .mail-chips { display:contents; list-style:none; margin:0; padding:0; }
body.beta #study-main .mail-chips>li { display:flex; min-width:0; max-width:100%; }
body.beta #study-main .mail-recipient-box .mail-chip { display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%; min-height:32px; height:32px; padding:3px 4px 3px 3px; border:0; border-radius:999px; background:var(--ui-accent-soft); color:var(--ui-text); font:inherit; font-size:13px; font-weight:600; line-height:1.2; }
body.beta #study-main .mail-recipient-box .mail-chip .mail-avatar { width:26px; height:26px; font-size:10px; }
body.beta #study-main .mail-recipient-box .mail-chip-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding-right:6px; }
body.beta #study-main .mail-recipient-box .mail-chip>button { display:grid; place-items:center; flex:none; width:26px; height:26px; min-width:0; min-height:0; padding:0; border:0; border-radius:50%; background:transparent; color:var(--ui-muted); cursor:pointer; }
body.beta #study-main .mail-recipient-box .mail-chip>button:hover { background:var(--ui-surface); color:var(--ui-text); }
body.beta #study-main .mail-recipient-box .mail-chip>button svg { width:14px; height:14px; }
body.beta #study-main .mail-recipient-box .mail-chip:has(>button) .mail-chip-name { padding-right:0; }
body.beta #study-main .mail-recipient-box .mail-chip-more { min-height:32px; padding:3px 12px; color:var(--ui-accent); cursor:pointer; }
body.beta #study-main .mail-recipient-box .mail-chip-more:hover { background:var(--ui-soft); }
body.beta #study-main .mail-context { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:18px; background:linear-gradient(135deg,var(--ui-accent-soft),var(--ui-surface) 140%); border:1px solid var(--ui-border); }
body.beta #study-main .mail-context-icon { display:grid; place-items:center; flex:none; width:40px; height:40px; border-radius:13px; background:var(--ui-accent); color:var(--ui-on-accent,#fff); }
body.beta #study-main .mail-context-icon svg { width:20px; height:20px; }
body.beta #study-main .mail-context>span:last-child { display:grid; gap:2px; min-width:0; }
body.beta #study-main .mail-context strong { color:var(--ui-text); font-size:15px; line-height:1.3; letter-spacing:-.2px; overflow-wrap:anywhere; }
body.beta #study-main .mail-context small { color:var(--ui-muted); font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
body.beta #study-main .mail-context[data-kind=report] .mail-context-icon { background:#207b66; }
body.beta #study-main .mail-context[data-kind=teacher] .mail-context-icon { background:#825bc9; }
body.beta #study-main .mail-candidates { display:grid; gap:8px; padding:12px; border:1px solid var(--ui-border); border-radius:18px; background:var(--ui-surface); }
body.beta #study-main .mail-candidates>p { margin:0 2px 2px; color:var(--ui-muted); font-size:12px; line-height:1.5; }
body.beta #study-main .mail-candidate { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; padding:8px 10px; border:0; border-radius:14px; background:var(--ui-soft); color:var(--ui-text); font:inherit; text-align:left; cursor:pointer; }
body.beta #study-main .mail-candidate:hover { background:var(--ui-accent-soft); }
body.beta #study-main .mail-candidate:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
body.beta #study-main .mail-candidate>span:nth-child(2) { display:grid; gap:1px; flex:1; min-width:0; }
body.beta #study-main .mail-candidate strong { font-size:14px; line-height:1.3; overflow-wrap:anywhere; }
body.beta #study-main .mail-candidate small { color:var(--ui-muted); font-size:12px; overflow-wrap:anywhere; }
body.beta #study-main .mail-candidate>svg { flex:none; width:18px; height:18px; color:var(--ui-muted); }
body.beta #study-main .mail-preview-count { display:block; color:var(--ui-text); font-weight:650; }
body.beta #study-main .mail-preview-people { display:block; margin-top:2px; color:var(--ui-muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }

body.beta #study-main .mail-file-sent { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 12px; border-radius:999px; background:var(--ui-success-bg,var(--ui-accent-soft)); color:var(--ui-success,var(--ui-accent)); font-size:13px; font-weight:650; white-space:nowrap; }
body.beta #study-main .mail-file-sent svg { width:15px; height:15px; }
body.beta #study-main .mail-file-hint { margin:8px 2px 0; color:var(--ui-muted); font-size:12px; line-height:1.5; }

/* The letter editor: a formatting bar joined to the text. */
body.beta #study-main .mail-format { display:flex; align-items:center; gap:2px; padding:6px; border-bottom:1px solid var(--ui-border); background:var(--ui-soft); overflow-x:auto; scrollbar-width:none; }
body.beta #study-main .mail-format::-webkit-scrollbar { display:none; }
body.beta #study-main .mail-format-button { display:grid; place-items:center; flex:none; min-width:40px; height:36px; min-height:0; padding:0 10px; border:0; border-radius:10px; background:transparent; color:var(--ui-text); font:inherit; font-size:15px; line-height:1; cursor:pointer; }
body.beta #study-main .mail-format-button:hover { background:var(--ui-surface); }
body.beta #study-main .mail-format-button[aria-pressed=true] { background:var(--ui-accent); color:var(--ui-on-accent,#fff); }
body.beta #study-main .mail-format-button:focus-visible { outline:2px solid var(--ui-accent); outline-offset:1px; }
body.beta #study-main .mail-format-button:disabled { opacity:.5; cursor:default; }
body.beta #study-main .mail-format-button svg { width:17px; height:17px; }
body.beta #study-main .mail-format-clear { margin-left:auto; color:var(--ui-muted); }
body.beta #study-main .mail-editor { min-height:190px; max-height:55vh; margin:0; padding:13px 14px; border:0; border-radius:0; background:transparent; color:var(--ui-text); font-size:16px; line-height:1.55; overflow:auto; overflow-wrap:anywhere; outline:0; white-space:pre-wrap; }
body.beta #study-main .mail-editor:empty::before { content:attr(data-placeholder); color:var(--ui-muted); pointer-events:none; }
body.beta #study-main .mail-editor ul,body.beta #study-main .mail-editor ol { margin:6px 0; padding-left:24px; }


/* Mail controls stay in the header; account settings are a separate compact view. */
body.beta #study-main .mail-heading-actions { display:flex; align-items:center; gap:8px; }
body.beta #study-main .mail-settings { display:grid; gap:0; margin:0; padding:16px; border-radius:20px; background:var(--ui-surface); }
body.beta #study-main .mail-reader-toolbar h3 { margin:0; font-size:17px; color:var(--ui-text); }
body.beta #study-main .mail-settings-account { display:flex; align-items:center; gap:12px; margin-bottom:20px; min-width:0; }
body.beta #study-main .mail-settings-account>div { display:grid; gap:3px; min-width:0; }
body.beta #study-main .mail-settings-account strong { overflow-wrap:anywhere; color:var(--ui-text); font-size:15px; font-weight:600; }
body.beta #study-main .mail-settings-account small { font-size:12px; }
body.beta #study-main .mail-notification { gap:16px; padding:12px 0; font-size:14px; }
body.beta #study-main .mail-notification>span { display:grid; gap:4px; min-width:0; }
body.beta #study-main .mail-notification strong { font-weight:600; }
body.beta #study-main .mail-notification small { font-size:12px; line-height:1.4; color:var(--ui-muted); }
body.beta #study-main .mail-notification input { appearance:none; width:44px; height:28px; padding:0; margin:0; border:0; border-radius:999px; background:var(--ui-border); position:relative; cursor:pointer; transition:background-color .15s; }
body.beta #study-main .mail-notification input::before { content:''; position:absolute; width:22px; height:22px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0002; transition:transform .15s; }
body.beta #study-main .mail-notification input:checked { background:var(--ui-accent); }
body.beta #study-main .mail-notification input:checked::before { transform:translateX(16px); }
body.beta #study-main .mail-notification input:disabled { opacity:.45; cursor:default; }
body.beta #study-main .mail-settings .mail-settings-note { padding:4px 0 14px; color:var(--ui-muted); }
body.beta #study-main .mail-disconnect { align-self:start; justify-self:start; margin-top:6px; padding-inline:0; color:var(--ui-danger); font-weight:500; }
@media (prefers-reduced-motion:reduce) {
 body.beta #study-main .mail-notification input,body.beta #study-main .mail-notification input::before { transition:none; }
}
body.beta #study-main .mail-settings-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
body.beta #study-main .mail-settings-title h3 { margin:0; font-size:17px; color:var(--ui-text); }
body.beta #study-main .mail-settings-title .mail-icon-button { background:var(--ui-soft); border:0; }

/* ── A letter on the screen: its head, its files, and the sheet it is written on. ── */
body.beta #study-main .mail-reader { padding:20px 18px 18px; border-radius:22px; box-shadow:0 1px 2px #1523430a,0 8px 24px -18px #15234340; }
body.beta #study-main .mail-letter-head { margin:0 0 12px; padding-bottom:12px; border-bottom:1px solid var(--ui-border); }
body.beta #study-main .mail-letter-head h3 { margin:0 0 16px; font-size:21px; font-weight:700; line-height:1.25; letter-spacing:-.4px; overflow-wrap:anywhere; outline:0; }
body.beta #study-main .mail-envelope { display:grid; grid-template-columns:40px minmax(0,1fr) auto; column-gap:12px; row-gap:10px; align-items:center; }
body.beta #study-main .mail-sender { display:grid; gap:1px; min-width:0; }
body.beta #study-main .mail-sender strong { font-size:15px; font-weight:650; line-height:1.3; overflow-wrap:anywhere; }
body.beta #study-main .mail-sender small { color:var(--ui-muted); font-size:12px; line-height:1.35; overflow-wrap:anywhere; }
body.beta #study-main .mail-sender-meta { display:flex; flex-wrap:wrap; gap:1px 12px; }
body.beta #study-main .mail-reply { min-width:44px; }
body.beta #study-main .mail-reply svg { width:20px; height:20px; }
@media(max-width:599px) {
 body.beta #study-main .mail-reply { width:44px; padding:0; }
 body.beta #study-main .mail-reply span { display:none; }
}
body.beta #study-main .mail-to { grid-column:1/-1; display:grid; gap:4px; margin:0; padding:10px 12px; border-radius:12px; background:var(--ui-soft); font-size:12px; line-height:1.5; }
body.beta #study-main .mail-to>div { display:grid; grid-template-columns:44px minmax(0,1fr); gap:8px; }
body.beta #study-main .mail-to dt { color:var(--ui-muted); }
body.beta #study-main .mail-to dd { margin:0; color:var(--ui-text); overflow-wrap:anywhere; }
body.beta #study-main .mail-reader-toolbar { min-height:44px; margin:0 0 12px; }
body.beta #study-main .mail-reader-toolbar .mail-soft { padding-inline:16px; border-radius:999px; }

/* Files of a letter: a badge with the type, the name, and one even row of actions. */
body.beta #study-main .mail-attachments { list-style:none; display:grid; gap:10px; padding:0; margin:20px 0 0; }
body.beta #study-main .mail-attachments li { display:grid; grid-template-columns:44px minmax(0,1fr); gap:10px 12px; align-items:center; padding:12px; border:1px solid var(--ui-border); border-radius:16px; background:var(--ui-surface); min-width:0; }
body.beta #study-main .mail-file-kind { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; background:#5b6ee11f; color:#4558d0; font-size:10px; font-weight:800; letter-spacing:.3px; }
body.beta #study-main .mail-file-kind[data-tone=sheet] { background:#2f9e831f; color:#1f8a70; }
body.beta #study-main .mail-file-kind[data-tone=pdf] { background:#e5484d1f; color:#cf3d42; }
body.beta #study-main .mail-file-kind[data-tone=slides] { background:#e2a33a2b; color:#b3730d; }
body.beta #study-main .mail-file-kind[data-tone=image] { background:#8a63d21f; color:#7a52c7; }
body.beta #study-main .mail-file-kind[data-tone=archive],body.beta #study-main .mail-file-kind[data-tone=other] { background:var(--ui-soft); color:var(--ui-muted); }
body.beta #study-main .mail-file-copy { display:grid; gap:2px; min-width:0; }
body.beta #study-main .mail-file-copy strong { font-size:14px; font-weight:600; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
body.beta #study-main .mail-file-copy small { color:var(--ui-muted); font-size:12px; }
body.beta #study-main .mail-file-actions { grid-column:1/-1; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:8px; }
body.beta #study-main .mail-file-actions .mail-button,body.beta #study-main .mail-file-sent { min-height:40px; padding:8px 10px; border-radius:12px; background:var(--ui-accent-soft); color:var(--ui-accent); font-size:13px; font-weight:650; white-space:nowrap; transition:background-color .15s ease,transform .1s ease; }
body.beta #study-main .mail-file-actions .mail-button:active { transform:scale(.97); }
body.beta #study-main .mail-file-actions .mail-button:disabled { opacity:.6; }
body.beta #study-main .mail-file-actions .mail-button svg,body.beta #study-main .mail-file-sent svg { width:16px; height:16px; }
body.beta #study-main .mail-file-actions .mail-file-chat { background:var(--ui-accent); color:var(--ui-on-accent,#fff); }
body.beta #study-main .mail-file-sent { display:inline-flex; align-items:center; justify-content:center; gap:6px; background:var(--ui-success-bg,var(--ui-accent-soft)); color:var(--ui-success,var(--ui-accent)); }
body.beta #study-main .mail-file-hint { margin:10px 2px 0; color:var(--ui-muted); font-size:12px; line-height:1.5; }
/* A file of a draft: the same row, its actions on the right. */
body.beta #study-main .mail-attachments.is-local { margin:0; }
body.beta #study-main .mail-attachments.is-local li { grid-template-columns:44px minmax(0,1fr) auto; padding:10px 12px; }
body.beta #study-main .mail-attachments.is-local .mail-file-actions { grid-column:auto; grid-auto-columns:auto; gap:4px; }
body.beta #study-main .mail-attachments.is-local .mail-file-actions .mail-button { background:transparent; }
body.beta #study-main .mail-attachments.is-local .mail-file-actions [data-mail=remove-attachment] { width:40px; padding:0; color:var(--ui-muted); }
body.beta #study-main .mail-send-preview .mail-attachments { margin-top:20px; }

/* Writing a letter: recipients, subject and text are lines of one sheet. */
body.beta #study-main .mail-sheet { border:1px solid var(--ui-border); border-radius:20px; background:var(--ui-surface); overflow:hidden; box-shadow:0 1px 2px #1523430a,0 8px 24px -18px #15234340; transition:border-color .15s ease; }
body.beta #study-main .mail-sheet:focus-within { border-color:var(--ui-accent); }
body.beta #study-main .mail-line { display:grid; grid-template-columns:minmax(52px,auto) minmax(0,1fr); align-items:start; gap:4px; min-height:52px; padding:6px 14px; border-bottom:1px solid var(--ui-border); }
body.beta #study-main .mail-line>label,body.beta #study-main .mail-line>span:first-child { padding-top:11px; padding-right:6px; white-space:nowrap; color:var(--ui-muted); font-size:14px; line-height:1.3; }
body.beta #study-main .mail-line>label b { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:5px; padding:0 5px; border-radius:999px; background:var(--ui-accent-soft); color:var(--ui-accent); font-size:11px; font-weight:700; vertical-align:1px; }
body.beta #study-main .mail-line input { width:100%; min-width:0; min-height:40px; margin:0; padding:8px 0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--ui-text); font:inherit; font-size:16px; line-height:1.4; outline:0; }
body.beta #study-main .mail-line input[name=subject] { font-weight:600; }
body.beta #study-main .mail-line input::placeholder { color:var(--ui-muted); font-weight:400; opacity:.75; }
body.beta #study-main .mail-recipient-box { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; padding:4px 0; }
body.beta #study-main .mail-recipient-box input { flex:1 1 120px; width:auto; min-height:32px; padding:4px 0; }
body.beta #study-main .mail-lookup-note { margin:0; padding:8px 14px; border-bottom:1px solid var(--ui-border); background:var(--ui-soft); color:var(--ui-muted); font-size:12px; line-height:1.5; }
body.beta #study-main .mail-editor-field { display:grid; min-width:0; }
body.beta #study-main .mail-format { order:2; border-bottom:0; border-top:1px solid var(--ui-border); background:transparent; padding:6px 8px; }
body.beta #study-main .mail-format-button svg { width:19px; height:19px; }
body.beta #study-main .mail-editor { min-height:200px; padding:14px; }
body.beta #study-main .mail-compose { gap:12px; }
body.beta #study-main .mail-compose-actions { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; }
body.beta #study-main .mail-compose-actions>small { color:var(--ui-muted); font-size:12px; line-height:1.3; }
body.beta #study-main .mail-add-file { display:inline-flex; align-items:center; gap:7px; min-height:46px; padding:0 14px; position:relative; overflow:hidden; border-radius:14px; background:var(--ui-accent-soft); color:var(--ui-accent); font-size:14px; font-weight:650; cursor:pointer; }
body.beta #study-main .mail-add-file svg { width:18px; height:18px; }
body.beta #study-main .mail-add-file input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
body.beta #study-main .mail-add-file:focus-within { outline:2px solid var(--ui-accent); outline-offset:2px; }
body.beta #study-main .mail-compose-actions>.mail-primary { min-height:46px; padding-inline:18px; border-radius:14px; font-size:14px; }
body.beta #study-main .mail-send { display:flex; width:100%; min-height:50px; margin:14px 0 0; border-radius:16px; font-size:15px; }
body.beta #study-main .mail-draft-label { padding:5px 10px; border-radius:999px; background:var(--ui-soft); }
@media (max-width:359px) {
 body.beta #study-main .mail-reader { padding:16px 14px; }
 body.beta #study-main .mail-file-actions { grid-auto-flow:row; }
 body.beta #study-main .mail-compose-actions>small { display:none; }
 body.beta #study-main .mail-line { grid-template-columns:48px minmax(0,1fr); padding-inline:12px; }
}
@media (prefers-reduced-motion:reduce) {
 body.beta #study-main .mail-file-actions .mail-button,body.beta #study-main .mail-sheet { transition:none; }
}

/* ── «Мои сроки»: dates kept from letters, above the list; and the button that keeps one. ── */
body.beta #study-main .mail-kept { margin:0 0 14px; padding:14px 14px 12px; border-radius:20px; background:linear-gradient(150deg,var(--ui-accent-soft),var(--ui-surface) 120%); border:1px solid var(--ui-border); }
body.beta #study-main .mail-kept h4 { display:flex; align-items:center; gap:8px; margin:0 0 10px; font-size:14px; font-weight:700; letter-spacing:-.1px; color:var(--ui-text); }
body.beta #study-main .mail-kept h4 svg { width:18px; height:18px; flex:none; color:var(--ui-accent); }
body.beta #study-main .mail-kept h4 b { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:var(--ui-accent); color:var(--ui-on-accent,#fff); font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; }
body.beta #study-main .mail-kept ul { list-style:none; display:grid; gap:8px; margin:0; padding:0; }
body.beta #study-main .mail-kept-item { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px; border-radius:16px; background:var(--ui-surface); box-shadow:0 1px 2px #1523430a; }
body.beta #study-main .mail-kept-date { display:grid; place-items:center; align-content:center; width:48px; height:52px; border-radius:13px; background:var(--ui-accent-soft); color:var(--ui-accent); line-height:1; }
body.beta #study-main .mail-kept-date b { font-size:20px; font-weight:750; letter-spacing:-.4px; font-variant-numeric:tabular-nums; }
body.beta #study-main .mail-kept-date small { margin-top:3px; font-size:11px; font-weight:600; }
body.beta #study-main .mail-kept-item[data-tone=today] .mail-kept-date { background:var(--ui-danger,#d2383d); color:#fff; }
body.beta #study-main .mail-kept-item[data-tone=soon] .mail-kept-date { background:#e2a33a33; color:#a8690a; }
body.beta #study-main .mail-kept-item[data-tone=past] { opacity:.6; }
body.beta #study-main .mail-kept-copy { display:grid; gap:2px; min-width:0; }
body.beta #study-main .mail-kept-when { color:var(--ui-accent); font-size:12px; font-weight:650; }
body.beta #study-main .mail-kept-item[data-tone=today] .mail-kept-when { color:var(--ui-danger,#d2383d); }
body.beta #study-main .mail-kept-item[data-tone=soon] .mail-kept-when { color:#a8690a; }
body.beta #study-main .mail-kept-copy strong { color:var(--ui-text); font-size:14px; font-weight:600; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
body.beta #study-main .mail-kept-copy small { color:var(--ui-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.beta #study-main .mail-kept-actions { display:flex; gap:2px; }
body.beta #study-main .mail-kept-button { display:grid; place-items:center; width:40px; height:40px; min-height:0; padding:0; border:0; border-radius:12px; background:transparent; color:var(--ui-muted); cursor:pointer; transition:background-color .15s ease,color .15s ease; }
body.beta #study-main .mail-kept-button:hover,body.beta #study-main .mail-kept-button:focus-visible { background:var(--ui-accent-soft); color:var(--ui-accent); }
body.beta #study-main .mail-kept-button[data-mail=deadline-calendar] { color:var(--ui-accent); }
body.beta #study-main .mail-kept-button svg { width:19px; height:19px; }
body.beta #study-main .mail-kept-button:disabled { opacity:.5; cursor:default; }
body.beta #study-main .mail-kept-more { display:block; width:100%; min-height:40px; margin-top:8px; border:0; border-radius:12px; background:transparent; color:var(--ui-accent); font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
body.beta #study-main .mail-kept-more:hover { background:var(--ui-surface); }
body.beta #study-main .mail-kept-note { margin:10px 2px 0; color:var(--ui-muted); font-size:12px; line-height:1.45; }
body.beta #study-main .mail-deadlines li { grid-template-columns:minmax(0,1fr) auto; column-gap:10px; align-items:center; }
body.beta #study-main .mail-deadlines li>strong,body.beta #study-main .mail-deadlines li>span:not(.mail-deadline-kept) { grid-column:1; }
body.beta #study-main .mail-deadline-keep,body.beta #study-main .mail-deadline-kept { grid-column:2; grid-row:1/span 2; display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:0 12px; border:0; border-radius:999px; font:inherit; font-size:13px; font-weight:650; white-space:nowrap; }
body.beta #study-main .mail-deadline-keep { background:var(--ui-accent); color:var(--ui-on-accent,#fff); cursor:pointer; transition:transform .1s ease; }
body.beta #study-main .mail-deadline-keep:active { transform:scale(.96); }
body.beta #study-main .mail-deadline-keep:disabled { opacity:.6; cursor:default; }
body.beta #study-main .mail-deadlines li .mail-deadline-keep span { color:inherit; font-size:inherit; }
body.beta #study-main .mail-deadline-kept { background:var(--ui-surface); color:var(--ui-accent); }
body.beta #study-main .mail-deadline-keep svg,body.beta #study-main .mail-deadline-kept svg { width:15px; height:15px; flex:none; }
@media (max-width:359px) {
 body.beta #study-main .mail-deadlines li { grid-template-columns:minmax(0,1fr); }
 body.beta #study-main .mail-deadline-keep,body.beta #study-main .mail-deadline-kept { grid-column:1; grid-row:auto; justify-self:start; margin-top:6px; }
 body.beta #study-main .mail-kept-item { grid-template-columns:44px minmax(0,1fr); }
 body.beta #study-main .mail-kept-actions { grid-column:1/-1; justify-content:flex-end; }
}
@media (prefers-reduced-motion:reduce) { body.beta #study-main .mail-deadline-keep,body.beta #study-main .mail-kept-button { transition:none; } }

/* Ready letters: one row of chips above the sheet, scrolled sideways on a phone. */
body.beta #study-main .mail-templates { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; min-width:0; }
body.beta #study-main .mail-templates-title { color:var(--ui-muted); font-size:12px; font-weight:600; }
body.beta #study-main .mail-templates-list { display:flex; gap:6px; min-width:0; padding:2px 24px 2px 0; overflow-x:auto; scrollbar-width:none; mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent); -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent); }
body.beta #study-main .mail-templates-list::-webkit-scrollbar { display:none; }
body.beta #study-main .mail-template { flex:none; min-height:36px; padding:0 13px; border:1px solid var(--ui-border); border-radius:999px; background:var(--ui-surface); color:var(--ui-text); font:inherit; font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
body.beta #study-main .mail-template:hover { border-color:var(--ui-accent); color:var(--ui-accent); }
body.beta #study-main .mail-template[aria-pressed=true] { border-color:transparent; background:var(--ui-accent-soft); color:var(--ui-accent); }
body.beta #study-main .mail-template:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
body.beta #study-main .mail-template:disabled { opacity:.55; cursor:default; }
@media (prefers-reduced-motion:reduce) { body.beta #study-main .mail-template { transition:none; } }

/* Mail list actions use the same floating compose placement as posts. */
body.beta #study-main .mail-letter-head .mail-to { margin-top:12px; }
body.beta #study-main .mail-letter-head .mail-to h3 { margin:0; font-size:16px; line-height:1.4; letter-spacing:-.2px; }
body.beta #study-main .mail-letter-head .mail-avatar { overflow:hidden; }
body.beta #study-main .mail-letter-head .mail-avatar img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
body.beta #study-main .study-heading .mail-page-address { margin:4px 0 0; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
body.beta #study-main .mail-toolbar-actions { display:flex; flex:none; align-items:center; gap:8px; }
body.beta #study-main .mail-compose-fab { display:grid; place-items:center; position:fixed; right:max(16px,calc((100vw - 920px)/2)); bottom:calc(82px + var(--app-safe-bottom,env(safe-area-inset-bottom,0px))); z-index:14; width:52px; height:52px; min-height:52px; padding:0; border-radius:18px; box-shadow:0 6px 20px #315df42b; }
body.beta #study-main .mail-compose-fab svg { width:24px; height:24px; }
body.beta #study-main .account-mail:has(.mail-compose-fab) { padding-bottom:72px; }
body.beta #study-main .mail-lookup-actions { display:flex; align-items:center; flex-wrap:wrap; gap:4px 16px; padding:0 12px 8px; font-size:12px; }
body.beta #study-main .mail-lookup-actions a { display:inline-flex; align-items:center; min-height:44px; color:var(--ui-accent); }
body.beta #study-main .mail-directory-search:empty,body.beta #study-main .mail-directory-results:empty { display:none; }
body.beta #study-main .mail-directory-search { padding:0 12px 4px; }
body.beta #study-main .mail-directory-search .mail-directory-button { min-height:44px; padding:6px 2px; background:transparent; color:var(--ui-accent); font-size:13px; }
body.beta #study-main .mail-directory-results { padding:0 12px 12px; }
body.beta #study-main .mail-directory-results .mail-candidates { border:0; padding:4px 0; }
@media(min-width:1000px) { body.beta #study-main .mail-compose-fab { bottom:28px;right:36px; } }
@media(max-width:399px) { body.beta #study-main .mail-toolbar { flex-wrap:wrap; } body.beta #study-main .mail-toolbar-actions { margin-inline-start:auto; } }
body.beta:has(input:focus,textarea:focus,[contenteditable=true]:focus) #study-main .mail-compose-fab { display:none; }

/* Selected names never hide the email the letter will actually be sent to. */
body.beta #study-main .mail-recipient-box .mail-chip{height:auto;min-height:42px;border-radius:16px;align-items:center;padding:5px}
body.beta #study-main .mail-chip-copy{display:grid;gap:1px;min-width:0;padding-inline-end:5px}
body.beta #study-main .mail-chip-copy .mail-chip-name{padding:0}
body.beta #study-main .mail-chip-address{font-size:11px;line-height:1.3;font-weight:400;color:var(--ui-muted);overflow-wrap:anywhere}

/* A PDF shown as its pages. The pages are white paper in both themes, like the file itself. */
body.beta #study-main .mail-document-modes { margin:0 0 12px; }
body.beta #study-main .mail-pdf-pages { display:grid; gap:10px; min-width:0; }
body.beta #study-main .mail-pdf-page { display:block; width:100%; height:auto; border:1px solid var(--ui-border); border-radius:8px; background:#fff; }
body.beta #study-main .mail-pdf-status { margin:0; font-size:14px; color:var(--ui-muted); }

/* Inside the cabinet the back control stands beside the screen title, so the toolbar keeps only its actions. */
body.beta #study-main .mail-toolbar-hosted { justify-content:flex-end; }
body.beta #study-main .mail-toolbar-hosted:empty { display:none; }
body.beta #study-main .mail-reader-toolbar.mail-toolbar-hosted>.mail-button:first-child { padding-left:16px; }

/* A found date passed on to the study group by its headman. */
body.beta #study-main .mail-deadline-share,body.beta #study-main .mail-deadline-shared,body.beta #study-main .mail-deadline-confirm { grid-column:1 / -1; }
body.beta #study-main .mail-deadline-share { justify-self:start; display:inline-flex; align-items:center; gap:6px; min-height:38px; margin-top:6px; padding:0 12px; border:1px solid var(--ui-border); border-radius:999px; background:var(--ui-surface); color:var(--ui-accent); font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
body.beta #study-main .mail-deadlines li .mail-deadline-share span { color:inherit; font-size:inherit; }
body.beta #study-main .mail-deadline-share svg,body.beta #study-main .mail-deadline-shared svg { width:15px; height:15px; flex:none; }
body.beta #study-main .mail-deadline-share:disabled { opacity:.6; cursor:default; }
body.beta #study-main .mail-deadline-share:focus-visible,body.beta #study-main .mail-deadline-send:focus-visible,body.beta #study-main .mail-deadline-cancel:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
body.beta #study-main .mail-deadline-shared { display:inline-flex; align-items:center; gap:6px; margin:6px 0 0; color:var(--ui-accent); font-size:13px; font-weight:650; }
body.beta #study-main .mail-deadline-confirm { display:grid; gap:8px; margin-top:8px; padding:12px; border-radius:14px; background:var(--ui-surface); }
body.beta #study-main .mail-deadline-confirm p { margin:0; font-size:13px; color:var(--ui-muted); }
body.beta #study-main .mail-deadline-confirm blockquote { margin:0; padding:0 0 0 10px; border-left:3px solid var(--ui-accent); font-size:14px; line-height:1.45; color:var(--ui-text); white-space:pre-line; overflow-wrap:anywhere; }
body.beta #study-main .mail-deadline-confirm-actions { display:flex; flex-wrap:wrap; gap:8px; }
body.beta #study-main .mail-deadline-send,body.beta #study-main .mail-deadline-cancel { min-height:40px; padding:0 14px; border:0; border-radius:999px; font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
body.beta #study-main .mail-deadline-send { background:var(--ui-accent); color:var(--ui-on-accent,#fff); }
body.beta #study-main .mail-deadline-cancel { background:transparent; color:var(--ui-muted); }
body.beta #study-main .mail-deadline-send:disabled,body.beta #study-main .mail-deadline-cancel:disabled { opacity:.6; cursor:default; }

/* «Материалы предмета»: the search for letters with files from one teacher. */
body.beta #study-main .mail-materials { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; padding:12px 14px; border-radius:16px; background:var(--ui-accent-soft); }
body.beta #study-main .mail-materials div { display:grid; gap:2px; min-width:0; }
body.beta #study-main .mail-materials strong { font-size:15px; color:var(--ui-text); overflow-wrap:anywhere; }
body.beta #study-main .mail-materials span { font-size:13px; line-height:1.4; color:var(--ui-muted); overflow-wrap:anywhere; }
body.beta #study-main .mail-materials .mail-button { flex:none; }

body.beta #study-main .mail-draft-choice { padding:18px; }
body.beta #study-main .mail-draft-choice h3 { margin:0; }
body.beta #study-main .mail-draft-choice p { margin:8px 0 14px; color:var(--ui-muted); overflow-wrap:anywhere; }
body.beta #study-main .mail-draft-choice>div { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:480px){
 body.beta #study-main .mail-draft-choice>div { display:grid; }
}
