/* =====================================================================
   公開の準備（係H）：β版の札・利用規約へのリンク・お問い合わせと通報の窓・利用規約のページ（/terms）
   色と文字はゲーム（app.css）と同じ。真鍮＝押せるもの、朱＝注意
   ===================================================================== */

/* ---- タイトル：リボンのとなりの「β版」の札と、下のリンク ---- */
.logo-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.beta-tag {
  display: inline-grid; place-items: center; height: 30px; padding: 0 10px; flex: none;
  font-family: var(--font-dot); font-size: calc(15px * var(--fs-k, 1)); font-weight: 400; letter-spacing: .08em; line-height: 1;
  color: var(--brass-hi); background: #0b1512; cursor: help;
  box-shadow: 0 -3px 0 var(--brass), 0 3px 0 var(--brass), -3px 0 0 var(--brass), 3px 0 0 var(--brass), 0 6px 0 var(--brass-deep);
  transform: rotate(-4deg);
}
.title-wrap { grid-template-areas: "hero" "card" "news" "foot"; }
.title-foot {
  grid-area: foot; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 18px;
  margin: 4px 4px 0; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: var(--fs-min); color: var(--muted);
}
.title-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brass-hi); text-underline-offset: 3px; }
.title-foot .tf-free { flex-basis: 100%; text-align: center; color: var(--faint); } /* スマホ：1行目に「無料」、2行目にリンク2つ */
@media (min-width: 900px) {
  .title-wrap { grid-template-areas: "hero card" "news card" "foot foot"; grid-template-rows: auto 1fr auto; }
  .title-foot .tf-free { flex-basis: auto; }
}
/* ---- 0.10.1：WebGameJp の投票バナー（番号を入れたサーバーだけ。ui/vote.js）。0.12.3：タイトル画面の「ひろめる・応援する」のカードの中に移した（css/share.css の .tc-vote） ---- */
.tv-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 2px; text-align: center; }
.tv-cap { color: var(--faint); font-size: var(--fs-min); line-height: 1.5; }
.tv-link img { display: block; width: 200px; max-width: 100%; height: auto; aspect-ratio: 5 / 1; border-radius: 4px; background: #1d2330; }
.tv-link.no-img { text-decoration: underline; }
.tv-link:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }

/* ---- 下のクレジット・メニューの下：利用規約へのリンク ---- */
.credit-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; margin-top: 2px; }
.credit-links a, .credit-links .link-btn { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: var(--fs-min); font-weight: 400; }
.wm-credit .wm-terms { display: block; width: fit-content; margin: 2px auto 0; padding: 8px 6px; color: var(--muted); }

/* ---- 設定・遊び方：このゲームについて ---- */
.about-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 6px 0 0; }
.about-card .hint { margin-top: 6px; }

/* ---- お問い合わせ・通報の窓 ---- */
.ct-form h2 { margin: 0 0 6px; }
.ct-form .field { margin-top: 12px; }
.ct-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-kinds label, .rp-reasons label { position: relative; }
.ct-kinds input, .rp-reasons input { position: absolute; opacity: 0; pointer-events: none; }
.ct-kinds > label > span, .rp-reasons > label > span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 12px; border-radius: var(--r-btn);
  border: 1.5px solid var(--line-2); background: rgba(5, 12, 9, .35); color: var(--text); font-weight: 700; cursor: pointer; line-height: 1.3;
}
.ct-kinds input:checked + span, .rp-reasons input:checked + span { border-color: var(--brass); background: rgba(227, 179, 65, .14); color: var(--brass-hi); }
.rp-reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.rp-reasons > label > span { width: 100%; }
.rp-form .rp-reasons input:checked + span { border-color: var(--ember); background: rgba(240, 116, 74, .14); color: #ffc0a8; }
.ct-kinds input:focus-visible + span, .rp-reasons input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.ct-hint { min-height: 1.5em; margin: 8px 0 0; }
.ct-form textarea { min-height: 7.5em; resize: vertical; line-height: 1.6; }
.rp-form textarea { min-height: 4.5em; }
.ct-under { display: flex; justify-content: flex-end; margin: 4px 0 0; }
.ct-count { font-size: var(--fs-min); color: var(--faint); }
.ct-count.over { color: #ffb398; }
.ct-form .err:empty { min-height: 0; }
.ct-form .actions .btn-ghost[href] { text-decoration: none; }
@media (max-width: 520px) {
  .ct-form .actions { justify-content: stretch; }
  .ct-form .actions .btn { flex: 1 1 auto; }
  .ct-form .actions .btn-ghost[href] { flex-basis: 100%; }
}

/* ---- 管理人モード：お問い合わせと通報の数 ---- */
.gm-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; font-size: var(--fs-min); }
.gm-counts small { color: var(--faint); margin-right: 8px; }
.gm-contacts { margin-top: 6px; }
.gm-contacts span { min-width: 0; overflow-wrap: anywhere; }

/* =====================================================================
   利用規約・プライバシー・お問い合わせ（/terms）
   ===================================================================== */
body.tm { font-size: calc(16px * var(--fs-k, 1)); line-height: 1.85; }
.tm-wrap { width: min(780px, 100%); margin: 0 auto; padding: 20px 16px calc(40px + var(--safe-b)); }
.tm-head { padding: 4px 0 14px; }
.tm-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--brass-hi); text-decoration: none; }
.tm-back:hover { text-decoration: underline; }
.tm-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 8px 0 0; font-family: var(--font-dot); font-size: calc(20px * var(--fs-k, 1)); color: #fff6dc; line-height: 1.3; }
.tm-brand .beta-tag { height: 26px; font-size: 14px; }
.tm-head h1 { margin: 14px 0 0; font-family: var(--font-dot); font-weight: 400; font-size: clamp(22px, 6vw, 30px); line-height: 1.35; color: var(--brass-hi); }
.tm-date { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-min); }
.tm-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; padding: 0; }
.tm-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: var(--fs-min); text-decoration: none; }
.tm-toc a:hover { border-color: var(--brass); color: var(--brass-hi); }
.tm-sec { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 16px 16px 18px; scroll-margin-top: 12px; }
.tm-sec + .tm-sec { margin-top: 14px; }
.tm-sec h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--font-dot); font-weight: 400; font-size: calc(21px * var(--fs-k, 1)); color: #fff6dc; }
.tm-sec h2::before { content: ''; flex: none; width: 8px; height: 8px; background: var(--brass); box-shadow: 0 2px 0 var(--brass-deep); }
.tm-sec h3 { margin: 18px 0 6px; font-size: calc(17px * var(--fs-k, 1)); color: var(--brass-hi); }
.tm-sec p { margin: 0 0 10px; }
.tm-sec ul { margin: 0 0 10px; padding-left: 1.3em; }
.tm-sec li { margin: 4px 0; }
.tm-sec li::marker { color: var(--brass); }
.tm-sec .tm-note { color: var(--muted); font-size: var(--fs-min); }
.tm-sec dl { margin: 0 0 10px; display: grid; gap: 8px; }
.tm-sec dt { font-weight: 700; color: var(--text); }
.tm-sec dd { margin: 0; padding-left: 12px; border-left: 3px solid var(--line-2); color: var(--muted); }
.tm-sec b { color: #fff6dc; }
.tm-credit { display: flex; align-items: center; gap: 8px; color: #d6cfbb; }
.tm-credit::before { content: ''; flex: none; width: 6px; height: 6px; background: var(--brass); box-shadow: 0 2px 0 var(--brass-deep); }
/* フォーム */
.tm-form { display: grid; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.tm-form textarea { min-height: 10em; resize: vertical; line-height: 1.6; }
.tm-form .tm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
.tm-form .tm-row .ct-count { margin-left: auto; }
.tm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tm-result { min-height: 1.5em; margin: 0; padding: 0; font-weight: 700; }
.tm-result.ok { padding: 10px 12px; border-radius: var(--r-btn); background: rgba(92, 200, 168, .14); border: 1.5px solid rgba(92, 200, 168, .5); color: #bff0de; }
.tm-result.ng { padding: 10px 12px; border-radius: var(--r-btn); background: rgba(240, 116, 74, .12); border: 1.5px solid rgba(240, 116, 74, .5); color: #ffc0a8; }
.tm-foot { margin-top: 20px; text-align: center; color: var(--faint); font-size: var(--fs-min); }
.tm-foot a { color: var(--brass-hi); }
@media (min-width: 700px) {
  .tm-wrap { padding: 32px 24px 56px; }
  .tm-sec { padding: 20px 24px 22px; }
}
