.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
dialog.new-mail-dialog { width: min(920px, calc(100vw - 56px)); max-width: 920px; height: min(740px, calc(100dvh - 64px)); max-height: none; padding: 0; border: 1px solid #dce4db; border-radius: 16px; color: #2b4236; box-shadow: 0 35px 120px #17372d40; overflow: hidden; }
.new-mail-dialog::backdrop { background: #263d344f; backdrop-filter: blur(5px); }
.new-mail-dialog #modal-content { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.new-mail-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 17px 25px; border-bottom: 1px solid #e5eae1; background: #f5f7f1; }
.new-mail-title-group { display: flex; align-items: center; gap: 12px; }
.new-mail-symbol { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: #e3ebdd; border-radius: 11px; color: #446847; }
.new-mail-header h2 { font-size: 18px; line-height: 1.5; font-weight: 650; margin: 0; }
.new-mail-header p { margin: 3px 0 0; font-size: 10px; color: #8b9983; letter-spacing: .8px; }
.new-mail-header > .icon-btn { color: #82917b; }
.new-mail-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.new-mail-from { flex: 0 0 auto; display: flex; align-items: center; gap: 17px; padding: 12px 29px; border-bottom: 1px solid #edf0e9; font-size: 12px; }
.new-mail-field-label { flex: 0 0 48px; color: #87957d; font-size: 12px; }
.new-mail-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.new-mail-avatar { display: inline-flex; width: 25px; height: 25px; align-items: center; justify-content: center; background: #edf2e7; border: 1px solid #e0e8d7; border-radius: 50%; font-size: 11px; color: #526e48; }
.new-mail-identity strong { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.new-mail-sender { font-size: 10px; color: #8c9882; margin-left: 7px; }
.new-mail-demo { margin-left: auto; padding: 4px 7px; color: #a38a4b; background: #f9f4e5; border-radius: 5px; font-size: 9px; white-space: nowrap; }
.new-mail-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.new-mail-envelope { flex: 0 0 auto; padding: 0 29px; }
.new-mail-recipient-row { display: flex; align-items: center; gap: 25px; border-bottom: 1px solid #edf0e9; }
.new-mail-address { display: flex; flex: 1; align-items: center; min-width: 0; gap: 17px; }
.new-mail-contact { display: flex; align-items: center; width: 195px; gap: 9px; }
.new-mail-subject { display: flex; align-items: center; gap: 17px; border-bottom: 1px solid #edf0e9; }
.new-mail-envelope label { flex: 0 0 48px; font-size: 12px; color: #87957d; }
.new-mail-contact label { flex: 0 0 28px; font-size: 11px; }
.new-mail-envelope input { width: 100%; min-width: 0; height: 49px; border: 0; padding: 10px 0; border-radius: 0; font-size: 13px; background: transparent; color: #334d3c; box-shadow: none; }
.new-mail-contact input { font-size: 11px; }
.new-mail-envelope input::placeholder, .new-mail-message textarea::placeholder { color: #a3ad9a; }
.new-mail-envelope input:focus { outline: 0; box-shadow: inset 0 -2px #9bb78a; }
.new-mail-envelope input[readonly] { color: #829477; }
.new-mail-message { flex: 1; min-height: 160px; padding: 24px 29px 10px; display: flex; }
.new-mail-message textarea { flex: 1; width: 100%; min-height: 145px; padding: 0; border: 0; border-radius: 0; font-size: 14px; line-height: 1.95; color: #354d3e; resize: none; outline: none; }
.new-mail-message textarea:focus { outline: none; }
.new-mail-files-list { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 29px; }
.new-mail-files-list:not(:empty) { padding-block: 8px 15px; }
.new-mail-file { display: flex; align-items: center; gap: 9px; padding: 8px 9px 8px 12px; border: 1px solid #e0e7d9; background: #f8faf5; border-radius: 8px; max-width: 100%; }
.new-mail-file > .icon { width: 16px; color: #8d9e7e; }
.new-mail-file > span { font-size: 11px; overflow-wrap: anywhere; min-width: 0; }
.new-mail-file small { font-size: 9px; color: #a0aa96; display: block; margin-top: 3px; }
.new-mail-file .icon-btn { min-height: 26px; min-width: 26px; }
.new-mail-file .icon-btn .icon { width: 14px; }
.new-mail-tools { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; padding: 8px 23px; border-top: 1px solid #edf0e8; }
.new-mail-tools .btn { padding: 7px 6px; font-weight: 450; color: #637b53; }
.new-mail-attachment-hint { font-size: 10px; color: #a1aa97; }
.new-mail-count { margin-left: auto; color: #9da791; font-size: 10px; }
.new-mail-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 25px; border-top: 1px solid #e8ece3; background: #fbfcf8; }
.new-mail-footer-note { font-size: 10px; color: #869579; display: flex; align-items: flex-start; gap: 7px; line-height: 1.6; }
.new-mail-footer-note .dot { background: #a9b698; margin-top: 5px; }
.new-mail-footer-note small { display: block; font-size: 9px; color: #a6ae9d; margin-top: 3px; }
.new-mail-footer-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.new-mail-footer-actions .btn { font-size: 12px; padding: 11px 17px; }
.new-mail-footer-actions .btn.primary { min-width: 116px; }
.new-mail-dialog button:disabled, .new-mail-dialog input:disabled, .new-mail-dialog textarea:disabled { opacity: .6; }
@media (max-width: 720px) {
  dialog.new-mail-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .new-mail-header { padding: 13px 17px; }
  .new-mail-symbol { width: 34px; height: 34px; }
  .new-mail-header h2 { font-size: 17px; }
  .new-mail-from { padding: 11px 18px; gap: 9px; }
  .new-mail-field-label, .new-mail-envelope label { flex-basis: 43px; font-size: 11px; }
  .new-mail-sender { display: none; }
  .new-mail-identity { gap: 7px; }
  .new-mail-identity strong { font-size: 11px; }
  .new-mail-avatar { width: 22px; height: 22px; }
  .new-mail-demo { font-size: 8px; padding: 4px 5px; }
  .new-mail-envelope { padding-inline: 18px; }
  .new-mail-recipient-row { display: block; }
  .new-mail-contact { width: 100%; gap: 9px; border-top: 1px solid #f1f3ed; }
  .new-mail-address, .new-mail-subject { gap: 9px; }
  .new-mail-envelope input { height: 44px; font-size: 16px; }
  .new-mail-contact input { height: 39px; font-size: 16px; }
  .new-mail-message { padding: 20px 18px 10px; min-height: 150px; }
  .new-mail-message textarea { font-size: 16px; min-height: 135px; line-height: 1.8; }
  .new-mail-tools { padding: 7px 14px; gap: 7px; }
  .new-mail-tools .btn { font-size: 11px; }
  .new-mail-attachment-hint { font-size: 9px; }
  .new-mail-footer { padding: 11px 16px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  .new-mail-footer-note { font-size: 9px; }
  .new-mail-footer-note small { font-size: 8px; max-width: 124px; }
  .new-mail-footer-actions { gap: 4px; }
  .new-mail-footer-actions .btn { padding: 10px; font-size: 11px; }
  .new-mail-footer-actions .btn.primary { min-width: 96px; }
  .new-mail-footer-actions .btn.ghost { padding-inline: 7px; }
  .new-mail-files-list { padding-inline: 18px; }
}
@media (max-width: 380px) {
  .new-mail-footer-note > .dot, .new-mail-attachment-hint { display: none; }
  .new-mail-footer-actions { gap: 0; }
}
