*{box-sizing:border-box} :root{--navy:#173f67;--blue:#0f5f9f;--blue-hover:#0b4d82;--gold:#f4c95d;--page:#f3f5f7;--text:#1f2937;--muted:#64748b;--line:#dbe1e7;--soft:#f8fafc;--green:#15803d;--green-bg:#dcfce7;--red:#b91c1c;--red-bg:#fee2e2}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;background:var(--page);color:var(--text)}
.container{width:min(1040px,calc(100% - 32px));margin:0 auto;padding:32px 0 48px}
.site-header{margin-bottom:24px;padding:26px 28px;border:1px solid #1e4166;border-radius:14px;background:var(--navy);color:#fff}
.brand{margin:0 0 8px;color:var(--gold);font-size:.75rem;font-weight:800;letter-spacing:.2em}.title-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px}h1{margin:0;font-size:1.8rem}.app-version{color:#cbdced;font-size:.82rem;font-weight:700}.lead{margin:10px 0 0;color:#e4eef8;line-height:1.65}
.status-bar,.event-overview{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px;padding:14px 18px;border:1px solid var(--line);border-radius:10px;background:#fff}.status-label,.overview-label{margin-right:8px;color:#94a3b8;font-size:.72rem;font-weight:800;letter-spacing:.12em}.status-value,.overview-value{font-weight:700}.secondary-button{padding:9px 14px;border:1px solid #b9c3cf;border-radius:8px;background:#fff;color:#334155;font-weight:700;cursor:pointer}.secondary-button:hover{background:#f8fafc}
.content-section{padding:24px;border:1px solid var(--line);border-radius:12px;background:#fff}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:20px;padding-bottom:14px;border-bottom:1px solid #e5e7eb}.section-heading h2{margin:0;font-size:1.35rem}.summary{margin:6px 0 0;color:var(--muted)}
.event-list{display:grid;gap:14px}.event-card{display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:18px;align-items:center;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.event-marker{width:10px;height:100%;min-height:70px;border-radius:999px;background:#94a3b8}.event-marker.is-online{background:#22c55e}.event-name{margin:0;font-size:1.2rem}.event-description{margin:6px 0 0;color:var(--muted);line-height:1.5}.event-meta{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:10px;color:#64748b;font-size:.84rem}.open-button{display:inline-block;min-width:110px;padding:11px 16px;border-radius:8px;background:var(--blue);color:#fff;font-weight:700;text-align:center;text-decoration:none}.open-button:hover{background:var(--blue-hover)}
.online-badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#e2e8f0;color:#475569;font-size:.82rem;font-weight:800}.online-badge.is-online{background:var(--green-bg);color:var(--green)}.online-badge.is-offline{background:var(--red-bg);color:var(--red)}.message{padding:28px;border:1px solid var(--line);border-radius:10px;background:var(--soft);color:var(--muted);text-align:center}.back-row{margin-bottom:18px}.text-link{color:var(--blue);font-weight:700;text-decoration:none}.text-link:hover{text-decoration:underline}
.menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.menu-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:16px;align-items:center;min-height:120px;padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--soft);color:var(--text);text-decoration:none}a.menu-card:hover{border-color:#93b5d6;background:#f1f7fc}.menu-number{color:#94a3b8;font-size:.75rem;font-weight:900;letter-spacing:.12em}.menu-card h3{margin:0;font-size:1.1rem}.menu-card p{margin:6px 0 0;color:var(--muted);line-height:1.45}.menu-arrow{color:var(--blue);font-size:2rem;line-height:1}.menu-card.is-disabled{opacity:.62}.coming-soon{display:inline-block;margin-top:8px;padding:3px 8px;border-radius:999px;background:#e2e8f0;color:#64748b;font-size:.75rem;font-weight:800}
.pilot-list{display:grid;gap:12px}.pilot-card{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:16px;padding:14px 18px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.pilot-icon,.pilot-icon-placeholder{width:64px;height:64px;border:1px solid #d1d5db;border-radius:10px;background:#fff;object-fit:cover}.pilot-icon-placeholder{display:grid;place-items:center;color:#94a3b8;font-size:.68rem;font-weight:700;text-align:center}.pilot-name{margin:0;font-size:1.12rem;font-weight:800}.pilot-sub{margin:5px 0 0;color:var(--muted);font-size:.9rem}
.support-banner{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-top:20px;padding:22px 24px;border:1px solid #b9cede;border-radius:12px;background:#edf6fb}.support-banner h2{margin:4px 0 7px;font-size:1.25rem}.support-banner p{margin:0;color:var(--muted);line-height:1.65}.support-label{color:var(--blue)!important;font-size:.7rem;font-weight:900;letter-spacing:.14em}.support-banner .open-button{flex:0 0 auto}.service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.service-card{padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.service-kicker{margin:0 0 6px;color:var(--blue);font-size:.72rem;font-weight:900;letter-spacing:.12em}.service-card h2{margin:0 0 10px;font-size:1.2rem}.service-card p{margin:0;color:var(--muted);line-height:1.75}.request-note{margin-top:18px;padding:20px 22px;border-left:5px solid var(--gold);border-radius:8px;background:#fff9df}.request-note h2{margin:0 0 10px;font-size:1.18rem}.request-note p{margin:6px 0;color:#475569;line-height:1.75}.request-list{margin:12px 0 0;padding-left:1.25rem;color:#475569;line-height:1.8}.contact-note{margin-top:18px;padding:18px 20px;border-radius:10px;background:var(--navy);color:#fff}.contact-note p{margin:0;color:#e4eef8;line-height:1.7}.contact-link{color:#fff;font-weight:900;text-underline-offset:3px}
.heat-list{display:grid;gap:16px}.heat-card{overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.heat-header{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 16px;background:#edf3f8;border-bottom:1px solid var(--line)}.heat-title{margin:0;font-size:1.05rem}.heat-class{color:var(--muted);font-size:.84rem}.slot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.slot-card{min-width:0;padding:14px;border-right:1px solid var(--line);background:#fff}.slot-card:last-child{border-right:0}.slot-node{margin-bottom:8px;color:#94a3b8;font-size:.72rem;font-weight:900;letter-spacing:.1em}.slot-channel{margin-bottom:10px;font-weight:900}.slot-frequency{margin-left:6px;color:var(--muted);font-size:.82rem;font-weight:500}.slot-pilot{display:flex;align-items:center;gap:10px}.slot-pilot img,.slot-avatar-placeholder{width:42px;height:42px;flex:0 0 42px;border:1px solid #d1d5db;border-radius:8px;object-fit:cover;background:#f8fafc}.slot-avatar-placeholder{display:grid;place-items:center;color:#94a3b8;font-size:.6rem}.slot-pilot-name{min-width:0;font-weight:800;word-break:break-word}.slot-empty{color:#94a3b8;font-style:italic}.site-footer{display:flex;justify-content:space-between;gap:14px;margin-top:26px;color:#94a3b8;font-size:.78rem}
@media(max-width:720px){.container{width:calc(100% - 16px);padding-top:16px}.site-header{padding:22px 20px}h1{font-size:1.45rem}.content-section{padding:18px}.event-card{grid-template-columns:8px minmax(0,1fr)}.open-button{grid-column:2;width:100%}.menu-grid,.service-grid{grid-template-columns:1fr}.support-banner{align-items:flex-start;flex-direction:column}.support-banner .open-button{width:100%}.event-overview{align-items:flex-start;flex-direction:column}.slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.slot-card:nth-child(2){border-right:0}.slot-card:nth-child(-n+2){border-bottom:1px solid var(--line)}.site-footer{flex-direction:column}}
@media(max-width:440px){.slot-grid{grid-template-columns:1fr}.slot-card,.slot-card:nth-child(2){border-right:0;border-bottom:1px solid var(--line)}.slot-card:last-child{border-bottom:0}}

/* ==========================================================
   Latest Race / Lap Details
   ========================================================== */
.result-table-wrap { overflow-x: auto; }
.result-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.result-table th, .result-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.result-table th {
  background: #edf3f8;
  color: #475569;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.result-position { width: 58px; font-size: 1.2rem; font-weight: 900; }
.result-pilot-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.result-pilot-cell img, .result-avatar-placeholder {
  width: 46px; height: 46px; flex: 0 0 46px;
  border: 1px solid #d1d5db; border-radius: 8px;
  object-fit: cover; background: #f8fafc;
}
.result-avatar-placeholder {
  display: grid; place-items: center; color: #94a3b8; font-size: 0.58rem;
}
.result-pilot-name { font-weight: 800; }
.lap-detail-row td { padding-top: 0; background: #fbfcfd; }
.lap-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 4px 58px; }
.lap-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 10px; border: 1px solid #d6dee7;
  border-radius: 8px; background: white;
}
.lap-chip-label { color: #64748b; font-size: 0.72rem; font-weight: 800; }
.lap-chip-time { font-weight: 900; }
.lap-chip.holeshot { border-color: #e6c86d; background: #fff9df; }
@media (max-width: 720px) { .lap-list { padding-left: 0; } }


/* ==========================================================
   v0.1.2 - Latest Race Result avatar/layout fix
   ========================================================== */

.result-table {
  table-layout: fixed;
}

.result-table th:nth-child(1),
.result-table td:nth-child(1) {
  width: 70px;
}

.result-table th:nth-child(2),
.result-table td:nth-child(2) {
  width: 260px;
}

.result-pilot-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.result-pilot-cell img,
.result-avatar-placeholder {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  flex: 0 0 48px !important;
  display: block;
  overflow: hidden;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  object-fit: cover !important;
}

.result-pilot-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lap-detail-row td {
  background: #fbfcfd;
}

@media (max-width: 720px) {
  .result-table {
    table-layout: auto;
  }

  .result-table th:nth-child(2),
  .result-table td:nth-child(2) {
    width: 200px;
  }

  .result-pilot-cell img,
  .result-avatar-placeholder {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    flex-basis: 42px !important;
  }
}


/* ==========================================================
   v0.1.3 - Overall Results
   ========================================================== */

.summary-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.summary-stat-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.summary-stat-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.summary-stat-value {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 900;
}

.overall-note {
  margin-bottom: 22px;
  padding: 12px 14px;
  border-left: 4px solid #94a3b8;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.6;
}

.race-history {
  display: grid;
  gap: 28px;
}

.history-class-section {
  display: grid;
  gap: 14px;
}

.history-class-title {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
  font-size: 1.2rem;
}

.history-race-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.history-race-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #edf3f8;
}

.history-race-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.history-race-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.race-number-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4f91;
  font-size: 0.72rem;
  font-weight: 900;
}

.history-avatar,
.history-avatar-placeholder {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  flex: 0 0 42px !important;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  object-fit: cover !important;
}

.history-avatar-placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.55rem;
}

@media (max-width: 720px) {
  .summary-card-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   v0.1.5 - Event retention / empty state
   ========================================================== */

.retention-note {
  margin: 14px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce9f5;
  font-size: 0.86rem;
  line-height: 1.55;
}

.empty-event-message {
  line-height: 1.8;
}

.empty-event-message .text-link {
  white-space: nowrap;
}
