:root {
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --yellow: #facc15;
  --blue: #155eab;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f7fa;
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    "Hiragino Kaku Gothic ProN",
    "Noto Sans JP",
    sans-serif;
  font-size: 14px;
}
header {
  background: #141414;
  color: #fff;
  border-bottom: 4px solid var(--yellow);
}
.head {
  max-width: 1160px;
  margin: auto;
  padding: 17px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--yellow);
}
.head small {
  color: #d4d4d4;
}
.wrap {
  max-width: 1160px;
  margin: 24px auto;
  padding: 0 20px;
}
.crumb {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 16px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 7px #1b263308;
}
.teamhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 12px;
  color: var(--muted);
}
h1 {
  font-size: 26px;
  margin: 6px 0;
}
h2 {
  font-size: 18px;
  margin: 0 0 16px;
  padding-left: 11px;
  border-left: 4px solid var(--yellow);
}
.btn {
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 6px;
  padding: 10px 15px;
  font-weight: 700;
  color: var(--ink);
}
.btn.primary {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.btn:hover {
  filter: brightness(0.96);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0 0;
}
.stat {
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 14px 8px;
  text-align: center;
  border-radius: 7px;
}
.stat strong {
  display: block;
  font-size: 24px;
  margin-top: 6px;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
}
.detail {
  color: var(--muted);
  margin-top: 12px;
  font-size: 13px;
}
.filter {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
select,
input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}
th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.win {
  font-weight: 800;
  color: #16803d;
}
.loss {
  font-weight: 800;
  color: #c53030;
}
.draw {
  font-weight: 800;
  color: #6b7280;
}
.ad {
  min-height: 240px;
  border: 1px dashed #cbd5e1;
  background: #f1f3f5;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
}
.side .ad {
  min-height: 270px;
}
.adlabel {
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  margin-bottom: 6px;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.mobile-ad {
  display: none;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #0f172a99;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}
.overlay.show {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 20px 60px #0003;
}
.modal h2 {
  margin-bottom: 10px;
}
.modal label {
  display: block;
  font-weight: 700;
  margin: 15px 0 6px;
}
.modal input {
  width: 100%;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.notice {
  background: #fff7dd;
  border: 1px solid #f8d77b;
  border-radius: 6px;
  padding: 10px;
  margin: 12px 0;
  color: #775500;
  font-size: 12px;
}
.edit-actions {
  display: grid;
  gap: 12px;
}
.edit-actions .btn {
  text-align: center;
}
.hidden {
  display: none !important;
}
footer {
  color: #94a3b8;
  text-align: center;
  padding: 30px;
  font-size: 12px;
}
@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .side {
    display: none;
  }
  .mobile-ad {
    display: block;
    margin-bottom: 18px;
  }
  .mobile-ad .ad {
    min-height: 120px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .head small {
    display: none;
  }
  h1 {
    font-size: 23px;
  }
  .panel {
    padding: 17px;
  }
  .wrap {
    margin-top: 16px;
  }
}

/* Match the Data Field home page */
body {
  background: #eef1f3
    url("https://data-field.jp/assets/img/28733509_s-1.jpg")
    center top/cover fixed;
  color: #303944;
  line-height: 1.7;
}
header {
  background: #303030;
  border-top: 6px solid #285b92;
  border-bottom: 0;
}
.head {
  max-width: 1160px;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 16px;
}
.head small {
  order: -1;
  color: #fff;
  font-size: 14px;
}
.logo img {
  display: block;
  width: min(340px, 85vw);
  height: auto;
}
.wrap {
  background: rgba(255, 255, 255, 0.96);
  padding: 26px 30px;
  margin: 6px auto 30px;
  box-shadow: 0 6px 26px #26384917;
}
.panel {
  border: 1px solid #e1e7ec;
  border-radius: 3px;
  box-shadow: none;
}
h2 {
  border-left: 4px solid #285b92;
}
.btn.primary {
  background: #414850;
  border-color: #414850;
}
.btn.primary:hover {
  background: #303840;
}
footer {
  background: #303030;
  border-bottom: 5px solid #285b92;
  color: #fff;
  padding: 14px max(16px, calc((100% - 1160px) / 2)) 18px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 65px;
}
.footer-inner img {
  width: 190px;
  max-width: 100%;
  height: auto;
}
.footer-inner span {
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .wrap {
    margin: 6px 12px 24px;
    padding: 18px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 8px;
  }
  .footer-inner img {
    width: 170px;
  }
}
@media (max-width: 560px) {
  body {
    background-attachment: scroll;
  }
  .logo img {
    width: min(300px, 85vw);
  }
}

.team-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.detail-summary,
.detail-year {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
}
.detail-summary {
  margin-top: 10px;
}
.detail-year {
  margin-top: 0;
  margin-bottom: 12px;
}

@media (max-width: 767px) {
  .page-shell,
  .columns,
  .content,
  main {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .columns {
    display: block;
  }

  .content {
    width: 100%;
  }
}

/* Excel upload: single-file drop area */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 130px;
  padding: 20px 14px;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone:focus-visible, .upload-zone.drag-over {
  border-color: #285b92;
  background: #edf4f9;
  outline-offset: 2px;
}
.upload-zone-title { font-weight: 700; }
.upload-zone-sub { font-size: 12px; color: var(--muted); }
.upload-filename { margin: 12px 0 0; overflow-wrap: anywhere; font-size: 13px; }
.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.btn:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 560px) {
  .modal { padding: 18px; max-height: calc(100dvh - 30px); overflow-y: auto; }
  .upload-zone { min-height: 115px; }
}
