/* font loaded via header link */

:root {
    --primary: #1a56db;
    --primary-light: #eef2fb;
    --primary-dark: #1040a0;
    --accent: #7c3aed;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #0f172a;
    --text-light: #475569;
    --text-lighter: #94a3b8;
    --bg: #f8fafc;
    --white: #fff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
}
a { text-decoration:none; color:inherit; }

/* ===== HEADER ===== */
.header {
    background: var(--white);
    position: sticky; top:0; z-index:1000;
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 700; color: var(--primary);
}
.logo-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.nav { display:flex; gap:4px; }
.nav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}
.nav a:hover { background: var(--primary-light); color: var(--primary); }
.nav a.active { background: var(--primary); color: var(--white); }

.menu-toggle {
    display:none; background:none; border:none;
    font-size:22px; cursor:pointer; color:var(--text-light);
}

/* ===== MAIN ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    min-height: calc(100vh - 140px);
}

/* ===== HERO BANNER ===== */
.hero-banner {
    border-radius: 20px;
    padding: 48px 36px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #1a365d 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}
.hero-banner::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.18), transparent 70%);
    top: -200px; right: -100px;
}
.hero-banner::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24,144,255,0.12), transparent 70%);
    bottom: -80px; left: -60px;
}
.hero-content { position:relative; z-index:1; }
.hero-badge {
    display: inline-flex;
    align-items: center; gap: 6px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.hero-content h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.hero-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 28px;
    font-weight: 400;
}
.hero-actions { display:flex; gap:12px; }
.hero-actions .btn-primary {
    background: var(--white); color: var(--primary);
    font-weight: 600;
}
.hero-actions .btn-primary:hover { box-shadow: 0 8px 24px rgba(255,255,255,0.2); }
.hero-actions .btn-outline {
    border: 1.5px solid rgba(255,255,255,0.35);
    color: var(--white);
    backdrop-filter: blur(4px);
}
.hero-actions .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

/* ===== QUICK ACCESS ===== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.quick-item {
    display: flex; flex-direction: column;
    align-items: center; padding: 22px 12px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}
.quick-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}
.quick-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin-bottom: 10px;
}
.quick-icon.c1 { background: linear-gradient(135deg, #dbeafe, #eff6ff); }
.quick-icon.c2 { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.quick-icon.c3 { background: linear-gradient(135deg, #d1fae5, #ecfdf5); }
.quick-icon.c4 { background: linear-gradient(135deg, #fce7f3, #fdf2f8); }
.quick-icon.c5 { background: linear-gradient(135deg, #ede9fe, #f5f3ff); }
.quick-item span { font-size: 13px; font-weight: 600; color: var(--text); }

/* ===== SECTION ===== */
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px;
}
.section-title {
    font-size: 20px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.section-more {
    font-size: 13px; font-weight: 500; color: var(--text-lighter);
    padding: 6px 14px; border-radius: 8px;
    transition: var(--transition);
}
.section-more:hover { background: var(--primary-light); color: var(--primary); }

/* ===== NEWS ===== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}
.news-featured {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.news-featured:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-featured-img {
    width: 100%; height: 200px;
    object-fit: cover; background: var(--border);
}
.news-featured-body { padding: 18px; }
.news-featured-body h4 {
    font-size: 16px; font-weight: 600; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.news-featured-body p {
    font-size: 13px; color: var(--text-lighter);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 10px;
}
.news-meta {
    font-size: 12px; color: var(--text-lighter);
    display: flex; align-items: center; gap: 12px;
}

.news-list-col { display:flex; flex-direction:column; gap:12px; }
.news-card {
    display: flex; gap: 14px;
    padding: 14px; border-radius: var(--radius-sm);
    background: var(--white); box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.news-card:hover { box-shadow: var(--shadow); background: var(--primary-light); }
.news-image {
    width: 110px; height: 78px;
    object-fit: cover; border-radius: 10px;
    background: var(--border); flex-shrink:0;
}
.news-content { flex:1; min-width:0; }
.news-title {
    font-size: 14px; font-weight: 600; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.news-top-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white; font-size: 10px;
    padding: 1px 6px; border-radius: 4px;
    font-weight: 600; margin-right: 4px;
}

/* ===== PRODUCTS ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}
.product-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product-image {
    width: 100%; height: 180px;
    object-fit: cover; background: var(--border);
}
.product-info { padding: 16px; }
.product-title {
    font-size: 14px; font-weight: 600; margin-bottom: 8px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-price { color: #ef4444; font-weight: 700; font-size: 18px; }
.product-price .yen { font-size: 13px; }
.product-original-price {
    color: var(--text-lighter); font-size: 12px;
    text-decoration: line-through; margin-left: 6px;
}
.product-sales {
    font-size: 12px; color: var(--text-lighter); margin-top: 6px;
}
.member-label {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: var(--white); font-size: 10px;
    padding: 2px 8px; border-radius: 4px;
    font-weight: 600; margin-bottom: 6px;
}

/* ===== CARD ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
}
.card-title {
    font-size: 18px; font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.card-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 12px;
}

/* ===== BUTTON ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 22px;
    border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: var(--transition); font-family: inherit;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(26,86,219,0.3); }
.btn-success { background: var(--success); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-block { width:100%; }
.btn-sm { padding:6px 14px; font-size:12px; border-radius:6px; }
.btn:disabled { opacity:0.5; cursor:not-allowed; }

/* ===== FORM ===== */
.form-group { margin-bottom: 18px; }
.form-label { display:block; margin-bottom:6px; font-weight:600; font-size:13px; color:var(--text); }
.form-input, .form-textarea, .form-select {
    width:100%; padding:11px 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size:14px; font-family:inherit; transition: var(--transition);
    background: var(--white); color: var(--text);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline:none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.form-textarea { min-height:100px; resize:vertical; }

.search-box { display:flex; gap:10px; margin-bottom:16px; }
.search-box .form-input { flex:1; }

/* ===== GRID ===== */
.grid { display:grid; gap:16px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-5 { grid-template-columns: repeat(5,1fr); }

/* ===== BADGE ===== */
.badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.badge-primary { background:var(--primary-light); color:var(--primary); }
.badge-success { background:var(--success-light); color:var(--success); }
.badge-warning { background:#fef3c7; color:#92400e; }
.badge-danger { background:#fee2e2; color:var(--danger); }

/* ===== MEMBER CARD ===== */
.member-card { display:flex; flex-direction:column; align-items:center; padding:24px; text-align:center; }
.member-avatar {
    width:80px; height:80px; border-radius:50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color:var(--white); display:flex; align-items:center; justify-content:center;
    font-size:32px; margin-bottom:12px;
}
.member-name { font-size:18px; font-weight:bold; margin-bottom:4px; }
.member-no { font-size:14px; color:var(--text-lighter); margin-bottom:12px; }

/* ===== LIST ===== */
.list-item { display:flex; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.list-item:last-child { border-bottom:none; }
.list-item-content { flex:1; }
.list-item-title { font-weight:500; margin-bottom:4px; }
.list-item-desc { font-size:12px; color:var(--text-lighter); }
.list-item-action { margin-left:12px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position:fixed; bottom:0; left:0; right:0;
    background:var(--white);
    border-top: 1px solid var(--border);
    display:flex; justify-content:space-around;
    padding:6px 0 20px; z-index:1000;
}
.nav-item {
    display:flex; flex-direction:column; align-items:center;
    padding:6px 14px; color:var(--text-lighter); transition:var(--transition);
}
.nav-item.active, .nav-item:hover { color:var(--primary); }
.nav-icon { font-size:22px; margin-bottom:2px; }
.nav-label { font-size:10px; font-weight:500; }

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: rgba(255,255,255,0.5);
    padding: 32px 24px;
    font-size: 13px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.footer-name {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}
.footer-support,
.footer-copy,
.footer-icp {
    margin-bottom: 4px;
}
.footer-icp a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}
.footer-icp a:hover {
    color: rgba(255,255,255,0.8);
}
@media (min-width: 768px) {
    .footer-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .footer-name,
    .footer-support {
        text-align: left;
        margin-bottom: 0;
    }
    .footer-support {
        font-size: 12px;
    }
    .footer-copy,
    .footer-icp {
        text-align: right;
        margin-bottom: 0;
    }
    .footer-copy {
        margin-bottom: 2px;
    }
}

/* ===== TOAST ===== */
.toast {
    position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
    background:rgba(15,23,42,0.85); backdrop-filter:blur(8px);
    color:var(--white); padding:14px 28px; border-radius:12px;
    z-index:9999; display:none; font-size:14px; font-weight:500;
}
.toast.show { display:block; }

/* ===== LOADING ===== */
.loading { text-align:center; padding:32px; color:var(--text-lighter); }
.loading::before {
    content:''; display:inline-block;
    width:24px; height:24px;
    border:3px solid var(--border); border-top-color:var(--primary);
    border-radius:50%; animation:spin 0.7s linear infinite; margin-right:10px;
    vertical-align:middle;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ===== EMPTY ===== */
.empty-state { text-align:center; padding:48px 16px; color:var(--text-lighter); }
.empty-state-icon { font-size:48px; margin-bottom:12px; opacity:0.5; }

/* ===== TABS ===== */
.tabs { display:flex; gap:0; background:var(--white); border-radius:var(--radius-sm); margin-bottom:16px; padding:4px; box-shadow:var(--shadow-sm); }
.tab { flex:1; padding:10px; text-align:center; cursor:pointer; border-radius:6px; transition:var(--transition); font-weight:500; font-size:13px; color:var(--text-light); }
.tab:hover { color:var(--text); background:var(--bg); }
.tab.active { color:var(--white); background:var(--primary); box-shadow:0 2px 8px rgba(26,86,219,0.25); }

/* ===== MODAL ===== */
.modal { position:fixed; inset:0; background:rgba(15,23,42,0.5); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; z-index:2000; display:none; }
.modal.show { display:flex; }
.modal-content { background:var(--white); border-radius:16px; padding:24px; max-width:500px; width:90%; max-height:80vh; overflow-y:auto; box-shadow:var(--shadow-lg); }
.modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.modal-close { background:var(--bg); border:none; width:32px; height:32px; border-radius:8px; font-size:18px; cursor:pointer; color:var(--text-light); display:flex; align-items:center; justify-content:center; }
.modal-close:hover { background:#fee2e2; color:var(--danger); }

/* ===== PAGINATION ===== */
.pagination { display:flex; justify-content:center; gap:6px; margin-top:16px; }
.page-btn { padding:6px 14px; border:1px solid var(--border); background:var(--white); border-radius:6px; cursor:pointer; font-size:13px; transition:var(--transition); }
.page-btn:hover { border-color:var(--primary); color:var(--primary); }
.page-btn.active { background:var(--primary); color:var(--white); border-color:var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav { display:none; position:absolute; top:60px; left:0; right:0; background:var(--white); flex-direction:column; padding:16px; box-shadow:var(--shadow); border-radius:0 0 16px 16px; }
    .nav.show { display:flex; }
    .menu-toggle { display:block; }
    .quick-grid { grid-template-columns: repeat(5,1fr); gap:8px; }
    .quick-item { padding:14px 6px; }
    .quick-icon { width:40px; height:40px; font-size:20px; margin-bottom:6px; }
    .quick-item span { font-size:11px; }
    .news-grid { grid-template-columns:1fr; }
    .product-grid { grid-template-columns: repeat(2,1fr); gap:12px; }
    .product-image { height:140px; }
    .hero-banner { padding:32px 20px; border-radius:16px; }
    .hero-content h1 { font-size:22px; }
    .hero-subtitle { font-size:14px; margin-bottom:20px; }
    .grid-2,.grid-3,.grid-4,.grid-5 { grid-template-columns: repeat(2,1fr); }
    .news-image { width:90px; height:64px; }
    .main-content { padding:12px; }
}
@media (min-width: 769px) {
    .bottom-nav { display:none; }
    body { padding-bottom:0; }
}
@media (min-width: 1024px) {
    .main-content { padding:28px 32px; }
}
