/* =========================================================
   pages.css — 1画面にしか出ないもの
   ========================================================= */

/* ── サインイン（index.html）──────────────────────── */
.signin{
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: var(--col);
  margin-inline: auto;
  padding: 32px var(--gut) calc(32px + env(safe-area-inset-bottom));
  background: var(--paper);
}
.signin .mark{
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--accent-deep);
}
.signin h1{ font-size: 26px; font-weight: 800; line-height: 1.4; letter-spacing: -.01em; }
.signin .lead{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.8; }
.field{ display: grid; gap: 6px; }
.field label{ font-size: var(--fs-label); font-weight: 700; color: var(--ink-2); }
.field input{
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;            /* iOS で入力時に拡大させない */
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  box-shadow: inset 0 2px 0 rgba(38, 35, 32, .04);
}
.field input:focus-visible{ outline: 3px solid var(--accent-deep); outline-offset: 2px; }

/* ── ホーム ───────────────────────────────────── */
.rank-mine{
  display: flex;
  align-items: center;
  gap: 12px;
}
.rank-mine .badge{
  width: 52px; height: 52px;
  flex: 0 0 auto;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #E3C77E, #C79A4B);
  color: #4A3612;
  box-shadow: 0 3px 0 #A47C33;
}
.rank-mine .badge b{ font-family: var(--ff-num); font-size: 20px; font-weight: 800; line-height: 1; }
.rank-mine .badge span{ font-size: 11px; font-weight: 700; }
.rank-mine .txt b{ font-size: var(--fs-h3); font-weight: 800; }
.rank-mine .txt p{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; }

/* ── 投稿する ─────────────────────────────────── */
.step{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.step i{
  width: 22px; height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--on-accent);
  color: var(--white);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; font-style: normal;
}
.step b{ font-size: var(--fs-h3); font-weight: 800; }

/* 写真は縦に並べる格子。★横スクロールにしない（スワイプが二重になる） */
.grid-photo{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.thumb{
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  border-radius: var(--r-thumb);
  overflow: hidden;
  cursor: pointer;
  background: var(--paper-3);
  box-shadow: 0 2px 0 var(--edge);
  transition: transform 70ms var(--ease), box-shadow 70ms var(--ease);
}
.thumb:active{ transform: translateY(2px); box-shadow: 0 0 0 var(--edge); }
.thumb:focus-visible{ outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.thumb .ph{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 11px;
  color: var(--ink-2);
  background: repeating-linear-gradient(135deg, #EDE6DD 0 10px, #E6DED3 10px 20px);
}
.thumb .mv{
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(38, 35, 32, .66);
  color: #fff;
  font-size: 11px;
  font-family: var(--ff-num);
}
.thumb .pick{
  position: absolute; right: 6px; top: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  border: 1.5px solid var(--white);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  color: var(--ink-2);
}
.thumb[aria-pressed="true"]{ box-shadow: 0 2px 0 var(--edge-accent); }
.thumb[aria-pressed="true"]::after{
  content: "";
  position: absolute; inset: 0;
  border: 3px solid var(--accent);
  border-radius: var(--r-thumb);
}
.thumb[aria-pressed="true"] .pick{
  background: var(--on-accent);
  color: var(--white);
  border-color: var(--white);
}

.draft{
  background: var(--paper-2);
  border-radius: var(--r-card);
  padding: 14px;
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--ink-2);
}
.draft .tag{ color: var(--accent-deep); }
.mic{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-btn);
  background: var(--white);
  box-shadow: 0 3px 0 var(--edge);
}
.mic .circle{
  width: 34px; height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--on-accent);
  color: var(--white);
  display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--edge-accent);
}
.mic p{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; }

/* 出し先のチェック */
.dest{ display: grid; gap: 8px; }
.dest label{
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 8px 12px;
  border-radius: var(--r-btn);
  background: var(--white);
  box-shadow: 0 2px 0 var(--edge);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.dest input{ width: 20px; height: 20px; accent-color: var(--accent-deep); flex: 0 0 auto; }
.dest .who{ display: block; font-weight: 700; }
.dest .sub{ display: block; font-size: var(--fs-label); color: var(--ink-3); line-height: 1.5; }

/* ── わたしの投稿 ─────────────────────────────── */
.post-row{
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.post-row:last-child{ border-bottom: 0; }
.post-row .pic{
  width: 56px; aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, #EDE6DD 0 8px, #E6DED3 8px 16px);
}
.post-row .ttl{ display: block; font-size: var(--fs-sm); font-weight: 700; line-height: 1.5; }
.post-row .met{ display: block; font-size: var(--fs-label); color: var(--ink-3); line-height: 1.6; }
.post-row .pt{
  font-family: var(--ff-num);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-deep);
  white-space: nowrap;
}

/* ── ランキング ───────────────────────────────── */
.rank-row{
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 10px;
  border-radius: 12px;
}
.rank-row + .rank-row{ margin-top: 4px; }
.rank-row .no{
  font-family: var(--ff-num);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-3);
  text-align: center;
}
.rank-row .nm{ display: block; font-size: var(--fs-sm); font-weight: 700; line-height: 1.4; }
.rank-row .sub{ display: block; font-size: var(--fs-label); color: var(--ink-3); line-height: 1.5; }
.rank-row .pt{
  font-family: var(--ff-num);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.rank-row.me{
  background: var(--on-accent);
  color: var(--white);
  box-shadow: 0 3px 0 var(--edge-accent);
}
.rank-row.me .no, .rank-row.me .sub{ color: #FFFFFF; }
.rank-row.top1 .no{ color: #B8862B; }

/* 店舗別の合計 */
.shop-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  gap: 10px;
  align-items: center;
  padding: 9px 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: 800;
  white-space: nowrap;
}

/* ── 連携 ─────────────────────────────────────── */
.flow{ display: grid; gap: 8px; }
.flow > div{
  background: var(--white);
  border-radius: var(--r-btn);
  padding: 12px 14px;
  box-shadow: 0 2px 0 var(--edge);
}
.flow b{ font-size: var(--fs-sm); font-weight: 800; }
.flow p{ font-size: var(--fs-label); color: var(--ink-2); line-height: 1.7; }
.flow .arrow{
  background: none;
  box-shadow: none;
  padding: 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1;
}

.qa{ border-top: 1px solid var(--line); padding: 11px 0; }
.qa:last-child{ padding-bottom: 0; }
.qa b{ display: block; font-size: var(--fs-sm); font-weight: 700; line-height: 1.6; }
.qa p{ font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.7; margin-top: 3px; }
.qa .no-{ color: var(--accent-deep); font-weight: 700; }
