/* =========================================================
   ボケボケ スタイル
   ========================================================= */

:root {
  --main: #ff8c00;      /* テーマカラー（オレンジ） */
  --main-dark: #e67a00;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #222;
  --muted: #888;
  --border: #e3e5e9;
  --star: #ffb400;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* ---- ヘッダー ---- */
.site-header {
  background: var(--main);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  position: sticky; top: 0; z-index: 10;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo { display: inline-flex; align-items: center; }
.logo-img { height: 46px; display: block; border-radius: 10px; }
.nav a { color: #fff; margin-left: 16px; font-size: 14px; opacity: .95; }
.nav a:hover { text-decoration: underline; }

main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }

/* ---- 見出し ---- */
h1.page-title { font-size: 22px; margin: 0 0 16px; }

/* ---- タブ（新着/人気）---- */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tabs a {
  padding: 6px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); font-size: 14px;
}
.tabs a.active { background: var(--main); color: #fff; border-color: var(--main); }

/* ---- お題一覧（タイル）---- */
.odai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.odai-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  transition: transform .1s, box-shadow .1s;
}
.odai-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.odai-card img { width: 100%; height: 180px; object-fit: cover; display: block; background: #ddd; }
.odai-card .meta { padding: 10px 12px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }

/* ---- お題ページ ---- */
.odai-detail { text-align: center; margin-bottom: 24px; }
.odai-detail img {
  max-width: 100%; max-height: 460px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff;
}
.odai-detail .odai-title { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ---- ボケ投稿フォーム ---- */
.boke-form {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 28px;
}
.boke-form h2 { font-size: 16px; margin: 0 0 12px; }
.boke-form input[type=text],
.boke-form textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; font-family: inherit; margin-bottom: 10px;
}
.boke-form textarea { resize: vertical; min-height: 70px; }
.btn {
  display: inline-block; background: var(--main); color: #fff; border: none;
  padding: 10px 24px; border-radius: 999px; font-size: 15px; font-weight: bold;
  cursor: pointer;
}
.btn:hover { background: var(--main-dark); }

/* ---- ボケ一覧 ---- */
.boke-list { list-style: none; padding: 0; margin: 0; }
.boke-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.boke-item .boke-text {
  font-size: 22px; font-weight: 700; color: #1a1a1a; line-height: 1.5;
  margin: 0 0 8px; white-space: pre-wrap; word-break: break-word;
}
@media (max-width: 600px) {
  .boke-item .boke-text { font-size: 19px; }
}
.boke-item .boke-meta { font-size: 12px; color: var(--muted); }
.boke-item .boke-nick { font-weight: bold; color: var(--text); }

/* ---- 星ボタン ---- */
.star-btn {
  flex-shrink: 0; text-align: center; background: #fff8ec;
  border: 1px solid var(--star); color: var(--main-dark);
  border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px; line-height: 1.2;
}
.star-btn:hover { background: #fff0d6; }
.star-btn .star-count { display: block; font-size: 18px; font-weight: bold; color: var(--star); }
.star-btn.voted { opacity: .55; cursor: default; }

/* ---- ボケの下のアクション（シェア・通報）---- */
.boke-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.share-btn {
  display: inline-flex; align-items: center;
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  color: #fff; font-weight: bold;
}
.share-btn.share-x    { background: #000; }
.share-btn.share-x:hover    { background: #333; }
.share-btn.share-line { background: #06c755; }
.share-btn.share-line:hover { background: #05a648; }
.report-link { font-size: 12px; color: #b3261e; opacity: .8; }
.report-link:hover { opacity: 1; text-decoration: underline; }

/* ---- ランキング番号 ---- */
.rank-no {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--main); color: #fff; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.rank-thumb img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }

/* ---- お知らせ・空メッセージ ---- */
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.notice { background: #fff3cd; border: 1px solid #ffe08a; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.error  { background: #fdecea; border: 1px solid #f5c2c0; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; color: #b3261e; }

/* ---- フッター ---- */
.site-footer { border-top: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 13px; text-align: center; padding: 20px 0; }

/* ---- 管理ページ ---- */
.admin-box { max-width: 420px; margin: 40px auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.admin-box h1 { font-size: 18px; margin-top: 0; }
.admin-box input[type=text], .admin-box input[type=password], .admin-box input[type=file] {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; font-size: 15px;
}
