/* Uniajito - 公開版フロントエンド */
/* 和モダン・ミニマル：余白と明朝体で上品に */
:root {
  --paper: #F7F4EC;
  --paper-deep: #EFE9DA;
  --card: #FFFFFF;
  --ink: #26282E;
  --ink-soft: #4B4E56;
  --muted: #8B867A;
  --vermillion: #A83A22;
  --vermillion-dark: #8A2E1B;
  --vermillion-soft: rgba(168, 58, 34, 0.08);
  --border: #E3DCC9;
  --border-soft: #EDE7D6;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(38, 40, 46, 0.07);
  --shadow-sm: 0 1px 5px rgba(38, 40, 46, 0.05);
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  /* 互換エイリアス */
  --text: #26282E;
  --primary: #A83A22;
  --primary-dark: #8A2E1B;
  --accent: #A83A22;
  --accent-dark: #8A2E1B;
  --navy: #26282E;
  --navy-light: #4B4E56;
  --bg: #F7F4EC;
  --like: #A83A22;
  --super: #A07C2C;
  --pass: #4B4E56;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

body { min-height: 100vh; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; }

.view { display: none; }
.view.active { display: block; }

/* ---------- 判子ロゴ（ミニマルな印影） ---------- */
.hanko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--vermillion);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 5px;
  text-indent: 5px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  user-select: none;
}
.hanko-lg { font-size: 30px; padding: 14px 20px 14px 25px; }
.hanko-sm { font-size: 19px; padding: 10px 15px 10px 20px; }
.hanko-xs { font-size: 13px; padding: 6px 9px 6px 13px; letter-spacing: 3px; text-indent: 3px; }
/* ブランドロゴ（横長角印・ラテン文字用） */
.hanko-brand { letter-spacing: 3px; text-indent: 3px; font-size: 26px; padding: 14px 24px; }

/* バッジ（旧スタンプの置き換え） */
.recruit-stamp {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 20px;
  margin-bottom: 30px;
}

/* 空状態のラベル */
.stamp-empty {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ---------- ランディング ---------- */
.poster-wrap { padding: 72px 28px 16px; }
.poster { text-align: center; }
.poster h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: 4px;
  margin: 34px 0 0;
}
.poster h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  background: var(--vermillion);
  margin: 26px auto 0;
}
.poster h1 .marker { color: var(--vermillion); }
.poster-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 26px 0 30px;
  line-height: 2;
}
.hero-cta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; }
.hero-note { font-size: 12px; color: var(--muted); margin-top: 22px; letter-spacing: 2px; }

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  padding: 15px 38px;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  font-family: var(--sans);
  letter-spacing: 2.5px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-accent { background: var(--vermillion); border-color: var(--vermillion); color: #fff; }
.btn-accent:hover { background: var(--vermillion-dark); border-color: var(--vermillion-dark); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #35383F; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- セクション ---------- */
.section { padding: 64px 26px 8px; }
.section-title {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 5px;
  text-indent: 5px;
  margin: 0 0 10px;
  text-align: center;
}
.section-title .sec-kicker {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 5px;
  text-indent: 5px;
  color: var(--vermillion);
  margin-bottom: 12px;
  font-weight: 700;
}
.lead { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 34px; letter-spacing: 1.5px; }

/* 特徴カード */
.feature-grid { display: grid; gap: 14px; }
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
}
.activity-tag {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--vermillion);
  letter-spacing: 4px;
  margin-bottom: 10px;
}
.feature-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2.5px;
  margin: 0 0 10px;
}
.feature-card h3 .u { text-decoration: none; }
.feature-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.9; }

/* Uniajitoについて */
.notebook { padding: 8px 6px; text-align: center; }
.notebook h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 5px;
  text-indent: 5px;
  margin: 0 0 22px;
}
.notebook p { font-size: 14px; color: var(--ink-soft); margin: 0 0 12px; line-height: 2.1; }
.notebook strong { color: var(--ink); font-weight: 700; }

/* はじめ方 */
.steps { display: grid; counter-reset: step; border-top: 1px solid var(--border); }
.step {
  position: relative;
  padding: 22px 4px 22px 56px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.9;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 4px;
  top: 22px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--vermillion);
  letter-spacing: 1px;
}
.step strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; letter-spacing: 1.5px; }

/* 最後のCTA */
.final-cta { text-align: center; padding: 72px 26px 24px; }
.final-cta h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 5px;
  text-indent: 5px;
  margin: 28px 0 32px;
}

.landing-footer {
  text-align: center;
  padding: 40px 24px 56px;
  font-size: 12px;
  color: var(--muted);
}
.landing-footer a { color: var(--muted); margin: 0 10px; text-decoration: none; }
.landing-footer a:hover { color: var(--ink-soft); }

/* ---------- 認証 ---------- */
.auth-wrap { padding: 60px 24px 44px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 42px 28px 34px;
  text-align: center;
}
.auth-card h2 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 4px;
  text-indent: 4px;
  margin: 20px 0 8px;
}
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 28px; letter-spacing: 1px; }
.auth-card form, .auth-card .form-error, .auth-card .form-ok { text-align: left; }
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.auth-tabs button {
  flex: 1;
  border: none;
  background: none;
  padding: 13px 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  letter-spacing: 2.5px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.auth-tabs button.active { color: var(--ink); border-bottom-color: var(--vermillion); }

/* ソーシャルログイン */
.oauth-row { display: grid; gap: 10px; margin-bottom: 22px; }
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: 1px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.oauth-btn:hover { border-color: var(--ink-soft); box-shadow: var(--shadow-sm); }
.oauth-icon { flex-shrink: 0; }
.oauth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
}
.oauth-divider::before, .oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.oauth-divider span { white-space: nowrap; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; letter-spacing: 1px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 15px;
  font-family: var(--sans);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(38, 40, 46, 0.06);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.8; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin: 6px 0 20px; line-height: 1.8; }
.check-row input { margin-top: 5px; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--vermillion); }
.check-row a { color: var(--vermillion); font-weight: 700; }

.form-error {
  display: none;
  background: #FBF1EE;
  border: 1px solid #D8A08F;
  color: var(--vermillion-dark);
  font-size: 13.5px;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  line-height: 1.8;
}
.form-error.show { display: block; }
.form-ok {
  display: none;
  background: #F5F3EA;
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 13.5px;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  line-height: 1.8;
}
.form-ok.show { display: block; }
.back-link { display: block; text-align: center; margin-top: 22px; font-size: 13px; color: var(--muted); text-decoration: none; letter-spacing: 1px; }

/* ---------- アプリ共通 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header .header-sub { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; }

.tab { display: none; padding: 22px 18px 120px; }
.tab.active { display: block; }
.tab h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 4px;
  text-indent: 4px;
  margin: 2px 0 20px;
}

#tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: rgba(247, 244, 236, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
#tabbar button {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  position: relative;
}
#tabbar button.active { color: var(--vermillion); }
#tabbar button.active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--vermillion);
  border-radius: 50%;
}
.badge-dot {
  background: var(--vermillion);
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-weight: 700;
}

/* ---------- 仲間探し ---------- */
#deck { position: relative; height: 480px; margin-bottom: 18px; }
.profile-card {
  position: absolute;
  inset: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  user-select: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.profile-card .pc-avatar {
  height: 200px;
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-soft);
}
.avatar-initial {
  width: 88px;
  height: 88px;
  background: var(--vermillion);
  color: #fff;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.profile-card .pc-body { padding: 22px 24px; flex: 1; overflow-y: auto; }
.profile-card .pc-name { font-size: 19px; font-weight: 700; margin: 0 0 4px; letter-spacing: 1px; }
.profile-card .pc-school { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; letter-spacing: 1px; }
.profile-card .pc-bio { font-size: 14px; margin: 0 0 14px; white-space: pre-wrap; line-height: 1.9; color: var(--ink-soft); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 5px 13px;
  border-radius: 999px;
  font-weight: 600;
}
.tag.interest { background: var(--vermillion-soft); border-color: transparent; color: var(--vermillion-dark); }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 20px; }
.swipe-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  background: #fff;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.swipe-btn:active { transform: scale(0.94); }
.swipe-btn.pass { color: var(--muted); }
.swipe-btn.super { color: #8A6D1F; width: 52px; height: 52px; font-size: 18px; background: #FCF8EC; }
.swipe-btn.like { color: #fff; background: var(--vermillion); border-color: var(--vermillion); width: 72px; height: 72px; font-size: 26px; }
.deck-empty {
  text-align: center;
  padding: 72px 24px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 2;
}

/* ---------- マッチ・チャット ---------- */
.match-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  color: var(--ink);
}
.match-row .m-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--vermillion);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.match-row .m-avatar span {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}
.match-row .m-info { flex: 1; min-width: 0; }
.match-row .m-name { font-weight: 700; font-size: 15px; }
.match-row .m-preview { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-box {
  text-align: center;
  color: var(--muted);
  padding: 60px 22px;
  font-size: 13.5px;
  line-height: 2;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

#chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
#chat-header .back-btn {
  border: none;
  background: none;
  font-size: 19px;
  cursor: pointer;
  color: var(--ink);
  padding: 6px;
}
#chat-header .c-name { font-weight: 700; font-size: 15px; }
#chat-header .c-sub { font-size: 12px; color: var(--muted); }
#chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 4px 2px 8px;
}
.msg { max-width: 78%; padding: 11px 16px; border-radius: 18px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; line-height: 1.8; }
.msg.me { align-self: flex-end; background: var(--vermillion); color: #fff; border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg .m-time { display: block; font-size: 10.5px; opacity: 0.65; margin-top: 4px; }
#chat-form { display: flex; gap: 8px; margin-top: 12px; }
#chat-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 15px;
  font-family: var(--sans);
  background: #fff;
  color: var(--ink);
}
#chat-form input:focus { outline: none; border-color: var(--ink-soft); }
#chat-form button {
  border: 1px solid var(--vermillion);
  border-radius: 999px;
  background: var(--vermillion);
  color: #fff;
  padding: 0 24px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sans);
  letter-spacing: 1px;
}

/* ---------- アイデア掲示板 ---------- */
.idea-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 28px 24px 24px;
  margin-bottom: 22px;
}
.idea-form h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2.5px;
  margin: 0 0 18px;
}
.idea-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 14px;
}
.idea-card .i-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--vermillion-soft);
  color: var(--vermillion-dark);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.idea-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.idea-card .i-desc { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 12px; white-space: pre-wrap; line-height: 1.9; }
.idea-card .i-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; letter-spacing: 0.5px; }
.interest-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--sans);
  letter-spacing: 1px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.interest-btn.on {
  border-color: var(--vermillion);
  color: #fff;
  background: var(--vermillion);
}

/* ---------- マイページ ---------- */
.mypage-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 26px 24px;
  margin-bottom: 16px;
}
.mypage-card h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2.5px;
  margin: 0 0 18px;
}
.link-list { display: flex; flex-direction: column; }
.link-list button, .link-list a {
  border: none;
  background: none;
  text-align: left;
  padding: 15px 4px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--sans);
  display: block;
  width: 100%;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.link-list button:last-child, .link-list a:last-child { border-bottom: none; }
.link-list .danger { color: var(--vermillion); }

/* ---------- モーダル・トースト ---------- */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(38, 40, 46, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#modal-overlay.show { display: flex; }
.modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(38, 40, 46, 0.18);
  padding: 44px 30px 32px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  animation: fadeUp 0.28s ease;
}
@keyframes fadeUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal .hanko { margin-bottom: 18px; }
.modal h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 3px;
  margin: 0 0 10px;
}
.modal p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 24px; line-height: 1.9; }
.modal .btn-row { display: flex; gap: 10px; }
.modal .btn-row .btn { flex: 1; padding: 13px 10px; font-size: 14px; }

#toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
  max-width: 90%;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 法務ページ ---------- */
.legal-wrap { padding: 36px 20px 72px; max-width: 680px; margin: 0 auto; }
.legal-wrap .legal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 40px 32px;
}
.legal-wrap h1 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 4px;
  margin: 0 0 8px;
}
.legal-wrap .legal-date { font-size: 12px; color: var(--muted); margin-bottom: 24px; letter-spacing: 0.5px; }
.legal-wrap h2 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin: 30px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.legal-wrap p, .legal-wrap li { font-size: 13.5px; line-height: 2; color: var(--ink-soft); }
.legal-wrap ol, .legal-wrap ul { padding-left: 22px; }
.legal-wrap li { margin-bottom: 8px; }
.legal-back { display: inline-block; margin-bottom: 18px; color: var(--ink-soft); text-decoration: none; font-size: 13.5px; letter-spacing: 1px; }
.legal-back:hover { color: var(--ink); }
.legal-note { font-size: 12px; color: var(--muted); margin-top: 28px; line-height: 1.9; }
.legal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }

.loading { text-align: center; padding: 64px 20px; color: var(--muted); font-size: 13.5px; letter-spacing: 1px; }
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
  border-top-color: var(--vermillion);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 560px) {
  .poster h1 { font-size: 34px; }
  #deck { height: 520px; }
  .legal-wrap .legal-card { padding: 48px 44px; }
}
