/* public/assets/style.css — jQuery Mobile を廃した素の CSS。モバイルファースト。 */
:root {
  --bg: #f4f5f7;
  --card: #fff;
  --ink: #1b1f24;
  --sub: #6b7280;
  --accent: #2b6cb0;
  --line: #e3e6ea;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--accent); }

/* ---- ヘッダ ---- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: var(--accent); color: #fff;
  padding: .6rem 1rem;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
header.site h1 { font-size: 1rem; margin: 0; font-weight: 700; }
header.site h1 a { color: #fff; text-decoration: none; }
header.site .spacer { flex: 1; }
header.site a.btn { color: #fff; border: 1px solid rgba(255,255,255,.6); }

.btn {
  display: inline-block; padding: .4rem .8rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  text-decoration: none; cursor: pointer; font-size: .9rem;
}
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---- 検索バー ---- */
.searchbar {
  max-width: 900px; margin: 1rem auto 0; padding: 0 1rem;
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}
.searchbar input[type=search] {
  flex: 1; min-width: 12rem; padding: .5rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; font-size: 1rem;
}
.searchbar label { font-size: .85rem; color: var(--sub); display: inline-flex; gap: .2rem; align-items: center; }

/* ---- 一覧(カード) ---- */
.list { max-width: 900px; margin: 1rem auto; padding: 0 1rem; display: grid; gap: .75rem; }
.card {
  display: flex; gap: .8rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .7rem; text-decoration: none; color: inherit;
  transition: box-shadow .15s;
}
.card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.card .thumb {
  width: 80px; height: 80px; flex: none; border-radius: 8px; object-fit: cover;
  background: #e9edf1;
}
.card .body { min-width: 0; }
.card .body .title { font-weight: 700; margin: 0 0 .2rem; }
.card .body .comment { color: var(--sub); font-size: .9rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .body .meta { color: var(--sub); font-size: .78rem; margin: .3rem 0 0; }

.sentinel { height: 1px; }
.loading, .empty { text-align: center; color: var(--sub); padding: 1.5rem; }

/* ---- 詳細 ---- */
.detail { max-width: 760px; margin: 1rem auto; padding: 0 1rem 3rem; }
.detail h2 { text-align: center; }
.detail .photos { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.detail .photos img { max-height: 320px; max-width: 100%; border-radius: 8px; cursor: zoom-in; }
.detail .meta { color: var(--sub); font-size: .85rem; text-align: right; }
.detail .comment { white-space: pre-wrap; word-break: break-word; }
.section-title { border-bottom: 2px solid var(--accent); padding-bottom: .2rem; margin: 1.6rem 0 .6rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { background: #eef2f7; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; text-decoration: none; color: var(--ink); }
.tag button { border: none; background: none; color: #c0392b; cursor: pointer; margin-left: .3rem; }
.map iframe { width: 100%; max-width: 420px; height: 260px; border: 0; border-radius: 8px; }
.nav { display: flex; justify-content: space-between; margin-top: 2rem; }

/* ---- ライトボックス ---- */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none;
  align-items: center; justify-content: center; z-index: 100; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 95vh; }

/* ---- フォーム ---- */
.form { max-width: 620px; margin: 1rem auto; padding: 0 1rem 3rem; display: grid; gap: 1rem; }
.form label { display: grid; gap: .3rem; font-size: .9rem; }
.form input, .form textarea {
  padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.form textarea { min-height: 6rem; }
.msg { padding: .6rem .8rem; border-radius: 8px; }
.msg.err { background: #fdecea; color: #b71c1c; }
.msg.ok  { background: #e8f5e9; color: #1b5e20; }

@media (min-width: 600px) {
  .card .thumb { width: 110px; height: 110px; }
}
