.andropause-wrap,
#andropause-app {
    max-width: 860px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #1f2937;
}

.andropause-sticky-head {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    padding: 14px 0 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 18px;
}

.andropause-head-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.andropause-title {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
}

.andropause-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #6b7280;
}

.andropause-counter-wrap {
    min-width: 110px;
    text-align: right;
    flex-shrink: 0;
}

.andropause-counter {
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
    padding-top: 2px;
}

.counter-sep {
    margin: 0 2px;
    opacity: 0.8;
}

.andropause-remaining {
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

.andropause-progress-block {
    padding: 0 1px;
}

.andropause-progress-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #4b5563;
}

.bar-bg {
    width: 100%;
    height: 14px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

#barfill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
    transition: width 0.25s ease;
}

.andropause-card,
.result-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.andropause-card {
    margin-bottom: 20px;
}

.question-meta {
    margin-bottom: 14px;
}

.question-badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.question-text {
    font-size: 28px;
    line-height: 1.5;
    font-weight: 700;
    margin-bottom: 22px;
    color: #111827;
    min-height: 120px;
}

.scale-guide {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 18px;
}

.scale-guide-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
}

.scale-guide-items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.scale-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 8px;
    font-size: 12px;
    line-height: 1.45;
    color: #4b5563;
    text-align: center;
}

.answer-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.answer-btn {
    appearance: none;
    border: 2px solid #d1d5db;
    background: #fff;
    color: #111827;
    border-radius: 16px;
    padding: 14px 8px;
    min-height: 82px;
    cursor: pointer;
    transition: all 0.2s ease;
    font: inherit;
}

.answer-btn:hover {
    transform: translateY(-1px);
    border-color: #60a5fa;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.answer-btn.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.answer-score {
    display: block;
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1d4ed8;
}

.answer-label {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    color: #374151;
    font-weight: 600;
}

.validation-msg {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 14px;
    line-height: 1.6;
}

.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn {
    appearance: none;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    flex: 1;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
    min-width: 120px;
}

.btn-wide {
    width: 100%;
    max-width: 360px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.result-area {
    display: grid;
    gap: 20px;
}

.result-title {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 800;
    color: #111827;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.summary-box {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    background: #f9fafb;
}

.summary-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 800;
    color: #111827;
}

.result-comment {
    margin-top: 16px;
}

.result-comment-box {
    border-radius: 14px;
    padding: 16px;
    line-height: 1.8;
    font-size: 15px;
}

.severity-mild {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.severity-moderate {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.severity-high {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.severity-severe {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.chart-wrap {
    position: relative;
    width: 100%;
    min-height: 520px;
}

.axis-scores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.axis-score-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.axis-name {
    font-weight: 600;
    color: #111827;
}

.axis-value {
    font-weight: 700;
    color: #1d4ed8;
    white-space: nowrap;
}

.result-advice {
    font-size: 15px;
    line-height: 1.85;
    color: #374151;
}

.advice-list {
    margin: 0;
    padding-left: 1.2em;
}

.advice-list li + li {
    margin-top: 8px;
}

.result-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

@media (max-width: 900px) {
    .question-text {
        font-size: 24px;
        min-height: 110px;
    }

    .answer-buttons {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .result-summary {
        grid-template-columns: 1fr;
    }

    .axis-scores {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .andropause-wrap,
    #andropause-app {
        padding: 12px;
    }

    .andropause-sticky-head {
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .andropause-head-top {
        flex-direction: column;
        align-items: stretch;
    }

    .andropause-counter-wrap {
        text-align: left;
        min-width: auto;
    }

    .andropause-counter {
        font-size: 26px;
    }

    .question-text {
        font-size: 22px;
        line-height: 1.5;
        min-height: 96px;
    }

    .scale-guide-items {
        grid-template-columns: 1fr;
    }

    .answer-buttons {
        grid-template-columns: 1fr;
    }

    .answer-btn {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 14px;
        min-height: 64px;
        text-align: left;
        padding: 14px 16px;
    }

    .answer-score {
        margin-bottom: 0;
        min-width: 28px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
    }

    .chart-wrap {
        min-height: 420px;
    }

    .andropause-card,
    .result-card {
        padding: 16px;
        border-radius: 16px;
    }

    .result-title {
        font-size: 20px;
    }
}

@media (max-width: 420px) {
    .andropause-title {
        font-size: 21px;
    }

    .andropause-subtitle {
        font-size: 13px;
    }

    .andropause-counter {
        font-size: 24px;
    }

    .question-text {
        font-size: 20px;
    }

    .summary-value {
        font-size: 20px;
    }

    .chart-wrap {
        min-height: 360px;
    }
}