/* ============ BAR CARDS (featured) ============ */

.bar-grid {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.bar-grid .bar-card {
  flex: 0 0 calc((100% - 3 * 22px) / 4);
  min-width: 230px;
}

.bar-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  color: inherit;
}

.bar-card:hover {
  color: inherit;
}

.bar-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.bar-name {
  font-weight: 700;
  font-size: 16px;
}

.bar-location {
  font-size: 12px;
  color: var(--gray-50);
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.verification-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.verification-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.verification-legend-caption {
  font-size: 12px;
  color: var(--gray-50);
}

.verification-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  align-self: flex-start;
}

.verification-badge-verified {
  background: oklch(0.96 0.04 150);
  border: 1px solid oklch(0.82 0.09 150);
  color: oklch(0.42 0.12 150);
}

.verification-badge-unverified {
  background: oklch(0.96 0.004 90);
  border: 1px solid oklch(0.86 0.005 90);
  color: oklch(0.5 0.01 90);
}

.verification-badge-pending {
  background: oklch(0.93 0.06 85);
  border: 1px solid oklch(0.8 0.1 85);
  color: oklch(0.45 0.1 85);
}

/* Also amber, but shifted toward orange (hue 60 vs pending's 85) and paired
   with the ↻ icon so it never reads as "under review" at a glance. */
.verification-badge-reverify {
  background: oklch(0.94 0.07 60);
  border: 1px solid oklch(0.81 0.12 60);
  color: oklch(0.46 0.14 60);
}

.verification-badge-lg {
  font-size: 11px;
  padding: 5px 11px;
}

.verification-badge-icon {
  font-size: 9px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.verification-filter-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 12px;
}

.verification-filter-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.verification-filter-legend-caption {
  font-size: 11px;
  color: var(--gray-50);
  line-height: 1.5;
}

.verification-badge-date {
  font-weight: 500;
  opacity: 0.75;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  padding: 3px 8px;
  border-radius: 4px;
}

/* League / series / certification badges — AllIn Japan Badges.dc.html.
   Shared kind tokens: --badge-kind (mark colour) and --badge-tint (border).
   Deliberately unlike .verification-badge (green, fully rounded, ✓): 4px
   corners, neutral ink text, kind mark on the left. Not an ad — no gold,
   star or highlight, and no effect on sort order. */
.badge-kind--league {
  --badge-kind: oklch(0.5 0.17 27);
  --badge-tint: oklch(0.85 0.05 27);
}

.badge-kind--series {
  --badge-kind: oklch(0.45 0.09 255);
  --badge-tint: oklch(0.85 0.03 255);
}

.badge-kind--certification {
  --badge-kind: oklch(0.5 0.1 70);
  --badge-tint: oklch(0.86 0.04 75);
}

/* Glyph inside a mark: league ● filled circle, series ○ ring,
   certification ◆ diamond. Sized per mark below. */
.badge-glyph {
  display: block;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.badge-kind--series .badge-glyph {
  width: 9px;
  height: 9px;
  background: transparent;
  border: 2px solid #fff;
}

.badge-kind--certification .badge-glyph {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  transform: rotate(45deg);
}

.badge-logo {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* 01 · Compact pill (bar cards). */
.badge-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-pill {
  display: inline-flex;
  align-items: stretch;
  height: 22px;
  border: 1px solid var(--badge-tint);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  white-space: nowrap;
}

.badge-pill-mark {
  width: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--badge-kind);
}

.badge-pill-mark.is-logo {
  background: #fff;
  border-right: 1px solid var(--badge-tint);
}

.badge-pill-label {
  display: flex;
  align-items: center;
  padding: 0 7px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: oklch(0.22 0 0);
}

.badge-pill-more {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid oklch(0.86 0.005 90);
  border-radius: 4px;
  background: oklch(0.97 0.005 60);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: oklch(0.35 0.01 90);
  flex-shrink: 0;
}

/* Desktop shows up to 4 pills, ≤640px up to 3 slots — _badge_pills renders
   both cuts and these pick one. */
@media (min-width: 641px) {
  .badge-pill-row .is-hidden-desktop {
    display: none;
  }
}

@media (max-width: 640px) {
  .badge-pill-row .is-hidden-mobile {
    display: none;
  }
}

/* 02 · Detail badge (bar detail page, "加盟・提携 / AFFILIATIONS"). */
.badge-affiliations {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.badge-affiliations-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: oklch(0.45 0.01 90);
}

.badge-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-detail {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 12px 6px 6px;
  border: 1px solid oklch(0.86 0.01 90);
  border-radius: 6px;
  background: #fff;
  color: oklch(0.2 0 0);
}

a.badge-detail:hover,
.badge-detail:hover {
  color: oklch(0.2 0 0);
  border-color: var(--badge-kind);
  background: oklch(0.985 0.006 60);
}

.badge-detail:focus-visible {
  outline: 2px solid oklch(0.18 0 0);
  outline-offset: 2px;
}

.badge-detail-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--badge-kind);
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-detail-mark.is-logo {
  background: #fff;
  border: 1px solid var(--badge-tint);
}

.badge-detail-mark .badge-glyph {
  width: 12px;
  height: 12px;
}

.badge-kind--series .badge-detail-mark .badge-glyph {
  width: 13px;
  height: 13px;
  border-width: 2.5px;
}

.badge-kind--certification .badge-detail-mark .badge-glyph {
  width: 10px;
  height: 10px;
  border-radius: 1.5px;
}

.badge-detail-mark .badge-logo {
  width: 24px;
  height: 24px;
}

.badge-detail-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.badge-detail-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.badge-detail-meta {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11px;
  line-height: 1.3;
  color: oklch(0.45 0.01 90);
}

.badge-detail-domain {
  white-space: nowrap;
}

.badge-detail-arrow {
  font-size: 13px;
  color: oklch(0.45 0.01 90);
  flex-shrink: 0;
}

/* The description: a tooltip on hover / keyboard focus. */
.badge-detail-description {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 6px;
  background: oklch(0.18 0 0);
  color: oklch(0.97 0.01 60);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.badge-detail:hover .badge-detail-description,
.badge-detail:focus-visible .badge-detail-description {
  display: block;
}

/* Touch widths have no hover: full-width badges, description inline. */
@media (max-width: 640px) {
  .badge-detail-list {
    flex-direction: column;
  }

  .badge-detail {
    display: flex;
    width: 100%;
    align-items: flex-start;
    padding: 8px 12px 8px 8px;
  }

  .badge-detail-text {
    flex: 1;
  }

  .badge-detail-arrow {
    padding-top: 2px;
  }

  .badge-detail-description,
  .badge-detail:hover .badge-detail-description,
  .badge-detail:focus-visible .badge-detail-description {
    display: block;
    position: static;
    width: auto;
    max-width: none;
    margin-top: 4px;
    padding: 0;
    background: none;
    color: oklch(0.35 0.01 90);
    font-weight: 400;
    line-height: 1.5;
    text-wrap: pretty;
  }
}

/* 04 · Filter rows on All Bars — a native checkbox (the filter form is a
   plain GET, no JS) inside a row styled per the design. */
.badge-filter-group {
  border-top: 1px solid oklch(0.93 0.005 90);
  padding-top: 18px;
}

.badge-filter-hint {
  font-size: 11px;
  color: oklch(0.5 0.01 90);
  margin: -6px 0 10px;
}

.badge-filter-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 -8px;
}

.badge-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.badge-filter-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: oklch(0.2 0 0);
}

.badge-filter-option:hover {
  background: oklch(0.965 0.008 60);
  border-color: oklch(0.9 0.005 90);
}

.badge-filter-option:has(input:checked) {
  background: oklch(0.975 0.006 60);
  border-color: oklch(0.82 0.01 90);
}

.badge-filter-option:has(input:focus-visible) {
  outline: 2px solid oklch(0.18 0 0);
  outline-offset: 1px;
}

.badge-filter-option input:focus-visible {
  outline: none;
}

.badge-filter-count {
  margin-left: auto;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: oklch(0.5 0.01 90);
}

.bar-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-40);
  margin-top: 4px;
}

.photo-placeholder {
  /* Design-zip treatment: the AllIn Japan wordmark over a dark diagonal
     hatch, no text — the brand art is the whole placeholder. */
  background:
    var(--img-brand-placeholder) center 13% / auto 26% no-repeat,
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.045) 0 6px, transparent 6px 16px),
    #191919;
}

/* Small square thumbnails get the corner A-mark instead of the full
   wordmark (matches the design's 76px slots). */
.photo-placeholder.list-item-photo {
  background:
    var(--img-brand-mark) right 5px bottom 5px / 16px no-repeat,
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.045) 0 6px, transparent 6px 16px),
    #191919;
}

