/* 全体 */
.mypage-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

/* マイページ */
.mypage {
    max-width: 960px;
    margin: 16px auto 40px;
    padding: 0 12px 40px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #333;
    background-color: #faf9f5;
}

/* マイページ内のタイトル */
.mypage .mypage-title {
    margin: 8px 0 12px;
}

/* メッセージ */
.mypage-message {
    padding: 8px 10px;
    margin: 4px 0 12px;
    border-radius: 6px;
    font-size: 13px;
}

.mypage-message--success {
    background: #e8f5e9;
    color: #256029;
    border: 1px solid #c8e6c9;
}

.mypage-message--error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}

/* プロフィールカード */
.mypage-profile {
    margin-bottom: 24px;
}

.mypage-profile__inner {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #fffdf7;
    border: 1px solid #f0e2c2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.mypage-profile__avatar {
    flex: 0 0 80px;
}

.mypage-profile__avatar img {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffc86b;
    background: #fff;
}

.mypage-profile__info {
    flex: 1;
    min-width: 0;
}

.mypage-profile__row {
    display: flex;
    align-items: center;
    /* justify-content: space-between; は削除 */
    gap: 8px;
    margin-bottom: 4px;
}

.mypage-profile__name {
    font-size: 20px;
    margin: 0;
    font-weight: 700;
    margin-right: auto;  /* ← これで名前とボタンの間が可変余白になる */
}

.mypage-profile__edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid #ffb74d;
    background: #fff7e1;
    color: #9a5a00;
    text-decoration: none;
    white-space: nowrap;
}

.mypage-profile__edit-btn:hover {
    background: #ffe4b8;
}

/* ボタン同士の余白だけ追加（これはあった方が見やすいので残し推奨） */
.mypage-profile__edit-btn + .mypage-profile__edit-btn {
    margin-left: 4px;
}

/* プロフィールのタグ（年代・性別・アバター名） */
.mypage-profile__meta {
    margin: 4px 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.profile-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef7ff;
    color: #345;
    font-size: 11px;
}

/* ポイント表示 */
.mypage-profile__points {
    margin-top: 4px;
}

.points-label {
    font-size: 12px;
    color: #666;
}

.points-value {
    font-size: 24px;
    font-weight: 700;
    color: #f57c00;
    line-height: 1.2;
}

.points-unit {
    font-size: 12px;
    margin-left: 4px;
    color: #666;
}

.points-note {
    margin: 4px 0 0;
    font-size: 11px;
    color: #888;
}

/* セクション（お気に入り・チェックイン） */
.mypage-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mypage-section {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 12px 12px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.mypage-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mypage-section__header h2 {
    font-size: 16px;
    margin: 0;
}

/* リスト共通 */
.spot-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spot-list__item + .spot-list__item {
    margin-top: 6px;
}

.spot-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fff;
    transition:
        background-color 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.05s ease,
        border-color 0.12s ease;
}

.spot-card:hover {
    background: #fffdf5;
    border-color: #ffcc80;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transform: translateY(-1px);
}

.spot-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spot-card__thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

.spot-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spot-card__title {
    font-size: 14px;
    font-weight: 600;
}

.spot-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 11px;
    color: #666;
}

.spot-card__province {
    padding: 2px 6px;
    border-radius: 999px;
    background: #f0f7ff;
    color: #345;
}

.spot-card__date {
    color: #888;
}

/* バッジ */
.spot-card__badge {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.spot-card__badge--favorite {
    background: #fff3cd;
    color: #856404;
}

.spot-card__badge--checkin {
    background: #e8f5e9;
    color: #256029;
}

.mypage-empty {
    margin: 4px 0 0;
    font-size: 13px;
    color: #777;
}

/* プロフィール編集フォーム */
.profile-form {
    margin-top: 8px;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.profile-form__field {
    margin-bottom: 12px;
    font-size: 13px;
}

.profile-form__field label {
    display: block;
}

.profile-form__field input[type="text"],
.profile-form__field select {
    margin-top: 4px;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 13px;
    width: 100%;
    max-width: 260px;
    box-sizing: border-box;
}

.profile-form__note {
    margin: 4px 0 0;
    font-size: 11px;
    color: #888;
}

.profile-form__label {
    font-weight: 600;
}

/* アバター一覧 */
.avatar-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.avatar-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    cursor: pointer;
}

.avatar-item input[type="radio"] {
    margin-bottom: 2px;
}

.avatar-item__thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #ccc;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-item__thumb--none {
    border: 1px dashed #ccc;
    font-size: 11px;
    color: #999;
}

.avatar-item__label {
    text-align: center;
    max-width: 72px;
}

/* ボタン */
.profile-form__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.profile-form__submit,
.profile-form__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid #ffb74d;
    background: #fff7e1;
    color: #9a5a00;
    text-decoration: none;
}

.profile-form__submit:hover,
.profile-form__back:hover {
    background: #ffe4b8;
}

.profile-form__submit {
    background: #ffcc80;
    border-color: #ffa726;
    color: #4a2b00;
}

.profile-form__submit:hover {
    background: #ffb74d;
}

/* スマホレイアウト調整 */
@media (max-width: 600px) {
    .mypage-profile__inner {
        flex-direction: row;
        align-items: flex-start;
    }

    .mypage-profile__avatar {
        flex: 0 0 64px;
    }

    .mypage-profile__avatar img {
        width: 64px;
        height: 64px;
    }

    .mypage-profile__name {
        font-size: 18px;
    }
}

/* ログイン画面用（マイページとトーンを統一） */
.auth-card {
    margin: 24px auto 8px;
    max-width: 520px;
}

/* ログインカード内のタイトル */
.auth-card .mypage-title {
    margin: 0 0 4px;
}

.mypage-subtitle {
    margin: 0 0 8px;
    font-size: 13px;
    color: #777;
}

.auth-lead {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    margin: 4px 0 12px;
}

.auth-message {
    font-size: 13px;
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 6px;
}

.auth-message--error {
    background: #ffecec;
    color: #b00020;
    border: 1px solid #ffb3b3;
}

.auth-form {
    margin-top: 4px;
}

.auth-form__row {
    margin-bottom: 12px;
}

.auth-form__label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #444;
}

.auth-form__input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box;
}

.auth-form__input:focus {
    outline: none;
    border-color: #3a7bd5;
    box-shadow: 0 0 0 2px rgba(58,123,213,0.15);
}

.auth-form__actions {
    margin-top: 8px;
}

.auth-form__submit {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #3a7bd5;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.auth-form__submit:hover {
    background: #336abb;
}

.auth-note {
    margin-top: 10px;
    font-size: 11px;
    color: #777;
    line-height: 1.6;
}

.auth-back-link {
    text-align: center;
    font-size: 12px;
    margin: 4px 0 0;
}

.auth-back-link a {
    color: #3a7bd5;
    text-decoration: none;
}

.auth-back-link a:hover {
    text-decoration: underline;
}
