:root {
  --blue-900: #0b3d6b;
  --blue-700: #1565c0;
  --blue-500: #2196f3;
  --blue-100: #e3f2fd;
  --ink: #15202b;
  --muted: #4a5a6a;        /* 高齢者配慮で濃いめ */
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #d0dae6;
  --ok: #1aa260;
  /* 役割色 */
  --forward: #f57c00;       /* 前進・確定 */
  --forward-strong: #e06a00;
  --alert: #e23b3b;
  /* ごほうび（達成系のみ） */
  --gold: #f5a623;
  --silver: #9aa7b4;
  --bronze: #c98a4b;
  --crown: #ffcf33;
  --diamond: #34c6e6;
  /* 識別 */
  --female: #fff1f4;
  --female-line: #f5c6d0;
  --tabbar-height: calc(64px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;          /* 16pxでなく17px（高齢者の可読性） */
  line-height: 1.7;
  padding-bottom: calc(var(--tabbar-height) + 20px);
}

a { color: var(--blue-700); }

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 61, 107, .25);
}
.app-header__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand__logo {
  width: 34px; height: 34px; border-radius: 10px;
  object-fit: contain; display: block; flex-shrink: 0;
  background: #fff;
}
.brand__name { font-weight: 700; font-size: 18px; }
.region-badge {
  background: rgba(255, 255, 255, .2);
  padding: 4px 10px; border-radius: 999px; font-size: 13px;
}

/* Layout */
.container { max-width: 760px; margin: 0 auto; padding: 16px 16px 8px; }

/* Hero */
.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.hero__title { margin: 0 0 6px; font-size: 24px; color: var(--blue-900); }
.hero__lead { margin: 0 0 12px; color: var(--muted); }
.hero__tag {
  display: inline-block; font-size: 12px; color: var(--blue-700);
  background: var(--blue-100); padding: 5px 12px; border-radius: 999px;
}

/* Cards */
.cards { margin-top: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; margin-bottom: 14px;
}
.card--ready { border-left: 5px solid var(--ok); }
.card__title { margin: 0 0 6px; font-size: 17px; }
.card__text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.feat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700;
  color: var(--blue-900);
}

.status-line { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; margin-bottom: 8px; }

/* Bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .05);
}
.tabbar__item {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 64px;
  text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 700;
  padding: 6px 12px; border-radius: 12px;
}
.tabbar__item.is-active { color: var(--blue-700); background: var(--blue-100); }

/* Header right / user chip */
.app-header__right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; flex-direction: column; line-height: 1.1;
  background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 10px;
  font-size: 13px; color: #fff;
}
.user-chip small { font-size: 10px; opacity: .85; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  min-height: 48px; padding: 12px 20px; border-radius: 999px;
  font-size: 17px; font-weight: 700;
  text-decoration: none; text-align: center;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--blue-700); color: #fff; }
.btn--primary:hover { background: var(--blue-900); }
/* 前進・確定アクション（「確定して次へ」など） */
.btn--forward { background: var(--forward); color: #fff; min-height: 56px; border-radius: 14px; }
.btn--forward:hover { background: var(--forward-strong); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 15px; background: var(--blue-700); color: #fff; }

.hero--compact { padding: 16px; text-align: left; }
.hero__actions { margin-top: 14px; }

/* Auth / forms */
.auth {
  max-width: 420px; margin: 24px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
}
.auth__title { margin: 0 0 16px; font-size: 20px; color: var(--blue-900); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form__label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.form__label-text { line-height: 1.4; }
.form__required { color: #c0392b; font-weight: 800; font-size: 12px; margin-right: 4px; }
.list__status--setup,
.list__status--open,
.list__status--playing { color: #c0392b; font-weight: 800; }
.form__input {
  width: 100%;
  max-width: 100%;
  padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px;
}
.form__input:focus { outline: 2px solid var(--blue-500); border-color: transparent; }
.form__hint { font-size: 13px; font-weight: 400; color: var(--muted); margin: 0; line-height: 1.5; }
.form__hint--warn { color: var(--alert); font-weight: 600; }
.req { color: var(--alert); font-size: 12px; font-weight: 700; }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.alert--error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; }
.alert--ok { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.alert--warn { background: #fff8e1; color: #6d4c00; border: 1px solid #ffe082; }
.card__subtitle { font-size: 15px; font-weight: 700; color: var(--blue-900); margin: 16px 0 8px; }
.btn--ghost { background: #fff; color: var(--blue-700); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--blue-100); }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.stat-grid--4 { grid-template-columns: repeat(2, 1fr); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; text-align: center; text-decoration: none; color: var(--ink);
}
.stat__num { display: block; font-size: 28px; font-weight: 800; color: var(--blue-700); }
.stat__label { font-size: 13px; color: var(--muted); }

/* Page head + search */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; flex-wrap: wrap; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.page-head--with-hint { align-items: flex-start; margin-bottom: 14px; }
.page-head__title { font-size: 18px; margin: 0; color: var(--blue-900); flex-shrink: 0; }
.groups-finish-hint {
  flex: 1; min-width: min(100%, 220px); max-width: 420px;
  margin: 0 0 0 auto; padding: 8px 12px;
  font-size: 13px; line-height: 1.55; color: var(--blue-900);
  background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px;
}
.groups-finish-hint strong { color: var(--forward-strong); }
@media (max-width: 560px) {
  .page-head--with-hint .groups-finish-hint { max-width: none; margin-left: 0; }
}
.count { font-size: 13px; color: var(--muted); font-weight: 600; }
.search { display: flex; gap: 8px; }
.search__input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }

/* Data table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
#game-settings { scroll-margin-top: 72px; }
#members-list { scroll-margin-top: 8px; }

/* 会員一覧：No・氏名を横スクロール時も左固定 */
.data-table--members {
  --members-sticky-no: 3.5rem;
  --members-sticky-name: 7.5rem;
}
.table-wrap--members { -webkit-overflow-scrolling: touch; margin-bottom: 4px; }
.data-table--members .sticky-col {
  position: sticky;
  z-index: 2;
  background: var(--card);
}
.data-table--members thead .sticky-col {
  z-index: 4;
  background: var(--blue-100);
}
.data-table--members .sticky-col--no {
  left: 0;
  min-width: var(--members-sticky-no);
}
.data-table--members .sticky-col--name {
  left: var(--members-sticky-no);
  min-width: var(--members-sticky-name);
  box-shadow: 4px 0 8px -4px rgba(11, 32, 43, .18);
  border-right: 2px solid var(--blue-500);
}
.data-table--members thead .sticky-col--name {
  border-right-color: var(--blue-700);
}
.data-table--members .row--female .sticky-col {
  background: var(--female);
}
.data-table--members .name { font-weight: 700; }
.table-wrap.score-wrap { overflow-y: visible; }

.card--debug { border-left: 4px solid var(--forward); }
.debug-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 9px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--blue-100); color: var(--blue-900); position: sticky; top: 0; z-index: 1; }
.data-table .name { font-weight: 700; }
.data-table .kana { color: var(--muted); font-size: 13px; }
.data-table .row--female { background: var(--female); }
.data-table .row--female td { border-bottom-color: var(--female-line); }
.data-table .empty, .empty { text-align: center; color: var(--muted); padding: 20px; }
.data-table .th-sort {
  color: inherit; text-decoration: none; font-weight: 700;
  display: inline-flex; align-items: center; gap: 2px;
}
.data-table .th-sort.is-active { color: var(--blue-700); }
.data-table .th-sort:hover { text-decoration: underline; }

/* List */
.list { display: flex; flex-direction: column; gap: 10px; }
.list__item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.list__main { display: flex; flex-direction: column; gap: 3px; }
.list__title { font-weight: 700; color: var(--blue-900); }
.list__sub { font-size: 13px; color: var(--muted); }
.list__note { font-size: 12px; color: var(--muted); }

.feat--soon { opacity: .65; }

/* =========================================================
   ごほうび層（達成・前進の演出。実務画面では使わない）
   ※ Nintendo的な祝祭エネルギーを「役割」に限定して投入
   ========================================================= */

/* スコアセル（大きな打数・56px以上のタップ）— 詳細スタイルは下の「スコア入力」セクション */
.score-cell--owner { box-shadow: 0 0 0 3px var(--blue-700) inset; }
.score-cell--edited { background: #fff6e0; }
.score-total {
  min-width: 56px; min-height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-700); color: #fff; border-radius: 10px;
  font-size: 24px; font-weight: 800;
}

/* 順位バッジ（1〜3位は金） */
.rank-badge {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--blue-700); color: #fff; font-size: 20px; font-weight: 800;
}
.rank-badge--top3 {
  background: var(--gold); color: var(--blue-900);
  box-shadow: 0 2px 6px rgba(245,166,35,.45);
}

/* ごほうびバッジ（トロフィー/メダル/王冠/ダイヤ） */
.reward {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 15px;
  color: var(--blue-900); background: var(--blue-100);
}
.reward--gold   { background: var(--gold);   color: #5a3d00; }
.reward--silver { background: var(--silver); color: #2b3540; }
.reward--bronze { background: var(--bronze); color: #fff; }
.reward--crown  { background: var(--crown);  color: #5a3d00; }
.reward--diamond{ background: var(--diamond);color: #07323c; }

/* HO・優勝の祝福バナー（短く控えめに） */
.celebration {
  text-align: center; padding: 20px;
  border-radius: 18px; color: var(--blue-900);
  background: linear-gradient(135deg, var(--gold), var(--crown));
  box-shadow: 0 6px 20px rgba(245,166,35,.35);
  animation: gg-pop .4s ease both;
}
.celebration__title { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.celebration__sub { font-size: 17px; font-weight: 700; margin: 0; }

@keyframes gg-pop {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .celebration { animation: none; }
  .btn:active { transform: none; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat__num { font-size: 22px; }
}

/* =========================================================
   P1: 大会・参加者・組分け・スコア・順位
   ========================================================= */

/* フォーム補助 */
.form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.form-row > .form__label { min-width: 0; }
.form-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form__label--row { flex-direction: row; align-items: center; gap: 8px; }
.btn--danger { background: var(--alert); color: #fff; }
@media (max-width: 560px) {
  .form-row,
  .form-row--2,
  .form-row--3 { grid-template-columns: 1fr; }
}

/* 状態ピル */
.status-pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; vertical-align: middle; margin-left: 6px;
}
.status-pill--setup   { background: #eceff3; color: #5a6b7b; }
.status-pill--open    { background: var(--blue-100); color: var(--blue-700); }
.status-pill--playing { background: #fff0db; color: var(--forward-strong); }
.status-pill--finished{ background: #e3f7ec; color: #0d7a45; }

/* 大会詳細：4ステップ */
.step-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.step-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.step-card__no {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--blue-100); color: var(--blue-700);
  display: grid; place-items: center; font-weight: 800;
}
.step-card__title { font-size: 18px; font-weight: 700; color: var(--blue-900); }
.step-card__sub { font-size: 14px; color: var(--muted); }

.status-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn.is-current { background: var(--forward); color: #fff; }
.share-link { display: flex; gap: 8px; margin: 10px 0; }
.share-link .form__input { flex: 1; }

/* 会員ピッカー */
.member-pick-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px;
}
.member-pick-toolbar__hint { font-size: 12px; color: var(--muted); margin-left: auto; }
.member-pick { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.member-pick-page .member-pick {
  max-height: calc(100vh - 280px);
  min-height: min(420px, 55vh);
}
.default-members-create-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.member-pick-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}
.member-pick-modal[hidden] { display: none !important; }
.member-pick-modal__backdrop {
  position: absolute; inset: 0; background: rgba(11, 32, 43, .48);
}
.member-pick-modal__panel {
  position: relative; z-index: 1;
  width: min(720px, 100%);
  max-height: min(92vh, 920px);
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(11, 32, 43, .22);
}
.member-pick-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 8px; flex-shrink: 0;
}
.member-pick-modal__title { margin: 0; font-size: 18px; color: var(--blue-900); }
.member-pick-modal__close {
  border: none; background: transparent; font-size: 28px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0 4px;
}
.member-pick-modal__scroll {
  flex: 1 1 auto;
  min-height: 200px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}
.member-pick-modal__scroll .member-pick {
  max-height: none;
  min-height: 0;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.member-pick__empty {
  margin: 0; padding: 20px; text-align: center; color: var(--muted);
}
.member-pick-modal__foot { margin-top: 12px; flex-shrink: 0; }
body.modal-open { overflow: hidden; }
.member-pick__row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.member-pick__row.is-female { background: var(--female); }
.member-pick__row.is-participant { background: #f0f7ff; }
.member-pick__row input { width: 22px; height: 22px; }
.member-pick__name { font-weight: 600; flex: 1; }
.member-pick__meta { font-size: 13px; color: var(--muted); }
.member-pick__row.is-search-hidden { display: none; }

/* 下部固定CTA */
.sticky-cta {
  position: sticky; bottom: 84px; margin-top: 16px; z-index: 5;
}

/* 組分け */
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .group-grid { grid-template-columns: 1fr; } }
.group-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; scroll-margin-top: 72px; }
.group-card__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px 14px; background: var(--blue-100);
  border-bottom: 2px solid var(--blue-500);
}
.group-card__head[data-course-color="赤"] { background: #ffebee; border-bottom-color: #ef9a9a; }
.group-card__head[data-course-color="赤"] .group-card__no { color: #b71c1c; }
.group-card__head[data-course-color="黄"] { background: #fff8e1; border-bottom-color: #ffe082; }
.group-card__head[data-course-color="黄"] .group-card__no { color: #e65100; }
.group-card__head[data-course-color="青"] { background: #e3f2fd; border-bottom-color: #90caf9; }
.group-card__head[data-course-color="青"] .group-card__no { color: #0d47a1; }
.group-card__head[data-course-color="緑"] { background: #e8f5e9; border-bottom-color: #a5d6a7; }
.group-card__head[data-course-color="緑"] .group-card__no { color: #1b5e20; }
.group-card__head[data-course-color="桃"] { background: #fce4ec; border-bottom-color: #f48fb1; }
.group-card__head[data-course-color="桃"] .group-card__no { color: #880e4f; }
.group-card__head[data-course-color="紫"] { background: #f3e5f5; border-bottom-color: #ce93d8; }
.group-card__head[data-course-color="紫"] .group-card__no { color: #4a148c; }
.group-card__head[data-course-color="茶"] { background: #efebe9; border-bottom-color: #bcaaa4; }
.group-card__head[data-course-color="茶"] .group-card__no { color: #4e342e; }
.group-card__head[data-course-color="黒"] { background: #eceff1; border-bottom-color: #b0bec5; }
.group-card__head[data-course-color="黒"] .group-card__no { color: #37474f; }
.group-card__no { font-weight: 800; color: var(--blue-900); font-size: 17px; }
.group-card__sub { font-size: 13px; color: var(--muted); width: 100%; }
.group-start-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-left: auto;
}
.group-start-form__label { font-size: 12px; font-weight: 700; color: var(--muted); }
.form__input--sm { width: auto; min-width: 4.5em; padding: 6px 8px; font-size: 14px; }
.group-start-form__course { min-width: 3.5em; }
.group-start-form__hole { min-width: 4.5em; }
.start-dup-list { margin: 8px 0 0 1.2em; padding: 0; font-size: 14px; }
.excluded-holes-fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.excluded-holes-grid {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px;
}
.excluded-hole-check { font-size: 14px; font-weight: 600; }
.excluded-hole-check.is-disabled { opacity: 0.35; }

/* コース詳細（ゲーム設定） */
.course-config-section { margin-top: 4px; }
.course-config-block {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 14px; background: #fafcfe;
}
.course-config-block__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
  margin-bottom: 12px;
}
.course-config-block__title {
  font-weight: 800; font-size: 17px; color: var(--blue-900);
  width: 100%;
}
.form-hint { margin: -6px 0 4px; }
.course-config__color-wrap { min-width: 120px; flex: 1; }
.course-config__distances-fieldset { border: none; margin: 12px 0 0; padding: 0; }
.course-distances-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px; margin-top: 8px;
}
@media (max-width: 560px) {
  .course-distances-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.course-distance-item {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.course-distance-item__no { font-size: 12px; }
.start-excl-summary { margin: 8px 0 0 1.2em; padding: 0; }
.group-members { list-style: none; margin: 0; padding: 6px; }
.group-member {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  border-radius: 10px; border: 1px solid transparent;
}
.group-member.is-female { background: var(--female); }
.group-member.is-host { border-color: var(--blue-700); box-shadow: 0 0 0 1px var(--blue-700) inset; }
.group-member.is-dragging { opacity: 0.85; background: var(--blue-100); }
.group-member__handle {
  cursor: grab; touch-action: none; user-select: none;
  width: 28px; text-align: center; font-size: 20px; font-weight: 700; color: var(--muted);
  flex-shrink: 0;
}
.group-member__handle:active { cursor: grabbing; }
.host-tag {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--blue-700);
  padding: 1px 7px; border-radius: 999px;
}
.host-tag--sm { font-size: 10px; padding: 1px 5px; margin-left: 4px; }
.icon-btn--host { color: var(--gold); font-weight: 800; }
.group-member__order {
  width: 26px; height: 26px; border-radius: 999px; background: #eceff3;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.group-member__name { flex: 1; font-weight: 600; min-width: 0; }
.group-member__actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.group-member__actions form { display: inline; margin: 0; }

.group-search-card { margin-bottom: 12px; }
.group-search__label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.group-search__input { width: 100%; box-sizing: border-box; }
.group-search__result { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--blue-700); }
.group-search__result.is-empty { color: var(--muted); font-weight: 600; }
.group-card.is-search-hidden { display: none; }
.group-member.is-search-hidden { display: none; }
.group-member.is-search-hit { box-shadow: 0 0 0 2px var(--forward) inset; background: #fff8ef; }
.icon-btn {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; font-size: 14px;
}
.icon-btn:active { background: var(--blue-100); }
.move-select { height: 34px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; max-width: 88px; }

/* スコア入力 */
.score-controls { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.score-controls__field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.score-controls__simulate { margin: 0; }
.round-tabs { display: flex; gap: 6px; }
.round-tab {
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  text-decoration: none; color: var(--muted); font-weight: 700; min-height: 40px;
  display: inline-flex; align-items: center;
}
.round-tab.is-active { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }
/* ラウンド切替（R1/R2…大きな角丸ボタン） */
.round-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px;
}
.round-mark {
  min-width: 52px; min-height: 52px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 2px solid var(--line);
  background: #fff; color: var(--muted);
  font-size: 18px; font-weight: 800; text-decoration: none;
}
.round-mark.is-active {
  background: var(--blue-700); color: #fff; border-color: var(--blue-700);
  box-shadow: 0 2px 8px rgba(11, 61, 107, .25);
}
.round-mark:active { transform: scale(.97); }
.score-hint { font-size: 14px; color: var(--muted); margin: 4px 0 10px; }

/* スコア入力：Wake Lock（画面スリープ防止） */
.wake-lock-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 0 0 12px; padding: 10px 12px;
  background: #e8f4fd; border: 1px solid #b3d9f7; border-radius: 12px;
}
.wake-lock-bar__text {
  flex: 1; min-width: 180px; margin: 0;
  font-size: 13px; line-height: 1.5; color: var(--blue-900);
}
.wake-lock-bar__fallback {
  margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted);
}
.wake-lock-bar--unsupported { background: #f5f7fa; border-color: var(--line); }
.wake-lock-bar--active { background: #e3f7ec; border-color: #a5d6a7; }
.wake-lock-bar__badge {
  font-size: 13px; font-weight: 800; color: #1b5e20;
}
.btn--wake-lock {
  background: var(--blue-700); color: #fff; flex-shrink: 0;
  min-height: 40px; font-weight: 700;
}
.wake-lock-bar__off { flex-shrink: 0; min-height: 36px; }
.member-score-grid-wrap + .wake-lock-bar,
.member-body--score .wake-lock-bar { margin-top: 0; margin-bottom: 10px; }

.score-table { font-size: 16px; }
.score-table th, .score-table td { text-align: center; padding: 4px; }
.score-table .sticky-col {
  position: sticky; left: 0; background: var(--card); text-align: left;
  min-width: 120px; z-index: 2; font-weight: 600;
}
.score-table thead .sticky-col { background: var(--blue-100); }
.score-table .sticky-col.is-owner { box-shadow: 3px 0 0 var(--blue-700) inset; }
.bat-no {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 999px; background: #eceff3; font-size: 12px; font-weight: 700;
}
.score-cell-td { padding: 3px !important; overflow: visible; }
/* オナーマーク＝親tdに青枠（button/spanのbox-shadowはブラウザ差で消えるため） */
.score-cell-td--honor {
  padding: 0 !important;
  background: var(--blue-700);
  border-radius: 14px;
  box-shadow: 0 0 0 2px var(--blue-700);
}
.score-cell {
  position: relative;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  min-width: 48px; min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 22px; font-weight: 800; color: var(--ink);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  padding: 0;
  margin: 0;
}
.score-cell-td--honor .score-cell {
  width: 100%; height: 48px;
  border-color: #fff;
  border-width: 3px;
}
.score-cell:active { background: var(--blue-100); }
.score-cell.is-ho { background: var(--crown); color: #5a3d00; font-size: 20px; }
.score-cell.is-edited { background: #fff6e0; }
.score-cell.is-honor { /* 装飾は td--honor / honor-mark が担当 */ }
.score-cell__val { line-height: 1; }
.honor-mark {
  position: absolute;
  top: 0; left: 1px;
  right: auto;
  line-height: 1;
  font-size: 13px;
  font-weight: 900;
  color: var(--blue-700);
  pointer-events: none;
}
.score-cell.is-ho .honor-mark { color: #5a3d00; }
.score-cell-td--honor .honor-mark { color: var(--blue-700); }
.score-cell--view { cursor: default; }
.score-cell--view:active { background: inherit; }
.honor-hint { font-weight: 700; color: var(--blue-700); }
.col-g { font-size: 20px; font-weight: 800; color: var(--blue-700); }
.col-n, .col-o, .col-d { font-weight: 700; color: var(--muted); }

/* スコア入力モーダル（スマホ：中央表示・タブバーより前面） */
.score-modal {
  position: fixed; inset: 0; background: rgba(11, 32, 43, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: max(12px, env(safe-area-inset-top)) 12px
           max(calc(var(--tabbar-height) + 12px), env(safe-area-inset-bottom));
}
.score-modal[hidden] { display: none !important; }
.score-modal__sheet {
  width: 100%; max-width: 460px; background: #fff;
  border-radius: 18px; padding: 20px;
  max-height: min(82vh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 16px 48px rgba(11, 32, 43, .22);
  animation: gg-pop .18s ease both;
}
.score-modal__head { display: flex; justify-content: space-between; font-weight: 700; }
.score-modal__hole { color: var(--muted); }
.score-modal__value {
  text-align: center; font-size: 40px; font-weight: 800; color: var(--blue-900);
  margin: 14px 0;
}
.score-modal__pad { display: flex; gap: 12px; justify-content: center; }
.score-modal__pad .btn { min-width: 96px; font-size: 26px; }
.score-modal__quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 16px 0; }
.sm-quick {
  height: 52px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 22px; font-weight: 800; cursor: pointer;
}
.sm-quick:active { background: var(--blue-100); }
.score-modal__actions { display: flex; gap: 8px; justify-content: space-between; }
.score-modal__actions #smOk { flex: 1; }

/* 順位表 */
.rank-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rank-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.rank-row.is-female { background: var(--female); }
.rank-row.is-top { border-color: var(--gold); box-shadow: 0 2px 8px rgba(245,166,35,.18); }
.rank-row__main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rank-row__name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rank-row__link {
  color: var(--blue-900); text-decoration: none; cursor: pointer;
}
.rank-row__link .rank-row__name-text,
.rank-row__link .rank-row__no {
  text-decoration: underline; text-decoration-color: var(--blue-500);
  text-underline-offset: 3px;
}
.rank-row__link:hover .rank-row__name-text,
.rank-row__link:hover .rank-row__no { color: var(--blue-700); }
.rank-row__link .prize-icon,
.rank-row__link .prize-icon * { text-decoration: none; }
.rank-row__link .reward { text-decoration: none; }
.rank-row__detail { font-size: 13px; color: var(--muted); }
.rank-row__progress { color: var(--forward-strong); }
.rank-row__g { font-size: 26px; font-weight: 800; color: var(--blue-700); }
.rank-row__g small { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.rank-badge--na { background: var(--line); color: var(--muted); font-size: 15px; }
.rank-row--partial .rank-row__detail,
.rank-row--partial .rank-row__g,
.rank-row--partial .rank-round--partial { color: #c0392b; }
.rank-row--partial .rank-row__holes { color: #c0392b; font-weight: 800; }
.rank-row--absent { opacity: 0.85; }
.rank-row--absent .rank-row__g,
.rank-row--absent .rank-dash { color: var(--muted); font-weight: 700; }
.rank-tag {
  display: inline-block; font-size: 10px; font-weight: 800;
  padding: 0 5px; border-radius: 4px; vertical-align: middle;
  line-height: 1.5; flex-shrink: 0;
}
.rank-table__name-inner {
  display: inline-flex; flex-wrap: wrap; align-items: center;
  gap: 4px; max-width: 11em; white-space: normal;
}
.rank-table__name-text { word-break: break-all; }
.rank-tag--partial { background: #fdecea; color: #c0392b; }
.rank-tag--absent { background: #eee; color: var(--muted); }
.rank-row__no { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.rank-rounds { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 4px; }
.rank-round { font-size: 12px; font-weight: 700; color: var(--blue-900); white-space: nowrap; }
.rank-round small { font-weight: 700; color: #c0392b; margin-left: 2px; }
.rank-round--empty { color: var(--muted); }
.rank-row__stats { display: block; font-size: 13px; color: var(--muted); }
.participant-absent-toggle { font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.participant-absent-toggle input { width: 16px; height: 16px; margin-right: 4px; }

/* 順位表: タブ・詳細表 */
.rank-view-tabs {
  display: flex; gap: 8px; margin: 12px 0 14px;
}
.rank-view-tab {
  flex: 1; text-align: center; padding: 10px 12px;
  border-radius: 10px; border: 2px solid var(--line);
  font-size: 14px; font-weight: 800; color: var(--muted);
  text-decoration: none; background: #fff;
}
.rank-view-tab.is-active {
  border-color: var(--blue-400); color: var(--blue-900);
  background: var(--blue-50);
}
.rank-display-settings { margin-bottom: 12px; }
.rank-preset-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rank-display-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
  margin: 10px 0 14px;
  border: none;
  padding: 0;
}
.rank-display-col {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.rank-display-col input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}
.rank-display-col span { line-height: 1.3; }
.rank-row__meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
}
.rank-round__part + .rank-round__part::before { content: " "; }

.rank-table-wrap {
  overflow-x: auto; margin: 0 -4px 16px;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.rank-table {
  width: max-content; min-width: 100%;
  border-collapse: collapse; font-size: 13px;
}
.rank-table th, .rank-table td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
}
.rank-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--blue-50);
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  border-bottom: 2px solid var(--blue-200);
}
.rank-table thead .rank-table__sticky {
  z-index: 5;
  background: var(--blue-50);
}
.rank-table__sub { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--blue-50); }
.rank-table__round-head { border-left: 2px solid var(--blue-200); background: var(--blue-50); }
.rank-table__total-head { border-left: 2px solid var(--gold); background: #fffbeb; }
.rank-table tbody tr:nth-child(even) { background: #fafbfd; }
.rank-table tbody tr.is-female { background: var(--female); }
.rank-table__row.is-top { background: #fffdf5; }
.rank-table__row--partial td { color: #c0392b; }
.rank-table__row--partial .rank-table__cell--partial,
.rank-table__row--partial small { color: #c0392b; font-weight: 700; }
.rank-table__row--absent td { color: var(--muted); }
.rank-table__dash { color: var(--muted); text-align: center; }
.rank-table__total-g { font-weight: 800; color: var(--blue-700); }
.rank-table tbody .rank-table__sticky {
  position: sticky; left: 0; z-index: 2;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 0 var(--line);
}
.rank-table thead .rank-table__sticky { background: var(--blue-50); }
.rank-table tbody tr:nth-child(even) .rank-table__sticky { background: #fafbfd; }
.rank-table__row.is-female .rank-table__sticky { background: var(--female); }
.rank-table__row.is-female:nth-child(even) .rank-table__sticky { background: var(--female); }
.rank-table__row.is-top .rank-table__sticky { background: #fffdf5; }
.rank-table__name.rank-table__sticky,
.rank-table__sticky-edge {
  border-right: 2px solid var(--blue-200);
  box-shadow: 2px 0 0 var(--blue-200);
}
.rank-table__rank { left: 0; min-width: 2.5em; text-align: center; font-weight: 800; }
.rank-table__no { min-width: 2.5em; text-align: center; }
.rank-table__name { min-width: 7em; font-weight: 700; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

@media print {
  .rank-display-settings, .rank-view-tabs, .page-head .count, .sticky-cta { display: none !important; }
  .rank-table-wrap { overflow: visible; border: none; }
  .rank-table { width: 100%; font-size: 11px; }
  .rank-table__sticky { position: static; }
}
.reward { padding: 2px 8px; font-size: 14px; }

/* 順位表の賞アイコン（旧アプリ同様・数字は赤で視認性UP） */
.prize-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 46px;
  height: 46px;
  vertical-align: middle;
  flex-shrink: 0;
}
.prize-icon__glyph {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.prize-icon__num {
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  color: #c62828;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 1px 0 #fff;
  letter-spacing: -0.02em;
}
/* トロフィー：数字はカップ中央 */
.prize-icon--trophy .prize-icon__num {
  bottom: auto;
  top: 12px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
}
/* メダル：円（銅色部分）の中央・白文字 */
.prize-icon--medal .prize-icon__num {
  bottom: auto;
  top: 62%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .65), 0 0 3px rgba(0, 0, 0, .45);
}
/* 王冠：×回数が下線に被らないよう少し上へ */
.prize-icon--crown .prize-icon__num {
  bottom: 6px;
  font-size: 13px;
}
/* ダイヤモンド賞（1Rで①×3以上。2R以上達成時は中央に数字） */
.prize-icon--diamond {
  width: 54px;
  height: 44px;
}
.prize-icon__diamond-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(26, 143, 184, .35));
}
.prize-icon--diamond .prize-icon__num {
  bottom: auto;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #c62828;
  text-shadow: 0 0 3px #fff, 0 0 4px #fff, 0 1px 0 #fff;
}
.rank-table__prizes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  vertical-align: middle;
}

/* 順位表: 並び順タブ */
.rank-sort-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.rank-sort-tabs__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-700);
}
.rank-sort-tab {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
}
.rank-sort-tab.is-active {
  background: var(--blue-700);
  color: #fff;
  border-color: var(--blue-700);
}
.rank-sort-hint {
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.rank-row__name .prize-icon { margin-left: 2px; }

/* 会員ログイン・プレイ画面 */
.member-body { padding-bottom: 24px; }
.member-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--blue-700); color: #fff;
}
.member-header .brand { color: #fff; text-decoration: none; }
.member-header__user { text-align: right; font-size: 14px; }
.member-header__name { display: block; font-weight: 700; margin-bottom: 4px; }
.member-header__actions { display: flex; gap: 12px; justify-content: flex-end; }
.member-header__refresh,
.member-header__logout { color: #fff; opacity: .9; font-size: 13px; text-decoration: none; }
.member-header__refresh:hover,
.member-header__logout:hover { opacity: 1; text-decoration: underline; }

.member-wait-card { margin-top: 12px; }
.member-container { max-width: 520px; }
.auth--member { max-width: 420px; margin: 20px auto; }
.auth__lead { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.form__input--lg { min-height: 52px; font-size: 18px; }
.form__fieldset { border: none; margin: 0; padding: 0; }
.birth-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.birth-row__y { width: 5.5em; }
.birth-row__md { width: 3.5em; }
.birth-row__sep { font-weight: 700; color: var(--muted); }
.member-tournament-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.member-section-title {
  font-size: 15px; font-weight: 800; color: var(--blue-900);
  margin: 20px 0 0; padding-bottom: 4px; border-bottom: 1px solid var(--line);
}
.member-section-title:first-of-type { margin-top: 12px; }
.member-history-note { margin-top: 10px; color: var(--muted); font-size: 13px; }
.member-tournament-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); text-decoration: none; color: inherit;
}
.member-tournament-card.is-live { border-color: var(--forward); box-shadow: 0 2px 10px rgba(245,124,0,.15); }
.member-tournament-card__name { font-size: 18px; font-weight: 800; color: var(--blue-900); }
.member-tournament-card__sub { font-size: 14px; color: var(--muted); }
.member-play-info {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0;
}
.member-play-info--compact { margin-top: 0; }
.member-play-info__badge {
  padding: 6px 12px; border-radius: 10px; background: var(--blue-100);
  color: var(--blue-900); font-weight: 800;
}
.member-play-info__course {
  padding: 6px 12px; border-radius: 10px; background: var(--blue-700);
  color: #fff; font-weight: 800;
}
.member-play-info__order {
  padding: 6px 12px; border-radius: 10px; background: #eceff3;
  font-weight: 800;
}
.member-action-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

/* 会員ホーム：プレイメニュー（旧アプリ「ゲームを作る」相当） */
.member-play-menu {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px 16px;
  margin-bottom: 8px;
}
.member-play-menu__greeting {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-900);
}
.member-play-menu__lead {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.member-play-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.member-play-menu__btn--secondary {
  background: var(--blue-100);
  color: var(--blue-900);
  border: 1px solid var(--line);
}
.member-play-menu__hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

/* P10: 会員ホーム 町大会 / ミニゲーム タブ */
.member-tab-bar {
  display: flex;
  gap: 0;
  margin: 16px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.member-tab {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.member-tab.is-active {
  color: var(--blue-900);
  background: #fff;
  border-bottom-color: var(--blue-600);
}
.member-tab-panel { margin-top: 4px; }
.member-section-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-900);
  margin: 18px 0 10px;
}

.member-play-hero {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 14px;
}
.member-play-hero__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}
.member-play-hero__lead {
  margin: 0;
  font-size: 14px;
  opacity: .95;
  line-height: 1.6;
}

.member-host-form--hidden { display: none; }
.member-host-name {
  cursor: pointer;
}
.member-host-name:hover { text-decoration: underline; }
.member-host-star {
  margin-right: 2px;
}

/* 会員スコア入力：順位バッジ（右上）・下部ボタンなし */
.member-score-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 8px;
}
.member-score-head__title {
  font-size: 20px; margin: 4px 0 8px; color: var(--blue-900);
}
.member-score-head__stats {
  margin: 6px 0 0; font-size: 13px; color: var(--muted);
}
.member-score-head__stats strong { color: var(--blue-700); font-size: 16px; }
.member-rank-badge {
  flex-shrink: 0; min-width: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 12px; border-radius: 14px; text-decoration: none;
  background: linear-gradient(145deg, var(--blue-700), var(--blue-900));
  color: #fff; box-shadow: 0 4px 12px rgba(0, 72, 153, .25);
}
.member-rank-badge:active { transform: scale(.97); }
.member-rank-badge__label { font-size: 11px; opacity: .85; font-weight: 600; }
.member-rank-badge__num {
  font-size: 28px; font-weight: 800; line-height: 1.1; margin: 2px 0;
}
.member-rank-badge__num small { font-size: 14px; font-weight: 700; }
.member-rank-badge__num--pending { font-size: 22px; opacity: .7; }
.member-rank-badge__sub { font-size: 11px; opacity: .8; white-space: nowrap; }
.member-score-grid-wrap {
  margin-bottom: max(24px, env(safe-area-inset-bottom, 24px));
}
.member-body.member-body--score { padding-bottom: 8px; }
.member-body.member-body--score .member-container { max-width: 520px; padding-top: 0; }

/* 会員スコア：青ヘッダー＋ガラス調順位カード（Claude Design mock 準拠） */
.member-score-hero {
  margin: -12px -16px 12px;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  background: linear-gradient(155deg, #1a5fbf 0%, #0d3d7a 55%, #0a3266 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 61, 122, .28);
}
.member-score-hero[data-course-color="赤"] {
  background: linear-gradient(155deg, #e53935 0%, #c62828 55%, #8b0000 100%);
  box-shadow: 0 8px 24px rgba(198, 40, 40, .32);
}
.member-score-hero[data-course-color="黄"] {
  background: linear-gradient(155deg, #ffb300 0%, #f9a825 50%, #ef6c00 100%);
  box-shadow: 0 8px 24px rgba(249, 168, 37, .32);
}
.member-score-hero[data-course-color="青"] {
  background: linear-gradient(155deg, #1a5fbf 0%, #0d3d7a 55%, #0a3266 100%);
  box-shadow: 0 8px 24px rgba(13, 61, 122, .28);
}
.member-score-hero[data-course-color="緑"] {
  background: linear-gradient(155deg, #43a047 0%, #2e7d32 55%, #1b5e20 100%);
  box-shadow: 0 8px 24px rgba(46, 125, 50, .32);
}
.member-score-hero[data-course-color="桃"] {
  background: linear-gradient(155deg, #ec407a 0%, #d81b60 55%, #ad1457 100%);
  box-shadow: 0 8px 24px rgba(216, 27, 96, .32);
}
.member-score-hero[data-course-color="紫"] {
  background: linear-gradient(155deg, #8e24aa 0%, #6a1b9a 55%, #4a148c 100%);
  box-shadow: 0 8px 24px rgba(106, 27, 154, .32);
}
.member-score-hero[data-course-color="茶"] {
  background: linear-gradient(155deg, #8d6e63 0%, #6d4c41 55%, #4e342e 100%);
  box-shadow: 0 8px 24px rgba(109, 76, 65, .32);
}
.member-score-hero[data-course-color="黒"] {
  background: linear-gradient(155deg, #78909c 0%, #546e7a 55%, #37474f 100%);
  box-shadow: 0 8px 24px rgba(55, 71, 79, .32);
}
.member-score-hero__bar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 12px 14px 0;
}
.member-score-hero__back {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.92);
  text-decoration: none; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.member-rank-card {
  flex-shrink: 0; min-width: 88px; max-width: 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 10px; border-radius: 14px; text-decoration: none; text-align: center;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.member-rank-card:active { transform: scale(.97); }
.member-rank-card__label {
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  opacity: .92; line-height: 1.2;
}
.member-rank-card__num {
  font-size: 26px; font-weight: 800; line-height: 1.05;
  margin: 3px 0 1px; font-variant-numeric: tabular-nums;
}
.member-rank-card__num small { font-size: 13px; font-weight: 700; }
.member-rank-card__num--pending { font-size: 20px; opacity: .75; }
.member-rank-card__sub { font-size: 10px; opacity: .88; white-space: nowrap; }

.member-score-hero__body { padding: 10px 14px 16px; }
.member-score-hero__title {
  margin: 0 0 8px; font-size: 20px; font-weight: 800; color: #fff;
}
.member-play-info--hero .member-play-info__badge,
.member-play-info--hero .member-play-info__course,
.member-play-info--hero .member-play-info__order {
  background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.25);
}
.member-score-hero__stats {
  margin: 8px 0 0; font-size: 13px; color: rgba(255,255,255,.88);
}
.member-score-hero__stats strong { color: #fff; font-size: 17px; }

.member-score-grid-wrap {
  margin-bottom: max(24px, env(safe-area-inset-bottom, 24px));
}
/* 会員スコア：オナーは左上●のみ（青枠tdなし） */
.member-score-grid-wrap .score-cell.is-honor {
  border-color: var(--line);
}
.member-score-grid-wrap .honor-mark {
  top: 1px; left: 2px;
  right: auto;
  font-size: 11px; font-weight: 900;
  color: var(--blue-700);
}
.member-score-grid-wrap .score-cell.is-ho .honor-mark { color: #5a3d00; }

.count--sub { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.th-sub { display: block; font-size: 10px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.member-filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 12px 14px; margin-bottom: 12px;
}
.member-filter-bar__label { font-size: 14px; font-weight: 700; color: var(--blue-900); }
.member-filter-bar__check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.member-phone { white-space: nowrap; }
.member-phone--land { font-size: 13px; color: var(--muted); white-space: nowrap; }
.member-birth { min-width: 120px; }
.member-death-note { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.member-death-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.member-phone__edit {
  display: inline-block; margin-left: 6px;
  font-size: 12px; font-weight: 700; color: var(--blue-700);
  text-decoration: underline; text-underline-offset: 2px;
}

/* 公開QR */
.share-qr { text-align: center; margin: 14px 0; }
.share-qr img { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; }
.share-qr--sm img { max-width: 160px; }
.card--share-inline { margin: 12px 0; }
.card--share-inline .card__title { font-size: 15px; }

/* ミニゲーム参加（P9） */
.casual-join-list { list-style: none; margin: 0 0 16px; padding: 0; }
.casual-join-list__item { border-bottom: 1px solid var(--line); }
.casual-join-choice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px; cursor: pointer;
}
.casual-join-choice input { width: 18px; height: 18px; }
.member-score-hero__guest { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.app-header--compact .app-header__inner { display: flex; justify-content: space-between; align-items: center; }

/* スコア表ポップアップ（順位表から名前タップ） */
.popup-body { background: var(--bg); padding: 12px 14px 24px; max-width: 480px; margin: 0 auto; }
.popup-head { margin-bottom: 8px; }
.popup-head__title { font-size: 20px; margin: 0; color: var(--blue-900); }
.popup-head__sub { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.popup-hint { margin-top: 0; }
.popup-total { margin-top: 14px; }
.popup-total__line { margin: 0; font-size: 15px; }
.popup-foot { font-size: 13px; margin-top: 14px; text-align: center; }
.popup-foot a { color: var(--blue-700); font-weight: 700; }
.score-wrap--view { margin-top: 8px; }

.view-only-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 700;
}
.view-only-badge--compact { margin: 0 0 8px; padding: 4px 10px; font-size: 12px; }

/* 一覧アイテム（右側に編集/削除ボタン） */
.list__item--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.list__actions form { margin: 0; }

/* P11: 大会案内・出欠（RSVP） */
.card--announce { border-color: var(--blue-200); }
.rsvp-summary {
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  margin: 12px 0 8px;
}
.rsvp-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.rsvp-pill--yes { background: #d4edda; color: #155724; }
.rsvp-pill--no { background: #f8d7da; color: #721c24; }
.rsvp-pill--pending { background: #fff3cd; color: #856404; }

.rsvp-member-list { margin: 12px 0; max-height: 320px; overflow-y: auto; }
.rsvp-member-list__items { list-style: none; margin: 0; padding: 0; }
.rsvp-member-list__item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.rsvp-member-list__name { font-weight: 700; min-width: 5em; }
.rsvp-member-list__tel { font-size: 13px; color: var(--muted); }
.rsvp-member-list__ans {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}
.rsvp-member-list__item--yes .rsvp-member-list__name { color: #155724; }
.rsvp-member-list__item--yes .rsvp-member-list__ans { background: #d4edda; color: #155724; }
.rsvp-member-list__item--no .rsvp-member-list__name { color: #721c24; }
.rsvp-member-list__item--no .rsvp-member-list__ans { background: #f8d7da; color: #721c24; }
.rsvp-member-list__item--pending .rsvp-member-list__name { color: var(--muted); }
.rsvp-member-list__item--pending .rsvp-member-list__ans { background: #fff3cd; color: #856404; }

.member-announce-banner { margin: 0 0 16px; }
.member-announce-card {
  display: block;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 2px solid var(--blue-300);
  background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
  text-decoration: none;
  color: inherit;
}
.member-announce-card__title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--blue-900);
}
.member-announce-card__sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.rsvp-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.rsvp-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.rsvp-status--yes { background: #d4edda; color: #155724; }
.rsvp-status--no { background: #f8d7da; color: #721c24; }
.announcement-body { line-height: 1.6; }

.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.login-remember input { width: 18px; height: 18px; }
