
    /* === 1. 共通ベーススタイル === */
    html, body {
      width: 100% !important;
      max-width: 100% !important; margin: 0 !important; padding: 0 !important;
      background-color: #111827; color: #f8fafc;
      font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
    }
    html.light-mode,
    html.light-mode body {
      background-color: #f8fafc;
      color: #0f172a;
      color-scheme: light;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
    .hidden { display: none !important; }

    /* === 2. 難易度・FC・オプションバッジ === */
    .part-zone {
      width: 52px;
      flex-shrink: 0;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .fc-zone {
      width: 52px;
      flex-shrink: 0;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .p-badge {
      display: inline-block;
      padding: 2px 0; border-radius: 3px; font-size: 11px; font-weight: 900;
      text-align: center; width: 100%; line-height: 1.2; flex-shrink: 0;
    }
    .p-mas { background: #d32df0 !important; color: #ffffff; }
    .p-ext { background: #ff2a2a !important; color: #ffffff; }
    .p-adv { background: #ffcc00 !important; color: #000000; }
    .p-bsc { background: #4da6ff !important; color: #ffffff; }

    .fc-unified-badge {
      display: inline-block; width: 100%; text-align: center; font-size: 9px;
      font-weight: 900;
      padding: 1px 0; border-radius: 2px; line-height: 1.2; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }
    .fc-unified-badge.fc { background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%); color: #1e3a8a; border: 1px solid #475569; }
    .fc-unified-badge.exc { background: linear-gradient(180deg, #fef08a 0%, #f59e0b 100%); color: #7f1d1d; border: 1px solid #b45309; }

    /* オプションバッジの基本設定 */
    .opt-badge {
      display: inline-block;
      width: 44px; text-align: center; padding: 1px 0; border-radius: 2px; font-size: 9px; font-weight: bold;
      line-height: 1.2; flex-shrink: 0; background: transparent;
    }
    .opt-slot { display: inline-block; flex-shrink: 0; }

    /* SKILLタブ（黒背景）用のカラー */
    .opt-ran      { color: #86efac; border: 1px solid #15803d; } 
    .opt-sra      { color: #ffedd5; border: 1px solid #c2410c; } 
    .opt-ran-plus { color: #67e8f9; border: 1px solid #0369a1; } 
    .opt-sra-plus { color: #fecdd3; border: 1px solid #be123c; } 
    .opt-bass-mirror { color: #c4b5fd; border: 1px solid #7c3aed; width:54px; }

    /* === 3. ヘッダー＆スクロール固定エリア === */
    .p-header { background: #1f2937; position: sticky; top: 0; z-index: 100; width: 100%; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
    .score-row { display: flex; width: 100%; height: 48px; align-items: center; border-bottom: 1px solid #374151; }
    .score-cell { flex: 1; text-align: center; display: flex; flex-direction: column; justify-content: center; height: 100%; }
    .score-cell.border-r { border-right: 1px solid #374151; }
    .score-lbl { font-size: 9px; color: #9ca3af; font-weight: bold; }
    .score-val { font-size: 15px; font-weight: 900; color: #ffffff; }
    
    .m-gold-text { background: linear-gradient(180deg, #ffe066 0%, #f59e0b 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; }
    .m-rainbow-text { background: linear-gradient(90deg, #4ade80 0%, #3b82f6 30%, #a855f7 60%, #ec4899 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; }

    .p-tabs { display: flex; background: #111827; width: 100%; padding: 2px; gap: 2px; }
    .p-tab-btn { flex: 1; padding: 10px 0; text-align: center; font-size: 13px; font-weight: bold; color: #9ca3af; background: #1f2937; cursor: pointer; }
    .p-tab-btn.active { background: #3b82f6; color: #ffffff; }
    .search-bar-container { display: flex; gap: 6px; width: 100%; padding: 6px 4px 4px 4px; background: #111827; }
    .search-input { flex: 1; padding: 8px; border: 1px solid #4b5563; background: #1f2937; color: white; font-size: 14px; outline: none; border-radius: 4px; }
    .btn-add-inline { padding: 0 14px; font-size: 13px; font-weight: bold; background: #3b82f6; color: white; border: none; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
    .btn-add-inline:active { background: #2563eb; }

    /* === 4. リスト＆カード共通デザイン === */
    .p-container { padding: 4px; width: 100%; }
    .sk-section { margin-bottom: 12px; }
    .sk-section h2 { font-size: 13px; font-weight: 900; color: #38bdf8; margin: 6px 0 4px 0; padding-left: 4px; border-left: 3px solid #2563eb; }
    .list-container { display: flex; flex-direction: column; gap: 4px; }
    
    /* 曲カードの外枠・配置はlayout-canonical.cssの.dc-cardで一元管理する。 */
    .m-action-btn { font-size: 11px; font-weight: bold; border: none; cursor: pointer; padding: 3px 8px; border-radius: 4px; transition: background 0.1s; }
    .btn-e { color: #2563eb; background: #f3f4f6; }
    .btn-e:active { background: #e5e7eb; }
    .btn-d { color: #dc2626; background: #fee2e2; }
    .btn-d:active { background: #fca5a5; }

    /* === 5. モーダル === */
    .mdl-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: none; justify-content: center; align-items: flex-end; z-index: 1000; }
    .mdl-sheet { background: white; width: 100%; border-radius: 8px 8px 0 0; padding: 12px; }
    .f-group { margin-bottom: 6px; }
    .f-group label { display: block; font-size: 11px; font-weight: bold; margin-bottom: 2px; color: #4b5563; }
    .f-group input, .f-group select { width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #ccc; font-size: 16px; outline: none; }
    .btn-block { display: flex; gap: 6px; margin-top: 10px; }
    .btn-submit { flex: 1; padding: 10px; background: #3b82f6; color: white; border: none; border-radius: 4px; font-weight: bold; font-size: 13px; }
    .btn-cancel { flex: 1; padding: 10px; background: #e5e7eb; color: #4b5563; border: none; border-radius: 4px; font-weight: bold; font-size: 13px; }
  
.auth-screen { min-height: 100vh; display:flex; align-items:center; justify-content:center; padding:20px; background:#111827; }
.auth-card { width:100%; max-width:380px; background:#1f2937; border:1px solid #374151; border-radius:8px; padding:18px; box-shadow:0 10px 30px rgba(0,0,0,.35); }
.auth-card h1 { font-size:20px; margin-bottom:16px; text-align:center; }
.auth-card label { display:block; font-size:12px; font-weight:bold; color:#9ca3af; margin:10px 0 4px; }
.auth-card input { width:100%; padding:10px; border:1px solid #4b5563; border-radius:4px; background:#111827; color:#fff; font-size:16px; }
.auth-card button { width:100%; margin-top:14px; padding:10px; border:0; border-radius:4px; background:#3b82f6; color:#fff; font-weight:bold; }

.auth-register-notice { margin:12px 0 2px; padding:10px 11px; border:1px solid #f59e0b; border-radius:6px; background:rgba(245,158,11,.08); color:#e5e7eb; font-size:12px; line-height:1.65; }
.auth-register-notice strong { display:block; margin-bottom:3px; color:#fbbf24; font-size:13px; }
.auth-register-notice a { color:#60a5fa; font-weight:bold; text-decoration:underline; overflow-wrap:anywhere; }
.auth-switch { margin-top:12px; text-align:center; color:#60a5fa; font-size:13px; cursor:pointer; }
.header-user { margin-left:auto; font-size:11px; color:#93c5fd; cursor:pointer; padding:5px 8px; }
.user-header-row { display:flex; align-items:center; padding:0 6px; min-height:30px; background:#111827; }
.user-header-title { font-size:10px; color:#9ca3af; }
.suggestion-list { max-height:180px; overflow:auto; margin-top:4px; border:1px solid #d1d5db; border-radius:4px; background:#fff; }
.suggestion { display:flex; justify-content:space-between; width:100%; padding:8px; border:0; border-bottom:1px solid #eee; background:#fff; text-align:left; color:#111827; font-size:12px; }
.suggestion span { color:#6b7280; white-space:nowrap; margin-left:8px; }
.skill-preview { background:#e5e7eb; border-radius:4px; padding:8px; font-size:18px; font-weight:900; text-align:center; color:#111827; }
.mypage-modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:none; align-items:flex-end; z-index:1100; }
.mypage-sheet { width:100%; background:#fff; color:#111827; border-radius:8px 8px 0 0; padding:14px; }
.mypage-sheet input { width:100%; padding:9px; border:1px solid #ccc; border-radius:4px; font-size:16px; }

.hot-tag {
  display:inline-block;
  flex-shrink:0;
  padding:2px 5px;
  border-radius:3px;
  font-size:9px;
  line-height:1.1;
  font-weight:900;
  color:#7f1d1d;
  background:#fef2f2;
  border:1px solid #fecaca;
}
.dc-card .hot-tag {
  color:#fecaca !important;
  background:#450a0a !important;
  border-color:#991b1b !important;
}


/* === v9 UI refresh === */
body { background:#0b1220; }
.p-header { background:#0f172a; }
.user-header-row { min-height:42px; padding:0 10px; border-bottom:1px solid #1e293b; }
.user-header-title { font-size:13px; font-weight:900; color:#e2e8f0; }
.header-user { font-size:12px; font-weight:bold; color:#93c5fd; padding:7px 8px; }
.admin-entry { border:1px solid #334155; background:#1e293b; color:#cbd5e1; border-radius:6px; padding:6px 9px; font-size:11px; font-weight:bold; margin-left:auto; }
.score-row { height:58px; }
.score-lbl { font-size:10px; }
.score-val { font-size:18px; }
.p-tabs { padding:5px; gap:5px; background:#0b1220; }
.p-tab-btn { border-radius:6px; padding:11px 0; }
.search-bar-container { padding:7px 6px; background:#0b1220; }
.search-input { min-height:42px; }
.btn-add-inline { min-height:42px; border-radius:6px; }
.p-container { padding:6px; }

.mdl-mask, .mypage-modal, .admin-form-mask {
  align-items:flex-end;
  backdrop-filter: blur(2px);
}
.mdl-sheet, .mypage-sheet, .admin-form-sheet {
  max-height:92vh;
  overflow:auto;
  border-radius:14px 14px 0 0;
  padding:16px;
}
.f-group { margin-bottom:10px; }
.f-group label { margin-bottom:5px; }
.f-group input, .f-group select,
.mypage-sheet input, .admin-form-sheet input, .admin-form-sheet select {
  min-height:46px;
  border-radius:8px;
  border:1px solid #cbd5e1;
}
.btn-block { margin-top:14px; }
.btn-submit, .btn-cancel { min-height:44px; border-radius:8px; }
.skill-preview { border-radius:8px; padding:11px; }
.suggestion-list { border-radius:8px; max-height:220px; }
.suggestion { padding:11px 9px; }

.form-grid-two { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.danger-zone { margin-top:22px; padding-top:14px; border-top:1px solid #e5e7eb; }
.btn-danger-wide { width:100%; min-height:44px; border:1px solid #fecaca; background:#fef2f2; color:#b91c1c; border-radius:8px; font-weight:900; }

.admin-modal { position:fixed; inset:0; z-index:1200; display:none; flex-direction:column; min-height:0; height:100dvh; background:#0b1220; color:#f8fafc; overflow:hidden; }
.admin-header { position:relative; z-index:5; flex:0 0 auto; background:#0f172a; padding:10px; border-bottom:1px solid #1e293b; }
.admin-title-row { display:flex; gap:8px; align-items:center; }
.admin-title { flex:1; font-size:17px; font-weight:900; }
.admin-close { border:0; background:#334155; color:#fff; border-radius:7px; padding:8px 11px; font-weight:bold; }
.admin-tabs { display:flex; gap:6px; margin-top:10px; }
.admin-tab { flex:1; min-height:40px; border:0; border-radius:7px; background:#1e293b; color:#94a3b8; font-weight:900; }
.admin-tab.active { background:#3b82f6; color:#fff; }
.admin-toolbar { display:flex; gap:6px; margin-top:8px; }
.admin-toolbar input { flex:1; min-height:42px; background:#111827; border:1px solid #334155; color:#fff; border-radius:7px; padding:8px; }
.admin-toolbar button { border:0; border-radius:7px; background:#3b82f6; color:#fff; padding:0 12px; font-weight:900; }
.admin-body { flex:1 1 auto; min-height:0; padding:8px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.admin-card { background:#fff; color:#111827; border-radius:8px; padding:10px; margin-bottom:7px; box-shadow:0 1px 3px rgba(0,0,0,.25); }
.admin-card-top { display:flex; align-items:center; gap:6px; }
.admin-card-title { flex:1; min-width:0; font-weight:900; font-size:13px; word-break:break-all; }
.admin-card-meta { margin-top:5px; font-size:11px; color:#64748b; display:flex; gap:9px; flex-wrap:wrap; }
.admin-actions { display:flex; gap:5px; margin-left:auto; }
.admin-actions button { border:0; border-radius:6px; padding:5px 8px; font-size:10px; font-weight:900; }
.admin-edit { background:#dbeafe; color:#1d4ed8; }
.admin-reset { background:#fef3c7; color:#92400e; }
.admin-delete { background:#fee2e2; color:#b91c1c; }
.admin-form-mask { position:fixed; inset:0; z-index:1300; display:none; background:rgba(0,0,0,.65); }
.admin-form-sheet { width:100%; background:#fff; color:#111827; }
.admin-form-sheet label { display:block; font-size:11px; font-weight:900; color:#475569; margin:8px 0 4px; }
.hot-switch { display:flex; align-items:center; gap:9px; margin-top:12px; font-size:13px; font-weight:900; }
.hot-switch input { width:20px !important; min-height:20px !important; }
.empty-state { padding:22px 10px; text-align:center; color:#64748b; font-size:12px; }
.section-note { font-size:11px; color:#64748b; line-height:1.5; margin-top:6px; }

/* === v13 === */
.mypage-name-row { display:flex; gap:7px; align-items:center; }
.mypage-name-row input { flex:1; }
.btn-name-change {
  flex:0 0 auto;
  min-height:46px;
  border:0;
  border-radius:8px;
  padding:0 15px;
  background:#3b82f6;
  color:#fff;
  font-weight:900;
}
.master-request-area {
  margin:4px 0 12px;
  padding:11px;
  border:1px solid #fbbf24;
  background:#fffbeb;
  color:#78350f;
  border-radius:9px;
}
.master-request-title { font-size:12px; font-weight:900; }
.master-request-note { font-size:11px; line-height:1.5; margin-top:3px; color:#92400e; }
.btn-request-master {
  width:100%;
  min-height:40px;
  margin-top:8px;
  border:0;
  border-radius:7px;
  background:#d97706;
  color:white;
  font-weight:900;
}
.request-actions { display:flex; gap:5px; margin-top:8px; }
.request-actions button {
  flex:1;
  min-height:36px;
  border:0;
  border-radius:6px;
  font-size:11px;
  font-weight:900;
}
.request-approve { background:#dcfce7; color:#166534; }
.request-hot { background:#fee2e2; color:#991b1b; }
.request-reject { background:#f1f5f9; color:#475569; }

/* === v14 管理者曲マスター表 === */
.admin-body.admin-body-table { padding:0; overflow:auto; }
.master-sheet-wrap {
  width:100%;
  overflow:auto;
  background:#fff;
}
.master-sheet {
  border-collapse:separate;
  border-spacing:0;
  min-width:1120px;
  width:100%;
  color:#111827;
  font-size:11px;
}
.master-sheet th,
.master-sheet td {
  border-right:1px solid #d1d5db;
  border-bottom:1px solid #d1d5db;
  padding:5px;
  background:#fff;
  white-space:nowrap;
}
.master-sheet th {
  position:sticky;
  top:0;
  z-index:3;
  background:#e2e8f0;
  font-weight:900;
  text-align:center;
}
.master-sheet th:first-child,
.master-sheet td:first-child {
  position:sticky;
  left:0;
  z-index:2;
}
.master-sheet th:first-child { z-index:4; }
.master-hot-cell { width:54px; text-align:center; }
.master-title-cell { min-width:240px; width:240px; }
.master-level-cell { width:78px; text-align:center; }
.master-action-cell { width:110px; text-align:center; }
.master-sheet input[type="text"],
.master-sheet input[type="number"] {
  width:100%;
  min-height:34px;
  border:1px solid #cbd5e1;
  border-radius:5px;
  padding:5px 7px;
  background:#fff;
  color:#111827;
  font-size:12px;
}
.master-sheet input[type="number"] { text-align:center; }
.master-row-actions {
  display:flex;
  gap:4px;
  justify-content:center;
}
.master-row-actions button {
  border:0;
  border-radius:5px;
  padding:6px 8px;
  font-size:10px;
  font-weight:900;
}
.master-row-save { background:#dbeafe; color:#1d4ed8; }
.master-row-delete { background:#fee2e2; color:#b91c1c; }

.request-level-edit {
  width:100px;
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:6px;
  padding:6px 8px;
  font-size:14px;
  font-weight:800;
}
.request-edit-fields {
  display:flex;
  align-items:flex-end;
  gap:8px;
  margin-top:8px;
}
.request-edit-field label {
  display:block;
  margin-bottom:3px;
  color:#64748b;
  font-size:10px;
  font-weight:900;
}
.request-part-edit {
  min-width:100px;
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:6px;
  padding:6px 28px 6px 8px;
  background:#fff;
  color:#111827;
  font-size:13px;
  font-weight:800;
}
.pending-badge {
  display:inline-block;
  padding:2px 5px;
  border-radius:4px;
  background:#fef3c7;
  color:#92400e;
  border:1px solid #fcd34d;
  font-size:9px;
  font-weight:900;
  vertical-align:middle;
  margin-right:4px;
}

/* === v14.5 TOTALスキル帯カラー ===
   TOTALのスキル帯を基準に、TOTAL / HOT / OTHER の数値へ同じ色を適用 */


























/* === v14.6 曲別Skillカラー === */






























/* 行側もSkill帯に合わせて薄く配色 */
.skill-row-orange { background:linear-gradient(90deg,rgba(255,122,34,.14),#111827 42%) !important; }
.skill-row-orange-grad { background:linear-gradient(90deg,rgba(255,155,67,.15),#111827 42%) !important; }
.skill-row-yellow { background:linear-gradient(90deg,rgba(255,230,0,.12),#111827 42%) !important; }
.skill-row-yellow-grad { background:linear-gradient(90deg,rgba(255,233,77,.14),#111827 42%) !important; }
.skill-row-green { background:linear-gradient(90deg,rgba(34,209,59,.13),#111827 42%) !important; }
.skill-row-green-grad { background:linear-gradient(90deg,rgba(68,228,91,.15),#111827 42%) !important; }
.skill-row-blue { background:linear-gradient(90deg,rgba(47,145,255,.14),#111827 42%) !important; }
.skill-row-blue-grad { background:linear-gradient(90deg,rgba(83,173,255,.16),#111827 42%) !important; }
.skill-row-purple { background:linear-gradient(90deg,rgba(224,44,255,.13),#111827 42%) !important; }
.skill-row-purple-grad { background:linear-gradient(90deg,rgba(234,92,255,.15),#111827 42%) !important; }
.skill-row-red { background:linear-gradient(90deg,rgba(255,22,56,.13),#111827 42%) !important; }
.skill-row-red-grad { background:linear-gradient(90deg,rgba(255,77,104,.15),#111827 42%) !important; }
.skill-row-bronze { background:linear-gradient(90deg,rgba(199,123,69,.15),#111827 42%) !important; }
.skill-row-silver { background:linear-gradient(90deg,rgba(203,213,225,.13),#111827 42%) !important; }
.skill-row-gold { background:linear-gradient(90deg,rgba(255,216,61,.15),#111827 42%) !important; }
.skill-row-rainbow {
  background:linear-gradient(90deg,rgba(59,130,246,.16),rgba(168,85,247,.12),#111827 48%) !important;
}
.skill-row-deep-rainbow {
  background:linear-gradient(90deg,rgba(0,119,255,.20),rgba(214,44,255,.16),rgba(255,45,141,.12),#111827 55%) !important;
}

/* === v3.18.4: 理論値のCLASSIC除外・1000件超の分割取得 === */
@property --skill-band-light-alpha {
  syntax:"<number>";
  inherits:false;
  initial-value:.03;
}
@property --skill-border-light-alpha {
  syntax:"<number>";
  inherits:false;
  initial-value:.04;
}
:root {
  --skill-sparkle-cycle:1.6s;
}
@keyframes skill-sparkle-text-sweep {
  0% { background-position:0 0,180% 0; }
  100% { background-position:0 0,-80% 0; }
}
@keyframes skill-sparkle-text-glow {
  0%,100% { filter:brightness(.94) saturate(1.04) drop-shadow(0 0 .45px rgba(255,255,255,.28)) drop-shadow(0 0 1.1px rgba(236,72,153,.22)); }
  50% { filter:brightness(1.12) saturate(1.14) drop-shadow(0 0 .85px rgba(255,255,255,.58)) drop-shadow(0 0 2.3px rgba(236,72,153,.44)); }
}
@keyframes skill-sparkle-band-glow {
  0%,100% { filter:brightness(1.02) saturate(1.08); }
  50% { filter:brightness(1.7) saturate(1.3); }
}
@keyframes skill-sparkle-band-glow-light {
  0%,100% { --skill-band-light-alpha:.04; }
  50% { --skill-band-light-alpha:.56; }
}
@keyframes skill-sparkle-border-pulse {
  0%,100% { opacity:.78; filter:brightness(1.05) drop-shadow(0 0 1px rgba(255,255,255,.5)); }
  50% { opacity:1; filter:brightness(1.85) drop-shadow(0 0 4px rgba(255,255,255,.95)); }
}
@keyframes skill-sparkle-band-pulse {
  0%,100% { opacity:.78; filter:brightness(1.05); }
  50% { opacity:1; filter:brightness(1.85); }
}
@keyframes skill-sparkle-border-pulse-light {
  0%,100% { --skill-border-light-alpha:.04; }
  50% { --skill-border-light-alpha:.62; }
}
@keyframes skill-sparkle-row-glow {
  0%,100% { filter:brightness(1); }
  50% { filter:brightness(1.18); }
}

/* 190.00以上の登録曲・スキル対象は、枠そのものだけを明滅させる。 */
.dc-card:has(.skill-box-sparkle-rainbow)::before {
  padding:2.3px !important;
  background-size:100% 100% !important;
  animation:skill-sparkle-border-pulse var(--skill-sparkle-cycle) ease-in-out infinite !important;
}
:is(.dc-card .dc-skill,.rate-compare-dialog .rate-skill).skill-box-sparkle-rainbow::after {
  animation:skill-sparkle-band-pulse var(--skill-sparkle-cycle) ease-in-out infinite !important;
}

/* プレイヤーリストは枠内光点を使わず、行の枠とスキル文字だけを発光させる。 */
.user-list-row-sparkle-rainbow {
  position:relative !important;
  overflow:hidden !important;
  border-color:#ff2d8d !important;
  background:linear-gradient(90deg,rgba(0,119,255,.20),rgba(214,44,255,.16),rgba(255,45,141,.12),#111827 58%) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 0 9px rgba(236,72,153,.16) !important;
  animation:skill-sparkle-row-glow var(--skill-sparkle-cycle) ease-in-out infinite !important;
}
body.light-mode .user-list-row-sparkle-rainbow,
body.light-mode .user-list-row-sparkle-rainbow:active {
  border:2px solid #db2777 !important;
  background:linear-gradient(90deg,rgba(219,39,119,.16),rgba(124,58,237,.13),rgba(14,165,233,.11),#d8dde5 65%) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.62) !important;
  animation:none !important;
  filter:none !important;
}
/* ヘッダーとユーザーリストの9500値は、テーマ別の小さな文字グローを使う。 */
:is(.score-val,.user-list-skill-value,.user-detail-skill-value).score-rank-sparkle-rainbow {
  animation:skill-sparkle-text-sweep var(--skill-sparkle-cycle) linear infinite,skill-sparkle-text-glow var(--skill-sparkle-cycle) ease-in-out infinite !important;
}
@media (prefers-reduced-motion: reduce) {
  /* iPhoneの「視差効果を減らす」がONでも、9500帯の演出だけは維持する。 */
  body:not(.light-mode) .score-rank-sparkle-rainbow {
    animation:skill-sparkle-text-sweep var(--skill-sparkle-cycle) linear infinite,
      skill-sparkle-text-glow var(--skill-sparkle-cycle) ease-in-out infinite !important;
  }
  body:not(.light-mode) .skill-box-sparkle-rainbow {
    animation:none !important;
  }
  body:not(.light-mode) .dc-card:has(.skill-box-sparkle-rainbow)::before {
    animation:skill-sparkle-border-pulse var(--skill-sparkle-cycle) ease-in-out infinite !important;
  }
  body:not(.light-mode) :is(.dc-card .dc-skill,.rate-compare-dialog .rate-skill).skill-box-sparkle-rainbow::after {
    animation:skill-sparkle-band-pulse var(--skill-sparkle-cycle) ease-in-out infinite !important;
  }
  body:not(.light-mode) .user-list-row-sparkle-rainbow {
    animation:skill-sparkle-row-glow var(--skill-sparkle-cycle) ease-in-out infinite !important;
  }
}

/* === v14.7 共通通知モーダル === */
.site-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(2px);
}
.site-dialog {
  width: 100%;
  max-width: 390px;
  overflow: hidden;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .48);
}
.site-dialog-head {
  padding: 16px 18px 10px;
  font-size: 16px;
  font-weight: 900;
}
.site-dialog-message {
  padding: 4px 18px 18px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.site-dialog-actions {
  padding: 0 18px 18px;
}
.site-dialog-ok {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: #3b82f6;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.site-dialog-ok:active {
  background: #2563eb;
}

/* === v14.9 スコア登録モーダルを中央表示 === */
.mdl-mask {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(2, 6, 23, .72) !important;
  backdrop-filter: blur(3px);
}

.mdl-sheet {
  width: 100% !important;
  max-width: 520px !important;
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  border: 1px solid #cbd5e1;
  border-radius: 14px !important;
  padding: 16px !important;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
  -webkit-overflow-scrolling: touch;
}

/* iPhoneなど高さが低い端末でも上下に余白を残しつつ中央配置 */
@media (max-width: 600px) {
  .mdl-mask {
    padding: 12px !important;
  }

  .mdl-sheet {
    max-width: 460px !important;
    max-height: calc(100dvh - 24px) !important;
    border-radius: 14px !important;
  }
}

/* === v14.11 スコア登録モーダル書式統一 === */
.mdl-mask {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(2, 6, 23, .72) !important;
  backdrop-filter: blur(3px);
}

.mdl-sheet {
  width: 100% !important;
  max-width: 480px !important;
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding: 18px !important;
  border: 1px solid #334155 !important;
  border-radius: 14px !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .48) !important;
  -webkit-overflow-scrolling: touch;
}

.mdl-sheet #domModalTitle {
  margin: 0 0 14px !important;
  color: #f8fafc !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}

.mdl-sheet .f-group {
  margin-bottom: 12px !important;
}

.mdl-sheet .f-group label {
  display: block;
  margin: 0 0 5px !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.mdl-sheet .f-group input,
.mdl-sheet .f-group select {
  width: 100%;
  min-height: 46px !important;
  padding: 9px 11px !important;
  border: 1px solid #475569 !important;
  border-radius: 8px !important;
  outline: none;
  background: #111827 !important;
  color: #f8fafc !important;
  font-size: 16px !important;
}

.mdl-sheet .f-group input::placeholder {
  color: #64748b !important;
}

.mdl-sheet .f-group input:focus,
.mdl-sheet .f-group select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .18);
}

.mdl-sheet #formLevel[readonly] {
  background: #1e293b !important;
  color: #94a3b8 !important;
}

.mdl-sheet .skill-preview {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #334155;
  border-radius: 8px !important;
  background: #1e293b !important;
  color: #f8fafc !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

.mdl-sheet .form-grid-two {
  gap: 10px !important;
}

.mdl-sheet .btn-block {
  gap: 8px !important;
  margin-top: 16px !important;
}

.mdl-sheet .btn-submit,
.mdl-sheet .btn-cancel {
  min-height: 46px !important;
  border: 0 !important;
  border-radius: 9px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.mdl-sheet .btn-submit {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

.mdl-sheet .btn-cancel {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

.mdl-sheet .suggestion-list {
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  background: #111827 !important;
}

.mdl-sheet .suggestion {
  border-bottom: 1px solid #1e293b !important;
  background: #111827 !important;
  color: #f8fafc !important;
}

.mdl-sheet .suggestion:hover {
  background: #1e293b !important;
}

.mdl-sheet .master-request-area {
  border-color: #92400e !important;
  background: #451a03 !important;
  color: #fef3c7 !important;
}

.mdl-sheet .master-request-title,
.mdl-sheet .master-request-note {
  color: #fef3c7 !important;
}

@media (max-width: 600px) {
  .mdl-mask {
    padding: 12px !important;
  }

  .mdl-sheet {
    max-width: 460px !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 16px !important;
  }
}

/* === v15 === */
.p-tabs .p-tab-btn { min-width: 0; }

.users-toolbar {
  position: sticky;
  top: 128px;
  z-index: 4;
  padding: 8px 3px;
  background: #030712;
}
.users-toolbar input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #374151;
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
  font-size: 14px;
}
.user-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 92px 38px;
  gap: 7px;
  align-items: center;
  min-height: 60px;
  margin-bottom: 6px;
  padding: 9px 8px;
  border: 1px solid #273449;
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
  cursor: pointer;
}
.user-list-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-list-total {
  text-align: right;
  font-size: 13px;
  font-weight: 900;
}
.user-list-date {
  color: #94a3b8;
  text-align: right;
  font-size: 10px;
}
.favorite-toggle {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: #1e293b;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
}
.favorite-toggle.active { color: #facc15; }
.favorite-toggle.pending {
  cursor: wait;
  transform: scale(.92);
}

.user-detail-page {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: none;
  overflow-y: auto;
  background: #030712;
  color: #f8fafc;
}
.user-detail-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #1f2937;
  background: #0f172a;
}
.user-detail-back {
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: #1e293b;
  color: #e2e8f0;
  font-weight: 900;
}
.user-detail-name {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #263244;
  background: #0f172a;
}
.user-detail-summary > div {
  padding: 10px 4px;
  border-right: 1px solid #263244;
  text-align: center;
}
.user-detail-summary > div:last-child { border-right: 0; }
.user-detail-summary span {
  display: block;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 900;
}
.user-detail-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
}
.user-detail-body { padding: 8px 3px 28px; }

.rate-compare-dialog {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.rate-compare-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid #334155;
}
.rate-compare-head > div { flex: 1; min-width: 0; }
.rate-compare-label { color: #60a5fa; font-size: 11px; font-weight: 900; }
.rate-compare-title {
  margin-top: 2px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rate-compare-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: #1e293b;
  color: #fff;
  font-size: 20px;
}
.rate-compare-body {
  max-height: calc(100dvh - 130px);
  overflow-y: auto;
  padding: 8px;
}
.rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 70px;
  gap: 7px;
  align-items: center;
  padding: 9px 8px;
  border-bottom: 1px solid #1f2937;
}
.rate-row.self { background: rgba(37,99,235,.12); }
.rate-user {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rate-value { text-align: right; font-size: 13px; font-weight: 900; }
.rate-skill { color: #94a3b8; text-align: right; font-size: 10px; }

.mypage-favorites {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #334155;
}
.mypage-section-title {
  margin-bottom: 8px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}
.mypage-section-title span {
  margin-left: 4px;
  color: #64748b;
  font-size: 10px;
}
.favorite-user-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 36px 36px 42px;
  gap: 5px;
  align-items: center;
  margin-bottom: 6px;
  padding: 7px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
}
.favorite-user-row .name {
  overflow: hidden;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.favorite-user-row button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: #1e293b;
  color: #cbd5e1;
  font-weight: 900;
}
.favorite-user-row .remove { color: #fca5a5; }

.dc-card[data-compare-song] { cursor: pointer; }

/* === v15.1 UI統一 === */

/* ① マイページ: 下部固定ではなく中央モーダル */
#mypageModal.mypage-modal {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(2, 6, 23, .72) !important;
  backdrop-filter: blur(3px);
}

#mypageModal .mypage-sheet {
  width: 100% !important;
  max-width: 480px !important;
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding: 18px !important;
  border: 1px solid #334155 !important;
  border-radius: 14px !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  box-shadow: 0 20px 50px rgba(0,0,0,.48) !important;
  -webkit-overflow-scrolling: touch;
}

#mypageModal .mypage-sheet h3 {
  color: #f8fafc !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}

#mypageModal .mypage-sheet label {
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

#mypageModal .mypage-sheet input {
  min-height: 46px !important;
  padding: 9px 11px !important;
  border: 1px solid #475569 !important;
  border-radius: 8px !important;
  background: #111827 !important;
  color: #f8fafc !important;
  font-size: 16px !important;
}

#mypageModal .mypage-sheet input::placeholder {
  color: #64748b !important;
}

#mypageModal .section-note {
  color: #94a3b8 !important;
}

#mypageModal .btn-name-change,
#mypageModal .btn-submit {
  background: #3b82f6 !important;
  color: #fff !important;
}

#mypageModal .btn-cancel {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

#mypageModal .mypage-favorites {
  border-top-color: #334155 !important;
}

#mypageModal .mypage-section-title {
  color: #f8fafc !important;
}

#mypageModal .mypage-section-title span {
  color: #94a3b8 !important;
}

#mypageModal .favorite-user-row {
  border-color: #334155 !important;
  background: #111827 !important;
}

#mypageModal .favorite-user-row .name {
  color: #f8fafc !important;
}

#mypageModal .danger-zone {
  border-top-color: #334155 !important;
}

#mypageModal .danger-zone button {
  border-color: #7f1d1d !important;
  background: #2a1115 !important;
  color: #fca5a5 !important;
}

/* ③ スコア登録: input / select の高さ統一、矢印を見やすく */
.mdl-sheet .f-group input,
.mdl-sheet .f-group select {
  box-sizing: border-box !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 12px !important;
  line-height: 48px !important;
}

.mdl-sheet .f-group select {
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 42px !important;
  background-color: #111827 !important;
  background-image:
    linear-gradient(10deg, transparent 50%, #e2e8f0 50%),
    linear-gradient(10deg, #e2e8f0 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 12px) 20px !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
  color: #f8fafc !important;
}

.mdl-sheet #formLevel[readonly] {
  height: 48px !important;
  min-height: 48px !important;
  line-height: 48px !important;
}

/* ④ 登録一覧もスキル対象と同じダーク基調 */
#viewAllManage {
  background: #030712 !important;
}

#viewAllManage .m-actions button {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

#viewAllManage .m-actions .btn-delete,
#viewAllManage .m-actions [data-del] {
  color: #fca5a5 !important;
}

@media (max-width: 600px) {
  #mypageModal.mypage-modal {
    padding: 12px !important;
  }

  #mypageModal .mypage-sheet {
    max-width: 460px !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 16px !important;
  }
}

/* === v15.2 === */

/* ① 曲名サジェスト: 件数が多くてもモーダル内でスクロール */
.mdl-sheet #songSuggestions,
.mdl-sheet .suggestion-list {
  max-height: 220px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* ユーザーリストも同じトーンの枠線 */
.user-list-row {
  border: 1px solid #475569 !important;
  border-radius: 8px !important;
  background: #111827 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
}

.user-list-row:active {
  border-color: #64748b !important;
  background: #172033 !important;
}

/* 保存中などの無効状態 */
button:disabled {
  cursor: default !important;
  opacity: .72 !important;
}

/* === v15.4 Rate比較バッジ === */
.rate-user {
  min-width: 0;
  white-space: normal !important;
}

.rate-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  margin-top: 5px;
  overflow: visible;
  white-space: nowrap;
}

/* 通常カードではFCは列幅いっぱいだが、Rate比較では固定サイズにする */
.rate-badges .fc-unified-badge {
  width: 48px !important;
  min-width: 48px !important;
  padding: 2px 5px !important;
  line-height: 1.2 !important;
  box-sizing: border-box;
}

.rate-badges .opt-badge {
  display: inline-block !important;
  width: auto !important;
  min-width: 48px !important;
  padding: 2px 7px !important;
  box-sizing: border-box;
}

/* m-card用の白背景指定をRate比較に引き継がない */
.rate-badges .opt-ran {
  color: #86efac !important;
  background: transparent !important;
  border: 1px solid #15803d !important;
}
.rate-badges .opt-sra {
  color: #ffedd5 !important;
  background: transparent !important;
  border: 1px solid #c2410c !important;
}
.rate-badges .opt-ran-plus {
  color: #67e8f9 !important;
  background: transparent !important;
  border: 1px solid #0369a1 !important;
}
.rate-badges .opt-sra-plus {
  color: #fecdd3 !important;
  background: transparent !important;
  border: 1px solid #be123c !important;
}

/* === v15.5 オプション利用割合 === */
.rate-option-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #334155;
  background: #111827;
}

.rate-option-summary:empty {
  display: none;
}

.option-share-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 900;
}

.option-share-item strong {
  color: #f8fafc;
  font-size: 12px;
}

.option-share-title {
  width: 100%;
  margin-bottom: 1px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

/* === v15.6 === */

/* #順位表示を廃止 */
.sk-rank { display: none !important; }

/* 登録タブ: 検索 + 複合フィルタ */
#searchArea.search-bar-container {
  display: block;
}
#searchArea.search-bar-container.hidden {
  display: none !important;
}
.record-search-row {
  display: flex;
  gap: 7px;
}
.record-search-row .search-input {
  flex: 1;
  min-width: 0;
}
.record-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px;
}
.record-filter-row select {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid #475569;
  border-radius: 7px;
  background-color: #111827;
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 800;
}
.record-rank-filter-group {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  min-height: 38px;
}
.record-rank-filter-field {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  color: #e5e7eb;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.record-rank-filter-field select {
  width: auto !important;
  min-width: 0;
  height: 38px;
  padding-left: 8px;
  padding-right: 28px;
}
body.light-mode .record-rank-filter-field {
  color: #111827;
}

/* 難易度修正依頼 */
.level-correction-area {
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid #475569;
  border-radius: 8px;
  background: #111827;
}
.level-correction-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.level-correction-title {
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 900;
}
.level-correction-note {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 10px;
}
#btnOpenLevelCorrection,
#btnSendLevelCorrection {
  flex-shrink: 0;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  background: #3b82f6;
  color: #fff;
  font-weight: 900;
}
#btnOpenLevelCorrection {
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}
.level-correction-form {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #334155;
}
.level-correction-form label {
  display: block;
  margin-bottom: 4px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 900;
}
.level-correction-input-row {
  display: flex;
  gap: 7px;
}
.level-correction-input-row input {
  flex: 1;
  min-width: 0;
  height: 40px !important;
  min-height: 40px !important;
  line-height: normal !important;
}
#btnSendLevelCorrection {
  min-width: 122px;
  padding: 0 9px;
  font-size: 10px;
}





/* === v15.8 === */
.users-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 7px;
}
#userSort {
  min-width: 0;
  height: 100%;
  min-height: 40px;
  padding: 0 28px 0 9px;
  border: 1px solid #475569;
  border-radius: 7px;
  background-color: #111827;
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 800;
}
.mypage-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.mypage-title-row h3 {
  margin: 0;
  font-size: 16px;
}
.mypage-close {
  border: 0;
  background: transparent;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 2px 6px 10px;
}
.mypage-logout-zone {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #334155;
}
.mypage-logout {
  width: 100% !important;
  min-height: 42px;
}
@media (max-width: 520px) {
  .users-toolbar {
    grid-template-columns: minmax(0, 1fr) 132px;
  }
  #userSort { font-size: 10px; }
}

/* === FINAL: Cloudflare Turnstile === */
.auth-captcha-wrap {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#authTurnstile {
  width: 100%;
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-captcha-status {
  width: 100%;
  min-height: 16px;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}
.auth-captcha-status.error { color: #fca5a5; }


.instrument-switch{display:flex;gap:4px;align-items:center}
.instrument-btn{
  min-width:54px;
  height:30px;
  border:1px solid transparent;
  border-radius:7px;
  color:#fff;
  font-weight:900;
  cursor:pointer;
  opacity:.46;
  transition:opacity .15s ease,transform .15s ease,box-shadow .15s ease;
}
.instrument-btn[data-instrument="GF"]{
  background:#e8336a;
  border-color:#e8336a;
}
.instrument-btn[data-instrument="DM"]{
  background:#3caa2a;
  border-color:#3caa2a;
}
.instrument-btn.active{
  opacity:1;
  transform:translateY(-1px);
  box-shadow:0 0 0 2px rgba(255,255,255,.18);
}
.request-suggestion{color:#93c5fd!important;font-weight:900!important}
/* === v17 FIX2: サジェスト表示中でも曲マスター登録依頼可能 === */
.mdl-sheet .suggestion-list .request-suggestion,
.mdl-sheet #songSuggestions .request-suggestion {
  position: sticky;
  bottom: 0;
  z-index: 3;
  border-top: 1px solid #2563eb !important;
  border-bottom: 0 !important;
  background: #172554 !important;
  color: #bfdbfe !important;
  font-weight: 900 !important;
}

.mdl-sheet .suggestion-list .request-suggestion:hover,
.mdl-sheet #songSuggestions .request-suggestion:hover {
  background: #1e3a8a !important;
}

/* === v18: GF/DMカラー + e-amusementスキル同期 === */
.mypage-sync-section{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #334155;
}
.btn-skill-sync{
  width:100%;
  min-height:44px;
  margin-top:8px;
  border:1px solid #2563eb;
  border-radius:8px;
  background:#3b82f6;
  color:#fff;
  font-weight:900;
}
.skill-sync-dialog{
  width:min(520px,calc(100vw - 24px));
  max-height:calc(100dvh - 28px);
  overflow-y:auto;
  padding:18px;
  border:1px solid #334155;
  border-radius:14px;
  background:#0f172a;
  color:#f8fafc;
  box-shadow:0 20px 55px rgba(0,0,0,.52);
}
.skill-sync-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.skill-sync-head h3{
  margin:2px 0 0;
  font-size:18px;
}
.skill-sync-kicker{
  color:#60a5fa;
  font-size:10px;
  font-weight:900;
}
.skill-sync-close{
  border:0;
  background:transparent;
  color:#cbd5e1;
  font-size:24px;
  line-height:1;
}
.skill-sync-note{
  padding:11px;
  border:1px solid #334155;
  border-radius:8px;
  background:#111827;
  color:#cbd5e1;
  font-size:11px;
  line-height:1.65;
}
.skill-sync-step{
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  gap:9px;
  margin-top:12px;
  padding:10px 0;
  border-bottom:1px solid #1e293b;
}
.skill-sync-step-no{
  display:flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:999px;
  background:#3b82f6;
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.skill-sync-actions{
  display:flex;
  gap:7px;
  margin-top:8px;
}
#btnCopySkillSync,
.btn-open-eamusement{
  min-height:38px;
  padding:0 12px;
  border-radius:7px;
  font-size:11px;
  font-weight:900;
}
.skill-sync-bookmarklet{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #e8336a;
  background:#e8336a;
  color:#fff;
  text-decoration:none;
}
#btnCopySkillSync{
  border:1px solid #475569;
  background:#1e293b;
  color:#e2e8f0;
}
.btn-open-eamusement{
  width:100%;
  margin-top:8px;
  border:1px solid #3caa2a;
  background:#3caa2a;
  color:#fff;
}
.skill-sync-status{
  margin-top:12px;
  padding:10px 11px;
  border:1px solid #334155;
  border-radius:8px;
  background:#020617;
  color:#94a3b8;
  font-size:11px;
  font-weight:800;
  white-space:pre-line;
}
.skill-sync-status.running{color:#bfdbfe;border-color:#1d4ed8;}
.skill-sync-status.success{color:#bbf7d0;border-color:#15803d;}
.skill-sync-status.error{color:#fecaca;border-color:#b91c1c;}

/* === v19: ユーザーリストGF/DM両表示・ライバルGF/DM分離 === */
.user-list-row{
  grid-template-columns:minmax(0,1fr) 82px 82px 84px 38px !important;
}
.user-list-skill{
  min-width:0;
  text-align:right;
}
.user-list-skill-label{
  margin-bottom:1px;
  color:#64748b;
  font-size:8px;
  font-weight:900;
}
.user-list-skill-value{
  font-size:12px;
  font-weight:900;
}
.mypage-rival-block + .mypage-rival-block{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #1e293b;
}
.rival-gf .mypage-section-title strong{color:#e8336a;}
.rival-dm .mypage-section-title strong{color:#3caa2a;}

@media(max-width:520px){
  .user-list-row{
    grid-template-columns:minmax(0,1fr) 64px 64px 34px !important;
    grid-template-areas:
      "name name name fav"
      "gf dm date fav";
    row-gap:4px !important;
  }
  .user-list-name{grid-area:name;}
  .user-list-gf{grid-area:gf;text-align:left;}
  .user-list-dm{grid-area:dm;text-align:left;}
  .user-list-date{grid-area:date;text-align:right;}
  .favorite-toggle{grid-area:fav;}
  .user-list-skill-value{font-size:11px;}
}

/* === v19 FIX1: 管理画面 曲マスター列順・難易度列幅 === */
#adminMasterTable{
  width:100%;
  table-layout:fixed;
}
#adminMasterTable th:first-child,
#adminMasterTable td:first-child{
  width:46px;
}
#adminMasterTable th:nth-child(2),
#adminMasterTable td:nth-child(2){
  width:300px;
}
#adminMasterTable th:nth-child(n+3):nth-child(-n+14),
#adminMasterTable td:nth-child(n+3):nth-child(-n+14){
  width:76px;
}
#adminMasterTable th:last-child,
#adminMasterTable td:last-child{
  width:112px;
}
#adminMasterTable td:nth-child(n+4):nth-child(-n+15) input{
  width:100%;
  min-width:0;
  padding-left:7px;
  padding-right:7px;
  box-sizing:border-box;
}

/* === v20: 曲マスター軽量化 === */
.admin-master-summary,
.admin-master-pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  min-height:34px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
}
.admin-master-summary{
  justify-content:flex-end;
  padding:0 10px 6px;
}
.admin-master-pager{
  padding:10px 0 14px;
}
.admin-master-pager button{
  min-width:84px;
  min-height:34px;
  border:1px solid #334155;
  border-radius:7px;
  background:#1e293b;
  color:#e2e8f0;
  font-weight:900;
}
.admin-master-pager button:disabled{
  opacity:.35;
}
#adminMasterTable .master-level-cell{
  width:68px !important;
}
#adminMasterTable input[data-master-level]{
  width:100% !important;
  min-width:0 !important;
  padding:5px 6px !important;
  text-align:center;
  appearance:none;
  -moz-appearance:textfield;
}

/* === v21: version / user-list / confirm modal === */
.version-bar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:6px 8px;
  border-top:1px solid #273449;
  border-bottom:1px solid #273449;
  background:#0b1220;
}
.version-bar-label{
  color:#64748b;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}
.version-select{
  width:auto;
  max-width:min(320px,74vw);
  min-height:32px;
  padding:4px 30px 4px 10px;
  border:1px solid #334155;
  border-radius:7px;
  background:#111827;
  color:#e2e8f0;
  font-size:11px;
  font-weight:900;
}

.user-list-row{
  display:grid !important;
  grid-template-columns:minmax(110px,1fr) 82px 82px 82px 38px !important;
  grid-template-areas:none !important;
  gap:6px !important;
  align-items:center !important;
  min-height:58px;
}
.user-list-name,
.user-list-gf,
.user-list-dm,
.user-list-date,
.favorite-toggle{
  grid-area:auto !important;
}
.user-list-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.user-list-skill{
  text-align:right !important;
}
.user-list-skill-label{
  margin-bottom:2px;
  color:#64748b;
  font-size:8px;
  font-weight:900;
}
.user-list-skill-value{
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.user-list-date{
  text-align:right !important;
  font-size:9px !important;
  white-space:nowrap;
}

.rate-personal-best{
  margin:10px 0;
  padding:10px 12px;
  border:1px solid #334155;
  border-radius:8px;
  background:#111827;
}
.rate-personal-best-label{
  color:#64748b;
  font-size:9px;
  font-weight:900;
}
.rate-personal-best-value{
  margin-top:2px;
  color:#f8fafc;
  font-size:14px;
  font-weight:900;
}
.rate-personal-best-version{
  margin-top:2px;
  color:#94a3b8;
  font-size:9px;
  font-weight:800;
}

.site-dialog-cancel{
  flex:1;
  min-height:42px;
  border:1px solid #475569;
  border-radius:8px;
  background:#1e293b;
  color:#cbd5e1;
  font-weight:900;
}
.site-dialog-actions:has(.site-dialog-cancel:not(.hidden)) .site-dialog-ok{
  flex:1;
  background:#b91c1c;
}

@media(max-width:520px){
  .user-list-row{
    grid-template-columns:minmax(92px,1fr) 62px 62px 66px 32px !important;
    gap:4px !important;
    padding:8px 6px !important;
  }
  .user-list-name{font-size:11px !important;}
  .user-list-skill-value{font-size:10.5px !important;}
  .user-list-date{font-size:7.5px !important;}
  .favorite-toggle{width:30px !important;min-width:30px !important;padding:0 !important;}
}

/* === v21 FIX1 === */
/* VERSIONを左上、GF/DMをその右へ */
.user-header-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  min-height:48px;
  padding:4px 8px !important;
}
.header-mode-controls,
.header-account-controls{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.header-active-version{
  display:block;
  min-width:0;
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#64748b;
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  line-height:1.2;
}
.header-version-control{
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
}
.header-version-control .version-select{
  max-width:220px;
  min-height:30px;
  height:30px;
  padding-top:2px;
  padding-bottom:2px;
}
.header-account-controls{
  margin-left:auto;
}
.version-bar{
  display:none !important;
}

/* TOTAL/HOT/OTHERはユーザーリストと同じスキルカラーの描画幅にする。
   flexの横幅全体ではなく、文字そのものの幅にgradientを適用する。 */
.score-val{
  display:inline-block !important;
  width:max-content !important;
  align-self:center !important;
}

/* ユーザーリストは常に横一列 */
.user-list-row{
  display:grid !important;
  grid-template-columns:minmax(110px,1fr) 82px 82px 82px 38px !important;
  grid-template-areas:none !important;
  align-items:center !important;
}
.user-list-name,
.user-list-gf,
.user-list-dm,
.user-list-date,
.favorite-toggle{
  grid-area:auto !important;
}

@media(max-width:520px){
  .user-header-row{
    padding:4px !important;
    gap:4px !important;
  }
  .header-mode-controls{flex:1;min-width:0;gap:4px;}
  .header-active-version{
    flex:1;
    max-width:142px;
    font-size:8.5px;
  }
  .header-version-control{gap:3px;}
  .header-version-control .version-bar-label{
    font-size:7px;
  }
  .header-version-control .version-select{
    width:132px;
    max-width:132px;
    min-height:28px;
    height:28px;
    padding-left:7px;
    padding-right:24px;
    font-size:9px;
  }
  .instrument-btn{
    min-width:40px !important;
    height:28px !important;
    font-size:10px !important;
  }
  .header-account-controls{gap:4px;}
  .admin-entry{
    padding-left:7px !important;
    padding-right:7px !important;
  }
  .header-user{
    max-width:58px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .user-list-row{
    grid-template-columns:minmax(84px,1fr) 58px 58px 64px 30px !important;
    gap:3px !important;
    padding:8px 5px !important;
  }
  .user-list-name{
    font-size:10.5px !important;
  }
  .user-list-skill{
    min-width:0;
  }
  .user-list-skill-value{
    width:max-content;
    max-width:100%;
    margin-left:auto;
    font-size:10px !important;
  }
  .user-list-date{
    font-size:7px !important;
  }
}

/* === v21 FIX2: 削除確認モーダル === */
.site-dialog-actions{
  display:flex !important;
  gap:8px !important;
  align-items:stretch !important;
  padding:0 18px 18px !important;
}
.site-dialog-actions .site-dialog-cancel,
.site-dialog-actions .site-dialog-ok{
  flex:1 1 0 !important;
  width:auto !important;
  min-width:0 !important;
  min-height:46px !important;
  border-radius:9px !important;
  font-size:14px !important;
  font-weight:900 !important;
}
.site-dialog-actions .site-dialog-cancel{
  border:1px solid #475569 !important;
  background:#1e293b !important;
  color:#e2e8f0 !important;
}
.site-dialog-actions .site-dialog-ok{
  border:0 !important;
}
.site-dialog-actions:has(.site-dialog-cancel:not(.hidden)) .site-dialog-ok{
  background:#c81e1e !important;
}
.site-dialog-actions:has(.site-dialog-cancel:not(.hidden)) .site-dialog-ok:active{
  background:#a91414 !important;
}

/* === v21 FIX3: Rate比較の自己ベスト表示 === */
.rate-personal-best{
  display:flex !important;
  align-items:baseline !important;
  gap:6px !important;
  margin:0 !important;
  padding:9px 14px 7px !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
}
.rate-personal-best.hidden{
  display:none !important;
}
.rate-personal-best-label{
  color:#94a3b8 !important;
  font-size:9px !important;
  font-weight:900 !important;
  white-space:nowrap;
}
.rate-personal-best-value{
  margin:0 !important;
  color:#f8fafc !important;
  font-size:13px !important;
  font-weight:900 !important;
  white-space:nowrap;
}
.rate-personal-best-version{
  margin:0 !important;
  color:#64748b !important;
  font-size:8.5px !important;
  font-weight:800 !important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* === v21 FIX4: DM登録フォーム / EXC自動 === */
body.dm-mode #optionFieldGroup{
  display:none !important;
}
body.dm-mode #scoreExtraFields{
  grid-template-columns:1fr !important;
}
body.dm-mode.dm-bass-mirror-enabled #scoreExtraFields{
  grid-template-columns:1fr 1fr !important;
}
#dmOptionFieldGroup{
  display:none;
}
body.dm-mode #dmOptionFieldGroup:not(.hidden){
  display:block;
}

/* === v21 FIX8: プルダウン視認性 / 曲登録コンパクト化 === */

/* ソート・フィルタのselectを曲登録と同じ白系へ */
#userSort,
#recordTypeFilter,
#recordFcFilter,
#partSelect,
#formFc,
#formOption,
#formDmOption,
#versionSelect {
  background-color:#f8fafc !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}

/* selectの矢印も見やすくする */
#userSort,
#recordTypeFilter,
#recordFcFilter,
#partSelect,
#formFc,
#formOption,
#formDmOption,
#versionSelect {
  color-scheme: light;
}

/* 曲登録モーダル全体をコンパクト化 */
#domModal .modal-sheet,
#domModal .modal-content,
#domModal .form-sheet {
  font-size:11px !important;
}

#domModal label {
  font-size:10px !important;
  margin-bottom:3px !important;
}

#domModal .f-group {
  margin-bottom:7px !important;
}

#domModal input:not(#formTitle),
#domModal select,
#domModal .skill-preview {
  min-height:36px !important;
  height:36px !important;
  font-size:11px !important;
  padding-top:5px !important;
  padding-bottom:5px !important;
}

#domModal #formTitle {
  font-size:12px !important;
  min-height:38px !important;
  height:38px !important;
}

/* サジェストは現状サイズを維持 */
#domModal #songSuggestions .suggestion {
  font-size:inherit !important;
  min-height:inherit !important;
  padding-top:inherit !important;
  padding-bottom:inherit !important;
}

#domModal .form-grid-two {
  gap:7px !important;
}

#domModal .level-correction-area,
#domModal .master-request-area {
  margin-top:6px !important;
  margin-bottom:7px !important;
  padding:8px !important;
}

#domModal .level-correction-title,
#domModal .master-request-area strong {
  font-size:10px !important;
}

#domModal .level-correction-note,
#domModal .section-note {
  font-size:9px !important;
  line-height:1.35 !important;
}

#domModal .btn-block {
  margin-top:8px !important;
  gap:7px !important;
}

#domModal .btn-block button {
  min-height:38px !important;
  height:38px !important;
  font-size:11px !important;
}

#domModal .modal-title,
#domModal h2,
#domModal h3 {
  font-size:15px !important;
  margin-bottom:8px !important;
}

/* === v21 FIX9: プルダウン矢印視認性 / 曲登録フォーム見切れ修正 === */

/* すべてのselectは背景色をダーク系に統一し、▽だけ白く見せる */
select {
  -webkit-appearance: none !important;
  appearance: none !important;
  color-scheme: dark !important;
  background-color: #111827 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
  background-image:
    linear-gradient(10deg, transparent 50%, #ffffff 50%),
    linear-gradient(10deg, #ffffff 50%, transparent 50%) !important;
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50% !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 30px !important;
}

/* FIX8の白背景指定を上書き */
#userSort,
#recordTypeFilter,
#recordFcFilter,
#partSelect,
#formFc,
#formOption,
#formDmOption,
#versionSelect,
.admin-form-sheet select,
.mdl-sheet select {
  background-color: #111827 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

/* スコア登録は圧縮しつつ、文字が見切れない高さを確保 */
#domModal .f-group input:not(#formTitle),
#domModal .f-group select,
#domModal .skill-preview {
  min-height: 42px !important;
  height: 42px !important;
  line-height: 1.25 !important;
  font-size: 13px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* 曲名入力は少しだけ高め。サジェストは従来サイズを維持 */
#domModal #formTitle {
  min-height: 42px !important;
  height: 42px !important;
  font-size: 13px !important;
}

#domModal #songSuggestions .suggestion {
  min-height: unset !important;
  height: auto !important;
  font-size: 12px !important;
  padding: 11px 9px !important;
}

/* Part / FC / Option の文字が上下で切れないように調整 */
#domModal #partSelect,
#domModal #formFc,
#domModal #formOption,
#domModal #formDmOption {
  min-height: 42px !important;
  height: 42px !important;
  line-height: normal !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: block !important;
}

/* Levelは読み取り専用でも同じ高さ */
#domModal #formLevel {
  min-height: 42px !important;
  height: 42px !important;
}

/* 縦幅は余白で圧縮 */
#domModal .f-group {
  margin-bottom: 8px !important;
}

#domModal .f-group label {
  margin-bottom: 3px !important;
  font-size: 11px !important;
}

#domModal .form-grid-two {
  gap: 8px !important;
}

#domModal .skill-preview {
  min-height: 42px !important;
}

#domModal .btn-block {
  margin-top: 10px !important;
}

#domModal .btn-submit,
#domModal .btn-cancel {
  min-height: 40px !important;
  height: 40px !important;
  font-size: 12px !important;
}

/* === v21 FIX11: iPhone Safari モーダル復帰バグ対策 === */
body.score-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none;
}

body.score-modal-open #domModal {
  touch-action: pan-y;
}

/* モーダルを独立したviewportレイヤーとして描画 */
#domModal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  contain: layout paint style;
}

/* Safari再描画用。一瞬だけレイアウト再計算を強制する */
html.ios-viewport-repair {
  min-height: calc(100% + 1px);
}

/* iOSで閉じた直後に一覧上部へ不要な空白が残らないよう固定 */
#viewAllManage,
#viewSkill,
#viewUsers {
  min-height: 0 !important;
}

.smart-song-title .song-title-text {
  display: inline;
}

/* === v21 FIX15: ユーザー詳細のTOTAL/HOT/OTHER色をメイン画面と完全統一 === */
.user-detail-summary strong.user-detail-skill-value {
  display: inline-block !important;
  width: max-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  align-self: center !important;
}

/* === v21 FIX17: スマホ専用同期導線 === */
.skill-sync-actions #btnCopySkillSync {
  width: 100% !important;
}

/* === v21 FIX19: ブラウザ別同期ガイド / ステータス上部表示 === */
.skill-sync-status-top {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 10px 0 4px !important;
  padding: 10px 12px !important;
  border-radius: 10px;
  background: var(--panel, #111c30);
  border: 1px solid #41536d;
  font-weight: 800;
}
.skill-sync-browser-guide {
  line-height: 1.7;
}
.skill-sync-browser-guide strong {
  color: #fff;
}
.skill-sync-browser-warning {
  display: block;
  margin-top: 7px;
  font-weight: 800;
  color: #ffcf5a;
}

/* === v21 FIX22: 導入 / MENU / SHARE === */
.intro-screen{min-height:100dvh;background:radial-gradient(circle at 50% 0,#172554 0,#0b1220 42%,#060b14 100%);color:#f8fafc;padding:42px 20px 24px;box-sizing:border-box}
.intro-hero{max-width:520px;margin:0 auto;text-align:center}.intro-logo{font-size:12px;letter-spacing:.35em;font-weight:900;color:#93c5fd}.intro-hero h1{font-size:34px;margin:6px 0 10px}.intro-hero p{font-size:13px;line-height:1.7;color:#cbd5e1;margin:0 auto 24px;max-width:360px}
.intro-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.intro-actions button{min-height:48px;border-radius:10px;font-size:14px;font-weight:900}.intro-primary{border:0;background:#3b82f6;color:#fff}.intro-secondary{border:1px solid #475569;background:#111827;color:#fff}
.intro-features{max-width:520px;margin:28px auto 0;display:grid;gap:9px}.intro-features div{display:grid;grid-template-columns:64px 1fr;align-items:center;padding:13px;border:1px solid #1e293b;border-radius:10px;background:rgba(15,23,42,.78)}.intro-features strong{font-size:11px;color:#60a5fa}.intro-features span{font-size:12px;color:#e2e8f0}.intro-note{text-align:center;font-size:9px;color:#64748b;margin-top:24px}
.menu-entry{border:1px solid #334155;background:#1e293b;color:#fff;border-radius:7px;min-width:38px;height:34px;font-size:20px;font-weight:900}
.app-menu-sheet{width:min(88vw,380px);background:#0f172a;color:#fff;border:1px solid #334155;border-radius:14px;padding:14px;position:absolute;top:58px;right:10px;box-shadow:0 20px 50px rgba(0,0,0,.45)}
.app-menu-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.app-menu-head button{width:34px;height:34px;border:0;border-radius:8px;background:#1e293b;color:#fff;font-size:20px}
.app-menu-item{width:100%;display:flex;justify-content:space-between;padding:14px 12px;margin:7px 0;border:1px solid #334155;border-radius:9px;background:#111827;color:#fff;font-weight:800;text-align:left}
.app-menu-version{margin-top:12px;padding-top:12px;border-top:1px solid #334155}.app-menu-version label{display:block;font-size:9px;color:#94a3b8;font-weight:900;margin-bottom:5px}.app-menu-version select{width:100%;min-height:40px}
.howto-dialog{width:min(92vw,520px);max-height:84dvh;overflow:auto;background:#0f172a;color:#fff;border:1px solid #334155;border-radius:14px;padding:16px}.howto-body section{padding:12px 0;border-bottom:1px solid #1e293b}.howto-body b{font-size:13px}.howto-body p{font-size:11px;line-height:1.65;color:#cbd5e1;margin:5px 0 0}
.skill-share-bar{padding:5px 6px 0;background:#0b1220}.skill-share-bar button{width:100%;min-height:34px;border:1px solid #334155;border-radius:6px;background:#172033;color:#dbeafe;font-size:10px;font-weight:900}

/* === v21 FIX23 === */
.favorite-user-row{grid-template-columns:minmax(0,1fr) auto !important;}
.favorite-user-row .remove{min-width:64px;}

/* === v21 FIX24: user list / rainbow distinction === */


.users-toolbar{display:block !important;position:sticky;top:128px;z-index:5;padding:8px 3px 5px;background:#030712}
.user-list-header{
  position:sticky;top:183px;z-index:4;
  display:grid;grid-template-columns:minmax(108px,1fr) 72px 72px 82px 72px 38px;
  gap:5px;align-items:center;padding:5px 8px;margin-bottom:5px;
  border:1px solid #273449;border-radius:7px;background:#0b1220;
}
.user-sort-head,.user-list-rival-head{
  min-width:0;border:0;background:transparent;color:#94a3b8;
  font-size:10px;font-weight:900;padding:4px 1px;text-align:right;white-space:nowrap;
}
.user-sort-head.name{text-align:left}
.user-sort-head.active{color:#f8fafc}
.user-sort-head .sort-arrow{display:inline-block;width:9px;color:#60a5fa}
.user-sort-head.active[data-sort-dir="desc"] .sort-arrow::after{content:"▼"}
.user-sort-head.active[data-sort-dir="asc"] .sort-arrow::after{content:"▲"}
.user-list-rival-head{text-align:center;font-size:8px}
.user-list-row{
  grid-template-columns:minmax(108px,1fr) 72px 72px 82px 72px 38px !important;
  gap:5px !important;padding:9px 8px !important;
}
.user-list-skill-value{font-size:12px !important;font-weight:900}
.user-list-skill-label{display:none !important}
.user-list-total-skill{text-align:right;min-width:0}
.user-list-date{font-size:9px !important}
@media(max-width:520px){
  .user-list-header,.user-list-row{
    grid-template-columns:minmax(86px,1fr) 60px 60px 70px 58px 34px !important;
    gap:3px !important;
  }
  .user-list-header{top:181px;padding-left:6px;padding-right:6px}
  .user-sort-head{font-size:9px}
  .user-list-name{font-size:11px !important}
  .user-list-skill-value,.user-list-total-skill{font-size:11px !important}
  .user-list-date{font-size:8px !important}
}

/* === v21 FIX25: MENU再編 === */
.rival-manage-dialog{
  width:min(92vw,460px);max-height:84dvh;overflow:auto;
  background:#0f172a;color:#fff;border:1px solid #334155;
  border-radius:14px;padding:16px;
}
.rival-manage-note{margin-bottom:10px}
.rival-manage-block{padding:12px 0;border-top:1px solid #1e293b}
.rival-manage-block:first-of-type{border-top:0}

/* === v21 FIX27: ユーザーリスト横はみ出し修正 === */
#viewUsers,
#userList,
.users-toolbar,
.user-list-header,
.user-list-row {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.user-list-header,
.user-list-row {
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(48px, .78fr)
    minmax(48px, .78fr)
    minmax(58px, .95fr)
    minmax(50px, .78fr)
    32px !important;
  gap: 3px !important;
}
.user-list-name,
.user-list-skill,
.user-list-total-skill,
.user-list-date {
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
.user-list-total-skill {
  font-weight: 900 !important;
}
.favorite-toggle {
  width: 32px !important;
  height: 32px !important;
  font-size: 18px !important;
}
@media (max-width: 430px) {
  .user-list-header,
  .user-list-row {
    grid-template-columns:
      minmax(0, 1.3fr)
      minmax(44px, .72fr)
      minmax(44px, .72fr)
      minmax(54px, .9fr)
      minmax(46px, .72fr)
      30px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  .user-sort-head { font-size: 8px !important; }
  .user-list-name { font-size: 10px !important; }
  .user-list-skill-value,
  .user-list-total-skill { font-size: 10px !important; }
  .user-list-date { font-size: 7px !important; }
}

/* === v21 FIX27: RAINBOW配色（8500～ / 9000～） === */



/* === v21 FIX33: ユーザーリスト更新日削除 / 数字幅統一 === */
.user-list-header,
.user-list-row {
  grid-template-columns:
    minmax(0, 1.55fr)
    minmax(62px, .82fr)
    minmax(62px, .82fr)
    minmax(76px, 1fr)
    34px !important;
  gap: 5px !important;
}
.user-list-skill-value,
.user-list-total-skill {
  width: 100% !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  font-family: "SFMono-Regular", "Roboto Mono", "Noto Sans Mono", Consolas, monospace !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}
.user-list-total-skill {
  font-weight: 900 !important;
}
@media (max-width: 430px) {
  .user-list-header,
  .user-list-row {
    grid-template-columns:
      minmax(0, 1.45fr)
      minmax(57px, .8fr)
      minmax(57px, .8fr)
      minmax(68px, .95fr)
      30px !important;
    gap: 3px !important;
  }
  .user-list-skill-value,
  .user-list-total-skill {
    font-size: 10px !important;
  }
}

/* === v21 FIX34: ユーザーリストのスキルグラデーションを数字本体の幅に統一 === */
.user-list-skill-value,
.user-list-total-skill {
  width: max-content !important;
  min-width: 0 !important;
  justify-self: end !important;
  display: inline-block !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  font-family: "SFMono-Regular", "Roboto Mono", "Noto Sans Mono", Consolas, monospace !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

/* === v21 FIX38: ユーザーリスト列幅・縦位置統一 === */
.user-list-header,
.user-list-row {
  grid-template-columns:
    minmax(112px, 1fr)
    68px
    68px
    68px
    32px !important;
  column-gap: 4px !important;
  align-items: center !important;
}

.user-list-skill {
  height: 100% !important;
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.user-list-skill-value,
.user-list-total-skill {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  align-self: center !important;
  vertical-align: middle !important;
}

.user-list-total-skill {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  height: 100% !important;
  min-height: 32px !important;
}

.user-sort-head {
  text-align: center !important;
}
.user-sort-head.name {
  text-align: left !important;
}

@media (max-width: 430px) {
  .user-list-header,
  .user-list-row {
    grid-template-columns:
      minmax(104px, 1fr)
      64px
      64px
      64px
      30px !important;
    column-gap: 3px !important;
  }

  .user-list-skill-value,
  .user-list-total-skill {
    font-size: 10px !important;
  }
}

/* === v21 FIX39: ユーザーリスト中央揃え / TOTAL配色幅統一 === */
.user-list-header,
.user-list-row {
  grid-template-columns:
    minmax(112px, 1fr)
    68px
    68px
    68px
    34px !important;
  column-gap: 6px !important;
  align-items: center !important;
}

.user-sort-head,
.user-list-rival-head {
  text-align: center !important;
}

.user-list-name {
  text-align: left !important;
}

.user-list-skill,
.user-list-total-skill {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
}

.user-list-skill-value,
.user-list-total-value {
  display: inline-block !important;
  width: max-content !important;
  margin: 0 auto !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  font-family: "SFMono-Regular", "Roboto Mono", "Noto Sans Mono", Consolas, monospace !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  font-weight: 900 !important;
}

.favorite-toggle {
  justify-self: center !important;
}

@media (max-width: 430px) {
  .user-list-header,
  .user-list-row {
    grid-template-columns:
      minmax(100px, 1fr)
      62px
      62px
      62px
      30px !important;
    column-gap: 4px !important;
  }
  .user-list-skill-value,
  .user-list-total-value {
    font-size: 10px !important;
  }
}

/* === v21 FIX40: ユーザーリスト GF / DM / TOTAL 完全統一 === */
.user-list-header,
.user-list-row {
  grid-template-columns:
    minmax(112px, 1fr)
    70px
    70px
    70px
    34px !important;
  column-gap: 5px !important;
  align-items: center !important;
}

.user-list-skill {
  min-width: 0 !important;
  height: 100% !important;
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.user-list-skill-value {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
  line-height: 1 !important;
  text-align: center !important;
  align-self: center !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  font-family: "SFMono-Regular", "Roboto Mono", "Noto Sans Mono", Consolas, monospace !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  font-weight: 900 !important;
}

.user-sort-head,
.user-list-rival-head {
  text-align: center !important;
}

.user-list-name {
  text-align: left !important;
}

.favorite-toggle {
  justify-self: center !important;
}

@media (max-width: 430px) {
  .user-list-header,
  .user-list-row {
    grid-template-columns:
      minmax(98px, 1fr)
      64px
      64px
      64px
      30px !important;
    column-gap: 3px !important;
  }

  .user-list-skill-value {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    font-size: 10px !important;
  }
}

/* === v21 FIX41: ユーザーリスト縦幅コンパクト化 === */
.user-list-row {
  min-height: 58px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  margin-bottom: 6px !important;
}
.user-list-skill {
  min-height: 26px !important;
}
.favorite-toggle {
  width: 34px !important;
  height: 34px !important;
}
@media (max-width: 430px) {
  .user-list-row {
    min-height: 54px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    margin-bottom: 5px !important;
  }
  .user-list-skill {
    min-height: 24px !important;
  }
  .favorite-toggle {
    width: 32px !important;
    height: 32px !important;
  }
}

/* === v21 FIX42: ユーザーリスト ページ切替 === */
.user-list-pager {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:48px;
  padding:8px 6px 14px;
  color:#94a3b8;
  font-size:10px;
  font-weight:900;
}
.user-list-pager button {
  min-width:78px;
  min-height:34px;
  padding:5px 10px;
  border:1px solid #334155;
  border-radius:7px;
  background:#172033;
  color:#e2e8f0;
  font-weight:900;
}
.user-list-pager button:disabled {
  opacity:.35;
}
.user-list-page-summary {
  color:#64748b;
}

/* === v21 FIX45: compact user list / register cards / rival comparison === */

/* ユーザーリスト: 可能な限り1行を詰める */
.user-list-row {
  min-height: 44px !important;
  height: 44px !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  margin-bottom: 4px !important;
  align-items: center !important;
}
.user-list-skill {
  min-height: 20px !important;
  height: 24px !important;
}
.favorite-toggle {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
}
@media(max-width:430px) {
  .user-list-row {
    min-height: 42px !important;
    height: 42px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    margin-bottom: 3px !important;
  }
}

/* ライバル比較: 項目行 + コンパクト */
.rate-table-head,
.rate-row {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 78px 72px !important;
  column-gap:5px !important;
  align-items:center !important;
}
.rate-table-head {
  min-height:26px !important;
  padding:3px 7px !important;
  border:1px solid #334155;
  border-radius:6px;
  background:#0b1220;
  color:#94a3b8;
  font-size:9px;
  font-weight:900;
  text-align:center;
}
.rate-table-head > :first-child { text-align:left; }
.rate-row {
  min-height:40px !important;
  padding:3px 7px !important;
  margin-top:3px !important;
}
.rate-user { min-width:0 !important; }
.rate-user-name {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  font-weight:900;
}
.rate-badges {
  margin-top:1px !important;
  gap:3px !important;
}
.rate-value {
  text-align:center !important;
  font-size:10px !important;
  font-weight:900 !important;
}
.rate-skill {
  width:68px !important;
  min-width:68px !important;
  min-height:28px !important;
  height:28px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 7px !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  font-size:11px !important;
  font-weight:900 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.95) !important;
  box-sizing:border-box !important;
}

.edit-delete-area {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #334155;
}
.btn-delete-editing-score {
  width: 100%;
  min-height: 36px;
  border: 1px solid #7f1d1d;
  border-radius: 7px;
  background: #3f0d12;
  color: #fecaca;
  font-weight: 900;
  font-size: 11px;
}
.btn-delete-editing-score:disabled {
  opacity: .5;
}

/* RAN系：緑。同系色で + を濃く */
.opt-ran,
.rate-badges .opt-ran {
  color: #86efac !important;
  background: transparent !important;
  border: 1px solid #15803d !important;
}
.opt-ran-plus,
.rate-badges .opt-ran-plus {
  color: #4ade80 !important;
  background: rgba(20,83,45,.34) !important;
  border: 1px solid #166534 !important;
}

/* SRA系：オレンジ。同系色で + を濃く */
.opt-sra,
.rate-badges .opt-sra {
  color: #fdba74 !important;
  background: transparent !important;
  border: 1px solid #c2410c !important;
}
.opt-sra-plus,
.rate-badges .opt-sra-plus {
  color: #fb923c !important;
  background: rgba(124,45,18,.38) !important;
  border: 1px solid #9a3412 !important;
}


/* v21 FIX54: ヘッダーとユーザーリストは同一のscore-rank配色を使用 */
/* === v21 FIX55: ヘッダー/ユーザー詳細のスキル表示を統一 === */

/* ユーザーリストの数値と同じく、文字そのものの高さをgradient描画領域にする。
   これで8500～/9000～の縦RAINBOWの見える色配分を揃える。 */
.score-cell .score-val {
  display: inline-block !important;
  width: max-content !important;
  height: auto !important;
  line-height: 1 !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* ユーザー詳細のTOTAL/HOT/OTHERは、自分のヘッダーと同じ数字フォントへ統一 */
.user-detail-skill-value {
  display: inline-block !important;
  width: max-content !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  font-variant-numeric: normal !important;
  font-feature-settings: normal !important;
}

/* === v21 FIX56: 自分/ユーザー詳細ヘッダーの文字仕様統一 === */

/* 項目名はユーザー詳細側を正とする */
.score-lbl,
.user-detail-summary span {
  display: block !important;
  color: #94a3b8 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

/* スキル値は自分のヘッダー側を正とする */
.score-val,
.user-detail-summary strong.user-detail-skill-value {
  display: inline-block !important;
  width: max-content !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 !important;
  font-family: inherit !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  font-variant-numeric: normal !important;
  font-feature-settings: normal !important;
}

/* 項目名と数値の間隔も揃える */
.score-cell .score-val,
.user-detail-summary strong.user-detail-skill-value {
  margin-top: 2px !important;
}

/* === 現行曲カード共通要素 ===
   外枠とON/OFF別レイアウトはlayout-canonical.cssの.dc-cardで一元管理する。 */
.dc-card,
.dc-card button {
  font-family: inherit !important;
}

.dc-title {
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: normal !important;
  overflow: hidden !important;
  line-height: 1.18 !important;
}

.dc-title .hot-tag,
.dc-title .pending-badge {
  flex: 0 0 auto !important;
}

.dc-song-title {
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-height: 2.36em;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.18 !important;
}

.dc-part,
.dc-fc,
.dc-option,
.dc-edit {
  min-width: 0;
  display: flex;
  align-items: center;
}

.dc-part,
.dc-fc,
.dc-option {
  justify-content: flex-start;
}

.dc-edit {
  justify-content: flex-end;
}

.dc-lv,
.dc-rate {
  min-width: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1;
}

.dc-lv strong,
.dc-rate strong {
  font-size: inherit !important;
  font-weight: 800 !important;
}

.dc-skill {
  width: 65px !important;
  min-width: 65px !important;
  max-width: 65px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 0 !important;
  border-radius: 3px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
}

.dc-card .p-badge,
.dc-card .hot-tag {
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
  flex-shrink: 0 !important;
}

.dc-card .p-badge {
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.dc-card .hot-tag {
  padding: 0 7px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.dc-card .fc-unified-badge,
.dc-card .opt-badge {
  margin: 0 !important;
}

.dc-card .fc-unified-badge,
.dc-card .opt-badge,
.dc-card .m-action-btn {
  font-family: inherit !important;
}

@supports (-webkit-touch-callout: none) {
  .dc-card .hot-tag {
    padding-top: 1px !important;
    padding-bottom: 0 !important;
  }
}

/* === FIX99: 要望・不具合報告 === */
.feedback-dialog{
  width:min(92vw,520px);
  max-height:calc(100dvh - 32px);
  overflow:auto;
  background:#0f172a;
  color:#f8fafc;
  border:1px solid #334155;
  border-radius:14px;
  padding:14px;
  box-shadow:0 20px 50px rgba(0,0,0,.45);
}
.feedback-body label{
  display:block;
  margin:10px 0 5px;
  color:#94a3b8;
  font-size:12px;
  font-weight:900;
}
.feedback-body select,
.feedback-body textarea{
  width:100%;
  box-sizing:border-box;
  background:#111827;
  color:#f8fafc;
  border:1px solid #334155;
  border-radius:8px;
  font:inherit;
}
.feedback-body select{
  min-height:44px;
  padding:8px 10px;
}
.feedback-body textarea{
  min-height:180px;
  resize:vertical;
  padding:10px;
  line-height:1.5;
}
.feedback-body .btn-submit{
  width:100%;
  margin-top:12px;
  min-height:44px;
}
.feedback-status{
  min-height:18px;
  margin-top:8px;
  color:#fca5a5;
  font-size:11px;
}
.feedback-admin-card.resolved{
  opacity:.65;
}
.feedback-category{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  padding:2px 5px;
  margin-right:5px;
  border-radius:4px;
  font-size:10px;
  font-weight:900;
}
.feedback-category.request{
  background:#dbeafe;
  color:#1d4ed8;
}
.feedback-category.bug{
  background:#fee2e2;
  color:#b91c1c;
}
.feedback-admin-message{
  margin-top:8px;
  padding:8px;
  border-radius:6px;
  background:#f8fafc;
  color:#1e293b;
  font-size:12px;
  line-height:1.5;
  white-space:normal;
  word-break:break-word;
}
@media(max-width:520px){
  .admin-tabs{
    display:grid !important;
    grid-template-columns:repeat(2,1fr);
  }
}


/* FIX104: ライバル管理にTOTALスキル表示 + ユーザー詳細導線 */
.favorite-user-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:6px !important;
  align-items:center !important;
}

.favorite-user-open{
  min-width:0;
  min-height:42px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-areas:
    "name label arrow"
    "name skill arrow";
  column-gap:7px;
  align-items:center;
  padding:5px 8px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#f8fafc;
  text-align:left;
  cursor:pointer;
}

.favorite-user-open:active{
  background:rgba(51,65,85,.45);
}

.favorite-user-open .name{
  grid-area:name;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:900;
}

.favorite-user-skill-label{
  grid-area:label;
  color:#64748b;
  font-size:8px;
  font-weight:900;
  white-space:nowrap;
  text-align:right;
}

.favorite-user-skill{
  grid-area:skill;
  justify-self:end;
  display:inline-block;
  width:max-content;
  font-size:12px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}

.favorite-user-arrow{
  grid-area:arrow;
  color:#64748b;
  font-size:20px;
  line-height:1;
}

.favorite-user-row > .remove{
  flex-shrink:0;
}


/* FIX108: iPhone SafariでもライバルTOTALスキル欄の横幅を固定 */
.favorite-user-open{
  grid-template-columns:minmax(0,1fr) 76px 12px !important;
}

.favorite-user-skill-label{
  width:76px !important;
  min-width:76px !important;
  max-width:76px !important;
  box-sizing:border-box !important;
  text-align:center !important;
  justify-self:center !important;
}

.favorite-user-skill{
  width:76px !important;
  min-width:76px !important;
  max-width:76px !important;
  box-sizing:border-box !important;
  display:inline-block !important;
  justify-self:center !important;
  text-align:center !important;
  font-variant-numeric:tabular-nums lining-nums !important;
  font-feature-settings:"tnum" 1, "lnum" 1 !important;
  white-space:nowrap !important;
}

@media(max-width:520px){
  .favorite-user-open{
    grid-template-columns:minmax(0,1fr) 72px 12px !important;
  }

  .favorite-user-skill-label,
  .favorite-user-skill{
    width:72px !important;
    min-width:72px !important;
    max-width:72px !important;
  }
}


.site-dialog-input{
  width:100%;
  box-sizing:border-box;
  margin-top:10px;
  min-height:42px;
  padding:8px 10px;
  border:1px solid #334155;
  border-radius:8px;
  background:#0f172a;
  color:#f8fafc;
  font:inherit;
}


/* FIX112: 管理者画面コードバージョン / 新規曲インライン登録 */
.admin-title-wrap{
  display:flex;
  align-items:baseline;
  gap:10px;
  min-width:0;
}
.admin-code-version{
  color:#64748b;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.master-new-row td{
  background:#eef6ff !important;
}
.master-new-row input{
  background:#ffffff !important;
  border-color:#60a5fa !important;
}
.master-new-row .master-row-save{
  background:#3b82f6 !important;
  color:#fff !important;
}
.master-new-row .master-row-delete{
  background:#e2e8f0 !important;
  color:#334155 !important;
}


/* === FIX117: 機能設定 / 公開設定 / ライトモード === */
.feature-settings-dialog{
  width:min(92vw,520px);
  max-height:84dvh;
  overflow:auto;
  background:#0f172a;
  color:#f8fafc;
  border:1px solid #334155;
  border-radius:14px;
  padding:14px;
  box-shadow:0 20px 50px rgba(0,0,0,.45);
}
.feature-settings-body{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.feature-setting-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px 4px;
  border-bottom:1px solid #253247;
}
.feature-setting-row > span{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.feature-setting-row strong{ font-size:13px; }
.feature-setting-row small{
  color:#94a3b8;
  font-size:10px;
  line-height:1.45;
}
.feature-setting-row input[type="checkbox"]{
  width:22px;
  height:22px;
  accent-color:#2563eb;
}
.feature-settings-status{
  min-height:18px;
  color:#fca5a5;
  font-size:11px;
}
.feature-settings-save{
  width:100%;
  min-height:44px;
}
.mypage-x-block{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #e5e7eb;
}

.user-detail-header{
  grid-template-columns:auto minmax(0,1fr) auto !important;
}
.user-detail-x-link{
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#111827;
  color:#fff !important;
  border:1px solid #475569;
  font-size:15px;
  font-weight:900;
  text-decoration:none;
}
.user-detail-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
  padding:6px 8px 0;
  background:#0b1424;
}
.user-detail-tab{
  min-height:38px;
  border:0;
  border-radius:6px;
  background:#1f2937;
  color:#9ca3af;
  font-weight:900;
  font-size:12px;
}
.user-detail-tab.active{
  background:#3b82f6;
  color:#fff;
}
.dc-card-public .dc-edit{ display:none !important; }

/* ライトモード：スキルカラー・バッジ色は維持し、黒系の面だけ白系へ置換 */
body.light-mode,
body.light-mode #appScreen,
body.light-mode .p-container,
body.light-mode .user-detail-page,
body.light-mode .admin-modal{
  background:#f8fafc !important;
  color:#111827 !important;
}
body.light-mode .p-header,
body.light-mode .p-tabs,
body.light-mode .search-bar-container,
body.light-mode .user-header-row,
body.light-mode .user-detail-header,
body.light-mode .user-detail-tabs,
body.light-mode .app-menu-sheet,
body.light-mode .feature-settings-dialog,
body.light-mode .feedback-dialog,
body.light-mode .howto-dialog,
body.light-mode .rival-manage-dialog,
body.light-mode .skill-sync-dialog,
body.light-mode .site-dialog,
body.light-mode .rate-compare-dialog,
body.light-mode .auth-card{
  background:#ffffff !important;
  color:#111827 !important;
}
body.light-mode .p-tab-btn,
body.light-mode .app-menu-item,
body.light-mode .favorite-user-row,
body.light-mode .admin-card,
body.light-mode .rate-row,
body.light-mode .feature-setting-row{
  background:#f1f5f9 !important;
  color:#111827 !important;
}
body.light-mode .p-tab-btn.active,
body.light-mode .user-detail-tab.active{
  background:#3b82f6 !important;
  color:#fff !important;
}
body.light-mode .user-detail-tab{
  background:#e2e8f0;
  color:#475569;
}
body.light-mode .search-input,
body.light-mode .auth-card input,
body.light-mode .feature-settings-dialog input,
body.light-mode .feature-settings-dialog select,
body.light-mode .feature-settings-dialog textarea{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .section-note,
body.light-mode .feature-setting-row small{
  color:#64748b !important;
}
body.light-mode .site-dialog-message,
body.light-mode .site-dialog-head,
body.light-mode .app-menu-head,
body.light-mode .user-detail-name{
  color:#111827 !important;
}
body.light-mode .user-detail-x-link{
  background:#111827 !important;
  color:#fff !important;
}
body.light-mode .mypage-modal,
body.light-mode .mdl-mask,
body.light-mode .site-dialog-mask{
  background:rgba(15,23,42,.28) !important;
}


/* === FIX118: ライトモード全面調整 ===
   スキル値・PART/HOT/FC/EXC/OPTIONなど意味を持つ色は維持し、
   黒/紺の背景・カード・入力欄・メニュー類を白系へ統一する。 */
body.light-mode,
body.light-mode #appScreen,
body.light-mode .p-container,
body.light-mode #mainContent,
body.light-mode #viewSkill,
body.light-mode #viewAllManage,
body.light-mode #viewUsers,
body.light-mode .user-detail-page{
  background:#ffffff !important;
  color:#111827 !important;
}

body.light-mode .p-header,
body.light-mode .user-header-row,
body.light-mode .score-row,
body.light-mode .p-tabs,
body.light-mode .search-bar-container,
body.light-mode #searchArea,
body.light-mode .users-toolbar,
body.light-mode .user-list-header,
body.light-mode .user-detail-header,
body.light-mode .user-detail-tabs{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}

body.light-mode .score-box{
  background:#ffffff !important;
  border-color:#475569 !important;
}
body.light-mode .score-label,
body.light-mode .user-list-header,
body.light-mode .user-list-header *{
  color:#64748b !important;
}

body.light-mode .p-tab-btn{
  background:#f1f5f9 !important;
  color:#111827 !important;
}
body.light-mode .p-tab-btn.active{
  background:#3b82f6 !important;
  color:#ffffff !important;
}

/* ユーザーリスト */
body.light-mode .user-list-row,
body.light-mode .user-list-row:active{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
  box-shadow:none !important;
}
body.light-mode .user-list-name{ color:#111827 !important; }
body.light-mode .user-list-date{ color:#64748b !important; }
body.light-mode .favorite-toggle{
  background:#f1f5f9 !important;
  border:1px solid #cbd5e1 !important;
}

/* 検索・フィルタ */
body.light-mode .search-input,
body.light-mode .record-filter-row select,
body.light-mode .users-toolbar input,
body.light-mode .users-toolbar select{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .record-filter-row .filter-control,
body.light-mode .filter-select{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}

/* MENU */
body.light-mode .app-menu-sheet{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#475569 !important;
}
body.light-mode .app-menu-item{
  background:#f8fafc !important;
  color:#111827 !important;
  border-color:#475569 !important;
}
body.light-mode .app-menu-head,
body.light-mode .app-menu-head strong{
  color:#111827 !important;
}
body.light-mode .app-menu-head button,
body.light-mode .menu-entry{
  background:#1e293b !important;
  color:#ffffff !important;
}
body.light-mode .version-block{
  border-color:#475569 !important;
}
body.light-mode .version-label{
  color:#94a3b8 !important;
}
body.light-mode .version-select{
  background:#111827 !important;
  color:#ffffff !important;
  border-color:#334155 !important;
}

/* 各種モーダル */
body.light-mode .feature-settings-dialog,
body.light-mode .feedback-dialog,
body.light-mode .howto-dialog,
body.light-mode .rival-manage-dialog,
body.light-mode .skill-sync-dialog,
body.light-mode .site-dialog,
body.light-mode .rate-compare-dialog,
body.light-mode .mypage-sheet,
body.light-mode .mdl-box,
body.light-mode .admin-form-box{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .feature-setting-row,
body.light-mode .favorite-user-row,
body.light-mode .rate-row{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .favorite-user-row .name,
body.light-mode .mypage-section-title{
  color:#111827 !important;
}
body.light-mode .feature-setting-row small,
body.light-mode .section-note{
  color:#64748b !important;
}
body.light-mode .mypage-sheet input,
body.light-mode .mypage-sheet select,
body.light-mode .mdl-box input,
body.light-mode .mdl-box select,
body.light-mode .mdl-box textarea,
body.light-mode .feature-settings-dialog input,
body.light-mode .feature-settings-dialog select,
body.light-mode .feature-settings-dialog textarea{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}

/* 見出し */
body.light-mode .sk-section,
body.light-mode .sk-section h2,
body.light-mode .empty-state{
  background:#ffffff !important;
}
body.light-mode .empty-state{ color:#64748b !important; }

/* 背景マスクはライト時も薄いグレーに */
body.light-mode .site-dialog-mask,
body.light-mode .mypage-modal,
body.light-mode .mdl-mask,
body.light-mode .admin-form-mask{
  background:rgba(15,23,42,.25) !important;
}


/* === FIX119: 他ユーザー登録曲は自分の登録曲デザインをそのまま使用 === */
.user-detail-sticky{
  position:sticky;
  top:0;
  z-index:20;
  background:#0f172a;
}
.user-detail-sticky .user-detail-header{
  position:relative !important;
  top:auto !important;
  z-index:auto !important;
}

/* ライトモード時だけ、自分の登録曲と同じく白地＋黒文字 */
body.light-mode .user-detail-sticky{
  background:#ffffff !important;
}
/* === FIX120: ライトモード配色再調整 ===
   真っ白ではなく薄いグレー基調へ統一。
   意味を持つ色（PART / FC / EXC / OPTION / スキル帯）は維持。 */

body.light-mode,
body.light-mode #appScreen,
body.light-mode .p-container,
body.light-mode #mainContent,
body.light-mode #viewSkill,
body.light-mode #viewAllManage,
body.light-mode #viewUsers,
body.light-mode .user-detail-page,
body.light-mode .user-detail-body,
body.light-mode .sk-section,
body.light-mode .empty-state{
  background:#f3f4f6 !important;
  color:#111827 !important;
}

/* ヘッダー・スコア帯・タブ周辺 */
body.light-mode .p-header,
body.light-mode .user-header-row,
body.light-mode .score-row,
body.light-mode .p-tabs,
body.light-mode .search-bar-container,
body.light-mode #searchArea,
body.light-mode .users-toolbar,
body.light-mode .user-list-header,
body.light-mode .user-detail-header,
body.light-mode .user-detail-summary,
body.light-mode .user-detail-tabs,
body.light-mode .user-detail-sticky{
  background:var(--app-light-page-bg, #e5e7eb) !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}

body.light-mode .score-box{
  background:#f3f4f6 !important;
  border-color:#64748b !important;
}
body.light-mode .header-active-version{
  color:#64748b !important;
}

/* MENUボタン：背景と同色、三本線は黒 */
body.light-mode #btnMenu,
body.light-mode .menu-entry{
  background:#f3f4f6 !important;
  border-color:#cbd5e1 !important;
  color:#111827 !important;
}
body.light-mode #btnMenu *,
body.light-mode .menu-entry *{
  color:#111827 !important;
}
body.light-mode #btnMenu::before,
body.light-mode #btnMenu::after{
  color:#111827 !important;
}

/* スキル値の黒背景を廃止 */
body.light-mode .dc-skill,
body.light-mode .skill-box,
body.light-mode [class*="skill-box-"]{
  background:#f3f4f6 !important;
  background-image:none !important;
  border-color:#cbd5e1 !important;
  color:#111827 !important;
}

/* HOT：枠と文字色は維持し、内側だけ背景色と同化 */
body.light-mode .dc-card .hot-tag{
  background:#f3f4f6 !important;
  color:#991b1b !important;
  border-color:#991b1b !important;
}

/* カード文字 */
body.light-mode .dc-title,
body.light-mode .dc-song-title,
body.light-mode .dc-lv,
body.light-mode .dc-rate,
body.light-mode .dc-lv strong,
body.light-mode .dc-rate strong{
  color:#111827 !important;
}

/* マイページ */
body.light-mode .mypage-sheet,
body.light-mode .mypage-modal .mypage-sheet{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .mypage-sheet label,
body.light-mode .mypage-sheet h2,
body.light-mode .mypage-sheet h3,
body.light-mode .mypage-sheet .mypage-title,
body.light-mode .mypage-sheet .section-note{
  color:#111827 !important;
}
body.light-mode .mypage-sheet .section-note{
  color:#64748b !important;
}
body.light-mode .mypage-sheet input,
body.light-mode .mypage-sheet select,
body.light-mode .mypage-sheet textarea{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .mypage-sheet .btn-logout{
  background:#e5e7eb !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}

/* MENUモーダルも薄グレー */
body.light-mode .app-menu-sheet,
body.light-mode .feature-settings-dialog,
body.light-mode .feedback-dialog,
body.light-mode .howto-dialog,
body.light-mode .rival-manage-dialog,
body.light-mode .skill-sync-dialog,
body.light-mode .site-dialog,
body.light-mode .rate-compare-dialog{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .app-menu-item{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#64748b !important;
}

/* 登録タブの検索・フィルタ */
body.light-mode .search-input,
body.light-mode .record-filter-row select,
body.light-mode .record-filter-row .filter-control,
body.light-mode .filter-select,
body.light-mode #filterType,
body.light-mode #filterFc{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .record-filter-row .filter-control *,
body.light-mode .filter-select *{
  color:#111827 !important;
}

/* フィルタのラベル/疑似セレクトを黒背景にしない */
body.light-mode .record-filter-row > *,
body.light-mode .manage-filter-row > *,
body.light-mode .filter-control{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}

/* ユーザーリスト */
body.light-mode .user-list-row,
body.light-mode .user-list-row:active{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .user-list-header{
  background:#e5e7eb !important;
}
body.light-mode .favorite-toggle{
  background:#e5e7eb !important;
}

/* Xボタンは視認性のため白地に黒文字 */
body.light-mode .user-detail-x-link{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#64748b !important;
}

/* 入力欄は白を残して操作領域を分かりやすく */
body.light-mode input,
body.light-mode select,
body.light-mode textarea{
  color:#111827;
}

/* モーダル背景 */
body.light-mode .site-dialog-mask,
body.light-mode .mypage-modal,
body.light-mode .mdl-mask,
body.light-mode .admin-form-mask{
  background:rgba(15,23,42,.22) !important;
}


/* 設定項目が無効な場合の共通表示 */
#settingLightMode:disabled{
  opacity:.4;
  cursor:not-allowed;
}


/* === FIX122: ライトモード調整 1/登録曲一覧 === */

/* iOS Safariでコンテンツ末尾の余白までダーク背景が見えないようにする */
html:has(body.light-mode),
body.light-mode,
body.light-mode #appScreen,
body.light-mode .p-container,
body.light-mode #viewAllManage{
  background:#f3f4f6 !important;
}

/* 登録タブの検索・フィルタ */
body.light-mode #searchArea,
body.light-mode .record-search-row,
body.light-mode .record-filter-row{
  background:#f3f4f6 !important;
}
body.light-mode #recordTypeFilter,
body.light-mode #recordFcFilter{
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
  color-scheme:light !important;
}
body.light-mode #recordTypeFilter option,
body.light-mode #recordFcFilter option{
  background:#ffffff !important;
  color:#111827 !important;
}

/* 曲別スキル値はJS側で左右のスキル帯を復元。
   白文字は黒縁付きにしてライト背景上でも読めるようにする。 */
body.light-mode #viewAllManage .dc-skill[class*="skill-box-"]{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  -webkit-text-stroke:.45px #111827 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.9) !important;
}

/* スコア登録/編集モーダル */
body.light-mode #domModal .mdl-sheet{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode #domModal .mdl-sheet h3,
body.light-mode #domModal .mdl-sheet label,
body.light-mode #domModal .mdl-sheet .section-note{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
body.light-mode #domModal .mdl-sheet input,
body.light-mode #domModal .mdl-sheet select,
body.light-mode #domModal .mdl-sheet textarea{
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#94a3b8 !important;
  color-scheme:light !important;
}
body.light-mode #domModal .suggestion-list,
body.light-mode #domModal .suggestion{
  background:#ffffff !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}

/* サイト共通のエラー/確認メッセージもライト対応 */
body.light-mode .site-dialog{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .site-dialog-title,
body.light-mode .site-dialog-message{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
body.light-mode .site-dialog-input{
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#94a3b8 !important;
}

/* ライトモードでは全体にごく細い黒縁を追加。
   黒文字ではほぼ目立たず、白/淡色文字の視認性だけ補助する。 */
body.light-mode{
  -webkit-text-stroke:.18px rgba(0,0,0,.55);
}
body.light-mode input,
body.light-mode textarea,
body.light-mode select{
  -webkit-text-stroke:0 !important;
}


/* === FIX123: light mode contrast redesign === */
/* Apple/iOS系の考え方に寄せて、背景/カード/コントロールを階層化。
   黒縁は常用せず、通常文字は濃色でコントラストを確保する。 */
body.light-mode{
  background:var(--app-light-page-bg, #e5e7eb) !important;
  color:#111827 !important;
  -webkit-text-stroke:0 !important;
}
html:has(body.light-mode),
body.light-mode #appScreen,
body.light-mode .p-container,
body.light-mode #viewAllManage{
  background:var(--app-light-page-bg, #e5e7eb) !important;
}

/* 上部と検索領域 */
body.light-mode .app-header,
body.light-mode .sticky-main-header,
body.light-mode #searchArea,
body.light-mode .record-search-row,
body.light-mode .record-filter-row{
  background:#eef0f3 !important;
}
body.light-mode .score-cell{
  background:var(--app-light-page-bg, #e5e7eb) !important;
}
body.light-mode .score-lbl{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
  text-shadow:none !important;
}
/* 検索・フィルタは「操作できる面」と認識できる白系 */
body.light-mode #domSearch,
body.light-mode #recordTypeFilter,
body.light-mode #recordFcFilter{
  background:#f8fafc !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
  box-shadow:0 1px 1px rgba(15,23,42,.06) !important;
  -webkit-text-stroke:0 !important;
}

/* スキル値: ライトモードでは黒文字。左右のスキル帯は維持 */
body.light-mode #viewAllManage .dc-skill[class*="skill-box-"],
body.light-mode .dc-skill[class*="skill-box-"]{
  background-color:#f3f4f6 !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  -webkit-text-stroke:0 !important;
  text-shadow:none !important;
  border-top-color:#cbd5e1 !important;
  border-bottom-color:#cbd5e1 !important;
}

/* 編集ボタン: 独立した青ボタンとして明示。 */
body.light-mode #viewAllManage button[data-edit-index],
body.light-mode #viewAllManage .btn-edit,
body.light-mode #viewAllManage .m-edit-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:48px !important;
  min-height:30px !important;
  padding:5px 10px !important;
  margin:0 !important;
  border:1px solid #1d4ed8 !important;
  border-radius:6px !important;
  background:#3b82f6 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  font-weight:900 !important;
  box-shadow:0 1px 2px rgba(15,23,42,.18) !important;
  -webkit-text-stroke:0 !important;
}

/* 現行DOMで編集がbuttonではないケースも拾う */
body.light-mode #viewAllManage .m-btn-edit{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:48px !important;
  min-height:30px !important;
  padding:5px 10px !important;
  margin:0 !important;
  border:1px solid #1d4ed8 !important;
  border-radius:6px !important;
  background:#3b82f6 !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  box-shadow:0 1px 2px rgba(15,23,42,.18) !important;
}

/* モーダルはページより明るくして前景として分離 */
body.light-mode #domModal .mdl-sheet,
body.light-mode .site-dialog{
  background:#f8fafc !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
}


/* === FIX124: ライトモード 登録画面の視認性調整 === */

/* タブを「ボタン」と認識しやすくする */
body.light-mode .p-tabs{
  background:#eef0f3 !important;
  gap:6px !important;
  padding:6px !important;
}
body.light-mode .p-tab-btn{
  background:#f8fafc !important;
  color:#111827 !important;
  border:1px solid #94a3b8 !important;
  border-radius:7px !important;
  box-shadow:0 1px 1px rgba(15,23,42,.05) !important;
}
body.light-mode .p-tab-btn.active{
  background:#3b82f6 !important;
  color:#ffffff !important;
  border-color:#2563eb !important;
}

/* RAN等は淡い文字ではなく濃い色で */
body.light-mode #viewAllManage .opt-ran,
body.light-mode #userDetailRecords .opt-ran,
body.light-mode .dc-card .opt-ran{
  color:#15803d !important;
  -webkit-text-fill-color:#15803d !important;
  border-color:#15803d !important;
  background:#ecfdf5 !important;
  font-weight:900 !important;
}
body.light-mode #viewAllManage .opt-sra,
body.light-mode #userDetailRecords .opt-sra,
body.light-mode .dc-card .opt-sra{
  color:#c2410c !important;
  -webkit-text-fill-color:#c2410c !important;
  border-color:#c2410c !important;
  background:#fff7ed !important;
  font-weight:900 !important;
}
body.light-mode #viewAllManage .opt-ran-plus,
body.light-mode #userDetailRecords .opt-ran-plus,
body.light-mode .dc-card .opt-ran-plus{
  color:#0369a1 !important;
  -webkit-text-fill-color:#0369a1 !important;
  border-color:#0369a1 !important;
  background:#f0f9ff !important;
  font-weight:900 !important;
}
body.light-mode #viewAllManage .opt-sra-plus,
body.light-mode #userDetailRecords .opt-sra-plus,
body.light-mode .dc-card .opt-sra-plus{
  color:#be123c !important;
  -webkit-text-fill-color:#be123c !important;
  border-color:#be123c !important;
  background:#fff1f2 !important;
  font-weight:900 !important;
}

/* === FIX125: ライトモード 登録画面追加調整 === */

/* ライトモードのスキルカラー文字は、全ランク共通で無加工にする。 */
body.light-mode [class*="score-rank-"]{
  -webkit-text-stroke:0 !important;
  text-shadow:none !important;
  filter:none !important;
}

/* ヘッダーとユーザーリストへ、色を潰さない最小限の共通輪郭を加える。 */
body.light-mode :is(.score-val,.user-list-skill-value)[class*="score-rank-"]{
  -webkit-text-stroke:.2px rgba(15,23,42,.75) !important;
}

/* 登録フィルタ: Safari/Chrome共通で濃い矢印を明示 */
body.light-mode #recordTypeFilter,
body.light-mode #recordFcFilter{
  appearance:none !important;
  -webkit-appearance:none !important;
  padding-right:38px !important;
  background-color:#f8fafc !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #334155 50%),
    linear-gradient(135deg, #334155 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50% !important;
  background-size:6px 6px,6px 6px !important;
  background-repeat:no-repeat !important;
}

/* スコア登録/編集モーダル:
   ダーク固定されていた部品をライト用に上書き */
body.light-mode #domModal .skill-preview{
  background:#e5e7eb !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
  text-shadow:none !important;
  -webkit-text-stroke:0 !important;
}

body.light-mode #domModal .btn-cancel{
  background:#e2e8f0 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  border:1px solid #cbd5e1 !important;
}

body.light-mode #domModal .master-request-area{
  background:#fffbeb !important;
  color:#78350f !important;
  border-color:#f59e0b !important;
}
body.light-mode #domModal .master-request-title{
  color:#78350f !important;
  -webkit-text-fill-color:#78350f !important;
}
body.light-mode #domModal .master-request-note{
  color:#92400e !important;
  -webkit-text-fill-color:#92400e !important;
}

/* 難易度報告ボタンは青のまま、周囲だけライト化 */
body.light-mode #domModal .btn-request-master,
body.light-mode #domModal [data-request-level-correction]{
  background:#3b82f6 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* 編集時の削除エリアもライトテーマに合わせる */
body.light-mode #domModal .edit-delete-area{
  border-top-color:#cbd5e1 !important;
}
body.light-mode #domModal .btn-delete-editing-score{
  background:#fee2e2 !important;
  color:#b91c1c !important;
  -webkit-text-fill-color:#b91c1c !important;
  border-color:#ef4444 !important;
}

/* 候補一覧にダーク指定が残っている場合の最終上書き */
body.light-mode #domModal .suggestion-list,
body.light-mode #domModal .suggestion{
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode #domModal .suggestion:hover,
body.light-mode #domModal .suggestion:active{
  background:#e2e8f0 !important;
}


/* === FIX126: ライトモード 難易度修正エリア === */
body.light-mode #domModal .level-correction-area{
  background:#eef2f7 !important;
  color:#111827 !important;
  border:1px solid #94a3b8 !important;
  border-radius:8px !important;
}

body.light-mode #domModal .level-correction-head{
  background:transparent !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}

body.light-mode #domModal .level-correction-title{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

body.light-mode #domModal .level-correction-note{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}

body.light-mode #domModal #btnOpenLevelCorrection,
body.light-mode #domModal #btnSendLevelCorrection{
  background:#3b82f6 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border:1px solid #1d4ed8 !important;
}

body.light-mode #domModal .level-correction-form{
  background:#f8fafc !important;
  color:#111827 !important;
  border-top:1px solid #cbd5e1 !important;
}

body.light-mode #domModal .level-correction-form label{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

body.light-mode #domModal #correctionLevel{
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
}


/* === FIX127: ライトモード MENU バージョン選択 === */
body.light-mode #versionSelect,
body.light-mode .app-menu-sheet #versionSelect{
  -webkit-appearance:none !important;
  appearance:none !important;
  color-scheme:light !important;
  background-color:#f8fafc !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
  box-shadow:0 1px 1px rgba(15,23,42,.06) !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #334155 50%),
    linear-gradient(135deg, #334155 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50% !important;
  background-size:6px 6px,6px 6px !important;
  background-repeat:no-repeat !important;
  padding-right:38px !important;
}
body.light-mode #versionSelect option{
  background:#ffffff !important;
  color:#111827 !important;
}


/* ユーザー詳細の戻るボタンをライトテーマ化 */
body.light-mode .user-detail-back{
  background:#f8fafc !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
  border-radius:7px !important;
  box-shadow:0 1px 1px rgba(15,23,42,.06) !important;
}
body.light-mode .user-detail-back:active{
  background:#e2e8f0 !important;
}





/* === FIX130: ライトモード ユーザーリスト背景調整 ===
   スキルカラーはダーク/ライトで完全共通。
   ライト専用の色置換・輪郭は行わず、背景側でコントラストを確保する。 */
body.light-mode .user-list-row,
body.light-mode .user-list-row:active{
  background:#d8dde5 !important;
  color:#111827 !important;
  border-color:#8b98aa !important;
  box-shadow:0 1px 1px rgba(15,23,42,.06) !important;
}

.user-detail-instrument-switch{
  flex:0 0 auto;
}
.user-detail-instrument-switch .instrument-btn{
  width:36px;
  min-width:36px;
  height:30px;
  padding:0;
}

/* 背景はFIX130の少し濃いグレーを維持 */
body.light-mode .user-list-row,
body.light-mode .user-list-row:active{
  background:#d8dde5 !important;
  color:#111827 !important;
  border-color:#8b98aa !important;
  box-shadow:0 1px 1px rgba(15,23,42,.05) !important;
}


/* === FIX133: ライトモード モーダル全面対応 ===
   マイページ / 共通エラー・確認 / 機能設定 / How to use /
   要望・不具合 / ライバル管理 / スキル同期 / 比較系をライトテーマへ統一。 */

/* モーダル本体 */
body.light-mode .mypage-sheet,
body.light-mode .site-dialog,
body.light-mode .feature-settings-dialog,
body.light-mode .feedback-dialog,
body.light-mode .howto-dialog,
body.light-mode .rival-manage-dialog,
body.light-mode .skill-sync-dialog,
body.light-mode .rate-compare-dialog{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-color:#94a3b8 !important;
  box-shadow:0 18px 42px rgba(15,23,42,.20) !important;
}

/* 見出し / 通常文字 */
body.light-mode .mypage-sheet h2,
body.light-mode .mypage-sheet h3,
body.light-mode .mypage-sheet label,
body.light-mode .mypage-sheet .mypage-section-title,
body.light-mode .site-dialog-title,
body.light-mode .site-dialog-message,
body.light-mode .feature-settings-dialog,
body.light-mode .feedback-dialog,
body.light-mode .howto-dialog,
body.light-mode .rival-manage-dialog,
body.light-mode .skill-sync-dialog,
body.light-mode .rate-compare-dialog,
body.light-mode .rate-compare-title,
body.light-mode .rate-user{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* 補助文言 */
body.light-mode .mypage-sheet .section-note,
body.light-mode .feature-setting-row small,
body.light-mode .rate-skill,
body.light-mode .rate-compare-label{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}

/* 入力欄・select・textarea */
body.light-mode .mypage-sheet input,
body.light-mode .mypage-sheet select,
body.light-mode .mypage-sheet textarea,
body.light-mode .site-dialog input,
body.light-mode .site-dialog select,
body.light-mode .site-dialog textarea,
body.light-mode .feature-settings-dialog input,
body.light-mode .feature-settings-dialog select,
body.light-mode .feature-settings-dialog textarea,
body.light-mode .feedback-dialog input,
body.light-mode .feedback-dialog select,
body.light-mode .feedback-dialog textarea,
body.light-mode .howto-dialog input,
body.light-mode .howto-dialog select,
body.light-mode .howto-dialog textarea,
body.light-mode .rival-manage-dialog input,
body.light-mode .rival-manage-dialog select,
body.light-mode .rival-manage-dialog textarea,
body.light-mode .skill-sync-dialog input,
body.light-mode .skill-sync-dialog select,
body.light-mode .skill-sync-dialog textarea{
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#94a3b8 !important;
  color-scheme:light !important;
}

/* プレースホルダー */
body.light-mode .mypage-sheet input::placeholder,
body.light-mode .site-dialog input::placeholder,
body.light-mode .feature-settings-dialog input::placeholder,
body.light-mode .feedback-dialog input::placeholder,
body.light-mode .howto-dialog input::placeholder,
body.light-mode .rival-manage-dialog input::placeholder,
body.light-mode .skill-sync-dialog input::placeholder{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}

/* マイページ固有 */
body.light-mode #mypageModal .mypage-sheet{
  background:#f3f4f6 !important;
}
body.light-mode #mypageModal .btn-cancel,
body.light-mode #mypageModal .btn-logout{
  background:#e2e8f0 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode #mypageModal .mypage-favorites,
body.light-mode #mypageModal .danger-zone,
body.light-mode #mypageModal .mypage-x-block{
  border-color:#cbd5e1 !important;
}
body.light-mode #mypageModal .favorite-user-row{
  background:#e9edf2 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode #mypageModal .favorite-user-row .name{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
body.light-mode #mypageModal .danger-zone button,
body.light-mode #mypageModal .btn-danger-wide{
  background:#fee2e2 !important;
  color:#b91c1c !important;
  -webkit-text-fill-color:#b91c1c !important;
  border-color:#ef4444 !important;
}

/* MENU系ダイアログの行 */
body.light-mode .feature-setting-row,
body.light-mode .rate-row,
body.light-mode .favorite-user-row{
  background:#e9edf2 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}

/* 共通エラー/確認モーダルのボタン */
body.light-mode .site-dialog-actions button,
body.light-mode .site-dialog button{
  border-color:#94a3b8 !important;
}
body.light-mode .site-dialog .site-dialog-confirm,
body.light-mode .site-dialog .btn-primary{
  background:#3b82f6 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
body.light-mode .site-dialog .site-dialog-cancel,
body.light-mode .site-dialog .btn-secondary{
  background:#e2e8f0 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
}

/* ライバル管理 */
body.light-mode .rival-manage-dialog .favorite-user-row,
body.light-mode .rival-manage-dialog .rival-row{
  background:#e9edf2 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}

/* スキル同期 */
body.light-mode .skill-sync-dialog .skill-sync-status-top,
body.light-mode .skill-sync-dialog .skill-sync-browser-guide{
  background:#e9edf2 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .skill-sync-dialog .skill-sync-browser-guide strong{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
body.light-mode .skill-sync-dialog .skill-sync-browser-warning{
  color:#b45309 !important;
  -webkit-text-fill-color:#b45309 !important;
}

/* 登録曲比較 */
body.light-mode .rate-compare-head{
  border-bottom-color:#cbd5e1 !important;
}
body.light-mode .rate-row{
  border-bottom-color:#cbd5e1 !important;
}
body.light-mode .rate-row.self{
  background:#dbeafe !important;
}

/* 閉じる/戻る系の小ボタン */
body.light-mode .app-menu-head button,
body.light-mode .rate-compare-head button,
body.light-mode .feature-settings-dialog button[id*="Close"],
body.light-mode .feedback-dialog button[id*="Close"],
body.light-mode .howto-dialog button[id*="Close"],
body.light-mode .rival-manage-dialog button[id*="Close"],
body.light-mode .skill-sync-dialog button[id*="Close"]{
  background:#f8fafc !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
}


/* === FIX134: ライトモード モーダル残存ダーク部品修正 === */

/* 1. マイページ：ID付きセレクタで旧ダーク!importantを上書き */
body.light-mode #mypageModal .mypage-sheet input,
body.light-mode #mypageModal #mypageUsernameInput,
body.light-mode #mypageModal #newPassword,
body.light-mode #mypageModal #mypageXIdInput{
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#94a3b8 !important;
  color-scheme:light !important;
}
body.light-mode #mypageModal .mypage-sheet input::placeholder,
body.light-mode #mypageModal #newPassword::placeholder,
body.light-mode #mypageModal #mypageXIdInput::placeholder{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}
body.light-mode #mypageModal .mypage-close{
  background:transparent !important;
  color:#2563eb !important;
  -webkit-text-fill-color:#2563eb !important;
}

/* 2. 登録曲詳細：上部サマリー/オプション欄/比較ヘッダーをライト化 */
body.light-mode .rate-compare-dialog .rate-personal-best,
body.light-mode .rate-compare-dialog .rate-option-summary{
  background:#e9edf2 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .rate-compare-dialog .option-share-item,
body.light-mode .rate-compare-dialog .option-share-item strong,
body.light-mode .rate-compare-dialog .option-share-title{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
body.light-mode .rate-compare-dialog .option-share-title{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}
body.light-mode .rate-compare-dialog .rate-compare-body{
  background:#f3f4f6 !important;
}
body.light-mode .rate-compare-dialog .rate-row{
  background:#e9edf2 !important;
  color:#111827 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .rate-compare-dialog .rate-row.self{
  background:#dbeafe !important;
}

/* 比較表の見出し等にダーク固定が残った場合も明示的に上書き */
body.light-mode .rate-compare-dialog [class*="rate-"][class*="header"],
body.light-mode .rate-compare-dialog [class*="rate-"][class*="head"]:not(.rate-compare-head){
  background:#dfe4ea !important;
  color:#475569 !important;
  border-color:#cbd5e1 !important;
}

/* 3. 機能設定：主要アクションの文字色は他ボタン同様に白 */
body.light-mode #btnSaveFeatureSettings,
body.light-mode .feature-settings-save{
  background:#3b82f6 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border-color:#2563eb !important;
}

/* 4. スキル対象同期：旧ダーク固定部を全てライト化 */
body.light-mode .skill-sync-dialog .skill-sync-note{
  background:#e9edf2 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .skill-sync-dialog .skill-sync-note strong{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

body.light-mode .skill-sync-dialog .skill-sync-status,
body.light-mode .skill-sync-dialog .skill-sync-status-top{
  background:#e2e8f0 !important;
  color:#475569 !important;
  -webkit-text-fill-color:#475569 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .skill-sync-dialog .skill-sync-status.running{
  background:#dbeafe !important;
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  border-color:#3b82f6 !important;
}
body.light-mode .skill-sync-dialog .skill-sync-status.success{
  background:#dcfce7 !important;
  color:#166534 !important;
  -webkit-text-fill-color:#166534 !important;
  border-color:#22c55e !important;
}
body.light-mode .skill-sync-dialog .skill-sync-status.error{
  background:#fee2e2 !important;
  color:#b91c1c !important;
  -webkit-text-fill-color:#b91c1c !important;
  border-color:#ef4444 !important;
}

body.light-mode .skill-sync-dialog .skill-sync-step{
  border-bottom-color:#94a3b8 !important;
}
body.light-mode .skill-sync-dialog #btnCopySkillSync{
  background:#e2e8f0 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  border-color:#94a3b8 !important;
}
body.light-mode .skill-sync-dialog #btnCopySkillSync:not(:disabled):active{
  background:#cbd5e1 !important;
}
body.light-mode .skill-sync-dialog #btnCopySkillSync:disabled{
  background:#e5e7eb !important;
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .skill-sync-dialog .btn-open-eamusement{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* モーダル内の青い主ボタンは一律白文字 */
body.light-mode .feature-settings-dialog .btn-submit,
body.light-mode .feedback-dialog .btn-submit,
body.light-mode .skill-sync-dialog .btn-submit,
body.light-mode .rival-manage-dialog .btn-submit{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* === FIX135: ライトモード 登録曲詳細スキル / ライバル管理 === */

/* 登録曲詳細のSKILLは登録曲一覧と同じく黒文字に統一。
   左右のスキルカラー帯は skill-box-* 側の背景画像をそのまま維持。 */
body.light-mode .rate-compare-dialog .rate-skill[class*="skill-box-"]{
  background-color:#e9edf2 !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  -webkit-text-stroke:0 !important;
  text-shadow:none !important;
  border-top-color:#cbd5e1 !important;
  border-bottom-color:#cbd5e1 !important;
}

/* ライバル管理：カード内のダーク固定をライト化 */
body.light-mode .rival-manage-dialog .favorite-user-row{
  background:#e9edf2 !important;
  border:1px solid #cbd5e1 !important;
  color:#111827 !important;
}

body.light-mode .rival-manage-dialog .favorite-user-open{
  background:#f8fafc !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #cbd5e1 !important;
  box-shadow:none !important;
}

body.light-mode .rival-manage-dialog .favorite-user-open:active{
  background:#e2e8f0 !important;
}

body.light-mode .rival-manage-dialog .favorite-user-open .name{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

body.light-mode .rival-manage-dialog .favorite-user-skill-label{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}

body.light-mode .rival-manage-dialog .favorite-user-arrow{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}

/* 削除ボタン */
body.light-mode .rival-manage-dialog .favorite-user-row > .remove{
  background:#fee2e2 !important;
  color:#b91c1c !important;
  -webkit-text-fill-color:#b91c1c !important;
  border:1px solid #ef4444 !important;
  border-radius:7px !important;
}

body.light-mode .rival-manage-dialog .favorite-user-row > .remove:active{
  background:#fecaca !important;
}

/* セクション境界 */
body.light-mode .rival-manage-dialog .rival-manage-block + .rival-manage-block{
  border-top-color:#94a3b8 !important;
}


/* === FIX137: ライバル管理の行背景をユーザーリストと統一 === */
body.light-mode .rival-manage-dialog .favorite-user-row{
  background:#d8dde5 !important;
  color:#111827 !important;
  border-color:#8b98aa !important;
  box-shadow:0 1px 1px rgba(15,23,42,.05) !important;
}

body.light-mode .rival-manage-dialog .favorite-user-open{
  background:#d8dde5 !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#8b98aa !important;
}

body.light-mode .rival-manage-dialog .favorite-user-open:active{
  background:#cfd5de !important;
}


/* === FIX143: 要望・不具合 1往復返信 + ユーザー送信履歴 === */
.feedback-history-divider{
  height:1px;
  margin:16px 0 12px;
  background:#334155;
}
.feedback-history-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.feedback-history-head strong{
  color:#f8fafc;
  font-size:13px;
}
.feedback-history-head span{
  color:#64748b;
  font-size:9px;
  font-weight:800;
}
.feedback-history{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.feedback-history-card{
  padding:9px;
  border:1px solid #334155;
  border-radius:8px;
  background:#111827;
}
.feedback-history-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}
.feedback-history-date,
.feedback-history-status{
  color:#94a3b8;
  font-size:9px;
  font-weight:800;
}
.feedback-history-message{
  color:#f8fafc;
  font-size:11px;
  line-height:1.55;
  word-break:break-word;
}
.feedback-history-reply{
  margin-top:8px;
  padding:8px;
  border-left:3px solid #2563eb;
  border-radius:5px;
  background:#0b1220;
}
.feedback-history-reply-label{
  margin-bottom:4px;
  color:#60a5fa;
  font-size:9px;
  font-weight:900;
}
.feedback-history-reply-message{
  color:#e2e8f0;
  font-size:11px;
  line-height:1.55;
  word-break:break-word;
}
.feedback-history-empty{
  padding:14px 8px;
  color:#64748b;
  font-size:10px;
  text-align:center;
}

/* 管理者返信 */
.feedback-admin-reply-box{
  margin-top:8px;
  padding:8px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#f8fafc;
}
.feedback-admin-reply-label{
  margin-bottom:5px;
  color:#475569;
  font-size:10px;
  font-weight:900;
}
.feedback-admin-reply-box textarea{
  width:100%;
  min-height:72px;
  box-sizing:border-box;
  padding:8px;
  border:1px solid #94a3b8;
  border-radius:6px;
  background:#fff;
  color:#111827;
  font:inherit;
  font-size:11px;
  resize:vertical;
}
.feedback-admin-reply-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:6px;
}
.feedback-admin-reply-actions button{
  min-height:32px;
  padding:0 12px;
  border:1px solid #1d4ed8;
  border-radius:6px;
  background:#3b82f6;
  color:#fff;
  font-size:10px;
  font-weight:900;
}
.feedback-admin-replied{
  margin-top:8px;
  padding:8px;
  border-left:3px solid #2563eb;
  border-radius:5px;
  background:#eff6ff;
  color:#1e293b;
  font-size:11px;
  line-height:1.55;
}
.feedback-admin-replied strong{
  display:block;
  margin-bottom:4px;
  color:#1d4ed8;
  font-size:10px;
}

/* light mode */
body.light-mode .feedback-history-divider{
  background:#cbd5e1 !important;
}
body.light-mode .feedback-history-head strong{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
body.light-mode .feedback-history-head span{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}
body.light-mode .feedback-history-card{
  background:#e9edf2 !important;
  border-color:#cbd5e1 !important;
}
body.light-mode .feedback-history-date,
body.light-mode .feedback-history-status{
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}
body.light-mode .feedback-history-message{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
body.light-mode .feedback-history-reply{
  background:#dbeafe !important;
  border-left-color:#2563eb !important;
}
body.light-mode .feedback-history-reply-label{
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
}
body.light-mode .feedback-history-reply-message{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}


/* === FIX146: 登録曲詳細 10人表示時の縦スクロール対応 === */
.rate-compare-dialog{
  display:flex !important;
  flex-direction:column !important;
  max-height:calc(100dvh - 36px) !important;
  overflow:hidden !important;
}

.rate-compare-head{
  flex:0 0 auto !important;
}

.rate-compare-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow-y:auto !important;
  -webkit-overflow-scrolling:touch !important;
  overscroll-behavior:contain !important;
  touch-action:pan-y !important;
}

/* iPhone Safariでは下端に少し余白を確保 */
@media(max-width:520px){
  .rate-compare-dialog{
    max-height:calc(100dvh - 24px) !important;
  }
  .rate-compare-body{
    padding-bottom:max(12px, env(safe-area-inset-bottom)) !important;
  }
}


/* === FIX147: 登録曲詳細の一覧ヘッダーをスクロール時も固定 === */
.rate-compare-body .rate-table-head,
.rate-compare-body .rate-header,
.rate-compare-body .rate-row-header,
.rate-compare-body > [class*="rate-"][class*="head"]:not(.rate-compare-head){
  position:sticky !important;
  top:0 !important;
  z-index:20 !important;
}

/* 実際の「ユーザー / 達成率 / SKILL」行を固定 */
.rate-compare-body .rate-row:first-of-type:has(.rate-user-header),
.rate-compare-body .rate-row:first-child:has(.rate-user-header){
  position:sticky !important;
  top:0 !important;
  z-index:20 !important;
}

/* FIX146のスクロール領域は維持 */
.rate-compare-body{
  overflow-y:auto !important;
  -webkit-overflow-scrolling:touch !important;
}


/* === FIX149: 曲詳細の固定項目行をスクロール内容が貫通しないようにする === */
.rate-compare-body{
  position:relative !important;
  isolation:isolate !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  -webkit-overflow-scrolling:touch !important;
}

/* 「ユーザー / 達成率 / SKILL」行 */
.rate-compare-body .rate-table-head,
.rate-compare-body .rate-header,
.rate-compare-body .rate-row-header,
.rate-compare-body > [class*="rate-"][class*="head"]:not(.rate-compare-head),
.rate-compare-body .rate-row:first-of-type:has(.rate-user-header),
.rate-compare-body .rate-row:first-child:has(.rate-user-header){
  position:sticky !important;
  top:0 !important;
  z-index:100 !important;
  opacity:1 !important;
  transform:translateZ(0);
}

/* 固定ヘッダーの背景を必ず不透明にする */
body:not(.light-mode) .rate-compare-body .rate-table-head,
body:not(.light-mode) .rate-compare-body .rate-header,
body:not(.light-mode) .rate-compare-body .rate-row-header,
body:not(.light-mode) .rate-compare-body > [class*="rate-"][class*="head"]:not(.rate-compare-head),
body:not(.light-mode) .rate-compare-body .rate-row:first-of-type:has(.rate-user-header),
body:not(.light-mode) .rate-compare-body .rate-row:first-child:has(.rate-user-header){
  background:#111827 !important;
}

body.light-mode .rate-compare-body .rate-table-head,
body.light-mode .rate-compare-body .rate-header,
body.light-mode .rate-compare-body .rate-row-header,
body.light-mode .rate-compare-body > [class*="rate-"][class*="head"]:not(.rate-compare-head),
body.light-mode .rate-compare-body .rate-row:first-of-type:has(.rate-user-header),
body.light-mode .rate-compare-body .rate-row:first-child:has(.rate-user-header){
  background:#dfe5ec !important;
}

/* Safariで子要素のz-indexがstickyを突き抜けないようユーザー行を下層へ固定 */
.rate-compare-body .rate-row:not(:has(.rate-user-header)){
  position:relative !important;
  z-index:1 !important;
}


/* === FIX150: 曲詳細の項目行をスクロール領域の外へ分離 === */
/* stickyを使わず、ヘッダー自体をスクロール要素の外に置く。
   これでiPhone Safariでもユーザー行が項目行を貫通しない。 */
.rate-table-head-fixed{
  flex:0 0 auto !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 82px 70px !important;
  gap:7px !important;
  align-items:center !important;
  padding:7px 8px !important;
  margin:0 8px !important;
  position:relative !important;
  z-index:10 !important;
  border:1px solid #334155 !important;
  border-radius:6px !important;
  background:#111827 !important;
  color:#94a3b8 !important;
  font-size:9px !important;
  font-weight:900 !important;
  box-sizing:border-box !important;
}

.rate-compare-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  -webkit-overflow-scrolling:touch !important;
  overscroll-behavior:contain !important;
  isolation:auto !important;
}

/* FIX147/149のsticky指定を完全解除 */
.rate-compare-body .rate-table-head,
.rate-compare-body .rate-header,
.rate-compare-body .rate-row-header,
.rate-compare-body > [class*="rate-"][class*="head"]:not(.rate-compare-head){
  position:static !important;
  top:auto !important;
  z-index:auto !important;
}

body.light-mode .rate-table-head-fixed{
  background:#dfe5ec !important;
  color:#475569 !important;
  -webkit-text-fill-color:#475569 !important;
  border-color:#94a3b8 !important;
}


/* === FIX155: ライトモードのplaceholderを入力済み文字と明確に区別 === */
body.light-mode input::placeholder,
body.light-mode textarea::placeholder{
  color:#7b8798 !important;
  -webkit-text-fill-color:#7b8798 !important;
  opacity:1 !important;
}

/* Safari */
body.light-mode input::-webkit-input-placeholder,
body.light-mode textarea::-webkit-input-placeholder{
  color:#7b8798 !important;
  -webkit-text-fill-color:#7b8798 !important;
  opacity:1 !important;
}


/* === FIX157: MENU配下モーダルの「戻る」ボタンを完全統一 === */
#btnCloseMypage.menu-back-btn,
#btnCloseFeatureSettings.menu-back-btn,
#btnCloseSkillSync.menu-back-btn,
#btnCloseRivalManage.menu-back-btn,
#btnCloseHowTo.menu-back-btn,
#btnCloseFeedback.menu-back-btn{
  width:auto !important;
  min-width:44px !important;
  height:32px !important;
  min-height:32px !important;
  padding:0 4px 0 10px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#93c5fd !important;
  -webkit-text-fill-color:#93c5fd !important;
  box-shadow:none !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:32px !important;
  white-space:nowrap !important;
  text-align:right !important;
  appearance:none !important;
  -webkit-appearance:none !important;
}

/* app-menu-head側の34x34/20px指定を確実に打ち消す */
.app-menu-head .menu-back-btn,
.skill-sync-head .menu-back-btn,
.mypage-title-row .menu-back-btn{
  width:auto !important;
  height:32px !important;
  background:transparent !important;
  font-size:12px !important;
}

body.light-mode #btnCloseMypage.menu-back-btn,
body.light-mode #btnCloseFeatureSettings.menu-back-btn,
body.light-mode #btnCloseSkillSync.menu-back-btn,
body.light-mode #btnCloseRivalManage.menu-back-btn,
body.light-mode #btnCloseHowTo.menu-back-btn,
body.light-mode #btnCloseFeedback.menu-back-btn{
  background:transparent !important;
  color:#2563eb !important;
  -webkit-text-fill-color:#2563eb !important;
  border:0 !important;
  box-shadow:none !important;
}


/* === FIX158: 要望・不具合報告 ご利用環境 === */
.feedback-env-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.feedback-body input{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  padding:8px 10px;
  background:#111827;
  color:#f8fafc;
  border:1px solid #334155;
  border-radius:8px;
  font:inherit;
}
.feedback-env-note{
  margin-top:5px;
  color:#64748b;
  font-size:10px;
}
.feedback-admin-env,
.feedback-history-env{
  margin-top:7px;
  padding:7px 9px;
  border-radius:7px;
  background:rgba(148,163,184,.10);
  color:#94a3b8;
  font-size:11px;
  line-height:1.5;
}
.feedback-admin-env strong,
.feedback-history-env strong{
  color:inherit;
}
body.light-mode .feedback-body input{
  background:#fff !important;
  color:#0f172a !important;
  border-color:#94a3b8 !important;
}
body.light-mode .feedback-body input::placeholder{
  color:#7b8798 !important;
  opacity:1 !important;
}
body.light-mode .feedback-env-note{
  color:#64748b;
}
body.light-mode .feedback-admin-env,
body.light-mode .feedback-history-env{
  background:#e2e8f0;
  color:#475569;
}
@media (max-width:420px){
  .feedback-env-grid{grid-template-columns:1fr;}
}


/* === FIX161: 登録依頼 曲名修正欄 === */
.admin-request-title-wrap{flex:1;min-width:0}
.admin-request-title-wrap label{
  display:block;margin-bottom:3px;color:#64748b;font-size:10px;font-weight:900
}
.request-title-edit{
  width:100%;min-height:38px;box-sizing:border-box;padding:6px 9px;
  border:1px solid #cbd5e1;border-radius:6px;background:#fff;
  color:#111827;font-size:13px;font-weight:900
}
.request-title-edit:focus{outline:2px solid rgba(37,99,235,.22);border-color:#2563eb}
body.light-mode .request-title-edit{
  background:#fff!important;color:#111827!important;
  -webkit-text-fill-color:#111827!important;border-color:#94a3b8!important
}


/* === FIX164: ライトモード ユーザーリストページ切替 === */
body.light-mode .user-list-pager {
  color:#64748b !important;
}
body.light-mode .user-list-pager button {
  border:1px solid #94a3b8 !important;
  background:#f8fafc !important;
  color:#111827 !important;
  box-shadow:none !important;
}
body.light-mode .user-list-pager button:not(:disabled):active {
  background:#e2e8f0 !important;
}
body.light-mode .user-list-pager button:disabled {
  background:#e2e8f0 !important;
  color:#64748b !important;
  border-color:#cbd5e1 !important;
  opacity:1 !important;
}
body.light-mode .user-list-page-summary {
  color:#64748b !important;
}
