.melolook-view {
  padding: 0 !important;
  min-height: calc(100vh - 116px);
}

.melolook-shell {
  --ml-blue: #0f6cbd;
  --ml-blue-dark: #174b7a;
  --ml-border: #d9e2ec;
  --ml-muted: #64748b;
  --ml-bg: #f5f7fb;
  min-height: calc(100vh - 116px);
  background: var(--ml-bg);
  color: #102a43;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.melolook-commandbar {
  min-height: 62px;
  display: grid;
  grid-template-columns: 200px auto minmax(240px, 620px) 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  color: white;
  background: linear-gradient(105deg, #174b7a, #0f6cbd 58%, #288ad6);
  box-shadow: 0 2px 12px rgba(15, 52, 87, .18);
}

.melolook-brand { display: flex; align-items: center; gap: 11px; }
.melolook-app-nav { display: flex; gap: 5px; }
.melolook-app-nav button { min-height: 42px; border: 0; border-radius: 7px; padding: 0 12px; background: transparent; color: rgba(255,255,255,.82); cursor: pointer; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.melolook-app-nav button:hover, .melolook-app-nav button.active { color: white; background: rgba(255,255,255,.18); }
.melolook-workspace { flex: 1; min-height: 0; overflow: hidden; }
.melolook-brand-mark {
  width: 38px; height: 38px; border-radius: 9px; background: white; color: var(--ml-blue);
  display: grid; place-items: center; font-weight: 900; font-size: 19px; box-shadow: 0 5px 14px rgba(0,0,0,.14);
}
.melolook-brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.melolook-brand small { display: block; opacity: .82; font-size: 11px; }

.melolook-search { position: relative; }
.melolook-search input {
  width: 100%; min-height: 40px; border: 0; border-radius: 8px; padding: 0 44px 0 42px;
  color: #102a43; background: rgba(255,255,255,.96); box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.melolook-search span { position: absolute; left: 14px; top: 10px; color: #52677a; }
.melolook-search button { position: absolute; right: 6px; top: 5px; width: 30px; height: 30px; border: 0; background: transparent; color: #52677a; cursor: pointer; }

.melolook-accountbar { display: flex; justify-content: flex-end; align-items: center; gap: 9px; min-width: 0; }
.melolook-account-copy { min-width: 0; text-align: right; }
.melolook-account-copy strong, .melolook-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.melolook-account-copy small { opacity: .8; }
.melolook-icon-button {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid rgba(255,255,255,.38);
  background: rgba(255,255,255,.1); color: inherit; cursor: pointer; font-size: 17px;
}
.melolook-icon-button:hover { background: rgba(255,255,255,.2); }

.melolook-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(310px, 400px) minmax(430px, 1fr); }
.melolook-folders, .melolook-list-pane, .melolook-reader { min-height: 0; overflow: auto; }
.melolook-folders { padding: 16px 12px; background: #f0f4f8; border-right: 1px solid var(--ml-border); }
.melolook-compose-button {
  width: 100%; min-height: 44px; border: 0; border-radius: 8px; color: white; background: var(--ml-blue);
  font-weight: 800; font-size: 14px; cursor: pointer; box-shadow: 0 6px 16px rgba(15,108,189,.2);
}
.melolook-compose-button:hover { background: #0b5ca3; }
.melolook-folder-group { margin-top: 20px; }
.melolook-folder-title { margin: 0 10px 8px; color: #718096; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.melolook-folder {
  width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 7px;
  padding: 0 10px; background: transparent; color: #334e68; font-weight: 650; text-align: left; cursor: pointer;
}
.melolook-folder:hover { background: #e3ebf4; }
.melolook-folder.active { color: #075a9c; background: #d9eaf8; }
.melolook-folder span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.melolook-folder em { font-style: normal; font-size: 11px; color: #52677a; }
.melolook-quota { margin: 24px 9px 0; color: var(--ml-muted); font-size: 11px; }
.melolook-quota-track { height: 5px; background: #d8e1ea; border-radius: 999px; overflow: hidden; margin: 7px 0; }
.melolook-quota-track i { display: block; height: 100%; width: var(--quota, 0%); background: var(--ml-blue); }

.melolook-list-pane { background: white; border-right: 1px solid var(--ml-border); }
.melolook-list-header { position: sticky; top: 0; z-index: 2; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--ml-border); padding: 15px 16px 11px; }
.melolook-list-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.melolook-list-title h2 { margin: 0; font-size: 20px; }
.melolook-list-tools { display: flex; gap: 6px; }
.melolook-list-tools button { border: 1px solid var(--ml-border); background: white; border-radius: 6px; min-height: 32px; padding: 0 10px; color: #334e68; cursor: pointer; }
.melolook-filter-row { display: flex; gap: 12px; margin-top: 10px; color: var(--ml-muted); font-size: 12px; }
.melolook-filter-row button { border: 0; padding: 0; background: none; color: inherit; cursor: pointer; }
.melolook-filter-row button.active { color: var(--ml-blue); font-weight: 800; }

.melolook-message-list { min-height: 200px; }
.melolook-message-card {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; min-height: 92px; padding: 13px 14px;
  border: 0; border-bottom: 1px solid #e7edf3; width: 100%; background: white; text-align: left; cursor: pointer;
}
.melolook-message-card:hover { background: #f6f9fc; }
.melolook-message-card.active { background: #eaf4fc; box-shadow: inset 3px 0 var(--ml-blue); }
.melolook-message-card.unread { background: #f4f9fe; }
.melolook-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #d9eaf8; color: #075a9c; font-weight: 850; }
.melolook-message-main { min-width: 0; }
.melolook-message-main strong, .melolook-message-subject, .melolook-message-preview { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.melolook-message-main strong { font-size: 13px; color: #243b53; }
.melolook-message-subject { margin-top: 4px; font-size: 13px; color: #334e68; }
.melolook-message-preview { margin-top: 4px; font-size: 12px; color: #829ab1; }
.melolook-message-meta { text-align: right; color: #829ab1; font-size: 10px; white-space: nowrap; }
.melolook-message-meta b { display: block; color: #e0a000; font-size: 15px; margin-top: 9px; }
.melolook-message-card.unread .melolook-message-main strong, .melolook-message-card.unread .melolook-message-subject { font-weight: 850; color: #102a43; }

.melolook-reader { background: white; padding: 0; }
.melolook-reader-empty, .melolook-empty { min-height: 300px; display: grid; place-items: center; text-align: center; color: var(--ml-muted); padding: 40px; }
.melolook-reader-empty div { max-width: 330px; }
.melolook-reader-empty span { display: block; font-size: 52px; opacity: .25; margin-bottom: 10px; }
.melolook-reader-header { padding: 24px 28px 16px; border-bottom: 1px solid var(--ml-border); }
.melolook-reader-header h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.25; }
.melolook-reader-sender { display: flex; align-items: center; gap: 12px; }
.melolook-reader-sender .melolook-avatar { width: 42px; height: 42px; }
.melolook-sender-copy { flex: 1; min-width: 0; }
.melolook-sender-copy strong, .melolook-sender-copy span { display: block; overflow: hidden; text-overflow: ellipsis; }
.melolook-sender-copy span { color: var(--ml-muted); font-size: 12px; margin-top: 3px; }
.melolook-reader-actions { display: flex; gap: 7px; flex-wrap: wrap; padding: 12px 28px; border-bottom: 1px solid var(--ml-border); }
.melolook-reader-actions button { min-height: 34px; border: 1px solid var(--ml-border); border-radius: 6px; background: white; color: #334e68; padding: 0 12px; cursor: pointer; font-weight: 700; }
.melolook-reader-actions button:hover { color: var(--ml-blue); border-color: #8ec3e8; background: #f3f9fd; }
.melolook-reader-body { padding: 26px 30px 50px; color: #243b53; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.melolook-attachments { padding: 0 28px 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.melolook-attachment { border: 1px solid var(--ml-border); border-radius: 7px; padding: 9px 12px; color: #334e68; background: #f8fafc; text-decoration: none; font-size: 12px; }

.melolook-connect { flex: 1; display: grid; place-items: center; padding: 34px; background: radial-gradient(circle at 70% 15%, #d8efff, transparent 33%), #f5f8fc; }
.melolook-connect-card { width: min(780px, 100%); display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; background: white; border: 1px solid var(--ml-border); border-radius: 18px; box-shadow: 0 24px 70px rgba(33,68,105,.16); }
.melolook-connect-intro { padding: 42px 34px; background: linear-gradient(145deg, #123b61, #0f6cbd); color: white; }
.melolook-connect-intro .melolook-brand-mark { margin-bottom: 24px; }
.melolook-connect-intro h2 { font-size: 30px; margin: 0 0 12px; }
.melolook-connect-intro p { color: rgba(255,255,255,.82); line-height: 1.6; }
.melolook-feature-list { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 11px; font-size: 13px; }
.melolook-feature-list li::before { content: "✓"; margin-right: 8px; color: #8ce1c2; font-weight: 900; }
.melolook-connect-form { padding: 38px 36px; }
.melolook-connect-form h3 { margin: 0 0 5px; font-size: 22px; }
.melolook-connect-form > p { margin: 0 0 22px; color: var(--ml-muted); font-size: 13px; }
.melolook-field { display: grid; gap: 6px; margin-bottom: 14px; color: #334e68; font-size: 12px; font-weight: 750; }
.melolook-field input, .melolook-field textarea, .melolook-field select { width: 100%; border: 1px solid #cbd8e5; border-radius: 7px; padding: 10px 11px; color: #102a43; background: white; }
.melolook-field input:focus, .melolook-field textarea:focus { outline: 3px solid rgba(15,108,189,.14); border-color: var(--ml-blue); }
.melolook-advanced { margin: 8px 0 16px; }
.melolook-advanced summary { color: var(--ml-blue); cursor: pointer; font-size: 12px; font-weight: 800; }
.melolook-advanced-grid { display: grid; grid-template-columns: 1fr 90px; gap: 10px; margin-top: 12px; }
.melolook-primary { min-height: 42px; border: 0; border-radius: 7px; padding: 0 18px; color: white; background: var(--ml-blue); font-weight: 800; cursor: pointer; }
.melolook-primary:disabled { opacity: .55; cursor: wait; }
.melolook-form-message { min-height: 18px; color: #b42318; font-size: 12px; margin: 10px 0 0; }
.melolook-security-note { margin-top: 18px; color: var(--ml-muted); font-size: 11px; line-height: 1.5; }

.melolook-modal-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(15,35,55,.38); display: grid; place-items: end center; padding: 24px; }
.melolook-compose { width: min(760px, calc(100vw - 30px)); max-height: calc(100vh - 40px); background: white; border-radius: 12px 12px 4px 4px; box-shadow: 0 24px 80px rgba(0,0,0,.26); overflow: auto; }
.melolook-compose-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 17px; color: white; background: #174b7a; }
.melolook-compose-header h3 { margin: 0; font-size: 15px; }
.melolook-compose-header button { border: 0; color: white; background: transparent; font-size: 20px; cursor: pointer; }
.melolook-compose-fields { padding: 8px 18px 0; }
.melolook-compose-line { display: grid; grid-template-columns: 60px 1fr; align-items: center; border-bottom: 1px solid #e7edf3; }
.melolook-compose-line label { color: var(--ml-muted); font-size: 12px; }
.melolook-compose-line input { min-height: 40px; border: 0; outline: 0; color: #102a43; }
.melolook-compose textarea { width: 100%; min-height: 260px; resize: vertical; border: 0; padding: 18px; outline: 0; line-height: 1.55; color: #243b53; }
.melolook-compose-footer { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--ml-border); }
.melolook-compose-footer .melolook-primary { min-width: 90px; }
.melolook-secondary { min-height: 38px; border: 1px solid var(--ml-border); border-radius: 7px; background: white; color: #334e68; padding: 0 13px; cursor: pointer; font-weight: 700; }
.melolook-compose-footer span { color: var(--ml-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.melolook-hidden { display: none !important; }
.melolook-loading { padding: 30px; text-align: center; color: var(--ml-muted); }
.melolook-toast { position: fixed; z-index: 1400; right: 24px; bottom: 24px; max-width: 390px; padding: 13px 16px; border-radius: 8px; color: white; background: #174b7a; box-shadow: 0 12px 40px rgba(0,0,0,.2); font-size: 13px; }
.melolook-toast.error { background: #a61b1b; }

.ml-calendar-layout, .ml-people-layout { height: 100%; min-height: 650px; display: grid; grid-template-columns: 245px minmax(0, 1fr); background: white; }
.ml-calendar-sidebar, .ml-people-sidebar { padding: 17px 14px; overflow: auto; background: #f2f6fa; border-right: 1px solid var(--ml-border); }
.ml-calendar-sidebar section { margin-top: 22px; display: grid; gap: 9px; }
.ml-calendar-sidebar h3, .ml-people-sidebar h3 { margin: 0 0 6px; color: #52677a; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.ml-calendar-sidebar label { font-size: 13px; color: #334e68; }
.ml-mini-calendar { margin-top: 18px; padding: 12px; border-radius: 10px; background: white; border: 1px solid var(--ml-border); }
.ml-mini-calendar header { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; margin-bottom: 8px; text-align: center; }
.ml-mini-calendar header button, .ml-mini-days button { border: 0; background: transparent; color: #334e68; cursor: pointer; }
.ml-mini-weekdays, .ml-mini-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; }
.ml-mini-weekdays span { color: var(--ml-muted); padding: 5px 0; }
.ml-mini-days button { width: 27px; height: 27px; margin: 1px auto; border-radius: 50%; }
.ml-mini-days button:hover, .ml-mini-days button.selected { color: white; background: var(--ml-blue); }
.ml-mini-days button.today { outline: 2px solid #65aee3; outline-offset: 1px; }
.ml-mini-days button.muted { color: #aab7c4; }
.ml-category-link { border: 0; background: transparent; text-align: left; padding: 5px 2px; cursor: pointer; color: #334e68; }
.ml-category-link i { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--category); }
.ml-calendar-main, .ml-people-main { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.ml-calendar-toolbar { padding: 10px 14px; border-bottom: 1px solid var(--ml-border); display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; gap: 12px; align-items: center; }
.ml-calendar-toolbar > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ml-calendar-toolbar h2 { margin: 0; text-align: center; font-size: 20px; }
.ml-calendar-tools { justify-content: flex-end; }
.ml-calendar-tools button, .ml-calendar-tools select { min-height: 34px; padding: 0 9px; border: 1px solid var(--ml-border); background: white; color: #334e68; border-radius: 6px; cursor: pointer; font-weight: 700; }
.ml-calendar-tools button.active { color: white; background: var(--ml-blue); border-color: var(--ml-blue); }
.ml-calendar-canvas { flex: 1; min-height: 0; overflow: auto; background: white; }
.ml-month-weekdays { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(7, 1fr); background: #f7f9fc; border-bottom: 1px solid var(--ml-border); }
.ml-month-weekdays strong { padding: 8px; text-align: center; color: #52677a; font-size: 11px; text-transform: uppercase; }
.ml-month-grid { min-height: 720px; display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); grid-template-rows: repeat(6, minmax(112px, 1fr)); }
.ml-month-day { min-width: 0; padding: 6px; border-right: 1px solid #e7edf3; border-bottom: 1px solid #e7edf3; }
.ml-month-day.outside { background: #fafbfd; }
.ml-month-day header { display: flex; justify-content: flex-end; }
.ml-month-day header button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.ml-month-day.today header button { color: white; background: var(--ml-blue); }
.ml-calendar-event { width: 100%; min-width: 0; margin: 2px 0; padding: 6px 8px; border: 0; border-left: 4px solid var(--event-color); border-radius: 5px; color: #102a43; background: color-mix(in srgb, var(--event-color) 13%, white); text-align: left; cursor: pointer; overflow: hidden; }
.ml-calendar-event:hover { filter: brightness(.97); box-shadow: 0 2px 7px rgba(25,55,85,.12); }
.ml-calendar-event span, .ml-calendar-event strong, .ml-calendar-event small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ml-calendar-event span { font-size: 10px; color: #52677a; }
.ml-calendar-event strong { font-size: 12px; }
.ml-calendar-event small { margin-top: 2px; color: #64748b; }
.ml-calendar-event.compact { display: flex; align-items: center; gap: 6px; padding: 4px 6px; }
.ml-calendar-event.compact span { flex: 0 0 auto; }
.ml-more-events { border: 0; background: transparent; color: var(--ml-blue); cursor: pointer; font-size: 11px; font-weight: 800; }
.ml-time-grid { min-width: 800px; display: grid; grid-template-columns: var(--calendar-columns); align-items: stretch; }
.ml-time-grid > div, .ml-time-grid > button { border-right: 1px solid #e7edf3; border-bottom: 1px solid #e7edf3; }
.ml-time-day { position: sticky; top: 0; z-index: 3; min-height: 58px; border: 0; background: #f7f9fc; cursor: pointer; }
.ml-time-day span, .ml-time-day strong { display: block; }
.ml-time-day strong { width: 30px; height: 30px; line-height: 30px; margin: 2px auto; border-radius: 50%; font-size: 18px; }
.ml-time-day.today strong { color: white; background: var(--ml-blue); }
.ml-time-label { padding: 7px 10px; text-align: right; color: #718096; font-size: 11px; }
.ml-time-cell { min-height: 68px; padding: 3px; background: repeating-linear-gradient(to bottom, transparent 0 33px, #f2f5f8 34px); }
.ml-time-cell.all-day { min-height: 44px; background: #fafbfd; }
.ml-agenda { padding: 18px 24px 70px; display: grid; gap: 18px; }
.ml-agenda section { border: 1px solid var(--ml-border); border-radius: 9px; overflow: hidden; }
.ml-agenda section > header { display: flex; justify-content: space-between; padding: 10px 13px; background: #f4f7fa; }
.ml-agenda section > .ml-calendar-event { width: calc(100% - 20px); margin: 7px 10px; }
.ml-event-editor, .ml-contact-editor { width: min(760px, calc(100vw - 30px)); }
.ml-event-fields { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ml-event-fields .wide { grid-column: 1 / -1; }
.ml-check { display: flex; align-items: center; gap: 8px; color: #334e68; font-size: 13px; }
.ml-danger { color: #a61b1b !important; border-color: #f1b7b7 !important; }

.ml-people-sidebar { display: flex; flex-direction: column; gap: 6px; }
.ml-people-sidebar h3 { margin-top: 18px; }
.ml-people-sidebar > button:not(.melolook-compose-button) { min-height: 40px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 6px; background: transparent; color: #334e68; text-align: left; cursor: pointer; }
.ml-people-sidebar > button.active { color: #075a9c; background: #d9eaf8; }
.ml-people-sidebar em { margin-left: auto; font-style: normal; }
.ml-people-toolbar { padding: 14px 18px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; border-bottom: 1px solid var(--ml-border); }
.ml-people-toolbar > div { display: flex; gap: 8px; }
.ml-people-toolbar h2 { margin: 0; }
.ml-contact-table { overflow: auto; }
.ml-contact-head, .ml-contact-table article { min-width: 900px; display: grid; grid-template-columns: 1.35fr 1fr 1.35fr .75fr 1.25fr; gap: 14px; align-items: center; padding: 11px 16px; border-bottom: 1px solid #e7edf3; }
.ml-contact-head { color: #64748b; background: #f7f9fc; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.ml-contact-table article > span, .ml-contact-name { min-width: 0; }
.ml-contact-table article small, .ml-contact-name small { display: block; color: #718096; margin-top: 3px; }
.ml-contact-name { display: flex; align-items: center; gap: 10px; }
.ml-contact-table article button { min-height: 32px; margin-right: 4px; border: 1px solid var(--ml-border); border-radius: 5px; color: #334e68; background: white; cursor: pointer; }
.ml-contact-table a { color: var(--ml-blue); text-decoration: none; }

@media print {
  body * { visibility: hidden !important; }
  #melolookApp, #melolookApp * { visibility: visible !important; }
  #melolookApp { position: absolute; inset: 0; }
  .melolook-commandbar, .ml-calendar-sidebar, .ml-calendar-tools, #mlNewEventTop { display: none !important; }
  .ml-calendar-layout { display: block; }
  .ml-calendar-toolbar { display: block; }
  .ml-calendar-canvas { overflow: visible; }
}

@media (max-width: 1120px) {
  .melolook-body { grid-template-columns: 190px 340px 1fr; }
  .melolook-commandbar { grid-template-columns: 170px auto minmax(180px, 1fr) auto; }
  .melolook-account-copy { display: none; }
  .melolook-app-nav span { display: none; }
  .ml-calendar-toolbar { grid-template-columns: 1fr; }
  .ml-calendar-toolbar h2 { grid-row: 1; text-align: left; }
}

@media (max-width: 860px) {
  .melolook-commandbar { grid-template-columns: auto auto 1fr auto; padding: 9px 10px; }
  .melolook-brand strong, .melolook-brand small { display: none; }
  .melolook-body { grid-template-columns: 70px minmax(285px, 42%) 1fr; }
  .melolook-folders { padding: 12px 7px; }
  .melolook-compose-button { font-size: 0; }
  .melolook-compose-button::before { content: "+"; font-size: 22px; }
  .melolook-folder { justify-content: center; padding: 0; }
  .melolook-folder span:nth-child(2), .melolook-folder em, .melolook-folder-title, .melolook-quota { display: none; }
  .ml-calendar-layout, .ml-people-layout { grid-template-columns: 1fr; }
  .ml-calendar-sidebar, .ml-people-sidebar { display: none; }
}

@media (max-width: 660px) {
  .melolook-shell { min-height: calc(100dvh - 74px); }
  .melolook-commandbar { grid-template-columns: auto auto 1fr; }
  .melolook-accountbar { display: none; }
  .melolook-app-nav button { padding: 0 7px; }
  .melolook-body { display: block; position: relative; }
  .melolook-folders { display: flex; gap: 5px; overflow-x: auto; border: 0; border-bottom: 1px solid var(--ml-border); }
  .melolook-compose-button { width: 44px; flex: 0 0 44px; }
  .melolook-folder-group { display: flex; margin: 0; gap: 4px; }
  .melolook-folder { width: 42px; flex: 0 0 42px; }
  .melolook-list-pane { border: 0; }
  .melolook-reader { display: none; position: absolute; inset: 0; z-index: 8; }
  .melolook-reader.mobile-open { display: block; }
  .melolook-connect-card { grid-template-columns: 1fr; }
  .melolook-connect-intro { display: none; }
  .melolook-connect { padding: 16px; }
  .melolook-reader-header, .melolook-reader-actions, .melolook-reader-body { padding-left: 18px; padding-right: 18px; }
  .ml-event-fields { grid-template-columns: 1fr; }
  .ml-event-fields .wide { grid-column: auto; }
  .ml-month-grid { min-width: 760px; }
  .ml-calendar-toolbar { padding: 8px; }
  .ml-calendar-tools { overflow-x: auto; flex-wrap: nowrap !important; }
}

@media (max-width: 660px) {
  .melolook-commandbar { padding-top: max(9px, env(safe-area-inset-top)); }
  .melolook-app-nav button,
  .melolook-folder,
  .melolook-compose-button,
  .melolook-icon-button,
  .melolook-primary,
  .melolook-secondary { min-height: 44px; }
  .melolook-search input,
  .melolook-connect input,
  .melolook-compose input,
  .melolook-compose textarea,
  .ml-field input,
  .ml-field select,
  .ml-field textarea { font-size: 16px; }
  .melolook-modal-backdrop { padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
  .melolook-compose { width: 100%; max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))); }
  .melolook-toast { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); left: 10px; max-width: none; }
}

