* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6F4E37;
    --secondary-color: #FFD700;
    --bg-cream: #FFF8E7;
    --text-dark: #333;
    --border-color: #E5E5E5;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    padding-bottom: 80px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* ヘッダー */
.app-header {
    background: linear-gradient(135deg, var(--primary-color), #8B6F47);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.app-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
}

/* メインコンテンツ */
.content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.card h2, .card h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 18px;
}

/* ボタン */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #5a3d2b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
}

.btn-qr {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

/* スタンプカードプレビュー */
.stamp-preview {
    text-align: center;
    padding: 20px;
}

.stamps-mini {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stamp {
    font-size: 32px;
}

.stamp-count {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* スタンプカード */
.stamp-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
}

.stamps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stamp-slot {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 32px;
    font-weight: bold;
}

.stamp-slot.filled {
    background: linear-gradient(135deg, var(--secondary-color), #FFE55C);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.stamp-slot.empty {
    background: #F5F5F5;
    color: #999;
    font-size: 18px;
    border: 2px dashed var(--border-color);
}

/* 履歴 */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
}

.badge {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* 特典カード */
.benefit-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.benefit-card.locked {
    opacity: 0.6;
}

.benefit-image {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
}

.benefit-card h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    text-align: center;
}

.benefit-card p {
    text-align: center;
    color: #666;
    margin-bottom: 16px;
}

.benefit-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

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

.btn-use {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
}

.btn-locked {
    background: #ccc;
    color: #666;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
}

/* プロフィール */
.profile-card {
    text-align: center;
}

.avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    font-size: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

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

.dog-info {
    background: var(--bg-cream);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.dog-info p {
    margin-bottom: 8px;
}

/* ニュース */
.news-item {
    padding: 12px;
    border-left: 4px solid var(--secondary-color);
    background: var(--bg-cream);
    margin-bottom: 12px;
    border-radius: 4px;
}

.news-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.news-title {
    font-weight: 600;
}

.info-note {
    color: #dc3545;
    font-weight: 600;
    margin-top: 8px;
}

/* ボトムナビゲーション */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.3s;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item .icon {
    font-size: 24px;
}

.nav-item span:last-child {
    font-size: 12px;
    font-weight: 600;
}

/* レスポンシブ */
@media (max-width: 480px) {
    .content {
        padding: 16px;
    }
    
    .stamps-grid {
        gap: 8px;
    }
    
    .stamp-slot {
        font-size: 24px;
    }
}