/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #F5F7FA;
    /* 清潔感のある薄いグレー */
    color: #333;
    line-height: 1.6;
    padding-bottom: 40px;
}

/* Header */
.app-header {
    background-color: #0F2350;
    /* 濃いネイビー */
    color: #fff;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.app-header .subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
    margin-bottom: 16px;
}

.app-description {
    font-size: 0.85rem;
    color: #CED4DA;
    /* 少しグレーがかった白 */
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Layout */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Input Section */
.input-section {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0F2350;
    margin-bottom: 8px;
}

input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    transition: border-color 0.2s;
    outline: none;
    font-family: inherit;
}

input[type="number"]:focus {
    border-color: #0F2350;
}

.input-with-actions {
    display: flex;
    gap: 12px;
}

.input-with-actions input {
    flex: 1;
}

.quick-add-buttons {
    display: flex;
    gap: 8px;
}

.btn-quick {
    background: #EBF0F5;
    color: #0F2350;
    border: none;
    border-radius: 6px;
    padding: 0 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-quick:active {
    background: #D1D9E0;
}

.btn-primary {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #C5A059 0%, #A08040 100%);
    /* ゴールド */
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    margin-top: 12px;
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 6px rgba(197, 160, 89, 0.4);
}

.btn-secondary {
    background: #0F2350;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
}

.input-row {
    display: flex;
}

.input-row input {
    border-radius: 8px 0 0 8px;
}

/* Result Section */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.plan-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    transition: transform 0.3s;
}

.plan-card:hover {
    transform: translateY(-2px);
}

/* 倍プッシュを目立たせる */
.plan-card.featured {
    border: 2px solid #C5A059;
    box-shadow: 0 8px 24px rgba(197, 160, 89, 0.15);
}

.plan-header {
    background: #F8FAFC;
    padding: 16px 20px;
    border-bottom: 1px solid #EDF2F7;
}

.plan-badge {
    display: inline-block;
    background: #0F2350;
    color: #C5A059;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.plan-card.featured .plan-badge {
    background: #C5A059;
    color: #0F2350;
}

.plan-header h3 {
    font-size: 1.25rem;
    color: #0F2350;
    margin-bottom: 4px;
}

.plan-desc {
    font-size: 0.9rem;
    color: #718096;
}

.plan-body {
    padding: 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.result-row .label {
    font-size: 0.95rem;
    color: #4A5568;
}

.result-row .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F2350;
}

.discount-badge {
    background: #FFF9E6;
    /* 薄いゴールド/イエロー */
    color: #946C00;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.discount-badge .highlight {
    font-size: 1.2rem;
    color: #C5A059;
    margin: 0 4px;
}

.cost-row {
    border-top: 1px dashed #E2E8F0;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-row .label {
    font-weight: 700;
    color: #718096;
    font-size: 0.9rem;
}

.cost-row .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.hidden {
    display: none;
}

.hidden-result {
    margin-top: 16px;
}

.note {
    font-size: 0.8rem;
    color: #A0AEC0;
    margin-top: 8px;
    text-align: right;
}

.error-msg {
    color: #E53E3E;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 16px;
    padding: 10px;
    background: #FFF5F5;
    border-radius: 6px;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section:not(.hidden) .plan-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.result-section:not(.hidden) .plan-card:nth-child(1) {
    animation-delay: 0s;
}

.result-section:not(.hidden) .plan-card:nth-child(2) {
    animation-delay: 0.1s;
}

.result-section:not(.hidden) .plan-card:nth-child(3) {
    animation-delay: 0.2s;
}