/* ご意見・まちがいの受付（/manabi/feedback/。templates/manabi/feedback.html）。
   色・角丸・影は manabi.css の :root のトークンだけを使う（正本は manabi/DESIGN.md）。 */

.fb__inner { display: grid; gap: 20px; padding-block: 8px 48px; max-width: 880px; }
.fb__lead { font-size: 17px; line-height: 1.9; max-width: 44em; }
.fb__note { font-size: 14px; color: var(--ink-soft); }
.fb__h2 { font-size: 24px; }
.fb__status { min-height: 1.6em; font-size: 16px; font-weight: 700; }
.fb__status[data-kind="error"] { color: var(--fig-red); }

/* hidden の付いた箱は、下の display の指定より優先して隠す */
.fb__inner [hidden] { display: none !important; }

/* 送る まえに（目立つ位置の注意） */
.fb-warn { padding: 16px 20px; background: var(--wood-light); border: 2.5px solid var(--ink); border-radius: var(--radius-m); }
.fb-warn__title { font-family: var(--font-head); font-weight: 900; font-size: 18px; }
.fb-warn__list { margin: 6px 0 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: 16px; line-height: 1.7; }

/* 入力 */
.fb-form { display: grid; gap: 22px; padding: 22px; background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: 0 4px 0 var(--ink); }
/* 任意の札が折り返す列があっても、3つの選ぶ欄の下端をそろえる */
.fb-form__row { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.fb-field { display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.fb-field__label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 0; font-family: var(--font-head); font-weight: 900; font-size: 17px; }
/* 下段の3つの選ぶ欄は、見出しと「えらばなくても いいよ」の札をどれも2段にして、高さをそろえる */
.fb-form__row .fb-field__label { flex-direction: column; align-items: flex-start; gap: 4px; }
.fb-need, .fb-opt { font-family: var(--font-body); font-weight: 700; font-size: 12px; padding: 1px 10px; border-radius: var(--radius-pill); }
.fb-need { background: var(--ink); color: var(--paper); }
.fb-opt { border: 1.5px solid var(--ink-soft); color: var(--ink-soft); }
.fb-field__help { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.fb-field textarea, .fb-field select {
  width: 100%; min-width: 0; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-s);
}
.fb-field select { min-height: 48px; }
.fb-field textarea { min-height: 10em; resize: vertical; line-height: 1.7; }
.fb-count { justify-self: end; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.fb-count[data-over] { color: var(--fig-red); }

.fb-page { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 15px; }
.fb-page__path { padding: 4px 10px; font-size: 15px; background: var(--paper); border: 1.5px solid var(--grid); border-radius: var(--radius-s); overflow-wrap: anywhere; }
.fb-page__clear { min-height: 40px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-pill); transition: background-color var(--t); }
.fb-page__clear:hover { background: var(--wood-light); }

.fb-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-chip { position: relative; }
.fb-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.fb-chip span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; font-weight: 700; cursor: pointer;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-pill); transition: background-color var(--t); }
.fb-chip input:checked + span { background: var(--wood); }
.fb-chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ハニーポット（人には見せない。display:none だと気づくボットがいるので、画面の外へ出す） */
.fb-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.fb-form__submit { margin: 0; }
.fb-form__submit .m-btn { min-width: 10em; justify-content: center; }
.fb-form__submit .m-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* うけつけました */
.fb-done { display: grid; gap: 12px; padding: 22px; background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); }
.fb-done:focus { outline: none; }
.fb-done:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.fb-done__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.fb-done__buttons .m-btn { font-size: 16px; min-height: 46px; padding: 0 18px; cursor: pointer; }

/* おとなの 方へ（小さな別の欄。普通の漢字かなまじり） */
.fb-adult { display: grid; gap: 8px; padding: 18px 22px; font-size: 14px; line-height: 1.75; color: var(--ink-soft); border: 2px solid var(--grid); border-radius: var(--radius-m); background: var(--panel); }
.fb-adult__title { font-size: 16px; color: var(--ink); }
.fb-adult__list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

@media (max-width: 760px) {
  .fb-form__row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .fb-form { padding: 16px; }
  .fb-form__submit .m-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-chip span, .fb-page__clear { transition: none; }
}
