:root {
  --bg: #ffffff;
  --panel: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f7f7f5;
  --text: #37352f;
  --muted: #787774;
  --faint: #aaa9a5;
  --line: #e9e9e7;
  --line-strong: #d9d9d6;
  --accent: #37352f;
  --accent-dark: #24231f;
  --accent-soft: #efefed;
  --danger: #b34040;
  --danger-soft: #f9e8e7;
  --blue: #477bb5;
  --blue-soft: #e8f0f8;
  --shadow: 0 14px 42px rgba(15, 15, 15, .14), 0 2px 8px rgba(15, 15, 15, .08);
  --sidebar-width: 280px;
  font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 1rem; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, [contenteditable]:focus-visible { outline: 2px solid rgba(60, 111, 100, .35); outline-offset: 1px; }
.hidden { display: none !important; }

.startup-shell { min-height:100%; display:grid; place-items:center; padding:24px; background:var(--surface); }
.startup-card { max-width:380px; text-align:center; color:var(--muted); line-height:1.7; }
.startup-card p { margin:16px 0; }
.startup-spinner { display:inline-block; width:26px; height:26px; border:2px solid var(--line); border-top-color:var(--muted); border-radius:50%; animation:startup-spin .9s linear infinite; }
.startup-shell[hidden], .startup-card [hidden] { display:none !important; }
.startup-error { font-size:.9375rem; }
@keyframes startup-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .startup-spinner { animation:none; } }

.login-shell { height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 32px; overflow-y: auto; background: #fff; }
.login-card { width: min(380px, 100%); flex: 0 0 auto; margin: auto 0; background: #fff; padding: 34px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.02em; }
.brand-large { font-size: 1.6875rem; justify-content: center; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--text); border-radius: 3px; background: white; color: var(--text); font-family: Georgia, serif; box-shadow: 2px 2px 0 var(--text); }
.login-copy { text-align: center; color: var(--muted); margin: 14px 0 22px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; margin-bottom: 18px; border-radius: 7px; background: var(--surface-soft); }
.auth-tab { border: 0; border-radius: 8px; padding: 9px 10px; background: transparent; color: var(--muted); font-weight: 650; cursor: pointer; }
.auth-tab.active { background: white; color: var(--text); box-shadow: 0 1px 3px rgba(15,15,15,.12); }
.stack-form { display: grid; gap: 16px; }
.stack-form label { display: grid; gap: 7px; color: #5d5953; font-weight: 620; font-size: 0.9375rem; }
.stack-form input, .stack-form select { width: 100%; border: 1px solid var(--line-strong); background: white; border-radius: 9px; padding: 11px 12px; color: var(--text); }
.primary-button { border: 0; border-radius: 6px; padding: 10px 15px; background: var(--accent); color: white; font-weight: 680; cursor: pointer; }
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { opacity: .55; cursor: default; }
.wide { width: 100%; padding: 12px; }
.login-footnote { margin: 22px 0 0; text-align: center; color: var(--faint); font-size: 0.875rem; }
.auth-recovery-link { margin: 10px auto 0; padding: 5px; display: block; border: 0; background: transparent; color: #575b64; cursor: pointer; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 2px; }
.auth-recovery-link:hover { color: var(--text); }
.workspace-switcher-heading { margin: 11px 8px 4px; color: var(--muted); font-size: 0.875rem; font-weight: 700; }
.workspace-switcher-heading:first-of-type { margin-top: 5px; }
.form-error { margin: 0; padding: 9px 11px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 0.9375rem; }
.signup-note, .reauth-note { margin: -4px 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.reauth-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); }

.app-shell { height: 100%; min-height: 0; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.sidebar { height: 100%; background: var(--panel); border-right: 1px solid #eeeeec; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; z-index: 30; }
.sidebar-head { min-height: 64px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.workspace-button { border: 0; background: transparent; flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; text-align: left; }
.workspace-button:hover, .sidebar-action:hover, .page-item:hover { background: rgba(45, 42, 37, .055); }
.workspace-avatar { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--text); color: white; font-size: 0.875rem; font-weight: 800; }
.workspace-copy { min-width: 0; display: grid; gap: 3px; line-height: 1.25; }
.workspace-copy small { color: var(--muted); font-size: 0.8125rem; font-weight: 450; }
.workspace-name { display: block; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { margin-left: auto; color: var(--muted); }
.icon-button, .mini-icon-button { border: 0; background: transparent; border-radius: 7px; cursor: pointer; display: inline-grid; place-items: center; color: var(--muted); }
.icon-button { width: 38px; height: 38px; font-size: 1.3125rem; }
.mini-icon-button { width: 30px; height: 30px; font-size: 1.125rem; }
.icon-button:hover, .mini-icon-button:hover, .ghost-button:hover { background: rgba(45,42,37,.07); color: var(--text); }
.sidebar-actions { display: grid; padding: 4px 7px 10px; gap: 1px; }
.sidebar-action { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 40px; border: 0; background: transparent; border-radius: 6px; padding: 4px 11px; color: #5f5e5b; cursor: pointer; text-align: left; font-size: 1rem; line-height: 1.4; }
.sidebar-action.active { background: #e9e9e7; color: var(--text); font-weight: 650; }
.sidebar-action > span:first-child { width: 18px; text-align: center; color: var(--muted); font-size: 1.25rem; }
.nav-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.sidebar-action kbd { margin-left: auto; font: 0.875rem inherit; color: var(--faint); }
.nav-badge { margin-left: auto; min-width: 19px; height: 19px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 10px; background: var(--accent); color: white; font-size: 0.8125rem; font-weight: 700; }
.sidebar-section-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 4px 14px; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.page-create-buttons { display: flex; gap: 2px; }
.page-tree { flex: 1; overflow: auto; padding: 0 6px 10px; }
.page-item { min-height: 38px; display: flex; align-items: center; gap: 7px; border-radius: 7px; padding: 5px 8px; cursor: pointer; color: #504c46; user-select: none; }
.page-item.active { background: #e9e9e7; color: var(--text); font-weight: 650; }
.page-item.untitled .page-label { color: var(--faint); font-weight: 400; }
.page-item .twisty { width: 17px; height: 22px; flex: none; display: grid; place-items: center; border: 0; background: transparent; border-radius: 4px; color: var(--faint); font-size: 0.8125rem; padding: 0; }
.page-item .twisty:hover { background: rgba(0,0,0,.06); }
.page-item .twisty:disabled { opacity: 1; cursor: default; }
.page-item .page-icon { width: 20px; text-align: center; }
.page-item .page-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-children.collapsed { display: none; }
.sidebar-utilities { display: grid; padding: 5px 7px 7px; border-top: 1px solid #ececea; }
.sidebar-footer { min-height: 72px; border-top: 1px solid #e5e5e2; display: flex; align-items: center; padding: 10px 12px; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.user-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #ded9d0; color: #5d5850; font-weight: 750; font-size: 0.875rem; }
.user-meta { display: grid; min-width: 0; line-height: 1.3; }
.user-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; }
.user-meta small { color: var(--muted); font-size: 0.8125rem; }
.logout-button { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; border: 1px solid #ddd8d0; border-radius: 8px; padding: 0 9px; background: rgba(255,255,255,.62); color: #625d56; font-size: 0.875rem; font-weight: 680; cursor: pointer; }
.logout-button:hover { border-color: #d8b8b5; background: var(--danger-soft); color: var(--danger); }
.logout-icon { font-size: 1.125rem; line-height: 1; }

.main-shell { min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); transition: margin-right .18s ease; }
.topbar { height: 56px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid transparent; }
.breadcrumbs { color: var(--muted); font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.875rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #9f9b95; }
.status-pill.online .status-dot { background: #55a06e; box-shadow: none; }
.status-pill.online > span:last-child { display: none; }
.status-pill.reconnecting .status-dot { background: #c99a3d; }
.save-status { min-width: 47px; color: var(--faint); font-size: 0.875rem; text-align: right; transition: opacity .15s, width .15s; }
.save-status.quiet { width: 0; min-width: 0; opacity: 0; overflow: hidden; }
.save-status.error { color: var(--danger); }
.ghost-button { border: 0; background: transparent; border-radius: 7px; padding: 6px 9px; color: var(--muted); cursor: pointer; font-size: 0.875rem; }
.topbar button, .logout-button { white-space: nowrap; flex-shrink: 0; }
.topbar .ghost-button, .topbar .ai-button, .topbar .meeting-button { min-height: 36px; }
.ai-button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #d9d1ea; background: #f7f3ff; color: #634b87; border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 0.875rem; font-weight: 680; }
.ai-button:hover { background: #eee6fa; }
.meeting-button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dfd9d1; background: #fff; color: #625d56; border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 0.875rem; font-weight: 680; }
.meeting-button:hover { background: #faf4f3; border-color: #dfc5c1; color: #83433e; }
.meeting-button-dot { width: 8px; height: 8px; border-radius: 50%; background: #bd554d; box-shadow: 0 0 0 3px #fae9e7; }
.meeting-button.recording { border-color: #d99089; background: #fff0ee; color: #8d3732; }
.meeting-button.recording .meeting-button-dot { animation: meeting-pulse 1.15s ease-in-out infinite; }
.topbar-more { position: relative; }
.topbar-more > summary { width: 36px; height: 36px; display: grid; place-items: center; list-style: none; border-radius: 5px; color: var(--muted); cursor: pointer; letter-spacing: 1px; }
.topbar-more > summary::-webkit-details-marker { display: none; }
.topbar-more > summary:hover, .topbar-more[open] > summary { background: var(--surface-soft); color: var(--text); }
.topbar-more-menu { position: absolute; top: 34px; right: 0; z-index: 20; width: 180px; display: grid; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.topbar-more-menu button { min-height: 32px; border: 0; border-radius: 5px; padding: 0 9px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.topbar-more-menu button:hover { background: var(--surface-soft); }
.presence-list { display: flex; align-items: center; padding-left: 5px; }
.presence-avatar { width: 40px; height: 40px; display: grid; place-items: center; margin-left: -5px; border: 2px solid white; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.75rem; font-weight: 750; white-space: nowrap; }
.remote-banner { flex: none; padding: 8px 18px; background: #fff5d9; color: #70591f; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 0.9375rem; }
.remote-banner button { border: 0; border-radius: 6px; background: #e7cc77; color: #4f3c0d; padding: 5px 8px; cursor: pointer; }
.content { flex: 1; min-height: 0; overflow: auto; scroll-behavior: smooth; }
.page-wrap { width: min(1080px, calc(100% - 112px)); margin: 0 auto; padding: 56px 0 140px; }
.document-width { max-width: 900px; font-size: 1.125rem; }
.page-kicker { color: var(--muted); font-size: 0.875rem; margin-bottom: 8px; }
.title-row { position: relative; display: grid; gap: 8px; margin-bottom: 18px; }
.page-icon-button { width: max-content; border: 0; background: transparent; border-radius: 5px; font-size: 2.875rem; padding: 3px 4px; margin-left: -4px; cursor: pointer; line-height: 1; }
.page-icon-button:hover { background: var(--surface-soft); }
.page-icon-button.empty { position: absolute; left: 0; bottom: calc(100% + 3px); margin: 0; padding: 4px 6px; color: var(--muted); font-size: 0.875rem; line-height: 1.25; opacity: 0; }
.title-row:hover .page-icon-button.empty, .title-row:focus-within .page-icon-button.empty { opacity: 1; }
.page-icon-button.empty:disabled { display: none; }
.page-title { width: 100%; min-width: 0; border: 0; background: transparent; padding: 0; color: var(--text); font-size: clamp(2.25rem, 4vw, 2.75rem); line-height: 1.18; letter-spacing: -.035em; font-weight: 720; }
.page-title::placeholder { color: #c6c3bd; opacity: 1; }
.empty-state { height: 80%; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-state h1 { color: var(--text); font-size: 1.5625rem; margin: 14px 0 5px; }
.empty-state p { margin: 0; }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.875rem; }
.workspace-empty-state { min-height: calc(100vh - 52px); display: grid; align-content: center; justify-items: center; padding: 40px 24px 120px; text-align: center; }
.workspace-empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: #f1f0ee; color: #8b8780; font-size: 1.5625rem; }
.workspace-empty-state h1 { margin: 17px 0 7px; font-size: 1.5625rem; letter-spacing: -.02em; }
.workspace-empty-state p { max-width: 430px; margin: 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.workspace-empty-actions { display: flex; gap: 8px; margin-top: 20px; }

.editor-tools { position: relative; margin: -4px 0 12px; }
.editor-tools > summary { width: max-content; list-style: none; border-radius: 5px; padding: 4px 7px; color: var(--muted); font-size: 0.875rem; cursor: pointer; user-select: none; }
.editor-tools > summary::-webkit-details-marker { display: none; }
.editor-tools > summary:hover, .editor-tools[open] > summary { background: var(--surface-soft); color: var(--text); }
.editor-toolbar { display: flex; align-items: center; gap: 3px; width: max-content; max-width: min(760px, calc(100vw - var(--sidebar-width) - 70px)); margin-top: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.98); box-shadow: 0 3px 14px rgba(15,15,15,.08); overflow-x: auto; }
.editor-toolbar button { border: 0; background: transparent; border-radius: 6px; padding: 5px 8px; color: var(--muted); cursor: pointer; }
.editor-toolbar button:hover { background: var(--surface-soft); color: var(--text); }
.editor-toolbar .format-bold { font-weight: 800; }
.editor-toolbar .format-italic { font-style: italic; }
.editor-toolbar .format-underline { text-decoration: underline; }
.editor-toolbar .format-strike { text-decoration: line-through; }
.editor-toolbar .format-code { font-family: "SFMono-Regular", Consolas, monospace; }
.toolbar-separator { width: 1px; height: 20px; flex: none; margin: 0 2px; background: var(--line); }
.editor { position: relative; }
.block-row { position: relative; display: flex; align-items: flex-start; min-height: 31px; margin: 1px 0; padding-left: var(--block-indent, 0px); border-radius: 4px; transition: padding-left .12s ease; }
.block-tools { position: absolute; left: -48px; top: 3px; width: 44px; display: flex; justify-content: flex-end; opacity: 0; transform: translateX(3px); transition: opacity .1s, transform .1s; }
.block-row:hover .block-tools, .block-row:focus-within .block-tools { opacity: 1; }
.block-row:hover .block-tools, .block-row:focus-within .block-tools { transform: translateX(0); }
.block-menu-button, .block-add-button { width: 22px; height: 25px; border: 0; border-radius: 4px; padding: 0; background: transparent; color: #aaa8a3; cursor: grab; }
.block-menu-button { display: grid; place-items: center; }
.block-menu-button svg { width: 12px; height: 18px; fill: currentColor; }
.block-add-button { font-size: 1.3125rem; font-weight: 300; }
.block-menu-button:hover, .block-add-button:hover { background: #eeeeec; color: var(--text); }
.block-add-button { cursor: pointer; }
.block-content { position: relative; flex: 1; min-width: 0; padding: 5px 2px; min-height: 38px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.block-content:focus, .block-content:focus-visible { outline: none; }
.block-content code { border-radius: 4px; padding: 2px 4px; background: #f0eeea; color: #a33b52; font: .88em "SFMono-Regular", Consolas, monospace; }
.block-content a { color: #296da8; text-decoration: underline; text-underline-offset: 2px; }
.block-content:empty::before { content: attr(data-placeholder); color: #bbb7b0; pointer-events: none; }
.block-row[data-type="heading1"] .block-content { font-size: 2rem; font-weight: 740; line-height: 1.35; padding-top: 13px; }
.block-row[data-type="heading2"] .block-content { font-size: 1.5625rem; font-weight: 710; line-height: 1.4; padding-top: 10px; }
.block-row[data-type="heading3"] .block-content { font-size: 1.25rem; font-weight: 690; padding-top: 7px; }
.block-row[data-type="bullet"] .block-content::before { content: "•"; position: absolute; left: -17px; color: #5c5852; }
.block-row[data-type="number"] { counter-increment: numbered; }
.editor { counter-reset: numbered; }
.block-row[data-type="number"] .block-content::before { content: counter(numbered) "."; position: absolute; left: -25px; color: #5c5852; }
.block-row[data-type="quote"] .block-content { border-left: 3px solid #4f4b45; padding-left: 14px; font-size: 1.0625rem; color: #45413b; }
.block-row[data-type="code"] .block-content { background: #f5f4f1; border-radius: 6px; padding: 12px 14px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.9375rem; line-height: 1.55; }
.block-row[data-type="callout"] { background: #f4f6f0; padding: 8px 10px 8px 44px; margin: 5px 0; }
.block-row[data-type="callout"] .block-content::before { content: "💡"; position: absolute; margin-left: -31px; }
.block-row[data-type="divider"] { min-height: 24px; align-items: center; }
.block-row[data-type="divider"] .block-content { border-top: 1px solid var(--line-strong); min-height: 1px; padding: 0; pointer-events: none; }
.todo-wrap { flex: 1; display: flex; align-items: flex-start; gap: 9px; }
.todo-checkbox { margin: 8px 0 0; accent-color: var(--accent); }
.todo-wrap.checked .block-content { text-decoration: line-through; color: var(--faint); }
.file-block { flex: 1; margin: 4px 0; border: 1px solid var(--line); border-radius: 9px; padding: 12px; background: var(--surface-soft); display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.image-block { max-width: 100%; margin: 12px 0; }
.image-block img { max-width: 100%; max-height: 680px; display: block; border-radius: 8px; border: 1px solid var(--line); }
.simple-table-block { flex: 1; min-width: 0; margin: 6px 0 10px; }
.simple-table-scroll { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 3px; }
.simple-table { width: 100%; min-width: 480px; border-collapse: collapse; table-layout: fixed; background: white; }
.simple-table td { min-width: 140px; height: 36px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.simple-table tr:last-child td { border-bottom: 0; }
.simple-table td:last-child { border-right: 0; }
.simple-table tr:first-child td { background: #f7f7f5; }
.simple-table-cell { min-height: 36px; padding: 7px 9px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.simple-table-cell:empty::before { content: attr(data-placeholder); color: #b5b0a8; pointer-events: none; }
.simple-table-cell:focus { outline: 2px solid #8aa9c5; outline-offset: -2px; background: white; }
.simple-table-controls { display: flex; gap: 3px; margin-top: 4px; opacity: 0; transition: opacity .12s; }
.simple-table-block:hover .simple-table-controls, .simple-table-block:focus-within .simple-table-controls { opacity: 1; }
.simple-table-controls button { border: 0; border-radius: 5px; padding: 4px 7px; background: transparent; color: var(--muted); font-size: 0.875rem; cursor: pointer; }
.simple-table-controls button:hover { background: var(--surface-soft); color: var(--text); }

.record-properties { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 0 0 24px; }
.property-line { min-height: 39px; display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid #f0eeea; }
.property-line:last-child { border-bottom: 0; }
.property-name { color: var(--muted); font-size: 0.9375rem; }
.property-control { border: 0; background: transparent; padding: 7px; border-radius: 6px; min-width: 0; width: 100%; color: var(--text); }
.property-control:hover, .property-control:focus { background: var(--surface-soft); }

.database-wrap { width: min(1200px, calc(100% - 48px)); }
.database-toolbar { display: flex; align-items: center; gap: 6px; margin: 8px 0 14px; border-bottom: 1px solid var(--line); }
.database-view-tabs { min-width: 0; display: flex; align-items: center; overflow-x: auto; scrollbar-width: thin; }
.view-tab { border: 0; background: transparent; padding: 9px 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.view-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 650; }
.database-toolbar .toolbar-spacer { flex: 1; }
.small-button { border: 1px solid var(--line-strong); background: white; border-radius: 7px; padding: 6px 10px; cursor: pointer; color: #58544e; }
.small-button:hover { background: var(--surface-soft); }
.small-button.danger { color: var(--danger); border-color: #edcecb; }
.db-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.db-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; font-size: 0.9375rem; }
.db-table th { position: sticky; top: 0; z-index: 2; background: var(--surface-soft); color: var(--muted); text-align: left; font-weight: 620; padding: 8px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.db-table th:last-child { border-right: 0; }
.db-table td { min-width: 145px; height: 38px; padding: 0; border-bottom: 1px solid #efede9; border-right: 1px solid #efede9; }
.db-table tr:last-child td { border-bottom: 0; }
.db-table td:last-child { border-right: 0; }
.cell-input, .cell-select { width: 100%; height: 37px; border: 0; padding: 7px 10px; background: transparent; color: var(--text); }
.cell-input:hover, .cell-select:hover, .cell-input:focus, .cell-select:focus { background: #f7f7f5; }
.multi-select-control { min-height: 37px; height: auto; max-height: 82px; }
.cell-readonly, .property-readonly { min-height: 37px; padding: 8px 10px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.property-readonly.error { color: var(--danger); }
.title-cell { display: flex; align-items: center; }
.record-open { flex: 1; min-width: 0; height: 37px; padding: 0 9px; border: 0; background: transparent; display: flex; align-items: center; gap: 7px; cursor: pointer; text-align: left; }
.record-open span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-open:hover { background: #f7f7f5; }
.board { display: flex; align-items: flex-start; gap: 14px; overflow: auto; padding: 4px 2px 30px; }
.board-column { width: 270px; min-width: 270px; border-radius: 10px; background: #f5f4f1; padding: 10px; min-height: 140px; }
.board-column.drag-over { outline: 2px solid rgba(60,111,100,.4); background: var(--accent-soft); }
.board-column-head { display: flex; align-items: center; gap: 8px; padding: 2px 3px 10px; font-weight: 650; }
.count-badge { color: var(--muted); font-size: 0.875rem; background: #e5e2dc; border-radius: 10px; padding: 2px 6px; }
.board-card { width: 100%; border: 1px solid var(--line); background: white; border-radius: 8px; padding: 11px; margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.035); text-align: left; }
.board-card:hover { border-color: var(--line-strong); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.board-card-title { font-weight: 640; line-height: 1.45; }
.board-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; color: var(--muted); font-size: 0.875rem; }
.tag { display: inline-flex; border-radius: 12px; padding: 2px 7px; background: #ebe9e5; color: #605b54; }
.tag.blue { background: var(--blue-soft); color: #315e90; }
.tag.green { background: var(--accent-soft); color: var(--accent-dark); }
.tag.red { background: var(--danger-soft); color: #8c3333; }
.tag.yellow { background: #f9f0d5; color: #7f641d; }
.board-add { width: 100%; border: 0; background: transparent; border-radius: 6px; padding: 7px; color: var(--muted); text-align: left; cursor: pointer; }
.board-add:hover { background: rgba(0,0,0,.04); }

.database-view-empty { min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 8px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 28px; text-align: center; color: var(--muted); }
.database-view-empty strong { color: var(--text); font-size: 1.0625rem; }
.database-view-empty p { max-width: 420px; margin: 0 0 5px; line-height: 1.55; }
.database-record-summary { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.database-list-view { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.database-list-item { display: grid; grid-template-columns: minmax(150px, .65fr) 1.35fr; align-items: center; gap: 16px; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; background: white; text-align: left; cursor: pointer; }
.database-list-item:last-child { border-bottom: 0; }
.database-list-item:hover { background: var(--surface-soft); }
.database-calendar h3 { margin: 0 0 12px; font-size: 1.125rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(88px, 1fr)); min-width: 680px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.database-calendar { overflow-x: auto; }
.calendar-weekday { padding: 7px 9px; background: var(--surface-soft); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; text-align: center; }
.calendar-day { min-height: 112px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day-number { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.875rem; }
.calendar-record { width: 100%; overflow: hidden; border: 0; border-radius: 5px; margin: 2px 0; padding: 4px 6px; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.875rem; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.database-timeline { display: grid; border-left: 2px solid var(--line-strong); margin-left: 98px; }
.timeline-record { position: relative; display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 14px; border: 0; border-bottom: 1px solid var(--line); padding: 13px 14px; background: transparent; text-align: left; cursor: pointer; }
.timeline-record::before { content: ""; position: absolute; left: -7px; top: 19px; width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; background: var(--accent); }
.timeline-record:hover { background: var(--surface-soft); }
.timeline-date { color: var(--muted); font-size: 0.875rem; }
.timeline-content { display: grid; gap: 5px; }
.database-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.database-gallery.size-small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.database-gallery.size-large { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gallery-card { min-width: 0; display: grid; gap: 9px; align-content: start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: white; text-align: left; cursor: pointer; }
.gallery-card:hover { border-color: var(--line-strong); box-shadow: 0 3px 12px rgba(48,43,35,.07); }
.gallery-cover { height: 120px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: var(--surface-soft); color: var(--faint); font-size: 2rem; }
.gallery-cover img { width: 100%; height: 100%; object-fit: cover; }
.database-chart { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.chart-row { display: grid; grid-template-columns: minmax(80px, 150px) minmax(100px, 1fr) 65px; align-items: center; gap: 11px; font-size: 0.875rem; }
.chart-track { height: 22px; overflow: hidden; border-radius: 5px; background: var(--surface-soft); }
.chart-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5c887e, var(--accent)); }
.chart-row strong { text-align: right; font-variant-numeric: tabular-nums; }

.view-settings-form { display: grid; gap: 16px; }
.view-settings-basics { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); gap: 9px; }
.view-settings-form label { display: grid; align-content: start; gap: 6px; color: var(--muted); font-size: 0.875rem; }
.view-settings-form input:not([type="checkbox"]), .view-settings-form select { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 8px; background: white; color: var(--text); }
.view-settings-form fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 11px; }
.view-settings-form legend { padding: 0 5px; color: var(--text); font-size: 0.875rem; font-weight: 680; }
.view-config-list { display: grid; gap: 7px; margin-bottom: 8px; }
.view-config-row { display: grid; grid-template-columns: minmax(100px,1fr) minmax(100px,1fr) minmax(100px,1fr) 32px; gap: 6px; }
.view-sort-row { grid-template-columns: minmax(130px,1fr) minmax(110px,.7fr) 32px; }
.view-property-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 12px; }
.view-property-grid label { grid-template-columns: auto minmax(0,1fr); align-items: center; justify-content: start; }
.view-layout-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.view-settings-actions { align-items: center; }
.view-settings-actions .danger-button { margin-right: auto; }
.danger-button { border: 1px solid #edcecb; border-radius: 7px; padding: 7px 10px; background: white; color: var(--danger); cursor: pointer; }
.danger-button:hover { background: var(--danger-soft); }

.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 12vh 20px 30px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(38,35,30,.3); backdrop-filter: blur(2px); }
.modal-card { position: relative; width: min(600px, 100%); max-height: 76vh; display: flex; flex-direction: column; background: white; border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.modal-head { min-height: 52px; display: flex; align-items: center; padding: 0 14px 0 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.125rem; flex: 1; }
.modal-body { overflow: auto; padding: 18px 20px 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.workspace-identity-card, .workspace-account-row { display: flex; align-items: center; gap: 11px; }
.workspace-identity-card { padding: 4px 0 15px; border-bottom: 1px solid var(--line); }
.workspace-account-row { margin: 12px 0 18px; padding: 10px; border-radius: 7px; background: var(--surface-soft); }
.workspace-identity-card > span:last-child, .workspace-account-row > span:last-child { min-width: 0; display: grid; gap: 2px; }
.workspace-identity-card small, .workspace-account-row small { color: var(--muted); font-size: 0.875rem; }
.workspace-identity-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: var(--text); color: #fff; font-weight: 750; }
.workspace-list-heading { display: grid; gap: 3px; margin: 4px 2px 8px; }
.workspace-list-heading strong { font-size: 0.9375rem; }
.workspace-list-heading small { color: var(--muted); font-size: 0.875rem; }
.workspace-switcher-list { display: grid; gap: 3px; }
.workspace-switcher-item { width: 100%; display: grid; grid-template-columns: 34px minmax(0,1fr) 20px; align-items: center; gap: 10px; border: 0; border-radius: 8px; padding: 7px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.workspace-switcher-item:hover, .workspace-switcher-item.active { background: var(--surface-soft); }
.workspace-switcher-copy { min-width: 0; display: grid; gap: 2px; }
.workspace-switcher-copy strong, .workspace-switcher-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switcher-copy small { color: var(--muted); font-size: 0.875rem; font-weight: 450; }
.workspace-switcher-check { color: var(--accent); font-weight: 800; }
.workspace-create-button { width: 100%; min-height: 38px; margin-top: 5px; border: 0; border-radius: 8px; padding: 0 10px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.workspace-create-button:hover { background: var(--surface-soft); color: var(--text); }
.workspace-settings-divider { height: 1px; margin: 16px 0; background: var(--line); }
.modal-description { margin: 0 0 4px; color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.member-list { display: grid; gap: 6px; margin-bottom: 20px; }
.member-row { display: grid; grid-template-columns: 36px minmax(0,1fr) 120px auto; align-items: center; gap: 10px; padding: 7px 5px; }
.member-row .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); font-weight: 700; font-size: 0.875rem; }
.member-row .member-info { min-width: 0; display: grid; }
.member-row .member-info small { color: var(--muted); }
.member-row select { border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: white; }
.invite-box { border-top: 1px solid var(--line); padding-top: 18px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 120px auto; gap: 8px; align-items: end; }
.inline-form label { display: grid; gap: 5px; color: var(--muted); font-size: 0.875rem; }
.inline-form input, .inline-form select, .search-input { border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 10px; min-width: 0; background: white; }
.credential-box { margin-top: 14px; border: 1px solid #d6e4de; background: var(--accent-soft); border-radius: 9px; padding: 12px; }
.credential-box code { user-select: all; font-size: 1rem; font-weight: 700; }
.search-input { width: 100%; font-size: 1.125rem; padding: 11px 13px; }
.search-results { margin-top: 12px; display: grid; gap: 3px; }
.search-result { border: 0; background: transparent; border-radius: 8px; padding: 10px; cursor: pointer; text-align: left; }
.search-result:hover { background: var(--surface-soft); }
.search-result strong { display: block; margin-bottom: 3px; }
.search-result small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revision-list, .trash-list, .audit-list { display: grid; gap: 5px; }
.revision-row, .trash-row, .audit-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0eeea; padding: 9px 3px; }
.revision-row .grow, .trash-row .grow, .audit-row .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.command-menu { position: fixed; z-index: 120; width: 290px; max-height: 380px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); padding: 5px; }
.command-head { padding: 5px 6px 7px; color: var(--muted); font-size: 0.875rem; }
.command-search { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: var(--surface-soft); }
.command-list { max-height: 315px; overflow-y: auto; }
.command-menu button { width: 100%; border: 0; background: transparent; border-radius: 7px; padding: 8px 9px; cursor: pointer; text-align: left; display: grid; gap: 2px; }
.command-menu button span { color: var(--faint); font-size: 0.8125rem; }
.command-menu button:hover, .command-menu button.active { background: var(--surface-soft); }
.command-divider { height: 1px; margin: 5px 7px; background: var(--line); }
.command-empty { margin: 12px; color: var(--muted); font-size: 0.875rem; }
.selection-toolbar { position: fixed; z-index: 130; display: flex; align-items: center; gap: 1px; border: 1px solid #2f2e2b; border-radius: 6px; padding: 3px; background: #2f2e2b; color: white; box-shadow: 0 5px 18px rgba(15,15,15,.22); }
.selection-toolbar button { width: 30px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 4px; padding: 0; background: transparent; color: inherit; cursor: pointer; font-size: 0.875rem; }
.selection-toolbar button:hover { background: rgba(255,255,255,.14); }

.utility-panel { position: fixed; z-index: 45; inset: 0 0 0 auto; width: min(380px, 100vw); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: white; box-shadow: -14px 0 35px rgba(48,43,35,.10); transform: translateX(102%); transition: transform .18s ease; }
.utility-panel.open { transform: translateX(0); }
.utility-head { min-height: 62px; flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.utility-head > div:first-child { flex: 1; min-width: 0; }
.utility-head h2 { margin: 1px 0 0; font-size: 1.125rem; }
.utility-eyebrow { color: var(--faint); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .08em; }
.utility-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 28px; }
.utility-empty { display: grid; place-items: center; min-height: 240px; text-align: center; color: var(--muted); line-height: 1.6; }
.utility-loading { padding: 22px 0; color: var(--muted); }
.utility-section { display: grid; gap: 10px; margin-bottom: 22px; }
.utility-section h3 { margin: 0; font-size: 0.9375rem; }
.comment-list { display: grid; gap: 10px; }
.comment-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.comment-card.resolved { opacity: .62; }
.comment-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: 0.875rem; color: var(--muted); }
.comment-meta strong { color: var(--text); font-size: 0.875rem; }
.comment-body { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.comment-mentions { margin-top: 7px; color: #446d91; font-size: 0.875rem; }
.comment-actions { display: flex; justify-content: flex-end; margin-top: 7px; }
.comment-compose { position: sticky; bottom: -28px; display: grid; gap: 8px; margin: 15px -18px -28px; padding: 12px 18px 18px; border-top: 1px solid var(--line); background: white; }
.comment-compose textarea, .ai-prompt { width: 100%; min-height: 82px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 9px; padding: 10px 11px; }
.comment-compose select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: white; color: var(--muted); }
.panel-list { display: grid; gap: 3px; }
.panel-list button { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 9px; background: transparent; text-align: left; cursor: pointer; }
.panel-list button:hover { background: var(--surface-soft); }
.panel-list button span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.permission-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 7px 0; }
.permission-row .avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); font-size: 0.8125rem; font-weight: 700; }
.permission-row select { border: 1px solid var(--line); border-radius: 7px; padding: 5px; background: white; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.meeting-intro { margin: 0 0 12px; line-height: 1.55; }
.meeting-compatibility { margin-bottom: 14px; border-radius: 9px; padding: 10px 11px; font-size: 0.875rem; line-height: 1.5; }
.meeting-compatibility.available { background: var(--accent-soft); color: var(--accent-dark); }
.meeting-compatibility.blocked { border: 1px solid #eed7b2; background: #fff7e6; color: #75581f; }
.meeting-transcription-status { display: flex; align-items: center; gap: 7px; margin: -5px 0 14px; border-radius: 8px; padding: 8px 10px; background: var(--surface-soft); color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.meeting-transcription-status::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #b9b3ab; }
.meeting-transcription-status.available::before { background: #4f9a68; box-shadow: 0 0 0 3px #e7f3ea; }
.meeting-transcription-status.unavailable::before { background: #bd7a46; box-shadow: 0 0 0 3px #f8eadc; }
.meeting-recorder { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-soft); }
.meeting-recorder h3, .meeting-recordings h3 { margin: 0; font-size: 0.9375rem; }
.meeting-field { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 0.875rem; font-weight: 650; }
.meeting-field input, .meeting-field select { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 9px; background: white; color: var(--text); font-size: 0.9375rem; font-weight: 400; }
.meeting-device-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(105px, .7fr); align-items: end; gap: 7px; }
.meeting-device-row > .small-button { grid-column: 1 / -1; justify-self: start; }
.meeting-consent-box { display: grid; gap: 8px; border: 1px solid #e3ded6; border-radius: 9px; padding: 10px; background: white; }
.meeting-consent { display: flex; align-items: flex-start; gap: 8px; color: #544f48; font-size: 0.875rem; line-height: 1.5; cursor: pointer; }
.meeting-consent input { flex: none; margin: 2px 0 0; accent-color: var(--accent); }
.meeting-consent-box .small-button { justify-self: start; }
.meeting-live { min-height: 54px; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 9px; border-radius: 10px; padding: 10px 12px; background: white; }
.meeting-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #c8c3bc; }
.meeting-live strong { font: 700 19px/1 "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.meeting-recorder-status { justify-self: end; color: var(--muted); font-size: 0.875rem; text-align: right; }
.meeting-recorder-status.recording { color: #9a3c36; font-weight: 700; }
.meeting-recorder-status.recording ~ * { color: inherit; }
.meeting-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.meeting-record-button { border: 0; border-radius: 9px; padding: 10px 14px; background: #a84640; color: white; font-weight: 700; cursor: pointer; }
.meeting-record-button:hover { background: #8d3732; }
.meeting-record-button:disabled { opacity: .48; cursor: default; }
.meeting-file-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 1px; }
.meeting-file-upload span { color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.meeting-attached-note { margin: 0; border-radius: 8px; padding: 8px 10px; background: #fff3d8; color: #71581e; font-size: 0.875rem; }
.meeting-recordings { display: grid; gap: 10px; margin-top: 22px; }
.meeting-list-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.meeting-list-heading h3 { color: var(--text); }
.meeting-list-heading span { font-size: 0.875rem; }
.meeting-empty { display: grid; min-height: 105px; place-items: center; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 16px; color: var(--muted); font-size: 0.875rem; text-align: center; }
.meeting-recording-card { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: white; }
.meeting-recording-card.loading { opacity: .68; pointer-events: none; }
.meeting-recording-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.meeting-recording-head > div { min-width: 0; display: grid; gap: 3px; }
.meeting-recording-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; }
.meeting-recording-head small { color: var(--muted); font-size: 0.8125rem; }
.meeting-status-badge { flex: none; border-radius: 999px; padding: 3px 7px; background: var(--surface-soft); color: var(--muted); font-size: 0.8125rem; }
.meeting-status-badge.processing { background: #f3ecfa; color: #6f4e90; animation: ai-pulse 1.2s ease-in-out infinite; }
.meeting-status-badge.completed, .meeting-status-badge.summarized, .meeting-status-badge.transcribed { background: var(--accent-soft); color: var(--accent-dark); }
.meeting-status-badge.failed, .meeting-status-badge.unsupported { background: var(--danger-soft); color: var(--danger); }
.meeting-audio { width: 100%; height: 36px; }
.meeting-transcript { border-top: 1px solid var(--line); padding-top: 9px; }
.meeting-transcript summary { color: var(--muted); font-size: 0.875rem; cursor: pointer; }
.meeting-transcript p, .meeting-summary p { max-height: 220px; overflow: auto; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.875rem; line-height: 1.6; }
.meeting-summary { border-radius: 9px; padding: 10px; background: #faf7ff; }
.meeting-summary h4 { margin: 0; color: #624982; font-size: 0.875rem; }
.meeting-detail-load { margin-top: 9px; }
.meeting-recording-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.meeting-download { display: inline-flex; align-items: center; text-decoration: none; }
@keyframes meeting-pulse { 50% { opacity: .35; transform: scale(.78); } }
.ai-suggestions { display: grid; gap: 7px; margin: 12px 0; }
.ai-suggestions button { border: 1px solid #e4daef; border-radius: 9px; background: #faf7ff; color: #5e4a7a; padding: 9px 10px; text-align: left; cursor: pointer; }
.ai-suggestions button[aria-pressed="true"] { border-color: #9576ba; background: #f2ebfa; box-shadow: inset 0 0 0 1px #bda8d5; }
.ai-provider-status { display: flex; align-items: center; gap: 7px; border-radius: 8px; padding: 8px 10px; background: var(--surface-soft); color: var(--muted); font-size: 0.875rem; }
.ai-provider-status::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #aaa49b; }
.ai-provider-status.available::before { background: #4f9a68; box-shadow: 0 0 0 3px #e7f3ea; }
.ai-provider-status.unavailable::before { background: #bc675c; box-shadow: 0 0 0 3px #faece9; }
.ai-provider-status.checking::before { animation: ai-pulse 1s ease-in-out infinite; }
.ai-controls { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.ai-controls .primary-button { margin-right: auto; }
.ai-answer { margin-top: 14px; border-radius: 10px; padding: 12px; background: var(--surface-soft); line-height: 1.6; }
.ai-job-status { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: var(--muted); font-size: 0.875rem; }
.ai-job-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #aaa49b; }
.ai-job-status.active .ai-job-dot { background: #7d5aa5; animation: ai-pulse 1s ease-in-out infinite; }
.ai-job-status.succeeded .ai-job-dot { background: #4f9a68; }
.ai-job-status.failed .ai-job-dot, .ai-job-status.auth_required .ai-job-dot,
.ai-job-status.rate_limited .ai-job-dot, .ai-job-status.unavailable .ai-job-dot,
.ai-job-status.local_error .ai-job-dot { background: #bc675c; }
.ai-output { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.ai-output.error { color: #873f39; }
.ai-connection-note { margin: 9px 0 0; }
.ai-citations { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.ai-citations > span { width: 100%; color: var(--muted); font-size: 0.875rem; }
.ai-citation { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; background: white; color: #526f8b; font-size: 0.875rem; cursor: pointer; }
.ai-result-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
@keyframes ai-pulse { 50% { opacity: .35; transform: scale(.78); } }

@media (min-width: 1201px) {
  .app-shell.panel-open .main-shell { margin-right: 380px; }
}
.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); }
.toast { background: #312e2a; color: white; border-radius: 9px; padding: 11px 13px; box-shadow: var(--shadow); animation: toast-in .18s ease-out; }
.toast.error { background: #8b3838; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.mobile-only { display: none; }

@media (max-width: 900px) {
  .mobile-only { display: inline-grid; }
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(var(--sidebar-width), 88vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { display: block !important; position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.22); }
  .sidebar-scrim.hidden { display: none !important; }
  .main-shell { width: 100%; }
  .page-wrap { width: calc(100% - 34px); padding-top: 34px; }
  .database-wrap { width: calc(100% - 24px); }
  .status-pill span:last-child { display: none; }
  .presence-list { display: none; }
  .inline-form { grid-template-columns: 1fr; }
  .member-row { grid-template-columns: 34px minmax(0,1fr) 100px; }
  .member-row > button { grid-column: 3; }
  .database-toolbar { flex-wrap: wrap; padding-bottom: 8px; }
  .database-view-tabs { order: -1; flex-basis: 100%; }
}

@media (max-width: 560px) {
  .login-shell { padding: 16px; }
  .login-card { padding: 28px 22px; }
  .topbar { padding: 0 9px; gap: 6px; }
  .breadcrumbs { max-width: 110px; }
  .save-status, #history-button, #archive-button, #comments-button span { display: none; }
  .panel-button { padding-inline: 6px; }
  .ai-button span:last-child, .meeting-button span:last-child { display: none; }
  .ghost-button { padding-inline: 6px; }
  .page-title { font-size: 2.1875rem; }
  .page-wrap { padding-bottom: 90px; }
  .block-tools { display: none; }
  .editor-toolbar { overflow-x: auto; width: max-content; max-width: calc(100vw - 34px); }
  .property-line { grid-template-columns: 100px minmax(0,1fr); }
  .database-list-item { grid-template-columns: 1fr; gap: 6px; }
  .database-timeline { margin-left: 6px; }
  .timeline-record { grid-template-columns: 1fr; gap: 5px; }
  .chart-row { grid-template-columns: 72px minmax(70px,1fr) 45px; }
  .view-settings-basics, .view-layout-fields, .view-property-grid { grid-template-columns: 1fr; }
  .view-config-row, .view-sort-row { grid-template-columns: 1fr 1fr 32px; }
  .view-filter-value { grid-column: 1 / 3; }
  .modal-root { padding: 8vh 10px 20px; }
  .utility-panel { width: 100vw; }
}

/* Workspace navigation and usable document/database controls. */
.workspace-switcher-popover { position: fixed; z-index: 130; width: min(330px, calc(100vw - 16px)); max-height: calc(100dvh - 90px); overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); box-shadow: 0 8px 30px #0002; }
.workspace-switcher-popover > p { margin: 4px 8px 10px; }
.workspace-home { padding-top: 65px; }
.workspace-home h1 { font-size: 2.125rem; letter-spacing: -.8px; margin: 8px 0; }
.home-eyebrow { color: var(--muted); font-size: 0.875rem; }
.workspace-home h2 { margin-top: 42px; font-size: 1.0625rem; }
.workspace-home .workspace-empty-actions { justify-content: flex-start; }
.home-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.home-page-card { display: grid; gap: 10px; padding: 20px; text-align: left; color: var(--text); background: white; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.home-page-card:hover { background: var(--surface-soft); box-shadow: 0 2px 8px #0001; }
.home-page-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-page-card small { color: var(--muted); }
.home-page-icon { font-size: 1.625rem; }
.block-menu-button[draggable] { cursor: grab; }
.block-dragging { opacity: .35; }
.block-drop-before { box-shadow: 0 -3px var(--accent); }
.block-drop-after { box-shadow: 0 3px var(--accent); }
.date-view-navigation { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.date-view-navigation h3 { flex: 1; margin: 0; font-size: 1.3125rem; }
.calendar-day-number.is-today { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: white; background: var(--accent); }
.calendar-outside { background: var(--surface-soft); }
.database-timeline { display: block; border-left: 0; padding-left: 0; margin: 0; }
.timeline-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.timeline-grid { min-width: calc(180px + var(--timeline-days) * 34px); }
.timeline-axis, .timeline-grid-row { display: grid; grid-template-columns: 180px repeat(var(--timeline-days), minmax(34px, 1fr)); }
.timeline-axis { min-height: 38px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.timeline-axis > * { text-align: center; padding: 9px 0; font-size: 0.875rem; border-right: 1px solid var(--line); }
.timeline-axis > strong { position: sticky; left: 0; background: var(--surface-soft); z-index: 2; }
.timeline-grid-row { height: 46px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0, transparent 33px, #eee 33px, #eee 34px); }
.timeline-name { grid-column: 1; grid-row: 1; position: sticky; left: 0; z-index: 1; border: 0; border-right: 1px solid var(--line); background: white; padding: 10px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.timeline-bar { grid-row: 1; align-self: center; height: 29px; min-width: 0; margin: 0 2px; border: 1px solid #8db6a6; border-radius: 5px; background: var(--accent-soft); color: var(--accent-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; text-align: left; padding: 4px 8px; cursor: pointer; }
.chart-track { position: relative; }
.chart-track::after { content: ''; position: absolute; left: var(--chart-zero, 0%); top: 0; bottom: 0; width: 1px; background: #8b918b; }
.chart-bar { position: absolute; }
.chart-bar.negative { background: #ba7771; }
.formula-properties { display: flex; flex-wrap: wrap; gap: 5px; }
.advanced-property-fields textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 5px; font: 1rem/1.6 ui-monospace, monospace; resize: vertical; }
.cell-link-control { width: 100%; min-height: 37px; border: 0; background: transparent; color: var(--text); padding: 7px 10px; text-align: left; cursor: pointer; }
.cell-link-control:hover { background: var(--surface-soft); }
.cell-select:not(:focus):not([multiple]) { appearance: none; }
.relation-options { display: grid; gap: 3px; max-height: 320px; overflow: auto; }
.relation-options label { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 5px; }
.relation-options label:hover { background: var(--surface-soft); }
.relation-options label[hidden] { display: none; }
.relation-options input { width: auto; }
.file-property-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.file-property-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .workspace-home { padding-top: 30px; } .workspace-home h1 { font-size: 1.8125rem; } .home-page-grid { grid-template-columns: 1fr; } .block-tools { display: flex; left: -29px; width: 27px; } .block-add-button { display: none; } }
.record-peek { position: fixed; z-index: 45; top: 0; right: 0; bottom: 0; width: min(660px, 60vw); background: #fff; border-left: 1px solid var(--line); box-shadow: -10px 0 35px #0001; display: flex; flex-direction: column; }
.record-peek-head { display: flex; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.record-peek-body { padding: 34px 40px 80px; overflow: auto; }
.record-peek-body h1 { font-size: 2.125rem; line-height: 1.4; overflow-wrap: anywhere; }
.record-peek-body p { white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.record-peek-properties { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 15px; padding-bottom: 25px; border-bottom: 1px solid var(--line); font-size: 1rem; }
.record-peek-properties dt { color: var(--muted); }
.record-peek-properties dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .record-peek { width: 100%; } .record-peek-body { padding: 22px; } }
.microphone-connection { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); margin: 16px 0; }
.microphone-connection h3 { margin: 0 0 6px; font-size: 1rem; }
.microphone-connection p { line-height: 1.6; }
.microphone-setup ol { padding-left: 22px; line-height: 1.8; }
.microphone-setup li { margin-bottom: 9px; }
.microphone-download { display: inline-block; text-align: center; text-decoration: none; }

/* One document selection; block controls are never part of copied text. */
.block-tools { user-select: none; }
#block-editor:focus { outline: none; }

.sidebar-page-groups { flex:1; min-height:160px; overflow:auto; }
.sidebar-page-groups .page-tree { flex:none; overflow:visible; padding-bottom:5px; }
#research-note-tree:empty::after { content:'서재에서 연구 노트를 작성하세요'; display:block; padding:6px 9px; color:var(--faint); font-size:0.875rem; }
