/* Workspace settings, encrypted shared files and bounded chat effects. */
.wf-panel { width:100%; min-width:0; color:var(--ink-1,#191919); font:inherit; line-height:1.55; }
.wf-panel * { box-sizing:border-box; }
.wf-panel :is(h2,h3,p) { margin:0; }
.wf-panel button,.wf-panel input { font:inherit; }
.wf-panel [hidden] { display:none !important; }
.wf-panel button { cursor:pointer; }
.wf-panel button:disabled { cursor:default; }
.wf-panel :is(button,input):focus-visible,.wf-effect-close:focus-visible { outline:2px solid var(--focus,#16874b); outline-offset:3px; }
.wf-grow { flex:1; min-width:0; overflow-wrap:anywhere; }
.wf-muted,.wf-panel small { color:var(--ink-3,#606060); }
.wf-feedback { min-height:1.55em; margin-top:12px !important; color:var(--brand-ink,#006b38); overflow-wrap:anywhere; }
.wf-feedback:empty { min-height:0; margin:0 !important; }
.wf-error { color:var(--danger,#c63030); }
.wf-button { min-height:38px; min-width:48px; padding:7px 13px; border:1px solid var(--line-strong,#d5d5d5); border-radius:5px; color:var(--ink-1,#191919); background:var(--bg-panel,#fff); line-height:1.45; white-space:normal; }
.wf-button:hover:not(:disabled) { background:var(--bg-hover,#f5f5f5); }
.wf-button.wf-primary { border-color:transparent; color:var(--action-ink,#fff); background:var(--action-bg,#078443); }
.wf-button.wf-primary:hover:not(:disabled) { background:var(--action-hover,#06783f); }
.wf-button.wf-danger { color:var(--danger,#c63030); }
.wf-button.wf-danger:hover:not(:disabled) { background:var(--danger-soft,#fcebea); }
.wf-button:disabled { color:var(--ink-4,#666); border-color:var(--line,#e7e7e7); background:var(--bg-sunken,#ededed); }
.wf-input { display:block; min-width:0; width:100%; min-height:40px; border:1px solid var(--line-strong,#d5d5d5); border-radius:5px; background:var(--bg-panel,#fff); color:var(--ink-1,#191919); padding:8px 11px; }
.wf-input::placeholder { color:var(--ink-4,#666); }
.wf-input:disabled { background:var(--bg-sunken,#ededed); color:var(--ink-3,#606060); }
.wf-account { display:flex; align-items:center; gap:14px; padding:4px 0 20px; }
.wf-account-mark { display:grid; flex:none; width:48px; height:48px; place-items:center; border-radius:6px; background:var(--brand-soft,#e1f6e9); color:var(--brand-ink,#006b38); font-size:24px; font-weight:500; }
.wf-account strong { font-size:1.15em; font-weight:600; }
.wf-account p { margin-top:3px; color:var(--ink-3,#606060); font-size:.93em; }
.wf-setting-actions { overflow:hidden; border:1px solid var(--line,#e7e7e7); border-radius:7px; }
.wf-setting-action { display:flex; align-items:center; gap:12px; width:100%; min-height:66px; padding:12px 15px; border:0; background:var(--bg-panel,#fff); color:var(--ink-1,#191919); text-align:left; }
.wf-setting-action + .wf-setting-action { border-top:1px solid var(--line,#e7e7e7); }
.wf-setting-action:hover { background:var(--bg-hover,#f5f5f5); }
.wf-setting-action strong,.wf-toggle-row strong { display:block; font-weight:500; }
.wf-setting-action small,.wf-toggle-row small { display:block; margin-top:3px; font-size:.86em; line-height:1.5; }
.wf-chevron { flex:none; color:var(--ink-3,#606060); font-size:24px; font-weight:300; }
.wf-section-heading { margin:26px 0 14px; }
.wf-section-heading h3 { font-size:1em; font-weight:600; }
.wf-section-heading p { margin-top:4px; font-size:.9em; color:var(--ink-3,#606060); }
.wf-setting-group { margin:0 0 16px; padding:0; min-inline-size:0; border:0; }
.wf-setting-group legend { padding:0; margin-bottom:4px; font-size:.95em; font-weight:500; }
.wf-setting-group > p { font-size:.86em; }
.wf-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:10px; }
.wf-choices-stack { grid-template-columns:minmax(0,1fr); }
.wf-choice { display:flex; align-items:center; gap:8px; min-height:43px; min-width:0; padding:9px 12px; border:1px solid var(--line-strong,#d5d5d5); border-radius:5px; background:var(--bg-panel,#fff); cursor:pointer; overflow-wrap:anywhere; }
.wf-choice:hover { background:var(--bg-hover,#f5f5f5); }
.wf-choice.is-selected { border-color:var(--brand-ink,#006b38); background:var(--brand-softer,#f0faf4); }
.wf-choice input { width:16px; height:16px; flex:none; margin:0; accent-color:var(--action-bg,#078443); }
.wf-choice:has(input:disabled) { cursor:wait; }
.wf-text-preview { padding:14px 16px; border-radius:6px; background:var(--bg-sunken,#ededed); }
.wf-preview-label { display:block; margin-bottom:8px; color:var(--ink-3,#606060); font-size:.8em; }
.wf-text-preview p { display:inline-block; padding:9px 12px; border-radius:5px; background:var(--bubble-other,#ebebeb); color:var(--ink-1,#191919); line-height:1.6; }
.wf-text-preview[data-font="larger"] p { font-size:1.15em; }
.wf-text-preview[data-font="large"] p { font-size:1.3em; }
.wf-toggle-row { display:flex; align-items:center; gap:18px; padding:16px 0 2px; cursor:pointer; }
.wf-toggle-row input { appearance:none; flex:none; width:42px; height:24px; padding:2px; margin:0; border:1px solid var(--line-strong,#d5d5d5); border-radius:20px; background:var(--bg-sunken,#ededed); cursor:pointer; }
.wf-toggle-row input::before { display:block; width:18px; height:18px; border-radius:50%; background:var(--ink-3,#606060); content:''; }
.wf-toggle-row input:checked { background:var(--action-bg,#078443); border-color:transparent; }
.wf-toggle-row input:checked::before { margin-left:18px; background:#fff; }
.wf-toggle-row input:disabled { cursor:wait; opacity:.65; }
.wf-space { position:relative; }
.wf-space-header { display:flex; align-items:center; gap:16px; padding:0 0 18px; border-bottom:1px solid var(--line,#e7e7e7); }
.wf-space-header h2 { font-size:1.15em; font-weight:600; }
.wf-space-header p { margin-top:3px; font-size:.9em; }
.wf-space-header > button { flex:none; }
.wf-space-toolbar { display:flex; gap:8px; padding:18px 0 12px; }
.wf-space-toolbar input { flex:1; }
.wf-space-toolbar button { flex:none; }
.wf-space-note { padding:10px 12px; border-radius:5px; background:var(--bg-sunken,#ededed); color:var(--ink-3,#606060); font-size:.86em; overflow-wrap:anywhere; }
.wf-space-list { margin-top:12px; border-top:1px solid var(--line,#e7e7e7); }
.wf-file-row { display:flex; align-items:center; gap:12px; min-width:0; padding:16px 0; border-bottom:1px solid var(--line,#e7e7e7); }
.wf-file-mark { display:grid; place-items:center; flex:none; width:42px; height:48px; border:1px solid var(--line,#e7e7e7); border-radius:5px; background:var(--bg-sunken,#ededed); color:var(--ink-2,#555); font-size:.7em; font-weight:600; }
.wf-file-name { display:block; font-size:1em; font-weight:500; overflow-wrap:anywhere; }
.wf-file-meta { margin-top:4px !important; color:var(--ink-3,#606060); font-size:.8em; overflow-wrap:anywhere; }
.wf-file-pending { margin-top:5px !important; color:var(--warn,#8c620e); font-size:.8em; }
.wf-file-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.wf-file-row > .wf-file-actions { flex:none; max-width:45%; }
.wf-file-actions .wf-button { padding:6px 10px; font-size:.86em; }
.wf-space-paging { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-top:18px; font-size:.86em; }
.wf-space-page-controls { display:flex; align-items:center; gap:9px; }
.wf-page-number { color:var(--ink-3,#606060); font-variant-numeric:tabular-nums; white-space:nowrap; }
.wf-empty,.wf-loading { padding:40px 18px; text-align:center; color:var(--ink-3,#606060); overflow-wrap:anywhere; }
.wf-empty strong { color:var(--ink-1,#191919); font-weight:500; }
.wf-empty p { margin-top:7px; font-size:.9em; }
.wf-empty button { margin-top:16px; }
.wf-upload-area { padding:14px; margin-top:14px; border:1px solid var(--line-strong,#d5d5d5); border-radius:6px; background:var(--bg-panel,#fff); }
.wf-upload-status { margin-top:5px !important; color:var(--ink-3,#606060); font-size:.9em; overflow-wrap:anywhere; }
.wf-upload-progress { display:block; width:100%; height:6px; margin:12px 0; accent-color:var(--action-bg,#078443); }
.wf-space-dialog-shade { position:fixed; inset:0; z-index:350; display:grid; place-items:center; padding:20px; overflow:auto; overscroll-behavior:contain; background:var(--bg-mask,rgba(0,0,0,.4)); }
.wf-space-dialog { min-width:0; width:min(100%,430px); max-height:calc(100dvh - 40px); overflow:auto; padding:24px; border:1px solid var(--line,#e7e7e7); border-radius:9px; background:var(--bg-panel,#fff); box-shadow:var(--sh-3,0 8px 32px #0003); }
.wf-space-dialog > h3 { margin:0 0 10px; font-size:1.15em; font-weight:600; }
.wf-space-dialog > p { font-size:.93em; }
.wf-space-dialog-fields { margin-top:20px; }
.wf-field-label { display:block; margin-bottom:7px; font-size:.93em; }
.wf-space-dialog-footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; margin-top:24px; }
.wf-effect-card { display:grid; place-items:center; width:80px; height:80px; max-width:100%; padding:0; background:transparent; color:inherit; }
.wf-effect-symbol { font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif; font-size:64px; line-height:1; }
.wf-effect-overlay { position:fixed; inset:0; z-index:250; overflow:hidden; pointer-events:none; contain:strict; }
.wf-effect-overlay canvas { display:block; width:100%; height:100%; pointer-events:none; }
.wf-effect-close { position:absolute; top:max(16px,env(safe-area-inset-top)); right:max(16px,env(safe-area-inset-right)); min-height:44px; padding:8px 14px; border:1px solid var(--line-strong,#d5d5d5); border-radius:6px; background:var(--bg-panel,#fff); color:var(--ink-1,#191919); box-shadow:var(--sh-2,0 2px 12px #0002); font:inherit; font-size:13px; pointer-events:auto; cursor:pointer; }
.wf-effect-still { position:absolute; top:42%; left:50%; transform:translate(-50%,-50%); max-width:calc(100% - 40px); padding:20px 28px; border-radius:10px; background:var(--bg-panel,#fff); color:var(--ink-1,#191919); border:1px solid var(--line,#e7e7e7); font-size:28px; box-shadow:var(--sh-2,0 2px 12px #0002); white-space:nowrap; }
@media (max-width:600px) {
  .wf-file-row { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:start; column-gap:10px; row-gap:10px; }
  .wf-file-row > .wf-file-actions { grid-column:2; max-width:none; }
  .wf-file-actions .wf-button,.wf-button { min-height:44px; }
  .wf-input { min-height:44px; font-size:16px !important; }
  .wf-space-paging { justify-content:center; }
  .wf-space-paging > .wf-muted { flex-basis:100%; text-align:center; }
  .wf-space-dialog { padding:20px; }
  .wf-toggle-row { min-height:64px; }
}
@media (max-width:380px) {
  .wf-choices:not(.wf-choices-stack) { grid-template-columns:minmax(0,1fr); }
  .wf-choice { min-height:44px; }
  .wf-space-header { align-items:flex-start; gap:10px; }
  .wf-space-header > button { padding-inline:10px; }
  .wf-space-toolbar { flex-wrap:wrap; }
  .wf-space-toolbar input { flex-basis:100%; }
  .wf-space-toolbar button { flex:1; }
  .wf-space-dialog-shade { padding:12px; }
  .wf-space-dialog { max-height:calc(100dvh - 24px); }
  .wf-setting-action { padding:12px; }
}
@media (any-pointer:coarse) {
  .wf-button,.wf-choice { min-height:44px; }
}
@media (prefers-reduced-motion:reduce) {
  .wf-panel *,.wf-effect-overlay * { animation:none !important; transition:none !important; scroll-behavior:auto; }
}
