:root {
    --pa-yellow: #FFE600;
    --pa-black: #1A1A1A;
    --pa-gray: #F4F4F6;
    --pa-border: #E5E5E5;
    --pa-font: 'Inter', 'Noto Sans JP', sans-serif;
}

.povo-app-wrapper {
    display: flex; justify-content: center;
    font-family: var(--pa-font); color: var(--pa-black);
    background: transparent; padding: 20px 0;
}

.povo-app-container {
    width: 100%; max-width: 600px;
    background: #FFFFFF; border-radius: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    position: relative; overflow: hidden;
    border: 1px solid rgba(0,0,0,0.02);
}

/* Header */
.pa-header {
    padding: 30px 24px 20px; background: #fff;
    border-bottom: 1px solid var(--pa-gray); text-align: center;
}
.pa-title { font-size: 1.6rem; font-weight: 900; margin: 0; letter-spacing: -0.02em; }
.pa-desc { font-size: 0.85rem; color: #888; margin: 8px 0 0; line-height: 1.5; }

/* Input Area */
.pa-input-section { padding: 24px; background: #fff; border-bottom: 8px solid var(--pa-gray); }
.pa-input-label { display: block; font-size: 1.0rem; font-weight: 700; margin-bottom: 10px; color: #555; }
.pa-input-wrap { position: relative; margin-bottom: 12px; }
.pa-input-field {
    width: 100%; box-sizing: border-box;
    font-size: 1.8rem; font-weight: 900;
    padding: 14px 70px 14px 16px;
    border: 2px solid var(--pa-border); border-radius: 12px;
    outline: none; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #f9f9f9; -moz-appearance: textfield;
}
.pa-input-field:focus { border-color: var(--pa-yellow); background: #fff; box-shadow: 0 4px 20px rgba(255, 230, 0, 0.15); }
.pa-input-unit { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1rem; font-weight: 700; color: #999; }

.pa-mini-result { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; font-size: 0.9rem; color: #555; }
.pa-mini-result .value { font-weight: 700; font-size: 1.2rem; color: var(--pa-black); }

/* Accordion */
.pa-section { border-bottom: 1px solid var(--pa-gray); }
.pa-section-head {
    padding: 24px 24px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; background: #fff; transition: background 0.2s; user-select: none;
}
.pa-section-head:active { background: #fafafa; }
.pa-section-title {
    font-size: 1.1rem; font-weight: 900; color: var(--pa-black);
    border-left: 5px solid var(--pa-yellow); padding-left: 14px; line-height: 1.3;
}
.pa-arrow {
    width: 12px; height: 12px; border-right: 2px solid #ccc; border-bottom: 2px solid #ccc;
    transform: rotate(45deg); transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); margin-bottom: 4px;
}
.pa-section-head.is-open .pa-arrow { transform: rotate(-135deg); border-color: var(--pa-black); margin-bottom: -4px; }

.pa-accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1); opacity: 0; }
.pa-accordion-body.is-open { opacity: 1; }
.pa-accordion-inner { padding-bottom: 24px; }

/* List Items */
.pa-table-head, .pa-list-item {
    display: grid; grid-template-columns: 1.8fr 1fr 0.8fr;
    gap: 12px; padding: 12px 20px; align-items: center;
}
.pa-table-head {
    background: var(--pa-gray); font-size: 0.75rem; font-weight: 700; color: #666;
    text-align: center; line-height: 1.3; border-top: 1px solid #eee; border-bottom: 1px solid #ddd;
}
.pa-table-head .col-1 { text-align: left; }
.pa-table-head .col-3 { text-align: right; }
.pa-table-head .sub { font-weight: 400; font-size: 0.7rem; display: block; }

.pa-list-item {
    cursor: pointer; border-bottom: 1px solid var(--pa-gray);
    transition: transform 0.1s ease, background 0.2s; position: relative;
}
.pa-list-item:active { transform: scale(0.99); background: #fafafa; }

.item-flex { display: flex; align-items: flex-start; gap: 10px; }
.item-center { text-align: center; }
.item-right { text-align: right; }
.sim-input { display: none; }

/* Custom Checkbox Animation */
.custom-check-box {
    width: 24px; height: 24px; border: 2px solid #DDD; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0; margin-top: 2px; background: #fff;
}
.check-mark {
    width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0); transition: transform 0.2s ease; margin-top: -2px;
}
.sim-input:checked + .custom-check-box {
    background: var(--pa-yellow); border-color: var(--pa-yellow); transform: scale(1.1);
}
.sim-input:checked + .custom-check-box .check-mark {
    transform: rotate(-45deg) scale(1); border-color: #000;
}

.item-name-wrap .name { font-size: 1.0rem; font-weight: 700; line-height: 1.4; display: block; }
.badge-limit { display: inline-block; font-size: 0.7rem; background: #FF4444; color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: 700; margin-top: 4px; }
.per30-val { font-size: 0.9rem; font-weight: 700; color: #444; background: #f9f9f9; padding: 4px 8px; border-radius: 6px; }
.price-val { font-size: 1.25rem; font-weight: 900; }
.unit { font-size: 0.8rem; font-weight: 700; margin-left: 2px;}

/* Result Section */
.pa-static-result { padding: 30px 24px; background: #fff; border-top: 2px solid var(--pa-gray); }

/* Savings Box */
.pa-savings-box {
    background: var(--pa-black); color: #fff; margin-bottom: 24px;
    padding: 16px 20px; border-radius: 16px;
    display: flex; align-items: flex-start; gap: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    animation: slideUpFade 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUpFade { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.pa-savings-icon {
    font-size: 2rem; line-height: 1; margin-top: 4px; flex-shrink: 0;
    animation: shake 2.5s infinite ease-in-out;
}
@keyframes shake { 0%, 100% { transform: rotate(0deg); } 10% { transform: rotate(-15deg); } 30% { transform: rotate(15deg); } 50% { transform: rotate(0deg); } }

.pa-savings-text-wrapper { display: block; font-weight: 700; line-height: 1.3; }
.pa-savings-prefix { font-size: 0.9rem; margin-right: 6px; opacity: 0.9; }
.pa-savings-main { font-size: 1.1rem; }
.pa-savings-main .price-hl { color: var(--pa-yellow); font-size: 1.6rem; white-space: nowrap; font-weight: 900; }
.pa-savings-annual { font-size: 0.8rem; color: #ccc; margin-top: 6px; font-weight: 700; }

@media (min-width: 550px) {
    .pa-savings-box { align-items: center; }
    .pa-savings-icon { margin-top: 0; }
    .pa-savings-text-wrapper { display: inline-block; }
    .pa-savings-annual { margin-top: 2px; }
}

.pa-result-row.primary { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pa-result-row.primary .label { font-size: 1.0rem; font-weight: 700; }
.pa-result-row.primary .value { font-size: 2.2rem; font-weight: 900; color: var(--pa-black); line-height: 1; }
.pa-result-sub-grid { display: flex; gap: 12px; padding-top: 12px; border-top: 1px dashed #ddd; }
.pa-mini-stat { flex: 1; display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; }
.pa-mini-stat .label { color: #888; }
.pa-mini-stat .value { font-weight: 700; font-size: 1.0rem; }

@media (max-width: 600px) {
    .povo-app-wrapper { padding: 0; }
    .povo-app-container { max-width: 100%; border-radius: 0; height: auto; border: none; box-shadow: none; }
    .pa-savings-prefix { display: block; margin-bottom: 4px; }
    .pa-savings-main .price-hl { font-size: 1.5rem; }
}
