/* ============================================================
   岡山東商業事業者部会 会員ポータル  styles.css
   白 × 紺色 / モバイル最適化
   ============================================================ */

:root {
  --navy: #1b2a5b;
  --navy-dark: #111e42;
  --navy-light: #33477e;
  --accent: #c9a24b;
  --bg: #f6f7fa;
  --white: #ffffff;
  --divider: #e4e7ef;
  --text: #1b2a5b;
  --text-sub: #6b7691;
  --success: #2e7d5b;
  --warning: #c9832b;
  --danger: #b23b3b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(27, 42, 91, 0.06);
  --maxw: 480px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #e9ecf2;
  color: var(--text);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- アプリ全体をスマホ枠で中央配置 ---- */
#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(27, 42, 91, 0.08);
  overflow-x: hidden;
}

/* ---- ヘッダー ---- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 56px;
}
.appbar .back {
  background: none; border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 4px; margin-left: -6px; border-radius: 8px;
}
.appbar .back svg { width: 22px; height: 22px; }
.appbar-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; flex: none; }
.appbar .title { font-size: 16px; font-weight: 700; letter-spacing: .02em; flex: 1; }
.appbar.center .title { text-align: left; }

/* ---- ホームのヒーロー ---- */
.hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
  padding: 20px 20px 26px;
  border-radius: 0 0 24px 24px;
}
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-logo {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  overflow: hidden;
}
.hero-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-name { font-size: 19px; font-weight: 800; letter-spacing: .02em; line-height: 1.25; }
.hero-sub { font-size: 11.5px; color: rgba(255,255,255,.75); }
.hero-bell {
  margin-left: auto; position: relative; cursor: pointer;
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.hero-bell svg { width: 22px; height: 22px; }
.hero-bell .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.hero-greet { margin-top: 18px; font-size: 15px; font-weight: 600; }
.hero-note { font-size: 12px; color: rgba(255,255,255,.8); }

/* ---- コンテンツ ---- */
.screen { flex: 1; padding-bottom: 84px; }
.container { padding: 16px; }

.section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 4px 10px; font-size: 16px; font-weight: 700;
  color: var(--navy);
}
.section-title .ico { width: 20px; height: 20px; }
.section-title .more {
  margin-left: auto; font-size: 13px; font-weight: 600;
  color: var(--navy-light); cursor: pointer;
}

/* ---- メニューグリッド ---- */
.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.menu-card {
  background: var(--white); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 14px;
  cursor: pointer; transition: transform .12s, box-shadow .12s;
  display: flex; flex-direction: column; gap: 14px;
}
.menu-card:active { transform: scale(.97); }
.menu-card .m-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(27,42,91,.08); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.menu-card .m-icon svg { width: 22px; height: 22px; }
.menu-card .m-title { font-size: 14.5px; font-weight: 700; }
.menu-card .m-sub { font-size: 10.5px; color: var(--text-sub); }

/* ---- カード ---- */
.card {
  background: var(--white); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 16px;
}
.card.tap { cursor: pointer; transition: transform .12s; }
.card.tap:active { transform: scale(.985); }
.list > * + * { margin-top: 12px; }

/* ---- タグ ---- */
.tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  color: var(--navy); background: rgba(27,42,91,.08);
  border: 1px solid rgba(27,42,91,.22);
}
.tag.warn { color: var(--warning); background: rgba(201,131,43,.1); border-color: rgba(201,131,43,.3); }
.tag.danger { color: var(--danger); background: rgba(178,59,59,.1); border-color: rgba(178,59,59,.3); }
.tag.ok { color: var(--success); background: rgba(46,125,91,.1); border-color: rgba(46,125,91,.3); }
.tag.sponsor { color: #6d4f00; background: #fff4cf; border-color: #e1b83e; }
.member-star { color: #c48a00; font-weight: 900; }
.recruitment-box {
  padding: 14px; border-radius: 12px; color: var(--navy-dark);
  background: #fff8df; border: 1px solid #e4c35e; font-size: 13px; line-height: 1.7;
}
.member-gate { margin-top: 28px; padding: 28px 22px; text-align: center; }
.member-gate h2 { margin: 12px 0 8px; font-size: 19px; }
.member-gate p { margin: 0 0 20px; color: var(--text-sub); font-size: 13px; }
.gate-icon {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); background: rgba(27,42,91,.08);
}
.gate-icon svg { width: 27px; height: 27px; }

/* ---- チップ ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 20px;
  background: var(--white); border: 1px solid var(--divider);
  font-size: 13px; font-weight: 600; color: var(--navy);
  cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 12px 20px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  background: var(--navy); color: #fff;
  font-family: inherit; width: 100%;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--navy); border: 1.4px solid var(--navy); }
.btn.light { background: #fff; color: var(--navy); }
.btn.sm { width: auto; padding: 9px 14px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; }
.btn svg { width: 18px; height: 18px; }

/* ---- 入力 ---- */
.field { margin-bottom: 16px; }
.label { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.req { font-size: 10px; font-weight: 700; color: var(--danger); background: rgba(178,59,59,.1); padding: 1px 6px; border-radius: 4px; }
input[type=text], input[type=email], textarea, select, .input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--divider); background: #fff; color: var(--text);
  font-size: 14.5px; font-family: inherit; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--navy); }
textarea { resize: vertical; min-height: 110px; }
.error-text { color: var(--danger); font-size: 12px; margin-top: 6px; display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field.invalid .error-text { display: block; }

/* 検索 */
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--navy); }
.search-wrap input { padding-left: 40px; }

/* ---- リスト行 ---- */
.row { display: flex; align-items: center; gap: 14px; }
.avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(27,42,91,.08); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 19px;
}
.date-badge {
  flex: none; width: 60px; height: 68px; border-radius: 12px;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.date-badge .m { font-size: 11.5px; opacity: .8; font-weight: 600; }
.date-badge .d { font-size: 23px; font-weight: 800; line-height: 1.05; }
.date-badge .w { font-size: 10px; opacity: .75; }
.chev { flex: none; color: var(--text-sub); width: 20px; height: 20px; }

.title-lg { font-size: 15px; font-weight: 700; line-height: 1.45; }
.sub { font-size: 12.5px; color: var(--text-sub); }
.meta { font-size: 11.5px; color: var(--text-sub); }
.strong-navy { color: var(--navy); font-weight: 700; }

.icon-line { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; }
.icon-line svg { flex: none; width: 18px; height: 18px; color: var(--navy); margin-top: 2px; }

/* ---- 重要バナー ---- */
.banner-important {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff; border-radius: var(--radius); padding: 18px; cursor: pointer;
}
.banner-important .b-top { display: flex; align-items: center; gap: 8px; }
.banner-important .b-badge { background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 6px; }
.banner-important .b-date { font-size: 11.5px; color: rgba(255,255,255,.75); }
.banner-important .b-title { font-size: 16px; font-weight: 700; margin-top: 10px; line-height: 1.45; }
.banner-important .b-more { text-align: right; font-size: 12.5px; font-weight: 600; margin-top: 10px; color: rgba(255,255,255,.9); }

/* ---- 会費サマリー ---- */
.summary-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff; border-radius: 20px; padding: 20px;
}
.summary-card .s-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: 8px; }
.summary-card .s-amount { font-size: 34px; font-weight: 800; margin-top: 8px; }
.summary-card .s-amount small { font-size: 14px; font-weight: 400; opacity: .8; margin-left: 6px; }

/* ---- 進捗バー ---- */
.progress { height: 5px; border-radius: 4px; background: var(--divider); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--navy); }
.progress.full > span { background: var(--danger); }

/* ---- ボトムナビ ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  background: #fff; border-top: 1px solid var(--divider);
  display: flex; z-index: 40;
  box-shadow: 0 -2px 10px rgba(0,0,0,.04);
}
.bottom-nav button {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-sub); font-size: 11px; font-weight: 600; font-family: inherit;
}
.bottom-nav button svg { width: 24px; height: 24px; }
.bottom-nav button.active { color: var(--navy); }

/* ---- ボトムシート ---- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(17,30,66,.45);
  z-index: 50; display: none;
}
.sheet-mask.open { display: block; }
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: var(--maxw); background: #fff;
  border-radius: 24px 24px 0 0; z-index: 51; padding: 8px 20px 30px;
  transition: transform .26s ease; max-height: 88vh; overflow-y: auto;
}
.sheet.open { transform: translateX(-50%) translateY(0); }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--divider); margin: 8px auto 16px; }
.sheet h3 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }

/* ---- ダイアログ ---- */
.dialog-mask {
  position: fixed; inset: 0; background: rgba(17,30,66,.45);
  z-index: 60; display: none; align-items: center; justify-content: center; padding: 24px;
}
.dialog-mask.open { display: flex; }
.dialog {
  background: #fff; border-radius: 20px; padding: 24px; width: 100%; max-width: 340px;
  text-align: center;
}
.dialog .d-icon { color: var(--success); width: 48px; height: 48px; }
.dialog h3 { margin: 12px 0 8px; font-size: 18px; font-weight: 800; }
.dialog p { font-size: 13.5px; color: var(--text-sub); margin: 0 0 20px; }

/* ---- トースト ---- */
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; z-index: 70; opacity: 0;
  transition: opacity .25s, transform .25s; max-width: 90%; text-align: center;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--success); }

/* ---- 汎用 ---- */
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }
.center { text-align: center; }
.divider { height: 1px; background: var(--divider); margin: 14px 0; }
.empty { text-align: center; color: var(--text-sub); padding: 44px 20px; font-size: 14px; }
.empty svg { width: 54px; height: 54px; color: var(--divider); display: block; margin: 0 auto 14px; }
.legal { font-size: 12px; color: var(--text-sub); background: var(--bg); border-radius: 10px; padding: 12px; }
.hidden { display: none !important; }
.fab {
  position: fixed; bottom: 92px; right: calc(50% - var(--maxw)/2 + 16px);
  background: var(--navy); color: #fff; border: none; cursor: pointer;
  border-radius: 26px; padding: 13px 20px; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px; z-index: 35;
  box-shadow: 0 6px 18px rgba(27,42,91,.3); font-family: inherit;
}
.fab svg { width: 18px; height: 18px; }
@media (max-width: 500px) {
  .fab { right: 16px; }
}

/* スケルトン */
.skeleton { background: linear-gradient(90deg,#eef0f6 25%,#f6f7fa 50%,#eef0f6 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
