/* IDN 76.2: calm blue/gold surfaces and compact mobile interactions. */
:root { --card-shadow: 0 6px 24px rgba(15,35,55,.055); --hover-shadow: 0 12px 32px rgba(0,85,143,.12); }
html { scroll-padding-top: 88px; }
body { background: #f6f8fb; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #c5a059; outline-offset: 4px; }
nav { box-shadow: 0 1px 0 rgba(0,85,143,.09); }
.logo { letter-spacing: .07em; }
.nav-links a { min-height: 40px; display: inline-flex; align-items: center; }
header { height: clamp(360px,54vh,570px); border-bottom-width: 3px; }
header::before { display: none; }
header::after { background: linear-gradient(180deg,rgba(6,27,46,.24),rgba(6,27,46,.35) 38%,rgba(6,27,46,.9)); }
.hero-content { transform: none; padding-bottom: 42px; }
.hero-title { font-size: clamp(2.3rem,5.5vw,4.2rem); letter-spacing: .08em; text-shadow: 0 3px 20px rgba(0,0,0,.35); }
.hero-subtitle { font-size: .85rem; letter-spacing: .3em; color: #ead6b2; }
.hero-actions { position: absolute; z-index: 3; bottom: 28px; left: 20px; right: 20px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.hero-actions .mvp-container, .hero-actions .mvp-leaderboard-container { position: static; }
.mvp-btn, .mvp-leaderboard-btn, .order-list-btn { min-height: 44px; border-radius: 12px; box-shadow: none; font-size: .88rem; padding: 11px 16px; }
.mvp-btn, .mvp-leaderboard-btn { color: #f7ecd8; border-color: rgba(234,214,178,.6); background: rgba(11,35,55,.65); }
.mvp-edit-btn { min-width: 40px; }
.order-list-btn-container { top: 18px; right: 20px; }
.new-update-alert, .new-update-alert::after, .mvp-highlight-card { animation: none !important; }
.new-update-alert::after { display: none; }
.new-update-alert { background: #b28a43 !important; }
.reveal, .reveal.active { opacity: 1; margin-top: 0; transition: none; }
section { padding: 56px 5%; }
.section-title { justify-content: flex-start; text-align: left; font-size: 1.75rem; margin-bottom: 24px; letter-spacing: .025em; }
.btn-main, .btn-outline { min-height: 44px; border-radius: 12px; padding: 10px 18px; box-shadow: none; }
.btn-outline { border-width: 1px; }
.data-sync-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 12px 0; border-bottom: 1px solid var(--border-light); color: #64748b; font-size: .8rem; }
.data-sync-wrap { padding: 0 5%; }
.data-sync-bar p { margin: 0; display: flex; align-items: center; gap: 8px; }
.sync-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #c5a059; }
.data-sync-bar[data-state="ready"] .sync-dot { background: #26997a; }
.data-sync-bar[data-state="error"] .sync-dot, .data-sync-bar[data-state="cached"] .sync-dot { background: #d49332; }
.data-refresh-btn { flex-shrink: 0; border: 0; color: var(--idn-blue); background: transparent; font: inherit; font-weight: 700; cursor: pointer; min-height: 40px; padding: 8px; }
.data-refresh-btn:disabled { opacity: .5; cursor: wait; }
.section-placeholder { padding: 28px; color: var(--text-muted); text-align: center; grid-column: 1 / -1; line-height: 1.7; }
.next-match { padding: 24px 28px; margin-bottom: 24px; border: 1px solid #dce7ee; border-left: 4px solid var(--idn-gold); border-radius: 18px; background: linear-gradient(120deg,#fff,#f1f6fa); display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; box-shadow: var(--card-shadow); }
.next-match[hidden] { display: none; }
.next-match-kicker { color: #92713b; font-size: .7rem; font-weight: 800; letter-spacing: .14em; margin-bottom: 8px; }
.next-match-date { color: var(--idn-blue); font-size: 1.65rem; font-weight: 900; }
.next-match-location { color: #475569; font-size: .95rem; margin-top: 5px; }
.next-match-times { display: flex; gap: 24px; }
.next-match-times span { display: block; font-size: .76rem; color: #64748b; margin-bottom: 5px; }
.next-match-times strong { font-size: 1.3rem; color: var(--idn-blue); font-variant-numeric: tabular-nums; }
.schedule-table-container { border-radius: 16px; }
.schedule-mobile-list .schedule-card + .schedule-card { margin-top: 14px; }
#videos { border-radius: 24px; background: linear-gradient(135deg,#0c2b44,#0f172a); padding-top: 44px; padding-bottom: 44px; }
#videos::before { display: none; }
#videos .section-title { text-shadow: none !important; }
.video-card { box-shadow: none; }
.video-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.play-overlay { opacity: .9; }
.play-icon-glow { font-size: 2.6rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.player-search-container { max-width: none; margin-bottom: 24px; }
.player-search-input { border-radius: 14px; border-width: 1px; }
.player-card:hover { transform: translateY(-4px); }
.player-img-container { height: auto; aspect-ratio: 4 / 4.6; }
.player-img { object-position: center 30%; }
.player-info { text-align: left; border-top-width: 2px; padding: 16px; }
.player-name-full { letter-spacing: 0; }
.player-pos { display: block; color: #607287; background: none; border-radius: 0; padding: 0; font-weight: 500; box-shadow: none; line-height: 1.6; overflow-wrap: anywhere; }
.mvp-badge-icon { top: 12px; left: 10px; bottom: auto; font-size: .72rem; padding: 5px 10px; }
/* Keep the action in a fixed header; photos and long content share remaining height. */
#player-detail-modal { padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
#player-detail-modal .modal-content { width: min(100%,470px); max-width: 470px; max-height: none; padding: 0; margin: auto; }
.player-detail-shell { width: 100%; min-height: 0; height: min(720px,calc(100vh - 48px)); height: min(720px,calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); }
.player-detail-card { height: 100%; min-height: 0; }
.player-detail-face { border-radius: 24px; }
.player-detail-front { display: flex; flex-direction: column; }
.player-detail-topline { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 22px 22px 16px; padding-right: 50px; }
.player-detail-name { font-size: clamp(1.2rem,5vw,1.75rem); text-align: left; min-width: 0; flex: 1; line-height: 1.2; overflow-wrap: anywhere; }
.player-detail-topline .player-detail-flip-hint { margin: 0; padding: 10px 12px; min-height: 42px; font-size: .82rem; border-radius: 11px; white-space: nowrap; flex: 0 0 auto; box-shadow: none; gap: 6px; }
.player-detail-photo-wrap { flex: 1 1 auto; min-height: 64px; height: auto; max-height: 420px; }
.player-detail-photo { object-position: center 30%; }
.player-detail-body { flex: 0 1 auto; min-height: 0; max-height: 36%; overflow: auto; overscroll-behavior: contain; padding: 18px 22px 22px; gap: 12px; }
.player-detail-meta { gap: 8px; }
.player-detail-pill { font-size: .84rem; padding: 7px 12px; }
.player-detail-positions { line-height: 1.6; font-size: .88rem; overflow-wrap: anywhere; }
.player-detail-close { top: 9px; right: 9px; width: 32px; height: 32px; font-size: 1.35rem; border: 0; background: #eaf0f5; color: #33516a; }
.player-detail-back { padding: 22px; padding-top: 46px; overflow-y: auto; overscroll-behavior: contain; }
.player-detail-card.is-back-active .player-detail-back { height: 100%; min-height: 0; overflow-y: auto; }
.player-detail-back-title { position: sticky; top: -46px; background: #f8fafc; z-index: 5; padding-bottom: 10px; flex-shrink: 0; }
.player-detail-field-wrap, .player-detail-mvp-panel { flex-shrink: 0; }
.player-detail-flip-hint { margin-top: 0; }
.site-release { opacity: .6; font-size: .72rem; margin-top: 10px; }
@media (max-width:768px) {
  nav { padding: 10px 16px; flex-wrap: wrap; gap: 4px 12px; }
  .logo { font-size: 1rem; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: .86rem; }
  #pwa-install-btn { font-size: .76rem; padding: 6px 9px; }
  header { height: 360px; height: clamp(280px,44svh,380px); }
  .hero-content { padding-bottom: 28px; }
  .hero-title { font-size: clamp(2rem,7.5vw,3rem); }
  .hero-subtitle { font-size: .73rem; letter-spacing: .24em; }
  .hero-actions { bottom: 22px; gap: 8px; left: 12px; right: 12px; }
  .hero-actions .mvp-container { gap: 6px; }
  .mvp-btn, .mvp-leaderboard-btn { font-size: .78rem; padding: 9px 12px; }
  .order-list-btn-container { top: 14px; right: 14px; }
  .order-list-btn { font-size: .75rem; min-height: 36px; padding: 8px 12px; }
  section { padding: 32px 5%; }
  .section-title { font-size: 1.45rem; margin-bottom: 20px; }
  .data-sync-bar { font-size: .72rem; padding: 4px 0; }
  .next-match { padding: 18px; grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; border-radius: 16px; }
  .next-match-date { font-size: 1.35rem; }
  .next-match-times { border-top: 1px solid #dce7ee; padding-top: 12px; gap: 34px; }
  .next-match-times strong { font-size: 1.15rem; }
  .next-match-kicker { margin-bottom: 5px; }
  .schedule-controls { gap: 8px; }
  .schedule-controls button { padding: 9px 12px; font-size: .82rem; }
  .card-header { padding: 14px 16px; flex-wrap: wrap; gap: 6px; }
  .card-loc { margin-right: 0; }
  .card-body { padding: 16px; }
  #videos { border-radius: 0; padding-top: 32px; padding-bottom: 32px; }
  .players-grid { gap: 14px; }
  .player-img-container { height: auto; }
  .player-info { padding: 12px; }
  .player-name-full { font-size: .95rem; line-height: 1.4; }
  .player-pos { font-size: .74rem; padding: 0; }
  .mvp-badge-icon { top: 10px; }
  .player-detail-topline { padding: 18px 46px 14px 16px; gap: 8px; }
  .player-detail-topline .player-detail-flip-hint { padding: 10px; font-size: .76rem; }
  .player-detail-body { padding: 14px 16px 18px; }
  .player-detail-back { padding: 46px 16px 16px; }
}
@media (max-height:500px) and (orientation:landscape) {
  .player-detail-shell { height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .player-detail-front { display: grid; grid-template-columns: 42% 58%; grid-template-rows: auto minmax(0,1fr); }
  .player-detail-topline { grid-column: 2; grid-row: 1; flex-wrap: wrap; padding: 12px 44px 8px 14px; }
  .player-detail-topline .player-detail-flip-hint { min-height: 36px; }
  .player-detail-photo-wrap { grid-column: 1; grid-row: 1 / 3; height: 100%; max-height: none; }
  .player-detail-body { grid-column: 2; grid-row: 2; max-height: none; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
