/* =============================================================================
   Sizzle Portal
   §57 ポジティブだが「キラキラしすぎない」
   §53 管理画面・SaaS・KPIダッシュボードに見せない
   ========================================================================== */

:root {
  --bg:          #faf8f5;
  --surface:     #ffffff;
  --border:      #e7e2da;
  --text:        #2b2724;
  --text-muted:  #7d756c;
  --accent:      #e8622c;
  --accent-soft: #fdf0e9;
  --challenge:   #2f8f6f;
  --experience:  #b8862b;
  --radius:      14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #16140f;
    --surface:     #201d18;
    --border:      #332e26;
    --text:        #eee8df;
    --text-muted:  #9a9086;
    --accent:      #f47b46;
    --accent-soft: #2c2019;
    --challenge:   #4fb992;
    --experience:  #d6a84a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- header ------------------------------------------------------------- */
.site-header {
  padding: 56px 0 40px;
}
.site-header__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.brand a { color: inherit; text-decoration: none; }
.tagline {
  margin: 10px 0 0;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ヘッダー右上の自分 */
.me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
.me:hover { border-color: var(--accent); color: var(--accent); }
.me .avatar--sm { width: 26px; height: 26px; font-size: 15px; margin-right: 0; }

/* --- section ------------------------------------------------------------ */
.section-title {
  margin: 40px 0 4px;
  font-size: 17px;
  font-weight: 700;
}
.section-lead {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* --- card --------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin: 20px 0 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__body {
  padding: 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* --- サムネイル（16:9）--------------------------------------------------- */
.thumb {
  aspect-ratio: 16 / 9;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 画像がないときは絵文字を置く。空白のままにしない */
.thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 72%);
}
.thumb--empty span { opacity: 0.45; }

/* --- ユーザーアイコン ---------------------------------------------------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  flex: none;
  vertical-align: middle;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--sm { width: 20px; height: 20px; font-size: 12px; margin-right: 5px; }
.avatar--lg { width: 72px; height: 72px; font-size: 34px; }

.card__state {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.card--challenge  .card__state { color: var(--challenge); }
.card--experience .card__state { color: var(--experience); }

/* §55 / §61-5 カードの主役は「やりたいこと」。人名や肩書きではない。 */
.card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.card__emoji { font-size: 22px; flex: none; }

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.card__horizon {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.card__note {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* §50 進捗は KPI ではなく「そろそろ動こうかな」と思うためのもの */
.progress { display: flex; align-items: center; gap: 10px; }
.progress__label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.progress__bar {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}

.card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* §61-9 アクションは応援・情報提供・俺も・相談に絞る */
.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.btn {
  font: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  /* <a class="btn"> にリンクの下線が残っていて、ボタンの形の中に
     線が1本入って見えていた（「直す」「やった！」など全部） */
  text-decoration: none;
}
.btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.btn--quiet { color: var(--text-muted); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn[disabled]:hover { background: transparent; border-color: var(--border); color: var(--text); }

/* --- 設定画面 ------------------------------------------------------------ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 24px;
  margin: 20px 0;
}
.panel .section-title { margin-top: 0; }

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row--top { align-items: flex-start; gap: 20px; }
.row__forms { display: flex; flex-direction: column; gap: 10px; }

select,
input[type="file"] {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  max-width: 100%;
}
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 12px;
  margin-right: 10px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.manage-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.manage-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.manage-item .thumb {
  width: 200px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.manage-item__body { flex: 1; min-width: 0; }
.manage-item__title { margin: 4px 0 2px; font-size: 17px; }
.manage-item__source { margin: 0 0 10px; font-size: 12px; color: var(--text-muted); }
.manage-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* --- misc --------------------------------------------------------------- */
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.notice code {
  font-size: 13px;
  word-break: break-all;
}
.notice--error { border-left-color: #d9534f; }
.notice--info  { border-left-color: var(--accent); }

.site-footer {
  margin-top: 64px;
  padding: 28px 0 48px;
  font-size: 12px;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .manage-item { flex-direction: column; }
  .manage-item .thumb { width: 100%; }
}

/* =============================================================================
   ログイン / 登録
   ========================================================================== */
.wrap--narrow { max-width: 420px; padding-top: 72px; padding-bottom: 72px; }
.auth-title { margin: 12px 0 6px; font-size: 26px; font-weight: 700; }
.auth-lead  { margin: 0 0 28px; font-size: 14px; color: var(--text-muted); line-height: 1.9; }
.auth-alt   { margin-top: 24px; font-size: 13px; color: var(--text-muted); }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field__label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.field__hint  { font-size: 11px; color: var(--text-muted); }
.field-row { display: flex; gap: 12px; align-items: flex-end; }
.field--emoji { flex: none; width: 78px; }
.field--emoji input { text-align: center; font-size: 20px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 22px;
}
.btn--primary:hover { background: var(--accent); color: #fff; opacity: 0.88; }

/* =============================================================================
   オンボーディングの対話
   ========================================================================== */
.site-header--slim { padding: 36px 0 20px; }
.wrap--talk { max-width: 640px; }

.rounds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.round {
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.round--now  { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.round--done { opacity: 0.55; }
.round-lead  { margin: 12px 0 0; font-size: 14px; color: var(--text-muted); }

.talk { display: flex; flex-direction: column; gap: 10px; margin: 28px 0; }
.bubble {
  max-width: 84%;
  padding: 11px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.bubble--ai {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.bubble--me {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-bottom-right-radius: 5px;
}
.bubble--q { opacity: 0.75; }

/* --- AI の提案（承認したものだけ登録される）------------------------------- */
/* 読み込み後にここへスクロールする（public/onboarding.php）。
   ぴったり上端に付けると詰まって見えるので、少し余白を残す。 */
.proposal-set { scroll-margin-top: 16px; }
.proposals { margin: 26px 0; }
.proposals__title { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.proposal-list { display: flex; flex-direction: column; gap: 8px; }
.proposal {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.proposal--done { opacity: 0.55; }
.proposal__emoji { font-size: 22px; flex: none; }
.proposal__body  { flex: 1; min-width: 0; }
.proposal__title { font-size: 15px; font-weight: 700; }
.proposal__note  { font-size: 12px; color: var(--text-muted); }
.proposal__tags  { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tag {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 9px;
}
.proposal__done { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* --- 次の質問 ------------------------------------------------------------- */
.ask {
  margin: 26px 0;
  padding: 20px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ask__text { margin: 0 0 16px; font-size: 17px; font-weight: 700; line-height: 1.6; }
.ask__form { display: flex; flex-direction: column; gap: 14px; }

/* 選択肢と自由入力欄は別々の form に分けてある（name="answer" の衝突を避けるため）。
   form どうしには gap が効かないので、フォーム内と同じ間隔を明示的に足す。 */
.ask__form + .ask__form { margin-top: 14px; }
.ask__actions { display: flex; gap: 10px; }
.ask__pass { margin-top: 12px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  user-select: none;
}
.choice:hover { border-color: var(--accent); }
.choice input { accent-color: var(--accent); margin: 0; }
.btn--choice { font-size: 14px; padding: 7px 16px; }

/* --- 進行 ----------------------------------------------------------------- */
.talk-controls {
  margin: 32px 0 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.talk-controls__lead { width: 100%; margin: 0; font-size: 15px; font-weight: 700; }
.talk-controls__meta {
  width: 100%;
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

/* --- 選択肢が多い質問（都道府県など）------------------------------------- */
.choice-group { margin-bottom: 14px; }
.choice-group__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.choices--dense { gap: 6px; }
.choices--dense .choice { font-size: 13px; padding: 5px 11px; gap: 5px; }

.ask__warn {
  margin: -6px 0 14px;
  padding: 10px 14px;
  border-left: 3px solid #d9534f;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}
.ask__warn code { word-break: break-all; }

/* --- 動作確認用の状態表示 -------------------------------------------------- */
.demo-state {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.demo-state__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.demo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.demo-table th {
  text-align: left;
  font-weight: 400;
  color: var(--text-muted);
  padding: 3px 12px 3px 0;
  white-space: nowrap;
  width: 1%;
}
.demo-table td { padding: 3px 0; }

/* --- 送信中の表示 ---------------------------------------------------------- */
.is-sending .ask,
.is-sending .proposals,
.is-sending .talk-controls { opacity: 0.45; pointer-events: none; }

.btn--busy {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sending-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  z-index: 10;
}
.is-sending .sending-bar { display: flex; }
.sending-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: sending-pulse 0.9s ease-in-out infinite;
}
@keyframes sending-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* 会話の途中に差し込む提案（時系列を崩さないため talk の中に置く） */
.talk .proposals { margin: 6px 0; }
.talk .proposals__title { margin: 0 0 8px; }

/* =============================================================================
   チーム
   ========================================================================== */
.site-header__row--links { gap: 10px; }
.site-header__row--links .me + .me { margin-left: 0; }

.team-name { margin: 10px 0 0; font-size: clamp(22px, 3.2vw, 28px); font-weight: 700; }
.team-name__emoji { margin-right: 6px; }

.team-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.team-switch .round { text-decoration: none; }

.card-grid--narrow { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* --- ワクワク傾向（順位を競わせないので数値は出さない）-------------------- */
.theme-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.theme {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
  font-size: 14px;
}
.theme__bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--w, 30%);
  background: var(--accent-soft);
}
.theme__name, .theme__people { position: relative; }
.theme__name { font-weight: 700; }
.theme__people { font-size: 11px; color: var(--text-muted); }

/* --- 重なっている「やりたい」---------------------------------------------- */
.shared {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.shared__title { font-size: 15px; font-weight: 700; line-height: 1.5; }
.shared__emoji { margin-right: 6px; }
.shared__people { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.shared__person { display: inline-flex; align-items: center; font-size: 12px; color: var(--text-muted); }

/* --- メンバー -------------------------------------------------------------- */
.member {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.member__head { display: flex; align-items: center; gap: 14px; }
.member__id { min-width: 0; }
.member__name { font-size: 16px; font-weight: 700; }
.member__role {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 99px;
  padding: 1px 7px;
  vertical-align: middle;
}
.member__themes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.member__empty { margin: 0; font-size: 13px; color: var(--text-muted); }
.member__more  { margin: 0; font-size: 12px; color: var(--text-muted); }

/* --- 「ほか◯件を見る」の開閉 -----------------------------------------------
   details / summary なので JavaScript は要らない。
   キーボードでも開けるし、ページ内検索でも中身が見つかる。
   標準の三角は消して、色と大きさを揃えたものを自前で描く。 */
.more { margin-top: -4px; }
.more__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 0;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}
.more__btn::-webkit-details-marker { display: none; }
.more__btn::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform 0.15s ease;
}
.more[open] .more__btn::before { transform: rotate(90deg); }
.more__btn:hover { color: var(--text); }
.more__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.more__label--close { display: none; }
.more[open] .more__label--open  { display: none; }
.more[open] .more__label--close { display: inline; }

.wish-list--folded { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .more__btn::before { transition: none; }
}

.wish-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.wish {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.wish__emoji { flex: none; }
.wish__title { flex: 1; min-width: 0; }
.wish__when  { flex: none; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.wish__state {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: var(--challenge);
  white-space: nowrap;
}

/* --- チーム一覧 ------------------------------------------------------------ */
.team-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.team-card:hover { border-color: var(--accent); }
.team-card__emoji { font-size: 26px; }
.team-card__name  { display: block; font-size: 16px; font-weight: 700; }
.team-card__meta  { display: block; font-size: 12px; color: var(--text-muted); }

/* --- 招待コード ------------------------------------------------------------ */
.team-invites { margin-top: 26px; }
.code-list { list-style: none; margin: 12px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.code-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.code {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.code__label { font-size: 12px; color: var(--text-muted); }
.code__used  { font-size: 11px; color: var(--text-muted); }

/* --- メンバーの権限 -------------------------------------------------------- */
.btn--small { font-size: 12px; padding: 4px 10px; }

.panel--quiet { background: transparent; }

.role-list { list-style: none; margin: 14px 0 12px; padding: 0; }
.role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.role-row:last-child { border-bottom: 0; }
.role-row__who  { display: flex; align-items: center; gap: 8px; }
.role-row__name { font-weight: 700; font-size: 14px; }
.role-row__role {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 8px;
}
.role-row__note { font-size: 12px; color: var(--text-muted); }
.role-row__acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.code__stop { margin-left: auto; }

/* --- 登録・編集フォーム ---------------------------------------------------- */
textarea { resize: vertical; line-height: 1.8; }

.entry-form .panel { margin: 16px 0; }
.entry-form__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 28px;
}

.field--block { width: 100%; margin-bottom: 16px; }
.field--block:last-child { margin-bottom: 0; }

.horizon-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.check input { accent-color: var(--accent); margin: 0; }

/* --- マイページの一覧 ------------------------------------------------------ */
.add-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 8px;
}
.me--cta { font-weight: 700; color: var(--accent); }

.mine-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.mine {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.mine .thumb { width: 132px; flex: none; border-radius: 10px; overflow: hidden; }
.mine__body { flex: 1; min-width: 0; }
.mine__title { margin: 0 0 6px; font-size: 16px; }
.mine__private {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 8px;
  margin-left: 6px;
}
.mine__meta { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.mine__progress { color: var(--accent); }
.mine__note { margin: 0 0 10px; font-size: 13px; line-height: 1.8; color: var(--text-muted); }
.mine__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .mine { flex-direction: column; }
  .mine .thumb { width: 100%; }
}

/* --- 公開範囲の選択 -------------------------------------------------------- */
.vis-choices { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 12px; }
.vis {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.vis:hover { border-color: var(--accent); }
.vis:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.vis input { accent-color: var(--accent); margin-top: 3px; }
.vis__body  { display: flex; flex-direction: column; gap: 2px; }
.vis__label { font-size: 14px; font-weight: 700; }
.vis__hint  { font-size: 11px; color: var(--text-muted); }

/* --- 終えたときの記録 ------------------------------------------------------ */
.panel--done { border-color: var(--accent); }
.btn--done { font-size: 15px; padding: 9px 24px; margin-top: 4px; }

.done-note {
  margin: 14px 0 4px;
  padding: 12px 16px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}
.done-note__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.done-note p { margin: 0; font-size: 14px; line-height: 1.9; }

/* --- 1件の詳細 ------------------------------------------------------------- */
.detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0 20px;
  overflow: hidden;
  margin: 22px 0;
}
.detail .thumb { width: 100%; border-radius: 0; }
.detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px 0;
}
.detail__who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.detail__vis {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 9px;
}
.detail__title { margin: 10px 20px 6px; font-size: 22px; line-height: 1.5; }
.detail__meta {
  margin: 0 20px 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.detail__progress { color: var(--accent); }
.detail__note   { margin: 0 20px 12px; font-size: 14px; line-height: 1.9; }
.detail .done-note { margin: 12px 20px 4px; }
.detail__themes { margin: 0 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.detail__actions { margin: 14px 20px 0; }

/* --- コメントのスレッド ---------------------------------------------------- */
.thread { margin: 26px 0 40px; }
.thread__empty { font-size: 13px; color: var(--text-muted); margin: 14px 0; }
.thread__list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }

.cmt { display: flex; gap: 10px; }
.cmt__body {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}
.cmt__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cmt__name { font-size: 13px; font-weight: 700; }
.cmt__when { font-size: 11px; color: var(--text-muted); }
.cmt__del  { margin-left: auto; }
.cmt__text { margin: 0; font-size: 14px; line-height: 1.85; }

.thread__form { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--accent); }

/* --- 絞り込み（どこで / だれと / どれくらい）---------------------------------
   src/facet.php の3軸。リンクなので JavaScript は使っていない。
   絞った状態の URL をそのまま人に渡せる。 */
.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 26px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filters__row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.filters__label {
  flex: none;
  width: 5.5em;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.filters__opts { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 13px;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.chip:hover { border-color: var(--text-muted); }
.chip__n { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.chip--on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.chip--on .chip__n { color: #fff; opacity: 0.75; }
.chip--empty { opacity: 0.4; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.filters__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.filters__hit { font-size: 13px; font-weight: 700; }
.filters__clear { font-size: 12px; color: var(--text-muted); }
.filters__none {
  margin: 0 0 26px;
  padding: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

@media (max-width: 560px) {
  .filters__row { gap: 6px; }
  .filters__label { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .chip { transition: none; }
}

/* --- カード編集画面の3軸 ---------------------------------------------------- */
.facet-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.facet-field { display: flex; flex-direction: column; gap: 5px; }
.facet-field__label { font-size: 12px; font-weight: 700; color: var(--text-muted); }

/* =============================================================================
   マイページ（左ナビつきレイアウト）
   docs/mock-mypage.html が元。色は上で決めたトークンをそのまま使う。
   クラス名に mp- を付けているのは、既存の .thumb / .chip / .panel と
   ぶつからないようにするため。
   ========================================================================== */
:root {
  --surface-2: #f4efe8;
  --sky-a:     #cfe3ee;
  --sky-b:     #eadfd0;
  --shadow:    0 1px 2px rgba(43,39,36,.05), 0 8px 24px rgba(43,39,36,.06);
  --nav-w:     208px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-2: #2a251e;
    --sky-a:     #2b3b45;
    --sky-b:     #3a3128;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

.mp-app { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }
.mp-main { min-width: 0; padding-bottom: 64px; }
.mp-pad  { padding: 0 32px; max-width: 1120px; }

/* --- 左ナビ ---------------------------------------------------------------- */
.mp-nav {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 14px;
  display: flex; flex-direction: column; gap: 26px;
}
.mp-nav__brand {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase; padding: 0 10px;
}
.mp-nav__brand a { color: inherit; text-decoration: none; }
.mp-nav__list { display: flex; flex-direction: column; gap: 2px; }
.mp-nav__sep { height: 1px; background: var(--border); margin: 10px; }
.mp-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text-muted); text-decoration: none;
}
.mp-nav__item:hover { background: var(--surface-2); color: var(--text); }
.mp-nav__item--on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.mp-nav__icon { width: 17px; height: 17px; flex: none; }
.mp-nav__me {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  padding: 0 10px; font-size: 13px; color: var(--text-muted);
}
.mp-nav__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- ヒーロー -------------------------------------------------------------- */
.mp-hero {
  background: linear-gradient(118deg, var(--sky-a) 0%, var(--sky-b) 100%);
  padding: 46px 32px 0;
}
.mp-hero__inner { max-width: 1120px; }
.mp-hero__eyebrow {
  margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text); opacity: 0.62; text-transform: uppercase;
}
.mp-hero__title {
  margin: 10px 0 0;
  font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; line-height: 1.35;
}
.mp-hero__title em { font-style: normal; color: var(--accent); }
.mp-hero__lead { margin: 10px 0 0; font-size: 15px; color: var(--text); opacity: 0.78; }

/* 件数。SaaS の KPI タイルに見せない（§53）ため、
   数字の下に必ず人の言葉を置き、白いカードでヒーローの帯にまたがせる。 */
.mp-counts {
  /* 2枚。「身になったこと」を外した（src/skill.php のコメント） */
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  position: relative; top: 26px; margin: 30px 0 26px;
}
.mp-count {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
}
.mp-count:hover { color: inherit; }
.mp-count__mark { font-size: 26px; line-height: 1; flex: none; }
.mp-count__body { display: block; min-width: 0; }
.mp-count__label { display: block; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.mp-count__num {
  display: block; font-size: 34px; font-weight: 800; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.mp-count__num span { font-size: 14px; font-weight: 700; margin-left: 3px; color: var(--text-muted); }
.mp-count__note { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 2px; }

/* --- 見出し ---------------------------------------------------------------- */
.mp-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.mp-head__title { margin: 0; font-size: 19px; font-weight: 800; }
.mp-head__sub { margin: 0; font-size: 12px; color: var(--text-muted); }
.mp-head__more {
  margin-left: auto; font-size: 13px; font-weight: 700;
  color: var(--accent); text-decoration: none; white-space: nowrap;
}
.mp-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; margin-top: 34px;
}
.mp-empty { margin: 0; text-align: center; color: var(--text-muted); font-size: 14px; line-height: 1.9; }
.mp-empty__act { margin: 14px 0 0; text-align: center; }

/* --- 年表 ------------------------------------------------------------------ */
.mp-tl { display: flex; flex-direction: column; }
/* minmax(0, …) にしないと、1fr の最小幅がカードの中身なりになり、
   狭い画面で年表だけが右へはみ出す */
.mp-tl__row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; }
.mp-tl__when {
  text-align: right; padding-top: 14px;
  font-size: 13px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums;
}
.mp-tl__year { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); }
.mp-tl__track { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 14px; }
.mp-tl__track::before {
  content: ""; position: absolute; left: 6px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.mp-tl__row:first-child .mp-tl__track::before { top: 20px; }
.mp-tl__row:last-child  .mp-tl__track::before { bottom: calc(100% - 20px); }
.mp-tl__dot {
  width: 11px; height: 11px; margin-top: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
}
.mp-tl__card { display: flex; gap: 14px; padding: 12px 0 20px; }
.mp-tl__body { min-width: 0; }
.mp-tl__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; }
.mp-tl__title a { color: inherit; text-decoration: none; }
.mp-tl__title a:hover { text-decoration: underline; }
.mp-tl__note { margin: 3px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.mp-tl__flag {
  margin-left: auto; flex: none; align-self: flex-start;
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}

/* --- サムネイル ------------------------------------------------------------ */
.mp-thumb {
  width: 104px; height: 68px; flex: none; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(135deg, var(--sky-a), var(--sky-b));
}
.mp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-thumb--card { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 0; font-size: 34px; }

/* --- チップ ---------------------------------------------------------------- */
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mp-chip {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted); white-space: nowrap;
}
.mp-chip--tiny { background: transparent; border: 1px dashed var(--border); }
.mp-chip--go   { background: transparent; border: 1px solid var(--challenge); color: var(--challenge); }

/* --- これから、やりたいこと ------------------------------------------------- */
.mp-wishes { margin-top: 34px; }
.mp-wish-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.mp-wish {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.mp-wish__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.mp-wish__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mp-wish__title { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.mp-wish__meta { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* --- 「ぜんぶ」以下は既存のクラスを使うので、余白だけ足す ------------------- */
.mp-pad > section { margin-top: 34px; }
.mp-pad > section:first-child { margin-top: 0; }

@media (max-width: 1100px) {
  .mp-wish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mp-app { grid-template-columns: 1fr; }
  .mp-nav {
    flex-direction: row; align-items: center; gap: 4px;
    overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px;
  }
  .mp-nav__brand, .mp-nav__sep, .mp-nav__me { display: none; }
  .mp-nav__list { flex-direction: row; }
  .mp-nav__item { white-space: nowrap; }
  .mp-counts { grid-template-columns: 1fr; }
  .mp-hero { padding-left: 18px; padding-right: 18px; }
  .mp-pad  { padding-left: 18px; padding-right: 18px; }
  .mp-panel { padding: 18px; }
}
@media (max-width: 620px) {
  .mp-wish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 年表の小さいサムネイルだけ縮める。
     カード側（--card）は幅いっぱいの 16:10 なので、ここで縮めてはいけない */
  .mp-thumb:not(.mp-thumb--card) { width: 76px; height: 52px; font-size: 20px; }
}

/* --- 身についたこと（軸のレーダー） --------------------------------------- */
.mp-cols {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px; align-items: start;
}
.mp-cols > .mp-panel { margin-top: 34px; }

.mp-radar { display: block; width: 100%; height: auto; }
.mp-radar__grid { fill: none; stroke: var(--border); stroke-width: 1; }
.mp-radar__now {
  fill: var(--challenge); fill-opacity: 0.18;
  stroke: var(--challenge); stroke-width: 2.5; stroke-linejoin: round;
}
/* 3か月前の形。外へ広がったのが分かるように薄く残す */
.mp-radar__past {
  fill: none; stroke: var(--text-muted); stroke-width: 1.5;
  stroke-dasharray: 4 4; stroke-opacity: 0.6; stroke-linejoin: round;
}
.mp-radar__dots { fill: var(--challenge); }
.mp-radar__labels {
  fill: var(--text-muted); font-size: 11.5px; font-weight: 700;
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
}
.mp-legend { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.mp-legend b { color: var(--text); }
.mp-axis-swap {
  margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 12px; color: var(--text-muted);
}
.mp-new-chip {
  font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}

@media (max-width: 1000px) {
  /* 1fr だけだと最小幅が中身なりになり、狭い画面でパネルが枠からはみ出す。
     minmax(0, …) にして、縮んでよいことを明示する */
  .mp-cols { grid-template-columns: minmax(0, 1fr); }
  .mp-cols > .mp-panel + .mp-panel { margin-top: 0; }
}

/* --- 年表の区分タブ（プライベート / ビジネス） ----------------------------- */
.mp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 18px; }
.mp-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--text-muted); text-decoration: none;
}
.mp-tab:hover { color: var(--text); border-color: var(--text-muted); }
.mp-tab--on {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
}
.mp-tab__n { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0.75; }

.mp-undated {
  margin: 0 0 16px; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); color: var(--text-muted);
  font-size: 12.5px; line-height: 1.7;
}
.mp-undated b { color: var(--text); }

/* 区分のチップ。どちらが上でもないので、色で優劣が出ないよう明度を揃える */
.mp-chip--private  { background: transparent; border: 1px solid var(--challenge);  color: var(--challenge); }
.mp-chip--business { background: transparent; border: 1px solid var(--experience); color: var(--experience); }

/* --- 完了フォームの区分えらび ---------------------------------------------- */
.scene-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.scene-choice__item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.scene-choice__item:has(input:checked) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.scene-choice__item input { accent-color: var(--accent); }

/* --- マイページの写真 ------------------------------------------------------- */
.mp-hero--photo {
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
}
/* 写真の上に文字を乗せるので、必ず膜を1枚かぶせる。
   写真によっては白飛びして、名前も件数も読めなくなるため。 */
.mp-hero--photo::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.90) 0%,
    rgba(255, 255, 255, 0.72) 46%,
    rgba(255, 255, 255, 0.30) 100%
  );
}
@media (prefers-color-scheme: dark) {
  .mp-hero--photo::before {
    background: linear-gradient(
      100deg,
      rgba(22, 20, 15, 0.90) 0%,
      rgba(22, 20, 15, 0.74) 46%,
      rgba(22, 20, 15, 0.34) 100%
    );
  }
}

/* 設定パネルに出す見本。実際に出る比率（16:5）で見せる */
.mp-hero-preview {
  width: 100%; max-width: 520px; aspect-ratio: 16 / 5;
  border-radius: 12px; border: 1px solid var(--border);
  background-size: cover; background-position: center;
  margin-bottom: 16px;
}

/* --- ほかの人のページ ------------------------------------------------------ */
.mp-hero__title--user { display: flex; align-items: center; gap: 14px; }
.mp-hero__back { color: inherit; text-decoration: none; font-weight: 700; }
.mp-hero__back:hover { text-decoration: underline; }
.mp-hero__lead--empty a { font-weight: 700; }

/* 名前からその人のページへ。リンクに見えすぎないよう、下線は hover のときだけ */
.card__user, .detail__who, .shared__person { text-decoration: none; color: inherit; }
.card__user:hover, .detail__who:hover, .shared__person:hover { text-decoration: underline; }
.member__name a { color: inherit; text-decoration: none; }
.member__name a:hover { text-decoration: underline; }

/* --- 画像を作っているあいだ ------------------------------------------------- */
/* 絵文字のままだと「設定し忘れ」に見えるので、作っている最中だと分かるようにする。
   文字を置くと目立ちすぎるので、隅に小さく回すだけにしてある。 */
.thumb--making, .mp-thumb--making { position: relative; }
.thumb--making span, .mp-thumb--making span { opacity: 0.5; }

.img-spin {
  position: absolute; right: 6px; bottom: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: img-spin 0.9s linear infinite;
}
@keyframes img-spin { to { transform: rotate(360deg); } }

/* 動きを減らす設定のときは、回さずに弧だけ見せる */
@media (prefers-reduced-motion: reduce) {
  .img-spin { animation: none; }
}

/* --- 一覧（/list.php）の絞り込み -------------------------------------------- */
.mine-filter {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 34px;
}
/* 軸が2つ（区分・カテゴリ）あるので、行で分ける。
   1行に混ぜると、どのチップがどの軸のものか分からなくなる */
.mine-filter__line {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  width: 100%;
}
.mine-filter__line + .mine-filter__line { margin-top: 10px; }
/* 見出しの右にチップを置く。flex を付けないと、チップが多い行だけ
   見出しの下に落ちて、軸ごとに見え方がそろわない */
.mine-filter__line > .mine-filter__chips { flex: 1; min-width: 0; }
.mine-filter__label {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  flex: none; width: 4.5em;
}
.mine-filter__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mine-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-weight: 700; color: var(--text-muted); text-decoration: none;
}
.mine-chip:hover { color: var(--text); border-color: var(--text-muted); }
.mine-chip--on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.mine-chip__n { font-size: 10.5px; opacity: 0.75; font-variant-numeric: tabular-nums; }


.section-count {
  margin-left: 10px; font-size: 12px; font-weight: 700;
  color: var(--text-muted); font-variant-numeric: tabular-nums;
}

/* --- 一覧の中身 ------------------------------------------------------------ */
/* 整理は「端から順に見て、要らないものを落とす」作業なので、
   カードを並べるより、1行1枚で上から舐められる形にする。 */
.mine-add { margin-left: auto; }

.mine-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); overflow: hidden;
}
.mine-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px;
}
.mine-row + .mine-row { border-top: 1px solid var(--border); }
.mine-row:target { background: var(--accent-soft); }

.mine-row__thumb { flex: none; display: block; }
.mine-row__body { flex: 1; min-width: 0; }
.mine-row__title { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.mine-row__title a { color: inherit; text-decoration: none; }
.mine-row__title a:hover { text-decoration: underline; }
.mine-row__meta {
  margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.mine-row__when {
  font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.mine-row__note {
  margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--text-muted);
  /* 長い一言で行の高さがばらけると、目で追いにくくなる */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mine-row__actions {
  /* やりたいこと側はボタンが4つ（直す / 動き出した / やった！ / 消す）並ぶ。
     ここで折り返させると行の高さがばらけて、上から舐めにくくなる */
  flex: none; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: flex-end; gap: 6px; max-width: 340px;
}
.mine-row__actions .btn { font-size: 11.5px; padding: 4px 11px; }

/* 消すボタン。押し間違えないよう、ほかと色を変えておく */
.btn--danger { color: #b3261e; border-color: rgba(179, 38, 30, 0.35); }
.btn--danger:hover { background: rgba(179, 38, 30, 0.08); border-color: #b3261e; }
@media (prefers-color-scheme: dark) {
  .btn--danger { color: #f2b8b5; border-color: rgba(242, 184, 181, 0.35); }
  .btn--danger:hover { background: rgba(242, 184, 181, 0.12); border-color: #f2b8b5; }
}

.mine-foot { margin: 22px 0 0; font-size: 12.5px; color: var(--text-muted); }

@media (max-width: 760px) {
  /* 狭い画面では、ボタンを下へ回して本文の幅を確保する */
  .mine-row { flex-wrap: wrap; }
  .mine-row__actions { max-width: none; width: 100%; justify-content: flex-start; }
  .mine-filter__label { width: auto; }
}

/* --- スマホでは、カードを横に流して見る ------------------------------------- */
/* 縦に積むと1枚ずつしか見えず、スクロールばかりが長くなるため */
@media (max-width: 620px) {
  .mp-wish-grid {
    display: flex; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; padding-bottom: 8px;
    /* 画面の端まで流れて見えるように、余白のぶんだけ外へ出す */
    margin-left: -18px; margin-right: -18px;
    padding-left: 18px; padding-right: 18px;
    /* .rail と同じ理由。スナップに padding を無視させない */
    scroll-padding-left: 18px; scroll-padding-right: 18px;
    -webkit-overflow-scrolling: touch;
  }
  .mp-wish-grid > .mp-wish {
    flex: 0 0 62%; scroll-snap-align: start;
  }
}

/* --- カテゴリごとの横に流れる列（レール） ----------------------------------- */
/* 21枚を縦に積むと、目当てのものにたどり着けない。
   カテゴリで区切って、それぞれ横に流す。 */
.rail-group { margin-top: 22px; }
.rail-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 10px;
}
.rail-head__name { font-size: 13.5px; font-weight: 700; }
.rail-head__n {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.rail-head__hint { font-size: 11px; color: var(--text-muted); margin-left: auto; }

.rail {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  /* 画面の端まで流れて見えるように、余白のぶんだけ外へ出す */
  margin-left: -32px; margin-right: -32px;
  padding-left: 32px; padding-right: 32px;
  /* scroll-snap は既定だと padding を無視して、1枚目を枠の左端まで
     引き寄せてしまう。見出しより 32px 外に出た位置で止まるので、
     カードがパネルの縁にくっついて見えていた。
     スナップの基準線を padding のぶんだけ内側にずらして揃える。 */
  scroll-padding-left: 32px; scroll-padding-right: 32px;
  /* 掴んで動かせることが分かるように（assets/rail.js） */
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.rail::-webkit-scrollbar-track { background: transparent; }

/* --- 掴んで横に動かす（PC） ------------------------------------------------- */
/* マウスだと横スクロールの手立てが無く、下の細いバーを掴むしかなかった。
   指で払える端末には要らないので、rail.js が hover 可能なときだけ付ける。 */
.rail--grab { cursor: grab; }
.rail--grabbing {
  cursor: grabbing;
  /* 掴んでいる間はスナップを切る。効いていると指を離した瞬間に引き戻される */
  scroll-snap-type: none;
  user-select: none;
}
.rail--grabbing a, .rail--grabbing img { pointer-events: none; }

.rail-arrows { display: flex; gap: 6px; margin-left: auto; }
.rail-arrow {
  width: 26px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-muted);
  cursor: pointer; line-height: 1;
}
.rail-arrow:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.rail-arrow:disabled { opacity: 0.3; cursor: default; }
.rail-arrow svg { width: 13px; height: 13px; }
/* 矢印を出したら、同じことを言う文字は要らない */
.rail-head:has(.rail-arrows) .rail-head__hint { display: none; }

.rcard {
  flex: 0 0 232px; scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
/* 追加した直後に飛んでくる先。どれが増えたのか分かるように一瞬だけ縁を付ける */
.rcard:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.rcard__thumb { display: block; }
.rcard__body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.rcard__title { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.rcard__title a { color: inherit; text-decoration: none; }
.rcard__title a:hover { text-decoration: underline; }
.rcard__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.rcard__note {
  margin: 0; font-size: 12px; line-height: 1.7; color: var(--text-muted);
  /* 長い一言でカードの高さがばらけないよう、2行で切る */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rcard__actions {
  margin-top: auto; padding-top: 4px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.rcard__actions .btn { font-size: 11.5px; padding: 4px 11px; }

@media (max-width: 760px) {
  .rail {
    margin-left: -18px; margin-right: -18px;
    padding-left: 18px; padding-right: 18px;
    scroll-padding-left: 18px; scroll-padding-right: 18px;
  }
}
@media (max-width: 620px) {
  .rcard { flex: 0 0 68%; }
  .rail-head__hint { display: none; }
}

/* ===========================================================================
   プロフィール（マークダウン）
   =========================================================================== */

/* --- 名前の横のボタン ------------------------------------------------------ */
.mp-hero__name {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
}
.mp-profile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-weight: 700; color: var(--text);
  font-family: inherit; text-decoration: none; cursor: pointer;
  /* 帯の上に乗るので、写真が明るくても読めるように背景を持たせている */
  white-space: nowrap;
}
.mp-profile-btn:hover { border-color: var(--accent); color: var(--accent); }
.mp-profile-btn--empty {
  background: transparent; border-style: dashed; color: var(--text-muted);
  font-weight: 500;
}

/* --- モーダル -------------------------------------------------------------- */
/* <dialog> をそのまま使う。Esc と背景の暗さはブラウザが持っている */
.md-modal {
  width: min(680px, calc(100vw - 32px));
  max-height: min(80vh, 900px);
  padding: 0; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.md-modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.md-modal__head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  /* 中身が長いときも、閉じるボタンは常に見えるところに置く */
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.md-modal__title { margin: 0; font-size: 15px; font-weight: 800; }
.md-modal__close {
  margin-left: auto; width: 30px; height: 30px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-muted);
  font-size: 13px; cursor: pointer;
}
.md-modal__close:hover { color: var(--accent); border-color: var(--accent); }
.md-modal__body {
  padding: 18px 24px 26px;
  max-height: calc(min(80vh, 900px) - 68px);
  overflow-y: auto;
}
/* 見出しで始まる本文だと、モーダルの題のすぐ下に線が2本並んでしまう */
.md-modal__body > h2:first-child { padding-bottom: 0; border-bottom: 0; }

/* --- 変換した中身の見た目 --------------------------------------------------- */
/* 本文なので、行間は広めに取る。見出しは上に余白、下は詰める。
   「次の段落と組になっている」ことが目で分かるようにするため */
.md { font-size: 14.5px; line-height: 1.9; overflow-wrap: anywhere; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child  { margin-bottom: 0; }

.md h2, .md h3, .md h4 {
  margin: 28px 0 10px; font-weight: 800; line-height: 1.5;
}
.md h2 {
  font-size: 17px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.md h3 { font-size: 15.5px; }
.md h4 { font-size: 14px; color: var(--text-muted); }

.md p  { margin: 0 0 14px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 1.4em; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--text-muted); }

.md blockquote {
  margin: 0 0 14px; padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent-soft);
  color: var(--text-muted);
}
.md blockquote p:last-child { margin-bottom: 0; }

.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.md hr { margin: 24px 0; border: 0; border-top: 1px solid var(--border); }

.md code {
  padding: 1px 6px; border-radius: 5px;
  background: var(--surface-2); color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
.md pre {
  margin: 0 0 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2);
  /* 長い行で本文まで横に広がらないよう、この中だけで流す */
  overflow-x: auto;
}
.md pre code { padding: 0; background: none; font-size: 12.5px; line-height: 1.7; }

.md strong { font-weight: 800; }
.md del { color: var(--text-muted); }

/* --- 表 -------------------------------------------------------------------- */
/* 狭い画面でも本文をはみ出させないよう、表だけ横に流す */
.md-table { overflow-x: auto; margin: 0 0 14px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md-table th, .md-table td {
  padding: 8px 12px; border: 1px solid var(--border); text-align: left;
  vertical-align: top;
}
.md-table th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }

/* --- 設定の入力欄 ---------------------------------------------------------- */
.md-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.md-tool {
  padding: 5px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--text-muted); cursor: pointer;
}
.md-tool:hover { color: var(--accent); border-color: var(--accent); }

#profile-md {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Hiragino Sans", "Noto Sans JP", monospace;
  font-size: 13.5px; line-height: 1.8;
}

.md-count {
  margin: 6px 0 0; text-align: right;
  font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.md-count.is-over { color: var(--accent); font-weight: 700; }

.md-help { margin: 14px 0 18px; font-size: 13px; }
.md-help summary {
  cursor: pointer; font-weight: 700; color: var(--accent);
  padding: 6px 0;
}
.md-help__lead { margin: 6px 0 12px; color: var(--text-muted); line-height: 1.8; }
.md-help code {
  padding: 1px 6px; border-radius: 5px; background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.md-preview {
  margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--border);
}
.md-preview__label {
  margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--text-muted); text-transform: uppercase;
}

@media (max-width: 620px) {
  /* 画面のまん中に出るので、角は4隅とも丸めておく */
  .md-modal { width: calc(100vw - 20px); max-height: 86vh; border-radius: 16px; }
  .md-modal__body { padding: 16px 18px 22px; max-height: calc(86vh - 68px); }
}

/* ===========================================================================
   やったことの贈りもの
   =========================================================================== */

/* 左メニューの数。通知がまだ無いので、気づける場所がここしかない */
.mp-nav__badge {
  margin-left: auto; flex: none;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* マイページのいちばん上に出る案内 */
.gift-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 16px 18px; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  font-size: 13.5px; line-height: 1.7;
}
.gift-banner__mark { font-size: 22px; line-height: 1; flex: none; }
.gift-banner__body { flex: 1; min-width: 200px; }
.gift-banner__body b { display: block; }

/* 届いたもの・贈ったもの */
.gift-list { display: flex; flex-direction: column; gap: 14px; }
.gift {
  padding: 18px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
}
/* 贈ったものは、まだ相手のものではないので控えめにする */
.gift--sent { background: var(--surface-2); }

.gift__from {
  margin: 0 0 10px; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-muted);
}
.gift__from a { color: var(--text); font-weight: 700; text-decoration: none; }
.gift__from a:hover { text-decoration: underline; }

.gift__title { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.5; }
.gift__meta {
  margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.gift__when {
  font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.gift__note { margin: 10px 0 0; font-size: 13px; line-height: 1.8; color: var(--text-muted); }

/* 添え書き。カードには残らないので、本文とは見た目を変える */
.gift__message {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); font-size: 13px; line-height: 1.8;
}
.gift__message-label {
  display: block; font-size: 11px; font-weight: 700; color: var(--text-muted);
}

.gift__actions {
  margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.gift__hint { margin: 10px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--text-muted); }

/* 贈るフォームの相手 */
.gift-to {
  margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.gift-note { margin: 18px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--text-muted); }

/* チームのメンバー欄の入口 */
.member__gift { margin: 14px 0 0; }

/* カードの詳細に出す「◯◯さんが書いてくれた」 */
.detail__gifted { color: var(--text-muted); }
.detail__gifted a { color: inherit; font-weight: 700; }

/* --- Slack 連携の設定 -------------------------------------------------------- */
/* 曜日・時・分の3つが横に並ぶ。放っておくと時と分まで幅いっぱいに伸びて、
   2桁の数字を選ぶだけの欄が画面の3分の1を取る */
.field--num { flex: 0 0 96px; }
.field--dow { flex: 0 0 200px; }
.slack-state {
  margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border);
}

/* --- マイページの下に置く「設定へ」 ----------------------------------------- */
.mp-settings-link {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 26px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-muted);
}

/* --- マイページ以外のページの帯 --------------------------------------------- */
/* マイページを基準に全ページの形を揃える（layout_hero）。
   件数のカードが無いぶん、こちらは下にも余白がいる。 */
.mp-hero--slim { padding-bottom: 30px; }
.mp-hero__title--slim {
  font-size: clamp(22px, 2.6vw, 30px);
  display: flex; align-items: center; gap: 14px;
}
.mp-hero--slim + .mp-pad { padding-top: 30px; }
/* 読むもの・書くものは横に広げない。1行が長いと目が戻れなくなる */
.mp-pad--narrow { max-width: 720px; }
.mp-pad > .notice { margin: 0 0 22px; }
.mp-pad > .notice:not(:first-child) { margin-top: 22px; }

/* --- メニューの見出しとチーム ----------------------------------------------- */
.mp-nav__title {
  padding: 0 12px; margin: 4px 0 2px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--text-muted); text-transform: uppercase;
}
.mp-nav__emoji {
  width: 17px; flex: none; text-align: center; font-size: 14px; line-height: 1;
}
.mp-nav__team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-nav__empty {
  margin: 0; padding: 4px 12px 6px;
  font-size: 11.5px; color: var(--text-muted);
}

@media (max-width: 760px) {
  /* 横一列に流すので、見出しと「入っていません」は出さない */
  .mp-nav__title, .mp-nav__empty { display: none; }
}

/* ===========================================================================
   書く（一覧の上の大きいボタン） / 誰に贈る？
   =========================================================================== */

/* もとは一覧の見出しの右に小さく「＋ 書く」が付いていただけで、
   絞り込みのチップに紛れて見つからなかった。
   この画面に来る目的の半分は「書く」なので、いちばん上に大きく置く。 */
.cta { margin: 0 0 22px; }
.cta--two {
  display: grid; gap: 10px;
  /* 2つ並べるときも、文字が長いほうに合わせて同じ高さにする。
     minmax(0,1fr) なのは、長いラベルで列が広がって横にはみ出すのを止めるため */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.cta__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 20px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 800;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(232, 98, 44, 0.22);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.cta__btn:hover  { opacity: 0.9; }
.cta__btn:active { transform: translateY(1px); }
.cta__mark { font-size: 17px; line-height: 1; }
.cta__text { min-width: 0; }

/* 「贈る」は主役ではない。押せることは分かるが、書くほうが先に目に入る形にする */
.cta__btn--sub {
  background: var(--surface); color: var(--accent);
  border: 1.5px solid var(--accent); box-shadow: none;
}
.cta__btn--sub:hover { background: var(--accent-soft); opacity: 1; }

@media (max-width: 560px) {
  /* 横に2つ並べると、どちらの文字も折り返して読みにくい。縦に積む */
  .cta--two { grid-template-columns: minmax(0, 1fr); }
}

/* --- 誰に贈る？（/gift-pick.php） ----------------------------------------- */
.pick-filter { margin: 0 0 18px; }

.pick-list { display: grid; gap: 10px; }
.pick-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: inherit; text-decoration: none;
}
.pick-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.pick-row__face { flex: none; }
/* minmax ではなく min-width:0。長い名前やひとことで横にはみ出させない */
.pick-row__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pick-row__name { font-size: 15px; font-weight: 700; }
.pick-row__bio,
.pick-row__team {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-row__go { flex: none; font-size: 12.5px; font-weight: 700; color: var(--accent); }

@media (max-width: 480px) {
  /* 「この人に贈る →」まで入れると名前が潰れるので、行全体が押せることに任せる */
  .pick-row__go { display: none; }
}

/* --- どのチームの人に贈る？（モーダルの中身） ------------------------------ */
.pick-teams { display: grid; gap: 8px; margin-top: 14px; }
.pick-team {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: inherit; text-decoration: none;
}
.pick-team:hover { border-color: var(--accent); background: var(--accent-soft); }
.pick-team__emoji { font-size: 20px; line-height: 1; flex: none; }
.pick-team__name  { font-size: 14.5px; font-weight: 700; min-width: 0; }
.pick-team__n     { margin-left: auto; font-size: 12px; color: var(--text-muted); flex: none; }
.pick-team--all   { border-style: dashed; }
