/* Focus: a single quiet toolbar with a persistent document status strip. */
.note-brand-icon { width:28px; height:28px; object-fit:contain; flex:none; }
.app-header .brand { color:#202124; text-decoration:none; gap:10px; }
.app-header .brand strong { font-size:19px; letter-spacing:-.7px; font-weight:650; }
body.note-open .app-header { display:none; }
body.note-open .app-main { min-height:0; }
body.note-open { overflow:hidden; }
.workspace-view { position:relative; min-width:0; grid-template-columns:minmax(0,1fr); height:100dvh; min-height:0; grid-template-rows:60px minmax(0,1fr) 28px; perspective:none; }
.workspace-header { min-width:0; flex-direction:row; align-items:center; min-height:0; padding:0 24px; gap:20px; background:#fff; backdrop-filter:none; border-color:#e9eaec; }
.workspace-header .session-strip { flex:1 1 0; gap:20px; }
.note-home { display:flex; align-items:center; gap:9px; flex:none; border:0; padding:0; background:transparent; color:#202124; font-size:18px; font-weight:650; letter-spacing:-.65px; white-space:nowrap; }
.note-home:hover { opacity:.7; }
.note-header-divider { width:1px; height:20px; background:#e9eaec; flex:none; }
.workspace-title { flex:1; display:flex; align-items:center; min-width:0; }
.workspace-header .note-title-button { margin:0; padding:5px 0; max-width:100%; text-align:left; font-size:14px; font-weight:550; color:#474a50; }
.workspace-header .note-title-input { width:100%; max-width:100%; font-size:14px; }
.workspace-header .toolbar { flex:none; width:auto; flex-wrap:nowrap; gap:8px; }
.workspace-header .ghost-button { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:36px; height:34px; min-height:34px; flex:none; border:0; border-radius:6px; padding:0 10px; gap:7px; box-shadow:none; background:transparent; color:#666a73; font-size:13px; font-weight:550; }
.workspace-header .ghost-button:hover { background:#f4f5f6; color:#202124; }
.workspace-header .ghost-button > span { display:inline; }
.workspace-header .ghost-button svg { width:17px; height:17px; }
.workspace-header .note-presence { padding:0 3px; }
.workspace-header .note-avatar-stack { display:flex; padding-left:5px; }
.note-avatar { display:flex; align-items:center; justify-content:center; width:28px; height:28px; margin-left:-5px; border:2px solid white; border-radius:50%; background:#e4e7eb; font-size:10px; font-weight:600; }
.workspace-header .note-accessible { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.workspace-header .activity-status { max-width:140px; font-size:11px; }
.workspace-body, .editor-shell { height:100%; min-height:0; overflow:hidden; }
#editor { height:100%; min-height:0; }
.note-footer { display:flex; align-items:center; gap:18px; padding:0 24px; border-top:1px solid #eeeff1; background:#fcfcfd; color:#8b9099; font-size:10px; line-height:1; letter-spacing:.1px; }
.note-footer-stats { display:flex; align-items:center; gap:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
#footerSelection,#footerPosition { color:#566372; }
@media(max-width:400px) { .note-footer-stats { gap:6px; } #footerLanguage { display:none; } }
.note-footer-self { margin-left:auto; font-size:10px; }
.note-footer-save { display:inline-flex; align-items:center; gap:6px; }
.note-footer-save::before { content:''; width:4px; height:4px; border-radius:50%; background:#9aa6a0; }
.note-connection-notice { position:absolute; z-index:30; top:68px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:12px; max-width:calc(100% - 24px); padding:10px 14px; border:1px solid #eadfc9; background:#fffaf0; border-radius:6px; box-shadow:0 4px 16px #0000000d; font-size:12px; }
.note-connection-notice[hidden] { display:none; }
.note-connection-notice button { flex:none; border:0; background:transparent; color:#835b20; font-weight:650; padding:3px; }
@media(max-width:900px) {
 .workspace-header { padding:0 16px; gap:12px; }
 .workspace-header .session-strip { gap:12px; }
 .workspace-header .toolbar { gap:4px; }
 .workspace-header .ghost-button > span { display:inline; }
 .workspace-header .note-avatar-stack { display:flex; }
 .workspace-header .activity-status { display:none!important; }
}
@media(max-width:560px) {
 .workspace-view { height:100dvh; grid-template-rows:54px minmax(0,1fr) 26px; }
 .workspace-header { padding:0 10px; gap:8px; }
 .workspace-header .session-strip { gap:9px; }
 .note-home > span, .session-strip > .note-header-divider { display:none; }
 .note-home .note-brand-icon { width:25px; height:25px; }
 .workspace-header .note-title-button { font-size:13px; }
 .workspace-header .ghost-button { padding:0 7px; min-width:32px; }
 .workspace-header .toolbar { gap:2px; }
 .note-avatar { width:24px; height:24px; }
 .note-footer { padding:0 12px; gap:10px; }
 .note-footer-self { display:none; }
 .note-footer-save { margin-left:auto; }
 .note-connection-notice { top:60px; }
}
/* Keep these labels visible despite the legacy compact toolbar rule. */
.workspace-header .toolbar #presenceButton > #presenceAvatars { display:flex; }

/* Library home: navigation, direct entry, and a searchable note collection. */
.app-header { display:none; }
body:not(.note-open) { --text:#292c32; --muted:#858c98; --line:#e8ebef; --accent:#292c32; --accent-soft:#f0f2f5; }
.home-view { display:grid; grid-template-columns:228px minmax(0,1fr); min-height:100dvh; padding:0; background:#fff; perspective:none; }
.library-sidebar { position:sticky; top:0; height:100dvh; display:flex; flex-direction:column; padding:30px 18px 22px; background:#f7f8fa; border-right:1px solid #e9ecf0; }
.library-brand-row { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:52px; padding-inline:8px; }
.library-brand { display:flex; align-items:center; gap:9px; color:#25282e; text-decoration:none; white-space:nowrap; }
.library-install { flex:none; min-height:32px; padding:0 7px; border:1px solid #dfe4eb; border-radius:5px; background:#fff; color:#545d6a; font-size:11px; white-space:nowrap; }
.library-install:hover { background:#e9edf2; }
.library-brand img { width:29px; height:29px; }
.library-brand strong { font-size:20px; letter-spacing:-.8px; font-weight:650; }
.library-space-label { padding:0 14px; font-size:9px; letter-spacing:1.6px; color:#9ba3af; margin-bottom:13px; }
.library-nav { display:flex; align-items:center; gap:10px; min-height:42px; padding:0 13px; border-radius:6px; text-decoration:none; font-size:13px; font-weight:550; color:#454c58; background:#e9edf2; }
.library-nav svg { width:17px; height:17px; }
.library-nav > span { margin-left:auto; font-size:11px; color:#89929f; }
.library-join { margin-top:34px; padding:26px 12px 0; border-top:1px solid #e4e8ed; }
.library-join > label { display:block; font-size:11px; color:#656e7b; margin-bottom:12px; font-weight:550; }
.library-code-field { display:flex; align-items:center; border:1px solid #dfe4eb; border-radius:5px; height:38px; background:#fff; }
.library-code-field:focus-within { border-color:#929eaf; box-shadow:0 0 0 2px #dce3ed80; }
.library-code-field input { width:100%; min-width:0; border:0; background:transparent; padding:0 10px; height:100%; font-size:12px; letter-spacing:.7px; outline:none; color:#303845; }
.library-code-field button { flex:none; width:32px; height:28px; border:0; border-left:1px solid #edf0f4; border-radius:0; background:transparent; color:#727f91; font-size:18px; }
.library-pin-link { border:0; padding:10px 0; background:transparent; color:#969eaa; font-size:10px; }
.library-pin-link:hover { color:#333d4b; }
.library-sidebar-bottom { margin-top:auto; display:flex; gap:6px; align-items:center; padding:0 10px; color:#9ca4af; font-size:9px; }
.library-dot { width:4px; height:4px; border-radius:50%; background:#aab4c0; }
.library-main { min-width:0; display:flex; flex-direction:column; min-height:100dvh; }
.library-topbar { height:65px; flex:none; padding:0 40px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #eef0f3; color:#9aa2ae; font-size:11px; }
.library-topbar strong { font-weight:500; color:#545d6a; }
.library-slash { margin:0 13px; color:#ced3dc; }
.library-top-hint { font-size:10px; color:#aab0ba; }
.library-content { width:min(1120px,100%); padding:52px 48px; margin:0 auto; }
.library-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:38px; }
.library-eyebrow { font-size:9px; color:#9ca5b2; letter-spacing:1.7px; }
.library-heading h1 { font-size:32px; letter-spacing:-1.2px; font-weight:650; color:#282d35; margin:12px 0 8px; line-height:1.3; }
.library-heading p { color:#969eaa; font-size:12px; margin:0; line-height:1.6; }
.library-create { display:flex; flex:none; border-radius:6px; overflow:hidden; background:#292e37; }
.library-create button { display:flex; justify-content:center; align-items:center; gap:7px; height:38px; border:0; border-radius:0; padding:0 14px; background:transparent; color:#fff; font-size:12px; font-weight:550; white-space:nowrap; }
.library-create button:hover { background:#424a57; }
.library-create button:first-child > span { font-size:18px; font-weight:400; }
.library-controls { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:30px; }
.library-search { display:flex; gap:9px; align-items:center; width:300px; height:37px; border:1px solid #e6eaf0; border-radius:6px; background:#fafbfc; padding:0 12px; }
.library-search:focus-within { border-color:#a0acbd; }
.library-search svg { width:15px; height:15px; flex:none; color:#9da7b5; }
.library-search input { width:100%; min-width:0; border:0; padding:0; background:transparent; outline:none; font-size:12px; color:#46505e; }
.library-search input::placeholder { color:#a4acb8; }
.library-sort { font-size:10px; color:#a0a9b6; white-space:nowrap; }
.library-main .recent-section { margin:0; }
.library-main .section-heading { justify-content:flex-start; gap:8px; margin:0 0 12px; min-height:24px; }
.library-main .section-heading h2 { font-size:11px; color:#737e8e; font-weight:550; }
.library-main #recentCount { color:#a4adba; font-size:10px; }
.library-main .recent-list { gap:0; border-top:1px solid #e9edf2; }
.library-main .recent-list:empty { border:0; }
.library-main .recent-row { min-height:83px; padding:16px 12px; border:0; border-bottom:1px solid #eef1f5; border-radius:0; grid-template-columns:36px minmax(0,1fr) auto 20px; gap:16px; }
.library-main .recent-row:hover { background:#f7f9fc; border-color:#eef1f5; }
.library-main .recent-icon { width:32px; height:39px; border:1px solid #e1e7ef; border-radius:4px; background:#fbfcfe; color:#95a1b2; font-size:9px; font-weight:550; }
.library-main .recent-title { color:#414a58; font-size:14px; font-weight:550; }
.library-main .recent-meta { color:#a3adba; font-size:11px; margin-top:6px; }
.library-main .recent-expiry { font-size:10px; font-weight:500; padding:4px 7px; border-radius:4px; background:#f2f5f8; color:#929fb0; }
.library-main .recent-expiry.expired { max-width:145px; background:transparent; color:#ab9999; }
.library-main .recent-row.expired .recent-title { color:#a5aebb; }
.library-main .recent-open { color:#a8b3c2; font-size:16px; }
.library-main .empty-state { min-height:280px; border:1px dashed #e5eaf1; background:#fcfdfe; border-radius:6px; padding:30px; flex-direction:column; justify-content:center; gap:12px; color:#778496; font-size:13px; }
.library-main .empty-state svg { width:33px; height:33px; color:#bdc7d4; stroke-width:1.2; margin-bottom:4px; }
.library-main .empty-state small { font-size:11px; color:#aab3bf; }
.library-footer { display:flex; justify-content:space-between; gap:16px; padding:20px 40px; margin-top:auto; border-top:1px solid #f0f2f5; font-size:9px; color:#aeb6c1; }
.library-footer span:first-child { letter-spacing:1px; }
button:focus-visible, a:focus-visible { outline:2px solid #8898ad; outline-offset:3px; }
@media(max-width:900px) {
 .home-view { grid-template-columns:195px minmax(0,1fr); }
 .library-sidebar { padding-inline:12px; }
 .library-brand-row { padding-inline:2px; }
 .library-content { padding:36px 26px; }
 .library-topbar,.library-footer { padding-inline:26px; }
 .library-heading { gap:12px; }
 .library-heading h1 { font-size:28px; }
 .library-heading p { max-width:200px; }
 .library-top-hint { display:none; }
}
@media(max-width:620px) {
 .home-view { display:block; }
 .library-sidebar { position:relative; height:auto; padding:18px 20px; border-right:0; border-bottom:1px solid #e9ecf0; }
 .library-brand-row { padding:0; margin-bottom:22px; }
 .library-brand strong { font-size:19px; }
 .library-space-label,.library-nav,.library-sidebar-bottom { display:none; }
 .library-join { margin:0; padding:0; border:0; display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; align-items:center; }
 .library-join > label { grid-column:1/-1; margin-bottom:8px; font-size:10px; }
 .library-pin-link { font-size:10px; }
 .library-code-field { height:36px; }
 .library-main { min-height:calc(100dvh - 160px); }
 .library-topbar { display:none; }
 .library-content { padding:30px 20px 40px; }
 .library-heading { margin-bottom:27px; }
 .library-eyebrow { font-size:8px; }
 .library-heading h1 { font-size:26px; }
 .library-heading p { font-size:10px; max-width:180px; }
 .library-create button { padding:0 10px; font-size:11px; height:36px; }
 .library-controls { margin-bottom:25px; gap:12px; }
 .library-search { width:100%; }
 .library-sort { font-size:9px; }
 .library-main .recent-row { grid-template-columns:28px minmax(0,1fr) auto; gap:10px; padding:15px 2px; }
 .library-main .recent-icon { width:27px; height:34px; font-size:8px; }
 .library-main .recent-title { font-size:12px; }
 .library-main .recent-meta { font-size:10px; }
 .library-main .recent-open { display:none; }
 .library-main .recent-expiry.expired { max-width:65px; }
 .library-main .empty-state { min-height:220px; text-align:center; }
 .library-footer { padding:18px 20px; font-size:8px; }
}
@media(prefers-reduced-motion:reduce) { .recent-row { animation:none; transition:none; } }

/* Leave a small breathing space when the minimap is absent. */



.optional-label { margin-left:5px; color:#a2a9b4; font-size:10px; font-weight:400; }

.editor-shell.minimap-off .monaco-scrollable-element > .scrollbar.vertical > .slider { left:auto !important; right:0 !important; width:14px !important; }
.recent-entry { position:relative; min-width:0; }
.library-main .recent-entry .recent-row { position:relative; width:100%; padding-right:86px; grid-template-columns:36px minmax(0,1fr) auto; }
.library-main .recent-entry .recent-open { position:absolute; right:12px; width:20px; text-align:center; }
.note-delete-button { position:absolute; right:42px; top:50%; transform:translateY(-50%); width:30px; height:30px; display:grid; place-items:center; border:0; border-radius:4px; background:transparent; color:#a6b0be; }
.note-delete-button svg { width:16px; height:16px; }
.note-delete-button:hover { color:#c34747; background:#fff0f0; }
.delete-note-dialog #deleteNoteTitle { overflow-wrap:anywhere; color:#646d7a; }
.delete-note-warning { font-size:13px; line-height:1.8; color:#8c7272; margin:4px 0 22px; }
.delete-note-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:24px; }
#deleteNoteConfirm { border:0; border-radius:5px; background:#c84f4f; color:white; padding:10px 16px; font-size:13px; }
#deleteNoteConfirm:hover { background:#ad3b3b; }
.delete-note-error { color:#bd4949; font-size:12px; }
@media(max-width:620px) {
 .library-main .recent-entry .recent-row { padding-right:70px; grid-template-columns:28px minmax(0,1fr) auto; }
 .library-main .recent-entry .recent-row:not(.expired) .recent-open { display:block; right:2px; width:16px; }
 .note-delete-button { right:26px; }
}

/* Quiet annotation tools; keep the note itself as the primary canvas. */
.feature-palette { position:fixed; top:66px; right:210px; z-index:80; width:min(244px,calc(100vw - 16px)); padding:14px; border:1px solid #e2e6ec; border-radius:6px; background:#fff; box-shadow:0 8px 28px #1b293517; }
.feature-palette-heading { color:#7a8595; font-size:11px; margin-bottom:12px; }
.feature-swatches { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.feature-swatch { height:30px; border:1px solid #00000008; border-radius:4px; cursor:pointer; }
.feature-swatch:hover { outline:2px solid #909fb2; outline-offset:2px; }
.feature-palette-bottom { display:flex; justify-content:space-between; align-items:center; margin-top:14px; gap:8px; }
.feature-palette-bottom label { display:flex; align-items:center; gap:6px; font-size:11px; color:#8b95a4; }
.feature-palette-bottom input { width:24px; height:24px; padding:0; border:0; background:transparent; }
.feature-palette-bottom button { background:transparent; border:0; font-size:11px; color:#7a8595; padding:4px; }
.note-access-banner { position:absolute; top:68px; left:50%; transform:translateX(-50%); z-index:35; display:flex; align-items:center; gap:12px; max-width:calc(100% - 28px); padding:9px 13px; border:1px solid #e4e9f0; border-radius:5px; background:#f8faff; color:#7c8798; font-size:11px; white-space:nowrap; box-shadow:0 3px 12px #1a2a3b08; }
.note-access-banner button { border:0; background:transparent; padding:3px; font-size:11px; color:#475a74; text-decoration:underline; }
.feature-owner-settings { border-bottom:1px solid #e7eaf0; padding-bottom:14px; margin-bottom:6px; }
.feature-owner-settings h3 { margin:0 0 12px; font-size:12px; font-weight:600; color:#596577; }
.feature-owner-settings .switch-row { margin-bottom:13px; }
.feature-owner-settings small { color:#9ca6b5; font-size:10px; }
.note-footer-self { border:0; padding:0; background:transparent; font-family:inherit; color:inherit; cursor:pointer; }
.note-footer-self:hover { color:#59687d; }
.feature-error { font-size:12px; color:#bd4949; }
.participant-kick { margin-left:auto; padding:4px 7px; border:0; background:#fff4f4; border-radius:4px; color:#b76565; font-size:10px; flex:none; }
.feature-danger { border:0; border-radius:5px; padding:10px 16px; color:#fff; background:#c84f4f; font-size:13px; }
.note-drawing-dialog { width:100dvw; max-width:100dvw; height:100dvh; max-height:100dvh; padding:0; margin:0; border:0; border-radius:0; overflow:hidden; }
.note-drawing-dialog iframe { display:block; width:100%; height:100%; border:0; }
.note-live-avatars { display:inline-flex; flex:none; align-items:center; gap:0; margin-left:7px; padding-left:4px; }
.note-live-avatar { display:inline-flex; align-items:center; justify-content:center; width:25px; height:25px; margin-left:-4px; border:2px solid #fff; border-radius:50%; background:#a6b2c3; color:#fff; font-size:10px; font-weight:550; }
.note-live-extra { font-size:9px; color:#9aa5b5; margin-left:4px; }
.recent-title { flex:0 1 auto; }
@media(max-width:900px) {
 .feature-palette { right:110px; }
}
@media(max-width:560px) {
 .feature-palette { top:60px; right:16px; }
 .note-access-banner { top:60px; font-size:10px; gap:6px; }
 .note-live-avatar { width:22px; height:22px; font-size:9px; }
 .note-live-avatars { margin-left:2px; }
}

.feature-name-settings { text-align:left; padding:6px 0; border:0; background:transparent; color:#68788f; font-size:12px; }

.participant-owner-badge { color:#8492a5; font-size:9px; font-weight:500; padding:3px 5px; border-radius:3px; background:#f0f3f8; white-space:nowrap; }

.note-image-placeholder { box-sizing:border-box; margin:0; border:1px solid #edf0f4; background:linear-gradient(110deg,#f7f8fa,#eff2f6,#f7f8fa); border-radius:3px; max-width:100%; }
#note-image-preview header { gap:16px; }
#note-image-download { margin-right:auto; font-size:12px; }

/* Library actions share a fixed right edge and remain usable on small screens. */
.library-nav { width:100%; border:0; text-align:left; background:transparent; }
.library-nav.active,.library-nav:hover { background:#e9edf2; }
#trashNav { margin-top:4px; }
.library-main .recent-entry:has(.note-card-actions:empty) .recent-row { padding-right:44px; }
.note-card-actions { position:absolute; top:50%; right:38px; transform:translateY(-50%); display:flex; gap:3px; align-items:center; }
.note-card-actions button { position:static; transform:none; min-height:32px; padding:0 8px; border:0; border-radius:5px; color:#5d697a; background:transparent; font-size:12px; }
.note-card-actions button:hover { background:#edf1f6; }
.note-card-actions .note-delete-button { padding:0; }
.note-card-actions .note-delete-button:hover { color:#b94450; background:#fff0f0; }
.note-card-emoji,.note-emoji-button { border:0; border-radius:5px; background:transparent; font-size:21px; line-height:1; flex:none; }
.note-card-emoji { position:absolute; left:12px; top:50%; width:36px; height:38px; transform:translateY(-50%); }
.note-card-emoji:hover,.note-emoji-button:hover { background:#edf1f6; }
.note-emoji-button { margin-right:-12px; width:30px; height:32px; padding:0; }
.library-main .recent-icon { border:0; background:transparent; font-size:21px; }
.note-ownership { flex:none; color:#697789; background:#f1f3f6; padding:3px 6px; border-radius:4px; font-size:10px; white-space:nowrap; }
.note-ownership.is-mine { background:#eaf2ef; color:#3d6d5d; }
.delete-note-dialog #deleteNoteTitle { font-size:clamp(20px,5vw,29px); font-weight:700; line-height:1.28; color:#252b34; margin:12px 0 0; }
#deleteNoteConfirm:disabled { opacity:.45; cursor:default; }
body:has(.emoji-dialog[open]) { overflow:hidden; }
.flow-dialog.emoji-dialog {
  width:min(380px, calc(100% - 24px));
  max-height:calc(100dvh - 24px);
  padding:clamp(12px, 4vw, 18px);
  border-radius:8px;
}
.emoji-dialog[open] {
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:12px;
}
.emoji-dialog .dialog-heading h2 { font-size:16px; font-weight:650; }
#emojiClose {
  width:32px;
  height:32px;
  flex:none;
  padding:0;
  border:0;
  border-radius:5px;
  background:#f3f5f7;
  color:#5c6674;
  font-size:22px;
  line-height:1;
}
#emojiClose:hover { color:#222932; background:#e9edf1; }
.emoji-grid {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:4px;
  overflow:auto;
  overscroll-behavior:contain;
}
.emoji-grid button {
  display:grid;
  place-items:center;
  min-width:0;
  min-height:44px;
  padding:0;
  border:1px solid transparent;
  border-radius:5px;
  background:transparent;
  font-size:22px;
  line-height:1;
}
.emoji-grid button:hover { background:#f3f5f7; }
.emoji-grid button[aria-pressed=true] { background:#edf3fa; border-color:#c3d2e5; }
.emoji-grid button:focus-visible { outline-offset:-3px; }
.emoji-custom { padding-top:12px; border-top:1px solid #e9ecf0; }
.emoji-dialog #emojiCustomForm {
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px 8px;
  padding:0;
}
#emojiCustomForm label { grid-column:1/-1; font-size:12px; }
#emojiCustomInput {
  min-width:0;
  height:38px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--surface);
  color:var(--text);
  font:inherit;
  font-size:16px;
}
#emojiCustomForm button { height:38px; min-height:0; padding:0 12px; border-radius:5px; font-size:13px; }
#emojiError { margin:8px 0 0; }
.flow-dialog.note-paste-dialog { width:min(380px,calc(100% - 24px)); }
.note-paste-content { display:grid; gap:12px; padding:16px; }
.note-paste-content h2 { font-size:16px; }
.note-paste-sample {
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
  overflow-wrap:anywhere;
  white-space:pre-line;
  margin:0;
  padding:9px 10px;
  border-radius:5px;
  background:#f3f5f7;
  color:#596474;
  font-size:13px;
}
.note-paste-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.note-paste-actions button { min-width:0; min-height:38px; padding:0 4px; border-radius:5px; font-size:13px; white-space:nowrap; }
.settings-name-field { padding-bottom:12px; border-bottom:1px solid #e7eaf0; }
.settings-field-label { font-size:11px; color:#697789; }
.settings-name-row { display:flex; align-items:center; gap:7px; font-weight:550; overflow-wrap:anywhere; }
.settings-name-row[hidden],.library-create[hidden],#ownerPinField[hidden] { display:none; }
.settings-pencil { display:grid; place-items:center; flex:none; border:0; border-radius:4px; background:transparent; width:27px; height:27px; color:#617086; }
.settings-pencil:hover { background:#edf1f6; }
.settings-pencil svg { width:15px; height:15px; }
.settings-name-input,#ownerPinInput { width:100%; min-width:0; padding:6px 8px; border:1px solid #dfe4ed; border-radius:5px; font:inherit; }
#settingsNameError { color:#a74646; }
#ownerPinField { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px; margin-bottom:8px; }
#ownerPinSave { border:1px solid #dfe4ed; border-radius:5px; background:#f5f7fb; font-size:11px; padding:0 7px; }
.settings-panel { max-height:calc(100% - 24px); }
.settings-panel .settings-stack { min-height:0; overflow:auto; overscroll-behavior:contain; }
.note-settings-actions { padding-top:10px; border-top:1px solid #e9ecf0; }
.note-settings-action {
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:36px;
  padding:0 9px;
  border:0;
  border-radius:5px;
  background:#f3f5f7;
  color:#364253;
  font-size:13px;
  text-align:left;
}
.note-settings-action svg { flex:none; width:16px; height:16px; }
.note-settings-action:hover { background:#e9edf1; }
.note-settings-action:disabled { opacity:.6; cursor:wait; }
@media(max-width:620px) {
 .library-sidebar #notesNav,.library-sidebar #trashNav { display:flex; width:auto; gap:5px; min-height:32px; padding:0 8px; margin:0; }
 .library-sidebar .library-nav svg { display:none; }
 .library-main .recent-entry:has(.note-card-actions:empty) .recent-row { padding-right:24px; }
 .note-card-actions { right:18px; }
 .note-card-actions button { padding:0 5px; }
 .note-card-emoji { left:1px; width:28px; }
 .note-ownership { font-size:9px; padding:2px 4px; }
 .note-emoji-button { margin-right:-7px; width:23px; font-size:17px; }
}

/* Links and document pages use the same inline block rhythm as photos. */
.note-paste-fields { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
.note-paste-fields[hidden],.note-paste-fields [hidden],.note-paste-actions[hidden] { display:none; }
.note-paste-fields input,.note-paste-fields select { min-width:0; font-size:16px; }
.note-attachment-zone { box-sizing:border-box; padding:4px 0 8px; overflow:visible; }
.note-web-block,.note-document-block { display:flex; flex-direction:column; }
.note-web-body { position:relative; flex:1; min-height:0; overflow:hidden; background:#f8f8f7; }
.note-web-body iframe { display:block; width:100%; height:100%; border:0; background:#fff; }
.note-web-message { position:absolute; inset:0; display:grid; place-items:center; padding:12px; color:#646963; background:#f8f8f7; text-align:center; font-size:12px; pointer-events:none; }
.note-web-message.is-delayed { inset:8px auto auto 8px; padding:5px 8px; border-radius:4px; }
.note-web-message[hidden] { display:none; }
#noteLinkEditDialog input { min-width:0; font-size:16px; }
#noteLinkEditDialog [role="alert"] { margin:0; }
#noteAttachmentOptions { display:grid; gap:6px; max-height:50dvh; overflow:auto; }
#noteAttachmentOptions label { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:8px 10px; border:1px solid #e4e8ed; border-radius:6px; font-size:13px; }
#noteAttachmentOptions label > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#noteAttachmentOptions select { min-height:35px; padding:0 6px; border:1px solid #dfe4eb; border-radius:5px; background:#fff; color:#364253; font:inherit; font-size:16px; }

.note-document-canvas {
  display:grid;
  flex:1;
  min-width:0;
  min-height:0;
  place-items:center;
  overflow:hidden;
  border-block:1px solid #e2e6eb;
  background:#f1f3f6;
}
.note-document-canvas canvas { display:block; max-width:100%; max-height:100%; background:white; box-shadow:0 1px 5px #19202d1f; }
.note-document-message { padding:8px; text-align:center; color:#53657a; font-size:12px; overflow-wrap:anywhere; }
.note-document-block footer { display:flex; flex:none; height:30px; align-items:center; justify-content:center; gap:8px; }
.note-document-block footer button { min-width:26px; font-size:19px; line-height:1; }
.note-document-block [hidden] { display:none; }
@media (max-width:440px) {
  .workspace-header .ghost-button { min-width:28px; padding-inline:5px; }
}

/* Participant controls use a dedicated, non-wrapping third column. */
#participantsList .participant { grid-template-columns:9px minmax(0,1fr) auto; }
#participantsList .participant-kick,
#participantsList .participant-owner-badge {
  grid-column:3;
  justify-self:end;
  width:max-content;
  margin:0;
  padding:4px 7px;
  line-height:1.35;
  white-space:nowrap;
  word-break:keep-all;
}
#participantsList .participant-kick:hover { background:#fce8ea; color:#9d3f4b; }
