/* 新豊洲会場の混雑状況 (inc/crowd-status.php, the TOP above the NEWS box): the client's PC design of 2026-11-29,
   1040 × 136 CSS px in Japanese, built from their text-free parts (common/images/crowd/, 2x) and CSS for the frame and
   the venue's band. The TOP's column (#contents) is 900px, so the box takes its width as the closure notice does
   (876px): every size and gap stays the design's, only the message's column is narrower. Every text is HTML: a longer translation wraps and the box grows instead of overlapping. The
   positions in the comments are the client's (配置と画像の使い方.txt, CSS px from the box's top left). */
.tcm-crowd {
  --crowd-text: #174332;
  --crowd-gold: #bd9848;
  --crowd-line: #c9ab69;
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-width: 1040px;
  margin: 0 auto 18px;
  border: 1px solid var(--crowd-gold);
  border-radius: 8px;
  background: linear-gradient(#fffcf6, #fbf7ee);
  color: var(--crowd-text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}
.tcm-crowd *, .tcm-crowd *::before, .tcm-crowd *::after { box-sizing: border-box; }
/* :where(): one class strong, so the parts' own padding (the message's 15px after the rule) wins over it. */
.tcm-crowd :where(p, h2, ol, li) { margin: 0; padding: 0; }

/* Row 1: the band (x 24, y 13, 138 × 26), the heading (x 181, 17px), the update time (right edge 1016, 14px), and the
   gold rule under them (y 52). */
.tcm-crowd__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 19px;
  margin: 0 23px; /* inside the 1px frame: x 24 from the box's edge */
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--crowd-line);
}
.tcm-crowd__venue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  min-height: 26px;
  padding: 3px 16px;
  border-radius: 4px;
  background: var(--crowd-text);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}
.tcm-crowd__heading {
  flex: 1 1 auto;
  color: var(--crowd-text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  border: 0;
  background: none;
}
.tcm-crowd__updated {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 .3em;
  margin-left: auto;
  font-size: 14px;
  line-height: 1.3;
  text-align: right;
}
.tcm-crowd__updated time, .tcm-crowd__updated-label { font-weight: inherit; }
/* English reads 「Updated 11/30 14:00」. */
.tcm-crowd__updated:lang(en) { flex-direction: row-reverse; }

/* Row 2: the badge (x 24, y 75, 52 × 42, 29px letter), the rule (x 88) and the message (x 104, 21px, centre y 96),
   the meter (bar x 720, y 98, 296 × 26; 「現在」 centre y 75, 12px). */
.tcm-crowd__body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 23px 18px;
}
.tcm-crowd__badge {
  display: flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 52px;
  height: 42px;
  margin-right: -8px; /* the rule sits 12px after the badge */
  background: no-repeat center / 52px 42px;
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
}
.tcm-crowd__message {
  display: flex;
  flex: 1 1 0%;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  min-height: 42px;
  padding-left: 15px;
  border-left: 1px solid var(--crowd-line);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
}
.tcm-crowd__meter {
  position: relative;
  flex: 0 0 296px;
  width: 296px;
  /* 「現在」 (y 69-81), then the meter picture (y 84-124: the triangle on top, the bar its lower 26px). */
  margin: -6px 0 -7px;
  padding-top: 15px;
}
.tcm-crowd__scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  aspect-ratio: 592 / 80;
  background: no-repeat 0 0 / 100% 100%;
  list-style: none;
}
.tcm-crowd__scale li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 65%; /* the bar: 26 of the picture's 40px */
  color: var(--crowd-text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  list-style: none;
}
.tcm-crowd__now {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  white-space: nowrap;
}

/* The levels: the badge and the meter of the client's parts, and the letter's colour on them. */
.tcm-crowd--a .tcm-crowd__badge { background-image: url(../images/crowd/badge_a@2x.png); color: #fff; }
.tcm-crowd--b .tcm-crowd__badge { background-image: url(../images/crowd/badge_b@2x.png); color: #174332; }
.tcm-crowd--c .tcm-crowd__badge { background-image: url(../images/crowd/badge_c@2x.png); color: #402710; }
.tcm-crowd--d .tcm-crowd__badge { background-image: url(../images/crowd/badge_d@2x.png); color: #fff; }
.tcm-crowd--a .tcm-crowd__scale { background-image: url(../images/crowd/meter_a@2x.png); }
.tcm-crowd--b .tcm-crowd__scale { background-image: url(../images/crowd/meter_b@2x.png); }
.tcm-crowd--c .tcm-crowd__scale { background-image: url(../images/crowd/meter_c@2x.png); }
.tcm-crowd--d .tcm-crowd__scale { background-image: url(../images/crowd/meter_d@2x.png); }
.tcm-crowd--a .tcm-crowd__scale .is-current, .tcm-crowd--d .tcm-crowd__scale .is-current { color: #fff; }
.tcm-crowd--b .tcm-crowd__scale .is-current { color: #174332; }
.tcm-crowd--c .tcm-crowd__scale .is-current { color: #402710; }
/* 「現在」 over the middle of the chosen column. */
.tcm-crowd--a .tcm-crowd__now { left: 12.5%; }
.tcm-crowd--b .tcm-crowd__now { left: 37.5%; }
.tcm-crowd--c .tcm-crowd__now { left: 62.5%; }
.tcm-crowd--d .tcm-crowd__now { left: 87.5%; }

/* Phones: the client's SP design of 2026-11-29 (新豊洲_混雑状況_スマホ_入稿画像), 358 × 144 CSS px in Japanese, the meter
   under the badge and the message, with the SP parts (*_sp@2x.png). Positions as in their 配置と画像の使い方.txt. */
@media (max-width: 767px) {
  .tcm-crowd { width: 100%; margin-bottom: 16px; }
  /* Row 1: the band (x 12, y 12, 82 × 20, 11px), the heading (x 103, 11px), the update time (right edge 346, 10px)
     on one line, the rule at y 41 (x 12-346). */
  .tcm-crowd__head { margin: 0 11px; padding: 11px 0 9px; gap: 4px 9px; }
  .tcm-crowd__venue { min-width: 82px; min-height: 20px; padding: 2px 10px; font-size: 11px; }
  .tcm-crowd__heading { font-size: 11px; }
  .tcm-crowd__updated { font-size: 10px; }
  /* Row 2: the badge (x 16, y 56, 36 × 32, 22px letter) and the message (x 64, 15px, centre y 72), no rule between
     them. Row 3: 「現在」 (centre y 96, 10px) and the meter (bar x 16, y 114, 326 × 22, 16px letters). */
  .tcm-crowd__body {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 3px 12px;
    padding: 14px 15px 7px;
  }
  .tcm-crowd__badge {
    align-self: center;
    width: 36px;
    height: 32px;
    margin-right: 0;
    background-size: 36px 32px;
    font-size: 22px;
  }
  .tcm-crowd__message {
    min-height: 32px;
    padding-left: 0;
    border-left: 0;
    font-size: 15px;
  }
  .tcm-crowd__meter { grid-column: 1 / -1; width: 100%; margin: 0; padding-top: 11px; }
  .tcm-crowd__scale { aspect-ratio: 652 / 68; }
  .tcm-crowd__scale li { height: 64.7%; font-size: 16px; } /* the bar: 22 of the picture's 34px */
  .tcm-crowd__now { font-size: 10px; line-height: 10px; }
  .tcm-crowd--a .tcm-crowd__badge { background-image: url(../images/crowd/badge_a_sp@2x.png); }
  .tcm-crowd--b .tcm-crowd__badge { background-image: url(../images/crowd/badge_b_sp@2x.png); }
  .tcm-crowd--c .tcm-crowd__badge { background-image: url(../images/crowd/badge_c_sp@2x.png); }
  .tcm-crowd--d .tcm-crowd__badge { background-image: url(../images/crowd/badge_d_sp@2x.png); }
  .tcm-crowd--a .tcm-crowd__scale { background-image: url(../images/crowd/meter_a_sp@2x.png); }
  .tcm-crowd--b .tcm-crowd__scale { background-image: url(../images/crowd/meter_b_sp@2x.png); }
  .tcm-crowd--c .tcm-crowd__scale { background-image: url(../images/crowd/meter_c_sp@2x.png); }
  .tcm-crowd--d .tcm-crowd__scale { background-image: url(../images/crowd/meter_d_sp@2x.png); }
}

/* The Japanese font stack would draw Korean and Chinese from fallback fonts: those pages keep their language's font
   (i18n.css). */
html:lang(ko) .tcm-crowd, html:lang(zh) .tcm-crowd { font-family: inherit; }
