/* Daftar Pemain Fun Match (section #pemain). Mobile-first, tanpa luapan horizontal. */
.fmp { min-width: 0; padding: 28px 0 40px; }
.fmp *, .fmp *::before, .fmp *::after { box-sizing: border-box; }
.fmp-focus:focus-visible, .fmp-btn:focus-visible, .fmp-chip:focus-visible, .fmp-seg button:focus-visible, .fmp-input:focus-visible { outline: 3px solid #f57c00; outline-offset: 2px; }

/* Kepala */
.fmp-head { min-width: 0; background: #003366; color: #fff; padding: 18px 16px; border-bottom: 4px solid #f57c00; position: relative; overflow: hidden; }
.fmp-head::after { content: ''; position: absolute; right: -30px; top: -10px; bottom: -10px; width: 90px; background: rgba(255, 255, 255, .06); transform: skewX(-14deg); pointer-events: none; }
.fmp-headrow { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.fmp-headtxt { min-width: 0; flex: 1 1 200px; }
.fmp-kicker { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #ffd700; }
.fmp-title { margin: 4px 0 0; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 26px; line-height: 1.15; color: #fff; overflow-wrap: anywhere; }
.fmp-sub { margin: 4px 0 0; font-size: 14px; color: rgba(255, 255, 255, .8); }
.fmp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  background: #f57c00; color: #fff; font-weight: 800; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; flex: none;
  transition: background .2s ease, transform .15s ease;
}
.fmp-btn:hover { background: #d86d00; }
.fmp-btn:active { transform: scale(.97); }
.fmp-btn.is-ghost { background: #fff; color: #003366; border: 2px solid #003366; }
.fmp-btn.is-ghost:hover { background: #eef3f9; }
.fmp-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 14px; position: relative; z-index: 1; }
.fmp-count { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 40px; line-height: 1; color: #fff; }
.fmp-count small { font-size: 16px; font-weight: 800; letter-spacing: .08em; margin-left: 6px; color: #ffd700; text-transform: uppercase; }
.fmp-wait { font-size: 14px; font-weight: 700; color: #ffd700; }
.fmp-time { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, .7); position: relative; z-index: 1; min-height: 16px; }
.fmp-time.is-bad { color: #fecaca; font-weight: 700; }

/* Panel bawah kepala */
.fmp-panel { min-width: 0; background: #fff; border: 1px solid #e2e8f0; border-top: 0; padding: 16px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.fmp-label { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #94a3b8; }

/* Chip rekap */
.fmp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fmp-chips li { min-width: 0; max-width: 100%; }
.fmp-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 4px 12px;
  background: #fff; color: #1e293b; font-size: 14px; font-weight: 700; font-family: inherit; text-align: left;
  border: 2px solid #cbd5e1; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.fmp-chip:hover { border-color: #003366; }
.fmp-chip-n { flex: none; min-width: 24px; height: 24px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: #e8f5e9; color: #2e7d32; font-size: 13px; font-weight: 800; }
.fmp-chip-t { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.fmp-chip-0 { font-size: 11px; font-weight: 700; color: #94a3b8; white-space: nowrap; }
.fmp-chip-x { flex: none; padding: 1px 6px; font-size: 11px; font-weight: 800; color: #9a3412; background: #fff7ed; border: 1px solid #fdba74; white-space: nowrap; }
.fmp-chip.is-on .fmp-chip-x { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.fmp-chip.is-zero { background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; }
.fmp-chip.is-zero .fmp-chip-n { background: #e2e8f0; color: #94a3b8; }
.fmp-chip.is-on { background: #003366; border-color: #003366; color: #fff; }
.fmp-chip.is-on .fmp-chip-n { background: #fff; color: #003366; }
.fmp-chip.is-on .fmp-chip-0 { color: rgba(255, 255, 255, .75); }

/* Alat bantu */
.fmp-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 8px; }
.fmp-input {
  display: block; width: 100%; min-height: 48px; padding: 10px 14px; font-size: 16px; font-family: inherit; color: #0f172a; background: #fff;
  border: 1px solid #cbd5e1; border-bottom-width: 3px; border-radius: 0; -webkit-appearance: none; appearance: none;
}
.fmp-input:focus { outline: none; border-bottom-color: #f57c00; }
.fmp-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.fmp-grp > span { font-size: 13px; font-weight: 800; color: #475569; }
.fmp-seg { display: inline-flex; max-width: 100%; border: 2px solid #003366; }
.fmp-seg button { min-height: 40px; padding: 0 14px; background: #fff; color: #003366; font-size: 14px; font-weight: 800; font-family: inherit; border: 0; cursor: pointer; }
.fmp-seg button + button { border-left: 2px solid #003366; }
.fmp-seg button.is-on { background: #003366; color: #fff; }
.fmp-result { min-height: 20px; margin: 4px 0 14px; font-size: 13px; font-weight: 700; color: #64748b; }
.fmp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Grup dan kartu */
.fmp-group { min-width: 0; margin-top: 22px; }
.fmp-group:first-child { margin-top: 0; }
.fmp-gh { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid #003366; min-width: 0; }
.fmp-gh-t { flex: 1 1 auto; min-width: 0; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: #003366; overflow-wrap: anywhere; }
.fmp-gh-t em { font-style: normal; font-weight: 700; letter-spacing: 0; text-transform: none; color: #64748b; font-size: 13px; }
.fmp-gh-n { flex: none; min-width: 28px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; background: #003366; color: #fff; font-size: 13px; font-weight: 800; transform: skewX(-8deg); }
.fmp-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.fmp-card { display: flex; align-items: flex-start; gap: 12px; min-width: 0; height: 100%; padding: 12px; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(15, 23, 42, .04); transition: transform .2s ease, box-shadow .2s ease; }
.fmp-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 23, 42, .10); }
.fmp-card.is-me { background: #fff7ed; outline: 2px solid #f57c00; outline-offset: 2px; }
.fmp-av { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .02em; --ring: #64748b; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ring); }
/* Cincin avatar: cadangan netral dari palet fmp-c0..c5 (JS belum menyediakan hook kelompok posisi) */
.fmp-av.fmp-c0 { --ring: #003366; } .fmp-av.fmp-c1 { --ring: #2e7d32; } .fmp-av.fmp-c2 { --ring: #f57c00; }
.fmp-av.fmp-c3 { --ring: #6d28d9; } .fmp-av.fmp-c4 { --ring: #0e7490; } .fmp-av.fmp-c5 { --ring: #be123c; }
/* Siap pakai bila JS kelak memberi data-grup pada .fmp-card (kiper/belakang/tengah/depan/bebas) */
.fmp-card[data-grup="kiper"] .fmp-av { --ring: #d4a017; }
.fmp-card[data-grup="belakang"] .fmp-av { --ring: #1d4ed8; }
.fmp-card[data-grup="tengah"] .fmp-av { --ring: #16a34a; }
.fmp-card[data-grup="depan"] .fmp-av { --ring: #dc2626; }
.fmp-card[data-grup="bebas"] .fmp-av { --ring: #64748b; }
.fmp-c0 { background: #003366; } .fmp-c1 { background: #2e7d32; } .fmp-c2 { background: #f57c00; }
.fmp-c3 { background: #6d28d9; } .fmp-c4 { background: #0e7490; } .fmp-c5 { background: #be123c; }
.fmp-info { flex: 1 1 auto; min-width: 0; }
.fmp-namerow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fmp-name { min-width: 0; font-weight: 800; font-size: 16px; line-height: 1.3; color: #0f172a; overflow-wrap: anywhere; }
.fmp-me { flex: none; padding: 2px 8px; background: #f57c00; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.fmp-sat { margin-top: 2px; font-size: 13px; color: #64748b; line-height: 1.4; overflow-wrap: anywhere; }
.fmp-pos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fmp-pc { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.fmp-pc b { flex: none; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: #cbd5e1; color: #fff; font-size: 10px; }
.fmp-pc.is-p1 { background: #e8f5e9; color: #1b5e20; }
.fmp-pc.is-p1 b { background: #2e7d32; }

/* Keadaan khusus */
.fmp-state { min-width: 0; text-align: center; padding: 28px 16px; background: #fff; border: 1px solid #e2e8f0; border-top: 4px solid #003366; }
.fmp-state-ico { width: 64px; height: 64px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: 9999px; background: #f1f5f9; color: #94a3b8; }
.fmp-state-t { margin: 0 0 6px; font-weight: 800; font-size: 17px; color: #334155; }
.fmp-state-p { margin: 0 auto; max-width: 28rem; font-size: 14px; color: #64748b; line-height: 1.55; }
.fmp-state .fmp-btn { margin-top: 16px; }

@media (min-width: 640px) {
  .fmp { padding: 36px 0 56px; }
  .fmp-head { padding: 22px 24px; }
  .fmp-title { font-size: 32px; }
  .fmp-count { font-size: 48px; }
  .fmp-panel { padding: 20px 24px; }
  .fmp-tools { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .fmp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .fmp-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .fmp-btn, .fmp-chip { transition: none; }
  .fmp-card { transition: none; }
  .fmp-card:hover { transform: none; }
}

/* ---------- Tim (setelah diumumkan) ---------- */
/* Warna tim (kontrak docs/rencana_funmatch_tim.md 10.2): --tc warna utama, --tt teks di atasnya */
.tim-merah { --tc: #dc2626; --tt: #fff; }
.tim-biru { --tc: #1d4ed8; --tt: #fff; }
.tim-hijau { --tc: #16a34a; --tt: #fff; }
.tim-kuning { --tc: #facc15; --tt: #1f2937; }

.fmp-tabs { display: flex; gap: 0; margin: 0 0 16px; border: 2px solid #003366; max-width: 100%; }
.fmp-tab { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 12px; background: #fff; color: #003366; font-size: 15px; font-weight: 800; font-family: inherit; border: 0; cursor: pointer; overflow-wrap: anywhere; }
.fmp-tab + .fmp-tab { border-left: 2px solid #003366; }
.fmp-tab.is-on { background: #003366; color: #fff; }
.fmp-tab:focus-visible { outline: 3px solid #f57c00; outline-offset: -3px; }

.fmp-timbox { min-width: 0; margin-top: 18px; }
/* Penanda tim pada kartu tab Semua pemain, dan baris "Anda di Tim ..." */
.fmp-tag { display: inline-block; max-width: 100%; margin-top: 6px; padding: 3px 9px; background: var(--tc); color: var(--tt); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.fmp-timme-wrap:empty { display: none; }
.fmp-timme { margin: 14px auto 0; max-width: 100%; padding: 12px 14px; background: var(--tc); color: var(--tt); font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.fmp-timme strong { font-weight: 800; font-size: 1.1em; }

/* Transisi pergantian tab (fade 200 ms) */
.fmp-pane { transition: opacity .2s ease; }
.fmp-pane.is-out { opacity: 0; }
.fmp-timwadah { min-width: 0; }
.fmp-tab { transition: background-color .2s ease, color .2s ease; }
@media (prefers-reduced-motion: reduce) {
  .fmp-pane, .fmp-tab { transition: none; }
}

.fmp-timme { overflow-wrap: anywhere; word-break: break-word; }
