/* ===== 結 -You-サイクル : 共通スタイル ===== */
:root {
  --pink: #FDEEF0;
  --pink-2: #F9DCE1;
  --beige: #F7EFE3;
  --yellow: #FFF9E3;
  --card: #FFFDF8;
  --text: #5A3E2B;
  --text-sub: #8C715E;
  --border: #EADCCB;
  --accent: #EE9AA4;
  --accent-dark: #D97A87;
  --accent-soft: #FBE3E7;
  --star: #3B82F6;
  --heart: #E85D75;
  --danger: #D9534F;
  --radius: 18px;
  --shadow: 0 4px 14px rgba(150, 110, 80, .10);
  --nav-h: 64px;
  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "Kosugi Maru", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--beige);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; color: inherit; font-size: 16px; }
h1, h2, h3 { margin: 0; line-height: 1.4; }

/* ===== レイアウト ===== */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--pink);
  border-bottom: 1px solid var(--pink-2);
}
.app-header-inner {
  max-width: 1000px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.logo { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 6px; }
.logo-mark { font-size: 24px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; border: none; background: var(--card);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow);
}
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

.main {
  max-width: 1000px; margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}

/* 下部ナビ（スマホ） */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--card); border-top: 1px solid var(--border);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-sub); gap: 2px;
}
.bottom-nav a .nav-ico { font-size: 22px; line-height: 1; filter: grayscale(.6); opacity: .8; }
.bottom-nav a.active { color: var(--accent-dark); font-weight: 700; }
.bottom-nav a.active .nav-ico { filter: none; opacity: 1; }

/* PC：ナビをヘッダー下の横並びに */
@media (min-width: 900px) {
  .bottom-nav {
    position: sticky; top: 61px; bottom: auto;
    justify-content: center; border-top: none; border-bottom: 1px solid var(--border);
    background: var(--yellow);
  }
  .bottom-nav a { flex: 0 0 auto; padding: 0 22px; height: 52px; flex-direction: row; font-size: 15px; gap: 8px; }
  .bottom-nav a.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .main { padding-bottom: 48px; }
}

/* ===== 共通パーツ ===== */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.section { margin-bottom: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.section-more { font-size: 13px; color: var(--accent-dark); font-weight: 700; }
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.muted { color: var(--text-sub); font-size: 13px; }
.empty { text-align: center; color: var(--text-sub); padding: 32px 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; padding: 12px 22px;
  font-weight: 700; cursor: pointer; transition: transform .1s, background .2s;
  background: var(--accent); color: #fff; font-size: 16px;
}
.btn:active { transform: scale(.97); }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-block { width: 100%; }
.btn-sub { background: var(--card); color: var(--text); border: 1.5px solid var(--border); }
.btn-sub:hover { background: var(--yellow); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b94440; }
.link { color: var(--accent-dark); font-weight: 700; cursor: pointer; background: none; border: none; padding: 0; font-size: inherit; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 999px; font-size: 14px;
  background: var(--card); border: 1.5px solid var(--border); cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.tag { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }

/* フォーム */
.form-group { margin-bottom: 16px; }
.label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.label .req { color: var(--danger); font-size: 11px; margin-left: 4px; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: #fff; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.hint { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.error { color: var(--danger); font-size: 13px; margin-top: 6px; min-height: 1em; }

.role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-option input { display: none; }
.role-option label {
  display: block; text-align: center; padding: 14px 8px; border-radius: 14px;
  border: 2px solid var(--border); background: #fff; cursor: pointer; font-weight: 700; font-size: 14px;
}
.role-option label .role-ico { display: block; font-size: 26px; margin-bottom: 4px; }
.role-option input:checked + label { border-color: var(--accent); background: var(--accent-soft); }

/* 認証画面 */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, var(--pink) 0%, var(--beige) 55%, var(--yellow) 100%);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo .logo-mark { font-size: 48px; display: block; }
.auth-logo h1 { font-size: 24px; font-weight: 800; }
.auth-logo p { margin: 4px 0 0; color: var(--text-sub); font-size: 13px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 14px; display: grid; gap: 8px; }
.demo-box {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: var(--yellow); border: 1.5px dashed #E8D28F; font-size: 13px;
}

/* ユーザー表示 */
.avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--pink-2); display: grid; place-items: center; font-weight: 800; color: var(--accent-dark);
}
.user-line { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.star { color: var(--star); font-size: 1em; line-height: 1; }
.user-meta { font-size: 12px; color: var(--text-sub); }
.ages { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-sub); }

/* ホットなキーワード */
.hot-box { background: var(--pink); border-radius: var(--radius); padding: 16px; }
.hot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-item {
  display: inline-flex; align-items: center; gap: 6px; background: var(--card);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
}
.hot-rank { font-weight: 800; color: var(--accent-dark); font-size: 13px; }
.hot-item.top .hot-rank { color: #fff; background: var(--accent); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; }
.search-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.search-bar .input { border-radius: 999px; padding-left: 18px; }
.search-bar .btn { padding: 10px 18px; flex-shrink: 0; }

/* カルーセル */
.carousel { position: relative; overflow: hidden; }
.car-track { position: relative; display: flex; gap: 14px; will-change: transform; }
.car-item { flex: 0 0 80%; }
@media (min-width: 600px) { .car-item { flex-basis: 46%; } }
@media (min-width: 900px) { .car-item { flex-basis: 31.5%; } }
.car-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.car-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: all .3s; }
.car-dots span.on { background: var(--accent); width: 18px; border-radius: 4px; }

.hl-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.hl-thumb { height: 120px; display: grid; place-items: center; font-size: 48px; background: var(--yellow); overflow: hidden; }
.hl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hl-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hl-title { font-weight: 700; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hl-foot { margin-top: auto; font-size: 12px; color: var(--text-sub); display: flex; gap: 10px; }

/* Q&A 一覧 */
.list { display: grid; gap: 12px; }
@media (min-width: 900px) { .list.grid-2 { grid-template-columns: 1fr 1fr; } }
.thread-card { display: flex; gap: 12px; }
.thread-card .tc-main { flex: 1; min-width: 0; }
.thread-card .tc-title { font-weight: 700; font-size: 16px; margin: 4px 0; }
.thread-card .tc-excerpt { font-size: 13px; color: var(--text-sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-card .tc-thumb { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.tc-foot { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--text-sub); margin-top: 8px; flex-wrap: wrap; }
/* 「質問する」ボタンはトップへ戻るボタンの左に並べる */
.fab {
  position: fixed; right: 78px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 15;
  border-radius: 999px; padding: 14px 20px; box-shadow: 0 6px 18px rgba(217, 122, 135, .45);
}
@media (min-width: 900px) { .fab { bottom: 28px; right: max(78px, calc(50% - 420px)); } }

/* トップへ戻る（全ページ共通・右下） */
.to-top {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); z-index: 16;
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--accent);
  background: var(--card); color: var(--accent-dark); cursor: pointer; box-shadow: var(--shadow);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.to-top svg { width: 22px; height: 22px; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent-soft); }
body.no-nav .to-top { bottom: calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .to-top { bottom: 30px; right: max(18px, calc(50% - 480px)); } }
mark { background: #FFE58F; color: inherit; border-radius: 3px; padding: 0 2px; }

/* Q&A 詳細 */
.q-card { border: 2px solid var(--pink-2); }
.q-label {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; flex-shrink: 0;
}
.a-label { background: #F2C46D; }
.post-title { font-size: 19px; font-weight: 800; margin: 10px 0 8px; }
.post-body { white-space: normal; word-break: break-word; }
.post-images { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.post-images img { width: 140px; height: 140px; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.post-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.post-actions .spacer { flex: 1; }
.thanks-btn {
  border: 1.5px solid var(--heart); color: var(--heart); background: #fff;
  border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: 14px;
}
.thanks-btn.on { background: var(--heart); color: #fff; }
.mini-btn { border: none; background: none; color: var(--text-sub); font-size: 13px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.mini-btn:hover { background: var(--beige); }
.mini-btn.danger { color: var(--danger); }
.answers-head { margin: 24px 0 12px; font-weight: 800; font-size: 17px; }
.replies { margin-top: 12px; padding: 12px; background: var(--beige); border-radius: 14px; display: grid; gap: 10px; }
.reply { background: var(--card); border-radius: 12px; padding: 10px 12px; }
.reply-body { font-size: 14px; margin-top: 4px; word-break: break-word; }
.reply-form { display: flex; gap: 8px; align-items: flex-end; }
.reply-form .textarea { min-height: 44px; height: 44px; padding: 10px 12px; font-size: 14px; }
.reply-form .btn { flex-shrink: 0; }
.best-answer { border: 2px solid #F2C46D; }

/* 画像アップロード */
.img-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.img-slot {
  width: 92px; height: 92px; border-radius: 12px; border: 2px dashed var(--border);
  display: grid; place-items: center; cursor: pointer; background: #fff; position: relative; overflow: hidden;
  color: var(--text-sub); font-size: 12px; text-align: center;
}
.img-slot img { width: 100%; height: 100%; object-fit: cover; }
.img-slot .rm {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(90, 62, 43, .75); color: #fff; cursor: pointer; font-size: 12px; line-height: 1;
}

/* マイページ */
.profile-card { text-align: center; padding: 26px 18px; background: linear-gradient(180deg, var(--pink) 0%, var(--card) 60%); }
.profile-card .avatar { margin: 0 auto 10px; }
.profile-card .user-name { font-size: 20px; }
.profile-card .ages { justify-content: center; font-size: 14px; margin-top: 4px; }
.profile-card .bio { margin-top: 12px; font-size: 14px; text-align: left; background: var(--yellow); border-radius: 12px; padding: 12px 14px; }
.menu-list { display: grid; gap: 0; padding: 4px 0; }
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: none; background: none;
  text-align: left; cursor: pointer; font-size: 15px; border-bottom: 1px solid var(--beige);
}
.menu-list > :last-child { border-bottom: none; }
.menu-list .chev { margin-left: auto; color: var(--text-sub); }
.child-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 10px;
  padding: 12px; border-radius: 14px; background: var(--yellow);
}
.child-row .age-preview { grid-column: 1 / -1; font-size: 12px; color: var(--text-sub); margin-top: -4px; min-height: 1em; }
.date-split { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.date-split .input { text-align: center; padding: 10px 6px; }
.date-split .input[data-k="y"] { width: 5.5em; }
.date-split .input[data-k="m"], .date-split .input[data-k="d"] { width: 3.8em; }
.date-split span { font-size: 14px; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }

/* 管理者：違反報告 */
.report-card.resolved { opacity: .6; }
.report-target { background: var(--beige); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 8px 0; word-break: break-word; }

/* モーダル・トースト */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(90, 62, 43, .4);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s;
}
@media (min-width: 600px) { .modal-backdrop { align-items: center; } }
.modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow: auto;
  background: var(--card); border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  animation: up .25s ease;
}
@media (min-width: 600px) { .modal { border-radius: 22px; } }
.modal h3 { font-size: 18px; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.radio-list { display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border); cursor: pointer; }
.radio-list input { accent-color: var(--accent); width: 18px; height: 18px; }
.lightbox { background: rgba(0, 0, 0, .85); align-items: center; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 10px; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 30px); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 60; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.placeholder { text-align: center; padding: 60px 20px; }
.placeholder .big { font-size: 64px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-sub); margin-bottom: 12px; cursor: pointer; }
.article-hero { height: 180px; border-radius: var(--radius); display: grid; place-items: center; font-size: 80px; background: var(--yellow); margin-bottom: 16px; }

/* ===== ④〜⑥ 追加分 ===== */
.header-icons { display: flex; gap: 8px; }
.bottom-nav a { white-space: nowrap; letter-spacing: -.02em; }
@media (max-width: 380px) { .bottom-nav a { font-size: 10px; } }
.badge.static { position: static; display: inline-grid; margin-left: 4px; }
.sep { border: none; border-top: 1px dashed var(--border); margin: 18px 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 10px; }
.notice { background: #FFF1D6; border: 1.5px solid #F2C46D; border-radius: 12px; padding: 10px 14px; font-weight: 700; }

/* タグ */
.tag-ok { background: #DDF3E4; color: #2F7A4A; }
.tag-off { background: #EEE6DD; color: var(--text-sub); }
.tag-link { cursor: pointer; }
.tag-link:hover { background: var(--accent); color: #fff; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.thumb-emoji { display: grid; place-items: center; font-size: 36px; background: var(--yellow); border-radius: 12px; }

/* 保存ボタン */
.save-btn { border: 1.5px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.save-btn.on { background: var(--yellow); border-color: #E8D28F; }

/* 記事 */
.article-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--text-sub); margin-bottom: 14px; }
.article-body, .editor { line-height: 1.9; word-break: break-word; }
.article-body p, .editor p { margin: 0 0 1em; }
.article-body blockquote, .editor blockquote { margin: 0 0 1em; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--pink); border-radius: 0 10px 10px 0; color: var(--text-sub); }
.article-body img, .editor img { border-radius: 12px; margin: 8px 0; max-height: 480px; }

/* エディタ */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--beige); border: 1.5px solid var(--border); border-bottom: none; border-radius: 12px 12px 0 0; }
.editor-toolbar button { border: 1.5px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.editor-toolbar button:hover { background: var(--yellow); }
.editor { min-height: 220px; padding: 14px; background: #fff; border: 1.5px solid var(--border); border-radius: 0 0 12px 12px; outline: none; }
.editor:focus { border-color: var(--accent); }
.tag-editor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; }
.tag-editor #tags { display: contents; }
.tag-editor input { flex: 1; min-width: 160px; border: none; outline: none; padding: 6px 4px; }
.chip-tag { padding: 4px 6px 4px 12px; background: var(--accent-soft); border-color: var(--accent-soft); font-size: 13px; }
.chip-tag button { border: none; background: none; cursor: pointer; color: var(--accent-dark); font-size: 12px; }
.cover-slot { width: 100%; max-width: 360px; height: 160px; }

/* セグメントタブ */
.seg { display: flex; background: var(--card); border-radius: 999px; padding: 4px; margin-bottom: 16px; box-shadow: var(--shadow); overflow-x: auto; }
.seg a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--text-sub); white-space: nowrap; }
.seg a.on { background: var(--accent); color: #fff; }
@media (max-width: 420px) { .seg a { font-size: 13px; padding: 8px 6px; } }

/* カレンダー */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-wd span { font-size: 12px; font-weight: 700; color: var(--text-sub); padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1; max-height: 60px; display: grid; place-items: center; border-radius: 12px; font-size: 14px; }
.cal-day:hover { background: var(--beige); }
.cal-day.has { background: var(--pink); font-weight: 800; }
.cal-day.has i { position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); font-size: 0; }
.cal-day.today span { border-bottom: 2px solid var(--accent-dark); }
.cal-day.sel { background: var(--accent); color: #fff; }
.cal-day.sel i { background: #fff; }
.sun { color: #D9534F; }
.sat { color: #3B82F6; }
.cal-day.sel.sun, .cal-day.sel.sat { color: #fff; }

/* 情報リスト */
.info-list { margin: 0; display: grid; gap: 8px; }
.info-list > div { display: grid; grid-template-columns: 7em 1fr; gap: 8px; font-size: 14px; }
.info-list dt { color: var(--text-sub); font-weight: 700; }
.info-list dd { margin: 0; word-break: break-word; }

/* 横スクロール画像 */
.scroller-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); scrollbar-width: none; }
.scroller-track::-webkit-scrollbar { display: none; }
.scroller-track img { flex: 0 0 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; scroll-snap-align: center; cursor: zoom-in; }
.scroller-empty { height: 160px; display: grid; place-items: center; font-size: 64px; background: var(--yellow); border-radius: var(--radius); }
.plan-card .scroller-empty { height: 120px; font-size: 48px; }
.plan-price { font-size: 24px; font-weight: 800; margin: 10px 0; }

/* 支払い */
.pay-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.pay-total { font-size: 18px; border-bottom: none; }
.pay-hist { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--beige); }

/* スタンプカード */
.stamp-card { background: linear-gradient(160deg, var(--pink), var(--yellow)); margin-bottom: 12px; }
.stamp-head { display: flex; justify-content: space-between; margin-bottom: 12px; }
.stamp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--accent); display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: var(--text-sub); font-size: 13px; font-weight: 700; }
.stamp.on { border-style: solid; background: #fff; font-size: 26px; }
.stamp-msg { text-align: center; margin: 14px 0 0; }
.coupon { display: flex; justify-content: space-between; align-items: center; border: 2px dashed var(--accent); }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.user-row-act { display: flex; align-items: center; gap: 10px; }

/* メッセージ */
.menu-list a.conv-row { align-items: center; }
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-last { font-size: 13px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-last.unread { color: var(--text); font-weight: 700; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.chat { display: grid; gap: 12px; margin-bottom: 16px; }
.bubble-row { display: grid; justify-items: start; gap: 2px; }
.bubble-row.mine { justify-items: end; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--card); box-shadow: var(--shadow); word-break: break-word; }
.bubble-row.mine .bubble { background: var(--accent-soft); border-radius: 18px 18px 4px 18px; }
.chat-form { position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); background: var(--beige); padding: 8px 0; }
@media (min-width: 900px) { .chat-form { bottom: 10px; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--beige); }
.faq details:last-child { border-bottom: none; }
.faq summary { padding: 14px 18px; cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: var(--accent-dark); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0; padding: 0 18px 14px; font-size: 14px; color: var(--text-sub); }

/* ===== 第4弾 追加分 ===== */
/* ロゴ */
.logo-img { height: 36px; width: auto; }
.logo { font-size: 18px; color: #5B1F18; white-space: nowrap; }
.auth-logo-img { width: 200px; max-width: 70%; margin: 0 auto 6px; }

/* Q&Aカテゴリ（色付き） */
.cat-tag { background: color-mix(in srgb, var(--cat) 16%, #fff); color: color-mix(in srgb, var(--cat) 75%, #000); }
.cat-card { border-left: 5px solid var(--cat); }
.chip-cat.active { background: var(--cat); border-color: var(--cat); }
.cat-list { display: grid; border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; }
@media (min-width: 700px) { .cat-list { grid-template-columns: 1fr 1fr; } }
.cat-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-left: 6px solid var(--cat); border-bottom: 1px solid var(--beige); cursor: pointer; }
.cat-item input { position: absolute; opacity: 0; pointer-events: none; }
.cat-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--cat) 15%, #fff); flex-shrink: 0; }
.cat-name { font-weight: 700; flex: 1; }
.cat-check { opacity: 0; color: var(--cat); font-weight: 800; font-size: 18px; }
.cat-item:has(input:checked) { background: color-mix(in srgb, var(--cat) 10%, #fff); }
.cat-item:has(input:checked) .cat-check { opacity: 1; }
.cat-item:has(input:focus-visible) { outline: 2px solid var(--cat); outline-offset: -2px; }

/* ありがとう（連打OK） */
.thanks-btn.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.18); } }

/* 人気・新着ラベル */
.hl-thumb { position: relative; }
.hl-labels { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.label-pop, .label-new { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: #fff; }
.label-pop { background: #E8A33D; }
.label-new { background: var(--accent-dark); }

/* フォーム補助 */
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.withdraw summary { cursor: pointer; font-weight: 700; color: var(--text-sub); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats > div { display: grid; gap: 2px; }
.stats b { font-size: 17px; }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; text-align: left; } .stats > div { grid-template-columns: 1fr auto; } }

/* クーポン・スタンプ */
.coupon-terms { margin-top: 12px; font-size: 13px; }
.coupon-terms ul { margin: 6px 0 0; padding-left: 20px; color: var(--text-sub); }
.coupon-show { text-align: center; padding: 10px 0; }
.coupon-big { font-size: 44px; font-weight: 800; color: var(--accent-dark); }
.coupon-big small { font-size: 20px; }
.stamp-confirm { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 28px 18px; }
.stamp-confirm .btn { width: 100%; }
.stamp-pop { font-size: 80px; animation: stampIn .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stampIn { from { transform: scale(2.2) rotate(-25deg); opacity: 0; } }
.qr-card { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 24px; }
.qr-name { font-size: 18px; }
.qr-box { background: #fff; padding: 12px; border-radius: 12px; min-height: 244px; display: grid; place-items: center; }
.qr-reader { width: 100%; max-width: 360px; margin: 0 auto; border-radius: 12px; overflow: hidden; }

/* お知らせ・メール・規約 */
.menu-list a.notice-row { align-items: flex-start; gap: 10px; }
.notice-row.unread { background: var(--yellow); }
.mail summary { cursor: pointer; list-style: none; }
.mail pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: var(--beige); padding: 10px; border-radius: 10px; margin: 10px 0 0; }
.legal h2 { font-size: 16px; margin: 16px 0 4px; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0; font-size: 14px; }

/* プロフィールへのリンク（ユーザーネーム・画像） */
.user-link { cursor: pointer; border-radius: 6px; }
.user-name.user-link:hover { text-decoration: underline; }
.user-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.biz-tag { background: #E3EEFD; color: #2F5FA8; margin: 2px 0; }

/* 管理者ページ */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tiles-sm { grid-template-columns: repeat(3, 1fr); }
.tile { display: grid; gap: 2px; padding: 14px; }
.tile b { font-size: 22px; }
.tiles-sm .tile b { font-size: 17px; }
.tile .muted { font-size: 12px; }
.tile-sub { font-size: 11px; color: var(--text-sub); }
a.tile:hover { background: var(--yellow); }
.admin-menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .admin-menu { grid-template-columns: repeat(4, 1fr); } }
.admin-menu .card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-weight: 700; font-size: 14px; padding: 16px 8px; }
.admin-menu .card:hover { background: var(--yellow); }
.admin-ico { font-size: 28px; }
.alert-card { display: flex; align-items: center; gap: 6px; background: #FDE8E7; color: #A33A36; margin-bottom: 14px; }
.alert-card .chev { margin-left: auto; }
.menu-list a.admin-user-row { align-items: center; }
.tag-danger { background: var(--danger); color: #fff; }
.news-card { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; background: var(--yellow); border: 1.5px solid #E8D28F; }
.news-card .chev { margin-left: auto; }

/* 管理者ページ（追加分） */
.perm-box { background: var(--beige); border-radius: 12px; padding: 10px 12px; }
.mini-btn.pinned { color: #9A6200; background: #FFF1D6; }
.chip-ng { background: #FDE8E7; border-color: #FDE8E7; }
.label-pin { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: #fff; background: #8E6BB8; }
.charts { display: grid; gap: 10px; }
@media (min-width: 700px) { .charts { grid-template-columns: 1fr 1fr; } }
.chart { margin: 0; padding: 14px; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: #EFE6DA; stroke-width: 1; }
.chart .ax { font-size: 10px; fill: var(--text-sub); font-family: var(--font); }
.chart .val { font-size: 11px; font-weight: 700; fill: var(--text); font-family: var(--font); }
.chart .col { cursor: pointer; }
.chart .col:hover path { opacity: .85; }
.chart details summary { font-size: 12px; color: var(--text-sub); cursor: pointer; margin-top: 4px; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--text); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 8px; pointer-events: none; z-index: 30; white-space: nowrap; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; text-align: center; }
.mini-table th, .mini-table td { border-bottom: 1px solid var(--beige); padding: 4px 2px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.data-table th { text-align: left; color: var(--text-sub); font-weight: 700; border-bottom: 1.5px solid var(--border); padding: 6px 8px; white-space: nowrap; }
.data-table td { border-bottom: 1px solid var(--beige); padding: 8px; }
.rate { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--beige); vertical-align: middle; overflow: hidden; }
.rate span { display: block; height: 100%; background: #C2566A; border-radius: 3px; }
.csv-btn { border: none; cursor: pointer; font-family: inherit; color: inherit; }
.tile-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tile-pair small { display: block; font-size: 11px; color: var(--text-sub); }
.tile-pair b { font-size: 18px; }
.event-filter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.event-filter .label { font-size: 12px; margin-bottom: 2px; }
.event-filter .select { padding: 8px 10px; font-size: 14px; }
@media (max-width: 560px) { .event-filter { grid-template-columns: 1fr; } }
.stamp-history { margin: 14px 0 0; }
.stamp-history summary { cursor: pointer; }
.stamp-hist { max-height: 360px; overflow-y: auto; margin-top: 6px; }
.nav-svg { width: 26px; height: 26px; display: block; }
@media (min-width: 900px) { .nav-svg { width: 24px; height: 24px; } }

/* スタンプ（ロゴ） */
.stamp.on { padding: 6px; }
.stamp-logo { width: 100%; height: 100%; object-fit: contain; }
.stamp-pop .stamp-logo.big { width: 110px; height: auto; }
.stamp-card.locked { filter: grayscale(.8); opacity: .55; }

/* 会員資格 */
.member-gate { text-align: center; display: grid; gap: 8px; justify-items: center; border: 2px dashed var(--accent); margin: 12px 0; }
.member-gate p { margin: 0; font-size: 14px; }
.member-gate .btn { max-width: 360px; }
.member-gate-ico { font-size: 34px; }
.member-status { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.member-status.ok { border-left: 5px solid #6FB39C; }
.member-status.soon { border-left: 5px solid #E8A33D; }
.member-status.none { border-left: 5px solid var(--accent); }
.member-status .btn { flex-shrink: 0; }
.member-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; border: 1.5px solid var(--accent); }
.member-banner.soon { border-color: #E8A33D; background: #FFF6E0; }
.member-banner > span:first-child { font-size: 24px; }
.member-banner .chev { margin-left: auto; }
.plan-member { font-size: 13px; background: var(--yellow); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; }
.member-admin { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-admin .input { width: 90px; }

/* SNS・URL */
.sns-form { display: grid; gap: 8px; }
.sns-row { display: grid; grid-template-columns: 28px 9.5em 1fr; align-items: center; gap: 6px; }
@media (max-width: 480px) { .sns-row { grid-template-columns: 28px 1fr; } .sns-row .input { grid-column: 1 / -1; } }
.sns-label { font-size: 13px; font-weight: 700; }
.sns-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); font-size: 13px; flex-shrink: 0; }
.sns-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.sns-links a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #fff; border: 1.5px solid var(--border); font-size: 13px; font-weight: 700; }
.sns-links a:hover { background: var(--yellow); }
.sub-card { border-left: 5px solid #6FB39C; }
.pay-row b small { font-size: 12px; font-weight: 500; }
.member-status.alert, .sub-card.alert { border-left: 5px solid var(--danger); background: #FFF5F4; }
.member-banner.alert { border-color: var(--danger); background: #FFF5F4; }
.demo-tools { margin-top: 6px; font-size: 13px; }
.demo-tools summary { cursor: pointer; color: var(--text-sub); }
.demo-tools .btn { margin: 4px 4px 0 0; }

/* 使い方ガイド */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.page-head .page-title { margin-bottom: 0; }
.guide-btn { border: 1.5px solid var(--accent); background: var(--card); color: var(--accent-dark); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.guide-btn:hover { background: var(--accent-soft); }
.guide-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.guide-x { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--text-sub); padding: 4px 8px; }
.guide-body { text-align: center; min-height: 230px; padding: 6px 4px 0; }
.guide-ico { font-size: 52px; line-height: 1.2; }
.guide-step { font-size: 12px; font-weight: 800; color: var(--accent-dark); margin-top: 4px; }
.guide-body h3 { font-size: 19px; margin: 4px 0 8px; }
.guide-body p { margin: 0; font-size: 15px; line-height: 1.8; text-align: left; }
.guide-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.guide-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all .2s; }
.guide-dots span.on { background: var(--accent); width: 20px; border-radius: 4px; }
.guide-nav { margin-top: 14px; }
.guide-hide { display: block; margin: 12px auto 0; border: none; background: none; color: var(--text-sub); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px; }
.guide-foot { text-align: center; font-size: 12px; margin: 10px 0 0; }
.guide-links { margin-bottom: 12px; }
.guide-link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* 主催イベント */
.hosted-card { display: grid; gap: 8px; padding: 14px; }
.hosted-main { display: flex; gap: 12px; align-items: center; }
.hosted-card.ended .hosted-main { opacity: .7; }
.hosted-actions { margin-top: 0; padding-top: 8px; border-top: 1px dashed var(--border); }
.tag-ended { background: #E9E2DA; color: #6E5A4B; }

/* Square のカード入力欄 */
.sq-card { min-height: 96px; margin: 12px 0 4px; }

/* 特定商取引法に基づく表記など */
.legal ol, .legal ul { margin: 4px 0 0; padding-left: 1.4em; font-size: 14px; }
.legal li { margin: 2px 0; }
.legal > p + p { margin-top: 8px; }
.legal-table > div { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.legal-table dt { font-weight: 700; font-size: 13px; }
.legal-table dd { margin: 2px 0 0; font-size: 14px; }
.legal-table > div { grid-template-columns: 9em 1fr; }
@media (max-width: 520px) { .legal-table > div { grid-template-columns: 1fr; gap: 2px; } }
