*{box-sizing:border-box;touch-action:manipulation;margin:0;padding:0}body{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);flex-direction:column;align-items:center;min-height:100vh;padding:20px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;display:flex}.container{background:#fff;border-radius:12px;width:100%;max-width:1200px;padding:30px;box-shadow:0 10px 40px #0003}h1{text-align:center;color:#333;margin-bottom:30px;font-size:2em}.song-info-section{text-align:center;background:#f8f9fa;border-radius:12px;margin-bottom:15px;padding:12px 15px}.song-info-title{color:#333;word-break:break-word;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:4px;margin-bottom:4px;font-size:1.2em;font-weight:700;display:flex}.song-info-title .title{color:#333;font-size:1.2em;font-weight:700}.song-info-title .artist{color:#777;font-size:.85em}.song-info-artist{color:#777;margin-bottom:8px;font-size:.85em}.song-info-details{border:1px solid #ccc;border-radius:4px;flex-wrap:wrap;justify-content:center;gap:1px;margin-top:12px;display:flex;overflow:hidden}.song-info-table-cell{white-space:nowrap;text-overflow:ellipsis;border-right:1px solid #ccc;flex-direction:row;flex:1;justify-content:center;align-items:center;gap:4px;min-width:60px;padding:6px 8px;display:flex;overflow:hidden}.song-info-table-cell:last-child{border-top:1px solid #ccc;border-right:none;flex-basis:100%}.song-info-table-cell .label{color:#666;border-right:1px solid #ddd;padding-right:6px;font-size:.85em;font-weight:600}.song-info-table-cell .value{color:#333;padding-left:6px;font-size:.85em;font-weight:600}.song-link-buttons{flex-wrap:wrap;justify-content:center;gap:8px;margin-top:10px;display:flex}.simai-wiki-button{color:#fff;cursor:pointer;background:#e78b00;border:none;border-radius:8px;align-items:center;gap:4px;padding:6px 16px;font-size:.85em;font-weight:600;transition:all .3s;display:inline-flex}.simai-wiki-button:hover{background:#e68a00;transform:translateY(-1px)}.youtube-search-button{color:#fff;cursor:pointer;background:red;border:none;border-radius:8px;align-items:center;gap:4px;padding:6px 16px;font-size:.85em;font-weight:600;transition:all .3s;display:inline-flex}.youtube-search-button:hover{background:#c00;transform:translateY(-1px)}.chart-tags-section{border-top:1px solid #eee;margin-top:12px;padding-top:12px}.chart-tags-header{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.chart-tags-label-group{align-items:center;gap:4px;display:flex}.chart-tags-label{color:#555;font-size:.85em;font-weight:600}.chart-tags-label-group .help-button{width:24px;height:24px;font-size:.8em}.request-tag-button{color:#fff;cursor:pointer;background:#6366f1;border:none;border-radius:8px;padding:4px 12px;font-size:.8em;font-weight:600;transition:all .2s}.request-tag-button:hover:not(:disabled){background:#4f46e5;transform:translateY(-1px)}.request-tag-button:disabled{cursor:not-allowed;background:#aaa}.chart-tags-list{flex-wrap:wrap;gap:6px;display:flex}.chart-tag-badge{color:#4338ca;background:#e0e7ff;border-radius:12px;padding:3px 10px;font-size:.8em;font-weight:600;display:inline-block}.chart-tag-link{cursor:pointer;text-decoration:none;transition:background .2s,transform .15s}.chart-tag-link:hover{background:#c7d2fe;transform:translateY(-1px)}.chart-tags-empty{color:#999;font-size:.8em}.tag-request-modal{z-index:1000;background:#00000080;justify-content:center;align-items:center;padding:16px;display:none;position:fixed;inset:0}.tag-request-modal.show{display:flex}.tag-request-content{background:#fff;border-radius:12px;flex-direction:column;width:100%;max-width:480px;max-height:80vh;display:flex;overflow:hidden}.tag-request-modal-header{border-bottom:1px solid #eee;justify-content:space-between;align-items:center;padding:16px;display:flex}.tag-request-modal-header h3{margin:0;font-size:1.1em}.tag-request-close{cursor:pointer;color:#888;background:0 0;border:none;font-size:1.5em;line-height:1}.tag-request-modal-body{padding:16px;overflow-y:auto}.tag-request-quota{color:#555;margin:0 0 12px;font-size:.9em}.tag-request-group{margin-bottom:10px}.tag-request-group-label{color:#888;margin-bottom:4px;font-size:.8em}.tag-request-chips{flex-wrap:wrap;gap:8px;display:flex}.tag-request-chip{cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #ddd;border-radius:16px;align-items:center;gap:4px;padding:5px 10px;font-size:.85em;display:inline-flex}.tag-request-chip.is-disabled{opacity:.5;cursor:not-allowed}.tag-already{color:#999;font-size:.85em}.tag-request-modal-footer{border-top:1px solid #eee;justify-content:space-between;align-items:center;gap:12px;padding:16px;display:flex}.tag-request-status{color:#555;flex:1;font-size:.8em}.tag-request-submit{color:#fff;cursor:pointer;background:#6366f1;border:none;border-radius:8px;padding:8px 20px;font-weight:600}.tag-request-submit:disabled{cursor:not-allowed;background:#aaa}.tag-request-error{color:#dc2626}.chart-section{flex-direction:column;align-items:center;margin-bottom:20px;display:flex}.chart-area{aspect-ratio:1;background:#1a1a2e;border-radius:8px;width:100%;max-width:500px;position:relative;box-shadow:0 4px 15px #0000004d}.playback-control-section{background:#f8f9fa;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;gap:8px;margin-bottom:15px;padding:5px 20px;display:flex}#chartCanvas{border-radius:8px;width:100%;height:100%}.input-section{flex-direction:column;margin-top:30px;display:flex}.input-section h2{color:#333;margin-bottom:15px;font-size:1.3em}#simaiInput{resize:vertical;border:2px solid #ddd;border-radius:8px;width:100%;height:400px;padding:15px;font-family:Courier New,monospace;font-size:14px;transition:border-color .3s}#simaiInput:focus{border-color:#667eea;outline:none}.controls-section{background:#f8f9fa;border-radius:8px;margin-top:20px;padding:25px}.control-group{margin-bottom:20px}.control-group:last-child{margin-bottom:0}.control-group label{color:#333;margin-bottom:10px;font-size:1em;font-weight:600;display:block}.note-count-graph{cursor:pointer;background:#f8f9fa;border:1px solid #ddd;border-radius:4px;width:calc(100% - 20px);height:60px;margin-bottom:5px;margin-left:10px;margin-right:10px}.slider-container{align-items:center;gap:15px;margin-bottom:0;padding-left:10px;padding-right:10px;display:flex}.slider-ticks{z-index:1;height:15px;margin:2px 20px 20px;position:relative}.slider-ticks span{background:#999;width:2px;height:8px;position:absolute;transform:translate(-50%)}.slider-ticks span.major{background:#667eea;height:12px}.slider-ticks .tick-label{color:#666;background:0 0;width:auto;height:auto;font-size:10px;position:absolute;top:15px;transform:translate(-50%)}input[type=range]{-webkit-appearance:none;z-index:2;background:#ddd;border-radius:3px;outline:none;flex:1;height:6px;position:relative}input[type=range]::-webkit-slider-thumb{appearance:none;cursor:pointer;background:#667eea;border-radius:50%;width:20px;height:20px;transition:background .3s}input[type=range]::-webkit-slider-thumb:hover{background:#764ba2}input[type=range]::-moz-range-thumb{cursor:pointer;background:#667eea;border:none;border-radius:50%;width:20px;height:20px;transition:background .3s}input[type=range]::-moz-range-thumb:hover{background:#764ba2}.value-display{text-align:center;color:#667eea;background:#fff;border-radius:6px;min-width:80px;padding:8px 15px;font-size:1.1em;font-weight:600;box-shadow:0 2px 5px #0000001a}.hispeed-control{align-items:center;gap:15px;display:flex}input[type=number]{text-align:center;border:2px solid #ddd;border-radius:6px;width:100px;padding:10px;font-size:1em;transition:border-color .3s}input[type=number]:focus{border-color:#667eea;outline:none}.playback-controls{flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;display:flex}.control-button{cursor:pointer;color:#fff;background:#667eea;border:none;border-radius:6px;min-width:50px;padding:12px 20px;font-size:1.2em;font-weight:600;transition:all .3s}.control-button:hover:not(:disabled){background:#764ba2;transform:translateY(-2px);box-shadow:0 4px 8px #0003}.control-button:disabled{cursor:not-allowed;opacity:.6;background:#ccc}#playPauseButton{background:#28a745}#playPauseButton:hover:not(:disabled){background:#218838}#playPauseButton.playing{background:#ffc107}#playPauseButton.playing:hover:not(:disabled){background:#e0a800}#playPauseButton{flex:2 1 0;padding:17px 30px;font-size:1.4em}#restartButton{flex:1 1 0;padding:12px 15px;font-size:1.4em}.playback-controls:has(#restartButton){min-width:500px}#restartButton{background:#17a2b8}#restartButton:hover:not(:disabled){background:#138496}.playback-speed{align-items:center;gap:8px;display:flex}.playback-speed label{margin:0;font-weight:400}.playback-speed input[type=number]{width:70px;padding:8px}.error-message{color:#c33;background:#fee;border:2px solid #fcc;border-radius:8px;margin-top:20px;padding:15px;display:none}.error-message.show{display:block}.toggle-switch{background:#ccc;border-radius:12px;flex-shrink:0;width:44px;height:24px;transition:background .3s;position:relative}.toggle-switch:after{content:"";background:#fff;border-radius:50%;width:20px;height:20px;transition:transform .3s;position:absolute;top:2px;left:2px;box-shadow:0 2px 4px #0003}input[type=checkbox]:checked+.toggle-switch{background:#667eea}input[type=checkbox]:checked+.toggle-switch:after{transform:translate(20px)}.settings-button{color:#fff;cursor:pointer;white-space:nowrap;background:#667eea;border:none;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;height:35px;padding:0 15px;font-size:1em;font-weight:600;transition:all .3s;display:inline-flex}.settings-button:hover{background:#764ba2;transform:translateY(-2px)}.answer-sound-toggle{cursor:pointer;white-space:nowrap;background:#f8f9fa;border-radius:8px;align-items:center;gap:8px;padding:8px 12px;transition:background .2s;display:flex}.answer-sound-toggle:hover{background:#e9ecef}.answer-sound-toggle span{color:#333;font-size:.95em;font-weight:600}.settings-popup{z-index:1000;background:#00000080;justify-content:center;align-items:center;width:100%;height:100%;display:none;position:fixed;top:0;left:0}.settings-popup.show{display:flex}.settings-content{background:#fff;border-radius:12px;width:90%;max-width:500px;max-height:80vh;padding:30px;position:relative;overflow-y:auto;box-shadow:0 10px 40px #0000004d}.saved-chart-item{background:#f8f9fa;border-radius:4px;align-items:center;gap:8px;margin-bottom:6px;padding:8px;transition:background .2s;display:flex}.saved-chart-item:last-child{margin-bottom:0}.saved-chart-item:hover{background:#e9ecef}.saved-chart-delete{color:#fff;cursor:pointer;background:#dc3545;border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:24px;height:24px;font-size:.9em;transition:background .2s;display:flex}.saved-chart-delete:hover{background:#c82333}.saved-chart-button{color:#17a2b8;cursor:pointer;text-align:left;background:#fff;border:2px solid #17a2b8;border-radius:4px;flex:1;padding:10px 12px;font-size:.95em;transition:all .2s}.saved-chart-button:hover{color:#fff;background:#17a2b8}.saved-chart-name{margin-bottom:2px;font-weight:700}.saved-chart-date{color:#666;font-size:.8em}.settings-header{border-bottom:2px solid #f0f0f0;justify-content:space-between;align-items:center;margin-bottom:25px;padding-bottom:15px;display:flex}.settings-header h2{color:#333;margin:0;font-size:1.5em}.close-button{color:#999;cursor:pointer;z-index:10;background:#fff;border:none;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;margin-bottom:-28px;margin-left:auto;padding:4px;font-size:1.4em;transition:all .3s;display:flex;position:sticky;top:-10px;left:calc(100% - 50px);box-shadow:0 2px 8px #0000001a}.close-button:hover{color:#333;box-shadow:0 4px 12px #00000026}.settings-option{margin-bottom:10px}.settings-option:last-child{margin-bottom:0}.settings-option-label{cursor:pointer;border-radius:8px;flex-direction:row-reverse;justify-content:space-between;align-items:center;gap:10px;padding:10px;transition:background .2s;display:flex}.settings-option-label:hover{background:#f8f9fa}.settings-section-title{color:#555;border-bottom:1px solid #e0e0e0;align-items:center;gap:8px;margin:15px 0 10px;padding-bottom:8px;font-size:1.1em;font-weight:600;display:flex}.settings-section-title:first-of-type{margin-top:0}.section-info-button{color:#fff;cursor:pointer;background:#667eea;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:20px;height:20px;font-size:.8em;transition:all .2s;display:inline-flex}.section-info-button:hover{background:#764ba2;transform:scale(1.1)}.section-info-content{color:#555;background:#f8f9fa;border-left:3px solid #667eea;border-radius:4px;margin:10px 0;padding:12px 15px;font-size:.95em;line-height:1.6;display:none}.section-info-content.show{display:block}.section-info-content p{margin:0 0 8px}.section-info-content p:last-child{margin-bottom:0}.mirror-buttons{flex-wrap:wrap;flex:1;justify-content:flex-end;gap:6px;display:flex}.mirror-button{color:#333;cursor:pointer;white-space:nowrap;background:#fff;border:2px solid #ddd;border-radius:6px;min-width:45px;padding:4px 12px;font-size:.95em;transition:all .2s}.mirror-button:hover{background:#f8f9fa;border-color:#667eea}.mirror-button.active{color:#fff;background:#667eea;border-color:#667eea}.simai-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:15px;display:flex}.simai-buttons{flex-wrap:wrap;gap:10px;display:flex}.simai-buttons-row{gap:6px;display:flex}.simai-btn{padding:6px 12px;font-size:.75em}.green-btn{color:#fff;background:#28a745}@media (width<=768px){h1{font-size:1.5em}.simai-header{flex-direction:column;align-items:stretch}.simai-buttons{flex-direction:column;gap:6px}.simai-buttons-row{width:100%}.control-button.simai-btn{flex:1;font-size:.5em}.container{padding:15px}.chart-section{margin-bottom:10px}.chart-area{max-width:100%}.playback-control-section{width:100%;margin-bottom:10px;padding:5px}.playback-controls{flex-wrap:nowrap;justify-content:space-between;gap:3px;width:100%}.control-button{flex:1;min-width:0;padding:8px 6px;font-size:.9em}#playPauseButton{flex:2 1 0;padding:17px 10px;font-size:1em}#restartButton{flex:1 1 0}.playback-controls:has(#restartButton){min-width:0}.controls-section{padding:15px}.control-group{margin-bottom:25px}.song-info-table-cell{font-size:.8em}#simaiInput{height:300px}.settings-content{width:95%;padding:20px}.settings-header h2{font-size:1.3em}.answer-sound-toggle{padding:6px 10px}.answer-sound-toggle span{font-size:.9em}.mirror-button{min-width:40px;padding:3px 8px;font-size:.85em}#playbackSpeedDecrement,#playbackSpeedIncrement,#hiSpeedDecrement,#hiSpeedIncrement{min-width:24px!important;max-width:30px!important;padding:8px 4px!important;font-size:.85em!important}#answerSoundOffsetDecrement10,#answerSoundOffsetDecrement1,#answerSoundOffsetIncrement1,#answerSoundOffsetIncrement10{min-width:28px!important;max-width:35px!important;padding:6px 4px!important;font-size:.8em!important}}@media (width>=1024px){body{height:100vh;padding:10px;overflow:hidden}.container{grid-template-columns:5fr 5fr;align-items:start;column-gap:24px;height:calc(100vh - 20px);padding:15px 30px 30px;display:grid;overflow:hidden}.container>div:first-child{grid-column:1}.chart-section{grid-area:2/1;margin-bottom:0}.playback-control-section{grid-area:3/1;margin-bottom:0}.right-column{flex-direction:column;grid-area:1/2/span 100;gap:15px;max-height:calc(100vh - 50px);display:flex;overflow-y:auto}.right-column .controls-section,.right-column .input-section{margin-top:0}.playback-controls{flex-wrap:nowrap;width:100%}.playback-controls .control-button{flex:1;min-width:0;padding:3px 0;font-size:.95em}#playPauseButton{flex:2 1 0;padding:6px 0;font-size:1.1em}#restartButton{flex:1 1 0;padding:6px 0;font-size:1.1em}.playback-controls:has(#restartButton){min-width:0}}.help-button{color:#fff;cursor:pointer;background:#667eea;border:none;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;font-size:1.2em;transition:all .2s;display:inline-flex}.help-button:hover{background:#764ba2;transform:translateY(-2px)}@media (width<=600px){.help-button{border-radius:6px;width:28px;height:28px;font-size:.9em}}.help-modal-overlay{z-index:1000;background:#00000080;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0}.help-modal{background:#fff;border-radius:16px;flex-direction:column;width:100%;max-width:480px;max-height:80vh;display:flex;overflow:hidden;box-shadow:0 15px 50px #0000004d}.help-modal-header{border-bottom:2px solid #f0f0f0;justify-content:space-between;align-items:center;padding:16px 20px;display:flex}.help-modal-title{color:#333;font-size:1.05em;font-weight:700}.help-modal-close{color:#999;cursor:pointer;background:0 0;border:none;padding:4px;font-size:1.4em;line-height:1}.help-modal-close:hover{color:#333}.help-modal-body{color:#333;padding:20px;font-size:.9em;line-height:1.6;overflow-y:auto}.help-modal-body p{margin:0 0 12px}.help-modal-body h4{color:#667eea;border-bottom:2px solid #f0f0f0;margin:20px 0 6px;padding-bottom:4px;font-size:1.05em}.help-modal-body h4:first-child{margin-top:0}.help-modal-body ol{margin:0 0 12px;padding-left:1.5em}.help-modal-body img{border:1px solid #e0e0e0;border-radius:8px;max-width:min(100%,300px);margin:8px auto 12px;display:block}.help-modal-body .help-section-note{margin-bottom:8px;font-size:.95em}.help-modal-body dl{margin:0 0 16px}.help-modal-body dt{margin-top:10px;font-weight:700}.help-modal-body dd{color:#555;margin:2px 0 0}.help-modal-body a{color:#667eea}.help-modal-body .help-warning{color:#d32f2f}.help-modal-body details{border:1px solid #e0e0e0;border-radius:8px;margin:8px 0 12px;padding:8px 12px}.help-modal-body summary{cursor:pointer;color:#667eea;font-weight:700}
