/* Row 677: Sähköposti in the room/Files light look (rows 655/672): the shell is exactly the view's height, the page
   never scrolls, each panel scrolls inside itself, the borders between panels can be dragged (widths remembered per
   device by view.cjs). Every rule is scoped to #mail-root, except the first two. */
main.mail-mode { max-width:none; height:100vh; height:100dvh; min-height:0; padding-top:10px; padding-bottom:10px; overflow:hidden; }
#mail-view:not(.hidden) { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
#mail-root { flex:1 1 auto; min-height:0; overflow:hidden; display:flex; color:var(--u-ink); font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size:14px; line-height:1.4; }
#mail-root .mv-shell { --mv-left:220px; --mv-right:480px; display:grid; grid-template-rows:auto minmax(0,1fr); flex:1; min-height:0; min-width:0; gap:10px; background:var(--u-paper); }
#mail-root button { border:1px solid var(--u-line); border-radius:10px; background:var(--u-card); color:var(--u-ink); padding:6px 12px; font:inherit; cursor:pointer; }
#mail-root button:hover { border-color:var(--u-mid); color:var(--u-accent); }
#mail-root :focus-visible { outline:2px solid var(--u-focus); outline-offset:2px; }
#mail-root h1 { font-size:20px; margin:0; white-space:nowrap; }
#mail-root h2 { font-size:16px; margin:0; overflow-wrap:anywhere; }
#mail-root h3 { font-size:14px; margin:0 0 4px; }
#mail-root p { margin:0; }
#mail-root [hidden] { display:none !important; }
#mail-root .mv-top { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
#mail-root .mv-heading { color:var(--u-muted); flex:1 1 auto; }
#mail-root .mv-columns { display:grid; grid-template-columns:var(--mv-left) 6px minmax(320px,1fr) 6px var(--mv-right); min-height:0; overflow:hidden; position:relative; }
#mail-root .mv-shell[data-folder="acks"] .mv-columns { grid-template-columns:var(--mv-left) 6px minmax(320px,1fr); }
#mail-root .mv-rail, #mail-root .mv-list-col, #mail-root .mv-reader { min-height:0; overflow-y:auto; overscroll-behavior:contain; background:var(--u-card); border:1px solid var(--u-line); border-radius:12px; padding:10px; }
#mail-root .mv-list-col { display:flex; flex-direction:column; padding:0; overflow:hidden; }
#mail-root .mv-sep { cursor:col-resize; touch-action:none; }
#mail-root .mv-sep:hover { background:var(--u-wash); border-radius:3px; }
#mail-root ul { list-style:none; margin:0; padding:0; }
#mail-root .mv-folder { width:100%; display:flex; align-items:center; gap:8px; text-align:left; border:0; border-radius:8px; margin:1px 0; }
#mail-root .mv-folder-name { flex:1 1 auto; overflow-wrap:anywhere; }
#mail-root .mv-folder.current { background:var(--u-wash); color:var(--u-accent); font-weight:600; }
#mail-root .mv-count { min-width:20px; padding:0 6px; border-radius:999px; background:var(--u-button); color:var(--u-white); font-size:12px; font-weight:700; text-align:center; }
#mail-root .mv-accounts-head { font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--u-muted); margin:14px 4px 4px; }
#mail-root .mv-account label { display:flex; align-items:center; gap:8px; padding:4px 6px; border-radius:8px; cursor:pointer; }
#mail-root .mv-account label:hover { background:var(--u-wash); }
#mail-root .mv-account-name { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#mail-root .mv-dot { width:10px; height:10px; border-radius:50%; flex:0 0 10px; display:inline-block; background:var(--u-mid); }
#mail-root .mv-warnings { margin-top:10px; display:grid; gap:6px; }
#mail-root .mv-warning { padding:6px 10px; border-radius:10px; background:var(--u-mark); color:var(--u-warmtext); font-size:13px; }
#mail-root .mv-list-head { padding:10px 12px 6px; font-weight:600; border-bottom:1px solid var(--u-line); }
#mail-root .mv-search { display:grid; gap:4px; padding:8px 12px; font-weight:600; }
#mail-root .mv-search input { min-width:0; width:100%; box-sizing:border-box; padding:7px 9px; font:inherit; font-weight:400; border:1px solid var(--u-line); border-radius:8px; background:var(--u-card); color:var(--u-ink); }
#mail-root .mv-list-status { padding:0 12px; color:var(--u-muted); }
#mail-root .mv-list-status:not(:empty) { padding:12px; }
#mail-root .mv-list-status[data-kind="error"] { color:var(--u-alert); }
#mail-root .mv-list { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; outline:none; }
#mail-root .mv-row { display:grid; grid-template-columns:10px minmax(90px,180px) minmax(0,1fr) 18px auto; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid var(--u-line); cursor:pointer; color:var(--u-ink); }
#mail-root .mv-row:hover { background:var(--u-wash); }
#mail-root .mv-row.selected { background:var(--u-wash); }
#mail-root .mv-row.unread { color:var(--u-ink); font-weight:700; }
#mail-root .mv-from, #mail-root .mv-line { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#mail-root .mv-snippet { color:var(--u-muted); font-weight:400; }
#mail-root .mv-time { color:var(--u-muted); font-size:12px; white-space:nowrap; text-align:right; }
#mail-root .mv-row.unread .mv-time { color:var(--u-ink); }
#mail-root .mv-more { padding:8px 12px; display:flex; align-items:center; gap:10px; color:var(--u-muted); font-size:13px; }
#mail-root .mv-more:empty { display:none; }
#mail-root .mv-acks { padding:12px; overflow-y:auto; min-height:0; flex:1 1 auto; }
#mail-root .mv-reader { padding:16px; }
#mail-root .mv-reader-head { display:grid; gap:6px; padding-bottom:10px; border-bottom:1px solid var(--u-line); margin-bottom:12px; }
#mail-root .mv-chip { display:inline-flex; align-items:center; gap:6px; color:var(--u-muted); font-size:13px; }
#mail-root .mv-meta { display:grid; grid-template-columns:auto minmax(0,1fr); gap:2px 10px; margin:0; font-size:13px; }
#mail-root .mv-meta dt { color:var(--u-muted); }
#mail-root .mv-meta dd { margin:0; overflow-wrap:anywhere; }
#mail-root .mv-when { color:var(--u-muted); font-size:13px; }
#mail-root .mv-body { white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; }
#mail-root .mv-earlier { margin-top:14px; }
#mail-root .mv-earlier summary { cursor:pointer; color:var(--u-accent); }
#mail-root .mv-earlier-text { margin-top:8px; padding-left:10px; border-left:3px solid var(--u-line); color:var(--u-muted); }
#mail-root .mv-notice { color:var(--u-muted); font-size:13px; margin-top:10px; }
#mail-root .mv-attachments { margin-top:14px; padding-top:10px; border-top:1px solid var(--u-line); }
#mail-root .mv-attachments li { padding:2px 0; overflow-wrap:anywhere; }
#mail-root .mv-empty { color:var(--u-muted); padding:12px 0; }
#mail-root .mv-error { padding:8px 12px; border-radius:10px; background:var(--u-alertwash); color:var(--u-alert); }
#mail-root .mv-close { margin-bottom:10px; }
/* Narrow window / mobile: one column; the message opens over the whole view. */
#mail-root .mv-shell[data-layout="narrow"] .mv-columns { grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); gap:8px; }
#mail-root .mv-shell[data-layout="narrow"] .mv-sep { display:none; }
#mail-root .mv-shell[data-layout="narrow"] .mv-rail { max-height:30vh; }
#mail-root .mv-shell[data-layout="narrow"] .mv-folders, #mail-root .mv-shell[data-layout="narrow"] .mv-accounts { display:flex; flex-wrap:wrap; gap:4px; }
#mail-root .mv-shell[data-layout="narrow"] .mv-folder { width:auto; border:1px solid var(--u-line); }
#mail-root .mv-shell[data-layout="narrow"] .mv-reader { display:none; }
#mail-root .mv-shell[data-layout="narrow"][data-reader="open"] .mv-reader { display:block; position:absolute; inset:0; z-index:2; }
#mail-root .mv-shell[data-layout="narrow"] .mv-row { grid-template-columns:10px minmax(0,1fr) auto auto; grid-template-areas:"dot from attach time" "dot line line line"; column-gap:6px; row-gap:2px; }
#mail-root .mv-shell[data-layout="narrow"] .mv-dot { grid-area:dot; }
#mail-root .mv-shell[data-layout="narrow"] .mv-from { grid-area:from; }
#mail-root .mv-shell[data-layout="narrow"] .mv-line { grid-area:line; }
#mail-root .mv-shell[data-layout="narrow"] .mv-time { grid-area:time; }
/* Review 677 #2: the attachment mark stays visible on mobile, beside the time; an empty mark takes no width. */
#mail-root .mv-shell[data-layout="narrow"] .mv-attach { grid-area:attach; display:inline; min-width:0; }
#mail-root .mv-shell[data-layout="narrow"] .mv-attach:empty { display:none; }
