/* キノコソース 新デザイン（2026-11）
   style.css の後に読み込む上書き。クラス名は変えていない。
   ねらい：スマホで読みやすい文字の大きさ、押しやすいボタン、書き込みやすい入力欄。 */

:root {
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #1f2126;
  --muted: #6b6f78;
  --border: #e2e3e8;
  --thin: #eeeff2;
  --soft: #fbeef0;        /* アクセント色のうすい下地 */
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

.small { font-size: 12.5px; }

/* ---- 確認用の帯 ---- */
.preview-bar {
  background: #2b2d33;
  color: #fff;
  font-size: 12.5px;
  text-align: center;
  padding: 4px 12px;
}
.preview-bar a, .preview-bar a:visited { color: #ffd0d7; text-decoration: underline; }

/* ---- ヘッダー ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 8px 14px 0;
  background: var(--card);
}
.header-inner, .global-nav, .breadcrumbs, .page { max-width: 920px; }
.logo img { height: 38px; }
.shop-banner { max-width: 300px; }

.global-nav {
  gap: 6px;
  padding: 8px 0 10px;
  font-size: 13.5px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center;
}
.global-nav::-webkit-scrollbar { display: none; }
.global-nav a {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg);
  font-weight: 600;
  white-space: nowrap;
}
.global-nav a:hover { background: var(--soft); text-decoration: none; }
.nav-search { flex: 0 0 auto; }
.nav-search input {
  border-radius: 999px 0 0 999px;
  padding: 5px 12px;
  font-size: 14px;
  width: 160px;
  border-right: none;
}
.nav-search button { border-radius: 0 999px 999px 0; padding: 5px 14px; font-size: 13.5px; }

.breadcrumbs { padding: 10px 14px 0; font-size: 12.5px; }

/* ---- レイアウト：本文が先、案内は下 ---- */
.page { padding: 10px 14px 32px; display: flex; flex-direction: column; }
.main { order: 1; }
.info-row { order: 2; margin: 20px 0 0; gap: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.card h2 {
  font-size: 15.5px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  color: var(--text);
  border-bottom: 1px solid var(--thin);
}
.card h1 { font-size: 20px; line-height: 1.45; color: var(--text); margin: 2px 0 8px; }
.card h3 { font-size: 14.5px; margin: 14px 0 4px; }

.page-heading {
  font-size: 20px;
  line-height: 1.45;
  margin: 10px 0 12px;
  border-left: 5px solid var(--accent);
  padding-left: 10px;
}

/* ---- トップ ---- */
.hero { padding: 18px 16px; }
.hero p { margin: 0 0 12px; }
.hero-search { display: flex; gap: 0; margin: 4px 0 10px; }
.hero-search input {
  flex: 1; min-width: 0;
  font-size: 16px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
}
.hero-search input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.hero-search button {
  background: var(--accent); color: #fff; border: none;
  padding: 0 20px; font-size: 15px; font-weight: bold;
  border-radius: 0 10px 10px 0; cursor: pointer;
}
.hero-links { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.hero-links a { padding: 4px 12px; border-radius: 999px; background: var(--bg); color: var(--text); font-weight: 600; }
.hero-links a:visited { color: var(--text); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { border-bottom: 1px solid var(--thin); }
.feed li:last-child { border-bottom: none; }
.feed a { display: block; padding: 10px 2px; color: var(--text); }
.feed a:visited { color: var(--text); }
.feed a:hover { text-decoration: none; background: var(--soft); }
.feed-title { font-weight: bold; color: var(--link); }
.feed-when { color: var(--muted); font-size: 12.5px; margin-left: 6px; white-space: nowrap; }
.feed-body { display: block; color: var(--text); font-size: 14px; line-height: 1.6;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank li { counter-increment: rank; border-bottom: 1px solid var(--thin); }
.rank li:last-child { border-bottom: none; }
.rank a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; }
.rank a:hover { text-decoration: none; background: var(--soft); }
.rank a::before {
  content: counter(rank);
  flex: 0 0 24px; height: 24px; line-height: 24px; text-align: center;
  border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 12.5px; font-weight: bold;
}
.rank li:nth-child(-n+3) a::before { background: var(--accent); color: #fff; }
.rank .t { flex: 1; min-width: 0; font-weight: 600; }
.count-pill {
  flex: 0 0 auto;
  font-size: 12.5px; color: var(--muted);
  background: var(--bg); border-radius: 999px; padding: 1px 10px; white-space: nowrap;
}

.home-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .home-two { grid-template-columns: 1fr; gap: 0; } }

/* ---- 地域・ジャンル ---- */
.region-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .region-list { grid-template-columns: 1fr; } }
details.region {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
details.region > summary {
  list-style: none; cursor: pointer;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  font-weight: bold; font-size: 15px;
}
details.region > summary::-webkit-details-marker { display: none; }
details.region > summary::after { content: "＋"; margin-left: auto; color: var(--muted); font-weight: normal; }
details.region[open] > summary::after { content: "－"; }
details.region > summary .count-pill { font-weight: normal; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; margin: 0; list-style: none; }
.chips a {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--bg); color: var(--text); font-size: 13.5px;
}
.chips a:visited { color: var(--text); }
.chips a:hover { background: var(--soft); text-decoration: none; }
.chips a b { color: var(--accent); font-weight: bold; margin-left: 4px; }
.chips a.empty { color: var(--muted); background: none; border: 1px dashed var(--border); }

/* ---- 一覧 ---- */
.hot-threads li, .thread-list li {
  white-space: normal;
  padding: 8px 0;
  border-bottom: 1px solid var(--thin);
}
.thread-rows { list-style: none; margin: 0; padding: 0; }
.thread-rows li { border-bottom: 1px solid var(--thin); }
.thread-rows li:last-child { border-bottom: none; }
.thread-rows a { display: flex; align-items: center; gap: 10px; padding: 11px 2px; }
.thread-rows a:hover { text-decoration: none; background: var(--soft); }
.thread-rows .t { flex: 1; min-width: 0; font-weight: 600; }
.thread-rows .sub { display: block; font-weight: normal; font-size: 12.5px; color: var(--muted); }
.thread-rows li.thin .t { font-weight: normal; }

details.fold > summary {
  cursor: pointer; font-weight: bold; font-size: 15px; list-style: none;
  display: flex; align-items: center;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "＋"; margin-left: auto; color: var(--muted); }
details.fold[open] > summary::after { content: "－"; }
details.fold[open] > summary { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--thin); }

/* ---- スレッド ---- */
.thread-title { font-size: 20px; }
.thread-sub { margin: -6px 0 12px; font-size: 12.5px; color: var(--muted); }

.post { border-bottom: 1px solid var(--thin); padding: 14px 0; }
.post:first-of-type { padding-top: 4px; }
.post-meta { font-size: 12.5px; gap: 8px; align-items: center; }
.post-number {
  font-size: 12.5px; color: #fff; background: var(--accent);
  border-radius: 6px; padding: 0 8px; line-height: 1.7;
}
.post-body { margin: 6px 0 10px; font-size: 15.5px; line-height: 1.8; }
.post-tools { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.reply-link { font-size: 12.5px; padding: 4px 0; }
.del-request { font-size: 12px; }

.reactions { gap: 6px; flex-wrap: wrap; }
.reactions button {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: var(--card);
  min-height: 32px;
}
.reactions button.reacted { background: var(--soft); }

/* ---- フォーム ---- */
.post-form label { font-size: 13.5px; margin-bottom: 10px; }
.post-form input[type="text"],
.post-form input[type="password"],
.post-form textarea {
  font-size: 16px;            /* 16px未満だとiPhoneが勝手に拡大する */
  padding: 11px 12px;
  border-radius: 10px;
  margin-top: 6px;
  line-height: 1.6;
  color: var(--text);
}
.post-form textarea { resize: vertical; min-height: 92px; }
.post-form input:focus, .post-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.post-form button {
  padding: 11px 32px;
  font-size: 15px;
  border-radius: 10px;
}
.form-hints { margin: 0 0 10px; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); }
.form-hints li::before { content: "・"; }
@media (max-width: 700px) { .post-form button { width: 100%; } }

.search-form input[type="search"] {
  font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text); min-width: 0;
}
.search-form button { border-radius: 10px; padding: 10px 20px; font-size: 14.5px; }

/* 画面の右下にいつも出る「書き込む」ボタン */
.fab-write {
  position: fixed; right: 16px; bottom: 18px; z-index: 50;
  background: var(--accent); color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-size: 15px; font-weight: bold;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.fab-write:visited { color: #fff; }
.fab-write:hover { text-decoration: none; opacity: 0.9; }
.btn-write { border-radius: 10px; padding: 10px 28px; font-size: 15px; }
.write-bottom { margin: 16px 0 4px; }
.site-footer { padding: 18px 14px 80px; font-size: 12.5px; }

.pager { gap: 6px; font-size: 14px; }
.pager a, .pager strong { border-radius: 8px; padding: 4px 12px; }

.shop-info { border-left: 4px solid var(--accent); }
.shop-info-body.clamped {
  max-height: 150px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.more-btn {
  display: block; width: 100%; margin-top: 8px; padding: 9px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.badge-new, .badge-closed { border-radius: 4px; font-size: 11px; padding: 1px 6px; }

.admin-table, .price-table { font-size: 13.5px; }
.admin-table th, .admin-table td, .price-table th, .price-table td { padding: 6px 8px; }
.table-note { font-size: 14px; }
.pr-block { border-radius: var(--radius); padding: 12px 14px; }
.anchor-tip { font-size: 13px; border-radius: 8px; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141417;
    --card: #1f1f24;
    --text: #dcdce0;
    --muted: #9a9aa4;
    --border: #34343b;
    --thin: #2a2a30;
    --soft: #33212a;
  }
  .global-nav a { background: #2a2a30; }
  .hero-search input, .search-form input[type="search"] { background: #26262c; }
  .reactions button { background: #26262c; }
  .reactions button.reacted { background: var(--soft); }
  .preview-bar { background: #000; }
}
