:root {
  --bg: #15161a;
  --panel: #1f2126;
  --line: #2f323a;
  --text: #f1ede6;
  --muted: #a39d94;
  --accent: #e8a24a;      /* 遊牧民ちゃんのポンチョの琥珀色 */
  --accent-2: #2e8f99;    /* ティール */
  --tile-radius: 12px;
  --bar-h: 176px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%; }
body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

.top { padding: 20px 16px 8px; max-width: 1100px; margin: 0 auto; }
.top h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: .02em; }
.top .lead { margin: 0 0 6px; color: var(--text); font-size: 15px; }
.top .count-users { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--accent); font-size: 13px; font-weight: 700; }
.top .count-users:empty { display: none; }
.top .how { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.top .how.warn { margin-top: 6px; color: #e9c48a; }
.top .how.warn strong { color: var(--accent); }
.top .how.tip { margin-top: 6px; }
.top .how.tip strong { color: var(--text); }
.top .how.tip a { color: var(--accent); }

.decomp { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.decomp summary { cursor: pointer; padding: 10px 12px; font-size: 14px; font-weight: 600; list-style: none; }
.decomp summary::-webkit-details-marker { display: none; }
.decomp summary::before { content: "▸ "; color: var(--accent); }
.decomp[open] summary::before { content: "▾ "; }
.decomp ol { margin: 0; padding: 0 14px 12px 32px; font-size: 13px; line-height: 1.6; }
.decomp li { margin: 6px 0; }
.decomp .note { color: var(--muted); margin-left: 6px; }
.decomp textarea { width: 100%; margin-top: 6px; font: inherit; font-size: 13px; padding: 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); resize: vertical; }
button.mini { font: inherit; font-size: 14px; min-height: 40px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
button.mini.primary { background: var(--accent); color: #1a1408; border-color: var(--accent); font-weight: 700; }
button.mini:disabled { opacity: .55; cursor: wait; }

.fmt { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fmt button { font: inherit; font-size: 13px; min-height: 36px; padding: 0 12px; border: 0; background: var(--panel);
  color: var(--muted); cursor: pointer; }
.fmt button.on { background: var(--accent-2); color: #fff; }

.tile.custom { border-style: dashed; border-color: var(--accent-2); }
.tile.custom .lab { font-size: 12px; color: var(--text); }

main { max-width: 1100px; margin: 0 auto; padding: 4px 12px 16px; }
section.cat { margin: 18px 0 6px; }
.cat h2 { font-size: 16px; margin: 0 0 8px 4px; display: flex; align-items: center; gap: 10px; }
.cat h2 .pick { font-size: 13px; color: var(--accent); font-weight: normal; }
.cat h2 .pick:empty::before { content: "未選択"; color: var(--muted); }
/* 見出しを押すと畳む/開く */
.foldbar { max-width: 1100px; margin: 10px auto 0; padding: 0 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.foldbar .note { color: var(--muted); font-size: 13px; margin-right: auto; }
.foldbar .mini { min-height: 36px; font-size: 13px; }
.foldbar .clearall { border-color: var(--accent); color: var(--accent); }
.cat h2 .fold { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 6px 4px 6px 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.cat h2 .fold .n { font-size: 12px; color: var(--muted); font-weight: normal; }
.cat h2 .chev { width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .12s; margin-top: -3px; }
.cat.closed h2 .chev { transform: rotate(-45deg); margin-top: 2px; }
.cat.closed .grid { display: none; }
.cat.closed { margin-bottom: 0; border-bottom: 1px solid var(--line); }

/* 末尾のアンケート(Google フォーム埋め込み。2026-09-15) */
.survey { margin: 48px auto 24px; max-width: 720px; padding: 0 12px; }
.survey details { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; background: var(--panel); }
.survey summary { cursor: pointer; font-size: 18px; font-weight: 700; list-style: none; }
.survey summary::-webkit-details-marker { display: none; }
.survey summary::before { content: "▸ "; color: var(--accent); }
.survey details[open] summary::before { content: "▾ "; }
.survey .note { margin: 10px 0 14px; color: var(--muted); font-size: 13px; }
.survey a { color: var(--accent-2); }
.survey iframe { max-width: 640px; display: block; margin: 0 auto; background: #fff; border-radius: 8px; }
.survey a.survey-open { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--accent); color: #1a1408; font-weight: 700; text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

.tile { position: relative; border: 3px solid transparent; border-radius: var(--tile-radius);
  background: var(--panel); padding: 0; cursor: pointer; overflow: hidden; color: inherit;
  text-align: left; -webkit-tap-highlight-color: transparent; min-height: 44px;
  transition: transform .08s ease, border-color .12s ease; }
.tile:active { transform: scale(.97); }
.tile img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #000; }
.tile .thumb { display: block; width: 100%; aspect-ratio: 3 / 4; background-repeat: no-repeat; background-color: #000; }
.tile .noimg { aspect-ratio: 3 / 4; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.tile .lab { display: block; padding: 6px 8px 7px; font-size: 13px; line-height: 1.3; }
.tile .hint { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--muted); }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232,162,74,.25); }
.tile.on::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--accent); color: #1a1408; font-weight: 700;
  display: grid; place-items: center; font-size: 15px; }
.tile:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(21,22,26,.96);
  border-top: 1px solid var(--line); backdrop-filter: blur(8px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.bar-in { max-width: 1100px; margin: 0 auto; }
.bar-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.custom-slot:empty { display: none; }
.bar-title { font-size: 14px; font-weight: 600; }
.count { color: var(--muted); font-weight: normal; font-size: 12px; }
.free { flex: 1; min-width: 180px; }
.free input { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
textarea#out { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 10px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  resize: none; }
.btns { display: flex; gap: 8px; margin-top: 8px; }
.btns button { font: inherit; font-size: 16px; min-height: 48px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.btns button.primary { flex: 1; background: var(--accent); color: #1a1408; border-color: var(--accent);
  font-weight: 700; }
.btns button:active { transform: scale(.98); }

.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); transform: translateX(-50%) translateY(20px);
  background: var(--accent-2); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 92vw; text-align: center; }
@media (max-width: 599px) { :root { --bar-h: 232px; } }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
