/* ======================================================
   Design Tokens
   ====================================================== */
:root {
  --jopt-blue: #005ba0;
  --jopt-blue-dark: #004b87;
  --jopt-orange: #D16B30;
  --gold: #C9A84C;
  --silver: #B0B7BE;
  --bronze: #B37535;
  --green: #2f9e6f;
  --red: #d14a58;

  --bg-primary: #ffffff;
  --bg-secondary: #f7f8fa;
  --bg-tertiary: #eef1f5;
  --border: #e5e7eb;
  --border-light: #d1d5db;

  --text-primary: #0a0a0a;
  --text-secondary: #1f2937;
  --text-muted: #4b5563;
  --text-dim: #6b7280;
  --text-faint: #9ca3af;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-num: 'Outfit', sans-serif;
}

/* ======================================================
   Reset
   ====================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
body.modal-open, html.modal-open { overflow: hidden; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
input::placeholder { color: #9ca3af; }

button { font-family: inherit; }

/* ======================================================
   Layout containers
   ====================================================== */
.container { max-width: 100%; padding: 16px 16px 0; margin: 0 auto; }
@media (min-width: 768px) { .container { max-width: 960px; padding: 20px 32px 0; } }
@media (min-width: 1440px) { .container { max-width: 1200px; } }

.container--main { padding: 0 0; }
@media (min-width: 768px) { .container--main { padding: 0 0; } }

/* ======================================================
   Header
   ====================================================== */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg-primary); }

.site-title {
  font-size: 28px; font-weight: 400; color: var(--text-primary);
  letter-spacing: 0.04em; line-height: 1;
  font-family: var(--font-display);
}
@media (min-width: 768px) { .site-title { font-size: 44px; } }

.info-bar {
  margin: 10px 0 12px; padding: 8px 12px;
  background: var(--bg-tertiary); border-radius: 8px; border: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.info-bar__left { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.info-event { font-weight: 600; }
.info-bar__right { display: flex; align-items: center; gap: 6px; }
.update-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--jopt-blue); }
.update-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.update-at { font-size: 13px; color: var(--text-primary); font-weight: 700; font-family: var(--font-num); }

.nav-row { display: block; margin-top: 4px; }
@media (min-width: 768px) { .nav-row { display: flex; align-items: flex-end; gap: 24px; } }

.search-wrap { position: relative; margin-bottom: 10px; }
@media (min-width: 768px) { .search-wrap { flex: 0 0 340px; margin-bottom: 0; } }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  transition: border-color 0.2s ease;
}
@media (min-width: 768px) { .search-box { padding: 9px 14px; } }
.search-box.is-focused { border-color: var(--jopt-blue); }

.search-icon { font-size: 14px; color: var(--text-faint); }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 13px; font-family: var(--font-body);
}
.search-clear {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 16px; padding: 0;
}

.suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 8px; margin-top: 4px; z-index: 50;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  overflow: auto; max-height: 340px;
}
.suggestion-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--bg-card); }
.suggestion-item.is-highlighted { background: var(--bg-card); border-left: 3px solid var(--jopt-blue); padding-left: 11px; }
.suggestion-rank {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  width: 24px; font-family: var(--font-num);
}
.suggestion-name { font-size: 12px; color: var(--text-primary); }

.tabs { display: flex; gap: 0; flex: 1; }
.tab-btn {
  flex: 1; padding: 10px 0; font-size: 12px; font-weight: 600;
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
@media (min-width: 768px) { .tab-btn { flex: 0 0 auto; padding: 10px 24px; font-size: 13px; } }
.tab-btn.is-active { color: var(--text-primary); border-bottom-color: var(--jopt-blue); }

/* ======================================================
   Range tabs
   ====================================================== */
.range-tabs { display: flex; gap: 0; padding: 0 16px; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .range-tabs { padding: 0 32px; } }
.range-tab-btn {
  padding: 8px 12px; font-size: 10px; font-weight: 600;
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); letter-spacing: 0.05em;
  font-family: var(--font-num);
}
@media (min-width: 768px) { .range-tab-btn { padding: 10px 16px; font-size: 11px; } }
.range-tab-btn.is-active { color: var(--jopt-blue); }

/* ======================================================
   Main view container (max-widths)
   ====================================================== */
#view-overall > .container--main,
#view-events > .container--main {
  max-width: 100%;
  padding: 0;
  margin: 0 auto;
}
@media (min-width: 768px) {
  #view-overall > .container--main { max-width: 960px; }
  #view-events > .container--main { max-width: 960px; }
}
@media (min-width: 1440px) {
  #view-overall > .container--main { max-width: 1200px; }
  #view-events > .container--main { max-width: 1200px; }
}

/* ======================================================
   Avatar base
   ====================================================== */
.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 1.5px solid #d1d5db;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: #6b7280; letter-spacing: 0.05em;
  flex-shrink: 0; overflow: hidden;
}
.avatar--img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block; border-radius: 50%;
}
/* sizes */
.avatar--podium-1st { width: 52px; height: 52px; font-size: 18.2px; }
.avatar--podium-2nd, .avatar--podium-3rd { width: 42px; height: 42px; font-size: 14.7px; }
@media (min-width: 768px) {
  .avatar--podium-1st,
  .avatar--podium-2nd,
  .avatar--podium-3rd { width: 60px; height: 60px; font-size: 21px; }
}
@media (min-width: 1440px) {
  .avatar--podium-1st,
  .avatar--podium-2nd,
  .avatar--podium-3rd { width: 72px; height: 72px; font-size: 25.2px; }
}
.avatar--row { width: 34px; height: 34px; font-size: 11.9px; }
@media (min-width: 768px) { .avatar--row { width: 40px; height: 40px; font-size: 14px; } }
.avatar--modal-hero { width: 56px; height: 56px; font-size: 19.6px; }
@media (min-width: 768px) { .avatar--modal-hero { width: 64px; height: 64px; font-size: 22.4px; } }

/* ======================================================
   Podium
   ====================================================== */
.podium-wrap {
  display: flex; gap: 8px;
  padding: 20px 16px 16px;
  align-items: flex-end;
  max-width: 100%; margin: 0 auto;
  animation: fadeInUp 0.5s ease-out;
}
@media (min-width: 768px) { .podium-wrap { gap: 16px; padding: 28px 32px 20px; max-width: 700px; } }

.podium-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px;
  border-radius: 12px;
  flex: 1; min-width: 0; cursor: pointer;
  transition: transform 0.15s ease;
  position: relative; overflow: hidden;
  margin-top: 14px;
  border: 1px solid transparent;
}
@media (min-width: 768px) { .podium-card { margin-top: 20px; } }

.podium-card--center { flex: 1.3; padding: 22px 16px 16px; margin-top: 0; }

.podium-card--1st {
  background: linear-gradient(180deg, rgba(201,168,76,0.14) 0%, rgba(201,168,76,0.02) 100%);
  border-color: rgba(201,168,76,0.2);
  border-top: 3px solid var(--gold);
  box-shadow: 0 10px 30px -12px rgba(201,168,76,0.33), 0 2px 8px rgba(0,91,160,0.08);
}
.podium-card--2nd {
  background: linear-gradient(180deg, rgba(176,183,190,0.14) 0%, rgba(176,183,190,0.02) 100%);
  border-color: rgba(176,183,190,0.2);
  border-top: 2px solid var(--silver);
  box-shadow: 0 4px 16px -8px rgba(176,183,190,0.2);
}
.podium-card--3rd {
  background: linear-gradient(180deg, rgba(179,117,53,0.12) 0%, rgba(179,117,53,0.02) 100%);
  border-color: rgba(179,117,53,0.2);
  border-top: 2px solid var(--bronze);
  box-shadow: 0 4px 16px -8px rgba(179,117,53,0.2);
}

.podium-watermark {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  height: auto; width: 58%;
  opacity: 0.06;
  pointer-events: none; user-select: none;
  z-index: 0;
}
.podium-card--center .podium-watermark { width: 72%; opacity: 0.08; }
@media (min-width: 768px) {
  .podium-watermark { width: 62%; }
  .podium-card--center .podium-watermark { width: 78%; }
}

.podium-label {
  position: relative; z-index: 1;
  font-size: 15px; font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.podium-card--center .podium-label { font-size: 18px; }
@media (min-width: 768px) {
  .podium-label { font-size: 18px; }
  .podium-card--center .podium-label { font-size: 22px; }
}
.podium-card--1st .podium-label { color: var(--gold); text-shadow: 0 2px 10px rgba(201,168,76,0.25); }
.podium-card--2nd .podium-label { color: var(--silver); text-shadow: 0 2px 10px rgba(176,183,190,0.25); }
.podium-card--3rd .podium-label { color: var(--bronze); text-shadow: 0 2px 10px rgba(179,117,53,0.25); }

.podium-avatar-wrap {
  position: relative; z-index: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,91,160,0.12), 0 6px 22px rgba(0,91,160,0.30);
}

.podium-name {
  position: relative; z-index: 1;
  font-weight: 700; color: var(--text-primary);
  margin-top: 10px; text-align: center; line-height: 1.2;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px;
}
.podium-card--center .podium-name { font-size: 13px; }
@media (min-width: 768px) { .podium-name { font-size: 14px; } }

.podium-points {
  position: relative; z-index: 1;
  font-weight: 800; color: var(--jopt-blue);
  margin-top: 10px; font-family: var(--font-num);
  text-shadow: 0 2px 12px rgba(0,91,160,0.28);
  font-size: 17px;
}
.podium-card--center .podium-points { font-size: 20px; }
@media (min-width: 768px) { .podium-points { font-size: 22px; } }
@media (min-width: 1440px) { .podium-points { font-size: 26px; } }
.podium-points__unit { font-size: 10px; font-weight: 400; color: var(--text-dim); margin-left: 3px; }

.podium-itp {
  position: relative; z-index: 1;
  display: flex; gap: 4px; margin-top: 8px;
  align-items: baseline;
  border-top: 1px solid var(--border); padding-top: 8px;
}
.podium-itp__val { font-size: 14px; font-weight: 700; color: var(--text-secondary); font-family: var(--font-num); }
@media (min-width: 768px) { .podium-itp__val { font-size: 16px; } }
.podium-itp__label { font-size: 9px; color: var(--text-dim); letter-spacing: 0.06em; }

/* ======================================================
   Deltas
   ====================================================== */
.points-delta { font-size: 11px; font-weight: 500; color: var(--text-faint); }
.points-delta.is-positive { color: var(--green); font-weight: 600; }
.points-delta[data-size="10"] { font-size: 10px; }
.points-delta[data-size="13"] { font-size: 13px; }

.rank-delta { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.rank-delta.is-zero { color: var(--text-faint); font-weight: 400; }
.rank-delta.is-up { color: var(--green); }
.rank-delta.is-down { color: var(--red); }
.rank-delta__arrow { font-size: 9px; }
.rank-delta[data-size="13"] { font-size: 13px; }
.rank-delta[data-size="13"] .rank-delta__arrow { font-size: 11px; }

/* ======================================================
   Ranking table
   ====================================================== */
.table-header {
  display: grid; grid-template-columns: 34px 38px 1fr auto;
  gap: 8px; padding: 6px 14px;
  font-size: 9px; color: var(--text-faint);
  letter-spacing: 0.1em; font-weight: 600;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.table-header .only-pc { display: none; }
@media (min-width: 768px) {
  .table-header { grid-template-columns: 48px 48px 1.4fr 80px 90px 110px; gap: 12px; padding: 8px 28px; }
  .table-header .only-pc { display: block; }
}
.th-rank { text-align: center; }
.th-points { text-align: right; }

.ranking-row {
  display: grid; grid-template-columns: 34px 38px 1fr auto;
  align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  background: transparent;
}
.ranking-row:hover { background: var(--bg-secondary); }
@media (min-width: 768px) {
  .ranking-row { grid-template-columns: 48px 48px 1.4fr 80px 90px 110px; gap: 12px; padding: 12px 28px; }
}
.ranking-row__rank-col { display: flex; flex-direction: column; align-items: center; }
.ranking-row__rank { font-size: 15px; font-weight: 800; color: var(--text-primary); font-family: var(--font-num); }
@media (min-width: 768px) { .ranking-row__rank { font-size: 16px; } }
.ranking-row__name-col { min-width: 0; }
.ranking-row__name { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 768px) { .ranking-row__name { font-size: 14px; } }
.ranking-row__itp-pc { display: none; gap: 4px; align-items: baseline; }
.ranking-row__delta-pc { display: none; }
@media (min-width: 768px) {
  .ranking-row__itp-pc { display: flex; }
  .ranking-row__delta-pc { display: block; }
}
.ranking-row__itp-pc__val { font-size: 14px; font-weight: 700; color: var(--text-muted); font-family: var(--font-num); }
.ranking-row__itp-pc__label { font-size: 10px; color: var(--text-dim); }
.ranking-row__points { text-align: right; min-width: 56px; }
@media (min-width: 768px) { .ranking-row__points { min-width: 90px; } }
.ranking-row__points-val { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; }
.ranking-row__points-num { font-size: 14px; font-weight: 700; color: var(--text-primary); font-family: var(--font-num); }
@media (min-width: 768px) { .ranking-row__points-num { font-size: 16px; } }
.ranking-row__points-unit { font-size: 9px; color: var(--text-faint); }
.ranking-row__sub-sp { display: flex; justify-content: flex-end; gap: 6px; margin-top: 1px; align-items: center; }
@media (min-width: 768px) { .ranking-row__sub-sp { display: none; } }
.ranking-row__itp-sp { font-size: 9px; color: var(--text-dim); }
.ranking-row__itp-sp__val { color: var(--text-muted); font-weight: 600; font-family: var(--font-num); }

/* ======================================================
   Accordion list
   ====================================================== */
.accordion-list {
  display: flex; flex-direction: column; gap: 0;
  padding: 0 0 20px;
  max-width: 100%;
  margin: 0 auto;
}
@media (min-width: 768px) { .accordion-list { gap: 12px; padding: 16px 32px 40px; max-width: 720px; } }

.accordion {
  background: var(--bg-secondary);
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
@media (min-width: 768px) { .accordion { border-radius: 10px; border: 1px solid var(--border); } }

.accordion-header {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: none; border: none; cursor: pointer; text-align: left;
}
@media (min-width: 768px) { .accordion-header { gap: 16px; padding: 16px 22px; } }

.winner-photo {
  width: 52px; height: 52px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef1f5 0%, #f7f8fa 50%, #eef1f5 100%);
  border: 1px solid #d1d5db;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; overflow: hidden;
  font-size: 15.6px; font-weight: 700; color: #6b7280;
  letter-spacing: 0.05em;
}
.winner-photo::after { content: ''; position: absolute; inset: 0; border-radius: 8px; border: 1px solid rgba(0,91,160,0.3); pointer-events: none; }
@media (min-width: 768px) { .winner-photo { width: 68px; height: 68px; font-size: 20.4px; } }
.winner-photo--img img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; border-radius: 8px; }

.accordion-meta { flex: 1; min-width: 0; }
.accordion-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
@media (min-width: 768px) { .accordion-title { font-size: 15px; } }
.accordion-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.accordion-sub__divider { color: var(--border-light); }
.accordion-winner { font-size: 12px; color: var(--jopt-blue); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.accordion-winner__badge { font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: 0.05em; }
.accordion-winner__name { font-weight: 600; }
.accordion-chevron { font-size: 12px; color: var(--text-faint); transition: transform 0.2s ease; flex-shrink: 0; display: inline-block; }
.accordion.is-open .accordion-chevron { transform: rotate(180deg); }

.accordion-body { border-top: 1px solid var(--border); background: var(--bg-primary); display: none; }
.accordion.is-open .accordion-body { display: block; animation: fadeInUp 0.25s ease-out; }
.accordion.is-closing .accordion-body { display: block; animation: fadeOutUp 0.2s ease-in forwards; }
.accordion-close-row { display: flex; justify-content: center; padding: 12px 0; border-top: 1px solid var(--border); }
.accordion-close-btn { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); font-size: 12px; padding: 6px 20px; cursor: pointer; transition: all .15s; }
.accordion-close-btn:hover { background: var(--bg-card); color: var(--text-primary); }

.accordion-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.accordion-row:first-child { border-top: none; }
@media (min-width: 768px) {
  .accordion-row { grid-template-columns: 72px 1fr auto; gap: 14px; padding: 10px 22px; }
}
.accordion-row--first { background: linear-gradient(90deg, rgba(201,168,76,0.10) 0%, rgba(0,91,160,0.06) 100%); }
.accordion-row__watermark {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 60px; text-align: center;
  font-size: 44px; font-weight: 900; color: var(--gold);
  opacity: 0.16; font-family: var(--font-display);
  line-height: 1;
  pointer-events: none; user-select: none;
  z-index: 0;
}
@media (min-width: 768px) { .accordion-row__watermark { width: 72px; font-size: 58px; } }

.accordion-row__rank {
  position: relative; z-index: 1;
  font-size: 13px; font-weight: 700; font-family: var(--font-num);
  color: var(--text-dim); text-align: center;
}
.accordion-row--first .accordion-row__rank {
  color: var(--jopt-blue);
  text-shadow: 0 2px 8px rgba(0,91,160,0.28);
}
.accordion-row__name { position: relative; z-index: 1; min-width: 0; font-size: 13px; color: var(--text-secondary); font-weight: 400; }
.accordion-row--first .accordion-row__name { color: var(--text-primary); font-weight: 600; }
.accordion-row__points { position: relative; z-index: 1; font-size: 13px; font-weight: 700; font-family: var(--font-num); color: var(--green); text-align: right; }

/* ======================================================
   Modal
   ====================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; justify-content: center;
  background: var(--bg-primary);
  overflow-y: auto; overscroll-behavior: contain;
}
@media (min-width: 768px) { .modal-overlay { background: rgba(10,20,40,0.45); } }

.modal-panel {
  width: 100%;
  background: var(--bg-primary);
  min-height: 100vh;
  height: fit-content;
}
@media (min-width: 768px) {
  .modal-panel {
    max-width: 640px;
    min-height: auto;
    border-radius: 12px;
    margin-top: 40px; margin-bottom: 40px;
    border: 1px solid var(--border);
  }
}

.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .modal-header { padding: 20px 28px; } }
.modal-back { background: none; border: none; color: var(--text-muted); font-size: 13px; cursor: pointer; margin-bottom: 14px; padding: 0; }
.modal-hero { display: flex; align-items: center; gap: 16px; }
.modal-hero__info { flex: 1; min-width: 0; }
.modal-hero__top { display: flex; align-items: baseline; gap: 10px; }
.modal-hero__rank { font-size: 28px; font-weight: 800; color: var(--jopt-blue); font-family: var(--font-num); }
.modal-hero__name { font-size: 18px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 768px) { .modal-hero__rank { font-size: 32px; } .modal-hero__name { font-size: 20px; } }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--border); }
.kpi-cell { background: var(--bg-secondary); padding: 14px 8px; text-align: center; }
@media (min-width: 768px) { .kpi-cell { padding: 20px 8px; } }
.kpi-cell__value { font-size: 20px; font-weight: 800; color: var(--text-primary); font-family: var(--font-num); }
@media (min-width: 768px) { .kpi-cell__value { font-size: 26px; } }
.kpi-cell__value--positive { color: var(--green); }
.kpi-cell__value-row { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.kpi-cell__label { font-size: 9px; color: var(--text-faint); letter-spacing: 0.1em; margin-top: 3px; }

.results { padding: 16px 20px 80px; }
@media (min-width: 768px) { .results { padding: 20px 28px 80px; } }
.results__heading { font-size: 10px; color: var(--text-faint); letter-spacing: 0.12em; font-weight: 600; margin-bottom: 12px; }
.result-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.result-row__event { font-size: 13px; font-weight: 600; color: var(--text-primary); }
@media (min-width: 768px) { .result-row__event { font-size: 14px; } }
.result-row__date { font-size: 10px; color: var(--text-faint); margin-top: 2px; }
.result-row__placement { font-size: 15px; font-weight: 700; font-family: var(--font-num); color: var(--text-muted); }
.result-row__placement.is-winner { color: var(--jopt-blue); }
.result-row__points { font-size: 14px; font-weight: 700; color: var(--green); font-family: var(--font-num); }

/* ======================================================
   Footer
   ====================================================== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 32px 16px 24px;
  margin-top: 32px;
}
@media (min-width: 768px) { .footer { padding: 40px 32px 28px; } }

.footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 24px;
}
@media (min-width: 768px) { .footer__inner { gap: 28px; } }

.sns-row { display: flex; gap: 14px; justify-content: center; align-items: center; }
.sns-link {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}
.sns-link--x { color: #000000; border: 1px solid rgba(0,0,0,0.2); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.sns-link--ig { color: #E4405F; border: 1px solid rgba(228,64,95,0.2); box-shadow: 0 2px 8px rgba(228,64,95,0.12); }
.sns-link--yt { color: #FF0000; border: 1px solid rgba(255,0,0,0.2); box-shadow: 0 2px 8px rgba(255,0,0,0.12); }
.sns-link--line { color: #06C755; border: 1px solid rgba(6,199,85,0.2); box-shadow: 0 2px 8px rgba(6,199,85,0.12); }

.footer-buttons { width: 100%; max-width: 720px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 768px) { .footer-buttons { gap: 12px; } }
.footer-btn {
  flex: 1 1 100%;
  padding: 12px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--jopt-blue); background: var(--bg-primary);
  border: 1px solid var(--jopt-blue); border-radius: 8px;
  text-align: center; text-decoration: none;
  transition: all 0.15s ease;
}
@media (min-width: 768px) { .footer-btn { flex: 0 0 auto; padding: 12px 24px; } }

.copyright { font-size: 11px; color: var(--text-faint); letter-spacing: 0.08em; text-align: center; }

/* ======================================================
   Image Preview
   ====================================================== */
.img-preview-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
}
.img-preview-frame {
  display: flex; align-items: center; justify-content: center;
  background: #000;
  padding: 0;
}
.img-preview-img {
  display: block;
  width: auto; height: auto;
  max-width: min(90vw, 100%);
  max-height: 80vh;
}
.img-preview-close {
  position: fixed; top: 16px; right: 16px;
  background: rgba(255,255,255,0.15); border: none; border-radius: 50%;
  color: #fff; font-size: 20px; width: 36px; height: 36px;
  cursor: pointer; line-height: 1; transition: background .15s;
}
.img-preview-close:hover { background: rgba(255,255,255,0.3); }

/* ======================================================
   Animation
   ====================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}
