.modal-card[data-modal="mail"] .modal-body {
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.mail-titlebar {
  min-height: 1.9rem;
  padding: 0 0 0 0.16rem;
  border: none;
  background: #252033;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.mail-app-title {
  min-height: 1.62rem;
  min-width: 8.2rem;
  border: none;
  border-radius: 0.42rem 0.42rem 0 0;
  background: #252033;
  color: #f2f6ff;
  font-size: 0.66rem;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0 0.56rem;
  line-height: 1;
}

.mail-app-icon {
  width: 0.98rem;
  height: 0.98rem;
}

.mail-titlebar .win-controls {
  flex: 0 0 auto;
  margin-left: auto;
}

.mail-titlebar .win-btn {
  width: 2.18rem;
  height: 1.9rem;
  font-size: 0.78rem;
}

.mail-titlebar .win-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mail-titlebar .win-btn:active {
  background: rgba(255, 255, 255, 0.07);
}

.mail-titlebar .win-btn.win-close:hover {
  background: var(--win-red-0);
  color: #fff;
}

.mail-titlebar .win-btn.win-close:active {
  background: rgba(255, 77, 91, 0.7);
  color: #fff;
}

.app-mail {
  height: 100%;
  min-height: 0;
  background: #11161d;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
}

.mail-compose {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.22rem;
  padding: 0.34rem 0.42rem;
  background: #0f141b;
  overflow: hidden;
}

.mail-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mail-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
}

.mail-fields-main {
  display: grid;
  gap: 0.16rem;
}

.mail-row {
  display: block;
}

.mail-row input {
  width: 100%;
  min-height: 1.66rem;
  border: 1px solid rgba(168, 189, 215, 0.24);
  border-radius: 0.3rem;
  background: #14191f;
  color: #e5f2ff;
  padding: 0 0.44rem;
}

.mail-row input:focus {
  outline: none;
  border-color: rgba(114, 182, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(114, 182, 255, 0.22);
}

.mail-row input::placeholder {
  color: rgba(169, 194, 224, 0.58);
}

.mail-editor-wrap {
  min-height: 0;
  border: 1px solid rgba(168, 189, 215, 0.24);
  border-radius: 0.32rem;
  background: #14191f;
}

.mail-editor {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #e5f2ff;
  font: 0.64rem/1.5 "Segoe UI", "Yu Gothic UI", "Meiryo", sans-serif;
  padding: 0.56rem 0.66rem;
  resize: none;
}

.mail-editor:focus {
  outline: none;
}

.mail-editor::placeholder {
  color: rgba(169, 194, 224, 0.54);
}

.mail-send-fab {
  width: 2.06rem;
  height: 2.06rem;
  border: 1px solid rgba(109, 181, 255, 0.75);
  border-radius: 999px;
  background: linear-gradient(180deg, #4f8bff 0%, #306ee8 100%);
  color: #f5f9ff;
  display: inline-grid;
  place-items: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(26, 79, 178, 0.34);
  line-height: 0;
  padding: 0;
  align-self: center;
  margin-left: 0.28rem;
  margin-right: 0.28rem;
}

.mail-send-fab:hover {
  background: linear-gradient(180deg, #6398ff 0%, #3f7df0 100%);
}

.mail-send-fab:active {
  background: linear-gradient(180deg, #4c86f7 0%, #2f69dd 100%);
}

.mail-send-fab:disabled {
  opacity: 0.6;
  cursor: default;
  filter: grayscale(0.22);
}

.mail-send-fab svg {
  width: 1rem;
  height: 1rem;
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  fill: #fff;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: 50% 50%;
}

.mail-send-fab svg path {
  fill: #fff;
  stroke: none;
}

.mail-statusbar {
  min-height: 1.18rem;
  border-top: none;
  background: #14191f;
  color: #a0b8d8;
  font-size: 0.58rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.42rem;
}

.mail-status-link {
  color: #b8d2f3;
  font-size: 0.66rem;
  text-decoration: none;
  border-bottom: none;
}

.mail-status-link:hover {
  color: #d2e4ff;
  border-bottom: none;
}

.mail-status-link:active {
  color: #adc8ec;
}

.mail-send-status {
  margin-left: auto;
  margin-right: 1rem;
  color: #9eb8dc;
  font-size: 0.62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-send-status.is-error {
  color: #ff9ea5;
}

.mail-send-status.is-success {
  color: #9fe4b5;
}
