* {
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f0f4f8;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}
.tool {
    max-width: 680px;
    width: 100%;
    background: white;
    border-radius: 24px;
    padding: 24px 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}
h1 {
    margin: 0 0 6px 0;
    font-size: 1.8rem;
    font-weight: 650;
    color: #0b3b5c;
}
.subtitle {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d1d9e6;
    display: flex;
    justify-content: space-between;
}
.total-card {
    background: #0b3b5c;
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 24px;
    color: white;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.total-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}
.total-number {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
}
.total-detail {
    width: 100%;
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #bdd3e8;
    flex-wrap: wrap;
}
.total-detail span strong {
    color: white;
    font-size: 1rem;
    margin-right: 4px;
}
.section-title {
    font-size: 1.1rem;
    font-weight: 650;
    margin: 20px 0 12px 0;
    color: #1e405e;
    border-left: 5px solid #0284c7;
    padding-left: 14px;
}
.four-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
    margin-bottom: 10px;
}
.input-item {
    display: flex;
    flex-direction: column;
}
.input-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}
.input-item input {
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    font-size: 1rem;
    background: white;
    transition: 0.15s;
}
.input-item input:focus {
    border-color: #0284c7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(2,132,199,0.1);
}
.input-item input::placeholder {
    color: #9ca3af;
    font-size: 0.85rem;
}
.score-note {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 3px;
}
.group-card {
    background: #f9fbfd;
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 18px;
    border: 1px solid #dfe7ef;
}
.group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.group-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 650;
    color: #075985;
}
.group-header .max-score {
    font-size: 0.85rem;
    background: #dbeafe;
    padding: 4px 12px;
    border-radius: 30px;
    color: #0369a1;
}
.row-2 {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.row-2 .input-item {
    flex: 1;
    min-width: 130px;
}
.result-badge {
    background: white;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid #cfe2f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.group-total {
    font-size: 1.9rem;
    font-weight: 700;
    color: #0369a1;
}
.breakdown {
    font-size: 0.8rem;
    color: #2c5b7c;
}
.level-badge {
    background: #e6f0fa;
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    color: #1e3a8a;
}
.error-msg {
    color: #b91c1c;
    font-size: 0.75rem;
    margin-top: 4px;
    min-height: 18px;
}
.footnote {
    margin-top: 20px;
    font-size: 0.75rem;
    color: #62748c;
    text-align: center;
    border-top: 1px solid #dde3ed;
    padding-top: 16px;
}
.empty-hint {
    color: #9ca3af;
    font-style: italic;
}