.calculator-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.score-summary {
    position: sticky;
    top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto 2rem;
    padding: 1rem 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: fit-content;
}

.step-title {
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.yaku-section {
    margin-bottom: 2rem;
}

.yaku-section h3 {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.yaku-groups {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.yaku-group {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}

.yaku-group h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.yaku-subsection {
    color: #666;
    margin: 1.5rem 0 0.8rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    padding-left: 0.5rem;
    border-left: 3px solid #4CAF50;
}

.yaku-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.yaku-button {
    padding: 0.8rem;
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    touch-action: manipulation;
}

.yaku-button:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

.yaku-button.selected {
    background: #4CAF50;
    border-color: #2E7D32;
    color: #ffffff;
}

/* 후로 시 1판 떨어지는 역 */
.yaku-button.furo-minus {
    border-color: #f44336;
}

.yaku-button.furo-minus:hover {
    background: #ffebee;
    border-color: #d32f2f;
}

.yaku-button.furo-minus.selected {
    background: #f44336;
    border-color: #d32f2f;
    color: #ffffff;
}

.fu-section {
    margin-top: 2rem;
}

.fu-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.fu-button {
    padding: 0.8rem;
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.fu-button:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

.fu-button.selected {
    background: #4CAF50;
    border-color: #2E7D32;
    color: #ffffff;
}

.fu-summary {
    position: sticky;
    top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto 2rem;
    padding: 1rem 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: fit-content;
}

.fu-group {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.fu-group h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.fu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.dora-section, .fu-section {
    margin-top: 2rem;
}

.dora-controls, .fu-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.prev-button, .next-button {
    flex: 1;
    padding: 1rem 2rem;
    background: #ffffff;
    color: #333;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s ease;
    font-weight: 500;
    touch-action: manipulation;
}

.prev-button:hover, .next-button:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

.selected-yaku {
    color: #333;
    margin-top: 1rem;
    text-align: center;
}

.dora-furo-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 2rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.dora-control, .furo-control {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dora-control h3, .furo-control h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.furo-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 34px;
}

/* 토글 스위치 스타일 */
.mhjswitch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    vertical-align: middle;
    margin: 0;
    padding: 0;
}

.mhjswitch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    margin: 0;
    padding: 0;
}

.mhjslider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    width: 60px;
    height: 34px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    margin: 0;
    padding: 0;
}

.mhjslider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    margin: 0;
    padding: 0;
}

input:checked + .mhjslider {
    background-color: #4CAF50;
}

input:focus + .mhjslider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .mhjslider:before {
    transform: translateX(26px);
}

.dora-button {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    font-weight: 500;
    touch-action: manipulation;
}

.dora-button:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

.dora-count {
    color: #333;
    font-size: 1.2rem;
    min-width: 2rem;
    text-align: center;
}

#honba-count {
    color: #ffffff;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.score-value {
    font-size: 1.8rem;
    color: #333;
    font-weight: 600;
}

.body-section {
    margin-top: 2rem;
    display: block;
    gap: 1rem;
}

.body-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.body-item span {
    font-size: 1rem;
    color: #333;
}

.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.button-group .count {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.minus-button, .plus-button {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin: 0.2rem;
    touch-action: manipulation;
}

.head-section {
    margin-top: 2rem;
    gap: 1rem;
}

.exception-section {
    margin-top: 2rem;
    gap: 1rem;
}

.win-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.win-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.toggle-button {
    padding: 0.8rem 1.5rem;
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 1rem;
    width: auto;
    white-space: nowrap;
    touch-action: manipulation;
}

.toggle-button:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

.toggle-button.selected {
    background: #4CAF50;
    border-color: #2E7D32;
    color: #ffffff;
}

.body-section h3, .exception-section h3, .head-section h3, .win-section h3 {
    grid-column: span 4;
}

.body-title {
    font-size: 1rem;
    color: #333;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.next-button {
    width: 100%;
    background: #4CAF50;
    color: white;
    border: none;
}

.next-button:hover {
    background: #2E7D32;
}

.body-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.head-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.exception-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.role-button {
    padding: 0.8rem 1.5rem;
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 1rem;
    width: auto;
    touch-action: manipulation;
}

.role-button:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

.role-button.selected {
    background: #4CAF50;
    border-color: #2E7D32;
    color: #ffffff;
}

.role-selection {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

button:disabled {
    background-color: #d3d3d3; /* 회색 톤 */
    border-color: #a9a9a9;
    color: #666;
    cursor: not-allowed;
}

.result-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.yaku-display {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.yaku-display h3 {
    color: #4CAF50;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.yaku-list {
    color: #4CAF50;
    font-size: 1.3rem;
    text-align: center;
    line-height: 1.6;
    min-height: 2rem;
    font-weight: 500;
}

.result-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 5px;
}

.result-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.result-value {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
    text-align: center;
}

.score-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    border-radius: 8px;
    color: white;
}

/* 만관 - 하늘색 */
.score-result.mangan {
    background: linear-gradient(135deg, #4FC3F7 0%, #0288D1 100%);
}

/* 하네만 - 진한 파란색 */
.score-result.haneman {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
}

/* 배만 - 보라색 */
.score-result.baiman {
    background: linear-gradient(135deg, #9C27B0 0%, #6A1B9A 100%);
}

/* 삼배만 - 분홍색 */
.score-result.sanbaiman {
    background: linear-gradient(135deg, #EC407A 0%, #C2185B 100%);
}

/* 역만 - 빨간색 */
.score-result.yakuman {
    background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
}

/* 등급별 연장횟수 버튼 색상 */
/* 기본 (초록색) - 클래스 없을 때 */
.honba-button {
    border-color: #4CAF50;
}

.honba-button:hover {
    border-color: #2E7D32;
}

/* 만관 - 하늘색 */
.score-result.mangan .honba-button {
    border-color: #4FC3F7;
}

.score-result.mangan .honba-button:hover {
    border-color: #0288D1;
}

/* 하네만 - 진한 파란색 */
.score-result.haneman .honba-button {
    border-color: #64B5F6;
}

.score-result.haneman .honba-button:hover {
    border-color: #1565C0;
}

/* 배만 - 보라색 */
.score-result.baiman .honba-button {
    border-color: #BA68C8;
}

.score-result.baiman .honba-button:hover {
    border-color: #6A1B9A;
}

/* 삼배만 - 분홍색 */
.score-result.sanbaiman .honba-button {
    border-color: #F06292;
}

.score-result.sanbaiman .honba-button:hover {
    border-color: #C2185B;
}

/* 역만 - 빨간색 */
.score-result.yakuman .honba-button {
    border-color: #EF5350;
}

.score-result.yakuman .honba-button:hover {
    border-color: #C62828;
}

.score-result h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.final-score {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin: 0.5rem 0;
}

.score-breakdown {
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.95;
}

.honba-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.honba-label {
    font-size: 1.1rem;
    font-weight: 500;
}

.honba-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.honba-score {
    font-size: 1rem;
    opacity: 0.9;
}

.total-score-display {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.total-label {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.total-value {
    font-size: 3.5rem;
    font-weight: 700;
}

.exception-button {
    padding: 0.8rem 1.5rem;
    background: #ffffff;
    border: 2px solid #FF9800;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 1rem;
    width: auto;
    white-space: nowrap;
    touch-action: manipulation;
}

.exception-button:hover {
    background: #FFF3E0;
    border-color: #F57C00;
}

.exception-button.selected {
    background: #FF9800;
    border-color: #F57C00;
    color: #ffffff;
}

.win-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.win-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.win-button {
    padding: 0.8rem 1.5rem;
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 1rem;
    width: auto;
    white-space: nowrap;
    touch-action: manipulation;
}

.win-button:hover {
    background: #f5f5f5;
    border-color: #2E7D32;
}

.win-button.selected {
    background: #4CAF50;
    border-color: #2E7D32;
    color: #ffffff;
}

.win-button:disabled {
    background-color: #d3d3d3;
    border-color: #a9a9a9;
    color: #666;
    cursor: not-allowed;
}

/* 삼원패 그룹 스타일 */
.yakuhai-group {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 5px;
}

.yakuhai-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.yakuhai-sub {
    flex: 1;
    padding: 0.8rem;
    font-size: 1rem;
}

/* 백 - 하얀색 (회색 테두리로 표현) */
.yakuhai-haku {
    background: #ffffff;
    border-color: #9e9e9e;
    color: #333;
}

.yakuhai-haku:hover {
    background: #f5f5f5;
    border-color: #757575;
}

.yakuhai-haku.selected {
    background: #757575;
    border-color: #616161;
    color: #ffffff;
}

/* 발 - 초록 테두리 & 초록 글씨 */
.yakuhai-hatsu {
    border-color: #4CAF50;
    color: #4CAF50;
}

.yakuhai-hatsu:hover {
    border-color: #2E7D32;
    color: #2E7D32;
}

.yakuhai-hatsu.selected {
    background: #4CAF50;
    border-color: #2E7D32;
    color: #ffffff;
}

/* 중 - 빨간 테두리 & 빨간 글씨 */
.yakuhai-chun {
    border-color: #f44336;
    color: #f44336;
}

.yakuhai-chun:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

.yakuhai-chun.selected {
    background: #f44336;
    border-color: #d32f2f;
    color: #ffffff;
} 