/* =============================================================
   common.css — 全ページ共通スタイル
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* --- CSS変数（テーマで上書き可能） --- */
:root {
    --primary:       #3b82f6;
    --primary-hover: #2563eb;
    --danger:        #ef4444;
    --danger-hover:  #dc2626;
    --success:       #22c55e;
    --bg:            #f8fafc;
    --surface:       #ffffff;
    --border:        #e2e8f0;
    --text:          #1e293b;
    --text-muted:    #64748b;
    --radius:        10px;
    --shadow:        0 4px 24px rgba(0,0,0,0.07);
    --font-en:       'DM Sans', sans-serif;
    --font-ja:       'Noto Sans JP', sans-serif;
}

/* --- リセット --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: var(--font-en), var(--font-ja);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- レイアウト --- */
.container {
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 32px;
}

@media (max-width: 600px) {
    .container { padding: 24px 18px; }
}

/* --- ヘッダー --- */
.site-header {
    width: 100%;
    max-width: 560px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 20px;
}

.site-header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.site-header nav a {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.site-header nav a:hover { color: var(--primary); }

/* --- ボタン --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    width: 100%;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
    background: var(--border);
    color: var(--text);
}
.btn-secondary:hover { background: #cbd5e1; }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-size: 0.875rem;
}
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); }

/* --- エラーボックス --- */
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    color: var(--danger);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- ページナビ --- */
.page-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

/* --- プロフィールページ専用 --- */
.link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.link-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.link-button--web {
    background: #f59e0b;
}
.link-button--web:hover { background: #d97706; }

/* --- QRページ専用 --- */
.qr-section {
    text-align: center;
    padding: 16px 0;
}

.qr-section p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.qr-link { display: inline-block; }

.qr-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 12px;
    background: #fff;
}
