/* ===========================
   modal.css  完全版
   =========================== */

/* =========================================
   Modal Base
   - backdrop + open animation
   ========================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);

  display: flex;                 /* 常にflex */
  align-items: center;
  justify-content: center;

  z-index: 1000;

  opacity: 0;
  visibility: hidden;            /* ←これで非表示にする */
  pointer-events: none;

  transition: opacity 0.25s ease-out, visibility 0s linear 0.25s;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition: opacity 0.25s ease-out, visibility 0s;
}

.modal-content {
  font-size: 16px;
  background: #fff;
  padding: 24px 32px 28px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;

  /* ★ 下から “すっと” 出る */
  transform: translateY(56px);
  opacity: 0;

  transition:
    transform 0.28s ease-out,
    opacity 0.22s ease-out;
}

.modal-backdrop.is-open .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* 端末が低速のときのチラつき対策（任意） */
.modal-content {
  will-change: transform, opacity;
}

/* タイトル（トップバー無しモーダル用） */
.modal-content h3 {
  margin-top: 4px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 700;
}

/* =========================================
   Modal Form Common
   ========================================= */

.modal-form {
  margin-top: 4px;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.modal-form .field-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

/* 人数だけ少し詰める */
.field-group-count {
  margin-bottom: 12px;
}

.modal-form label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  text-align: center;
  width: 100%;
}

.modal-number {
  font-size: 1.6rem;
  font-weight: 600;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.1;
}

.modal-actions {
  margin-top: 8px;
  text-align: center;
}

.modal-form small {
  text-align: center;
}

/* number input common */
.modal-form input[type="number"] {
  border: none;
  background: transparent;
  text-align: center;
  width: 60px;
}

.modal-form input[type="number"]:focus {
  outline: none;
  box-shadow: none;
}

/* hide spin buttons */
.modal-form input[type="number"]::-webkit-inner-spin-button,
.modal-form input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-form input[type="number"] {
  -moz-appearance: textfield;
}

/* =========================================
   Modal Buttons
   - 見た目は base.css の .btn-pill を使用
   - 互換のため .btn-primary は残す（デザインは持たせない）
   ========================================= */

.modal-actions .btn-primary{
  /* intentionally empty */
}

/* =========================================
   Attendance / Toggle / Stepper (used by condition modal etc.)
   ========================================= */

.attendance-choice-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

.attendance-choice {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}

/* シングルス／ダブルス トグル */
.toggle-row {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 4px;
  gap: 0;
  max-width: 260px;
  width: fit-content;
  margin: 0 auto 8px;
}

.toggle-btn {
  flex: 1;
  min-width: 90px;
  padding: 8px 0;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.15s ease;
}

.toggle-btn.active {
  background: #2ecc71;
  color: #fff;
  box-shadow: 0 2px 4px rgba(46, 204, 113, 0.35);
}

/* 面数／ラウンド数のステッパー */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.stepper-btn {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

/* 人数ピル */
.count-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  padding: 6px 50px;
  border-radius: 999px;
  color: #333;
  min-width: 90px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* =========================================
   UI Common Modals (message / confirm)
   ========================================= */

.ui-message-content { max-width: 420px; }
.ui-message-body { color: #333; font-weight: 600; }

.ui-confirm-content { max-width: 520px; }
.ui-confirm-body { margin: 12px 0 18px; color: #333; }
.ui-confirm-actions { justify-content: flex-end; }

#ui-message-modal.modal-backdrop,
#ui-confirm-modal.modal-backdrop {
  z-index: 3000; /* 1000 より上ならOK。念のため大きめ */
}

/* =========================================
   Event Modal (settings/club)
   - IMPORTANT: current "win" design = vertical time layout
   ========================================= */

.event-modal { text-align: center; }

/* 日付（表示のみ） */
.event-date-display {
  width: 180px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f4f6;
  font-weight: 700;
  color: #374151;
}

/* タイトル入力（event-modal の勝ち定義） */
.event-modal .event-title-input {
  width: 100%;
  max-width: 180px;
  padding: 10px 12px;

  border: none;
  border-radius: 10px;
  outline: none;

  background: #f3f6ff;
  font-size: 0.95rem;
  font-weight: 600;
}

.event-modal .event-title-input::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

.event-modal .event-title-input:focus {
  background: #eaf0ff;
}

/* 時間UI（event-modal の勝ち定義：縦並び） */
.event-modal .time-range {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.event-modal .time-sep { display: none; }

.event-modal .time-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.event-modal .time-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  min-width: 40px;
  text-align: right;
}

.event-modal .time-selects {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f5f5f5;
}

.event-modal .time-select {
  appearance: none;
  -webkit-appearance: none;

  border: none;
  background: transparent;

  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.event-modal .time-colon {
  font-weight: 700;
  color: #666;
}

/* event-modal の field-group は中央寄せを維持 */
.event-modal .field-group {
  align-items: center;
}

/* =========================================
   [COMPAT] Old event-modal-topbar (legacy)
   - Not used by current club-event-modal (should use .modal-topbar)
   - Keep for safety, but isolated here.
   ========================================= */

.event-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;

  padding: 12px 14px;
  border-radius: 14px;
  margin: -8px -8px 14px;
}

.event-modal-title {
  font-weight: 800;
  letter-spacing: 0.3px;
}

.event-modal-x {
  width: 34px;
  height: 34px;
  border-radius: 10px;

  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;

  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}

.event-modal-x:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.85);
}

/* =========================================
   Modal Topbar (TennisBear-like band)  ★WIN DEFINITION
   - Use on .modal-content by adding .modal-has-topbar
   - No back button required; title + close only.
   ========================================= */

.modal-has-topbar {
  padding-top: 0; /* topbar があるので上余白を消す */
}

/* topbar付きのときだけ、上paddingを0にして帯を上端に密着させる */
.modal-content.modal-has-topbar{
  padding-top: 0;                 /* ← これが肝 */
}

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 52px;
  padding: 0 12px;

  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;

  border-radius: 0;

  /* FIX: topbar が上で見切れる問題の対策（負marginを撤去して最小限に） */
  margin-top: 0;
  margin-left: -32px;
  margin-right: -32px;
  margin-bottom: 18px;
}

.modal-topbar-title {
  flex: 1;
  text-align: left;

  font-weight: 800;
  font-size: 18px;
  line-height: 1;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-topbar-btn {
  width: 40px;
  height: 40px;

  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;

  font-size: 22px;
  font-weight: 900;
  line-height: 1;

  border-radius: 10px;
}

.modal-topbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* 編集モーダルのアクションを左右に分離（距離を置く） */
.modal-actions.modal-actions-split{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:14px;
}

/* =========================================================
   イベント中止 / 復活 専用ボタン
   ========================================================= */

/* ラッパー：中央寄せ & 更新ボタンと距離を取る（中止/削除を縦並び） */
.club-event-cancel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

/* 特別ピルボタン（黒 × 赤） */
.btn-cancel-special {
  position: relative;

  padding: 10px 26px;
  border-radius: 999px;

  background: #111;              /* 黒地 */
  color: #ff4d4d;                /* 赤文字 */
  border: 2px solid #ff4d4d;     /* 赤枠 */

  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;

  cursor: pointer;
  transition: all 0.18s ease;

  /* ★既存の緑レイヤー・影を完全無効化 */
  box-shadow: none !important;
}

/* 疑似要素で入ってくる影・グラデーションを殺す */
.btn-cancel-special::before,
.btn-cancel-special::after {
  content: none !important;
}

/* hover：少しだけ赤を強調 */
.btn-cancel-special:hover {
  background: #1a1a1a;
  color: #ff6b6b;
  border-color: #ff6b6b;

  /* 黒に自然な赤影 */
  box-shadow: 0 6px 16px rgba(255, 77, 77, 0.25);
}

/* active（押下時） */
.btn-cancel-special:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(255, 77, 77, 0.18);
}

/* フォーカスリング（アクセシビリティ） */
.btn-cancel-special:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 77, 77, 0.35),
    0 6px 16px rgba(255, 77, 77, 0.25);
}

/* =========================================================
   イベント削除ボタン（白×赤）
   ・btn-cancel-special と同サイズ
   ・中止中イベントのみ表示
   ========================================================= */
.btn-delete-special {
  position: relative;

  padding: 10px 26px;
  border-radius: 999px;

  background: #ffffff;
  color: #dc2626;
  border: 2px solid #dc2626;

  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;

  cursor: pointer;
  transition: all 0.18s ease;

  box-shadow: none !important;
}
.btn-delete-special::before,
.btn-delete-special::after {
  content: none !important;
}
.btn-delete-special:hover {
  background: #fff5f5;
  color: #dc2626;          /* admin の a:hover で上書きされても固定 */
  border-color: #dc2626;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.18);
}
.btn-delete-special:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.18);
}
.btn-delete-special:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(220, 38, 38, 0.30),
    0 6px 16px rgba(220, 38, 38, 0.18);
}

/* =========================================================
   更新ボタン（disabled時の視覚調整）
   ※ event.js 側で pill-disabled を付ける前提
   ========================================================= */

#club-event-submit-btn.pill-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none !important;
}

#club-event-submit-btn.pill-disabled::before,
#club-event-submit-btn.pill-disabled::after {
  content: none !important;
}

/* =========================================
   Substitute modal select (gray / borderless)
   ========================================= */
.modal-select-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;      /* 好みで */
}

.modal-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.4;

  background: #f3f4f6;   /* グレー背景 */
  border: none;          /* 枠なし */
  border-radius: 10px;

  color: #111;
  outline: none;
  box-shadow: none;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
}

/* focus時もイベント作成モーダル寄せ */
.modal-select:focus {
  background: #eef0f3;
}

/* ▼ 擬似矢印 */
.modal-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #666;
}

#substitute-modal .modal-select-wrap {
  width: 80%;
  margin: 0 auto;   /* 中央寄せ */
}

/* flag-add-modal の「入力形式」だけ、フラグ名inputと完全に同じ幅・見た目にする */
#flag-add-modal .event-title-input,
#flag-add-modal #flag-add-input-mode.flag-input-mode-select{
  width: 180px;            /* ★ここを完全固定にする（見た目ズレ防止） */
  max-width: none;         /* ★max-width運用をやめる */
  box-sizing: border-box;

  padding: 10px 12px;      /* ★ input と統一 */
  border: none;
  border-radius: 10px;
  outline: none;

  background: #f3f6ff;     /* ★ input と統一 */
  font-size: 0.95rem;
  font-weight: 600;

  display: block;          /* ★ selectの微妙な縮み対策 */
}

/* focus も input に寄せる */
#flag-add-modal .event-title-input:focus,
#flag-add-modal #flag-add-input-mode.flag-input-mode-select:focus{
  background: #eaf0ff;
}

/* select 固有（見た目安定） */
#flag-add-modal #flag-add-input-mode.flag-input-mode-select{
  height: auto;            /* 念のため */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* =========================================
   Attendance / Flag modal – 二重枠の完全排除（最終勝ち）
   フラグ用モーダルも出欠モーダルと同じ見た目に揃える
   ========================================= */
#attendance-modal .attendance-choice,
#club-flag-toggle-modal .attendance-choice,
#event-flag-toggle-modal .attendance-choice{
  border: 1px solid #e5e7eb;   /* 外枠は残す */
}

#attendance-modal .attendance-choice .attendance-icon,
#club-flag-toggle-modal .attendance-choice .attendance-icon,
#event-flag-toggle-modal .attendance-choice .attendance-icon{
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* =========================================
   club-event-modal: primary buttons block
   ========================================= */

/* ボタン2つを同じ幅で縦並びにする */
#club-event-modal .club-event-primary-buttons{
  width: 100%;
  max-width: 180px;     /* ← input(=event-title-input)と同じ基準 */
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

/* 2つとも完全に同じ外寸にする（border分のズレを根絶） */
#club-event-modal .club-event-primary-buttons .btn{
  width: 100%;
  box-sizing: border-box;
}

/* 主ボタン側にも透明borderを与えて、副ボタン(2px)と外寸を一致させる */
#club-event-modal .club-event-primary-buttons .btn.btn-primary:not(.btn-display-settings){
  border: 2px solid transparent;
}

/* 表示設定：副ボタン（白地＋緑枠） */
#club-event-modal .btn-display-settings{
  background: #fff !important;
  color: #16a34a !important;

  border: 2px solid #16a34a !important;
  box-shadow: none !important;
}
#club-event-modal .btn-display-settings:hover{
  background: rgba(22,163,74,0.08) !important;
}

/* （任意）編集モーダルの縦間隔を少し詰める */
#club-event-modal .modal-form .field-group{
  margin-bottom: 18px;
}
/* 中止/復活：幅は揃えたまま、少し下に落として「別グループ感」を作る */
#club-event-modal .club-event-cancel-wrap{
  width: 100%;
  max-width: 196px;
  margin: 26px auto 0;          /* ← ここを少し増やす（22〜30で好み） */
  border-top: none;
  border-bottom: none;
  padding-top: 0;
  padding-bottom: 0;


  display: flex;
  justify-content: center;
}

/* 中止ボタンが「表示されているときだけ」区切り線を出す */
#club-event-modal
  .club-event-cancel-wrap:has(#club-event-cancel-toggle:not([style*="display:none"])){
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* ============================
   Cancel / Restore button (square danger)
   ============================ */

#club-event-modal #club-event-cancel-toggle{
  width: 100%;
  box-sizing: border-box;

  /* 形状：ピルをやめる */
  border-radius: 0px;          /* ← 四角寄り（6〜10で調整可） */

  /* 色：黒地＋赤文字 */
  background: #111;
  color: #ff4d4d;

  /* 枠は完全撤去 */
  border: none;
  box-shadow: none !important;

  /* サイズ感：主ボタンと高さを揃える */
  padding: 10px 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;

  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

/* hover：赤を少しだけ強める */
#club-event-modal #club-event-cancel-toggle:hover{
  background: #1a1a1a;
  color: #ff6b6b;
  box-shadow: 0 8px 18px rgba(255,77,77,0.18);
}

/* active：軽く沈む */
#club-event-modal #club-event-cancel-toggle:active{
  transform: translateY(1px);
}

/* focus-visible：アクセシビリティ */
#club-event-modal #club-event-cancel-toggle:focus-visible{
  outline: none;
}

/* ============================
   イベント削除ボタン：中止取り消しと同じ形状（四角・全幅）に揃える
   ・色：白背景 / 赤枠 / 赤文字（btn-delete-special を維持）
   ・枠は表示するため border-radius は 0、枠は維持
   ============================ */
#club-event-modal #club-event-delete-btn{
  width: 100%;
  box-sizing: border-box;

  /* 形状：中止取り消しボタンと統一 */
  border-radius: 0px;
  padding: 10px 0;

  background: #ffffff;
  color: #dc2626;
  border: 2px solid #dc2626;
  box-shadow: none !important;

  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;

  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
#club-event-modal #club-event-delete-btn:hover{
  background: #fff5f5;
  color: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 8px 18px rgba(220,38,38,0.18);
}
#club-event-modal #club-event-delete-btn:active{
  transform: translateY(1px);
}
#club-event-modal #club-event-delete-btn:focus-visible{
  outline: none;
}

/* =========================================
   Display Settings Modal - FIX (button toggle version)
   ========================================= */

/* このモーダルだけ field-group の中央寄せを無効化 */
#display-settings-modal .modal-form .field-group{
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}

/* リスト全体：中央に置く */
#display-settings-modal .ds-list{
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

/* 1行：チェックボタン + ラベル */
#display-settings-modal .ds-row{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;

  padding: 8px 0;
}

/* ラベルが縦にならないように強制 */
#display-settings-modal .ds-label{
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-orientation: mixed;

  font-size: 0.98rem;
  font-weight: 700;
  padding-left: 0;          /* ← 余計なズレを消す */
}

/* ★重要：display-settings-modal 内だけ check-btn をアイコンサイズに固定 */
#display-settings-modal .check-btn.ds-toggle{
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;

  padding: 0 !important;      /* ← padding-left:30px を殺す */
  box-sizing: border-box;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* check-icon の見え方が崩れるなら（保険） */
#display-settings-modal .check-btn.ds-toggle .check-icon{
  line-height: 1;
}

/* 行ごと押せる方が自然なら：ds-rowをクリックでトグルさせる（JS側で対応） */
#display-settings-modal .ds-row{
  cursor: pointer;
}

/* 表示設定モーダルは club-event-modal より必ず上に出す */
#display-settings-modal.modal-backdrop{
  z-index: 3500; /* ui-message(3000)より上でもOK。好みで 3200〜4000 */
}

/* ============================================================
   設定ページ「デフォルト表示設定」フォーム（モーダル外でも ds-list を流用）
   - 表示設定モーダルと意匠を統一（フォント・アイコン）
   ============================================================ */
#club-display-settings-form .ds-list{
  width: 100%;
  max-width: 260px;
}
#club-display-settings-form .ds-row{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 0;
  cursor: pointer;
}
#club-display-settings-form .ds-label{
  white-space: nowrap;
  font-size: 0.98rem;
  font-weight: 700;
}
#club-display-settings-form .check-btn.ds-toggle{
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#club-display-settings-form .check-btn.ds-toggle .check-icon{
  line-height: 1;
}

/* ============================================================
   戦績ランキングのルール（設定ページ）
   ============================================================ */
#club-ranking-settings-form{
  max-width: 420px;
  margin: 0 0 12px;
}
#club-ranking-settings-form .rk-presets{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
#club-ranking-settings-form .rk-preset{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
#club-ranking-settings-form .rk-preset input{
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex: 0 0 auto;
}
#club-ranking-settings-form .rk-preset-text{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#club-ranking-settings-form .rk-preset-name{
  font-weight: 700;
  font-size: 0.98rem;
}
#club-ranking-settings-form .rk-preset-desc{
  font-size: 0.82rem;
  color: #666;
  line-height: 1.4;
}
#club-ranking-settings-form .rk-row{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
#club-ranking-settings-form .rk-label-wrap{
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 5px;
}
#club-ranking-settings-form .check-btn.rk-toggle{
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
#club-ranking-settings-form .check-btn.rk-toggle .check-icon{
  line-height: 1;
}
#club-ranking-settings-form .rk-label{
  font-size: 0.95rem;
}
#club-ranking-settings-form .rk-field{
  margin-bottom: 14px;
}
#club-ranking-settings-form .rk-field-label{
  display: block;
  font-size: 0.9rem;
  color: #444;
  font-weight: 700;
  margin-bottom: 6px;
}
#club-ranking-settings-form .rk-field-inline{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#club-ranking-settings-form .rk-field-inline .rk-field-label{
  margin-bottom: 0;
}
#club-ranking-settings-form .rk-points-inputs{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
#club-ranking-settings-form .rk-points-inputs label{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}
#club-ranking-settings-form input[type="number"]{
  width: 64px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}
#club-ranking-settings-form .rk-hint{
  font-size: 0.8rem;
  color: #888;
}
/* そのプリセットで使わない項目（グレーアウト＝編集不可） */
#club-ranking-settings-form .rk-disabled{
  opacity: 0.5;
}
#club-ranking-settings-form .rk-disabled .rk-field-label{
  color: #999;
}
#club-ranking-settings-form input:disabled{
  background: #f0f0f0;
  cursor: not-allowed;
}

.event-modal .event-flag-name-input {
  width: 100%;
  max-width: 180px;
  padding: 10px 12px;

  border: none;
  border-radius: 10px;
  outline: none;

  background: #f3f6ff;
  font-size: 0.95rem;
  font-weight: 600;
}

.event-modal .event-flag-name-input::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

.event-modal .event-flag-name-input:focus {
  background: #eaf0ff;
}

/* =========================================================
   表示設定：固有フラグ「編集」ピル（白地＋緑枠＋緑文字）
   ※ club-event-modal の btn-display-settings と同系色
   ========================================================= */

/* 固有フラグ行を「左：チェック / 右：編集」にする */
#display-settings-modal .ds-item.ds-item-inline{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* スリムなピル */
#display-settings-modal .pill-edit-event-flags{
  background: #fff !important;
  color: #16a34a !important;

  border: 2px solid #16a34a !important;
  box-shadow: none !important;

  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 999px;
  min-height: 24px;
  white-space: nowrap;
  cursor: pointer;
}

#display-settings-modal .pill-edit-event-flags:hover{
  background: rgba(22,163,74,0.08) !important;
}

#display-settings-modal .pill-edit-event-flags:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}
