/* LN index.css v1.0 (2026-08-07) — hele hoved-<style>-blokken fra index.html, flyttet UAENDRET (3.2 etape 3). Hoerer sammen med index.html >= v5.148. HUSK: ?v=-bump i index.html ved HVER aendring. */

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body { font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
#board-outer { flex: 1; overflow: auto; background: #dde2e8; position: relative; padding: 24px; min-height: 0; }

/* ── Auth — samme designsprog som projektoversigten (v5.41-designet):
   IBM Plex, lys neutral baggrund, hvidt kort m. hårfin kant og blød
   skygge. Logo + Permanent Marker-wordmark beholdes som brand-anker. ── */
#auth-screen { position: fixed; inset: 0; background: #f7f8fa; display: flex; align-items: center; justify-content: center; z-index: 1000; }
.auth-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 36px 40px 30px; box-shadow: 0 14px 40px -18px rgba(15,23,42,0.22); width: 360px; display: flex; flex-direction: column; gap: 14px; font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif; }
.auth-box h1 { font-family: 'Permanent Marker', cursive; color: #456079; font-size: 26px; margin: 0 0 6px; text-align: center; white-space: nowrap; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label { font-size: 12px; color: #475569; font-weight: 600; letter-spacing: 0.01em; }
.auth-field input { padding: 10px 12px; font-size: 14px; font-family: inherit; border: 1.5px solid #d1d5db; border-radius: 9px; outline: none; background: #fbfcfd; transition: border-color .12s, box-shadow .12s; }
.auth-field input:focus { border-color: #7a99b5; background: #fff; box-shadow: 0 0 0 3px rgba(69,96,121,0.12); }
.auth-btn { background: #456079; color: #fff; border: none; border-radius: 9px; padding: 12px; font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit; letter-spacing: 0.01em; transition: background .12s; }
.auth-btn:hover { background: #3a5268; }
.auth-err { font-size: 13px; color: #dc2626; min-height: 18px; text-align: center; }
.auth-hint { font-size: 11.5px; color: #94a3b8; text-align: center; }
.auth-link { font-size: 13px; color: #456079; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
#server-field label { font-size: 12px; color: #6b7280; display: block; margin-bottom: 3px; }
#server-field input { width: 100%; padding: 6px 10px; font-size: 12px; border: 1px solid #d1d5db; border-radius: 6px; outline: none; }

/* ── Project screen ── */
/* Håndskrift-fontene SELVHOSTET (som mobile.html allerede gør): på den
   offline Pi fejler Google Fonts-linket, og noterne faldt tilbage til
   systemfonte — selvom .ttf-filerne lå synkroniseret på disken via
   callhome. Disse regler står EFTER Google-stylesheetet i dokumentet og
   vinder derfor: lokale filer bruges altid, online som offline. */
@font-face{font-family:'Permanent Marker';src:url('fonts/permanent-marker.ttf') format('truetype');font-display:swap;}
@font-face{font-family:'Caveat';src:url('fonts/caveat.ttf') format('truetype');font-display:swap;}
@font-face{font-family:'Patrick Hand';src:url('fonts/patrick-hand.ttf') format('truetype');font-display:swap;}
@font-face{font-family:'Indie Flower';src:url('fonts/indie-flower.ttf') format('truetype');font-display:swap;}
@font-face{font-family:'Architects Daughter';src:url('fonts/architects-daughter.ttf') format('truetype');font-display:swap;}
@font-face{font-family:'IBM Plex Sans';font-weight:400;src:url('fonts/ibm-plex-sans-400.woff2') format('woff2');font-display:swap;}
@font-face{font-family:'IBM Plex Sans';font-weight:500;src:url('fonts/ibm-plex-sans-500.woff2') format('woff2');font-display:swap;}
@font-face{font-family:'IBM Plex Sans';font-weight:600;src:url('fonts/ibm-plex-sans-600.woff2') format('woff2');font-display:swap;}
@font-face{font-family:'IBM Plex Sans';font-weight:700;src:url('fonts/ibm-plex-sans-700.woff2') format('woff2');font-display:swap;}
@font-face{font-family:'IBM Plex Mono';font-weight:400;src:url('fonts/ibm-plex-mono-400.woff2') format('woff2');font-display:swap;}
/* Faraday-branding (satellit): Space Grotesk til wordmark, Space Mono til
   status-tags — jf. claude/FARADAY-branding.md. Selvhostet (offline!). */
@font-face{font-family:'Space Grotesk';font-weight:500;src:url('fonts/space-grotesk-500.woff2') format('woff2');font-display:swap;}
@font-face{font-family:'Space Grotesk';font-weight:700;src:url('fonts/space-grotesk-700.woff2') format('woff2');font-display:swap;}
@font-face{font-family:'Space Mono';font-weight:400;src:url('fonts/space-mono-400.woff2') format('woff2');font-display:swap;}
#project-screen { display: none; flex-direction: column; height: 100%; background: #f7f8fa; font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif; }
#project-header { background: #fff; border-bottom: 1px solid #e6e8ee; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
#project-header h2 { font-family: 'Permanent Marker', cursive; color: #456079; font-size: 21px; white-space: nowrap; font-weight: 400; }
#search-wrap { position: relative; flex: 1; max-width: 420px; }
#search-input { width: 100%; height: 38px; padding: 0 14px 0 32px; border: 1px solid #e2e5eb; border-radius: 9px; font-size: 14px; font-family: inherit; outline: none; background: #fafbfc; color: #353a45; }
#search-input:focus { border-color: #7a99b5; background: #fff; }
#search-wrap::before { content: '🔍'; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; pointer-events: none; }
#new-project-btn { background: #456079; color: #fff; border: none; border-radius: 9px; height: 38px; padding: 0 16px; font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer; margin-left: auto; white-space: nowrap; }
#new-project-btn:hover { background: #34495c; }
#pj-chip { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid #e6e8ee; }
#pj-avatar { width: 32px; height: 32px; border-radius: 50%; background: #5b7a99; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; flex-shrink: 0; }
#pj-user { font-size: 13px; font-weight: 600; color: #353a45; white-space: nowrap; line-height: 1.25; }
#pj-company { font-size: 11.5px; color: #8d93a3; line-height: 1.25; }
#pj-logout { background: none; border: none; color: #8d93a3; font-size: 12.5px; cursor: pointer; font-family: inherit; }
#pj-logout:hover { color: #353a45; }
#projects-heading { display: flex; align-items: baseline; gap: 12px; padding: 26px 32px 0; max-width: 1400px; margin: 0 auto; width: 100%; }
#projects-heading h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: #23272f; }
#project-count { font-size: 13px; color: #8d93a3; }
#project-grid { flex: 1; padding: 18px 32px 32px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-content: start; max-width: 1400px; margin: 0 auto; width: 100%; }
/* v5.139 fase 1: firma-sektioner i projektlisten (konsulent-scenariet) */
.company-section-header { grid-column: 1 / -1; font-family: 'Permanent Marker', cursive; font-size: 15px; color: #456079; padding: 12px 2px 4px; border-bottom: 1.5px solid #e6e8ee; cursor: pointer; user-select: none; }
.company-section-header:hover { color: #7a99b5; }
.csh-count { font-family: sans-serif; font-size: 11.5px; color: #9ca3af; font-weight: 400; }
/* v5.141 fase 3: engagement-undergrupper i projektlisten */
.engagement-subheader { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: #9ca3af; padding: 6px 2px 0; text-transform: uppercase; }
.project-card { background: #fff; border: 1px solid #e6e8ee; border-radius: 11px; padding: 14px 15px; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s; position: relative; display: flex; flex-direction: column; gap: 2px; }
.project-card:hover { box-shadow: 0 4px 14px -8px rgba(60,70,110,0.3); border-color: #d3d8e2; }
.project-card.empty-slot { background: transparent; border: 2px dashed #d9dde5; box-shadow: none; display: flex; align-items: center; justify-content: center; color: #a0a6b4; font-size: 28px; min-height: 64px; }
.project-card.empty-slot:hover { border-color: #7a99b5; color: #7a99b5; }
.project-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; color: #23272f; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.project-card-top { display: flex; align-items: center; gap: 8px; }
/* v5.138: badge paa projekter fra et andet firma (konsulent-scenariet) */
.company-badge { background: #e0eaf4; color: #456079; font-size: 10px; font-weight: 700; letter-spacing: 0.4px; padding: 2px 7px; border-radius: 9px; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.project-meta { font-size: 11.5px; font-family: 'IBM Plex Mono', ui-monospace, monospace; color: #8d93a3; margin-top: 2px; }
.project-del { background: none; border: none; border-radius: 6px; width: 26px; height: 26px; font-size: 13px; cursor: pointer; color: #a0a6b4; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.project-del:hover { color: #c0392b; background: #faeceb; }
.project-send-pi { position: relative; background: none; border: none; border-radius: 6px; width: 26px; height: 26px; font-size: 14px; cursor: pointer; color: #6a7080; line-height: 1; padding: 0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.project-send-pi:hover { color: #456079; background: #eef1f5; }
.project-send-pi.pi-pending { color: #d97706; }
.project-send-pi.pi-applied { color: #059669; }
.project-send-pi.pi-conflict { color: #dc2626; }
.project-send-pi::after { content: ''; position: absolute; bottom: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.project-send-pi.pi-pending::after { background: #f59e0b; }
.project-send-pi.pi-applied::after { background: #10b981; }
.project-send-pi.pi-conflict::after { background: #ef4444; }
/* Floating toast that anchors near the element that triggered it — used for
   Pi send feedback so the user sees the outcome next to the button they
   clicked (rather than in the top status bar). */
.pi-toast { position: absolute; z-index: 10000; background: #1f2937; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,0.25); pointer-events: none; opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.pi-toast.show { opacity: 1; }
.pi-toast.err { background: #b91c1c; }
.pi-toast.ok  { background: #059669; }
.role-badge { font-size: 9.5px; background: #eef1f7; color: #456079; border-radius: 5px; padding: 2px 7px; font-weight: 600; letter-spacing: 0.04em; flex-shrink: 0; }
#no-results { display: none; padding: 40px; text-align: center; color: #9ca3af; font-size: 14px; width: 100%; }

/* ── Modals ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 500; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 26px 28px; box-shadow: 0 18px 50px -20px rgba(15,23,42,0.35); width: 380px; display: flex; flex-direction: column; gap: 12px; max-height: 90vh; overflow-y: auto; }
.modal-box h3 { font-size: 16.5px; font-weight: 600; color: #1f2937; letter-spacing: -0.005em; margin: 0 0 2px; }
.modal-box input, .modal-box select { width: 100%; padding: 9px 12px; font-size: 14px; font-family: inherit; border: 1.5px solid #d1d5db; border-radius: 9px; outline: none; background: #fbfcfd; }
.modal-box input:focus, .modal-box select:focus { border-color: #7a99b5; background: #fff; box-shadow: 0 0 0 3px rgba(69,96,121,0.12); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.btn-cancel { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 7px 16px; cursor: pointer; font-size: 13.5px; font-family: inherit; color: #374151; }
.btn-cancel:hover { background: #f3f4f6; }
.btn-primary { background: #456079; color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; letter-spacing: 0.01em; }
.btn-primary:hover { background: #3a5268; }
.btn-danger { background: #ef4444; color: #fff; border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.modal-err { font-size: 12px; color: #c0392b; min-height: 16px; }
.member-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.member-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.member-row:last-child { border-bottom: none; }
.member-role { font-size: 10px; background: #f3f4f6; border-radius: 4px; padding: 2px 6px; color: #6b7280; margin-left: auto; }
.member-role.owner { background: #fef9c3; color: #456079; }
.add-member-row { display: flex; gap: 6px; }
.add-member-row select { flex: 1; }
.section-label { font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Menu bar ── */
/* ── Board screen ── */
#board-screen { display: none; flex-direction: column; flex: 1; min-height: 0; }
#board-toolbar { background: #fff; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; }
#menubar { display: flex; align-items: center; gap: 0; padding: 0 10px; height: 44px; border-bottom: 1px solid #f0f0f0; }
#board-title-wrap { display: flex; align-items: center; gap: 8px; padding: 0 8px; border-right: 1px solid #e5e7eb; margin-right: 4px; }
#back-btn { background: none; border: none; padding: 4px 8px; font-size: 13px; cursor: pointer; color: #374151; border-radius: 5px; white-space: nowrap; }
#back-btn:hover { background: #f3f4f6; }
#board-title { font-family: 'Permanent Marker', cursive; color: #456079; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
/* v5.70: status-teksten er taget UD af menubarens layoutflow. Før:
   når den dukkede op (fx "Project locked"), voksede dens bredde inde i
   flex-rækken og skubbede menu-knapperne — en åben dropdown (forankret
   til sin knap) "hoppede til siden", værst ved halv vinduesbredde, og
   hoppede tilbage når teksten forsvandt efter 3 s. Nu: fast pille
   nederst til højre — påvirker intet layout. Højre knapgruppe har sin
   egen margin-left:auto, så justeringen består. */
#save-status { position: fixed; right: 12px; bottom: 12px; z-index: 9500; font-size: 11px; font-family: 'IBM Plex Mono', monospace; color: #9ca3af; background: rgba(30,41,59,0.07); padding: 3px 10px; border-radius: 12px; white-space: nowrap; pointer-events: none; }
#save-status:empty { display: none; }

/* Menu items */
.menu-item { position: relative; }
.menu-trigger { display: flex; align-items: center; gap: 4px; padding: 0 11px; height: 32px; background: none; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-family: inherit; color: #374151; cursor: pointer; white-space: nowrap; margin: 0 1px; transition: background .1s, border-color .1s; }
.menu-trigger:hover { background: #f3f4f6; color: #1f2937; }
.menu-trigger.open { background: #eef1f5; color: #456079; border-color: #d1d5db; }
.menu-trigger .arrow { font-size: 9px; color: #9ca3af; }
.menu-dropdown { display: none; position: absolute; top: 100%; left: 0; background: #fff; border-radius: 10px; box-shadow: 0 12px 32px -8px rgba(15,23,42,0.25); min-width: 220px; z-index: 8000; border: 1px solid #e5e7eb; padding: 5px 0; }
.menu-dropdown.open { display: block; }
.menu-dropdown.right { left: auto; right: 0; }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; color: #334155; cursor: pointer; white-space: nowrap; transition: background 0.1s; }
.dd-submenu-wrap { position: relative; }
.dd-submenu { display: none; position: absolute; top: -4px; right: 100%; background: #fff; border-radius: 10px; box-shadow: 0 12px 32px -8px rgba(15,23,42,0.25); min-width: 230px; z-index: 9000; border: 1px solid #e5e7eb; padding: 5px 0; max-height: 70vh; overflow-y: auto; }
.dd-submenu-wrap:hover .dd-submenu { display: block; }
.dd-item:hover { background: #f3f4f6; }
.dd-item.danger { color: #c0392b; }
.dd-item.danger:hover { background: #fef2f2; }
.dd-item.disabled { opacity: 0.4; pointer-events: none; }
.dd-sep { height: 1px; background: #eee; margin: 3px 0; }
.dd-label { padding: 4px 16px 2px; font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: 0.06em; }
.dd-icon { font-size: 15px; width: 20px; text-align: center; }
.dd-shortcut { margin-left: auto; font-size: 11px; color: #9ca3af; }

/* Note size buttons */
.note-size-btns { display: flex; gap: 6px; padding: 6px 12px; }
.note-size-btn { background: #fef08a; border: 1.5px solid #7a99b5; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; font-size: 10px; color: #456079; font-weight: 600; transition: background 0.1s; }
.note-size-btn:hover { background: #fcd34d; }

/* Bg swatches inline */
.dd-bg-row { display: flex; gap: 8px; padding: 6px 16px 8px; }
.dd-bg-swatch { width: 26px; height: 26px; border-radius: 5px; border: 2px solid #d1d5db; cursor: pointer; flex-shrink: 0; }
.dd-bg-swatch:hover { border-color: #456079; }
.dd-bg-swatch.active { border-color: #456079; border-width: 2.5px; }

/* Format inline */
.dd-format-row { display: flex; gap: 6px; padding: 6px 16px 8px; align-items: center; }
.dd-format-row select { border: 1px solid #d1d5db; border-radius: 5px; padding: 4px 6px; font-size: 12px; background: #f9fafb; outline: none; cursor: pointer; }

/* Zoom inline */
.dd-zoom-row { display: flex; gap: 6px; padding: 6px 16px 8px; align-items: center; }
.dd-zoom-btn { background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 5px; width: 28px; height: 28px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dd-zoom-btn:hover { background: #e5e7eb; }
#zoom-label { font-size: 12px; color: #6b7280; min-width: 42px; text-align: center; }

/* Page tabs bar */
#page-bar { display: none; }
.page-tab { display: flex; align-items: center; gap: 5px; padding: 8px 14px; font-size: 13px; cursor: pointer; color: #6b7280; border-bottom: 2.5px solid transparent; white-space: nowrap; transition: color 0.1s; flex-shrink: 0; }
.page-tab:hover { color: #374151; background: #f1f5f9; }
.page-tab.active { color: #456079; border-bottom-color: #456079; font-weight: 600; background: #fff; }
.page-tab-name { outline: none; background: transparent; border: none; font-size: 13px; font-family: inherit; color: inherit; font-weight: inherit; cursor: pointer; min-width: 40px; max-width: 140px; }
.page-tab.active .page-tab-name { cursor: text; }
.page-tab-del { font-size: 11px; color: #d1d5db; background: none; border: none; cursor: pointer; padding: 0 2px; line-height: 1; }
.page-tab-del:hover { color: #ef4444; }
#add-page-btn { padding: 6px 12px; font-size: 18px; color: #9ca3af; background: none; border: none; cursor: pointer; flex-shrink: 0; }
#add-page-btn:hover { color: #456079; }

/* Board */
#board { position: absolute; top: 0; left: 0; background: #fff; background-size: cover; background-position: center; box-shadow: 0 4px 24px rgba(0,0,0,0.3); transform-origin: top left; }
.page-shadow { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
#rubber-band { position: absolute; border: 2px solid #456079; background: rgba(69,96,121,0.08); pointer-events: none; z-index: 9999; display: none; }
.hint { position: absolute; bottom: 10px; right: 14px; font-family: sans-serif; font-size: 11px; color: rgba(0,0,0,0.18); pointer-events: none; }

/* Notes */
.note { position: absolute; border-radius: 2px; box-shadow: 4px 5px 14px rgba(0,0,0,0.22); cursor: grab; overflow: hidden; outline: none; }
.note.selected, .note.multi-selected { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f59e0b, 4px 6px 16px rgba(0,0,0,0.35) !important; }
/* v5.129: red pulse when clicking a note you can't edit (mirrors mobile's red tap-ring).
   Uses outline so it doesn't fight the selection ring's box-shadow !important. */
@keyframes ln-denied-pulse { 0% { outline: 3px solid rgba(220,38,38,1); outline-offset: 0px; } 100% { outline: 3px solid rgba(220,38,38,0); outline-offset: 8px; } }
.note.denied-pulse { animation: ln-denied-pulse 0.45s ease-out; }
.note.locked { cursor: default; }
.note.locked::after { content: '🔒'; position: absolute; bottom: 3px; left: 5px; font-size: 9px; opacity: 0.4; pointer-events: none; }
.note.rotating { cursor: crosshair; }
.note-inner { position: absolute; inset: 0; padding: 8px; color: #3b2a00; line-height: 1.35; word-break: break-word; overflow: hidden; outline: none; cursor: grab; white-space: pre-wrap; }
.note-inner[contenteditable="true"] { cursor: text; user-select: text; }
.note-inner:empty:not(:focus)::before { content: attr(data-placeholder); color: rgba(120,80,0,0.35); pointer-events: none; }
.note-has-image .note-inner:empty:not(:focus)::before { content: none; }
.note-img-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; background-repeat: no-repeat; background-position: center; }
/* Subtle loading shimmer for notes whose image is being lazy-loaded */
.note-has-image-loading {
  background-image: linear-gradient(110deg, rgba(255,255,255,0.4) 8%, rgba(255,255,255,0.6) 18%, rgba(255,255,255,0.4) 33%);
  background-size: 200% 100%;
  animation: lnImgShimmer 1.4s ease-in-out infinite;
}
@keyframes lnImgShimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }
.note-img-btn { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 4px; background: rgba(0,0,0,0.15); border: none; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s; z-index: 3; color: #fff; }
.note:hover .note-img-btn { opacity: 1; }
.note-img-input { display: none; }
.note-has-image .note-inner { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.note-meta { position: absolute; bottom: 4px; right: 6px; font-size: 9px; color: rgba(100,60,0,0.35); font-family: sans-serif; pointer-events: none; white-space: nowrap; line-height: 1.2; text-align: right; }
.note-has-image .note-meta { color: rgba(255,255,255,0.6); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
/* Vote dots — three colours (green/red/blue) shown side by side in a small
   container at the bottom-right of each note. Each shows the count of votes
   in that colour, or is dimmed if zero. Left-click cycles blank→green→red→
   blue→blank; right-click on a dot opens an explicit colour picker. Legacy
   .note-vote CSS below is kept only for the container element. */
.note-vote { position: absolute; bottom: 4px; right: 4px; display: none; align-items: center; gap: 3px; z-index: 2; user-select: none; }
body.voting-mode .note-vote { display: flex; }
/* Person voting mode: reserve 52px at the bottom of the presentation screen
   for the name panel. Only applied on the presentation client (not the owner's
   laptop) — the CSS class is only added there. */
body.person-voting-active { padding-bottom: 40px; }
body.person-voting-active #board-wrap { margin-bottom: 40px; }
.pv-name-btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 80px; padding: 0 11px; background: #fff; border: 1px solid #cbd5e1; border-radius: 5px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; user-select: none; transition: transform 0.08s, background 0.15s; touch-action: manipulation; }
.pv-name-btn:active { transform: scale(0.97); }
.pv-name-btn.active { background: #2563eb; color: #fff; border-color: #1d4ed8; box-shadow: 0 2px 8px rgba(37,99,235,0.35); }
.note-vote-dot { width: 16px; height: 16px; border-radius: 50%; font-size: 9px; font-weight: 700; font-family: sans-serif; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1.5px solid; transition: transform 0.1s; color: #fff; line-height: 1; }
.note-vote-dot:hover { transform: scale(1.2); }
.note-vote-dot.dim { opacity: 0.35; }
.note-vote-dot.mine { box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 0 3.5px #1e293b; }
.note-vote-dot.green { background: #16a34a; border-color: #15803d; }
.note-vote-dot.red   { background: #dc2626; border-color: #b91c1c; }
.note-vote-dot.blue  { background: #2563eb; border-color: #1d4ed8; }
.vote-picker { position: fixed; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,0.18); padding: 6px; display: flex; gap: 6px; z-index: 10000; }
.vote-picker .vp-swatch { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.vote-picker .vp-swatch:hover { border-color: #1e293b; }
.vote-picker .vp-swatch.green { background: #16a34a; }
.vote-picker .vp-swatch.red   { background: #dc2626; }
.vote-picker .vp-swatch.blue  { background: #2563eb; }
.vote-picker .vp-swatch.clear { background: #f1f5f9; color: #64748b; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.note-group { position: absolute; border: none; border-radius: 10px; background: rgba(91,122,153,0.12); z-index: 2; pointer-events: none; }
.note-group.group-selected { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f59e0b; }
.note-group-drag { pointer-events: all; position: absolute; inset: 0; cursor: grab; background: transparent; }
.note-group-drag:active { cursor: grabbing; }
.note { position: absolute; border-radius: 2px; box-shadow: 4px 5px 14px rgba(0,0,0,0.22); z-index: 100; cursor: grab; overflow: hidden; outline: none; transition: box-shadow 0.1s; }
.note-group-label { position: absolute; top: -22px; left: 6px; font-family: 'Permanent Marker', cursive; font-size: 12px; color: #456079; background: #fff; padding: 2px 8px; border-radius: 4px; border: 1.5px solid #7a99b5; cursor: text; pointer-events: all; outline: none; white-space: nowrap; min-width: 40px; }
.note-group-label:hover { background: #fef9c3; border-color: #456079; }
.note-group-label:focus { background: #fef9c3; border-color: #456079; box-shadow: 0 0 0 2px rgba(120,53,15,0.15); }
.ctx-menu { position: fixed; z-index: 9999; background: #fff; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,0.18); padding: 5px 0; min-width: 185px; font-family: sans-serif; font-size: 14px; border: 0.5px solid rgba(0,0,0,0.1); }
.ctx-item { padding: 9px 18px; cursor: pointer; display: flex; align-items: center; gap: 10px; color: #222; transition: background 0.1s; white-space: nowrap; }
.ctx-item:hover { background: #f5f5f5; }
.ctx-item.danger { color: #c0392b; }
.ctx-item.danger:hover { background: #fef2f2; }
.ctx-item.on { background: #fef9c3; font-weight: 600; }
.ctx-item.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.ctx-sep { height: 1px; background: #eee; margin: 4px 0; }
.ctx-label { padding: 5px 18px 2px; font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.06em; }
.color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #ccc; cursor: pointer; padding: 0; flex-shrink: 0; transition: transform 0.1s; }
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: #333 !important; border-width: 2.5px; }
.rotate-indicator { position: fixed; z-index: 99999; pointer-events: none; background: rgba(0,0,0,0.72); color: #fff; font-family: sans-serif; font-size: 12px; padding: 5px 11px; border-radius: 20px; transform: translate(-50%,-140%); white-space: nowrap; }
.kbd { background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 5px; padding: 2px 6px; font-size: 11px; color: #374151; }

/* Move modal */
#move-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 600; align-items: center; justify-content: center; }
#move-overlay.open { display: flex; }
#move-modal { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); width: 320px; max-height: 480px; display: flex; flex-direction: column; gap: 12px; }
#move-modal h3 { font-family: 'Permanent Marker', cursive; color: #456079; font-size: 17px; }
#move-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.move-item { padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 8px; cursor: pointer; font-size: 14px; color: #374151; transition: background 0.1s; }
.move-item:hover { background: #fef9c3; border-color: #7a99b5; }
.move-item-sub { font-size: 11px; color: #9ca3af; }

/* Page nav overlay hint */
#page-nav-hint { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: #fff; font-size: 12px; padding: 6px 14px; border-radius: 20px; pointer-events: none; z-index: 9999; opacity: 0; transition: opacity 0.3s; }
#page-nav-hint.show { opacity: 1; }
#inbox-panel { position: fixed; top: 90px; left: 16px; z-index: 8500; background: #fff; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); border: 1.5px solid #e5e7eb; min-width: 130px; max-width: 160px; display: none; }
#inbox-panel.has-notes { display: block; }
#inbox-header { padding: 7px 10px; font-size: 11px; font-weight: 700; color: #456079; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 6px; }
#inbox-count { background: #ef4444; color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 10px; }
#inbox-list { padding: 5px; display: flex; flex-direction: column; gap: 3px; max-height: 360px; overflow-y: auto; }
.inbox-group { border-radius: 5px; background: #f8fafc; border: 1px solid #e5e7eb; overflow: hidden; }
.inbox-group-header { padding: 4px 8px; font-size: 11px; color: #334155; display: flex; align-items: center; justify-content: space-between; cursor: default; user-select: none; gap: 6px; }
.inbox-group-header .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
.inbox-group-header .count { background: #cbd5e1; color: #1e293b; border-radius: 9px; padding: 0 5px; font-size: 10px; min-width: 14px; text-align: center; flex-shrink: 0; }
.inbox-group-notes { display: none; padding: 3px 5px 5px; flex-direction: column; gap: 3px; }
.inbox-group:hover .inbox-group-notes,
.inbox-group.expanded .inbox-group-notes { display: flex; }
.inbox-note { border-radius: 5px; padding: 4px 6px; cursor: pointer; word-break: break-word; box-shadow: 1px 1px 3px rgba(0,0,0,0.08); font-size: 10px; }
.inbox-note:hover { filter: brightness(0.95); }
.inbox-note-text { color: #3b2a00; line-height: 1.25; max-height: 40px; overflow: hidden; }
