:root {
  --bg: #f4eee7;
  --bg-soft: #fbf8f4;
  --card: #ffffff;
  --card-soft: #faf6f1;
  --line: #e6ddd2;
  --line-strong: #d7c9ba;
  --text: #1e2a35;
  --muted: #6f7b88;
  --accent: #ea6a2f;
  --accent-2: #1a8f82;
  --accent-3: #2f6fe4;
  --danger: #cc3552;
  --shadow: 0 22px 55px rgba(74, 44, 20, 0.18);
  --shadow-soft: 0 12px 34px rgba(74, 44, 20, 0.12);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  color: #e5edf7;
  background: #0f1724;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(8, 13, 24, 0.7), rgba(8, 13, 24, 0.88)),
    url('./brand/hero-skyline.jpg') center center / cover no-repeat;
}

h1,
h2,
h3,
.brandName,
.authTitle,
.paneTitle,
.viewerSubject,
.topbarTitle {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

.atmo {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.mesh {
  position: absolute;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.4;
  animation: drift 16s ease-in-out infinite;
}

.mesh-a {
  width: 540px;
  height: 540px;
  left: -120px;
  top: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(33, 192, 245, 0.35), transparent 66%);
}

.mesh-b {
  width: 600px;
  height: 600px;
  right: -180px;
  top: 100px;
  background: radial-gradient(circle at 35% 35%, rgba(41, 103, 255, 0.33), transparent 68%);
  animation-delay: -6s;
}

.mesh-c {
  width: 540px;
  height: 540px;
  left: 38%;
  bottom: -260px;
  background: radial-gradient(circle at 50% 50%, rgba(22, 190, 198, 0.3), transparent 68%);
  animation-delay: -11s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(rgba(0, 0, 0, 0.35) 0.7px, transparent 0.7px);
  background-size: 3px 3px;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(26px, -24px, 0) scale(1.06);
  }
}

.hidden {
  display: none !important;
}

.authView {
  position: fixed;
  inset: 0;
  padding: 30px;
  display: grid;
  place-items: center;
}

.authPanel {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(95, 122, 162, 0.28);
  background: rgba(12, 21, 36, 0.97);
  overflow: hidden;
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.42);
  animation: riseIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.authCopy {
  padding: clamp(26px, 5vw, 46px);
  background: linear-gradient(160deg, rgba(15, 28, 46, 0.92), rgba(10, 19, 33, 0.74));
  border-right: 1px solid rgba(95, 122, 162, 0.25);
}

.authLogoShowcase {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
}

.authLogoLarge {
  width: min(360px, 94%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.35));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(25, 185, 214, 0.18);
  border: 1px solid rgba(25, 185, 214, 0.35);
  color: #c7f2ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.authCopy h1 {
  margin: 18px 0 10px;
  font-size: clamp(30px, 4.2vw, 47px);
  line-height: 1.08;
  color: #f1f6ff;
}

.authCopy p {
  margin: 0;
  color: #9cb0ca;
  font-size: 15px;
  line-height: 1.7;
  max-width: 46ch;
}

.authCopy ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.authCopy li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d2dff1;
  font-size: 14px;
  font-weight: 600;
}

.authCopy li::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(130deg, #1fc2f8, #3a7fff);
  box-shadow: 0 0 0 5px rgba(31, 194, 248, 0.16);
}

.authCard {
  padding: clamp(24px, 4vw, 36px);
  display: grid;
  align-content: center;
  gap: 12px;
  background: linear-gradient(160deg, rgba(14, 24, 40, 0.82), rgba(9, 16, 29, 0.66));
}

.authBrand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.authLogo {
  width: 132px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(111, 144, 181, 0.32);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
}

.authTitle {
  font-size: 22px;
  font-weight: 800;
  color: #f1f6ff;
}

.authTag {
  margin-top: 2px;
  font-size: 13px;
  color: #9cb0ca;
}

.authView .label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa3bf;
}

.authView .input {
  border: 1px solid rgba(87, 111, 146, 0.45);
  background: rgba(19, 32, 52, 0.82);
  color: #edf4ff;
}

.authView .input::placeholder {
  color: #6e85a5;
}

.authView .input:focus {
  border-color: rgba(73, 148, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(73, 148, 255, 0.18);
}

.authView .btnPrimary {
  background: linear-gradient(135deg, #22b8ff 0%, #2b78ff 52%, #6a52f2 100%);
  box-shadow: 0 14px 28px rgba(43, 120, 255, 0.3);
}

.authView .btnPrimary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(43, 120, 255, 0.36);
}

.authHint {
  margin: 2px 0 0;
  color: #8ea2be;
  font-size: 12px;
}

.authError {
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 87, 132, 0.35);
  background: rgba(255, 87, 132, 0.12);
  color: #ffc4d4;
  font-size: 13px;
  padding: 10px 12px;
}

.authRow {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 13px;
  color: #5e6f81;
  font-weight: 600;
}

.input,
.search,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font: inherit;
  padding: 12px 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.input:focus,
.search:focus,
textarea:focus {
  border-color: rgba(47, 111, 228, 0.5);
  box-shadow: 0 0 0 4px rgba(47, 111, 228, 0.14);
  transform: translateY(-1px);
}

.btnPrimary,
.btnGhost {
  appearance: none;
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btnPrimary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8b3d 45%, var(--accent-2) 100%);
  box-shadow: 0 14px 28px rgba(234, 106, 47, 0.28);
}

.btnPrimary:hover {
  transform: translateY(-1px);
}

.btnPrimary:active {
  transform: translateY(0);
}

.btnGhost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: #2d3c4f;
}

.btnGhost:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.btnDanger {
  border-color: rgba(204, 53, 82, 0.32);
  color: #a7253d;
  background: rgba(204, 53, 82, 0.09);
}

.btnDanger:hover {
  border-color: rgba(204, 53, 82, 0.5);
}

.btnSmall {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 12px;
}

.btnBlock {
  width: 100%;
}

.btnIcon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 20px;
}

.authHint {
  margin: 2px 0 0;
  color: #8ea2be;
  font-size: 12px;
}

.authError {
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 87, 132, 0.35);
  background: rgba(255, 87, 132, 0.12);
  color: #ffc4d4;
  font-size: 13px;
  padding: 10px 12px;
}

.appView {
  height: 100%;
  padding: 16px;
  animation: riseIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shell {
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 308px 1fr;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
  border-right: 1px solid rgba(217, 206, 193, 0.7);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 6px;
}

.brandLogo {
  width: 126px;
  height: 44px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.92);
}

.brandName {
  font-size: 20px;
  font-weight: 700;
}

.brandTag {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.sectionTitle {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #7e8996;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.folders {
  display: grid;
  gap: 8px;
}

.foldersSecondary {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.folderBtn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border-radius: 13px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.folderBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 111, 228, 0.45);
}

.folderBtnActive {
  border-color: rgba(26, 143, 130, 0.42);
  background: linear-gradient(135deg, rgba(26, 143, 130, 0.12), rgba(47, 111, 228, 0.12));
}

.folderLeft {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.folderIcon {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(47, 111, 228, 0.12);
  flex: 0 0 auto;
}

.folderIcon-inbox {
  background: linear-gradient(140deg, var(--accent-3), #60a3ff);
}

.folderIcon-sent {
  background: linear-gradient(140deg, var(--accent), #ffab42);
}

.folderIcon-spam {
  background: linear-gradient(140deg, var(--danger), #ff9064);
}

.folderIcon-trash {
  background: linear-gradient(140deg, #8e9aab, #b6c2d1);
}

.folderName {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folderBadge {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.sidebarFooter {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(251, 248, 244, 0.99));
}

.topbar {
  border-bottom: 1px solid rgba(217, 206, 193, 0.72);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto minmax(240px, 520px) auto;
  align-items: center;
  gap: 12px;
}

.topbarLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbarTitleWrap {
  min-width: 0;
}

.topbarTitle {
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbarSub {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.searchWrap {
  min-width: 0;
}

.search {
  border-radius: 999px;
  padding-left: 16px;
}

.topActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 470px) 1fr;
}

.pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.paneList {
  border-right: 1px solid rgba(217, 206, 193, 0.72);
  background: rgba(255, 255, 255, 0.92);
}

.paneHead {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(217, 206, 193, 0.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.paneHeadMeta {
  min-width: 0;
}

.paneTitle {
  font-size: 19px;
  font-weight: 700;
}

.paneSub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.messageList {
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.msg {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  padding: 11px 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(91, 57, 26, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  animation: rowIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.msg:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 111, 228, 0.42);
  box-shadow: 0 10px 22px rgba(91, 57, 26, 0.12);
}

.msgActive {
  border-color: rgba(26, 143, 130, 0.46);
  background: linear-gradient(145deg, rgba(26, 143, 130, 0.13), rgba(47, 111, 228, 0.13));
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msgTop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.msgFrom {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgDate {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.msgSubject {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #2b3b4f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgMeta {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.pill {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: #5b6a7d;
}

.pillUnread {
  border-color: rgba(26, 143, 130, 0.45);
  color: #17695f;
  background: rgba(26, 143, 130, 0.13);
}

.listLoading {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  height: 74px;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.62) 8%,
    rgba(244, 236, 226, 0.86) 18%,
    rgba(255, 255, 255, 0.62) 33%
  );
  background-size: 200% 100%;
  animation: shine 1.1s linear infinite;
}

@keyframes shine {
  to {
    background-position-x: -200%;
  }
}

.empty {
  padding: 28px 16px;
  text-align: center;
  display: grid;
  place-items: center;
}

.emptyIcon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(26, 143, 130, 0.16), rgba(47, 111, 228, 0.18));
}

.emptyTitle {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
}

.emptyText {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  max-width: 280px;
}

.paneViewer {
  background: rgba(255, 255, 255, 0.9);
}

.viewerEmpty {
  min-height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px;
  color: #546475;
}

.viewerLogo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #33475b;
  box-shadow: var(--shadow-soft);
}

.viewerTitle {
  margin-top: 11px;
  font-size: 19px;
  font-weight: 700;
  color: #2d3e51;
}

.viewerText {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.viewer {
  overflow: auto;
}

.viewerHead {
  padding: 16px;
  border-bottom: 1px solid rgba(217, 206, 193, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.viewerSubject {
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 700;
}

.viewerMeta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #506174;
  font-size: 13px;
}

.viewerFrom,
.viewerDate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewerActions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.viewerTo {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.attachments {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.att {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  text-decoration: none;
  font-size: 12px;
  color: #35506c;
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease;
}

.att:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 111, 228, 0.45);
}

.viewerBody {
  padding: 18px;
}

.emailText,
.emailHtml {
  font-size: 14px;
  line-height: 1.65;
  color: #2c3f53;
}

.emailText {
  white-space: pre-wrap;
}

.emailHtml img {
  max-width: 100%;
  height: auto;
}

.backdrop,
.drawerScrim {
  position: fixed;
  inset: 0;
  background: rgba(25, 15, 8, 0.45);
}

.backdrop {
  z-index: 40;
}

.drawerScrim {
  z-index: 25;
}

.modal {
  position: fixed;
  z-index: 50;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100% - 24px));
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  background: rgba(252, 248, 242, 0.95);
  box-shadow: var(--shadow);
  padding: 16px;
}

.modalTitle {
  font-size: 17px;
  font-weight: 800;
}

.modalSub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.modalGrid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.textarea {
  min-height: 170px;
  resize: vertical;
}

.fileInput {
  padding: 8px 10px;
}

.composeHint {
  margin-top: 6px;
  font-size: 11px;
  color: #6a7b90;
}

.composeAttachments {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.composeAttachmentItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
}

.composeAttachmentMain {
  min-width: 0;
}

.composeAttachmentName {
  font-size: 12px;
  font-weight: 700;
  color: #2a3d52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composeAttachmentSize {
  margin-top: 2px;
  font-size: 11px;
  color: #637489;
}

.composeAttachmentRemove {
  min-width: 84px;
}

.modalActions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.95);
  color: #2f4358;
  min-width: 220px;
  max-width: min(420px, calc(100% - 30px));
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
}

.toastTitle {
  font-size: 13px;
  font-weight: 700;
}

.toastText {
  margin-top: 3px;
  font-size: 12px;
  color: #637387;
}

.composeFab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #ff9b51);
  color: #fff;
  font-size: 31px;
  line-height: 1;
  display: none;
  place-items: center;
  box-shadow: 0 16px 28px rgba(234, 106, 47, 0.35);
  z-index: 20;
}

.composeFab:active {
  transform: scale(0.97);
}

@media (max-width: 1260px) {
  .content {
    grid-template-columns: minmax(320px, 420px) 1fr;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 420px) auto;
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .authPanel,
  .shell,
  .sidebar,
  .backdrop,
  .drawerScrim {
    backdrop-filter: none;
  }

  .authPanel {
    background: rgba(12, 21, 36, 0.97);
  }

  .shell {
    background: rgba(255, 255, 255, 0.99);
  }

  .authView {
    padding: 16px;
  }

  .authPanel {
    grid-template-columns: 1fr;
  }

  .authCopy {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  }

  .appView {
    padding: 8px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(88vw, 340px);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    z-index: 30;
    border-right: 1px solid rgba(217, 206, 193, 0.88);
    background: rgba(255, 255, 255, 0.99);
    backdrop-filter: none;
    box-shadow: 0 20px 45px rgba(74, 44, 20, 0.28);
  }

  .shell.sidebarOpen .sidebar {
    transform: translateX(0);
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .topActions {
    justify-content: flex-start;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .paneList {
    border-right: 0;
  }

  .paneViewer {
    display: none;
  }

  .shell.mobileViewer .paneList {
    display: none;
  }

  .shell.mobileViewer .paneViewer {
    display: grid;
  }

  .composeFab {
    display: grid;
  }
}

@media (max-width: 680px) {
  .topActions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .topActions .btnGhost {
    width: 100%;
  }

  .row2 {
    grid-template-columns: 1fr;
  }

  .modal {
    top: auto;
    bottom: 8px;
    transform: translateX(-50%);
    width: calc(100% - 12px);
    max-height: calc(100% - 16px);
    overflow: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mesh,
  .authPanel,
  .appView,
  .msg {
    animation: none !important;
  }
}
