body {
    font-family: 'Segoe UI', 'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    margin: 0;
    background: #f6f8fa;
}
.container {
    max-width: 520px; /* add_subsc.html用のデフォルト幅 */
    margin: 3em auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5em 2em 2em 2em;
}
/* マイページだけ幅を拡張 */
.container.mypage-wide {
    max-width: 900px;
}
h1 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 0.5em;
    font-size: 2em;
    letter-spacing: 0.05em;
}
h2 {
    color: #4a5568;
    font-size: 1.1em;
    margin-top: 2em;
    margin-bottom: 0.5em;
    border-left: 4px solid #3182ce;
    padding-left: 0.5em;
}
form {
    margin-bottom: 1.5em;
}
label {
    display: block;
    margin-top: 1em;
    color: #374151;
    font-size: 0.97em;
}
input, select {
    width: 100%;
    padding: 0.7em;
    margin-top: 0.4em;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1em;
    background: #f9fafb;
    transition: border 0.2s;
}
input:focus, select:focus {
    border: 1.5px solid #3182ce;
    outline: none;
    background: #fff;
}
button {
    width: 100%;
    padding: 0.8em;
    margin-top: 1.2em;
    background: linear-gradient(90deg, #3182ce 60%, #63b3ed 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(49,130,206,0.07);
    transition: background 0.2s, box-shadow 0.2s;
}
button:hover {
    background: linear-gradient(90deg, #2563eb 60%, #4299e1 100%);
    box-shadow: 0 4px 16px rgba(49,130,206,0.13);
}
.notice {
    color: #718096;
    font-size: 0.93em;
    margin-top: 2em;
    text-align: center;
}
p {
    color: #4a5568;
    text-align: center;
    margin-bottom: 1.5em;
}
.menu {
    display: flex;
    gap: 1em;
    justify-content: center;
    margin-bottom: 2em;
    flex-wrap: wrap;
}
.btn {
    background: linear-gradient(90deg, #3182ce 60%, #63b3ed 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    padding: 0.7em 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(49,130,206,0.07);
    transition: background 0.2s, box-shadow 0.2s;
    margin-bottom: 0.5em;
}
.btn:hover {
    background: linear-gradient(90deg, #2563eb 60%, #4299e1 100%);
    box-shadow: 0 4px 16px rgba(49,130,206,0.13);
}
.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.btn-danger {
    background: #e53e3e;
    color: #fff;
}
.btn-danger:hover {
    background: #c53030;
}
.subsc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(49,130,206,0.04);
}
.subsc-table th, .subsc-table td {
    padding: 0.8em 0.5em;
    text-align: center;
}
.subsc-table th {
    background: #3182ce;
    color: #fff;
    font-weight: bold;
}
.subsc-table tr:nth-child(even) {
    background: #edf2f7;
}
.subsc-table tr:nth-child(odd) {
    background: #fff;
}
.subsc-table td {
    color: #2d3748;
}
/* --- flexレイアウト調整 --- */
.flex-row {
    display: flex;
    gap: 2em;
    align-items: flex-start;
}
.user-actions {
    min-width: 180px;
    background: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(49,130,206,0.04);
    padding: 1.5em 1em;
    margin-top: 2.5em;
    display: flex;
    flex-direction: column;
    gap: 1em;
    height: fit-content;
}
#total-area {
    max-width: 500px;
    margin: 0 auto 1.5em auto;
    padding: 1em;
    background: #f9fafb;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(49,130,206,0.04);
    text-align: center;
}
#total-area div {
    font-weight: bold;
    color: #2d3748;
}
/* --- 追加: マイページヘッダー右寄せ用 --- */
.mypage-header-flex {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2em;
    margin-bottom: 1em;
}
.mypage-header-flex h1 {
    margin-bottom: 0;
}
@media (max-width: 800px) {
    .mypage-header-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5em;
    }
    .mypage-header-flex h1 {
        text-align: center;
    }
    .mypage-header-flex .user-actions {
        margin-top: 0.5em;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 1em;
    }
}
@media (max-width: 800px) {
    .flex-row {
        flex-direction: column;
        gap: 0;
    }
    .user-actions {
        margin-top: 1.5em;
        width: 100%;
    }
}