/* =========================================================
   pages.css — 1画面にしか出ないもの（ニューモーフィズム）
   ========================================================= */

/* ── サインイン（index.html）──────────────────────── */
.signin{
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 20px;
  max-width: var(--col);
  margin-inline: auto;
  padding: 36px var(--gut) calc(36px + env(safe-area-inset-bottom));
  background: var(--nm-bg);
}
.signin .mark{
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--accent-deep);
}
.signin h1{ font-size: 28px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.signin .lead{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.85; }
.field{ display: grid; gap: 7px; }
.field label{ font-size: var(--fs-label); font-weight: 600; color: var(--ink-2); }
/* 入力欄は「溝」。押すものではなく、書き込むもの */
.field input{
  width: 100%;
  min-height: var(--tap);
  padding: 13px 17px;
  font-size: 16px;            /* iOS で入力時に拡大させない */
  color: var(--ink);
  background: var(--nm-bg);
  border: 0;
  border-radius: var(--r-btn);
  box-shadow: var(--nm-in-sm);
}
.field input::placeholder{ color: var(--ink-3); }
.field input:focus-visible{ outline: 3px solid var(--accent-deep); outline-offset: 2px; }

/* ── ホーム ───────────────────────────────────── */
.rank-mine{ display: flex; align-items: center; gap: 14px; }
.rank-mine .badge{
  width: 58px; height: 58px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--nm-bg);
  box-shadow: var(--nm-up-sm);
  color: var(--accent-deep);
}
.rank-mine .badge b{ font-family: var(--ff-num); font-size: 21px; font-weight: 600; line-height: 1; }
.rank-mine .badge span{ font-size: 12px; font-weight: 600; }
.rank-mine .txt b{ font-size: var(--fs-h3); font-weight: 600; }
.rank-mine .txt p{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.65; }

/* ── 投稿する ─────────────────────────────────── */
.step{ display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.step i{
  width: 26px; height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--nm-bg);
  box-shadow: var(--nm-up-sm);
  color: var(--accent-deep);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; font-style: normal;
}
.step b{ font-size: var(--fs-h3); font-weight: 600; }

/* 写真は縦に並べる格子。★横スクロールにしない（スワイプが二重になる） */
.grid-photo{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.thumb{
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  border-radius: var(--r-thumb);
  cursor: pointer;
  background: var(--nm-bg);
  box-shadow: var(--nm-up-sm);
  transition: box-shadow 90ms var(--ease);
}
.thumb:active{ box-shadow: var(--nm-in-sm); }
.thumb:focus-visible{ outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.thumb .ph{
  position: absolute; inset: 5px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink-2);
  background: repeating-linear-gradient(135deg, #E7E2DA 0 10px, #E0DBD1 10px 20px);
}
/* 出る順番。左上に置く（Instagram でスワイプしたときの並び順） */
.thumb .ord{
  position: absolute; left: 9px; top: 8px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 7px;
  background: rgba(31, 30, 27, .72);
  color: #fff;
  font-size: 11px; font-weight: 600;
  font-family: var(--ff-num);
  display: grid; place-items: center;
}
.thumb .mv{
  position: absolute; left: 9px; bottom: 9px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(31, 30, 27, .72);
  color: #fff;
  font-size: 12px;
  font-family: var(--ff-num);
}
/* 選択の印は「塗り＋チェック」。影の向きだけに頼らない */
.thumb .pick{
  position: absolute; right: 8px; top: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--nm-bg);
  box-shadow: var(--nm-in-sm);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  color: var(--ink-3);
}
.thumb[aria-pressed="true"]{ box-shadow: var(--nm-in-sm); }
.thumb[aria-pressed="true"] .ph{ outline: 2px solid var(--accent-deep); outline-offset: -2px; }
.thumb[aria-pressed="true"] .pick{
  background: var(--on-accent);
  color: var(--white);
  box-shadow: none;
}
.thumb[aria-pressed="true"] .ord{ background: var(--on-accent); }

.legend{ display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px;
  font-size: var(--fs-label); color: var(--ink-3); }
.legend span{ display: inline-flex; align-items: center; gap: 7px; }
.legend i{ width: 14px; height: 14px; flex: 0 0 auto; border-radius: 4px;
  background: var(--nm-bg); box-shadow: var(--nm-up-sm); font-style: normal; }
.legend i.on{ background: var(--on-accent); box-shadow: none; }

.draft{
  border-radius: 12px;
  padding: 18px;
  font-size: var(--fs-sm);
  line-height: 1.95;
  color: var(--ink-2);
  background: var(--nm-bg);
  box-shadow: var(--nm-in-sm);
}
/* 清書だけ色を付けて、たたき台と区別する */
.draft.final{ color: var(--ink); box-shadow: var(--nm-up-sm); border-left: 3px solid var(--accent-deep); }
.mic{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-btn);
  background: var(--nm-bg);
  box-shadow: var(--nm-up-sm);
}
.mic .circle{
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--on-accent);
  color: var(--white);
  display: grid; place-items: center;
}
.mic p{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.65; }

/* 出す前の確認（3行） */
.chk{ display: flex; align-items: flex-start; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: var(--fs-sm); line-height: 1.75; }
.chk:last-child{ border-bottom: 0; }
.chk .st{ margin-top: 5px; }
.chk .m{ min-width: 0; flex: 1; color: var(--ink-2); }
.chk .m b{ color: var(--ink); }

/* 出し先のチェック */
.dest{ display: grid; gap: 14px; }
.dest-item > label{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 13px 16px;
  border-radius: var(--r-btn);
  background: var(--nm-bg);
  box-shadow: var(--nm-up-sm);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.dest-item > label:active{ box-shadow: var(--nm-in-sm); }
.dest-item > label > input{ width: 22px; height: 22px; accent-color: var(--accent-deep); flex: 0 0 auto; }
.dest .who{ display: block; font-weight: 600; }
.dest .sub{ display: block; font-size: var(--fs-label); color: var(--ink-3); line-height: 1.55; }

/* ── フィード／ストーリー／両方 の切り替え（Instagram の出し先だけ）──
   ★選んでいるものは**塗り**で示す。影の向きだけに頼らない（低コントラストの地のため）。
   ★:has() を使わない。input を隠して、隣の span を :checked で塗る古典的な作り。 */
.fmt{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0 0;
}
.fmt > label{ position: relative; display: block; }
.fmt input{
  position: absolute; width: 1px; height: 1px;
  opacity: 0; margin: 0; pointer-events: none;
}
.fmt span{
  display: grid;
  place-items: center;
  min-height: var(--tap);
  padding: 4px 6px;
  border-radius: var(--r-btn);
  background: var(--nm-bg);
  box-shadow: var(--nm-up-sm);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}
.fmt input:checked + span{
  background: var(--on-accent);
  color: var(--white);
  box-shadow: var(--nm-up-sm);
}
.fmt input:focus-visible + span{ outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.fmt span:active{ box-shadow: var(--nm-in-sm); }
/* 出し先のチェックを外したら、その形式は選べない。
   ★このとき**塗りを外す**。薄めた赤のまま残すと「選ばれているのに押せない」に見え、
     白文字も読めなくなる（2026-09-04 スクリーンショットで実際にそう見えた）。 */
.fmt input:disabled + span{
  background: var(--nm-bg);
  color: var(--ink-3);
  box-shadow: var(--nm-in-sm);
  cursor: default;
}
.dest-item.off .fmt{ opacity: .8; }

/* ストーリーを選んだときだけ出る断り書き。注記ではなく「読ませる箱」にする */
.warnbox{
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: var(--nm-bg);
  box-shadow: var(--nm-in-sm);
  border-left: 3px solid var(--accent-deep);
}
.warnbox b{ font-size: var(--fs-sm); font-weight: 600; }
.warnbox p{ margin-top: 6px; font-size: var(--fs-label); color: var(--ink-2); line-height: 1.9; }

/* 番号つきの手順 */
.steps{ counter-reset: s; display: grid; gap: 10px; }
.steps li{
  counter-increment: s;
  position: relative;
  padding: 14px 16px 14px 46px;
  border-radius: var(--r-btn);
  background: var(--nm-bg);
  box-shadow: var(--nm-up-sm);
  font-size: var(--fs-sm);
  line-height: 1.8;
}
.steps li::before{
  content: counter(s);
  position: absolute; left: 14px; top: 15px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--on-accent);
  color: var(--white);
  font-family: var(--ff-num);
  font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
}

/* ── わたしの投稿 ─────────────────────────────── */
.post-row{
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.post-row:last-child{ border-bottom: 0; }
.post-row .pic{
  width: 54px; aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, #E7E2DA 0 8px, #E0DBD1 8px 16px);
  box-shadow: var(--nm-up-sm);
}
.post-row .ttl{ display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.55; }
.post-row .met{ display: block; font-size: var(--fs-label); color: var(--ink-3); line-height: 1.65; }
.post-row .pt{
  font-family: var(--ff-num);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-deep);
  white-space: nowrap;
}

/* ── 順位 ─────────────────────────────────────── */
.rank-row{
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
}
.rank-row + .rank-row{ margin-top: 6px; }
.rank-row .no{
  font-family: var(--ff-num);
  font-size: 16px; font-weight: 600;
  text-align: center;
  color: var(--ink-3);
}
.rank-row .nm{ display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.45; }
.rank-row .sub{ display: block; font-size: var(--fs-label); color: var(--ink-3); line-height: 1.55; }
.rank-row .pt{
  font-family: var(--ff-num);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
/* 自分の行だけ塗る。名前にも「（あなた）」と書いてあり、色だけに頼っていない */
.rank-row.me{
  background: var(--on-accent);
  color: var(--white);
  box-shadow: var(--nm-up-sm);
}
.rank-row.me .sub, .rank-row.me .no{ color: #FFFFFF; }

/* 店舗ごとの合計 */
.shop-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  font-size: var(--fs-sm);
}
.shop-row + .shop-row{ border-top: 1px solid var(--line); }
.shop-row .pt{
  font-family: var(--ff-num);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 連携 ─────────────────────────────────────── */
/* 流れは文章の箱ではなく図で見せる（美容師さんは文字が多いと読まない＝検査【11】）*/
.dia{ display: block; width: 100%; height: auto; }

.qa{ border-top: 1px solid var(--line); padding: 16px 0; }
.qa:first-child{ border-top: 0; padding-top: 0; }
.qa:last-child{ padding-bottom: 0; }
.qa b{ display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.65; }
.qa p{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.75; margin-top: 4px; }
.qa .no-{ color: var(--accent-deep); font-weight: 600; }
