/* ============================================================
   KEDe 同窓会サイト 共通スタイル(ユーザーサイト)
   シンプル・明快・動線優先。装飾のための装飾は入れない。
   ============================================================ */
:root {
    --ink: #1e2a3f;
    --primary: #2c5282;
    --primary-dark: #234269;
    --bg: #f7f8fa;
    --card-bg: #ffffff;
    --border: #e2e5ea;
    --text-main: #1a1f29;
    --text-sub: #6b7280;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16,24,40,0.06);
    --line-green: #06C755;
    --danger: #c0362c;
    --success: #2f7d4f;
    --warning: #b7791f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 620px; margin: 0 auto; padding: 24px 16px 56px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 24px 16px 56px; }
@media (max-width: 480px) {
    .container, .container-wide { padding: 16px 14px 40px; }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 16px;
}
.card-body { padding: 20px; }
@media (max-width: 480px) { .card-body { padding: 16px; } }
.card-header { background: #fafbfc; padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }

h1 { font-size: 21px; margin: 0 0 8px; line-height: 1.4; font-weight: 700; }
h2 { font-size: 16px; margin: 28px 0 12px; font-weight: 700; }
h2:first-child { margin-top: 0; }
p.lead { color: var(--text-sub); font-size: 14px; line-height: 1.7; margin: 0 0 20px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"],
select, textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d5d9e0;
    border-radius: var(--radius-sm);
    font-size: 16px; /* iOSの自動ズームを防ぐ */
    background: #fff;
    color: var(--text-main);
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .15s ease;
}
input[type="date"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d5d9e0;
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: #fff;
    color: var(--text-main);
    font-family: inherit;
    box-sizing: border-box;
    min-height: 46px;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(44,82,130,0.12); }
input::placeholder, textarea::placeholder { color: #a8adb6; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color .15s ease;
    line-height: 1.3;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-line { background: var(--line-green); color: #fff; }
.btn-secondary { background: #eef0f3; color: var(--text-main); }
.btn-secondary:hover { background: #e3e6eb; }
.btn-sm { width: auto; min-height: 36px; padding: 7px 14px; font-size: 13px; }

.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; line-height: 1.6; }
.alert-error { background: #fdf1f0; color: var(--danger); border: 1px solid #f3d4d1; }
.alert-success { background: #f0f8f3; color: var(--success); border: 1px solid #cfe8d8; }
.alert-info { background: #eef3f8; color: var(--primary); border: 1px solid #d3e0ec; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fdf3e3; color: #92400e; }
.badge-active  { background: #e6f4ea; color: #166534; }
.badge-rejected{ background: #fbeae8; color: #991b1b; }
.badge-locked  { background: #eef0f3; color: #475569; }

.or-divider { text-align: center; margin: 18px 0; color: var(--text-sub); font-size: 12.5px; position: relative; }
.or-divider::before, .or-divider::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--border); }
.or-divider::before { left: 0; } .or-divider::after { right: 0; }

footer.site-footer { text-align: center; margin-top: 32px; padding: 22px 16px; font-size: 12.5px; color: var(--text-sub); line-height: 2; border-top: 1px solid var(--border); }
footer.site-footer a { color: var(--text-sub); }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { background: #fafbfc; padding: 10px 14px; text-align: left; font-size: 12px; color: var(--text-sub); border-bottom: 1px solid var(--border); }
table.data-table td { padding: 11px 14px; font-size: 14px; border-bottom: 1px solid #f1f2f4; vertical-align: top; }

/* --- ナビゲーション: シンプルな1本のバー。現在地がひと目でわかる --- */
.site-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav .brand { font-weight: 700; color: var(--ink); padding: 14px 16px 14px 0; text-decoration: none; white-space: nowrap; font-size: 15px; }
.site-nav a.nav-link {
    color: var(--text-sub); text-decoration: none; padding: 14px 12px; font-size: 13.5px;
    white-space: nowrap; font-weight: 500; min-height: 46px; display: flex; align-items: center;
    border-bottom: 2px solid transparent;
}
.site-nav a.nav-link:hover { color: var(--text-main); }
.site-nav a.nav-link.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }

/* --- 一覧アイテム(申込・イベント・お知らせ等)の共通レイアウト --- */
.list-item {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }

@media (max-width: 420px) {
    .btn-row { flex-direction: column !important; }
    .btn-row > * { width: 100% !important; }
}
