*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Hiragino Sans,Hiragino Kaku Gothic ProN,Yu Gothic,Meiryo,sans-serif;background:linear-gradient(135deg,#f5f7fa,#c3cfe2);color:#333;line-height:1.6;min-height:100vh}.container{max-width:800px;margin:0 auto;padding:20px}header{text-align:center;margin-bottom:40px;padding:40px 0;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:20px;box-shadow:0 10px 30px #667eea4d;position:relative;overflow:hidden}h1{font-size:3rem;color:#fff;margin-bottom:10px;text-shadow:2px 2px 4px rgba(0,0,0,.2);position:relative;z-index:1;letter-spacing:2px}.subtitle{font-size:1.2rem;color:#ffffffe6;position:relative;z-index:1;letter-spacing:1px}main{background-color:#fff;border-radius:20px;padding:40px;box-shadow:0 15px 35px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#fffffff2}.mode-selector{display:flex;gap:20px;justify-content:center;margin-bottom:30px;padding:0}.mode-selector label{flex:1;max-width:250px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.1rem;padding:25px 30px;background-color:#fff;border:2px solid #e0e0e0;border-radius:15px;transition:transform .2s ease,box-shadow .2s ease;box-shadow:0 4px 6px #0000001a;position:relative;overflow:hidden}.mode-selector label:hover{transform:translateY(-3px);box-shadow:0 8px 15px #0003}.mode-selector label:has(input:checked){border-color:#667eea;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.mode-selector label:has(input:checked) span{color:#fff;position:relative;z-index:1}.mode-selector input[type=radio]{display:none}.mode-selector label span{position:relative;z-index:1}.input-section{margin-bottom:30px}.form-group{margin-bottom:20px}.form-group label{display:block;margin-bottom:10px;font-weight:600;color:#2c3e50;font-size:.95rem;letter-spacing:.5px}input[type=text],select{width:100%;padding:12px 15px;font-size:1rem;border:2px solid #e0e0e0;border-radius:10px;transition:all .3s ease;background-color:#f8f9fa}input[type=text]:focus,select:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 3px #667eea1a;background-color:#fff}.hint-checkboxes{padding:15px;background-color:#f8f9fa;border-radius:10px;box-shadow:inset 0 2px 4px #0000000f}.hint-group{margin-bottom:10px;border:1px solid #e0e0e0;border-radius:5px;overflow:hidden}.hint-group-header{display:flex;align-items:center;padding:12px 15px;background-color:#f8f9fa;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .2s}.hint-group-header:hover{background-color:#e9ecef}.hint-group-checkbox{margin-right:10px;width:20px;height:20px;cursor:pointer;position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:2px solid #999;border-radius:3px;display:flex;align-items:center;justify-content:center}.hint-group-checkbox:checked{background-color:#3498db;border-color:#3498db}.hint-group-checkbox:checked:after{content:"";position:absolute;width:5px;height:9px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg);top:2px;left:5px}.hint-group-checkbox.partial{background-color:#3498db;border-color:#3498db}.hint-group-checkbox.partial:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:10px;height:2px;background-color:#fff}.hint-group-title{flex:1;font-weight:700;font-size:1rem}.hint-group-toggle{margin-left:10px;font-size:1.2rem;color:#666;transition:transform .2s}.hint-group.collapsed .hint-group-toggle{transform:rotate(-90deg)}.hint-group-description{font-size:.85rem;color:#7f8c8d;margin-left:5px}.hint-group-items{padding:10px 15px;background-color:#fafafa;transition:all .3s ease-out;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:5px}.hint-group.collapsed .hint-group-items{display:none}.hint-group.group-A .hint-group-header{background-color:#fff3cd}.hint-group.group-A .hint-group-header:hover{background-color:#ffe8a1}.hint-group.group-B .hint-group-header{background-color:#d1ecf1}.hint-group.group-B .hint-group-header:hover{background-color:#b8daff}.hint-group.group-C .hint-group-header{background-color:#e2e3e5}.hint-group.group-C .hint-group-header:hover{background-color:#d6d8db}.hint-group.group-D .hint-group-header{background-color:#f8d7da}.hint-group.group-D .hint-group-header:hover{background-color:#f5c6cb}.hint-checkbox{display:flex;align-items:center;cursor:pointer;padding:3px 5px}.hint-checkbox input[type=checkbox]{width:16px;height:16px;margin-right:8px;cursor:pointer}.hint-checkbox label{cursor:pointer;font-weight:400;margin-bottom:0;font-size:.9rem}.hint-description{display:inline-block;margin-left:5px;color:#7f8c8d;font-size:.8rem}.selected-hints{margin-top:10px;padding:10px;background-color:#e3f2fd;border-radius:5px;min-height:40px}.selected-hints-label{font-weight:700;color:#2c3e50;margin-bottom:5px}.selected-hint-item{display:inline-block;padding:4px 8px;margin:2px;background-color:#3498db;color:#fff;border-radius:3px;font-size:.9rem}.execute-btn{display:block;width:200px;margin:30px auto;padding:15px 30px;font-size:1.2rem;font-weight:700;color:#fff;background:linear-gradient(135deg,#667eea,#764ba2);border:none;border-radius:30px;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 15px #667eea66;position:relative;overflow:hidden}.execute-btn:hover{transform:translateY(-3px);box-shadow:0 8px 25px #667eea80}.execute-btn:active{transform:translateY(-1px);box-shadow:0 4px 15px #667eea66}.result-section{padding:30px;background:linear-gradient(135deg,#e8f4f8,#d6e9f1);border-radius:15px;margin-bottom:30px;box-shadow:0 5px 15px #00000014}.result-section h2{color:#2c3e50;margin-bottom:15px}.result-content{font-size:1.3rem;color:#2c3e50;padding:20px;background-color:#fff;border-radius:10px;border:2px solid #667eea;box-shadow:0 3px 10px #667eea1a}.examples{margin-top:40px;padding:20px;background-color:#f8f9fa;border-radius:5px}.examples h3{color:#2c3e50;margin-bottom:15px}.examples ul{list-style:none;padding-left:0}.examples li{padding:8px 0;color:#555;font-size:.95rem}.examples li:before{content:"▸ ";color:#3498db;font-weight:700}.pathfind-result{padding:20px}.pathfind-result h3{color:#2c3e50;margin-bottom:15px}.hint-sequence{margin-bottom:20px;padding:15px;background-color:#f0f8ff;border-radius:5px}.hint-badge{display:inline-block;padding:4px 8px;margin:0 4px;background-color:#3498db;color:#fff;border-radius:3px;font-size:.9rem}.transformation-steps{padding:15px;background-color:#fff;border:1px solid #ddd;border-radius:5px}.transformation-steps ol{margin-left:20px;margin-top:10px}.transformation-steps li{padding:5px 0;font-family:monospace;font-size:1.1rem}.step-hint{color:#7f8c8d;font-size:.9rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.no-path{text-align:center;color:#e74c3c;font-size:1.1rem;padding:20px}.no-path-result{padding:20px;width:100%;max-width:1200px;margin:0 auto}.best-attempts{margin-top:30px;padding:20px;background-color:#f8f9fa;border-radius:5px}.best-attempts h3{color:#2c3e50;margin-bottom:10px}.best-attempts-description{color:#7f8c8d;margin-bottom:20px}.best-attempts-list{list-style:none;margin:0;counter-reset:best-attempt;padding:0 0 0 30px}.best-attempt-item{background-color:#fff;border:1px solid #ddd;border-radius:5px;padding:20px;margin-bottom:20px;counter-increment:best-attempt;position:relative;box-shadow:0 2px 4px #0000001a;transition:box-shadow .3s}.best-attempt-item:hover{box-shadow:0 4px 8px #00000026}.best-attempt-item:before{content:counter(best-attempt) ".";position:absolute;left:-25px;top:15px;font-weight:700;color:#3498db}.attempt-text{font-size:1.3rem;font-family:monospace;color:#2c3e50;margin-bottom:15px;padding:15px;background-color:#ecf0f1;border-radius:5px;line-height:1.6;word-break:break-word}.attempt-info{display:flex;gap:20px;margin-bottom:10px}.attempt-distance,.attempt-steps{font-size:.9rem;color:#7f8c8d}.attempt-path{font-size:.9rem;color:#555}.hint-badge-small{display:inline-block;padding:2px 6px;margin:0 2px;background-color:#3498db;color:#fff;border-radius:3px;font-size:.8rem}.loading-section{text-align:center;padding:40px}.loading-spinner{display:inline-block;width:50px;height:50px;border:5px solid #f3f3f3;border-top:5px solid #3498db;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:20px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (max-width: 768px){.container{padding:10px}header{padding:30px 20px;margin-bottom:20px}h1{font-size:2.2rem}.subtitle{font-size:1rem}main{padding:20px}.mode-selector{flex-direction:column;gap:15px}.mode-selector label{max-width:100%;padding:20px}.execute-btn{width:100%;max-width:300px}.hint-group-items{grid-template-columns:1fr}.best-attempts-list{padding-left:20px}.best-attempt-item:before{left:-20px}}@media (max-width: 480px){h1{font-size:1.8rem;letter-spacing:1px}.subtitle{font-size:.9rem}main{padding:15px}.form-group label{font-size:.9rem}input[type=text],select{font-size:.95rem;padding:10px 12px}.execute-btn{font-size:1.1rem;padding:12px 25px}.result-content{font-size:1.1rem;padding:15px}.attempt-text{font-size:1.1rem;padding:12px}}.loading-text{color:#7f8c8d;font-size:1.1rem;margin:0}.progress-bar-container{display:flex;align-items:center;justify-content:center;gap:15px;margin:20px auto;max-width:400px}.progress-bar{flex:1;height:20px;background-color:#ecf0f1;border-radius:10px;overflow:hidden;position:relative;box-shadow:inset 0 1px 3px #0003}.progress-bar-fill{height:100%;background:linear-gradient(90deg,#3498db,#2ecc71);width:0%;transition:width .3s ease;border-radius:10px;box-shadow:0 1px 3px #0003}.progress-percentage{font-size:1rem;font-weight:700;color:#2c3e50;min-width:50px;text-align:right}.loading-progress{color:#95a5a6;font-size:.9rem;line-height:1.5;max-width:500px;margin:10px auto;padding:10px;background-color:#f8f9fa;border-radius:5px}.cancel-btn{margin-top:20px;padding:10px 20px;font-size:1rem;color:#fff;background-color:#e74c3c;border:none;border-radius:5px;cursor:pointer;transition:background-color .3s}.cancel-btn:hover{background-color:#c0392b}.cancel-btn:active{transform:translateY(1px)}.slider{width:100%;height:8px;background:#e0e0e0;outline:none;opacity:.8;transition:opacity .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:5px;margin-top:15px}.slider:hover{opacity:1}.slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:22px;height:22px;background:linear-gradient(135deg,#667eea,#764ba2);cursor:pointer;border-radius:50%;box-shadow:0 2px 5px #0003;transition:all .3s ease}.slider::-webkit-slider-thumb:hover{transform:scale(1.2);box-shadow:0 3px 8px #667eea66}.slider::-moz-range-thumb{width:22px;height:22px;background:linear-gradient(135deg,#667eea,#764ba2);cursor:pointer;border-radius:50%;box-shadow:0 2px 5px #0003;transition:all .3s ease;border:none}.slider::-moz-range-thumb:hover{transform:scale(1.2);box-shadow:0 3px 8px #667eea66}.encode-result{display:flex;flex-direction:column;gap:20px}.answer-text{background-color:#fef3e2;padding:20px;border-radius:8px;border-left:4px solid #f39c12}.answer-text h3{margin-top:0;margin-bottom:10px;color:#f39c12;font-size:1.1rem}.answer-content{font-size:1.2rem;font-weight:700;margin:0;padding:10px;background-color:#fff;border-radius:4px;box-shadow:0 2px 4px #0000001a}.problem-text{background-color:#f8f9fa;padding:20px;border-radius:8px;border-left:4px solid #2c3e50}.problem-text h3{margin-top:0;margin-bottom:10px;color:#2c3e50;font-size:1.1rem}.problem-content{font-size:1.2rem;font-weight:700;margin:0;padding:10px;background-color:#fff;border-radius:4px;box-shadow:0 2px 4px #0000001a}.used-hints{background-color:#e8f4f8;padding:20px;border-radius:8px;border-left:4px solid #3498db}.used-hints h3{margin-top:0;margin-bottom:10px;color:#3498db;font-size:1.1rem}.hint-list{list-style-type:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:10px}.hint-list li{background-color:#fff;padding:8px 16px;border-radius:20px;font-size:.95rem;box-shadow:0 2px 4px #0000001a;border:1px solid #e0e0e0}.mode-description{background-color:#f8f9fa;padding:16px;margin-bottom:20px;border-radius:8px;border-left:4px solid #3498db}.mode-description p{margin:0;color:#555;font-size:.95rem;line-height:1.5}
