/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
        "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 430px;
    margin: 0 auto;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

/* ヘッダー */
.header {
    background-color: #2196f3;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 56px;
}

/* Header with back button */
.header.with-back-btn {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    padding: 12px 8px;
}

.header.with-back-btn .page-title,
.header.with-back-btn .app-title {
    text-align: center;
    position: static;
    transform: none;
}

/* Header spacer for balance */
.header-spacer {
    width: 40px;
}

/* Save button in header */
.save-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    transition: opacity 0.2s;
}

.save-btn:hover {
    opacity: 0.8;
}

/* Chat search button */
.chat-search-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter button */
.filter-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Team settings button */
.team-settings-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* Search button */
.search-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-title {
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.notification-btn {
    background: none;
    border: none;
    position: relative;
    cursor: pointer;
    padding: 8px;
}

.notification-icon {
    font-size: 24px;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #ff4444;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .profile-btn {
    margin-right: auto;
}

.profile-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #2196f3;
    border: 2px solid #fff;
    font-weight: bold;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    padding-bottom: 80px;
    overflow-y: auto;
}

/* 運動予約セクション */
.exercise-reservations {
    padding: 8px 16px;
    border-bottom: 8px solid #f5f5f5;
}

.reservation-scroll-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.reservation-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.reservation-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.reservation-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.reservation-card {
    min-width: 160px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.reservation-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reservation-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reservation-link .join-btn {
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.reservation-type {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.reservation-time {
    font-size: 10px;
    font-weight: 500;
    color: #666;
}

.reservation-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.reservation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.reservation-host {
    display: flex;
    align-items: center;
    gap: 4px;
}

.host-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ddd;
}

.participants-count {
    font-size: 10px;
    color: #666;
    font-weight: 500;
}

.join-btn {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.join-btn:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.join-btn:active {
    transform: translateY(0);
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

/* フレンドの動向 */
/* 今日のミッション */
.daily-missions {
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 8px solid #f5f5f5;
}

.daily-missions .section-title {
    margin-bottom: 8px;
}

.missions-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 156px;
    overflow-y: auto;
    padding-right: 4px;
}

.missions-container::-webkit-scrollbar {
    width: 4px;
}

.missions-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.missions-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.missions-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.mission-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mission-card.completed {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.mission-card.in-progress {
    background-color: #fff3e0;
    border-color: #ff9800;
}

.mission-card.locked {
    background-color: #f5f5f5;
    opacity: 0.7;
    cursor: not-allowed;
}

.mission-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.mission-content {
    flex: 1;
}

.mission-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.mission-description {
    font-size: 10px;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

.mission-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.progress-bar-mini {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: #ff9800;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 10px;
    color: #666;
    min-width: 45px;
}

.mission-reward {
    text-align: right;
    flex-shrink: 0;
}

.reward-amount {
    font-size: 16px;
    font-weight: bold;
    color: #2196f3;
}

.reward-label {
    font-size: 10px;
    color: #666;
    margin-left: 1px;
}

.mission-summary {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #2196f3;
    color: white;
    border-radius: 6px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 12px;
}

.summary-value {
    font-size: 16px;
    font-weight: bold;
}

.friends-activities {
    padding: 16px;
}

.activity-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-avatar-link {
    display: inline-block;
    position: relative;
    z-index: 2;
}

.activity-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.activity-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.activity-link .activity-actions button {
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.activity-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.user-avatar-wrapper {
    position: relative;
    margin-right: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4caf50;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.user-avatar .avatar-text {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.user-badge {
    font-size: 16px;
    margin-left: 4px;
}

/* アバターフレーム - タイムライン用 */
.user-avatar.avatar-frame-gold {
    background: linear-gradient(45deg, #ffd700, #ffa000);
    padding: 2px;
}

.user-avatar.avatar-frame-gold .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
}

.user-avatar.avatar-frame-rainbow {
    background: linear-gradient(
        45deg,
        #ff0000,
        #ff7f00,
        #ffff00,
        #00ff00,
        #0000ff,
        #4b0082,
        #9400d3
    );
    background-size: 200% 200%;
    animation: rainbow 3s ease-in-out infinite;
    padding: 2px;
}

.user-avatar.avatar-frame-rainbow .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9400d3;
}

.user-avatar.avatar-frame-fire {
    background: linear-gradient(45deg, #ff4444, #ff8800);
    padding: 2px;
}

.user-avatar.avatar-frame-fire .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
}

.user-avatar.avatar-frame-nature {
    background: linear-gradient(45deg, #4caf50, #81c784);
    padding: 2px;
}

.user-avatar.avatar-frame-nature .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4caf50;
}

.user-avatar.avatar-frame-neon {
    background: linear-gradient(45deg, #e91e63, #f06292, #e91e63);
    animation: neonPulse 2s ease-in-out infinite;
    padding: 2px;
}

.user-avatar.avatar-frame-neon .avatar-text {
    background: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e91e63;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.activity-time {
    font-size: 12px;
    color: #666;
}

.activity-content {
    margin-bottom: 12px;
}

.activity-type {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.activity-description {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.activity-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.stat {
    font-size: 12px;
    color: #666;
    background-color: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

.speed-graph {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 40px;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 0 4px;
    gap: 1px;
}

.speed-bar {
    width: 2px;
    background-color: #2196f3;
    border-radius: 1px 1px 0 0;
    transition: height 0.3s ease;
    min-height: 2px;
}

.activity-image {
    width: 100%;
    height: 200px;
    background-color: #f0f0f0;
    border-radius: 8px;
    margin-top: 8px;
}

/* アクションボタン */
.activity-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    margin-top: 12px;
}

.action-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #f5f5f5;
}

.action-btn:active {
    transform: scale(0.95);
}

.like-btn:hover {
    color: #2196f3;
}

.ouen-btn:hover {
    color: #ff9800;
}

.comment-btn:hover {
    color: #4caf50;
}

.action-icon {
    font-size: 16px;
}

.action-count {
    font-weight: 500;
}

/* ナビゲーションバー */
.bottom-nav {
    background-color: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 0;
    max-width: 430px;
    margin: 0 auto;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 4px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
}

.nav-item:hover {
    background-color: #f5f5f5;
}

.nav-item.active {
    color: #2196f3;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
}

/* フローティング作成ボタン */
.floating-create-btn {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-create-btn:hover {
    background-color: #1976d2;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
}

.floating-create-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.create-icon {
    font-size: 24px;
    line-height: 1;
}

/* バナーエリア */
.banner-area {
    margin: 16px;
    margin-top: 8px;
}

.banner-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background-color: #f0f0f0;
    height: 120px;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 16px;
}

.banner-icon {
    font-size: 48px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.banner-text {
    flex: 1;
    color: white;
}

.banner-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 4px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.banner-description {
    font-size: 13px;
    margin: 0;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.banner-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.indicator {
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white;
    width: 16px;
    border-radius: 3px;
}

/* レスポンシブ対応 */
@media (max-width: 430px) {
    .app-container {
        max-width: 100%;
    }

    .bottom-nav {
        max-width: 100%;
    }
}

/* お知らせポップアップ */
.announcement-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.announcement-popup-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.announcement-popup {
    background-color: #fff;
    border-radius: 20px;
    width: calc(100% - 32px);
    max-width: 398px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.4s ease-out;
    margin: 0 auto;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.announcement-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.announcement-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.announcement-popup-header {
    padding: 20px 20px 0;
}

.announcement-popup-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    background-color: #ff4444;
    color: white;
    animation: pulse 2s infinite;
}

.announcement-popup-badge.important {
    background-color: #ff4444;
}

.announcement-popup-badge.campaign {
    background-color: #4caf50;
}

.announcement-popup-badge.update {
    background-color: #2196f3;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.announcement-popup-content {
    padding: 16px 20px 20px;
}

.announcement-popup-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.3;
}

.announcement-popup-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.announcement-popup-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.announcement-popup-description p {
    margin-bottom: 10px;
}

.announcement-popup-description p:last-child {
    margin-bottom: 0;
}

.announcement-popup-description strong {
    color: #ff4444;
    font-weight: bold;
}

.announcement-popup-highlights {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 16px;
    background-color: #f8f8f8;
    border-radius: 12px;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.highlight-icon {
    font-size: 28px;
}

.highlight-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    white-space: nowrap;
}

.announcement-popup-period {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background-color: #fff3cd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.period-label {
    font-size: 12px;
    color: #856404;
    font-weight: bold;
}

.period-date {
    font-size: 14px;
    color: #856404;
}

.announcement-popup-footer {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
}

.announcement-popup-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-popup-btn.primary {
    background-color: #2196f3;
    color: white;
}

.announcement-popup-btn.primary:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.announcement-popup-btn.secondary {
    background-color: #f0f0f0;
    color: #666;
}

.announcement-popup-btn.secondary:hover {
    background-color: #e0e0e0;
}

/* タブレット対応 */
@media (min-width: 768px) {
    .announcement-popup {
        max-width: 500px;
    }

    .announcement-popup-title {
        font-size: 24px;
    }

    .announcement-popup-image {
        height: 220px;
    }
}

/* 小さい画面対応 */
@media (max-width: 375px) {
    .announcement-popup-overlay.show {
        padding: 12px;
    }

    .announcement-popup {
        width: calc(100% - 24px);
    }

    .announcement-popup-title {
        font-size: 20px;
    }

    .announcement-popup-description {
        font-size: 14px;
    }

    .announcement-popup-highlights {
        padding: 12px;
    }

    .highlight-icon {
        font-size: 24px;
    }

    .highlight-text {
        font-size: 11px;
    }
}


/* サイドスライドメニュー */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.menu-overlay.active {
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.5);
}

.side-menu {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.menu-content {
    position: absolute;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: white;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
}

.side-menu.active .menu-content {
    left: 0;
    opacity: 1;
    visibility: visible;
}

/* メニューヘッダー */
.menu-header {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid #f0f0f0;
}

.menu-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.menu-close-btn:hover {
    color: #333;
}

/* メニュープロフィール */
.menu-profile-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.menu-profile {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-profile:hover {
    background-color: #f5f5f5;
}

.menu-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #2196f3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-avatar .avatar-text {
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.menu-profile-info {
    flex: 1;
    min-width: 0;
}

.menu-username {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.menu-userid {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* フィッツコイン表示 */
.menu-fitscoin {
    padding: 16px;
    background-color: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.coin-icon {
    font-size: 20px;
}

.coin-amount {
    font-size: 20px;
    font-weight: bold;
    color: #ff9800;
}

.coin-label {
    font-size: 14px;
    color: #666;
}

/* メニューナビゲーション */
.menu-nav {
    flex: 1;
    padding: 8px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: background-color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-icon {
    font-size: 20px;
    min-width: 24px;
}

.menu-text {
    flex: 1;
}

.menu-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 8px 0;
}

.menu-item.logout {
    color: #ff4444;
}

.menu-item.logout:hover {
    background-color: #ffebeb;
}

/* プロフィールボタンのスタイル調整 */
.profile-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* レスポンシブ対応 */
@media (max-width: 375px) {
    .side-menu {
        width: 260px;
    }
}
EOF < /dev/null
/* ヘッダーレイアウトの調整 */
.header.with-back-btn {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    gap: 8px;
}

.header.with-back-btn .page-title {
    position: static;
    transform: none;
    text-align: center;
}

.header.with-back-btn .header-right {
    margin-left: 0;
    justify-self: end;
}

/* 空のスペーサー要素 */
.header-spacer {
    width: 56px;
    flex-shrink: 0;
}
