@charset "UTF-8";

/* ============================================================ */
/* second.css — 2次審査通過者発表ページ固有スタイル                 */
/*                                                                 */
/* 構成                                                           */
/*  - .second-head    : 水色帯 + 見出し(水彩丸)                     */
/*  - .second-total   : 総応募数ボックス                            */
/*  - .second-rates   : 部門別 通過率リング(PCのみ横並び)           */
/*  - .second-switch  : 部門切り替えボタン(PCのみ)                  */
/*  - .second-panel   : 部門ごとの地域別リスト(SPはアコーディオン)  */
/*                                                                 */
/* デザイン: _received/20261015_2ndselection/.../２次通過.ai        */
/*  PC=1920幅アートボード / SP=383幅アートボード                    */
/*  PC は 1920 時の実測値 × --u（=100vw/1920）で比例縮小            */
/*  SP は 383 時の実測値 × --s（=100vw/383）で比例縮小              */
/*  文字はほぼ全て Zen Old Mincho Black(900)。例外は流れ行左の     */
/*  件数（SemiBold 600）と SP の「通過率」（Bold 700）             */
/* ============================================================ */

.second {
  --second-pink: #ff5ab5;
  --second-pink-soft: #ffdff1;
  --second-orange: #ff8a2b;
  --second-orange-soft: #ffd1b1;
  --second-navy: #002f87;
  --second-red: #f4474c;
  --second-band: #dcf6fe;
  --second-ink: #251714;
  --second-row: #e6e6e6;
  --second-rule: #b3b3b3;

  /* 1920 で 1px、769 付近で 0.6px を下限に縮小 */
  --u: clamp(0.6px, calc(100vw / 1920), 1px);

  background: #fff;
  padding-bottom: calc(85 * var(--u));
  font-family: var(--font-display);
  font-weight: 900;
  color: #000;
}

.second-rate--general,
.second-switch__btn--general,
.second-panel--general {
  --dept: var(--second-pink);
  --dept-soft: var(--second-pink-soft);
}

.second-rate--junior,
.second-switch__btn--junior,
.second-panel--junior {
  --dept: var(--second-orange);
  --dept-soft: var(--second-orange-soft);
}

.second-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================ */
/* 1. 見出し帯                                                    */
/* ============================================================ */
/* デザインは文字が帯中央より少し上、水彩丸は帯中央。
   文字だけ上げるため padding を上下非対称にし、丸を同じだけ下げる */
.second-head {
  background: var(--second-band);
  padding: calc(75 * var(--u)) 20px calc(95 * var(--u));
}

.second-head__title.section-title {
  margin: 0;
  font-size: calc(70 * var(--u));
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--second-navy);
}

.second-head__title.section-title::before {
  top: calc(50% + 10 * var(--u));
  width: calc(165 * var(--u));
  height: calc(165 * var(--u));
  background-image: url("../images/second/title-accent.webp");
}

/* ============================================================ */
/* 2. 総応募数ボックス                                            */
/* ============================================================ */
.second-total {
  width: min(calc(808 * var(--u)), calc(100% - 40px));
  margin: calc(87 * var(--u)) auto 0;
  padding: calc(27 * var(--u)) calc(70 * var(--u)) calc(41 * var(--u));
  border: max(2px, calc(3 * var(--u))) solid var(--second-navy);
  border-radius: calc(30 * var(--u));
}

.second-total small {
  font-size: calc(24 * var(--u));
  letter-spacing: 0;
}

.second-total__main {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: calc(39 * var(--u));
  color: var(--second-red);
  line-height: 1.2;
  padding-bottom: calc(18 * var(--u));
  border-bottom: max(2px, calc(3 * var(--u))) solid var(--second-navy);
}

.second-total__label {
  font-size: calc(36 * var(--u));
  letter-spacing: 0.38em;
}

.second-total__num {
  font-size: calc(48 * var(--u));
  letter-spacing: 0.045em;
}

/* 数字→「作品」の間隔（デザイン実測: 総応募数 22 / 部門件数 18） */
.second-total__num small {
  margin-left: 0.63em;
}

/* デザインは3行とも「作品」の右端が揃い、部門リストは中央より10px左 */
.second-total__list {
  display: grid;
  grid-template-columns: calc(222 * var(--u)) auto;
  justify-content: center;
  align-items: end;
  column-gap: calc(72 * var(--u));
  row-gap: calc(30 * var(--u));
  margin-top: calc(30 * var(--u));
  position: relative;
  left: calc(-9 * var(--u));
}

.second-total__row {
  display: contents;
}

.second-total__dept {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(37 * var(--u));
  font-size: calc(24 * var(--u));
  color: #fff;
  line-height: 1;
}

/* 2つのラベルは文字幅が同じ（147px）になるよう字間を調整 */
.second-total__dept--general {
  background: var(--second-pink);
  letter-spacing: 0.71em;
  text-indent: 0.71em;
}

.second-total__dept--junior {
  background: var(--second-orange);
  letter-spacing: 0.025em;
  text-indent: 0.025em;
}

/* 数字の下端を帯の下端に揃える */
.second-total__count {
  position: relative;
  top: calc(-5 * var(--u));
  margin: 0;
  font-size: calc(36 * var(--u));
  line-height: 1;
  letter-spacing: 0.045em;
  text-align: right;
}

.second-total__count small {
  margin-left: 0.525em;
}

/* ============================================================ */
/* 3. 通過率リング                                                */
/* ============================================================ */
/* リング中心をデザイン・下の部門ボタンと同じ x(960±289) に揃える */
.second-rates {
  display: grid;
  grid-template-columns: repeat(2, calc(578 * var(--u)));
  justify-content: center;
  margin-top: calc(86 * var(--u));
}

.second-rate {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.second-rate--sp {
  display: none;
}

.second-rate__ring {
  position: relative;
  width: calc(340 * var(--u));
  aspect-ratio: 1;
}

.second-rate__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.second-rate__track {
  fill: none;
  stroke: var(--dept-soft);
  stroke-width: 18;
}

/* 通過率の弧の両脇の白い切れ目 */
.second-rate__gap {
  fill: none;
  stroke: #fff;
  stroke-width: 34;
}

.second-rate__arc {
  fill: none;
  stroke: var(--dept);
  stroke-width: 30;
}

.second-rate__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--dept);
  line-height: 1.2;
}

.second-rate__dept {
  font-size: calc(36 * var(--u));
}

.second-rate__label {
  margin-top: calc(22 * var(--u));
  font-size: calc(21 * var(--u));
}

.second-rate__value {
  margin-top: calc(8 * var(--u));
  font-size: calc(52 * var(--u));
}

.second-rate__approx {
  font-size: calc(36 * var(--u));
  margin-right: 0.25em;
}

/* 4,775作品 → 105作品 */
.second-rate__flow {
  display: flex;
  align-items: baseline;
  margin-top: calc(2 * var(--u));
  color: var(--second-ink);
  line-height: 1.2;
  white-space: nowrap;
}

.second-rate__flow small {
  font-size: calc(24 * var(--u));
  margin-left: 0.3em;
}

/* 左の件数だけ SemiBold、かつ右の大きい数字より少し上 */
.second-rate__from {
  position: relative;
  top: calc(-8 * var(--u));
  font-size: calc(30 * var(--u));
  font-weight: 600;
}

.second-rate__from small {
  font-weight: 900;
}

/* 矢印の中心を左の件数の字面中心に合わせる（baseline揃えだと下マージンが効かないので top で上げる） */
.second-rate__arrow {
  position: relative;
  top: calc(-8 * var(--u));
  align-self: baseline;
  width: calc(44 * var(--u));
  height: auto;
  margin: 0 calc(15 * var(--u)) 0 calc(22 * var(--u));
  fill: var(--second-ink);
}

.second-rate__to strong {
  font-size: calc(70 * var(--u));
  font-weight: 900;
  color: var(--dept);
}

/* ============================================================ */
/* 4. リード文・部門切り替え                                      */
/* ============================================================ */
.second-lead {
  margin-top: calc(56 * var(--u));
  padding: 0 20px;
  text-align: center;
  font-size: calc(30 * var(--u));
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--second-navy);
}

.second-switch {
  display: flex;
  justify-content: center;
  gap: calc(196 * var(--u));
  margin-top: calc(84 * var(--u));
}

.second-switch__btn {
  width: calc(382 * var(--u));
  height: calc(92 * var(--u));
  border-radius: var(--radius-pill);
  background: var(--dept);
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(35 * var(--u));
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.4;
  transition: opacity var(--transition-base);
}

.second-switch__btn:hover,
.second-switch__btn.is-active {
  opacity: 1;
}

/* ============================================================ */
/* 5. 部門パネル・地域別リスト                                    */
/* ============================================================ */
.second-panel {
  width: min(calc(1470 * var(--u)), calc(100% - 40px));
  margin: 0 auto;
}

/* JS 読込後のみ非アクティブ部門を隠す（JS 無効時は両部門とも表示） */
.second.is-ready .second-panel:not(.is-active) {
  display: none;
}

/* PC は部門名をボタンで示すので見出しは読み上げ用に残して隠す */
.second-panel__title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.second-note {
  margin-top: calc(73 * var(--u));
  font-size: calc(24 * var(--u));
  letter-spacing: 0.05em;
  color: #000;
}

.second-regions {
  margin-top: calc(7 * var(--u));
  padding: 0 calc(7 * var(--u)) calc(7 * var(--u));
  background: var(--dept);
  border-radius: calc(20 * var(--u));
  overflow: hidden;
}

.second-region__title {
  margin: 0;
}

.second-region__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(77 * var(--u));
  font-family: var(--font-display);
  font-size: calc(30 * var(--u));
  font-weight: 900;
  color: #fff;
  letter-spacing: 0;
  cursor: default;
}

.second-region__toggle::after {
  content: none;
}

.second-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.second-table tbody tr:nth-child(even) {
  background: var(--second-row);
}

.second-table td {
  height: calc(50 * var(--u));
  padding: calc(8 * var(--u)) calc(16 * var(--u));
  font-size: calc(20 * var(--u));
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.second-table td + td {
  border-left: 1px solid var(--second-rule);
}

.second-table__col-pref {
  width: 11.2%;
}

.second-table__col-name {
  width: 26.1%;
}

/* ============================================================ */
/* SP（383幅デザイン準拠）                                        */
/* ============================================================ */
@media (max-width: 768px) {
  .second {
    --s: min(1.15px, calc(100vw / 383));
    padding-bottom: calc(64 * var(--s));
  }

  .second-head {
    padding: calc(24 * var(--s)) 16px;
  }

  .second-head__title.section-title {
    font-size: calc(19 * var(--s));
    margin: 0;
  }

  .second-head__title.section-title::before {
    top: 50%;
    width: calc(57 * var(--s));
    height: calc(57 * var(--s));
  }

  /* 総応募数 */
  .second-total {
    width: calc(100% - 36 * var(--s));
    margin-top: calc(39 * var(--s));
    padding: calc(6 * var(--s)) calc(16 * var(--s)) calc(16.5 * var(--s));
    border-width: 2px;
    border-radius: calc(16 * var(--s));
  }

  .second-total small {
    font-size: calc(12 * var(--s));
  }

  .second-total__num small {
    margin-left: 0.8em;
  }

  .second-total__count small {
    margin-left: 0.56em;
  }

  .second-total__main {
    gap: calc(20 * var(--s));
    padding-bottom: calc(10 * var(--s));
    border-bottom-width: 2px;
  }

  .second-total__label {
    font-size: calc(20 * var(--s));
  }

  .second-total__num {
    font-size: calc(30 * var(--s));
  }

  .second-total__list {
    grid-template-columns: calc(115 * var(--s)) auto;
    column-gap: calc(40 * var(--s));
    row-gap: calc(12 * var(--s));
    margin-top: calc(6 * var(--s));
    left: calc(-4.5 * var(--s));
  }

  .second-total__dept {
    height: calc(19 * var(--s));
    font-size: calc(12 * var(--s));
  }

  .second-total__dept--general {
    letter-spacing: 0.7em;
    text-indent: 0.7em;
  }

  .second-total__dept--junior {
    letter-spacing: 0.05em;
    text-indent: 0.05em;
  }

  .second-total__count {
    top: 0;
    font-size: calc(24 * var(--s));
  }

  /* リード（SP は総応募数の直後） */
  .second-lead {
    margin-top: calc(40 * var(--s));
    padding: 0 16px;
    font-size: calc(18 * var(--s));
    line-height: 1.45;
    letter-spacing: 0.05em;
  }

  /* PC 用の横並びリング・切り替えボタンは使わない */
  .second-rates,
  .second-switch {
    display: none;
  }

  .second-rate--sp {
    display: flex;
  }

  /* 部門パネル: 両部門を縦に並べる */
  .second-panel {
    width: 100%;
  }

  .second.is-ready .second-panel:not(.is-active) {
    display: block;
  }

  .second-panel + .second-panel {
    margin-top: calc(70.5 * var(--s));
  }

  .second-panel .second-rate--sp {
    margin-top: calc(47 * var(--s));
  }

  .second-panel + .second-panel .second-rate--sp {
    margin-top: 0;
  }

  .second-rate__ring {
    width: calc(208 * var(--s));
  }

  /* SP のマーカーはデザインで太さ15（PCより細め） */
  .second-rate__arc {
    stroke-width: 25;
  }

  .second-rate__gap {
    stroke-width: 29;
  }

  .second-rate__dept {
    font-size: calc(25 * var(--s));
  }

  .second-rate__label {
    margin-top: calc(10 * var(--s));
    font-size: calc(15 * var(--s));
    font-weight: 700;
  }

  .second-rate__value {
    margin-top: calc(2 * var(--s));
    font-size: calc(35 * var(--s));
  }

  .second-rate__approx {
    font-size: calc(21 * var(--s));
  }

  .second-rate__flow {
    margin-top: calc(7.5 * var(--s));
  }

  .second-rate__flow small {
    font-size: calc(18 * var(--s));
  }

  .second-rate__from {
    top: calc(-3 * var(--s));
    font-size: calc(24 * var(--s));
  }

  .second-rate__arrow {
    width: calc(30 * var(--s));
    top: calc(-3 * var(--s));
    margin: 0 calc(6 * var(--s)) 0 calc(6.5 * var(--s));
  }

  .second-rate__to strong {
    font-size: calc(40 * var(--s));
  }

  .second-panel__title {
    position: static;
    width: auto;
    height: auto;
    margin: calc(15 * var(--s)) 0 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    text-align: center;
    font-size: calc(24 * var(--s));
    color: var(--dept);
  }

  .second-note {
    margin: calc(7 * var(--s)) calc(18 * var(--s)) 0;
    font-size: calc(12 * var(--s));
    letter-spacing: 0.05em;
  }

  /* 地域アコーディオン */
  .second-regions {
    margin: calc(8 * var(--s)) calc(16 * var(--s)) 0;
    padding: 0;
    background: none;
    border-radius: 0;
    overflow: visible;
  }

  .second-region {
    background: var(--dept);
    border-radius: calc(12 * var(--s));
    overflow: hidden;
  }

  .second-region + .second-region {
    margin-top: calc(10 * var(--s));
  }

  .second-region__toggle {
    position: relative;
    height: calc(41 * var(--s));
    font-size: calc(16 * var(--s));
    cursor: pointer;
  }

  /* V字シェブロン（デザイン 16×11、開いたら反転） */
  .second-region__toggle::after {
    content: "";
    position: absolute;
    top: calc(50% - 2 * var(--s));
    right: calc(21.5 * var(--s));
    width: calc(16 * var(--s));
    height: calc(11 * var(--s));
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 11'%3E%3Cpath d='M1 1l7 8.5L15 1' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") no-repeat center / contain;
    transform: translateY(-50%);
    transition: transform var(--transition-base);
  }

  .second-region__toggle[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(180deg);
  }

  .second-region__body .second-table {
    width: calc(100% - 6px);
    margin: 0 3px 3px;
  }

  /* 開閉は max-height のアニメーション（開いた高さは JS が scrollHeight で入れる） */
  .second.is-ready .second-region__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .second-table td {
    height: calc(36 * var(--s));
    padding: calc(6 * var(--s)) calc(6 * var(--s));
    font-size: calc(12 * var(--s));
    line-height: 1.35;
  }

  .second-table__col-pref {
    width: 21%;
  }

  .second-table__col-name {
    width: 30%;
  }
}
