﻿/* ================================================================
   My Success — styles.css
   白基調 × ブルーアクセント × Lucide Icons
================================================================ */

/* ── CSS Variables ── */
:root {
  --white:    #ffffff;
  --bg:       #f7f8fa;
  --bg2:      #f0f2f5;
  --border:   #e8eaed;
  --text:     #111318;
  --text2:    #555b66;
  --text3:    #9aa0ad;
  --accent:   #1a56db;
  --accent2:  #1344b8;
  --accent-bg:#eef2ff;
  --red:      #e03030;
  --red-bg:   #fef2f2;
  --green:    #16a34a;
  --green-bg: #f0fdf4;
  --gold:     #d97706;
  --gold-bg:  #fffbeb;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow:    0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.10);

  --header-h:  56px;
  --nav-h:     64px;
  --safe-b:    env(safe-area-inset-bottom);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ── App Shell ── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.app-header__inner {
  display: flex; align-items: center;
  height: 100%; padding: 0 16px;
  position: relative;
}
.app-header__avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  transition: border-color .15s;
}
.app-header__avatar-btn:hover { border-color: var(--accent); }
.app-header__avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.app-header__avatar-text {
  font-size: .85rem; font-weight: 900; color: var(--accent);
}
.app-header__logo-wrap {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center;
}
.app-header__logo {
  height: 56px; width: auto; object-fit: contain;
}
.app-header {
  height: 64px;
}
.app-header__inner {
  height: 64px;
}
.app-header__actions { margin-left: auto; }
.app-header__create-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); border: none; color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(26,86,219,.35);
}
.app-header__create-btn:hover { background: var(--accent2); transform: scale(1.05); }
.app-header__create-btn svg { width: 18px; height: 18px; stroke: white; }
.app-header__back-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(26,86,219,.25);
  background: var(--accent-bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-right: 6px;
  color: var(--accent);
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.app-header__back-btn:hover { border-color: var(--accent); background: #e0e7ff; }

/* ── Main ── */
.app-main { flex: 1; overflow-x: clip; }
.page-root { min-height: calc(100vh - var(--header-h) - var(--nav-h)); }

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: var(--safe-b);
  height: calc(var(--nav-h) + var(--safe-b));
}
.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 0; border: none; background: none;
  color: var(--text3); font-size: .58rem; font-weight: 700;
  letter-spacing: .04em; gap: 3px;
  transition: color .15s;
}
.bottom-nav__item i { width: 22px; height: 22px; }
.bottom-nav__item.active { color: var(--accent); }
.bottom-nav__item-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); margin-top: 1px;
}
.page-bottom { height: calc(var(--nav-h) + var(--safe-b) + 16px); }

/* ── Loading ── */
.page-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 200px; gap: 12px;
}
.page-loading__spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
.page-loading__text { font-size: .78rem; color: var(--text3); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Phase1: 通常遷移の控えめインジケータ（前画面を隠さない）＋ 単一 opacity フェード
   ── D案 Ambient Hold ──
   「ローディングUI」ではなく、画面が静かに次の状態へ移る演出。
   router が生成する #route-loading（.route-loading-indicator > __spinner + テキスト）を
   CSSのみで再構成する（router.js のロジック／マークアップは未変更）。
   ・.route-loading-indicator … 全画面フィットの透明コンテナ。::before=薄い白ベール、::after=ライン
   ・__spinner … 小さなネイビーのドット（静かに呼吸）
   ・テキスト span（「読み込み中」）… 視覚的には隠し、支援技術向けには残す */
.route-loading-indicator {
  position: fixed;
  inset: 0;
  z-index: 480;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding-bottom: min(11vh, 84px); /* 中央よりわずかに上に配置（重心回避） */
  box-sizing: border-box;
  background: none; border: 0; box-shadow: none;
  pointer-events: none; /* 前画面への操作を遮らない */
  animation: routeFadeIn .32s ease-out both; /* ベール＋マークを自然にフェードイン */
}
/* ごく薄い白ベール（前画面は十分読める）。backdrop-filter は対応環境のみ効き、
   未対応環境では白ベールのみで自然にフォールバックする。 */
.route-loading-indicator::before {
  content: "";
  position: fixed; inset: 0;
  background: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: saturate(.96) blur(.3px);
  backdrop-filter: saturate(.96) blur(.3px);
}
/* 小さなネイビーのドット（呼吸のみ・移動なし・派手さなし） */
.route-loading-indicator__spinner {
  width: 7px; height: 7px; border-radius: 50%;
  background: #12224a; border: 0; flex-shrink: 0;
  animation: routeDotBreathe 1.9s ease-in-out infinite;
}
/* 幅固定の短いライン。進捗率は表さず、淡い光だけが静かに流れる（ループ）。 */
.route-loading-indicator::after {
  content: "";
  width: 42px; height: 2px; border-radius: 2px; flex-shrink: 0;
  background:
    linear-gradient(90deg,
      rgba(13, 27, 56, .12) 0%,
      rgba(13, 27, 56, .12) 34%,
      #12224a 50%,
      rgba(13, 27, 56, .12) 66%,
      rgba(13, 27, 56, .12) 100%);
  background-size: 220% 100%;
  animation: routeLineFlow 1.9s cubic-bezier(.4, 0, .2, 1) infinite;
}
/* 「読み込み中」テキストは視覚的に隠す（支援技術には残す） */
.route-loading-indicator > span:not(.route-loading-indicator__spinner) {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@keyframes routeDotBreathe {
  0%, 100% { opacity: .35; transform: scale(.9); }
  50%      { opacity: 1;   transform: scale(1); }
}
@keyframes routeLineFlow {
  0%   { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}
@keyframes routeFadeIn { from { opacity: 0; } to { opacity: 1; } }
.route-fade-in { animation: routeFadeIn .16s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .route-fade-in { animation: none; }
  /* 動きは止めつつ静的表示でも成立させる（ベール表示・ドット定常・ライン淡色一定） */
  .route-loading-indicator { animation: none; }
  .route-loading-indicator__spinner { animation: none; opacity: 1; transform: none; }
  .route-loading-indicator::after { animation: none; background: rgba(13, 27, 56, .2); }
}

/* ── Fatal Error ── */
.fatal-error {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 60vh; gap: 10px; padding: 24px;
  text-align: center;
}
.fatal-error__title { font-weight: 900; font-size: 1.1rem; }
.fatal-error__text  { font-size: .82rem; color: var(--text2); }

/* ── Toast ── */
.toast-root {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column;
  align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--text); color: white;
  font-size: .8rem; font-weight: 700;
  padding: 10px 18px; border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease both;
  white-space: nowrap;
}
.toast--success  { background: #16a34a; }
.toast--error    { background: #dc2626; }
.toast.toast--out { animation: toastOut .25s ease both; }
@keyframes toastIn  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(8px); } }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes scaleIn {
  from { opacity:0; transform:scale(.88); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Common Section Layout ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 16px 10px;
}
.section-title {
  font-size: .75rem; font-weight: 900;
  letter-spacing: .12em; color: var(--text);
  text-transform: uppercase;
}
.section-link {
  font-size: .72rem; font-weight: 700; color: var(--accent);
  padding: 4px 10px; border-radius: 20px;
  transition: background .15s;
}
.section-link:hover { background: var(--accent-bg); }

/* ── Card Base ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card--hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card--hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,86,219,.2);
}

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .6rem; font-weight: 700; letter-spacing: .08em;
  padding: 3px 9px; border-radius: 20px;
}
.badge--live     { background: linear-gradient(135deg,#fef2f2 0%,#fee2e2 100%); color: var(--red);    border: 1px solid #fca5a5; }
.badge--live::before { content:'●'; animation: blink 1.2s infinite; }
.badge--done     { background: linear-gradient(135deg,#f0f2f5 0%,#e4e6ea 100%); color: var(--text3);  border: 1px solid #d4d7de; }
.badge--upcoming { background: linear-gradient(135deg,#dbeafe 0%,#c7d7fc 100%); color: var(--accent); border: 1px solid #a5b4fc; }
.badge--cancel   { background: linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%); color: #64748b;      border: 1px solid #cbd5e1; }
.badge--practice { background: linear-gradient(135deg,#dcfce7 0%,#bbf7d0 100%); color: var(--green);  border: 1px solid #86efac; }

/* ── Home Run Type Chip（成績入力：本塁打種別） ── */
.hr-type-chip {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 12px;
  border-radius: 20px; border: 1px dashed var(--border);
  background: var(--bg2); color: var(--text3);
  font-size: .72rem; font-weight: 700; cursor: pointer;
}
.hr-type-chip--set {
  border: 1px solid var(--accent);
  background: rgba(26,86,219,.08);
  color: var(--accent);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: none; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .88rem; cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s;
  padding: 0 20px; height: 46px;
}
.btn:disabled { opacity: .5; pointer-events: none; }
.btn:active   { transform: scale(.97); }

.btn--primary   { background: var(--accent);  color: white; }
.btn--primary:hover { background: var(--accent2); }
.btn--secondary { background: var(--bg2);     color: var(--text2); border: 1px solid var(--border); }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn--danger    { background: var(--red-bg);  color: var(--red); border: 1px solid #fecaca; }
.btn--full      { width: 100%; }
.btn--lg        { height: 52px; font-size: .95rem; border-radius: var(--radius-sm); }
.btn--sm        { height: 34px; font-size: .75rem; padding: 0 12px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: none; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg2); color: var(--text); }
.icon-btn i { width: 18px; height: 18px; }

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: .75rem; font-weight: 700; color: var(--text2);
  letter-spacing: .04em;
}
.form-input, .form-select, .form-textarea {
  width: 100%; height: 46px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 14px;
  font-size: 1rem; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.form-textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 90px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa0ad' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: .7rem; color: var(--text3); }
.form-error { font-size: .7rem; color: var(--red); }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── Empty State ── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; gap: 8px;
}
.empty-state__icon { display: flex; justify-content: center; align-items: center; font-size: 2.5rem; margin-bottom: 4px; opacity: .4; }
.empty-state__title { font-weight: 900; font-size: .95rem; }
.empty-state__text  { font-size: .8rem; color: var(--text3); line-height: 1.6; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease both;
}
.modal {
  background: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto; padding: 20px 16px 32px;
  animation: slideUp .25s ease both;
}
.modal__handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 0 auto 20px;
}
.modal__title { font-weight: 900; font-size: 1.05rem; margin-bottom: 16px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ── Confirm Dialog ── */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease both;
}
.dialog {
  background: var(--white); border-radius: var(--radius);
  padding: 24px 20px; width: 100%; max-width: 300px;
  text-align: center; box-shadow: var(--shadow-lg);
  animation: scaleIn .2s ease both;
}
.dialog__title { font-weight: 900; font-size: 1rem; margin-bottom: 8px; }
.dialog__text  { font-size: .8rem; color: var(--text2); line-height: 1.6; margin-bottom: 20px; }
.dialog__btns  { display: flex; gap: 10px; }

/* ── Profile Avatar ── */
.avatar {
  border-radius: 50%; object-fit: cover;
  background: var(--bg2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1.5px solid var(--border);
}
.avatar--sm  { width: 32px; height: 32px; font-size: .8rem; }
.avatar--md  { width: 40px; height: 40px; font-size: .95rem; }
.avatar--lg  { width: 56px; height: 56px; font-size: 1.2rem; }
.avatar--xl  { width: 80px; height: 80px; font-size: 1.8rem; }
.avatar img  { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar__text { font-weight: 900; color: var(--accent); }

/* ── Profile photo edit button ── */
.profile-photo-btn {
  position: absolute; bottom: 2px; right: 2px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 12px rgba(0,0,0,.18), 0 0 0 2px rgba(255,255,255,.88);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #374151;
  transition: transform .13s cubic-bezier(.32,1,.4,1), box-shadow .13s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.profile-photo-btn:hover  { background: #f5f8ff; }
.profile-photo-btn:active { transform: scale(.86); box-shadow: 0 1px 5px rgba(0,0,0,.13), 0 0 0 2px rgba(255,255,255,.88); }

/* ── Stat Chip ── */
.stat-chip {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 8px;
}
.stat-chip__val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem; line-height: 1; color: var(--text);
}
.stat-chip__val--accent { color: var(--accent); }
.stat-chip__label { font-size: .6rem; color: var(--text3); margin-top: 2px; letter-spacing: .06em; }

/* ── Tabs ── */
.tabs {
  background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; overflow-x: auto; scrollbar-width: none;
  padding: 0 16px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 12px 14px;
  display: flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 700;
  color: var(--text3); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.tab i { width: 15px; height: 15px; }
.tab.active        { color: var(--accent); border-bottom-color: var(--accent); }
.tab.tab--neg      { color: #f87171; }
.tab.tab--neg.active { color: #dc2626; border-bottom-color: #dc2626; }

/* ── Stepper ── */
.stepper {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.stepper__btn {
  width: 44px; height: 44px; border: none; background: var(--white);
  color: var(--text2); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.stepper__btn:hover { background: var(--bg2); }
.stepper__val {
  min-width: 44px; text-align: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem;
  color: var(--text); line-height: 44px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0 4px;
}

/* ── スコア入力パネル用ステッパー ── */
.si-stepper-btn {
  width: 54px; height: 54px; border-radius: 50%; border: none;
  cursor: pointer; font-size: 1.6rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s, box-shadow .1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}
.si-stepper-btn:active { transform: scale(.88); }
.si-stepper-btn--minus { background: var(--bg2); color: var(--text2); }
.si-stepper-btn--minus:active { background: var(--border); }
.si-stepper-btn--plus  { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.35); }
.si-stepper-btn--plus:active  { box-shadow: none; }

/* ================================================================
   SPLASH SCREEN
================================================================ */
.splash {
  position: fixed; inset: 0;
  background: linear-gradient(175deg, #ffffff 0%, #f5f8ff 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}
.splash__inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 32px;
}
/* D案 Quiet Reveal：静かなフェードイン＋微スケール(99%→100%)。派手なズーム/移動なし。 */
.splash__logo-wrap {
  opacity: 0; transform: scale(.99);
  transition: opacity .34s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.splash__logo-wrap--visible {
  opacity: 1; transform: scale(1);
}
.splash__logo {
  width: min(260px, 70vw);
  height: auto;
  display: block;
}
/* 控えめブランドアクセント：短い1本の線がゆっくり呼吸する（幅は伸ばさない＝進捗バーに見せない）。 */
.splash__accent {
  width: 44px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #1a56db, #12224a);
  opacity: 0; transition: opacity .5s ease .18s;
}
.splash__accent--visible {
  opacity: .55;
  animation: splashAccentBreathe 2.6s ease-in-out .6s infinite;
}
@keyframes splashAccentBreathe {
  0%, 100% { opacity: .35; }
  50%      { opacity: .70; }
}
@media (prefers-reduced-motion: reduce) {
  .splash__logo-wrap { transition: opacity .2s ease; transform: none; }
  .splash__logo-wrap--visible { transform: none; }
  .splash__accent--visible { animation: none; opacity: .5; }
}
.splash__dots {
  display: flex; gap: 7px; align-items: center;
  opacity: 0; transition: opacity .4s ease;
}
.splash__dots--visible { opacity: 1; }
.splash__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #c4d4f8;
  animation: splashDotPulse 1.4s ease-in-out infinite;
}
.splash__dot:nth-child(2) { animation-delay: .22s; }
.splash__dot:nth-child(3) { animation-delay: .44s; }
@keyframes splashDotPulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.4); }
}
.splash__from {
  font-size: .72rem; font-weight: 700; letter-spacing: .2em;
  color: var(--text3); text-transform: lowercase;
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.splash__from--visible {
  opacity: 1; transform: translateY(0);
}

/* ================================================================
   LOGIN SCREEN
================================================================ */
.login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(170deg, #f7faff 0%, #ffffff 65%);
  padding: 24px; overflow: hidden; position: relative;
}
.login::before {
  content: ''; position: absolute; top: -100px; right: -60px;
  width: 340px; height: 340px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(99,133,255,.08) 0%, transparent 70%);
}
.login__inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  width: 100%; max-width: 320px;
  opacity: 0; transform: translateY(18px);
  transition: opacity .48s ease, transform .5s cubic-bezier(.22,1,.36,1);
  position: relative; z-index: 1;
}
.login__inner--visible {
  opacity: 1; transform: translateY(0);
}
.login__logo-wrap {
  width: 90vw;
  max-width: 480px;
  margin-bottom: 48px;
}
.login__logo {
  width: 100%;
  height: auto;
  display: block;
}
.login__desc {
  font-size: .8rem; color: var(--text3); letter-spacing: .04em;
  text-align: center; line-height: 1.6; margin-bottom: 40px;
}
.login__actions { width: 100%; margin-bottom: 32px; }
.login__google-btn {
  width: 100%; height: 54px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .9rem; font-weight: 700;
  color: var(--text); transition: border-color .18s, box-shadow .18s, transform .18s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 2px 10px rgba(0,0,0,.04);
}
.login__google-btn:hover {
  border-color: rgba(26,86,219,.28);
  box-shadow: 0 2px 16px rgba(26,86,219,.13);
  transform: translateY(-1px);
}
.login__google-btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.login__google-btn--loading { opacity: .6; pointer-events: none; }
.login__google-icon { width: 20px; height: 20px; }
.login__note { font-size: .68rem; color: var(--text3); letter-spacing: .14em; }
.login__loading {
  position: fixed; inset: 0; z-index: 50;
  background: linear-gradient(175deg, #f7faff 0%, #ffffff 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
}
.login__loading-logo { width: 180px; height: auto; display: block; opacity: .5; }
.login__loading-dots {
  display: flex; gap: 7px; align-items: center;
}
.login__loading-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: ldDot 1.2s ease-in-out infinite;
}
.login__loading-dot:nth-child(2) { animation-delay: .18s; }
.login__loading-dot:nth-child(3) { animation-delay: .36s; }
@keyframes ldDot {
  0%, 100% { opacity: .2;  transform: scale(1); }
  50%       { opacity: .85; transform: scale(1.35); }
}
.login__loading-text {
  font-size: .78rem; color: var(--text3);
  font-weight: 600; letter-spacing: .06em;
  animation: fadeIn .6s ease .4s both;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login: Email UI ──────────────────────────────── */
#login-main-view,
#login-email-view,
#login-register-view,
#login-reset-view { width: 100%; }

.login__social-group { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.login__apple-btn {
  width: 100%; height: 54px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #000; color: #fff;
  border: none; border-radius: var(--radius);
  font-size: .9rem; font-weight: 700; cursor: pointer;
}
.login__apple-btn:active { opacity: .8; }
.login__apple-icon { width: 18px; height: 18px; }

.login__divider {
  display: flex; align-items: center; gap: 12px;
  width: 100%; color: var(--text3); font-size: .72rem;
  margin: 6px 0;
}
.login__divider::before,
.login__divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.login__email-btn {
  width: 100%; height: 54px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--white); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .9rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.login__email-btn:active { opacity: .8; }
.login__email-icon { width: 18px; height: 18px; color: var(--text2); }

#login-main-view .login__note {
  text-align: center; margin-top: 14px; line-height: 1.6;
}

.login__view-title {
  font-size: 1rem; font-weight: 900; color: var(--text);
  margin-bottom: 20px;
}

.login__reset-desc {
  font-size: .82rem; color: var(--text2); line-height: 1.7;
  margin-bottom: 16px;
}

.login__form { display: flex; flex-direction: column; gap: 14px; width: 100%; }

.login__field { display: flex; flex-direction: column; gap: 6px; }

.login__label { font-size: .82rem; font-weight: 700; color: var(--text2); }

.login__required { color: var(--red); margin-left: 2px; }

.login__input {
  width: 100%; height: 46px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 12px; font-size: 16px; /* iOS ズームイン防止 */
  background: var(--white); color: var(--text);
  -webkit-appearance: none;
}
.login__input:focus { outline: none; border-color: var(--accent); }

.login__char-count { font-size: .72rem; color: var(--text3); text-align: right; }

.login__error {
  background: var(--red-bg); border: 1px solid #fca5a5;
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: .8rem; color: var(--red); line-height: 1.7;
  white-space: pre-line;
}

.login__submit-btn {
  width: 100%; height: 50px;
  border: none; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  font-size: .95rem; font-weight: 800; cursor: pointer;
  margin-top: 2px;
}
.login__submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.login__submit-btn:active:not(:disabled) { opacity: .85; }

.login__sub-actions {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}

.login__text-btn {
  background: none; border: none;
  color: var(--accent); font-size: .82rem; cursor: pointer; padding: 6px 0;
}

.login__back-btn {
  background: none; border: none;
  color: var(--text3); font-size: .82rem; cursor: pointer;
  padding: 6px 0; align-self: flex-start; margin-top: 4px;
}

/* ================================================================
   ONBOARDING
================================================================ */
.ob-wrap {
  min-height: 100vh;
  background: linear-gradient(160deg, #dbeafe 0%, #eff6ff 40%, #ffffff 80%);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  /* iPhone Safari 下部バー考慮 */
  padding-bottom: max(32px, calc(env(safe-area-inset-bottom, 0px) + 20px));
}
.ob-inner {
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  animation: fadeUp .4s ease both;
}
.ob-logo   { font-family: 'Bebas Neue', sans-serif; font-size: 2.8rem; letter-spacing: .18em; color: var(--accent); margin-bottom: 12px; }
.ob-title  { font-size: 1.35rem; font-weight: 900; text-align: center; line-height: 1.45; margin-bottom: 8px; }
.ob-sub    { font-size: .78rem; color: var(--text3); text-align: center; margin-bottom: 28px; }

.ob-cards  { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.ob-card {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; border-radius: 16px;
  text-align: left; cursor: pointer; transition: opacity .15s, transform .15s;
  border: 1.5px solid transparent;
}
.ob-card:active { opacity: .8; transform: scale(.98); }
.ob-card--primary   { background: linear-gradient(135deg, #1a56db 0%, #3b82f6 100%); color: #fff; box-shadow: 0 4px 20px rgba(26,86,219,.28); }
.ob-card--secondary { background: var(--white); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-sm); }
.ob-card__icon  { font-size: 1.6rem; flex-shrink: 0; }
.ob-card__body  { flex: 1; min-width: 0; }
.ob-card__title { font-size: .95rem; font-weight: 900; margin-bottom: 2px; }
.ob-card__desc  { font-size: .72rem; opacity: .7; line-height: 1.4; }
.ob-card--secondary .ob-card__desc { color: var(--text3); opacity: 1; }
.ob-card__arr   { font-size: .9rem; opacity: .55; flex-shrink: 0; }

.ob-form-title { font-size: 1rem; font-weight: 900; margin-bottom: 14px; align-self: flex-start; }
.ob-input      { width: 100%; margin-bottom: 14px; }
.ob-submit-btn { margin-bottom: 8px; }
.ob-back-link  { background: none; border: none; color: var(--text3); font-size: .82rem; cursor: pointer; padding: 6px 0; align-self: flex-start; }

/* ロール選択：見出し・戻るリンクを中央寄せ */
#ob-role-select .ob-form-title {
  align-self: stretch;
  text-align: center;
  margin-bottom: 6px;
}
#ob-role-select .ob-back-link {
  align-self: center;
}

.ob-result-icon  { font-size: 2.8rem; margin-bottom: 10px; }
.ob-result-title { font-size: 1.15rem; font-weight: 900; margin-bottom: 6px; }
.ob-result-sub   { font-size: .78rem; color: var(--text3); text-align: center; margin-bottom: 20px; line-height: 1.5; }
.ob-code-box {
  width: 100%; background: var(--white);
  border: 2px dashed var(--accent); border-radius: 14px;
  padding: 16px; text-align: center; margin-bottom: 16px;
}
.ob-code-label { font-size: .65rem; font-weight: 700; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.ob-code-value { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; letter-spacing: .22em; color: var(--text); }

#ob-create-form, #ob-join-form, #ob-placeholder-select, #ob-role-select, #ob-created-result, #ob-register-complete {
  flex-direction: column; align-items: center; width: 100%;
}
#ob-register-complete { gap: 12px; }

/* 候補選択：見出し中央寄せ・戻るリンク中央 */
#ob-placeholder-select .ob-form-title {
  align-self: stretch;
  text-align: center;
  margin-bottom: 6px;
}
#ob-placeholder-select .ob-back-link {
  align-self: center;
}

/* ================================================================
   HOME
================================================================ */
.home-hero {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 20px 16px 18px;
  animation: fadeUp .35s ease both;
}
.home-hero__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.home-hero__label {
  font-size: .65rem; font-weight: 700; letter-spacing: .16em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 3px;
}
.home-hero__title { font-size: 1.4rem; font-weight: 900; line-height: 1.25; }
.home-hero__badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--accent-bg); border: 1px solid #c7d2fe;
  border-radius: 20px; padding: 5px 12px;
  font-size: .7rem; font-weight: 700; color: var(--accent);
  white-space: nowrap;
}
.home-hero__stats {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.home-hero__stat {
  background: var(--white); padding: 12px 6px; text-align: center;
}
.home-hero__stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem; color: var(--text); line-height: 1;
}
.home-hero__stat-val--accent { color: var(--accent); }
.home-hero__stat-label { font-size: .6rem; color: var(--text3); margin-top: 3px; }

/* Quick Actions */
.quick-actions {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 10px; padding: 16px 16px 4px;
  animation: fadeUp .35s .08s ease both; opacity: 0;
  animation-fill-mode: both;
}
.qa-btn {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  box-shadow: var(--shadow);
}
.qa-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(26,86,219,.12);
  transform: translateY(-1px);
}
.qa-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.qa-icon i { width: 18px; height: 18px; }
.qa-icon--blue   { background: var(--accent-bg); color: var(--accent); }
.qa-icon--green  { background: var(--green-bg);  color: var(--green); }
.qa-icon--amber  { background: var(--gold-bg);   color: var(--gold); }
.qa-icon--purple { background: #faf5ff; color: #7c3aed; }
.qa-label { font-size: .62rem; font-weight: 700; color: var(--text2); text-align: center; letter-spacing: .02em; }

/* Event Cards Scroll */
.cards-scroll {
  display: flex; gap: 12px;
  padding: 0 16px 4px;
  overflow-x: auto; scrollbar-width: none;
  animation: fadeUp .35s .15s ease both; opacity: 0;
  animation-fill-mode: both;
}
.cards-scroll::-webkit-scrollbar { display: none; }

/* Event Card */
.event-card {
  flex-shrink: 0; width: 210px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.event-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-lg);
  border-color: rgba(26,86,219,.2);
}
.event-card__top {
  padding: 14px 14px 12px; border-bottom: 1px solid var(--border);
}
.event-card__name { font-weight: 900; font-size: .9rem; margin-bottom: 3px; line-height: 1.3; }
.event-card__date { font-size: .68rem; color: var(--text3); }
.event-card__body { padding: 12px 14px; }
.event-card__score-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.event-card__team { text-align: center; min-width: 60px; }
.event-card__team-name { font-size: .6rem; color: var(--text3); margin-bottom: 2px; }
.event-card__score {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; line-height: 1;
}
.event-card__score--lead { color: var(--accent); }
.event-card__score--empty { color: var(--text3); }
.event-card__sep { font-family: 'Bebas Neue', sans-serif; font-size: 1.2rem; color: var(--border); }
.event-card__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.event-card__meta-tag {
  font-size: .6rem; color: var(--text3);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px;
}

/* ================================================================
   RANKING
================================================================ */
.ranking-list {
  padding: 0 16px; display: flex; flex-direction: column; gap: 8px;
  animation: fadeUp .35s .1s ease both; opacity: 0;
  animation-fill-mode: both;
}
.ranking-row {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.ranking-row:hover { border-color: rgba(26,86,219,.25); transform: translateX(2px); }
.ranking-row__num {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem;
  width: 22px; text-align: center; color: var(--text3); flex-shrink: 0;
}
.ranking-row__num--1 { color: #d97706; }
.ranking-row__num--2 { color: #6b7280; }
.ranking-row__num--3 { color: #b45309; }
.ranking-row__info { flex: 1; min-width: 0; }
.ranking-row__name { font-weight: 700; font-size: .88rem; }
.ranking-row__sub  { font-size: .67rem; color: var(--text3); margin-top: 1px; }
.ranking-row__stat { text-align: right; flex-shrink: 0; }
.ranking-row__stat-val {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem;
  color: var(--accent); line-height: 1;
}
.ranking-row__stat-label { font-size: .6rem; color: var(--text3); }

/* ================================================================
   EVENT DETAIL
================================================================ */
.event-detail-hero {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 20px 16px 18px;
  animation: fadeUp .3s ease both;
}
.event-detail-hero__meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.event-detail-hero__info { font-size: .72rem; color: var(--text3); }
.score-display {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 16px;
}
.score-display__team { text-align: center; flex: 1; }
.score-display__logo {
  width: 44px; height: 44px; object-fit: contain;
  margin: 0 auto 6px; display: block;
}
.score-display__logo-placeholder {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg2); margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.score-display__name { font-size: .72rem; font-weight: 700; color: var(--text2); margin-bottom: 2px; }
.score-display__tag  {
  display: inline-block; font-size: .55rem; font-weight: 700;
  padding: 1px 7px; border-radius: 10px; margin-bottom: 4px; letter-spacing: .06em;
}
.score-display__tag--home { background: var(--accent-bg); color: var(--accent); }
.score-display__tag--away { background: var(--bg2);        color: var(--text3); }
.score-display__num {
  font-family: 'Bebas Neue', sans-serif; font-size: 4rem; line-height: 1;
  color: var(--text); transition: color .3s;
}
.score-display__num--lead { color: var(--accent); }
.score-display__sep {
  padding: 0 12px; padding-top: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.score-display__vs {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem;
  color: var(--border); letter-spacing: .1em;
}
.score-display__diff-badge {
  font-size: .6rem; font-weight: 900; letter-spacing: .06em;
  background: var(--accent-bg); color: var(--accent);
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.inning-dots {
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.inning-dots__label { font-size: .65rem; color: var(--text3); font-weight: 700; margin-right: 4px; }
.i-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.i-dot--done   { background: var(--text3); }
.i-dot--active { background: var(--accent); }

/* Scoreboard Table */
.sb-wrap { padding: 14px 16px 0; overflow-x: auto; animation: fadeUp .3s .07s ease both; opacity:0; animation-fill-mode:both; }
.sb-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  min-width: 460px;
}
.sb-table { width: 100%; border-collapse: collapse; }
.sb-table th, .sb-table td { text-align: center; border-right: 1px solid var(--border); padding: 0; }
.sb-table th:last-child, .sb-table td:last-child { border-right: none; }
.sb-table thead tr { background: var(--bg); border-bottom: 1px solid var(--border); }
.sb-table thead th { font-size: .63rem; font-weight: 700; letter-spacing: .08em; color: var(--text3); padding: 8px 4px; }
.sb-table thead th.sb-team-col { text-align: left; padding-left: 14px; min-width: 90px; }
.sb-table thead th.sb-total-col { background: var(--bg2); color: var(--text2); font-size: .68rem; min-width: 36px; }
.sb-table tbody tr { border-bottom: 1px solid var(--border); }
.sb-table tbody tr:last-child { border-bottom: none; }
.sb-table tbody td { height: 50px; }
.sb-table tbody td.sb-team-col { text-align: left; padding-left: 12px; }
.sb-team-col-inner { display: flex; align-items: center; gap: 8px; }
.sb-team-logo { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.sb-team-name { font-weight: 900; font-size: .85rem; }
.sb-team-name span { display: block; font-size: .6rem; font-weight: 400; color: var(--text3); }
.sb-table tbody td.sb-total-col { background: var(--bg); font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; }
.sb-table tbody td.sb-total-col.lead { color: var(--accent); }
.sb-score-cell {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.2rem;
  cursor: pointer; transition: background .15s; position: relative;
}
.sb-score-cell:hover { background: #f0f4ff; }
.sb-score-cell--active { background: var(--accent-bg); }
.sb-score-cell--active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px; background: var(--accent); border-radius: 1px;
}
.sb-score-cell--empty { color: var(--text3); font-size: .85rem; }

/* Score Input Panel */
.score-input {
  margin: 14px 16px 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  animation: fadeUp .3s .13s ease both; opacity:0; animation-fill-mode:both;
}
.score-input__header {
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
}
.score-input__title { font-size: .78rem; font-weight: 900; }
.score-input__sub   { font-size: .68rem; color: var(--accent); font-weight: 700; }
.score-input__body  { padding: 14px; }
.score-input__row   { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.score-input__label { font-size: .78rem; font-weight: 700; color: var(--text2); flex: 1; }

/* Toggle (先攻後攻) */
.toggle-wrap { display: flex; justify-content: flex-end; padding: 10px 16px 0; }
.toggle-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px;
  font-size: .68rem; font-weight: 700; color: var(--text3);
  transition: all .15s;
}
.toggle-btn i { width: 13px; height: 13px; }
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* Score History */
.score-history { padding: 14px 16px 0; animation: fadeUp .3s .2s ease both; opacity:0; animation-fill-mode:both; }
.score-history__title {
  font-size: .68rem; font-weight: 900; letter-spacing: .1em;
  color: var(--text3); text-transform: uppercase; margin-bottom: 10px;
}
.score-history__list { display: flex; flex-direction: column; gap: 6px; }
.score-history__row {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; display: flex; align-items: center;
  gap: 10px; padding: 10px 12px;
}
.score-history__inning { font-family: 'Bebas Neue', sans-serif; font-size: .95rem; color: var(--text3); width: 30px; flex-shrink: 0; }
.score-history__team   { font-weight: 700; font-size: .8rem; flex: 1; }
.score-history__score  { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: var(--accent); }
.score-history__note   { font-size: .68rem; color: var(--text3); }

/* ================================================================
   RECORD FORM (個人成績入力)
================================================================ */
.record-form { padding: 16px; animation: fadeUp .3s ease both; }
.record-form__atbat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.record-form__atbat-row {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
}
.record-form__atbat-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem;
  color: var(--text3); width: 24px; flex-shrink: 0;
}
.record-form__atbat-select { flex: 1; }

/* MVP Card */
.mvp-card {
  background: linear-gradient(135deg, var(--accent-bg), #e0e7ff);
  border: 1.5px solid #c7d2fe; border-radius: var(--radius);
  padding: 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.mvp-card__crown { font-size: 1.6rem; }
.mvp-card__info  { flex: 1; }
.mvp-card__label { font-size: .65rem; font-weight: 700; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.mvp-card__name  { font-weight: 900; font-size: 1rem; margin-top: 2px; }
.mvp-card__stat  { font-size: .75rem; color: var(--text2); }
.mvp-card__ops   { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; color: var(--accent); line-height: 1; }

/* ================================================================
   MYPAGE
================================================================ */
.mypage-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 24px 16px 20px; text-align: center;
  animation: fadeUp .3s ease both;
}
.mypage-header__avatar { margin: 0 auto 12px; }
.mypage-header__name   { font-weight: 900; font-size: 1.2rem; }
.mypage-header__number { font-size: .75rem; color: var(--text3); margin-top: 4px; }
.mypage-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border);
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.mypage-stat {
  background: var(--white); padding: 12px 8px; text-align: center;
}
.mypage-stat__val {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; color: var(--accent); line-height: 1;
}
.mypage-stat__label { font-size: .6rem; color: var(--text3); margin-top: 3px; }

/* Menu List */
.menu-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; align-items: center;
  gap: 12px; padding: 14px; cursor: pointer;
  box-shadow: var(--shadow); transition: border-color .15s, transform .1s;
}
.menu-item:hover { border-color: rgba(26,86,219,.2); transform: translateX(2px); }
.menu-item__icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.menu-item__icon i { width: 18px; height: 18px; }
.menu-item__label { flex: 1; font-weight: 700; font-size: .88rem; }
.menu-item__arrow { color: var(--text3); }
.menu-item__arrow i { width: 16px; height: 16px; }

/* ================================================================
   COMMENT SHEET
================================================================ */
.comment-list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.comment-item { display: flex; gap: 10px; }
.comment-item__body { flex: 1; }
.comment-item__header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.comment-item__name  { font-weight: 700; font-size: .82rem; }
.comment-item__time  { font-size: .65rem; color: var(--text3); }
.comment-item__text  {
  font-size: .82rem; line-height: 1.6; color: var(--text);
  background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: 8px 12px;
}
.comment-input-row {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: var(--white); position: sticky; bottom: 0;
}
.comment-input-row .form-input { flex: 1; }

/* ================================================================
   PHOTO GRID
================================================================ */
.photo-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 2px; padding: 0 16px 16px;
}
.photo-grid__item {
  aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg2); cursor: pointer;
}
.photo-grid__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .2s;
}
.photo-grid__item:hover img { transform: scale(1.05); }

/* ================================================================
   UTILITIES
================================================================ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.text-center { text-align: center; }
.text-muted  { color: var(--text3); }
.fw-bold     { font-weight: 700; }
.fw-black    { font-weight: 900; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }

/* ── Inline SVG Icons ── */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Text Logo ── */
.app-header__logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: .1em;
  color: var(--text);
  white-space: nowrap;
}

/* ================================================================
   LINEUP MODAL — 打順自動作成（lm- prefix でスコープ限定）
================================================================ */

/* ホーム画面トリガーボタン */
.lm-trigger-btn {
  width: 100%;
  background: linear-gradient(130deg, var(--accent) 0%, #1344c8 100%);
  color: white; border: none; border-radius: var(--radius);
  font-size: .88rem; font-weight: 700; letter-spacing: .04em;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  box-shadow: 0 2px 12px rgba(26,86,219,.30);
  transition: transform .12s, box-shadow .15s;
}
.lm-trigger-btn:active { transform: scale(.98); box-shadow: 0 1px 6px rgba(26,86,219,.18); }

/* モーダル本体 */
.lm-modal { padding: 20px 16px 0; }

/* セクション */
.lm-section { margin-bottom: 20px; }
.lm-section__label {
  font-size: .72rem; font-weight: 900; letter-spacing: .1em;
  color: var(--text2); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}

/* カウントバッジ */
.lm-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--accent); color: white;
  font-size: .62rem; font-weight: 700; border-radius: 10px;
  letter-spacing: 0;
}

/* 打者人数ボタン */
.lm-count-row { display: flex; gap: 8px; }
.lm-count-btn {
  flex: 1; height: 38px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .8rem; font-weight: 700;
  color: var(--text2); transition: border-color .15s, background .15s, color .15s;
}
.lm-count-btn--on {
  background: var(--accent-bg); border-color: var(--accent); color: var(--accent);
}

/* メンバーリスト */
.lm-member-list {
  max-height: 224px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white);
}
.lm-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: background .12s;
}
.lm-member-row:last-child { border-bottom: none; }
.lm-member-row:hover { background: var(--bg); }
.lm-member-row--on { background: var(--accent-bg); }
.lm-member-row--on:hover { background: #dce5ff; }

/* アバター */
.lm-avt {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg2); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900; color: var(--accent);
}
.lm-avt--helper { background: #f5f3ff; border-color: #ddd6fe; color: #7c3aed; }

/* チェックボックス */
.lm-member-name { flex: 1; font-size: .85rem; font-weight: 700; }
.lm-chk {
  width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  border: 2px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.lm-chk--on { background: var(--accent); border-color: var(--accent); }

/* 空状態 */
.lm-empty {
  font-size: .78rem; color: var(--text3); text-align: center;
  padding: 24px 16px;
}

/* 助っ人行 */
.lm-helper-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.lm-helper-name { flex: 1; font-size: .85rem; font-weight: 700; }
.lm-level-badge {
  font-size: .62rem; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; border: 1px solid; flex-shrink: 0;
}
.lm-level-badge--experienced   { background: var(--accent-bg); color: var(--accent); border-color: #c7d2fe; }
.lm-level-badge--moderate      { background: var(--green-bg);  color: var(--green);  border-color: #bbf7d0; }
.lm-level-badge--inexperienced { background: var(--bg2);       color: var(--text3);  border-color: var(--border); }
.lm-remove-btn {
  background: none; border: none; color: var(--text3);
  font-size: .75rem; padding: 4px 6px; border-radius: 4px;
  transition: background .12s, color .12s; flex-shrink: 0;
}
.lm-remove-btn:hover { background: var(--red-bg); color: var(--red); }

/* MEMBER DETAIL — パワプロ風能力値 (pwr- prefix) =================== */
.pwr-page-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  background: var(--white);
}
.pwr-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border: none; cursor: pointer;
  flex-shrink: 0; color: var(--text2);
  font-size: .8rem; font-weight: 700;
}
.pwr-name { font-weight: 900; font-size: 1.3rem; }
.pwr-meta { font-size: .75rem; color: var(--text3); margin-top: 2px; }
.pwr-bio {
  font-size: .8rem; color: var(--text2);
  line-height: 1.5;
}
.pwr-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.pwr-tab {
  flex: 1; padding: 8px 0;
  font-size: .8rem; font-weight: 700;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text3); cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.pwr-tab--on { color: var(--accent); border-bottom-color: var(--accent); }
.pwr-panel--hidden { display: none; }
.pwr-overall {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem; line-height: 1;
}
.pwr-section-label {
  font-size: .62rem; font-weight: 900;
  letter-spacing: .1em; color: var(--text3);
  text-transform: uppercase; margin-bottom: 6px;
}
.pwr-ability-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.pwr-ability-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.pwr-ability-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface, var(--bg));
  border-radius: var(--radius-sm);
  padding: 5px 7px;
}
.pwr-ability-label { font-size: .78rem; font-weight: 700; color: var(--text2); }
.pwr-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem; font-weight: 900;
  color: #fff;
}
.pwr-rank--S { background: #d97706; }
.pwr-rank--A { background: #dc2626; }
.pwr-rank--B { background: #2563eb; }
.pwr-rank--C { background: #059669; }
.pwr-rank--D { background: #6b7280; }
.pwr-rank--E { background: #e5e7eb; color: #374151; }
.pwr-special {
  padding: 4px 10px; border-radius: 20px;
  font-size: .78rem; font-weight: 700; border: 1px solid;
}
.pwr-special--pos   { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.pwr-special--neg   { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }
.pwr-special--pitch { background: #eef2ff; color: #1a56db; border-color: #c7d2fe; }
/* pwr-footer は廃止 (close button はヘッダーに移動) */

/* ── 通知設定トグルボタン ── */
.notif-toggle-btn {
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  padding: 5px 12px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white); color: var(--text3);
  cursor: pointer; flex-shrink: 0;
  transition: border-color .15s, background .15s, color .15s;
}
.notif-toggle-btn--on {
  border-color: var(--accent); background: var(--accent-bg); color: var(--accent);
}
.notif-toggle-btn:disabled { opacity: .5; cursor: default; }

/* ================================================================
   MEMBER DETAIL v2 — パワプロ風能力画面 (pwr2- prefix)
================================================================ */

/* ── Overlay ── */
.pwr2-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #0b1a30;
  overflow-y: auto;
  animation: slideUp .22s ease both;
}

/* ── Hero ── */
.pwr2-hero {
  background: linear-gradient(160deg, #071426 0%, #0c2040 50%, #133570 100%);
  padding: 14px 16px 0;
  border-bottom: 2px solid rgba(96,165,250,.2);
  position: relative;
}
.pwr2-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.75); font-size: .9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; transition: background .15s;
}
.pwr2-close:hover { background: rgba(255,255,255,.2); }

.pwr2-hero-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding-bottom: 14px;
}
.pwr2-avatar {
  width: 74px; height: 74px; border-radius: 14px;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(96,165,250,.4);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
}
.pwr2-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pwr2-avatar-initial {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; line-height: 1;
  color: rgba(255,255,255,.75);
}
.pwr2-hero-info { flex: 1; min-width: 0; padding-top: 4px; }
.pwr2-number-label {
  font-size: .6rem; font-weight: 700; letter-spacing: .16em;
  color: rgba(96,165,250,.75); text-transform: uppercase; margin-bottom: 3px;
}
.pwr2-player-name {
  font-weight: 900; font-size: 1.45rem; color: white;
  line-height: 1.15; margin-bottom: 7px;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.pwr2-pos-tag {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; padding: 3px 11px; border-radius: 20px;
  background: rgba(59,130,246,.2); color: #93c5fd;
  border: 1px solid rgba(59,130,246,.35);
}

/* Overall block (right side of hero row) */
.pwr2-overall-block {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex-shrink: 0; margin-right: 6px;
}
.pwr2-overall-lbl {
  font-size: .52rem; font-weight: 700; letter-spacing: .16em;
  color: rgba(255,255,255,.4); text-transform: uppercase;
}
.pwr2-overall-rank {
  width: 64px; height: 64px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 3rem; line-height: 1;
  color: white; font-weight: 900;
  box-shadow: 0 4px 22px rgba(0,0,0,.5);
  position: relative; overflow: hidden;
}
.pwr2-overall-rank::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 48%;
  background: rgba(255,255,255,.14);
}
.pwr2-overall-num {
  font-family: 'Bebas Neue', sans-serif; font-size: .95rem; line-height: 1;
  color: rgba(255,255,255,.5); letter-spacing: .04em;
}

/* Hero sub-stats strip */
.pwr2-hero-substats {
  display: flex; margin: 0 -16px;
  background: rgba(0,0,0,.3);
  border-top: 1px solid rgba(96,165,250,.15);
}
.pwr2-hero-substat {
  flex: 1; text-align: center; padding: 8px 4px;
  border-right: 1px solid rgba(96,165,250,.1);
}
.pwr2-hero-substat:last-child { border-right: none; }
.pwr2-hero-substat-val {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.25rem;
  color: white; line-height: 1; margin-bottom: 2px;
}
.pwr2-hero-substat-val--blue { color: #60a5fa; }
.pwr2-hero-substat-lbl {
  font-size: .55rem; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.4);
}

/* ── Rank color gradients ── */
.pwr2-rank-bg-S { background: linear-gradient(135deg, #b45309, #f59e0b); }
.pwr2-rank-bg-A { background: linear-gradient(135deg, #b91c1c, #f87171); }
.pwr2-rank-bg-B { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.pwr2-rank-bg-C { background: linear-gradient(135deg, #047857, #34d399); }
.pwr2-rank-bg-D { background: linear-gradient(135deg, #374151, #6b7280); }
.pwr2-rank-bg-E { background: linear-gradient(135deg, #1f2937, #374151); }

/* ── Tab navigation ── */
.pwr2-tabs {
  display: flex;
  background: #091525;
  border-bottom: 1px solid rgba(96,165,250,.2);
  position: sticky; top: 0; z-index: 10;
}
.pwr2-tab {
  flex: 1; padding: 12px 0;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  background: none; border: none; border-bottom: 2.5px solid transparent;
  color: rgba(255,255,255,.36); cursor: pointer; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.pwr2-tab--on { color: #60a5fa; border-bottom-color: #3b82f6; }

/* ── Panel ── */
.pwr2-panel { background: #0b1a30; min-height: 60vh; padding-bottom: 32px; }
.pwr2-panel--hidden { display: none; }

/* ── Section header ── */
.pwr2-section { padding: 14px 14px 10px; }
.pwr2-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: .62rem; font-weight: 900; letter-spacing: .14em;
  color: #60a5fa; text-transform: uppercase; margin-bottom: 10px;
}
.pwr2-section-head::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(96,165,250,.2);
}

/* ── Ability cards ── */
.pwr2-ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pwr2-ab-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

.pwr2-ab-card {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(96,165,250,.18);
  border-radius: 10px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
}
.pwr2-ab-name {
  font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.65);
  flex: 1; min-width: 0; white-space: nowrap;
}
.pwr2-ab-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pwr2-ab-num {
  font-family: 'Bebas Neue', sans-serif; font-size: .92rem;
  color: rgba(255,255,255,.38); min-width: 22px; text-align: right;
}
.pwr2-rank-badge {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; line-height: 1;
  color: white; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  position: relative; overflow: hidden;
}
.pwr2-rank-badge::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: rgba(255,255,255,.16);
}

/* ── Defensive position field map ── */
.pwr2-field-wrap {
  background: rgba(0,55,20,.3);
  border: 1px solid rgba(96,165,250,.18);
  border-radius: 14px; overflow: hidden;
}
.pwr2-field-canvas {
  position: relative; width: 100%; padding-bottom: 80%;
}
/* Outfield grass */
.pwr2-field-of {
  position: absolute;
  left: 6%; top: 2%; right: 6%; height: 70%;
  border-radius: 50% 50% 0 0 / 68% 68% 0 0;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.15); border-bottom: none;
}
/* Infield dirt circle */
.pwr2-field-if {
  position: absolute;
  left: 24%; top: 24%; right: 24%; bottom: 24%;
  border-radius: 50%;
  background: rgba(180,130,70,.1);
  border: 1px solid rgba(180,130,70,.15);
}
/* Diamond (rotated square) */
.pwr2-field-diam {
  position: absolute;
  left: 50%; top: 36%;
  width: 28%; height: 28%;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(160,120,60,.14);
  border: 1.5px solid rgba(255,255,255,.14);
}
/* Foul lines */
.pwr2-field-foul-l {
  position: absolute; left: 50%; top: 72%;
  width: 48%; height: 1px;
  background: rgba(255,255,255,.09);
  transform-origin: left center; transform: rotate(-46deg);
}
.pwr2-field-foul-r {
  position: absolute; left: 50%; top: 72%;
  width: 48%; height: 1px;
  background: rgba(255,255,255,.09);
  transform-origin: left center; transform: rotate(46deg);
}
/* Home plate indicator */
.pwr2-field-home {
  position: absolute; left: 50%; top: 74%;
  width: 10px; height: 10px; transform: translate(-50%, -50%) rotate(45deg);
  border: 1.5px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07);
}

/* Position markers */
.pwr2-pos {
  position: absolute; transform: translate(-50%, -50%);
  font-size: .6rem; font-weight: 700; letter-spacing: .03em;
  min-width: 26px; height: 20px; padding: 0 4px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px; color: rgba(255,255,255,.38);
  display: flex; align-items: center; justify-content: center;
}
.pwr2-pos--active {
  background: rgba(59,130,246,.5); border-color: #60a5fa;
  color: white; font-size: .68rem;
  min-width: 30px; height: 24px;
  box-shadow: 0 0 10px rgba(59,130,246,.6), 0 0 0 2px rgba(96,165,250,.25);
  z-index: 2;
}

/* ── Special ability chips ── */
.pwr2-specials { display: flex; flex-wrap: wrap; gap: 7px; }
.pwr2-special {
  padding: 5px 13px; border-radius: 20px;
  font-size: .78rem; font-weight: 700; border: 1px solid;
}
.pwr2-special--pos   { background: rgba(16,185,129,.14); color: #34d399; border-color: rgba(16,185,129,.3); }
.pwr2-special--neg   { background: rgba(239,68,68,.14);  color: #f87171; border-color: rgba(239,68,68,.3); }
.pwr2-special--pitch { background: rgba(99,102,241,.14); color: #a5b4fc; border-color: rgba(99,102,241,.3); }

/* ── Stats panel ── */
.pwr2-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.pwr2-stat-card {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(96,165,250,.18);
  border-radius: 10px; padding: 10px 8px; text-align: center;
}
.pwr2-stat-val {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; line-height: 1;
  color: white; margin-bottom: 3px;
}
.pwr2-stat-val--blue  { color: #60a5fa; }
.pwr2-stat-val--gold  { color: #fbbf24; }
.pwr2-stat-val--green { color: #34d399; }
.pwr2-stat-lbl {
  font-size: .6rem; font-weight: 700; letter-spacing: .07em;
  color: rgba(255,255,255,.38);
}

/* ── Profile panel ── */
.pwr2-profile-top {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid rgba(96,165,250,.1);
}
.pwr2-profile-avatar {
  width: 66px; height: 66px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(96,165,250,.35);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.pwr2-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pwr2-profile-avatar-init {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.9rem;
  color: rgba(255,255,255,.7);
}
.pwr2-profile-name {
  font-weight: 900; font-size: 1.15rem; color: white; margin-bottom: 5px;
}
.pwr2-profile-bio {
  font-size: .82rem; color: rgba(255,255,255,.55); line-height: 1.6;
}
.pwr2-profile-rows { display: flex; flex-direction: column; }
.pwr2-profile-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(96,165,250,.08);
}
.pwr2-profile-row:last-child { border-bottom: none; }
.pwr2-profile-lbl {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  color: rgba(96,165,250,.7); text-transform: uppercase; width: 66px; flex-shrink: 0;
}
.pwr2-profile-val {
  flex: 1; font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.85);
}
.pwr2-profile-val--muted { color: rgba(255,255,255,.28); }

/* 助っ人追加ボタン */
.lm-add-btn {
  width: 100%; height: 40px;
  background: none; border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm); font-size: .82rem; font-weight: 700;
  color: var(--text3); transition: border-color .15s, color .15s, background .15s;
}
.lm-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* 助っ人入力フォーム */
.lm-hform { margin-bottom: 8px; }
.lm-hform__btns { display: flex; gap: 8px; margin-top: 10px; }

/* フッター */
.lm-footer {
  position: sticky; bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 14px 0 24px;
  margin: 0 -16px;
  padding-left: 16px; padding-right: 16px;
}

/* 監督コメント */
.lm-manager-box {
  background: linear-gradient(135deg, #f8f9ff 0%, var(--accent-bg) 100%);
  border: 1px solid #c7d2fe; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px;
}
.lm-manager-box__label {
  font-size: .62rem; font-weight: 900; letter-spacing: .12em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 6px;
}
.lm-manager-box__text {
  font-size: .82rem; line-height: 1.65; color: var(--text); font-weight: 500;
}

/* 打順カードリスト */
.lm-lineup-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.lm-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.lm-card__num {
  font-family: 'Bebas Neue', sans-serif; font-size: 2rem; line-height: 1;
  color: var(--accent); min-width: 32px; text-align: center; flex-shrink: 0;
  padding-top: 2px;
}
.lm-card__body { flex: 1; min-width: 0; }
.lm-card__top  { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.lm-card__name { font-weight: 900; font-size: .9rem; flex: 1; }
.lm-role-badge {
  font-size: .6rem; font-weight: 700; padding: 2px 9px;
  border-radius: 10px; border: 1px solid; flex-shrink: 0; letter-spacing: .04em;
}
.lm-card__comment { font-size: .75rem; color: var(--text2); line-height: 1.6; }
.lm-helper-tag {
  display: inline-block; font-size: .58rem; font-weight: 900;
  background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe;
  border-radius: 4px; padding: 1px 5px; margin-left: 4px;
  vertical-align: middle;
}
/* REPORT — レポート (rpt- prefix) ================================= */
.rpt-trigger-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem; font-weight: 700;
  color: var(--text2);
  box-shadow: var(--shadow-sm);
  transition: background .15s;
}
.rpt-trigger-btn:hover { background: var(--bg); }
.rpt-trigger-btn__arr { margin-left: auto; color: var(--text3); font-size: .82rem; }
.rpt-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.rpt-tab {
  flex: 1; padding: 12px 0;
  font-size: .84rem; font-weight: 700;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text3); cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.rpt-tab--on { color: var(--accent); border-bottom-color: var(--accent); }
.rpt-panel--hidden { display: none; }
/* ニュースカード */
.rpt-news {
  padding: 14px 14px 14px 15px;
  border-left: 3px solid var(--border);
}
.rpt-news--win  { border-left-color: var(--green); }
.rpt-news--loss { border-left-color: var(--red); }
.rpt-news--draw { border-left-color: var(--text3); }
.rpt-news__meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.rpt-news__date { font-size: .68rem; color: var(--text3); font-weight: 600; }
.rpt-new-badge {
  font-size: .6rem; font-weight: 900; letter-spacing: .06em;
  color: var(--accent); background: var(--accent-bg);
  padding: 1px 6px; border-radius: 4px;
}
.rpt-news__hl {
  font-size: .88rem; font-weight: 900; line-height: 1.45; color: var(--text);
}
.rpt-news__body {
  font-size: .78rem; color: var(--text2); line-height: 1.65; margin-top: 6px;
}
/* ホームプレビュー */
.rpt-home-news {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  padding: 11px 14px;
  box-shadow: var(--shadow-sm);
}
.rpt-home-news--win  { border-left-color: var(--green); }
.rpt-home-news--loss { border-left-color: var(--red); }
.rpt-home-news--draw { border-left-color: var(--text3); }
.rpt-home-news__date { font-size: .65rem; color: var(--text3); font-weight: 600; }
.rpt-home-news__hl   { font-size: .84rem; font-weight: 900; line-height: 1.4; }
/* 年表 */
.rpt-tl-item {
  display: flex; gap: 14px; padding-bottom: 22px;
}
.rpt-tl-left {
  display: flex; flex-direction: column; align-items: center; flex-shrink: 0;
}
.rpt-tl-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
}
.rpt-tl-dot--team   { background: var(--accent); }
.rpt-tl-dot--player { background: var(--green); }
.rpt-tl-line {
  flex: 1; width: 1px; background: var(--border); margin-top: 5px; min-height: 12px;
}
.rpt-tl-item:last-child .rpt-tl-line { display: none; }
.rpt-tl-right { flex: 1; }
.rpt-tl-date  { font-size: .68rem; color: var(--text3); margin-bottom: 2px; }
.rpt-tl-name  { font-size: .92rem; font-weight: 900; line-height: 1.3; }
.rpt-tl-label { font-size: .88rem; font-weight: 700; line-height: 1.4; }
.rpt-tl-sublabel { font-size: .74rem; color: var(--text3); font-weight: 600; margin-top: 1px; }
.rpt-tl-detail { font-size: .75rem; color: var(--text2); margin-top: 3px; }

/* ================================================================
   EVENT DETAIL — UI ENHANCEMENTS (ed2- no prefix, scoped via parent)
================================================================ */

/* ── game hero (clean white) ── */
.event-detail-hero--game {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 3px 0 var(--accent);
}

/* ── Match header — horizontal score layout ── */
.match-header {
  display: flex; align-items: center; padding: 18px 0 10px; gap: 0;
}
.match-header__team { flex: 1; min-width: 0; }
.match-header__team--right { text-align: right; }
.match-header__name {
  font-weight: 900; font-size: .95rem; color: var(--text);
  margin-bottom: 7px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.match-header__order {
  display: inline-block; font-size: .6rem; font-weight: 700;
  letter-spacing: .06em; padding: 2px 9px; border-radius: 10px;
}
.mh-home { background: var(--accent-bg); color: var(--accent); }
.mh-away { background: var(--bg2); color: var(--text3); }
.match-header__center {
  text-align: center; padding: 0 14px; flex-shrink: 0;
}
.match-header__scores {
  display: flex; align-items: center; gap: 4px;
}
.match-header__num {
  font-family: 'Bebas Neue', sans-serif; font-size: 3.6rem; line-height: 1;
  color: var(--text); min-width: 44px; text-align: center;
}
.mh-num--lead  { color: var(--accent); }
.mh-num--trail { color: var(--text3); opacity: .4; }
.match-header__colon {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem;
  color: var(--border); padding-bottom: 3px;
}

/* ── MVP card in hero (light) ── */
.mvp-card--hero {
  background: var(--accent-bg);
  border: 1.5px solid #c7d2fe;
  position: relative;
  overflow: hidden;
  animation: mvp-border-glow 1.6s ease-out 0.5s 1 both;
}
.mvp-card--hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 20%, rgba(251,191,36,.2) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: mvp-shimmer 1.6s ease-out 0.5s 1 both;
  pointer-events: none;
}
@keyframes mvp-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
@keyframes mvp-border-glow {
  0%   { border-color: #c7d2fe; box-shadow: none; }
  25%  { border-color: rgba(251,191,36,.5); box-shadow: 0 0 0 2px rgba(251,191,36,.1); }
  65%  { border-color: rgba(251,191,36,.28); box-shadow: 0 0 0 1px rgba(251,191,36,.06); }
  100% { border-color: #c7d2fe; box-shadow: none; }
}
.mvp-card__icon { display: flex; align-items: center; color: var(--accent); }
.mvp-card--hero .mvp-card__label { color: var(--accent); }
.mvp-card--hero .mvp-card__name  { color: var(--text); }
.mvp-card--hero .mvp-card__stat  { color: var(--text2); }
.mvp-card--hero .mvp-card__ops   { color: var(--accent); }

/* ── Scoreboard text logos ── */
.sb-team-logo-text {
  font-family: 'Bebas Neue', sans-serif; font-size: .68rem; letter-spacing: .16em;
  color: var(--accent); background: var(--accent-bg);
  border: 1px solid #c7d2fe; border-radius: 6px;
  padding: 2px 6px; flex-shrink: 0; white-space: nowrap;
}
.sb-opp-logo {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .75rem; color: var(--text2);
  flex-shrink: 0;
}

/* ── Practice summary cards ── */
.practice-summary-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; text-align: center;
}
.practice-summary-card__val {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem;
  color: var(--accent); line-height: 1;
}
.practice-summary-card__label {
  font-size: .62rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text3); margin-top: 2px;
}

/* ── Photo grid overlay ── */
.photo-grid__overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
  padding: 20px 7px 6px;
  display: flex; flex-direction: column; gap: 1px;
  pointer-events: none;
}
.photo-grid__uploader { font-size: .6rem; font-weight: 700; color: rgba(255,255,255,.92); line-height: 1.3; }
.photo-grid__caption  { font-size: .58rem; color: rgba(255,255,255,.7); line-height: 1.3; }

/* ── Album quota card ── */
.album-quota {
  margin: 14px 16px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.album-quota__head {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px;
}
.album-quota__label {
  font-size: .62rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text3);
}
.album-quota__count {
  font-size: .92rem; font-weight: 900; color: var(--text);
}
.album-quota__plan {
  margin-left: auto;
  font-size: .58rem; font-weight: 800; letter-spacing: .06em;
  color: var(--accent); background: var(--accent-bg);
  padding: 2px 7px; border-radius: 5px;
}
.album-quota__bar {
  height: 4px; background: var(--bg2); border-radius: 2px;
  overflow: hidden; margin-bottom: 7px;
}
.album-quota__fill {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width .4s ease;
}
.album-quota__fill--warn { background: var(--gold); }
.album-quota__fill--full { background: var(--red); }
.album-quota__msg {
  font-size: .72rem; line-height: 1.4;
}

/* ── Photo viewer ── */
.photo-viewer {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.92);
  display: flex; flex-direction: column; align-items: stretch;
  animation: fadeIn .18s ease both;
  transition: opacity .18s ease;
}
.photo-viewer__close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  background: rgba(255,255,255,.14); border: none; color: #fff;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 1;
}
.photo-viewer__img-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 70px 16px 16px; min-height: 0;
}
.photo-viewer__img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 8px; display: block;
}
.photo-viewer__info {
  background: var(--white); border-radius: 20px 20px 0 0;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}
.photo-viewer__uploader { font-weight: 700; font-size: .88rem; color: var(--text); margin-bottom: 3px; }
.photo-viewer__caption  { font-size: .78rem; color: var(--text2); line-height: 1.5; }
.photo-viewer__delete-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 11px 16px;
  background: transparent; color: #dc2626;
  border: 1.5px solid #fca5a5; border-radius: 10px;
  font-size: .84rem; font-weight: 700; cursor: pointer;
}

/* ── Album PRO hint ── */
.album-pro-hint {
  margin: 8px 16px 0;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .78rem; font-weight: 600;
  color: #1d4ed8; line-height: 1.5;
  cursor: pointer;
}

/* ── Score input panel nav ── */
.si-inning-nav {
  display: flex; align-items: center; gap: 8px;
}
.si-nav-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: background .12s, border-color .12s, color .12s;
}
.si-nav-btn:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.si-close-btn {
  width: 28px; height: 28px; border-radius: 8px;
  border: none; background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); transition: background .12s, color .12s;
}
.si-close-btn:hover { background: var(--red-bg); color: var(--red); }

/* ================================================================
   MEMBER DETAIL — WHITE STYLE (pwrw-) 選手データ画面
================================================================ */

.pwrw-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: var(--bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 84px;
}

/* ── hero ── */
.pwrw-hero {
  background: linear-gradient(150deg, #dbeafe 0%, #eff6ff 42%, #ffffff 72%);
  border-bottom: 3px solid var(--accent);
  padding: 16px 16px 0;
  position: relative;
}
.pwrw-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid #c7d2fe;
  background: rgba(255,255,255,.9);
  color: var(--text2); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.pwrw-hero-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding-bottom: 12px;
}
.pwrw-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  border: 3px solid var(--accent);
  background: #dbeafe;
  box-shadow: 0 0 0 3px #eff6ff, 0 4px 14px rgba(26,86,219,.22);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 900; color: var(--accent);
}
.pwrw-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pwrw-hero-info { flex: 1; min-width: 0; padding-top: 4px; }
.pwrw-num-label {
  font-size: .65rem; font-weight: 900; letter-spacing: .14em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 2px;
}
.pwrw-player-name {
  font-weight: 900; font-size: 1.22rem; line-height: 1.25;
  color: var(--text); letter-spacing: -.01em;
}
.pwrw-pos-tag {
  display: inline-block; margin-top: 5px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  background: var(--accent-bg); color: var(--accent);
  border: 1px solid #c7d2fe; border-radius: 6px;
  padding: 2px 8px;
}

/* ── overall badge ── */
.pwrw-overall-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; flex-shrink: 0; padding-top: 4px;
}
.pwrw-overall-lbl {
  font-size: .58rem; font-weight: 900; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase;
}
.pwrw-overall-badge {
  width: 58px; height: 58px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem;
  color: #fff; position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.pwrw-overall-badge::before {
  content: ''; position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(150deg, rgba(255,255,255,.25) 0%, transparent 60%);
}
.pwrw-overall-num {
  font-size: .7rem; font-weight: 900; color: var(--text2); letter-spacing: .04em;
}

/* ── rank backgrounds ── */
.pwrw-bg-S { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.pwrw-bg-A { background: linear-gradient(135deg, #dc2626, #ef4444); }
.pwrw-bg-B { background: linear-gradient(135deg, #d97706, #f59e0b); }
.pwrw-bg-C { background: linear-gradient(135deg, #059669, #10b981); }
.pwrw-bg-D { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.pwrw-bg-E { background: linear-gradient(135deg, #64748b, #94a3b8); }

/* ── hero sub stats ── */
.pwrw-hero-substats {
  display: flex; gap: 0;
  border-top: 1px solid rgba(26,86,219,.12);
  margin: 0 -16px; padding: 0;
}
.pwrw-hero-substat {
  flex: 1; text-align: center;
  padding: 10px 4px;
  border-right: 1px solid rgba(26,86,219,.1);
}
.pwrw-hero-substat:last-child { border-right: none; }
.pwrw-substat-val {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.35rem;
  line-height: 1; color: var(--text);
}
.pwrw-substat-val--blue { color: var(--accent); }
.pwrw-substat-lbl {
  font-size: .58rem; font-weight: 700; color: var(--text3);
  margin-top: 2px; letter-spacing: .04em;
}

/* ── tabs ── */
.pwrw-tabs {
  display: flex; gap: 0;
  background: #eef2ff;
  border-bottom: 2px solid #c7d2fe;
  position: sticky; top: 0; z-index: 10;
}
.pwrw-tab {
  flex: 1; padding: 11px 4px;
  font-size: .82rem; font-weight: 800;
  border: none; background: transparent; color: var(--text2);
  letter-spacing: .04em; cursor: pointer;
}
.pwrw-tab--on {
  background: linear-gradient(155deg, #1a56db 0%, #3b82f6 100%);
  color: #fff;
}

/* ── panels ── */
.pwrw-panel { padding: 16px; }
.pwrw-panel--hidden { display: none; }

/* ── section ── */
.pwrw-section { margin-bottom: 16px; }
.pwrw-section-head {
  font-size: .68rem; font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px; padding-left: 2px;
}

/* ── batting layout ── */
.pwrw-batting-layout {
  display: flex; gap: 10px; align-items: flex-start;
}
.pwrw-batting-left { flex-shrink: 0; }
.pwrw-batting-right { flex: 1; min-width: 0; }
.pwrw-batting-badge {
  width: 72px; height: 72px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  position: relative; overflow: hidden;
}
.pwrw-batting-badge::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(255,255,255,.3) 0%, transparent 55%);
}
.pwrw-batting-badge-rank {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.6rem;
  line-height: 1; color: #fff; position: relative;
}
.pwrw-batting-badge-lbl {
  font-size: .55rem; font-weight: 900; color: rgba(255,255,255,.82);
  letter-spacing: .08em; position: relative;
}

/* ── ability rows ── */
.pwrw-ab-rows { display: flex; flex-direction: column; gap: 5px; }
.pwrw-ab-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border-radius: 0 8px 8px 0;
  padding: 7px 10px 7px 12px;
  border-left: 4px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.pwrw-ab-row-label { font-size: .75rem; font-weight: 700; color: var(--text); }
.pwrw-ab-row-right { display: flex; align-items: center; gap: 6px; }
.pwrw-ab-row-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem;
  color: var(--text2); line-height: 1;
}
.pwrw-ab-badge {
  min-width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 1rem;
  color: #fff;
}
.pwrw-border-S { border-left-color: #7c3aed; }
.pwrw-border-A { border-left-color: #dc2626; }
.pwrw-border-B { border-left-color: #d97706; }
.pwrw-border-C { border-left-color: #059669; }
.pwrw-border-D { border-left-color: #2563eb; }
.pwrw-border-E { border-left-color: #94a3b8; }

/* ── pitch cards ── */
.pwrw-pitch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pwrw-pitch-card {
  flex: 1; min-width: 88px;
  background: var(--white); border-radius: 10px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  padding: 10px 12px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  text-align: center;
}
.pwrw-pitch-card-name {
  font-size: .68rem; font-weight: 700; color: var(--text3);
  margin-bottom: 4px; letter-spacing: .04em;
}
.pwrw-pitch-card-rank {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem;
  line-height: 1; color: var(--text);
}
.pwrw-pitch-card-num { font-size: .65rem; color: var(--text3); margin-top: 1px; }
.pwrw-pitch-border-S { border-top-color: #7c3aed; }
.pwrw-pitch-border-A { border-top-color: #dc2626; }
.pwrw-pitch-border-B { border-top-color: #d97706; }
.pwrw-pitch-border-C { border-top-color: #059669; }
.pwrw-pitch-border-D { border-top-color: #2563eb; }
.pwrw-pitch-border-E { border-top-color: #94a3b8; }

/* ── Position Buttons (recordForm) ── */
.pos-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text2);
  transition: border-color .12s, background .12s, color .12s;
}
.pos-btn--active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

/* ── special abilities ── */
.pwrw-specials { display: flex; flex-wrap: wrap; gap: 6px; }
.pwrw-special {
  display: inline-block; font-size: .72rem; font-weight: 800;
  border-radius: 6px; padding: 4px 10px;
}
.pwrw-special--pos   { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pwrw-special--neg   { background: #fecaca; color: #7f1d1d; border: 1.5px solid #f87171; font-weight: 900; letter-spacing: -.01em; }
.pwrw-special--pitch { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pwrw-special--def   { background: #ecfeff; color: #155e75; border: 1px solid #a5f3fc; }

/* ── HOT / ACE chip ── */
.member-hot-chip {
  font-size: .55rem; font-weight: 900; letter-spacing: .1em;
  color: #fff; background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 4px; padding: 2px 5px; line-height: 1; flex-shrink: 0;
}
.member-ace-chip {
  font-size: .55rem; font-weight: 900; letter-spacing: .1em;
  color: #713f12; background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-radius: 4px; padding: 2px 5px; line-height: 1; flex-shrink: 0;
}

/* ── ability delta ── */
.pwrw-delta           { font-size: .6rem; font-weight: 900; line-height: 1; letter-spacing: -.01em; }
.pwrw-delta--up       { color: #16a34a; }
.pwrw-delta--down     { color: #dc2626; }
.pwrw-overall-delta   { font-size: .62rem; font-weight: 900; text-align: center; margin-top: 1px; }

/* ── growth board ── */
.pwrw-grow-board {
  background: var(--white);
  border-radius: 12px;
  border: 1.5px solid #dbeafe;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(26,86,219,.07);
}
.pwrw-grow-board-title {
  font-size: .65rem; font-weight: 900; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 10px;
}
.pwrw-grow-item { margin-bottom: 9px; }
.pwrw-grow-item:last-child { margin-bottom: 0; }
.pwrw-grow-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 3px;
}
.pwrw-grow-label { font-size: .75rem; font-weight: 700; color: var(--text); }
.pwrw-grow-arrow { font-size: .65rem; font-weight: 900; color: var(--text3); letter-spacing: .04em; }
.pwrw-grow-bar-bg {
  height: 7px; border-radius: 4px;
  background: #e2e8f0; overflow: hidden;
}
.pwrw-grow-fill {
  height: 100%; border-radius: 4px; width: 0;
  background: linear-gradient(90deg, #3b82f6, #1a56db);
  transition: width .75s cubic-bezier(.34,1.56,.64,1);
}
.pwrw-grow-fill--gold { background: linear-gradient(90deg, #f59e0b, #d97706); }
.pwrw-grow-fill--max  { background: linear-gradient(90deg, #a855f7, #7c3aed); }

/* ── stats cards ── */
.pwrw-stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.pwrw-stat-card {
  background: var(--white);
  border: 1.5px solid #dbeafe;
  border-radius: 10px; padding: 10px 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(26,86,219,.06);
}
.pwrw-stat-val {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.55rem;
  line-height: 1; color: var(--text);
}
.pwrw-stat-val--blue  { color: var(--accent); }
.pwrw-stat-val--gold  { color: #d97706; }
.pwrw-stat-val--green { color: #059669; }
.pwrw-stat-lbl {
  font-size: .6rem; font-weight: 700; color: var(--text3);
  margin-top: 3px; letter-spacing: .04em;
}

/* ── profile tab ── */
.pwrw-profile-top {
  display: flex; gap: 14px; align-items: center;
  background: var(--white); border-radius: 12px;
  border: 1.5px solid #dbeafe;
  padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(26,86,219,.06);
}
.pwrw-profile-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2.5px solid var(--accent);
  background: #dbeafe; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; color: var(--accent);
}
.pwrw-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pwrw-profile-name { font-weight: 900; font-size: 1rem; color: var(--text); margin-bottom: 4px; }
.pwrw-profile-bio { font-size: .8rem; color: var(--text2); line-height: 1.5; }
.pwrw-profile-rows {
  background: var(--white); border-radius: 12px;
  border: 1.5px solid #dbeafe; overflow: hidden;
  box-shadow: 0 1px 4px rgba(26,86,219,.06);
}
.pwrw-profile-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.pwrw-profile-row:last-child { border-bottom: none; }
.pwrw-profile-lbl { font-size: .75rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.pwrw-profile-val { font-size: .85rem; font-weight: 600; color: var(--text); }
.pwrw-profile-val--muted { color: var(--text3); }

/* ── 戻るボタン (固定・右下) ── */
.pwrw-back-btn {
  position: fixed;
  bottom: 20px; right: 16px; z-index: 950;
  background: linear-gradient(155deg, #1a56db 0%, #3b82f6 100%);
  color: #fff; border: none; border-radius: 26px;
  padding: 13px 22px 13px 18px;
  font-size: .88rem; font-weight: 900; letter-spacing: .06em;
  box-shadow: 0 4px 20px rgba(26,86,219,.42);
  cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.pwrw-back-btn::before { content: '←'; font-size: 1rem; }

/* ============================================================
   打順タブ (Starting Order)
   ============================================================ */

.lu-compose-btn {
  width: 100%; display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1.5px dashed var(--accent); border-radius: 14px;
  padding: 16px 18px; cursor: pointer; text-align: left;
  transition: opacity .15s;
}
.lu-compose-btn:active { opacity: .8; }
.lu-compose-btn__icon  { font-size: 1.9rem; flex-shrink: 0; line-height: 1; }
.lu-compose-btn__title { font-weight: 900; font-size: .95rem; color: var(--accent); margin-bottom: 3px; }
.lu-compose-btn__sub   { font-size: .74rem; color: var(--text3); }

.lu-header {
  padding: 14px 18px 13px;
  background: linear-gradient(135deg, #1a56db 0%, #1e3a8a 100%);
  color: #fff;
}
.lu-header__eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: .95rem; letter-spacing: .2em; opacity: .7; margin-bottom: 2px;
}
.lu-header__matchup { font-weight: 900; font-size: 1.05rem; }
.lu-header__vs      { font-size: .72rem; font-weight: 700; opacity: .65; margin: 0 5px; }

.lu-list { padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }

@keyframes luCardIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.lu-card {
  background: var(--white);
  border: 1px solid var(--border); border-left: 4px solid;
  border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  animation: luCardIn .32s ease both;
}
.lu-card__num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; line-height: 1;
  width: 28px; text-align: center; flex-shrink: 0;
}
.lu-card__body  { flex: 1; min-width: 0; }
.lu-card__top   { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; flex-wrap: wrap; }
.lu-card__name  {
  font-weight: 900; font-size: .88rem;
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lu-stats       { display: flex; gap: 14px; }
.lu-stat__val   {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem; line-height: 1; color: var(--text2);
}
.lu-stat__lbl   { font-size: .58rem; color: var(--text3); margin-top: 1px; }
.lu-unregistered {
  display: inline-block; font-size: .67rem; font-weight: 700;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px; color: var(--text3);
}
.lu-no-stats { font-size: .72rem; color: var(--text3); }

.lu-role-badge {
  font-size: .58rem; font-weight: 800; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap; flex-shrink: 0;
  border: 1px solid;
}
.lu-role--leadoff { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.lu-role--bridge  { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.lu-role--three   { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.lu-role--cleanup { background: #fefce8; color: #a16207; border-color: #fde047; }
.lu-role--mid     { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.lu-role--lower   { background: var(--bg); color: var(--text2); border-color: var(--border); }
.lu-role--tail    { background: var(--bg); color: var(--text3); border-color: var(--border); }

/* ============================================================
   特殊能力ガイド (Bottom Sheet)
   ============================================================ */

.spec-guide-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 50%; border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent);
  font-size: .6rem; font-weight: 900; line-height: 1;
  cursor: pointer; padding: 0;
  transition: background .15s, color .15s;
}
.spec-guide-btn:hover { background: var(--accent); color: #fff; }

.spec-guide-overlay {
  position: fixed; inset: 0; z-index: 1000;
}

.spec-guide-sheet {
  position: absolute; inset: 0;
  background: var(--white);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32, 0, .67, 0);
}
.spec-guide-sheet--in {
  transform: translateY(0);
  transition-timing-function: cubic-bezier(.33, 1, .68, 1);
}

.spec-guide-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 10px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.spec-guide-title {
  font-size: 1rem; font-weight: 900; letter-spacing: .03em;
}
.spec-guide-close {
  width: 28px; height: 28px;
  border-radius: 50%; border: none;
  background: var(--bg); color: var(--text2);
  font-size: 1.1rem; font-weight: 700; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.spec-guide-close:hover { background: var(--border); }

.spec-guide-scroll {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  flex: 1 1 0; min-height: 0;
}

.spec-guide-lead {
  font-size: .82rem; color: var(--text2); line-height: 1.7;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--bg); border-radius: 10px;
}

.spec-guide-body { display: flex; flex-direction: column; gap: 20px; }

.spec-guide-group-label {
  display: inline-block;
  font-size: .62rem; font-weight: 900; letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px; margin-bottom: 8px;
}
.spec-guide-group-label--bat   { background: #dcfce7; color: #15803d; }
.spec-guide-group-label--def   { background: #ecfeff; color: #0e7490; }
.spec-guide-group-label--pitch { background: #eff6ff; color: #1d4ed8; }
.spec-guide-group-label--weak  { background: #fee2e2; color: #b91c1c; }

.spec-guide-cards { display: flex; flex-direction: column; gap: 6px; }

.spec-guide-card {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 12px; border-radius: 10px; border: 1px solid;
}
.spec-guide-card--bat   { background: #f0fdf4; border-color: #bbf7d0; }
.spec-guide-card--def   { background: #ecfeff; border-color: #a5f3fc; }
.spec-guide-card--pitch { background: #eff6ff; border-color: #bfdbfe; }
.spec-guide-card--weak  { background: #fff7f7; border-color: #fecaca; }

.spec-guide-card-name {
  font-size: .82rem; font-weight: 800;
  white-space: nowrap; flex-shrink: 0; min-width: 88px;
}
.spec-guide-card--bat   .spec-guide-card-name { color: #15803d; }
.spec-guide-card--def   .spec-guide-card-name { color: #0e7490; }
.spec-guide-card--pitch .spec-guide-card-name { color: #1d4ed8; }
.spec-guide-card--weak  .spec-guide-card-name { color: #b91c1c; }

.spec-guide-card-desc {
  font-size: .78rem; color: var(--text2); line-height: 1.55;
}

.spec-guide-notes {
  list-style: none; margin: 22px 0 0;
  padding: 12px 14px;
  background: var(--bg); border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.spec-guide-notes li {
  font-size: .74rem; color: var(--text3); line-height: 1.5;
  padding-left: 14px; position: relative;
}
.spec-guide-notes li::before {
  content: "·"; position: absolute; left: 4px;
  font-size: 1rem; line-height: 1.2; color: var(--accent);
}


/* ════════════════════════════════════════════════
   Score Tab Redesign
   ════════════════════════════════════════════════ */

/* ── Status Card ── */
.sc-status { padding: 16px 16px 0; animation: fadeUp .3s ease both; }
.sc-status__card {
  border-radius: 18px; padding: 24px 20px 18px;
  color: white; text-align: center; position: relative; overflow: hidden;
}
.sc-status__label {
  font-size: .58rem; font-weight: 800; letter-spacing: .22em;
  opacity: .75; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.sc-status__live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f59e0b; animation: blink 1.4s infinite; flex-shrink: 0;
}
.sc-status__scores {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 12px;
}
.sc-status__team { flex: 1; }
.sc-status__team-name {
  font-size: .65rem; opacity: .75; margin-bottom: 4px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-status__score {
  font-family: 'Bebas Neue', sans-serif; font-size: 5rem;
  line-height: 1; font-weight: 900;
}
.sc-status__score--lead { color: #fbbf24; }
.sc-status__divider {
  font-size: 1.8rem; opacity: .35; font-weight: 900;
  padding: 0 10px; padding-top: 24px; flex-shrink: 0;
}
.sc-status__sub {
  font-size: .75rem; font-weight: 700; opacity: .8; letter-spacing: .06em;
}

/* ── New Scoreboard (nsb) ── */
.nsb { padding: 14px 16px 0; animation: fadeUp .3s .07s ease both; opacity: 0; animation-fill-mode: both; }
.nsb__inner {
  background: var(--white); border-radius: 16px;
  border: 1.5px solid var(--border); overflow: hidden;
}
.nsb__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.nsb table { border-collapse: collapse; white-space: nowrap; }
.nsb th {
  background: #1e293b; color: rgba(255,255,255,.65);
  font-size: .62rem; font-weight: 700; letter-spacing: .06em;
  padding: 9px 4px; text-align: center;
  border-right: 1px solid rgba(255,255,255,.08); min-width: 36px;
}
.nsb th:last-child { border-right: none; }
.nsb th.nsb-team-hd {
  text-align: left; padding-left: 14px; min-width: 100px;
  position: sticky; left: 0; z-index: 2;
}
.nsb th.nsb-total-hd {
  background: #0f172a; color: rgba(255,255,255,.9);
  min-width: 44px; font-size: .7rem;
}
.nsb__th--next { background: #1d4ed8 !important; color: rgba(255,255,255,.9) !important; }

.nsb td {
  border-right: 1px solid var(--border); border-top: 1px solid var(--border);
  text-align: center; padding: 0; height: 54px;
}
.nsb td:last-child { border-right: none; }
.nsb td.nsb-team-cell {
  text-align: left; padding: 0 10px 0 14px; min-width: 100px;
  background: var(--bg); border-right: 2px solid var(--border);
  position: sticky; left: 0; z-index: 1;
}
.nsb__team-name { font-weight: 900; font-size: .9rem; color: var(--text1); }
.nsb__team-sub  { font-size: .6rem; color: var(--text3); margin-top: 1px; }

.nsb-score {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.45rem;
  cursor: default; transition: background .12s;
}
.nsb-score--entered { color: var(--text1); }
.nsb-score--zero    { color: var(--text3); }
.nsb-score--hot     { color: var(--accent); font-size: 1.65rem; }
.nsb-score--empty   { color: var(--border); font-size: 1rem; }
.nsb-score--next    { background: #eff6ff; }
.nsb-score--editable { cursor: pointer; touch-action: manipulation; }
.nsb-score--editable:hover { background: #f0f4ff; }

.nsb-total {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem;
  background: var(--bg2); font-weight: 900; color: var(--text2);
}
.nsb-total--lead  { color: var(--accent); }
.nsb-total--trail { color: var(--text3); }

/* ── NEXT INPUT section ── */
.sc-next { padding: 16px 16px 0; animation: fadeUp .3s .14s ease both; opacity: 0; animation-fill-mode: both; }
.sc-next__card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 18px 20px;
}
.sc-next__label {
  font-size: .6rem; font-weight: 800; letter-spacing: .18em;
  color: var(--accent); margin-bottom: 8px;
}
.sc-next__inning { font-size: 1.1rem; font-weight: 900; color: var(--text1); }

/* ── TEAM STATS section ── */
.sc-stats { padding: 16px 16px 8px; animation: fadeUp .3s .14s ease both; opacity: 0; animation-fill-mode: both; }
.sc-stats__label {
  font-size: .6rem; font-weight: 800; letter-spacing: .18em;
  color: var(--text3); margin-bottom: 12px;
}
.sc-stats__avg {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.6rem;
  color: var(--text1); line-height: 1; margin-bottom: 2px;
}
.sc-stats__avg-label { font-size: .6rem; color: var(--text3); font-weight: 700; }
.sc-stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-top: 12px;
}
.sc-stats__cell {
  background: var(--white); border: 1px solid rgba(99,133,255,.12); border-radius: 10px;
  padding: 10px 6px; text-align: center;
}
.sc-stats__val { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--text1); }
.sc-stats__key { font-size: .58rem; color: var(--text3); font-weight: 700; letter-spacing: .04em; }

/* ── Score Input Modal ── */
.score-modal__overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.5); align-items: flex-end; justify-content: center;
}
.score-modal__overlay.is-open { display: flex; animation: fadeIn .2s ease both; }

/* モーダル表示中は下タブを非表示（被り防止） */
body.score-modal-open .bottom-nav { display: none; }

.score-modal {
  background: var(--white); border-radius: 24px 24px 0 0;
  width: 100%; max-width: 520px;
  box-shadow: 0 -12px 48px rgba(0,0,0,.22);
  animation: slideUp .28s cubic-bezier(.32,1,.4,1) both;
  max-height: min(92dvh, 90vh); overflow-y: auto;
  touch-action: manipulation;
}
.score-modal__handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 14px auto 0;
}
.score-modal__header {
  padding: 16px 20px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.score-modal__inning-nav { display: flex; align-items: center; gap: 12px; }
.score-modal__nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); transition: background .15s;
  touch-action: manipulation;
}
.score-modal__nav-btn:hover:not(:disabled) { background: var(--bg2); }
.score-modal__nav-btn:disabled { opacity: .3; cursor: default; }
.score-modal__inning-label {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem;
  letter-spacing: .06em; color: var(--text1); min-width: 48px; text-align: center;
}
.score-modal__close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
}
.score-modal__status-bar {
  padding: 0 20px 10px; display: flex; gap: 5px; flex-wrap: wrap;
}
.score-modal__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg2); border: 1.5px solid var(--border);
  transition: background .2s, border-color .2s;
}
.score-modal__dot--done    { background: var(--accent); border-color: var(--accent); }
.score-modal__dot--current { background: white; border: 2.5px solid var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.3); }
.score-modal__body { padding: 0 20px 8px; }
.score-modal__row {
  display: flex; align-items: center;
  justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.score-modal__row:last-of-type { border-bottom: none; }
.score-modal__team-name {
  font-weight: 900; font-size: .9rem; color: var(--text1);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.score-modal__stepper { display: flex; align-items: center; gap: 14px; }
.score-modal__val {
  font-family: 'Bebas Neue', sans-serif; font-size: 3.2rem;
  font-weight: 900; color: var(--text1);
  min-width: 52px; text-align: center; line-height: 1;
}
.score-modal__footer {
  padding: 8px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 10px;
  position: sticky; bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--bg2);
  flex-shrink: 0;
}

/* ── Attendance Card ────────────────────────────────────── */
.att-card {
  margin: 12px 16px 0;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(99,133,255,.13);
  box-shadow: 0 2px 12px rgba(26,86,219,.07);
  overflow: hidden;
}
.att-card--loading {
  min-height: 72px;
  display: flex; align-items: center; justify-content: center;
}
.att-card__skeleton {
  width: 55%; height: 10px; background: var(--bg2);
  border-radius: 5px; animation: attPulse 1.4s ease-in-out infinite;
}
@keyframes attPulse { 0%,100% { opacity:.4; } 50% { opacity:.9; } }

.att-card__summary {
  display: flex; align-items: center;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--bg2);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.att-count { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.att-count__num  { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; line-height: 1; }
.att-count__label { font-size: .58rem; font-weight: 700; letter-spacing: .06em; color: var(--text3); }
.att-count--going   .att-count__num { color: var(--accent); }
.att-count--maybe   .att-count__num { color: #d97706; }
.att-count--absent  .att-count__num { color: #ef4444; }
.att-count--pending .att-count__num { color: var(--text3); }
.att-card__arrow { color: var(--text3); flex-shrink: 0; }

.att-card__my {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 4px; font-size: .8rem;
}
.att-my-label { color: var(--text3); }
.att-my-val   { font-weight: 900; }
.att-my-val--going  { color: var(--accent); }
.att-my-val--maybe  { color: #d97706; }
.att-my-val--absent { color: #ef4444; }
.att-my-val--none   { color: var(--text3); }

.att-btns { display: flex; gap: 6px; padding: 8px 14px 12px; }
.att-btn {
  flex: 1; height: 38px; border-radius: 10px;
  font-size: .76rem; font-weight: 800;
  border: 1.5px solid transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  transition: all .14s; -webkit-tap-highlight-color: transparent;
}
.att-btn--going  { background: rgba(99,133,255,.09);  color: var(--accent); border-color: rgba(99,133,255,.22); }
.att-btn--maybe  { background: rgba(217,119,6,.08);   color: #d97706;       border-color: rgba(217,119,6,.2); }
.att-btn--absent { background: rgba(239,68,68,.08);   color: #ef4444;       border-color: rgba(239,68,68,.2); }
.att-btn--going.att-btn--active  { background: var(--accent); color: #fff; border-color: var(--accent);  box-shadow: 0 2px 8px rgba(99,133,255,.35); }
.att-btn--maybe.att-btn--active  { background: #d97706;        color: #fff; border-color: #d97706;        box-shadow: 0 2px 8px rgba(217,119,6,.3); }
.att-btn--absent.att-btn--active { background: #ef4444;        color: #fff; border-color: #ef4444;        box-shadow: 0 2px 8px rgba(239,68,68,.3); }
.att-btn:active { transform: scale(.95); }
.att-btn:disabled { opacity: .5; cursor: default; }

.att-change-btn {
  margin-left: auto;
  font-size: .68rem; font-weight: 800;
  padding: 3px 10px; border-radius: 99px;
  border: 1.5px solid rgba(99,133,255,.35);
  color: var(--accent); background: rgba(99,133,255,.08);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: opacity .12s;
}
.att-change-btn:active { opacity: .6; }

.att-card__non-target {
  padding: 10px 14px 12px;
  font-size: .76rem; color: var(--text3);
}

/* ── Attendance Modal ───────────────────────────────────── */
.att-modal {
  position: fixed; inset: 0; z-index: 350;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: fadeIn .2s ease both;
}
.att-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--bg2);
  flex-shrink: 0;
}
.att-modal__title { font-weight: 900; font-size: 1rem; }
.att-modal__close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text3);
}
.att-modal__admin-note {
  padding: 7px 20px;
  font-size: .68rem; color: var(--accent);
  background: rgba(99,133,255,.07);
  border-bottom: 1px solid rgba(99,133,255,.1);
  flex-shrink: 0;
}
.att-modal__body {
  flex: 1; overflow-y: auto;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.att-section { margin-bottom: 2px; }
.att-section__lbl {
  font-size: .65rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 20px 6px; color: var(--text3);
}
.att-section__lbl--going  { color: var(--accent); }
.att-section__lbl--maybe  { color: #d97706; }
.att-section__lbl--absent { color: #ef4444; }

.att-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--bg2);
}
.att-item:last-child { border-bottom: none; }
.att-item__name {
  flex: 1; font-size: .88rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-item__status {
  font-size: .7rem; font-weight: 800; padding: 3px 10px;
  border-radius: 99px; flex-shrink: 0;
}
.att-status--going   { background: rgba(99,133,255,.1); color: var(--accent); }
.att-status--maybe   { background: rgba(217,119,6,.1);  color: #d97706; }
.att-status--absent  { background: rgba(239,68,68,.1);  color: #ef4444; }
.att-status--pending { background: var(--bg2);          color: var(--text3); }

.att-item__admin { display: flex; gap: 3px; flex-shrink: 0; }
.att-admin-btn {
  width: 28px; height: 28px; border-radius: 7px;
  font-size: .62rem; font-weight: 900;
  border: 1.5px solid var(--border); background: var(--bg);
  cursor: pointer; transition: all .12s; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
}
.att-admin-btn[data-admin-status="going"].att-admin-btn--active  { background: var(--accent); color: #fff; border-color: var(--accent); }
.att-admin-btn[data-admin-status="maybe"].att-admin-btn--active  { background: #d97706;       color: #fff; border-color: #d97706; }
.att-admin-btn[data-admin-status="absent"].att-admin-btn--active { background: #ef4444;       color: #fff; border-color: #ef4444; }

/* ── Admin Dashboard ──────────────────────────────────────── */
.adm-dash { min-height: 100vh; background: #f1f5f9; }

.adm-dash__head {
  background: #1b3178; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 10;
}
.adm-dash__title {
  flex: 1; font-size: .95rem; font-weight: 900;
  color: #fff; letter-spacing: .02em;
}
.adm-dash__back, .adm-dash__refresh {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; -webkit-tap-highlight-color: transparent;
}
.adm-dash__back:active, .adm-dash__refresh:active { background: rgba(255,255,255,.28); }

.adm-dash__body { padding: 20px 16px 64px; }

.adm-section-lbl {
  font-size: .65rem; font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 8px; padding-left: 2px;
}
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.adm-metric {
  background: #fff; border-radius: 16px; padding: 16px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
}
.adm-metric--wide {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; padding: 18px 20px;
}
.adm-metric--wide .adm-metric__icon { margin-bottom: 0; width: 52px; height: 52px; border-radius: 14px; }
.adm-metric--wide .adm-metric__val  { font-size: 2.8rem; margin-bottom: 2px; }

.adm-metric__icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; flex-shrink: 0;
}
.adm-metric__icon--users  { background: #eff6ff; color: #2563eb; }
.adm-metric__icon--teams  { background: #f0fdf4; color: #16a34a; }
.adm-metric__icon--pro    { background: #fefce8; color: #d97706; }
.adm-metric__icon--free   { background: #f8fafc; color: #64748b; }
.adm-metric__icon--active { background: #ecfdf5; color: #059669; }

.adm-metric__texts { display: flex; flex-direction: column; }
.adm-metric__val {
  font-size: 2.2rem; font-weight: 900; color: #1b3178;
  line-height: 1; margin-bottom: 3px; font-variant-numeric: tabular-nums;
}
.adm-metric__label { font-size: .72rem; font-weight: 700; color: #64748b; letter-spacing: .02em; }
.adm-metric__sub   { font-size: .62rem; color: #94a3b8; margin-top: 2px; }

.adm-metric--loading .adm-metric__icon  { background: #e2e8f0; animation: adm-pulse 1.4s ease infinite; color: transparent; }
.adm-metric--loading .adm-metric__val   { color: #e2e8f0; background: #e2e8f0; border-radius: 6px; animation: adm-pulse 1.4s ease infinite; user-select: none; }
.adm-metric--loading .adm-metric__label { color: #e2e8f0; background: #e2e8f0; border-radius: 4px; animation: adm-pulse 1.4s ease infinite; user-select: none; }

@keyframes adm-pulse { 0%,100%{opacity:.7} 50%{opacity:.3} }
@keyframes adm-spin  { to { transform: rotate(360deg); } }

.adm-updated { text-align: center; font-size: .65rem; color: #94a3b8; margin-top: 20px; }
.adm-error {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 40px 20px; font-size: .85rem; color: #ef4444;
}

/* ── 相手チームロゴ トリミングモーダル（imgcrop） ───────────────────── */
.imgcrop-overlay {
  position: fixed; inset: 0; z-index: 700;
  background: var(--white);
  display: flex; flex-direction: column;
  animation: fadeIn .15s ease;
}
.imgcrop-modal {
  display: flex; flex-direction: column;
  height: 100%;
}
.imgcrop-header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top, 0px)) 14px 12px;
  border-bottom: 1px solid var(--border);
}
.imgcrop-title { font-size: .85rem; font-weight: 800; color: var(--text); }
.imgcrop-btn {
  border: none; background: none; cursor: pointer;
  font-size: .82rem; font-weight: 700; padding: 6px 8px;
}
.imgcrop-btn--cancel { color: var(--text3); }
.imgcrop-btn--apply  { color: var(--accent); }
.imgcrop-btn--apply:disabled { color: var(--text3); cursor: default; }

.imgcrop-stage {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  background: #15171c;
  overflow: hidden;
}
.imgcrop-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.55), 0 0 0 1.5px rgba(255,255,255,.9);
  touch-action: none;
}
.imgcrop-img {
  position: absolute; left: 50%; top: 50%;
  max-width: none; max-height: none;
  user-select: none; -webkit-user-drag: none;
}

/* 表示専用：丸アイコン表示を想像しやすくする円形ガイド（出力には影響しない） */
.imgcrop-circle-guide {
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.4);
  border: 1.5px solid rgba(255,255,255,.95);
  pointer-events: none;
}

.imgcrop-controls {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--border);
}
.imgcrop-zoom-label { font-size: .72rem; font-weight: 700; color: var(--text2); white-space: nowrap; }
.imgcrop-zoom-icon { font-size: .8rem; color: var(--text3); width: 16px; text-align: center; }
.imgcrop-zoom-slider { flex: 1; accent-color: var(--accent); }

/* ===== 成功アニメーション（共通・B案 Apple風）=====
   固有プレフィックス sa- で既存UIに非干渉。z-index:1200（既存モーダル<1100より上・boot-splash 9999 未満）。 */
.sa-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(13, 27, 56, .30);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; animation: saScrimIn .28s ease forwards;
  pointer-events: auto;
}
.sa-overlay.sa-out { animation: saScrimOut .3s ease forwards; }
@keyframes saScrimIn  { to { opacity: 1; } }
@keyframes saScrimOut { to { opacity: 0; } }

.sa-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 34px 44px 30px; border-radius: 26px; max-width: 82vw;
  background: rgba(255, 255, 255, .80);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(13, 27, 56, .22);
  opacity: 0; transform: scale(.9);
  animation: saPop .46s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes saPop { to { opacity: 1; transform: scale(1); } }

.sa-icon { width: 78px; height: 78px; display: flex; align-items: center; justify-content: center; }
.sa-mark { overflow: visible; }
.sa-ring  { stroke-dasharray: 1; stroke-dashoffset: 1; animation: saDraw .46s cubic-bezier(.16, 1, .3, 1) .16s forwards; }
.sa-check { stroke-dasharray: 1; stroke-dashoffset: 1; animation: saDraw .40s cubic-bezier(.16, 1, .3, 1) .48s forwards; }
@keyframes saDraw { to { stroke-dashoffset: 0; } }

.sa-message {
  margin-top: 20px; font-weight: 800; font-size: 1.02rem; color: #0d1b38;
  text-align: center; letter-spacing: .01em; line-height: 1.5;
  opacity: 0; transform: translateY(6px);
  animation: saRise .46s cubic-bezier(.16, 1, .3, 1) .66s forwards;
}
@keyframes saRise { to { opacity: 1; transform: none; } }

/* backdrop-filter 非対応環境：ほぼ不透明の白カード＋濃いめ暗幕にフォールバック */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sa-overlay { background: rgba(20, 33, 64, .46); }
  .sa-card { background: #ffffff; }
}

/* reduced-motion：線描画・scale・暗幕アニメを省き、静的表示＋短いfadeのみ */
@media (prefers-reduced-motion: reduce) {
  .sa-overlay { animation: none; opacity: 1; }
  .sa-overlay.sa-out { animation: none; opacity: 0; transition: opacity .2s ease; }
  .sa-card { animation: none; opacity: 1; transform: none; }
  .sa-ring, .sa-check { stroke-dashoffset: 0; animation: none; }
  .sa-message { animation: none; opacity: 1; transform: none; }
}
