.world-book-editor{width:100%!important;height:100%!important;max-width:100%!important;margin:0!important;display:flex!important;flex-direction:column!important;background-color:var(--theme-bg-primary,#ffffff)!important;position:relative!important;overflow:hidden!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif!important;justify-content:flex-start!important;align-items:stretch!important;flex:1 1 auto;min-height:0}@media (min-width:1024px){.world-book-editor{max-width:100%;margin:0;border-left:none;border-right:none;box-shadow:none}}@media (min-width:768px) and (max-width:1023px){.world-book-editor{max-width:100%;margin:0;border-left:none;border-right:none}}.editor-header{z-index:15;flex-shrink:0;padding:15px 20px;background:var(--theme-header-gradient,var(--theme-header-bg,rgba(247,247,247,.95)))!important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--theme-border-color,#e8eaed)!important;display:flex;justify-content:space-between;align-items:center;font-size:18px;font-weight:600;position:relative;box-shadow:var(--theme-shadow-light,0 1px 3px rgba(0,0,0,.1))!important;color:var(--theme-text-primary,#202124)}@media (max-width:767px){.editor-header{padding:12px 15px;font-size:16px}.back-btn{margin-left:-4px;margin-right:6px}.world-book-editor{height:100%!important;min-height:0}}@media (max-width:480px){.editor-header{padding:10px 12px;font-size:15px}.back-btn{margin-left:-2px;margin-right:4px}}.back-btn{background:transparent;border:none;color:var(--theme-text-primary);cursor:pointer;padding:8px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease}.back-btn:active,.back-btn:hover{background:var(--theme-bg-tertiary)}.back-btn:active{transform:scale(.95)}.back-btn svg{width:20px;height:20px}.editor-title{color:var(--theme-text-primary);font-size:18px;font-weight:600;margin:0;flex:1}.wb-save-btn{background:var(--theme-accent-color);color:white;border:none;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;min-width:60px;white-space:nowrap}.wb-save-btn:hover:not(:disabled){background:var(--theme-accent-color-hover,var(--theme-accent-color));transform:translateY(-1px)}.wb-save-btn:active:not(:disabled){transform:translateY(0);background:var(--theme-accent-color)}.wb-save-btn.saving,.wb-save-btn:disabled{opacity:.6;cursor:not-allowed;transform:none}.editor-header .wb-cancel-btn{background:transparent;color:var(--theme-text-secondary);border:1px solid var(--theme-border-color);border-radius:6px;padding:8px 16px;font-size:14px;cursor:pointer;transition:all .2s ease;min-width:60px;white-space:nowrap}.editor-header .wb-cancel-btn:hover{background:var(--theme-bg-tertiary);color:var(--theme-text-primary)}.editor-header .wb-cancel-btn:active{transform:scale(.98)}.editor-content{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:20px}@media (max-width:767px){.editor-content{padding:16px 15px;gap:16px}}@media (max-width:480px){.editor-content{padding:12px;gap:12px}}.form-group{display:flex;flex-direction:column;gap:8px}.content-group{flex:0 0 auto;min-height:0}.content-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.form-label{color:var(--theme-text-primary);font-size:14px;font-weight:500}.expand-editor-btn{background:var(--theme-bg-tertiary);border:1px solid var(--theme-border-color);border-radius:6px;padding:6px 12px;color:var(--theme-text-secondary);cursor:pointer;display:flex;align-items:center;gap:6px;font-size:13px;transition:all .2s ease;white-space:nowrap}.expand-editor-btn:hover{background:var(--theme-bg-secondary);color:var(--theme-text-primary);border-color:var(--theme-accent-color)}.expand-editor-btn:active{transform:scale(.98)}.expand-editor-btn svg{flex-shrink:0}.required{color:#ef4444}.world-book-category-input,.world-book-description-input,.world-book-name-input{background:var(--theme-bg-secondary);border:1px solid var(--theme-border-color);border-radius:8px;padding:12px;color:var(--theme-text-primary);font-size:16px;transition:border-color .2s ease}.world-book-category-input:focus,.world-book-description-input:focus,.world-book-name-input:focus{outline:none;border-color:var(--theme-accent-color)}.world-book-content-textarea{background:var(--theme-bg-secondary);border:1px solid var(--theme-border-color);border-radius:8px;padding:12px;color:var(--theme-text-primary);font-size:14px;line-height:1.5;resize:vertical;flex:0 0 auto;height:auto;min-height:200px;max-height:70vh;box-sizing:border-box;font-family:inherit;transition:border-color .2s ease}.world-book-content-textarea:focus{outline:none;border-color:var(--theme-accent-color)}@media (max-width:767px){.world-book-category-input,.world-book-description-input,.world-book-name-input{font-size:16px;padding:12px}.world-book-content-textarea{font-size:16px;min-height:150px;padding:12px;max-height:65vh}.expand-editor-btn{padding:5px 10px;font-size:12px;gap:4px}.expand-editor-btn svg{width:14px;height:14px}}@media (max-width:480px){.world-book-category-input,.world-book-description-input,.world-book-name-input{font-size:16px;padding:10px}.world-book-content-textarea{font-size:16px;min-height:120px;padding:10px;max-height:60vh}}.world-book-category-input.error,.world-book-content-textarea.error,.world-book-name-input.error{border-color:#ef4444}.error-message{color:#ef4444}.char-count,.error-message{font-size:12px;margin-top:-4px}.char-count{color:var(--theme-text-tertiary);text-align:right}.editor-footer{background:var(--theme-bg-secondary);padding:16px;border-top:1px solid var(--theme-border-color);display:flex;gap:12px;justify-content:center;flex-shrink:0}@media (max-width:767px){.editor-footer{padding:12px 15px;justify-content:center}.wb-save-btn{width:auto;padding:12px 24px;font-size:14px}}@media (max-width:480px){.editor-footer{padding:10px 12px}.wb-save-btn{padding:10px 20px;font-size:13px}}.wb-cancel-btn{background:transparent;color:var(--theme-text-secondary);border:1px solid var(--theme-border-color);border-radius:6px;padding:8px 16px;font-size:14px;cursor:pointer;transition:all .2s ease}.wb-cancel-btn:hover{background:var(--theme-bg-tertiary);color:var(--theme-text-primary)}.wb-cancel-btn:active{transform:scale(.98)}@media (orientation:landscape) and (max-height:500px){.world-book-editor{height:100vh;max-height:100vh}.editor-content,.editor-header{padding:8px 15px}.editor-content{gap:8px}.world-book-content-textarea{min-height:100px}.editor-footer{padding:8px 15px}}@media (prefers-color-scheme:dark){.world-book-editor{background-color:var(--theme-bg-primary,#1a1a1a)!important}.editor-header{background-color:var(--theme-header-bg,rgba(26,26,26,.95))!important;border-bottom-color:var(--theme-border-color,#404040)!important}.editor-footer{background-color:var(--theme-bg-secondary,#2a2a2a);border-top-color:var(--theme-border-color,#404040)}}@media (prefers-reduced-motion:reduce){.world-book-editor *,.world-book-editor :after,.world-book-editor :before{animation-duration:.01ms!important;transition-duration:.01ms!important}}@media (prefers-contrast:high){.world-book-content-textarea:focus,.world-book-description-input:focus,.world-book-name-input:focus{border-color:var(--theme-text-primary);border-width:2px}}.draw-and-guess-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:9999;padding:16px}.draw-and-guess-modal{background:var(--theme-bg-primary);border-radius:12px;width:100%;max-width:800px;max-height:90vh;max-height:calc(var(--vh, 1vh) * 90);display:flex;flex-direction:column;box-shadow:var(--theme-shadow-heavy);overflow:hidden}.draw-and-guess-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--theme-border-color);background:linear-gradient(135deg,var(--theme-accent-color) 0,var(--theme-accent-hover) 100%);color:white;gap:16px}.draw-and-guess-title{font-size:18px;font-weight:600;margin:0;white-space:nowrap}.selected-topic-display{display:flex;align-items:center;gap:0;font-size:.95rem;color:rgba(255,255,255,.9);flex:1;justify-content:center;min-width:0}.topic-label{font-weight:500;opacity:.8;white-space:nowrap}.topic-text{font-size:1.1rem;text-shadow:0 1px 2px rgba(0,0,0,.2);overflow:hidden;text-overflow:ellipsis}.countdown-timer,.topic-text{font-weight:700;white-space:nowrap}.countdown-timer{display:flex;align-items:center;gap:.4rem;padding:.4rem .8rem;background:rgba(255,255,255,.2);border-radius:1.2rem;color:white;font-size:.95rem;transition:all .3s;border:1px solid rgba(255,255,255,.3)}.countdown-timer.countdown-warning{background:#fee;color:#d00;animation:countdown-pulse 1s infinite}@keyframes countdown-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}.countdown-icon{width:1.25rem;height:1.25rem}.countdown-text{min-width:2.5rem;text-align:center;font-size:1rem}.draw-and-guess-close{background:rgba(255,255,255,.2);border:none;color:white;font-size:28px;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;transition:background .2s}.draw-and-guess-close:hover{background:rgba(255,255,255,.3)}.draw-and-guess-content{display:flex;flex-direction:column;padding:20px;overflow-y:auto;gap:16px}.draw-and-guess-toolbar{display:flex;flex-direction:column;gap:12px;padding:12px;background:var(--theme-bg-secondary);border-radius:8px}.toolbar-section{display:flex;flex-direction:column;gap:8px}.toolbar-label{font-size:14px;font-weight:500;color:var(--theme-text-primary)}.color-palette{display:flex;gap:8px;flex-wrap:wrap}.color-button{width:32px;height:32px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:all .2s;box-shadow:0 2px 4px rgba(0,0,0,.1)}.color-button:hover{transform:scale(1.1);box-shadow:0 3px 6px rgba(0,0,0,.15)}.color-button.active{border-color:var(--theme-accent-color);box-shadow:0 0 0 3px rgba(0,123,255,.3)}.stroke-width-slider{width:100%;height:6px;border-radius:3px;background:var(--theme-bg-tertiary);outline:none;-webkit-appearance:none}.stroke-width-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:var(--theme-accent-color);cursor:pointer;transition:all .2s}.stroke-width-slider::-webkit-slider-thumb:hover{background:var(--theme-accent-hover);transform:scale(1.1)}.stroke-width-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--theme-accent-color);cursor:pointer;border:none;transition:all .2s}.stroke-width-slider::-moz-range-thumb:hover{background:var(--theme-accent-hover);transform:scale(1.1)}.toolbar-buttons{flex-direction:row;gap:8px}.tool-button{padding:8px 12px;background:var(--theme-bg-primary);border:1px solid var(--theme-border-color);border-radius:6px;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center}.tool-button:hover{background:var(--theme-bg-tertiary);border-color:var(--theme-accent-color)}.tool-button.active{background:var(--theme-accent-color);border-color:var(--theme-accent-color);color:white}.tool-button.active svg{stroke:white}.tool-button.clear-button:hover{background:var(--danger-color);border-color:var(--danger-color);color:white}.tool-button.clear-button:hover svg{stroke:white}.draw-and-guess-canvas-wrapper{width:100%;min-height:400px;display:flex;align-items:center;justify-content:center}.draw-and-guess-footer{display:flex;gap:12px;padding-top:16px;border-top:1px solid var(--theme-border-color)}.draw-and-guess-button{flex:1;padding:10px 16px;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s}.cancel-button{background:var(--theme-bg-secondary);color:var(--theme-text-secondary)}.cancel-button:hover{background:var(--theme-bg-tertiary)}.submit-button{background:linear-gradient(135deg,var(--theme-accent-color) 0,var(--theme-accent-hover) 100%);color:white}.submit-button:hover{transform:translateY(-1px);box-shadow:var(--theme-shadow-medium)}.cancel-button:disabled,.submit-button:disabled{opacity:.5;cursor:not-allowed}.submit-button:disabled:hover{transform:none;box-shadow:none}@media (max-width:768px){.draw-and-guess-overlay{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.draw-and-guess-modal{max-width:95%;max-height:90vh;max-height:calc(var(--vh, 1vh) * 90)}.draw-and-guess-content{padding:12px;gap:10px}.draw-and-guess-toolbar{padding:8px;gap:8px}.toolbar-label{font-size:12px}.toolbar-section{gap:6px}.color-button{width:28px;height:28px}.tool-button{padding:6px 10px}.tool-button svg{width:18px;height:18px}.draw-and-guess-canvas-wrapper{min-height:300px}.toolbar-buttons{flex-wrap:wrap}.color-palette{justify-content:center}.draw-and-guess-button{padding:8px 12px;font-size:13px}}@media (max-width:480px){.draw-and-guess-overlay{padding:0;align-items:stretch}.draw-and-guess-modal{width:100%;height:100vh;height:calc(var(--vh, 1vh) * 100);max-height:100vh;max-height:calc(var(--vh, 1vh) * 100);border-radius:0;box-shadow:none}.draw-and-guess-header{padding:max(12px,env(safe-area-inset-top)) 16px 12px;gap:8px;flex-wrap:wrap}.draw-and-guess-title{font-size:16px}.selected-topic-display{font-size:.85rem;min-width:0}.topic-text{font-size:1rem}.countdown-timer{padding:.3rem .6rem;font-size:.85rem}.draw-and-guess-content{gap:8px;padding:10px 10px calc(10px + env(safe-area-inset-bottom));max-height:calc(100vh - 60px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:calc(var(--vh, 1vh) * 100 - 60px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.draw-and-guess-toolbar{padding:6px;gap:6px}.toolbar-label{font-size:11px}.toolbar-section{gap:4px}.color-button{width:24px;height:24px}.tool-button{padding:5px 8px}.tool-button svg{width:16px;height:16px}.stroke-width-slider{height:5px}.stroke-width-slider::-webkit-slider-thumb{width:16px;height:16px}.stroke-width-slider::-moz-range-thumb{width:16px;height:16px}.draw-and-guess-footer{padding-top:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.draw-and-guess-canvas-wrapper{min-height:250px}.draw-and-guess-button{padding:8px 10px;font-size:13px}.countdown-icon{width:1rem;height:1rem}.countdown-text{min-width:2rem;font-size:.9rem}}@media (max-width:360px){.draw-and-guess-header{padding:8px 12px;gap:6px}.draw-and-guess-title{font-size:14px}.selected-topic-display{font-size:.8rem}.topic-text{font-size:.9rem}.countdown-timer{padding:.2rem .4rem;font-size:.8rem}.countdown-icon{width:.9rem;height:.9rem}.countdown-text{min-width:1.8rem;font-size:.8rem}}@supports (height:100dvh){@media (max-width:480px){.draw-and-guess-modal{height:100dvh;max-height:100dvh}.draw-and-guess-content{max-height:calc(100dvh - 60px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.topic-selection-modal{height:100dvh;max-height:100dvh}.topic-selection-content{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 80px)}}}.topic-selection-modal{max-width:600px;margin-top:env(safe-area-inset-top);margin-bottom:env(safe-area-inset-bottom);max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.topic-selection-content{display:flex;flex-direction:column;padding:20px;gap:20px;overflow-y:auto;max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 120px)}.topic-selection-hint{margin:0;padding:12px 16px;background:var(--theme-bg-secondary);border-radius:8px;border-left:4px solid var(--theme-accent-color);color:var(--theme-text-secondary);font-size:14px;line-height:1.6}.topic-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.topic-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 6px;background:var(--theme-bg-secondary);border:2px solid var(--theme-border-color);border-radius:8px;cursor:pointer;transition:all .3s;min-height:50px}.topic-card:hover{transform:translateY(-4px);box-shadow:var(--theme-shadow-medium);border-color:var(--theme-accent-color)}.topic-card:active{transform:translateY(-2px)}.topic-name{font-size:12px;font-weight:600;color:var(--theme-text-primary);text-align:center;line-height:1.2}.topic-difficulty{font-size:8px;padding:2px 4px;border-radius:8px;font-weight:500}.difficulty-easy{background:#d4edda;color:#155724}.difficulty-medium{background:#fff3cd;color:#856404}.difficulty-hard{background:#f8d7da;color:#721c24}.topic-easy{border-color:#d4edda}.topic-easy:hover{border-color:#28a745;background:#e8f5e9}.topic-medium{border-color:#fff3cd}.topic-medium:hover{border-color:#ffc107;background:#fff8e1}.topic-hard{border-color:#f8d7da}.topic-hard:hover{border-color:#dc3545;background:#ffebee}.topic-selection-footer{display:flex;justify-content:center;gap:12px;padding-top:12px;border-top:1px solid var(--theme-border-color)}.custom-topic-button,.topic-refresh-button{padding:10px 24px;background:var(--theme-accent-color);color:white;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}.custom-topic-button:hover,.topic-refresh-button:hover{background:var(--theme-accent-hover);transform:translateY(-2px);box-shadow:var(--theme-shadow-medium)}.custom-topic-button:active,.topic-refresh-button:active{transform:translateY(0)}.custom-topic-button{background:var(--theme-bg-tertiary);color:var(--theme-text-primary);border:1px solid var(--theme-border-color)}.custom-topic-button:hover{background:var(--theme-bg-primary);border-color:var(--theme-accent-color);transform:translateY(-2px)}.custom-topic-input-section{margin-top:16px;padding:16px;background:var(--theme-bg-secondary);border-radius:8px;border:1px solid var(--theme-border-color);animation:slideDown .3s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.custom-topic-input-wrapper{display:flex;flex-direction:column;gap:12px}.custom-topic-input{width:100%;padding:12px 16px;border:2px solid var(--theme-border-color);border-radius:8px;font-size:16px;background:var(--theme-bg-primary);color:var(--theme-text-primary);transition:all .2s;outline:none}.custom-topic-input:focus{border-color:var(--theme-accent-color);box-shadow:0 0 0 3px rgba(79,70,229,.1)}.custom-topic-input::placeholder{color:var(--theme-text-secondary)}.custom-topic-actions{display:flex;gap:8px;justify-content:center}.custom-topic-cancel,.custom-topic-submit{padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}.custom-topic-submit{background:var(--theme-accent-color);color:white}.custom-topic-submit:hover:not(:disabled){background:var(--theme-accent-hover);transform:translateY(-1px);box-shadow:var(--theme-shadow-medium)}.custom-topic-submit:disabled{background:var(--theme-bg-tertiary);color:var(--theme-text-secondary);cursor:not-allowed;opacity:.6}.custom-topic-cancel{background:var(--theme-bg-tertiary);color:var(--theme-text-primary);border:1px solid var(--theme-border-color)}.custom-topic-cancel:hover{background:var(--theme-bg-primary);border-color:var(--theme-accent-color)}@media (max-width:480px){.topic-selection-modal{max-width:100%;margin:0;height:100vh;height:calc(var(--vh, 1vh) * 100);max-height:100vh;max-height:calc(var(--vh, 1vh) * 100);border-radius:0}.topic-selection-content{padding:16px;gap:16px;max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 80px);max-height:calc(var(--vh, 1vh) * 100 - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 80px)}.topic-grid{grid-template-columns:repeat(2,1fr);gap:8px}.topic-card{padding:12px 8px;min-height:60px;gap:3px}.topic-name{font-size:11px;line-height:1.1}.topic-difficulty{font-size:7px;padding:1px 3px}.topic-selection-hint{font-size:12px;padding:8px 12px;line-height:1.4}.topic-selection-footer{flex-direction:column;gap:8px}.custom-topic-button,.topic-refresh-button{padding:8px 16px;font-size:13px}.custom-topic-input-section{margin-top:12px;padding:12px}.custom-topic-input{font-size:14px;padding:10px 12px}.custom-topic-actions{flex-direction:column;gap:6px}.custom-topic-cancel,.custom-topic-submit{padding:8px 16px;font-size:13px}}@media (max-width:360px){.topic-selection-content{padding:12px;gap:12px}.topic-grid{gap:6px}.topic-card{padding:8px 6px;min-height:50px}.topic-name{font-size:10px}.topic-difficulty{font-size:6px;padding:1px 2px}.topic-selection-hint{font-size:11px;padding:6px 10px}}