*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{font-size:16px}body{font-family:Hiragino Sans,Noto Sans JP,Meiryo,system-ui,sans-serif;background:#f5f6fa;color:#1a1a2e;line-height:1.6;min-height:100vh}a{color:#4f46e5;text-decoration:none}a:hover{text-decoration:underline}.auth-container{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem 1rem}.auth-container h1{font-size:1.75rem;font-weight:700;margin-bottom:.25rem;color:#1a1a2e}.auth-card{background:#fff;border-radius:12px;box-shadow:0 4px 24px #00000014;padding:2rem 2.5rem;width:100%;max-width:400px;margin-top:1.5rem}.auth-logo{font-size:2.2rem;font-weight:800;color:#4f46e5;letter-spacing:-.03em;margin-bottom:.25rem}.auth-subtitle{color:#6b7280;font-size:.9rem;margin-bottom:1.75rem}.form-group{margin-bottom:1.25rem}.form-group label{display:block;font-size:.875rem;font-weight:600;color:#374151;margin-bottom:.4rem}.form-group input,.form-group select,.form-group textarea{width:100%;padding:.625rem .875rem;border:1.5px solid #d1d5db;border-radius:8px;font-size:1rem;font-family:inherit;color:#1a1a2e;background:#fff;transition:border-color .15s,box-shadow .15s;outline:none}.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:#4f46e5;box-shadow:0 0 0 3px #4f46e51f}.field-error{color:#dc2626;font-size:.8rem;margin-top:.3rem}.form-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;color:#dc2626;font-size:.875rem;padding:.6rem .875rem;margin-bottom:1rem}button,.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.625rem 1.25rem;border-radius:8px;font-size:.9375rem;font-weight:600;font-family:inherit;border:none;cursor:pointer;transition:background .15s,opacity .15s,transform .1s}button:active{transform:scale(.98)}button:disabled{opacity:.55;cursor:not-allowed;transform:none}button[type=submit],.btn-primary{background:#4f46e5;color:#fff;width:100%}button[type=submit]:hover:not(:disabled),.btn-primary:hover:not(:disabled){background:#4338ca}.btn-secondary{background:#f3f4f6;color:#374151;border:1.5px solid #e5e7eb}.btn-secondary:hover:not(:disabled){background:#e5e7eb}.btn-danger{background:#dc2626;color:#fff}.btn-danger:hover:not(:disabled){background:#b91c1c}.btn-danger-small{background:transparent;color:#dc2626;border:1.5px solid #dc2626;font-size:.8rem;padding:.3rem .7rem}.btn-danger-small:hover:not(:disabled){background:#fef2f2}.auth-footer{margin-top:1.25rem;font-size:.875rem;color:#6b7280;text-align:center}.page-container{max-width:900px;margin:0 auto;padding:2rem 1rem}.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem}.page-header h1{font-size:1.5rem;font-weight:700}.card{background:#fff;border-radius:10px;box-shadow:0 2px 12px #0000000f;padding:1.5rem;margin-bottom:1rem}table{width:100%;border-collapse:collapse;font-size:.9rem}th{background:#f9fafb;font-weight:600;text-align:left;padding:.7rem 1rem;border-bottom:2px solid #e5e7eb;color:#374151}td{padding:.65rem 1rem;border-bottom:1px solid #f3f4f6}tr:last-child td{border-bottom:none}tr:hover td{background:#fafafa}.badge{display:inline-block;font-size:.75rem;font-weight:600;padding:.2rem .6rem;border-radius:999px}.badge-private{background:#f3f4f6;color:#374151}.badge-shared{background:#dbeafe;color:#1d4ed8}.badge-preparing{background:#fef9c3;color:#a16207}.badge-in_progress{background:#dcfce7;color:#15803d}.badge-finished{background:#f3f4f6;color:#6b7280}.empty-state{text-align:center;padding:3rem 1rem;color:#9ca3af}.error-message{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;color:#dc2626;font-size:.875rem;padding:.6rem .875rem;margin:.75rem 0}.warning-message{background:#fffbeb;border:1px solid #fde68a;border-radius:8px;color:#92400e;font-size:.875rem;padding:.6rem .875rem;margin:.75rem 0}[role=dialog]{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:100}.dialog-box{background:#fff;border-radius:12px;padding:2rem;max-width:420px;width:90%;box-shadow:0 8px 40px #0000002e}.dialog-box h2{font-size:1.1rem;font-weight:700;margin-bottom:.5rem}.dialog-box p{color:#4b5563;font-size:.9rem;margin-bottom:1.5rem}.dialog-actions{display:flex;gap:.75rem;justify-content:flex-end}@media (max-width: 480px){.auth-card{padding:1.5rem}}:root{--color-accent: #6c63ff;--color-accent-dark: #4f46e5;--color-accent-glow: rgba(108, 99, 255, .3);--color-surface: #1a1a2e;--color-surface-elevated: #16213e;--color-surface-card: #0f3460;--color-text-primary: #e8e8f0;--color-text-secondary: #a0a0b8;--color-red: #ff4466;--color-white-team: #e8e8f0;--color-gold: #ffd700;--color-silver: #c0c0c0;--color-bronze: #cd7f32}.match-bracket{max-width:1200px;margin:0 auto;padding:1.5rem 1rem}.bracket-grid{display:flex;gap:2rem;overflow-x:auto;padding-bottom:1rem}.bracket-round{min-width:200px;flex-shrink:0}.bracket-round h2{font-size:.875rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#6b7280;margin-bottom:.75rem}.match-card{background:#fff;border-radius:10px;border:2px solid #e5e7eb;padding:.875rem;margin-bottom:.75rem;transition:border-color .15s}.match-card.match-in_progress{border-color:#6c63ff;box-shadow:0 0 0 3px #6c63ff26}.match-card.match-completed{border-color:#d1fae5;background:#f0fdf4}.match-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.match-status{font-size:.75rem;font-weight:600;padding:.15rem .5rem;border-radius:999px;background:#f3f4f6;color:#6b7280}.match-in_progress .match-status{background:#ede9fe;color:#7c3aed}.match-completed .match-status{background:#d1fae5;color:#065f46}.match-pos{font-size:.75rem;color:#9ca3af}.match-participant{display:flex;justify-content:space-between;align-items:center;padding:.3rem 0;border-radius:6px}.match-participant.winner{font-weight:700;color:#6c63ff}.team-badge{display:inline-block;font-size:.7rem;font-weight:700;padding:.1rem .35rem;border-radius:4px;margin-right:.35rem}.team-badge.team-red{background:#fee2e2;color:#dc2626}.team-badge.team-white{background:#f3f4f6;color:#374151}.rating-badge{font-size:.75rem;color:#9ca3af;margin-left:.25rem}.participant-score{font-weight:700;font-size:.9rem}.draw-label{font-size:.8rem;color:#9ca3af;font-style:italic}.confirmed-badge{display:inline-block;background:#d1fae5;color:#065f46;font-size:.8rem;font-weight:700;padding:.2rem .7rem;border-radius:999px}.bracket-actions{display:flex;gap:.75rem;align-items:center;margin-bottom:1.5rem}.match-score-input{max-width:700px;margin:0 auto;padding:1.5rem 1rem}.score-section,.winner-section{background:#fff;border-radius:10px;padding:1.5rem;margin-bottom:1.5rem;box-shadow:0 2px 8px #0000000f}.score-section h2,.winner-section h2{font-size:1.1rem;font-weight:700;margin-bottom:1rem}.score-row{display:flex;align-items:center;justify-content:space-between;padding:.6rem 0;border-bottom:1px solid #f3f4f6}.score-row:last-child{border-bottom:none}.participant-info,.score-input-group{display:flex;align-items:center;gap:.5rem}.score-input{width:120px;padding:.4rem .6rem;border:1.5px solid #d1d5db;border-radius:6px;font-size:.9rem;text-align:right}.score-source{font-size:.75rem;color:#9ca3af}.btn-sm{padding:.3rem .65rem;font-size:.8rem;border-radius:6px;background:#f3f4f6;border:1.5px solid #e5e7eb;color:#374151;font-weight:600;cursor:pointer}.btn-sm:hover:not(:disabled){background:#e5e7eb}.btn-sm.btn-secondary{background:#f3f4f6}.btn-sm.btn-danger{background:#fee2e2;color:#dc2626;border-color:#fca5a5}.winner-override{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.participant-management{max-width:900px;margin:0 auto;padding:1.5rem 1rem}.participant-form{display:flex;gap:.75rem;flex-wrap:wrap;align-items:flex-end}.participant-form .form-group{margin-bottom:0;flex:1;min-width:120px}.participant-form button{padding:.625rem 1.25rem;align-self:flex-end}.data-table{width:100%}.data-table th,.data-table td{padding:.6rem .75rem}.text-muted{color:#9ca3af;font-style:italic}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:100}.modal{background:#fff;border-radius:12px;padding:2rem;max-width:480px;width:90%;box-shadow:0 8px 40px #0000002e}.modal h2{font-size:1.1rem;font-weight:700;margin-bottom:1.25rem}.form-actions{display:flex;gap:.75rem;justify-content:flex-end;margin-top:1.5rem}.handicap-badge{display:inline-block;font-size:.72rem;font-weight:700;padding:.15rem .5rem;border-radius:999px;margin-left:.25rem}.handicap-redraw{background:#fef9c3;color:#a16207}.handicap-specify{background:#ede9fe;color:#7c3aed}.handicap-swap{background:#dbeafe;color:#1d4ed8}.handicap-points{background:#d1fae5;color:#065f46}.handicap-detail{font-weight:400}.song-picker{max-width:700px;margin:0 auto;padding:1.5rem 1rem}.song-picker-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem;flex-wrap:wrap;gap:.5rem}.song-picker-count{font-weight:700;color:#4f46e5}.stale-warning{font-size:.8rem;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:6px;padding:.3rem .6rem}.song-picker-filters{display:flex;gap:.75rem;margin-bottom:1rem}.song-search{flex:1;padding:.5rem .75rem;border:1.5px solid #d1d5db;border-radius:8px;font-size:.9rem}.diff-filter{padding:.5rem .75rem;border:1.5px solid #d1d5db;border-radius:8px;font-size:.9rem}.song-list{max-height:400px;overflow-y:auto;border:1.5px solid #e5e7eb;border-radius:8px;margin-bottom:1rem}.song-item{display:flex;justify-content:space-between;align-items:center;padding:.65rem 1rem;border-bottom:1px solid #f3f4f6;cursor:pointer;transition:background .1s}.song-item:last-child{border-bottom:none}.song-item:hover:not(.disabled){background:#f5f3ff}.song-item.selected{background:#ede9fe}.song-item.disabled{opacity:.45;cursor:not-allowed}.song-info{display:flex;flex-direction:column}.song-title{font-weight:600;font-size:.9rem}.song-artist{font-size:.78rem;color:#6b7280}.song-meta{display:flex;align-items:center;gap:.5rem}.song-level{font-size:.8rem;font-weight:600}.diff-badge{font-size:.7rem;font-weight:700;padding:.1rem .4rem;border-radius:4px}.diff-basic{background:#dbeafe;color:#1d4ed8}.diff-advanced{background:#fef9c3;color:#a16207}.diff-expert{background:#fee2e2;color:#dc2626}.diff-master{background:#ede9fe;color:#7c3aed}.diff-ultima{background:#1a1a2e;color:#e8e8f0}.song-picker-actions{display:flex;gap:.75rem;justify-content:flex-end}.back-link{font-size:.875rem;color:#6b7280;text-decoration:none;display:inline-flex;align-items:center;gap:.25rem;margin-bottom:.75rem}.back-link:hover{color:#4f46e5;text-decoration:none}.page-actions{display:flex;gap:.75rem;margin-top:2rem}.tournament-detail{max-width:800px;margin:0 auto;padding:1.5rem 1rem}.action-buttons{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1.25rem}.status-actions{margin-top:1.5rem}.status-actions h2{font-size:1rem;font-weight:700;margin-bottom:.75rem}.status-actions button{margin-right:.5rem;margin-bottom:.5rem}.danger-zone{margin-top:2rem;padding-top:1.5rem;border-top:1px solid #f3f4f6}.tournament-form{max-width:560px;margin:0 auto;padding:1.5rem 1rem}.tournament-form h1{font-size:1.5rem;font-weight:700;margin-bottom:1.5rem}.tournament-list{max-width:800px;margin:0 auto;padding:1.5rem 1rem}.tournament-list h1{font-size:1.5rem;font-weight:700}.tournament-cards{list-style:none;display:flex;flex-direction:column;gap:.75rem;margin-top:1rem}.tournament-card-link{display:flex;justify-content:space-between;align-items:center;width:100%;background:#fff;border-radius:10px;padding:1rem 1.25rem;border:1.5px solid #e5e7eb;cursor:pointer;text-align:left;transition:border-color .15s,box-shadow .15s;gap:1rem}.tournament-card-link:hover{border-color:#6c63ff;box-shadow:0 0 0 3px #6c63ff1a}.tournament-card-main{display:flex;flex-direction:column;gap:.3rem}.tournament-title{font-size:1rem;font-weight:700;color:#1a1a2e}.tournament-tags{display:flex;gap:.4rem;flex-wrap:wrap}.tag{display:inline-block;font-size:.7rem;font-weight:600;padding:.1rem .45rem;border-radius:4px}.tag-machine{background:#ede9fe;color:#7c3aed}.tag-format{background:#dbeafe;color:#1d4ed8}.tournament-meta{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.status-badge{font-size:.75rem;font-weight:600;padding:.2rem .55rem;border-radius:999px}.status-preparing{background:#fef9c3;color:#a16207}.status-in_progress{background:#dcfce7;color:#15803d}.status-finished{background:#f3f4f6;color:#6b7280}.visibility-badge{font-size:.72rem;color:#9ca3af}.add-participant{margin-bottom:2rem}.add-participant h2{font-size:1.1rem;font-weight:700;margin-bottom:.875rem}
