body{width:100%;height:100%;margin:0;font-family:Arial,sans-serif;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#canvas{width:100vw;height:100vh;display:block}.toolbar{position:fixed;top:12px;left:50%;transform:translate(-50%);background:#fff;padding:6px;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 2px 8px #0000001f;display:flex;gap:4px;align-items:center;z-index:999}.toolbar-section{display:flex;gap:4px}.toolbar-divider{width:1px;height:32px;background:#e0e0e0;margin:0 8px}.color-picker-container{position:relative;display:inline-block}.color-swatches{display:flex;gap:8px}.swatch{width:32px;height:32px;border:2px solid #ddd;border-radius:50%;cursor:pointer;padding:0;transition:all .2s;display:flex;align-items:center;justify-content:center;position:relative;background:#fff}.swatch-circle{border-radius:50%;transition:all .2s}.swatch:hover{border-color:#666;transform:scale(1.05)}.swatch.active{border-color:gray;border-width:3px}.color-menu{position:absolute;top:50px;left:0;background:#fff;border:1px solid #ddd;border-radius:8px;padding:12px;box-shadow:0 4px 12px #00000026;z-index:1000}.color-menu.hidden{display:none}.color-menu input[type=color]{width:100%;height:40px;border:1px solid #ddd;border-radius:4px;cursor:pointer;margin-bottom:10px}.color-grid{display:grid;grid-template-columns:repeat(6,30px);gap:6px}.color-option{width:30px;height:30px;border:1px solid #ddd;cursor:pointer;border-radius:3px;transition:all .2s}.color-option:hover{border-color:#333;transform:scale(1.1)}.brush-size-control{margin-bottom:10px;padding:8px;border-radius:4px}.brush-size-control label{display:block;font-size:12px;color:#666;margin-bottom:6px}.brush-size-control input[type=range]{width:100%;cursor:pointer}.tool-btn,.icon-btn{width:32px;height:32px;border:none;background:transparent;border-radius:6px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;padding:0}.tool-btn.active{background:gray;color:#fff}.icon-btn:disabled{color:#ccc;cursor:not-allowed;opacity:.4}.invite-link{position:fixed;top:12px;right:1%;background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 2px 8px #0000001f;z-index:1000;transition:all .2s ease;cursor:pointer}.invite-link button{background:none;color:inherit;padding:12px;border:none;font-weight:600;cursor:pointer;width:100%;text-align:center;transition:inherit}.invite-link:hover{background:gray;color:#fff}.createSession-overlay{display:none;position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:1000;background-color:#00000026}.createSession-container{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:2rem;justify-content:center;background:#fff;box-shadow:0 4px 12px #00000026;border-radius:10px;flex-direction:column;align-items:center;min-width:300px}.createSession-container h1{font-size:1.618rem;font-weight:600;margin:0 0 .5rem;color:#1a1a1a}.createSession-container p{color:#666;text-align:center;margin:0 0 1.5rem;font-size:1rem;line-height:1.4}.createSession-settings{background:#f8f9fa;border-radius:8px;padding:1.5rem;margin-bottom:1.5rem}.option{display:flex;justify-content:space-between;align-items:flex-start;padding:1.25rem 0;border-bottom:1px solid #e9ecef;position:relative}.option:last-child{border-bottom:none}.option-content{flex:1;display:flex;flex-direction:column;margin-right:1rem}.option-header{display:flex;align-items:center;margin-bottom:4px}.option-label{font-weight:600;color:#1a1a1a;font-size:.95rem}.optional-tag{background:#e9ecef;color:#6c757d;padding:2px 8px;border-radius:10px;font-size:.7rem;margin-left:8px;font-weight:500}.option-description{font-size:.8rem;color:#666;line-height:1.4;margin-top:2px}.info-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;background:#6c757d;color:#fff;border-radius:50%;font-size:.7rem;margin-left:8px;cursor:help;position:relative;font-style:italic;font-weight:700}.info-icon:hover:after{content:attr(data-tooltip);position:absolute;bottom:100%;left:50%;transform:translate(-50%);background:#333;color:#fff;padding:.75rem;border-radius:8px;font-size:.8rem;width:250px;z-index:1000;margin-bottom:8px;box-shadow:0 4px 12px #00000026;line-height:1.4;font-weight:400}.info-icon:hover:before{content:"";position:absolute;bottom:100%;left:50%;transform:translate(-50%);border:6px solid transparent;border-top-color:#333;margin-bottom:-4px}.option input[type=checkbox]{width:20px;height:20px;border:2px solid #ddd;border-radius:4px;appearance:none;-webkit-appearance:none;cursor:pointer;position:relative;flex-shrink:0;margin-top:2px}.password-input{width:100%;padding:.5rem;border:1px solid #ddd;border-radius:4px;font-size:.9rem;margin-top:.5rem;transition:border-color .2s}.password-input:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 2px #007bff1a}.password-input:disabled{background-color:#f8f9fa;color:#6c757d;cursor:not-allowed}.password-option{flex-direction:column;align-items:stretch}.password-toggle{display:flex;justify-content:space-between;align-items:flex-start;width:100%;margin-bottom:.5rem}.option input[type=checkbox]:checked{background-color:#007bff;border-color:#007bff}.option input[type=checkbox]:checked:after{content:"✓";position:absolute;color:#fff;font-size:12px;top:50%;left:50%;transform:translate(-50%,-50%)}.createSession-container button{width:100%;padding:.75rem;background:#007bff;color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:500;cursor:pointer;transition:background-color .2s}.createSession-container button:hover{background:#0056b3}.invite-notification{position:fixed;top:60px;left:50%;background:#4caf50;color:#fff;padding:12px 16px;border-radius:8px;box-shadow:0 4px 12px #00000026;font-size:14px;font-weight:500;z-index:1001;opacity:0;transform:translate(-50%,-10px);transition:all .3s ease;pointer-events:none}.invite-notification.show{opacity:1;transform:translate(-50%)}.invite-notification.error{background:#f44336}.invite-notification.warning{background:#ff9800}.invite-notification.info{background:#2196f3}.connection-status{position:fixed;bottom:20px;right:20px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #0000001f;font-size:13px;font-weight:500;z-index:1000;transition:all .3s ease}.status-dot{width:8px;height:8px;border-radius:50%;transition:background-color .3s ease}.status-text{-webkit-user-select:none;user-select:none}.status-connected .status-dot{background:#4caf50;animation:pulse-green 2s ease-in-out infinite}.status-connected .status-text{color:#4caf50}.status-disconnected .status-dot{background:#9e9e9e}.status-disconnected .status-text{color:#9e9e9e}.status-error .status-dot{background:#f44336;animation:pulse-red 1s ease-in-out infinite}.status-error .status-text{color:#f44336}.status-local .status-dot{background:#2196f3}.status-local .status-text{color:#2196f3}.status-connecting .status-dot{background:#ff9800;animation:pulse-orange 1.5s ease-in-out infinite}.status-connecting .status-text{color:#ff9800}@keyframes pulse-green{0%,to{opacity:1}50%{opacity:.5}}@keyframes pulse-red{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.3)}}@keyframes pulse-orange{0%,to{opacity:1}50%{opacity:.5}}.join-room-dialog-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn .2s ease}.join-room-dialog{background:#fff;padding:32px;border-radius:12px;box-shadow:0 8px 32px #0003;max-width:400px;width:90%;animation:slideUp .3s ease}.join-room-dialog h2{margin:0 0 16px;font-size:24px;color:#333}.join-room-dialog p{margin:0 0 12px;color:#666;font-size:14px;line-height:1.6}.join-room-dialog p strong{color:#2196f3;font-weight:600}.join-room-actions{display:flex;gap:12px;margin-top:24px}.join-room-btn{flex:1;padding:12px 24px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.join-btn{background:#2196f3;color:#fff}.join-btn:hover{background:#1976d2;transform:translateY(-1px);box-shadow:0 2px 8px #2196f34d}.stay-local-btn{background:#f5f5f5;color:#666}.stay-local-btn:hover{background:#e0e0e0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}
