*{box-sizing:border-box;margin:0;padding:0}body,html{color:#333;overscroll-behavior:none;background:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,sans-serif;overflow-x:hidden}#root{touch-action:none;width:100vw;height:100dvh}.outer-app-container{padding-top:env(safe-area-inset-top);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);box-sizing:border-box;flex-direction:column;width:100vw;height:100dvh;display:flex;overflow:hidden}.app{box-sizing:border-box;flex-direction:column;width:100%;max-width:1200px;min-height:100vh;margin:0 auto;padding:20px;display:flex;overflow-x:hidden}.app.compact{overscroll-behavior:none;box-sizing:border-box;flex-direction:column;flex:1;min-height:0;padding:10px;display:flex;overflow:hidden}.app.compact.choose-word-mode .header,.app.compact.choose-word-mode .topic-input{margin-bottom:15px}.app.compact.solving-mode .compact-sentence-row{flex-shrink:0;align-items:center;gap:10px;margin-bottom:10px;padding:5px;display:flex}.app.compact.solving-mode .compact-sentence-row .sentence-selector{flex:1;align-self:center;min-width:0;margin-bottom:0}.app.compact.solving-mode .compact-sentence-row .new-topic-button{cursor:pointer;opacity:.8;background:0 0;border:none;flex-shrink:0;align-self:center;margin:0;padding:0;font-size:1.5rem;transition:opacity .2s}.app.compact.solving-mode .compact-sentence-row .new-topic-button:hover{opacity:1;background:0 0}.app.compact.solving-mode .sentence-container{flex-direction:column;min-height:0;margin-bottom:5px;display:flex;overflow:hidden}.app.compact.solving-mode .sentence-display{min-height:0;padding:10px;font-size:1.3rem;font-weight:700;line-height:1.2;overflow-y:auto}.app.compact.solving-mode .word-search-grid{flex:none;margin-top:5px;overflow:hidden}.header{flex-wrap:wrap-reverse;justify-content:center;align-items:center;gap:10px 40px;margin-bottom:30px;display:flex;position:relative}.header h1{text-align:center;flex:auto;min-width:0;margin:0}.header .header-controls{flex:none;align-items:center;gap:10px;margin-left:auto;display:flex}.header .header-controls .version{color:#666;font-size:.9rem}.header .header-controls .checkbox-label{cursor:pointer;align-items:center;gap:4px;display:flex}.header .header-controls .checkbox-label .emoji-label{opacity:.8;font-size:1rem}.header .header-controls .debug-toggle,.header .header-controls .compact-toggle{cursor:pointer}.header .header-controls .info-button{cursor:pointer;opacity:.7;background:0 0;border:none;padding:2px;font-size:.9rem;transition:opacity .2s}.header .header-controls .info-button:hover{opacity:1}.header h1{color:#2c3e50;margin:0;font-size:1.75rem}.topic-input{justify-content:flex-start;margin-bottom:30px;padding:0 20px;display:flex}.topic-input form{flex-wrap:wrap;align-items:center;gap:10px;max-width:100%;display:flex}.topic-input label{font-weight:600}.topic-input input{border:2px solid #ddd;border-radius:4px;width:240px;min-width:100px;padding:8px 12px;font-size:16px}.topic-input input:focus{border-color:#3498db;outline:none}.topic-input input:disabled{cursor:not-allowed;background:#f0f0f0}@media (width<=480px){.topic-input input{width:120px}}.topic-input .language-selector{cursor:pointer;background:#fff;border:2px solid #ddd;border-radius:4px;padding:8px 12px;font-size:16px}.topic-input .language-selector:focus{border-color:#3498db;outline:none}.topic-input .language-selector:disabled{cursor:not-allowed;background:#f0f0f0}.topic-input .language-input-container{align-items:center;gap:5px;display:flex}.topic-input .language-input-container .other-language-input{text-transform:uppercase;border:2px solid #3498db;border-radius:4px;width:100px;padding:8px 12px;font-size:16px}.topic-input .language-input-container .other-language-input:focus{border-color:#2980b9;outline:none}.topic-input .language-input-container .cancel-other-btn{color:#fff;cursor:pointer;background:#e74c3c;border:none;border-radius:4px;padding:4px 8px;font-size:14px;line-height:1}.topic-input .language-input-container .cancel-other-btn:hover{background:#c0392b}.topic-input button{color:#fff;cursor:pointer;background:#3498db;border:none;border-radius:4px;padding:8px 16px;font-size:16px}.topic-input button:hover{background:#2980b9}.topic-input .new-topic-button{cursor:pointer;opacity:.7;background:0 0;border:none;padding:2px;font-size:1rem;transition:opacity .2s}.topic-input .new-topic-button:hover{opacity:1;background:0 0}.topic-input .error{color:#e74c3c;text-align:center;margin-top:10px}.modal-overlay{z-index:1000;background:#00000080;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal-overlay[data-state=open]{animation:.15s cubic-bezier(.16,1,.3,1) overlayShow}.modal-overlay[data-state=closed]{animation:.15s cubic-bezier(.16,1,.3,1) overlayHide}.modal-content{z-index:1001;background:#fff;border-radius:8px;width:90%;max-width:400px;padding:30px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 4px 6px #0000001a}.modal-content[data-state=open]{animation:.15s cubic-bezier(.16,1,.3,1) contentShow}.modal-content[data-state=closed]{animation:.15s cubic-bezier(.16,1,.3,1) contentHide}.modal-content:focus{outline:none}.modal-content p{text-align:center;margin-bottom:20px;font-size:16px;line-height:1.5}.modal-content .modal-buttons{justify-content:center;gap:10px;display:flex}.modal-content .modal-buttons button{cursor:pointer;border:none;border-radius:4px;padding:10px 24px;font-size:16px;font-weight:500;transition:all .2s}.modal-content .modal-buttons button.modal-yes{color:#fff;background:#3498db}.modal-content .modal-buttons button.modal-yes:hover{background:#2980b9}.modal-content .modal-buttons button.modal-yes:focus{outline-offset:2px;outline:2px solid #3498db}.modal-content .modal-buttons button.modal-no{color:#333;background:#e0e0e0}.modal-content .modal-buttons button.modal-no:hover{background:#d0d0d0}.modal-content .modal-buttons button.modal-no:focus{outline-offset:2px;outline:2px solid #999}.about-modal h2{text-align:center;color:#2c3e50;margin-bottom:20px}.about-modal ul{margin-bottom:20px;padding-left:20px}.about-modal ul li{text-align:left;line-height:1.6}.about-modal .copyright{color:#666;justify-content:space-between;align-items:center;margin-bottom:20px;display:flex}.about-modal .copyright a{color:#4a90e2;text-decoration:none}.about-modal .copyright a:hover{text-decoration:underline}.about-modal .modal-ok{cursor:pointer;color:#fff;background:#3498db;border:none;border-radius:4px;padding:10px 32px;font-size:16px;font-weight:500;transition:all .2s}.about-modal .modal-ok:hover{background:#2980b9}.about-modal .modal-ok:focus{outline-offset:2px;outline:2px solid #3498db}.disambiguation-modal{max-width:600px;max-height:80vh;overflow-y:auto}.disambiguation-modal h3{text-align:center;color:#2c3e50;margin-bottom:15px;font-size:1.3rem}.disambiguation-modal p{text-align:center;color:#666;margin-bottom:20px}.disambiguation-modal .disambiguation-options{border:1px solid #ddd;border-radius:4px;max-height:400px;margin-bottom:20px;overflow-y:auto}.disambiguation-modal .disambiguation-options .disambiguation-option{color:#333;text-align:left;cursor:pointer;background:#fff;border:none;border-bottom:1px solid #eee;width:100%;padding:12px 16px;font-size:14px;transition:background-color .2s;display:block}.disambiguation-modal .disambiguation-options .disambiguation-option:hover{background:#f8f9fa}.disambiguation-modal .disambiguation-options .disambiguation-option:focus{background:#e3f2fd;outline:none}.disambiguation-modal .disambiguation-options .disambiguation-option:last-child{border-bottom:none}.disambiguation-modal .modal-cancel{cursor:pointer;color:#333;background:#e0e0e0;border:none;border-radius:4px;padding:10px 24px;font-size:16px;font-weight:500;transition:all .2s}.disambiguation-modal .modal-cancel:hover{background:#d0d0d0}.disambiguation-modal .modal-cancel:focus{outline-offset:2px;outline:2px solid #999}.error-message{text-align:center;color:#c62828;background:#ffebee;border:1px solid #ef5350;border-radius:4px;max-width:400px;margin:20px auto;padding:10px 20px;font-weight:500;animation:.3s ease-in fadeIn}@keyframes fadeIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.topic-and-selectors{flex-flow:wrap;justify-content:center;align-items:center;gap:20px 50px;margin-bottom:30px;display:flex}.topic-and-selectors .topic-input,.topic-and-selectors .sentence-selector-row{flex:0 auto;margin-bottom:0}.sentence-selector-row{justify-content:center;align-items:center;gap:10px;min-width:0;max-width:100%;margin-bottom:30px;display:flex;overflow:hidden}.sentence-selector-row .new-topic-button{cursor:pointer;opacity:.8;background:0 0;border:none;flex-shrink:0;margin:0 0 0 20px;padding:0;font-size:1.5rem;transition:opacity .2s}.sentence-selector-row .new-topic-button:hover{opacity:1}.sentence-selector{box-sizing:border-box;width:100%;max-width:100%;overflow:auto hidden}.sentence-selector::-webkit-scrollbar{height:6px}.sentence-selector::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.sentence-selector::-webkit-scrollbar-thumb{background:#ccc;border-radius:3px}.sentence-selector::-webkit-scrollbar-thumb:hover{background:#bbb}.sentence-selector .sentence-selector-inner{gap:10px;margin:0 auto;padding:0 10px;display:inline-flex}.sentence-selector .square{cursor:pointer;border:2px solid #333;flex-shrink:0;width:30px;height:30px;transition:all .3s}.sentence-selector .square:hover{transform:scale(1.1)}.sentence-selector .square{background:#f4e04d}.sentence-selector .square.partial{background:#f2a154}.sentence-selector .square.complete{background:#90a955}.sentence-selector .square.current{background:#fcf300;box-shadow:0 0 10px #0000004d}.sentence-selector .square.current.partial{background:#ff6b35}.sentence-selector .square.current.complete{background:#06d6a0}.game-content{flex-direction:column;flex:1;display:flex;overflow:hidden}.sentence-container{-webkit-overflow-scrolling:touch;touch-action:pan-y pinch-zoom;overscroll-behavior-y:contain;flex-direction:column;margin-bottom:10px;display:flex;overflow-y:auto}.sentence-display{text-align:center;background:#fff;border-radius:8px;padding:20px;font-family:Courier New,Monaco,Menlo,monospace;font-size:1.5rem;line-height:1.4;overflow-y:auto;box-shadow:0 2px 10px #0000001a}.sentence-display .word{background:0 0;border-radius:3px;padding:2px 4px}.sentence-display .word.unrevealed{background:#fcc}.sentence-display .word.revealed{background:#cce5ff}.sentence-display .non-word{background:0 0;padding:0}.word-search-grid{justify-content:center;margin-top:30px;display:flex}.word-search-grid svg{cursor:crosshair;-webkit-user-select:none;user-select:none;background:#fff;border:2px solid #333;border-radius:8px;box-shadow:0 4px 20px #0000001a}.word-search-grid .letter{fill:#333;pointer-events:none;font-family:Courier New,monospace;font-weight:700}.word-search-grid .selection{pointer-events:none}.word-search-grid .selection.correct{fill:#90ee90;opacity:.5}.word-search-grid .selection.correct.last{fill:#06d6a0;opacity:.7}.word-search-grid .selection.current{fill:orange;opacity:.5}.word-search-grid .selection.wrong{fill:#ff6b6b;opacity:.5;animation:1s ease-out forwards fadeOut}@keyframes fadeOut{0%{opacity:.5}to{opacity:0}}.loading{text-align:center;color:#666;margin-top:50px;font-size:1.2rem}.about-page .about-content{background:#fff;border-radius:8px;max-width:800px;margin:0 auto;padding:30px;box-shadow:0 2px 10px #0000001a}.about-page .about-content h2{color:#2c3e50;margin-bottom:20px}.about-page .about-content h3{color:#34495e;margin-top:30px;margin-bottom:15px}.about-page .about-content p{margin-bottom:15px;line-height:1.6}.about-page .about-content ol{margin-left:30px;line-height:1.8}.about-page .about-content a{color:#3498db;text-decoration:none}.about-page .about-content a:hover{text-decoration:underline}@keyframes overlayShow{0%{opacity:0}to{opacity:1}}@keyframes overlayHide{0%{opacity:1}to{opacity:0}}@keyframes contentShow{0%{opacity:0;transform:translate(-50%,-48%)scale(.96)}to{opacity:1;transform:translate(-50%,-50%)scale(1)}}@keyframes contentHide{0%{opacity:1;transform:translate(-50%,-50%)scale(1)}to{opacity:0;transform:translate(-50%,-48%)scale(.96)}}
