.bls-widget,
.bls-widget *,
.bls-widget *::before,
.bls-widget *::after {
  box-sizing: border-box;
}

.bls-widget {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  color: #172033;
  background: #fff;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  line-height: 1.5;
}

.bls-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  margin: 0 0 14px;
  padding: 10px 18px;
  background: var(--color_main, #3563b7);
  color: #fff !important;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .12);
  flex-wrap: wrap;
  gap: 8px 14px;
}

.bls-toolbar::before,
.bls-toolbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
}

.bls-toolbar::before {
  top: 3px;
  background: rgba(255, 255, 255, .6);
}

.bls-toolbar::after {
  bottom: 3px;
  background: rgba(0, 0, 0, .16);
}

.bls-title {
  margin: 0;
  color: #fff !important;
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

.bls-date {
  display: inline-block;
  color: #64748b !important;
  font-size: 13px;
  opacity: 1;
  font-weight: 700;
  background: #eef4ff;
  border: 1px solid #d7e5ff;
  border-radius: 999px;
  padding: 2px 8px;
}

.bls-date-wrap {
  display: inline-flex;
  align-items: center;
  margin-left: .35em;
  color: #64748b;
  font-size: .76em;
  font-weight: 700;
  vertical-align: baseline;
}

.bls-hero {
  position: relative;
  background: #f8fafc;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.bls-video-shell {
  scroll-margin-top: 88px;
  margin: 0;
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(64, 112, 216, .24), transparent 38%),
    linear-gradient(180deg, #111c2f, #07111f);
  border: 1px solid #1c2b45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 32px rgba(7, 17, 31, .18);
}

.bls-video-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 8px 8px;
  color: #dbeafe;
}

.bls-video-label {
  margin: 0 auto;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1;
  text-align: center;
}

.bls-video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}

.bls-video-frame iframe,
.bls-video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.bls-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  background: radial-gradient(circle at center, #172554, #020617 68%);
  text-align: center;
  padding: 16px;
  gap: 10px;
}

.bls-video-placeholder p {
  margin: 0;
}

.bls-race-info {
  padding: 12px 14px;
  background: #fff;
}

.bls-race-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-size: 16px;
  font-weight: 700;
}

.bls-race-status {
  font-size: 12px;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.bls-race-status.bls-soon {
  color: #b45309;
  background: #fef3c7;
}

.bls-race-status.bls-done {
  color: #4b5563;
  background: #e5e7eb;
}

.bls-race-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
}

.bls-heading {
  position: relative;
  display: block;
  width: 100%;
  margin: 42px 0 20px;
  padding: 4px 0 16px !important;
  color: #1f2937 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #d7e0ec !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  overflow: visible;
}

h2.bls-heading,
h3.bls-heading {
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: none !important;
}

.post_content h2.bls-heading {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: .75em;
  background: var(--color_htag, var(--color_main, #2a5eb2)) !important;
  border: 0 !important;
  color: #fff !important;
  padding: .75em 1em !important;
}

.post_content h2.bls-heading::before {
  position: absolute;
  display: block !important;
  pointer-events: none;
  content: "" !important;
  top: -4px;
  left: 0;
  width: 100%;
  height: calc(100% + 4px);
  box-sizing: content-box;
  border-top: solid 2px var(--color_htag, var(--color_main, #2a5eb2));
  border-bottom: solid 2px var(--color_htag, var(--color_main, #2a5eb2));
  background: transparent !important;
}

.post_content h3.bls-heading {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #d7e0ec !important;
  color: #1f2937 !important;
  padding: 4px 0 16px !important;
}

.post_content h3.bls-heading::before {
  content: none !important;
  display: none !important;
}

.bls-heading-main {
  font-size: 20px;
}

.bls-heading-sub {
  font-size: 18px;
}

.bls-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 34%;
  max-width: 180px;
  height: 3px;
  background: var(--color_htag, var(--color_main, #3563b7));
}

h2.bls-heading::after {
  content: none !important;
  display: none !important;
}

.post_content h2.bls-heading .bls-date-wrap,
.post_content h2.bls-heading .bls-date {
  color: rgba(255, 255, 255, .92) !important;
}

.post_content h2.bls-heading .bls-date-wrap {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.post_content h2.bls-heading .bls-date {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .35);
}

.bls-venue-heading {
  margin-top: 0;
  margin-bottom: 14px;
}

.bls-video-heading {
  margin-top: 34px;
  margin-bottom: 16px;
}

.bls-venue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.bls-venue-grid.bls-is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.bls-grid-loading {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.bls-grid-loading::before {
  content: "";
  display: inline-block;
  width: .7em;
  height: .7em;
  margin-right: .5em;
  border: 2px solid rgba(219, 234, 254, .35);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -.08em;
  animation: bls-spin .8s linear infinite;
}

@keyframes bls-spin {
  to {
    transform: rotate(360deg);
  }
}

.bls-venue-grid + .bls-hero {
  margin-top: 18px;
}

.bls-runners-section,
.bls-schedule {
  margin-top: 24px;
}

.bls-runners-section[hidden],
.bls-schedule[hidden] {
  display: none;
}

.post_content .bls-runners-section h3.bls-heading,
.post_content .bls-schedule h3.bls-heading {
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}

.bls-venue-cell {
  appearance: none;
  min-width: 0;
  min-height: 58px;
  border: 1px solid #26344e;
  background: #1a2540;
  color: #f8fafc;
  border-radius: 5px;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: inherit;
  text-align: left;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.bls-venue-cell.bls-on:hover,
.bls-venue-cell.bls-selected {
  transform: translateY(-1px);
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .22);
}

.bls-venue-cell.bls-selected {
  background: #203257;
}

.bls-venue-cell.bls-ended {
  background: #172036;
}

.bls-venue-cell.bls-off {
  background: #3f3f46;
  color: #cbd5e1;
  border-color: #4b5563;
  cursor: not-allowed;
  opacity: .78;
}

.bls-venue-top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.bls-venue-badge {
  flex: 0 0 auto;
  min-width: 31px;
  border-radius: 2px;
  padding: 1px 5px;
  color: #fff;
  background: #475569;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.bls-grade-sg,
.bls-grade-pg1 {
  background: #dc2626;
}

.bls-grade-g1 {
  background: #b59b16;
}

.bls-grade-g2 {
  background: #2563eb;
}

.bls-grade-g3 {
  background: #16a34a;
}

.bls-venue-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.bls-venue-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

.bls-venue-status {
  margin-top: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.bls-venue-cell.bls-canceled .bls-venue-status {
  color: #fca5a5;
}

.bls-schedule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.bls-schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}

.bls-schedule-row.bls-current {
  background: #fef3c7;
  border-color: #f59e0b;
  font-weight: 700;
}

.bls-schedule-row.bls-past {
  background: #f3f4f6;
  color: #9ca3af;
}

.bls-race-no {
  font-weight: 800;
  color: #1e3a8a;
}

.bls-schedule-row.bls-past .bls-race-no {
  color: #9ca3af;
}

.bls-race-time {
  font-size: 12px;
}

.bls-status,
.bls-loading {
  padding: 10px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 6px;
  margin-top: 10px;
}

.bls-status[hidden] {
  display: none;
}

.bls-loading:empty {
  display: none;
}

.bls-error {
  color: #b91c1c;
  background: #fef2f2;
}

.bls-runner-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.bls-runner {
  border: 1px solid #dbe2ec;
  border-left: 5px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

.bls-runner-l1 {
  border-left-color: #94a3b8;
}

.bls-runner-l2 {
  border-left-color: #111827;
}

.bls-runner-l3 {
  border-left-color: #dc2626;
}

.bls-runner-l4 {
  border-left-color: #2563eb;
}

.bls-runner-l5 {
  border-left-color: #facc15;
}

.bls-runner-l6 {
  border-left-color: #16a34a;
}

.bls-runner-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
}

.bls-boat {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  border-radius: 50%;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
}

.bls-boat-1 {
  background: #fff;
  color: #111827;
  border: 1px solid #111827;
  line-height: 18px;
}

.bls-boat-2 {
  background: #111827;
}

.bls-boat-3 {
  background: #dc2626;
}

.bls-boat-4 {
  background: #2563eb;
}

.bls-boat-5 {
  background: #facc15;
  color: #111827;
}

.bls-boat-6 {
  background: #16a34a;
}

.bls-runner-name {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.bls-runner-name strong {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.bls-runner-class {
  display: inline-block;
  border-radius: 3px;
  padding: 1px 6px;
  background: #6b7280;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.bls-class-A1 {
  background: #dc2626;
}

.bls-class-A2 {
  background: #ea580c;
}

.bls-class-B1 {
  background: #1e3a8a;
}

.bls-class-B2 {
  background: #6b7280;
}

.bls-runner-meta,
.bls-runner-bio,
.bls-runner-fl {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.5;
}

.bls-runner-meta {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.bls-runner-details {
  margin-top: 7px;
}

.bls-runner-details summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #1e3a8a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.bls-runner-details summary::-webkit-details-marker {
  display: none;
}

.bls-runner-details summary::after {
  content: "+";
  margin-left: 8px;
  font-weight: 900;
}

.bls-runner-details[open] summary::after {
  content: "-";
}

.bls-runner-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.bls-stat {
  background: #f8fafc;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.5;
}

.bls-stat-label {
  margin-bottom: 3px;
  padding-bottom: 2px;
  border-bottom: 1px solid #e5e7eb;
  color: #1e3a8a;
  font-size: 10px;
  font-weight: 800;
}

.bls-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.bls-stat-row > span:first-child {
  color: #6b7280;
}

.bls-stat-row > span:last-child {
  color: #111827;
  font-weight: 700;
}

@media (min-width: 480px) {
  .bls-venue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bls-schedule-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .bls-venue-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .bls-runner-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .bls-venue-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .bls-runner-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
