.home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.home-icon {
    width: 20px;
    height: 20px;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.dialog-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 425px;
}

.member-card {
    width: 100px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition:  background-color 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.member-card img {
    max-width: 80%;
    max-height: 160%;
    object-fit: cover;
    object-position: top;
    margin-bottom: 5px;
}

.member-card.selected {
    background-color: rgba(200,200,200,0.2);
}

.member-card span {
    word-break: keep-all;
    white-space: nowrap;
    font-size: 1.1rem;
}

.start-button {
    display: block;
    margin: 0 auto;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.start-button:hover {
    background-color: #2980b9;
}

/* Ranking Table */
#ranking-table-container {
    margin-top: 20px;
    display: none;
    width: 400px;
    margin-left: auto;
    margin-right: auto;
}

#ranking-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

#ranking-table th,
#ranking-table td {
    font-size: 16px;
    padding: 12px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid #edf2f7;
}

#ranking-table th {
    background-color: #e1f5fe;
    font-weight: 600;
    text-align: center;
    color: #4a5568;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

#ranking-table tr:nth-child(odd) td {
    background-color: #f0f8ff;
}

#ranking-table th:nth-child(1) {
    width: 80px;
}

#ranking-table th:nth-child(2) {
    width: 120px;
}

#ranking-table th:nth-child(3) {
    width: auto;
}

#ranking-table td img {
    display: block;
    margin: 0 auto;
    max-width: 60px;
    max-height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#ranking-table td {
    text-align: center;
    color: #2d3748;
}

#ranking-table tr:hover {
    background-color: #f0f8ff;
}

#ranking-table td:first-child {
    font-weight: 600;
    color: #2d3748;
}

/* Special styling for top 3 ranks */
#ranking-table tr:nth-child(1) td:first-child {
    color: #ffd700;
    font-size: 16px;
    font-weight: 700;
}

#ranking-table tr:nth-child(2) td:first-child {
    color: #c0c0c0;
    font-size: 15px;
    font-weight: 700;
}

#ranking-table tr:nth-child(3) td:first-child {
    color: #cd7f32;
    font-size: 14px;
    font-weight: 700;
}

.progress-container {
    width: 100%;
    margin-bottom: 10px;
    background-color: #e1f5fe;
    border-radius: 5px;
    height: 10px;
    margin: 0 auto 10px;
}

.progress-bar {
    height: 100%;
    background-color: #3498db;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.dialog-content .progress-container {
    margin: 10px 0 10px;
}

.dialog-content .progress-text {
    text-align: left;
    margin: 0;
    font-size: 12px;
}

#ranking-table-container {
    font-size: 12px;
}

.ranking-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Noto Sans JP', sans-serif;
    color: #1169ac;
    position: relative;
}

.ranking-title span {
    display: block;
    border-bottom: 3px solid #1169ac;
    padding-bottom: 5px;
    width: fit-content;
    margin: 0 auto;
}

.ranking-title .website-link {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #1169ac;
    white-space: nowrap;
    text-decoration: none;
    font-weight: normal;
}

.kyoyu-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.kyoyu-button:hover {
    background-color: #2980b9;
}

#cheatButton {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4081;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}

#logo-placeholder {
    width: 100%;
    height: 150px;
    background-color: #E7F9FF;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.logo-svg {
    width: 100%;
    height: auto;
    max-height: 150px;
}

.member-card .checkbox {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    z-index: 1;
}

.member-card .checkbox.checked {
    background-color: #3498db;
    border-color: #3498db;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

#unsorted-list-container h2 {
    text-align: center;
}

#select-all-container {
    margin-bottom: 10px;
}

#button-wrapper {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    #button-wrapper {
        justify-content: center;
    }
}

#select-all-button {
    padding: 6px 10px;
    font-size: 0.85rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
    transition: background-color 0.3s ease;
}

#select-all-button:hover {
    background-color: #2980b9;
}

#deselect-all-button {
    padding: 6px 10px;
    font-size: 0.85rem;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
    transition: background-color 0.3s ease;
}

#deselect-all-button:hover {
    background-color: #7f8c8d;
}

#photo-version-toggle {
    margin: 10px 0 20px;
}

.toggle-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    background-color: white;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.toggle-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.toggle-btn:last-child {
    border-radius: 0 4px 4px 0;
}
/* 2026 roster and photo refresh */
.release-note {
    max-width: 860px; margin: 0 auto 18px; padding: 12px 16px;
    background: #f1f9ff; color: #36546b; border-left: 3px solid #75b5db;
    border-radius: 6px; font-size: .88rem; line-height: 1.7;
}
.release-note a, .member-profile-link { color: #176ca7; text-decoration: underline; }
#unsorted-list { justify-content: center; }
#unsorted-list .member-card {
    width: 132px; min-height: 223px; padding: 8px 3px;
    border: 1px solid #e5edf3; background: rgba(255,255,255,.85);
}
#unsorted-list .member-card.selected { border-color: #5ca2ce; background: #eff8ff; }
#unsorted-list .member-card img {
    width: 108px; height: 142px; max-height: none; max-width: none;
    object-fit: cover; object-position: top center; border-radius: 5px;
}
#unsorted-list .member-card span { font-size: .88rem; }
#unsorted-list .member-card .unit-label { color: #0874b4; font-weight: 700; font-size: .75rem; }
#unsorted-list .member-profile-link { font-size: .67rem; margin-top: 2px; }
#ranking-table td img { width: 60px; height: 60px; object-fit: cover; object-position: center top; }
@media (max-width: 480px) {
    .dialog-content { width: calc(100vw - 20px); padding: 12px; }
    .dialog-content .member-card { width: 46%; }
    .dialog-content .member-card span { white-space: normal; font-size: .9rem; }
    #ranking-table-container { max-width: 100%; padding: 8px; }
    #ranking-table th, #ranking-table td { padding: 7px; }
}

#unsorted-list .member-card .member-status {
    color: #805d44; font-size: .65rem; line-height: 1.25; padding: 0 3px;
}
