/* EXTRASTAGE E 案 — 共通の部品（F-6）。土台の持ちもの。部品の見本は試作の生成の「部品の見本」のページ（src/pages/kit/kit.mjs）
   hover は必ず (hover: hover) and (pointer: fine) の中。影・ぼかし・半透明のガラスの面は使わない。 */
@layer components {

  /* ============ ボタン（2.1） ============ */
  .btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--es-space-8);
    min-height: 55px; padding: 0 var(--es-space-34); border-radius: var(--es-radius-full);
    font-size: var(--es-text-16); line-height: 1.2; font-weight: var(--es-fw-medium); white-space: nowrap; text-align: center;
    transition: filter var(--es-dur-89) var(--es-ease-out), background-color var(--es-dur-89) var(--es-ease-out), color var(--es-dur-89) var(--es-ease-out);
  }
  .btn--44 { min-height: 44px; padding: 0 var(--es-space-21); }
  .btn--full { width: 100%; }
  .btn--primary { background: var(--es-accent); color: var(--es-on-accent); }
  .btn--play { font-weight: var(--es-fw-bold); }
  .btn--play:not(.btn--44) { font-size: var(--es-text-21); }
  .btn--line { color: var(--es-text-strong); box-shadow: inset 0 0 0 var(--es-line-1) currentColor; }
  .btn--text { min-height: 44px; padding: 0; color: var(--es-accent); text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
  .btn--ink { background: var(--es-color-sumi); color: var(--es-color-hakunetsu); }
  .btn[aria-disabled="true"], .btn:disabled { background: var(--es-disabled-bg); color: var(--es-disabled-text); box-shadow: none; cursor: not-allowed; filter: none; }
  @media (hover: hover) and (pointer: fine) {
    .btn--primary:not(:disabled):not([aria-disabled="true"]):hover { filter: brightness(1.08); }
    .btn--line:not(:disabled):not([aria-disabled="true"]):hover { background: color-mix(in srgb, var(--es-text-strong) 10%, transparent); }
    .btn--ink:hover { background: var(--es-color-keshizumi); }
    .btn--text:hover { text-decoration-thickness: 2px; }
  }
  /* 字のリンク（2.1 の「字」） */
  .tlink { display: inline-flex; align-items: center; gap: var(--es-space-8); min-height: 44px; color: var(--es-accent); }
  .tlink > span { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
  @media (hover: hover) and (pointer: fine) { .tlink:hover > span { text-decoration-thickness: 2px; } }
  .iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; color: var(--es-text-strong); border-radius: var(--es-radius-full); }
  @media (hover: hover) and (pointer: fine) { .iconbtn:hover { background: color-mix(in srgb, var(--es-text-strong) 10%, transparent); } }

  /* 選択肢（2.1）：高さ 34・触れる範囲は上下 5 ずつ足して 44 */
  .chip {
    position: relative; display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 var(--es-space-13);
    border-radius: var(--es-radius-full); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-border); color: var(--es-text);
    font-size: var(--es-text-16); line-height: 1; font-weight: var(--es-fw-medium); white-space: nowrap; flex: 0 0 auto;
  }
  .chip::before { content: ""; position: absolute; inset: -5px 0; }
  .chip.is-on, .chip[aria-pressed="true"], .chip[aria-selected="true"] { box-shadow: inset 0 0 0 var(--es-line-2) var(--es-accent); color: var(--es-text-strong); }
  @media (hover: hover) and (pointer: fine) { .chip:hover { color: var(--es-text-strong); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-text-strong); } .chip.is-on:hover, .chip[aria-pressed="true"]:hover, .chip[aria-selected="true"]:hover { box-shadow: inset 0 0 0 var(--es-line-2) var(--es-accent); } }

  /* ============ 入力欄 ============ */
  .field { display: flex; flex-direction: column; gap: var(--es-space-8); min-width: 0; }
  .field + .field { margin-top: var(--es-space-21); }
  .field__label { font-size: var(--es-text-13); line-height: var(--es-lh-13); font-weight: var(--es-fw-medium); color: var(--es-text); }
  .input {
    width: 100%; min-height: 55px; padding: 0 var(--es-space-13); border-radius: var(--es-radius-m);
    border: var(--es-line-1) solid var(--es-border); background: var(--es-surface); color: var(--es-text-strong);
    font-size: var(--es-text-16); line-height: var(--es-lh-16);
  }
  .input--area { padding: var(--es-space-13); resize: vertical; min-height: calc(26px * 3 + 26px); }
  .input::placeholder { color: var(--es-text-sub); opacity: 1; }
  .input:focus-visible { outline: var(--es-line-2) solid var(--es-focus); outline-offset: 0; border-color: transparent; }
  .field__hint { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .field.is-error .input { border: var(--es-line-2) solid var(--es-text-strong); }
  .field__err { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-strong); font-weight: var(--es-fw-medium); }
  .check { display: inline-flex; align-items: flex-start; gap: var(--es-space-13); min-height: 44px; padding-top: var(--es-space-8); cursor: pointer; }
  .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .check__box { width: 21px; height: 21px; flex: 0 0 auto; border-radius: var(--es-radius-s); border: var(--es-line-1) solid var(--es-border); display: grid; place-items: center; background: var(--es-surface); color: transparent; margin-top: 2px; }
  .check input:checked + .check__box { background: var(--es-accent); border-color: var(--es-accent); color: var(--es-on-accent); }
  .check input:focus-visible + .check__box { outline: var(--es-line-2) solid var(--es-focus); outline-offset: 2px; }
  .field--check.is-error .check__box { border: var(--es-line-2) solid var(--es-text-strong); }

  /* ============ 丸・バッジ・札 ============ */
  .mark {
    --s: 34px; width: var(--s); height: var(--s); flex: 0 0 auto; border-radius: 50%; display: inline-grid; place-items: center;
    font-size: calc(var(--s) * 0.47); font-size: round(nearest, calc(var(--s) * 0.47), 1px); line-height: 1; /* 34 → 16px（字の尺度の上に。4.6） */ font-weight: var(--es-fw-bold); overflow: hidden;
    background: var(--es-color-keshizumi); color: var(--es-color-hakunetsu);
  }
  .mark--sym { background: none; border-radius: 0; object-fit: contain; }
  .mark--wakaba { background: var(--es-color-maker-wakaba); color: var(--es-color-sumi); }
  .mark--rokusho { background: var(--es-color-maker-rokusho); color: var(--es-color-sumi); }
  .mark--benifuji { background: var(--es-color-maker-benifuji); color: var(--es-color-sumi); }
  .mark--momo { background: var(--es-color-maker-momo); color: var(--es-color-sumi); }
  [data-es-theme="light"] .mark--wakaba { background: var(--es-color-maker-wakaba-deep); color: var(--es-color-hakunetsu); }
  [data-es-theme="light"] .mark--rokusho { background: var(--es-color-maker-rokusho-deep); color: var(--es-color-hakunetsu); }
  [data-es-theme="light"] .mark--benifuji { background: var(--es-color-maker-benifuji-deep); color: var(--es-color-hakunetsu); }
  [data-es-theme="light"] .mark--momo { background: var(--es-color-maker-momo-deep); color: var(--es-color-hakunetsu); }
  .badge { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
  /* 役の札・C-4・見本の札：13px・500・高さ 21・左右 8・完全な丸・1px の線（鈍） */
  .tag {
    display: inline-flex; align-items: center; height: 21px; padding: 0 var(--es-space-8); border-radius: var(--es-radius-full);
    box-shadow: inset 0 0 0 var(--es-line-1) var(--es-border); color: var(--es-text-strong);
    font-size: var(--es-text-13); line-height: 1; font-weight: var(--es-fw-medium); white-space: nowrap; flex: 0 0 auto;
  }
  .sample-note { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  /* 熾の点（W-3）：開催中のキャンペーンと、読み込みの間だけ */
  .odot { display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--es-mark); vertical-align: middle; }
  .odot--8 { width: 8px; height: 8px; }
  .odot--13 { width: 13px; height: 13px; }
  .adot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--es-accent); flex: 0 0 auto; }
  /* 読み込み（2.9）：熾の点が 1 つずつ現れて 3 つ並ぶ */
  .loading { display: flex; flex-direction: column; align-items: center; gap: var(--es-space-13); color: var(--es-text-sub); font-size: var(--es-text-13); line-height: var(--es-lh-13); }
  .loading__dots { display: flex; gap: var(--es-space-13); }
  .loading__dots i { width: 13px; height: 13px; border-radius: 50%; background: var(--es-mark); animation: es-dot 1.2s steps(1) infinite; }
  .loading__dots i:nth-child(2) { animation-delay: .3s; } .loading__dots i:nth-child(3) { animation-delay: .6s; }
  @keyframes es-dot { 0% { opacity: 0; } 25%, 100% { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .loading__dots i { animation: none; } }

  /* ============ ヘッダー（2.2） ============ */
  .hdr {
    position: sticky; top: 0; z-index: 50; height: calc(var(--hh) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
    display: flex; align-items: center; gap: var(--es-space-34);
    padding-left: max(calc(var(--es-margin) - 9px), env(safe-area-inset-left)); padding-right: max(calc(var(--es-margin) - 10px), env(safe-area-inset-right));
    border-bottom: var(--es-line-1) solid var(--es-rule);
    transform: translateZ(0); will-change: transform;
  }
  .hdr__logo { display: flex; align-items: center; flex: 0 0 auto; min-height: 44px; }
  .hdr__logo img { height: 55px; width: auto; max-width: none; aspect-ratio: 642.155 / 162; flex: 0 0 auto; }
  .hdr__nav { margin-left: auto; flex: 0 0 auto; } /* 縮めない（縮むと字が道具の下へ潜る。収まらないときは JavaScript が .is-tight → .is-compact） */
  .hdr__nav ul { display: flex; gap: var(--es-space-34); }
  .hdr__a { display: inline-flex; align-items: center; gap: var(--es-space-8); min-height: 44px; font-size: var(--es-text-16); font-weight: var(--es-fw-medium); color: var(--es-text-strong); white-space: nowrap; }
  .hdr__a.is-current > span:last-child { text-decoration: underline; text-decoration-color: var(--es-accent); text-decoration-thickness: 2px; text-underline-offset: 10px; }
  @media (hover: hover) and (pointer: fine) { .hdr__a:hover > span:last-child { text-decoration: underline; text-decoration-color: var(--es-accent); text-decoration-thickness: 2px; text-underline-offset: 10px; } }
  .hdr__tools { display: flex; align-items: center; gap: var(--es-space-8); flex: 0 0 auto; }
  .hdr__sep { width: 1px; height: 34px; background: var(--es-rule); margin-right: var(--es-space-13); }
  .hdr__auth { display: flex; align-items: center; margin-left: var(--es-space-8); }
  .hdr__login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--es-space-8); font-size: var(--es-text-16); color: var(--es-text-strong); white-space: nowrap; }
  .hdr__me { display: inline-flex; align-items: center; gap: var(--es-space-8); min-height: 44px; color: var(--es-text-strong); max-width: 233px; }
  .hdr__mename { font-size: var(--es-text-13); line-height: var(--es-lh-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .hdr__menu { display: none; margin-right: -2px; }
  @media (hover: hover) and (pointer: fine) { .hdr__login:hover { text-decoration: underline; text-underline-offset: 0.25em; } }
  /* 987〜1199：さがす・言語をメニューへ。JavaScript は、字が長い言語で収まらないとき .is-tight（間 21）→ .is-compact（同じ形）を付ける */
  .hdr.is-tight .hdr__nav ul { gap: var(--es-space-21); }
  .hdr.is-tight { gap: var(--es-space-21); }
  @media (min-width: 987px) and (max-width: 1199px) { .hdr:not(.is-fit) .hdr__search, .hdr:not(.is-fit) .hdr__lang, .hdr:not(.is-fit) .hdr__sep { display: none; } .hdr:not(.is-fit) .hdr__menu { display: inline-flex; } }
  .hdr.is-compact .hdr__search, .hdr.is-compact .hdr__lang, .hdr.is-compact .hdr__sep { display: none; }
  .hdr.is-compact .hdr__menu { display: inline-flex; }
  @media (max-width: 986px) {
    .hdr { gap: var(--es-space-8); padding-right: max(calc(var(--es-margin) - 12px), env(safe-area-inset-right)); }
    .hdr__logo img { height: 51px; }
    .hdr__nav, .hdr__sep, .hdr__lang, .hdr__auth { display: none; }
    .hdr__tools { margin-left: auto; gap: 0; }
    .hdr__menu { display: inline-flex; }
    html:not(.js) .hdr__menu { display: none; }
  }
  /* アカウントの小さな一覧 */
  .memenu { position: relative; }
  .memenu__list { position: absolute; right: 0; top: calc(100% + var(--es-space-8)); min-width: 233px; padding: var(--es-space-8); background: var(--es-surface); border: var(--es-line-1) solid var(--es-border); border-radius: var(--es-radius-l); z-index: 60; }
  .memenu__list a, .memenu__list button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 var(--es-space-13); border-radius: var(--es-radius-m); font-size: var(--es-text-16); text-align: left; color: var(--es-text-strong); }
  @media (hover: hover) and (pointer: fine) { .memenu__list a:hover, .memenu__list button:hover { background: color-mix(in srgb, var(--es-text-strong) 10%, transparent); } }
  .memenu__list button[aria-busy="true"], .my-out [data-logout][aria-busy="true"] { opacity: .55; cursor: progress; }
  /* ログアウトが失敗したときの知らせ（ボタンのすぐ下。core.js が作る） */
  .logout-msg { display: block; width: 0; min-width: 100%; margin: var(--es-space-8) 0 0; padding: 0 var(--es-space-13) var(--es-space-8); font-size: var(--es-text-13); line-height: var(--es-lh-13); font-weight: var(--es-fw-medium); color: var(--es-text-strong); text-wrap: pretty; overflow-wrap: anywhere; }
  .my-out .logout-msg { padding: 0; }

  /* ============ 言語の切り替え（2.4） ============ */
  .langsw { position: relative; }
  .langsw__btn { display: inline-flex; align-items: center; gap: var(--es-space-8); min-height: 44px; padding: 0 var(--es-space-8); color: var(--es-text-strong); white-space: nowrap; border-radius: var(--es-radius-full); }
  .langsw__cur { font-size: var(--es-text-13); line-height: var(--es-lh-13); }
  @media (hover: hover) and (pointer: fine) { .langsw__btn:hover .langsw__cur { text-decoration: underline; text-underline-offset: 0.25em; } }
  .langs { color: var(--es-text-strong); }
  .langsw .langs { position: absolute; right: 0; top: calc(100% + var(--es-space-8)); width: 377px; max-width: calc(100vw - 2 * var(--es-margin)); padding: var(--es-space-8); background: var(--es-surface); border: var(--es-line-1) solid var(--es-border); border-radius: var(--es-radius-l); z-index: 60; }
  .langsw--foot .langs { top: auto; bottom: calc(100% + var(--es-space-8)); right: auto; left: 0; }
  .langs__main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .langs__legacy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--es-space-8); padding-top: var(--es-space-8); border-top: var(--es-line-1) solid var(--es-rule); }
  .langs__a { display: flex; align-items: center; gap: var(--es-space-8); min-height: 44px; padding: 0 var(--es-space-13); border-radius: var(--es-radius-m); font-size: var(--es-text-16); white-space: nowrap; }
  .langs__a.is-on { font-weight: var(--es-fw-bold); }
  @media (hover: hover) and (pointer: fine) { .langs__a:hover { background: color-mix(in srgb, var(--es-text-strong) 10%, transparent); } }
  .langs--inline { margin-top: var(--es-space-21); }
  .langs--inline .langs__main, .langs--inline .langs__legacy { display: flex; flex-wrap: wrap; column-gap: var(--es-space-8); }
  .langs--inline .langs__a { font-size: var(--es-text-13); padding: 0 var(--es-space-8); }
  /* 案内の 1 行 */
  .langbar { background: var(--es-color-keshizumi); border-bottom: var(--es-line-1) solid var(--es-rule); }
  .langbar__in { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: var(--es-space-13); }
  .langbar__x { width: 44px; height: 44px; margin-right: -12px; }

  /* ============ メニュー（スマホ。987〜1199 でも） ============ */
  .drawer { position: fixed; inset: 0; z-index: 80; overflow-y: auto; overscroll-behavior: contain; padding: env(safe-area-inset-top) max(var(--es-margin), env(safe-area-inset-right)) calc(var(--es-space-34) + env(safe-area-inset-bottom)) max(var(--es-margin), env(safe-area-inset-left)); }
  .drawer__top { height: var(--hh); display: flex; align-items: center; justify-content: space-between; margin-left: -8px; margin-right: -12px; }
  .drawer__top img { height: 51px; width: auto; max-width: none; aspect-ratio: 642.155 / 162; }
  .drawer__nav { margin-top: var(--es-space-34); }
  .drawer__a { display: flex; align-items: center; gap: var(--es-space-13); min-height: 55px; font-size: var(--es-text-34); line-height: var(--es-lh-34); font-weight: var(--es-fw-bold); color: var(--es-text-strong); }
  .drawer__a.is-current > span:last-child { text-decoration: underline; text-decoration-color: var(--es-accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
  .drawer__sub { margin-top: var(--es-space-34); padding-top: var(--es-space-21); border-top: var(--es-line-1) solid var(--es-rule); }
  .drawer__sub a, .drawer__lang { display: flex; align-items: center; gap: var(--es-space-8); min-height: 44px; width: 100%; font-size: var(--es-text-16); color: var(--es-text-strong); }
  .drawer__lang .ico--16 { margin-left: auto; }
  .drawer__langs { padding-top: var(--es-space-21); }
  .drawer__langs .langs__main, .drawer__langs .langs__legacy { grid-template-columns: minmax(0, 1fr); }
  .drawer__back { margin-bottom: var(--es-space-13); color: var(--es-text-strong); }

  /* ============ フッター（2.3） ============ */
  .ftr { border-top: var(--es-line-1) solid var(--es-rule); padding: var(--es-space-55) 0 calc(var(--es-space-55) + env(safe-area-inset-bottom)); font-size: var(--es-text-13); line-height: var(--es-lh-13); }
  .ftr__in { display: grid; grid-template-columns: repeat(var(--es-columns), minmax(0, 1fr)); column-gap: var(--es-gutter); row-gap: var(--es-space-34); }
  .ftr__op { grid-column: 1 / -1; color: var(--es-text-sub); }
  .ftr__links { grid-column: 1 / -1; }
  .ftr__links ul { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-21); }
  .ftr__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--es-text); }
  .ftr__links .langsw__btn { color: var(--es-text); padding: 0; }
  @media (hover: hover) and (pointer: fine) { .ftr__links a:hover { color: var(--es-text-strong); text-decoration: underline; text-underline-offset: 0.25em; } }
  @media (min-width: 987px) {
    .ftr__op { grid-column: 1 / span 3; }
    .ftr__links { grid-column: 4 / span 5; }
  }
  @media (max-width: 609px) {
    .ftr__links ul { flex-direction: column; align-items: flex-start; }
    .ftr__links { order: -1; }
  }

  /* ============ さがす（2.5） ============ */
  .search { position: fixed; inset: var(--hh) 0 0 0; width: 100%; max-width: none; height: calc(100dvh - var(--hh)); max-height: none; margin: 0; padding: 0; border: 0; overflow-y: auto; overscroll-behavior: contain; }
  .search::backdrop { background: transparent; }
  .search__top { display: flex; align-items: center; gap: var(--es-space-13); padding-top: var(--es-space-34); }
  .search__input { flex: 1 1 auto; min-width: 0; height: 68px; padding: 0; border: 0; border-bottom: var(--es-line-2) solid var(--es-border); border-radius: 0; background: transparent; color: var(--es-text-strong); font-size: var(--es-text-34); line-height: var(--es-lh-34); font-weight: var(--es-fw-bold); }
  .search__input:focus-visible { outline: none; border-bottom-color: var(--es-accent); }
  .search__input::placeholder { color: var(--es-text-sub); opacity: 1; }
  .search__input::-webkit-search-cancel-button { display: none; }
  .search__body { padding-top: var(--es-space-34); padding-bottom: var(--es-space-89); }
  .search__head { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-21); row-gap: var(--es-space-8); margin-bottom: var(--es-space-21); }
  .search__head .label { flex: 1 0 100%; margin-bottom: 0; }
  .search__sub { font-size: var(--es-text-21); line-height: var(--es-lh-21); font-weight: var(--es-fw-bold); color: var(--es-text-strong); margin-right: auto; }
  .search__list { border-top: var(--es-line-1) solid var(--es-rule); }
  .search__list > li { border-bottom: var(--es-line-1) solid var(--es-rule); }
  .search__list > li.is-active { background: var(--es-surface); }
  /* 横に流れる選択肢の行：右端の選択肢を半分見せられないとき（core.js の .is-more）は、右端を薄くして続きを示す */
  .tools__chips.is-more, .cm-bar__scroll.is-more { mask-image: linear-gradient(to right, black calc(100% - var(--es-space-34)), transparent); }
  /* さがすの結果：「遊ぶ」は作品名の列に（右端に離さない） */
  .search__list .rcard { grid-template-columns: 233px minmax(0, 1fr); }
  .search__list .rcard__play { grid-column: 2; justify-self: start; padding: 0; }
  @media (min-width: 610px) and (max-width: 986px) { .search__list .rcard { grid-template-columns: 144px minmax(0, 1fr); } }
  @media (max-width: 609px) { .search__list .rcard { grid-template-columns: 110px minmax(0, 1fr); } }
  .search__err { display: flex; flex-wrap: wrap; align-items: center; gap: var(--es-space-13); margin-top: var(--es-space-21); font-size: var(--es-text-16); line-height: var(--es-lh-16); color: var(--es-text-strong); }
  .search__emptyt { font-size: var(--es-text-26); line-height: var(--es-lh-26); font-weight: var(--es-fw-bold); color: var(--es-text-strong); }
  .search__emptyact { display: flex; flex-wrap: wrap; gap: var(--es-space-13); margin-top: var(--es-space-21); }
  @media (max-width: 609px) { .search__input { font-size: var(--es-text-21); line-height: var(--es-lh-21); height: 55px; } }

  /* ============ 試作のパネル（2.13。本番には入れない） ============ */
  .demo { position: fixed; left: max(var(--es-space-13), env(safe-area-inset-left)); bottom: max(var(--es-space-13), env(safe-area-inset-bottom)); z-index: 70; background: transparent; }
  .demo__btn { height: 34px; padding: 0 var(--es-space-13); border-radius: var(--es-radius-full); background: var(--es-color-keshizumi); color: var(--es-color-hakunetsu); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-color-nibi); font-size: var(--es-text-13); position: relative; }
  .demo__btn::before { content: ""; position: absolute; inset: -5px 0; }
  .demo__bar { display: flex; align-items: center; gap: var(--es-space-8); }
  .demo__now { height: 34px; display: inline-flex; align-items: center; padding: 0 var(--es-space-13); border-radius: var(--es-radius-full); background: var(--es-color-keshizumi); color: var(--es-color-kaihaku); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-color-nibi); font-size: var(--es-text-13); line-height: var(--es-lh-13); white-space: nowrap; }
  .demo__panel { position: absolute; left: 0; bottom: calc(100% + var(--es-space-8)); width: 260px; padding: var(--es-space-13); background: var(--es-color-keshizumi); border: var(--es-line-1) solid var(--es-color-nibi); border-radius: var(--es-radius-l); font-size: var(--es-text-13); line-height: var(--es-lh-13); }
  .demo__panel fieldset + fieldset { margin-top: var(--es-space-13); padding-top: var(--es-space-13); border-top: var(--es-line-1) solid var(--es-color-ibushi); }
  .demo__panel legend { color: var(--es-color-hai); margin-bottom: var(--es-space-5); }
  .demo__panel label { display: flex; align-items: center; gap: var(--es-space-8); min-height: 34px; cursor: pointer; }
  .demo__panel input { accent-color: var(--es-color-subaru); margin: 0; }
  .fxbar { padding: var(--es-space-5) var(--es-margin); font-size: var(--es-text-13); line-height: var(--es-lh-13); background: var(--es-color-keshizumi); color: var(--es-color-hakunetsu); }

  /* ============ 文書の型（3.11） ============ */
  .doc { display: grid; grid-template-columns: repeat(var(--es-columns), minmax(0, 1fr)); column-gap: var(--es-gutter); row-gap: var(--es-space-34); }
  .doc__side, .doc__body { grid-column: 1 / -1; min-width: 0; }
  .doc__date { margin-top: var(--es-space-13); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .doc__tocwrap { margin-top: var(--es-space-34); }
  .doc__tocsum { display: flex; align-items: center; min-height: 44px; font-weight: var(--es-fw-bold); cursor: pointer; }
  .doc__tocwrap:not([open]) > .doc__toc { display: none; } /* 閉じている間は中身を消す（閉じた details の中身が、本文の上に重なって数えられないように） */
  .doc__toc ol { border-left: var(--es-line-1) solid var(--es-rule); }
  .doc__toc a { display: flex; align-items: center; min-height: 44px; padding-left: var(--es-space-13); margin-left: -1px; border-left: var(--es-line-2) solid transparent; }
  .doc__toc a.is-on, .doc__toc a[aria-current="true"] { border-left-color: var(--es-accent); color: var(--es-text-strong); }
  @media (min-width: 987px) {
    .doc__side { grid-column: 1 / span 3; position: sticky; top: calc(var(--hh) + var(--es-space-34)); align-self: start; }
    .doc__body { grid-column: 4 / span 5; }
    .doc__tocsum { display: none; }
  }
}

/* ===================== 作品の札・壁・看板（2.7） ===================== */
@layer components {
  /* ポスターの札：2:3・切らない・角は丸めない */
  .pcard { position: relative; display: flex; flex-direction: column; width: var(--w, auto); min-width: 0; outline-offset: 2px; }
  .pcard__art { display: block; }
  .pcard__art img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--es-surface); }
  .pcard__name { margin-top: var(--es-space-8); font-size: var(--es-text-13); line-height: var(--es-lh-13); font-weight: var(--es-fw-medium); color: var(--es-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pcard__maker { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pcard .tag, .cell .tag { background: var(--es-color-sumi); color: var(--es-color-hakunetsu); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-color-nibi); }
  @media (hover: hover) and (pointer: fine) { .pcard:hover .pcard__art img { outline: var(--es-line-2) solid var(--es-accent); outline-offset: -2px; } }
  .pcard:focus-visible { outline: none; } .pcard:focus-visible .pcard__art img { outline: var(--es-line-2) solid var(--es-accent); outline-offset: -2px; }

  /* 横長の札：左に 16:9（幅 233）、右に名前・作り手・ひとこと。行の全体がメインステージへ、「遊ぶ」はプレイ画面へ */
  .rcard { position: relative; display: grid; grid-template-columns: 233px minmax(0, 1fr) auto; column-gap: var(--es-space-21); align-items: center; padding: var(--es-space-13) 0; }
  .rcard__img { width: 233px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--es-surface); }
  .rcard__body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--es-space-3); }
  .rcard__name { font-size: var(--es-text-21); line-height: var(--es-lh-21); }
  .rcard__link::after { content: ""; position: absolute; inset: 0; }
  .rcard__link:focus-visible { outline: none; } .rcard:has(.rcard__link:focus-visible) { outline: var(--es-line-2) solid var(--es-focus); outline-offset: 2px; }
  .rcard__meta { display: flex; flex-wrap: wrap; column-gap: var(--es-space-13); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .rcard__meta > span { min-width: 0; overflow-wrap: break-word; } /* 塊が行より長いときだけ折る（anywhere は語の途中で折る） */
  .rcard__meta > span:first-child { white-space: nowrap; }
  .rcard__line { font-size: var(--es-text-16); line-height: var(--es-lh-16); color: var(--es-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .rcard .cslot { margin-top: var(--es-space-5); }
  .rcard__play { position: relative; z-index: 1; padding: 0 var(--es-space-8); }
  @media (hover: hover) and (pointer: fine) { .rcard:hover .rcard__name a { color: var(--es-accent); } }
  @media (min-width: 610px) and (max-width: 986px) { .rcard { grid-template-columns: 144px minmax(0, 1fr) auto; } .rcard__img { width: 144px; } .rcard__name { font-size: var(--es-text-16); line-height: var(--es-lh-16); } }
  @media (max-width: 609px) {
    .rcard { grid-template-columns: 110px minmax(0, 1fr); column-gap: var(--es-space-13); row-gap: 0; }
    .rcard__img { width: 110px; }
    .rcard__name { font-size: var(--es-text-16); line-height: var(--es-lh-16); }
    .rcard__line { font-size: var(--es-text-13); line-height: var(--es-lh-13); }
    .rcard__play { grid-column: 2; justify-self: start; padding: 0; }
  }

  /* 壁：すき間 1px で敷きつめる。配置は生成のとき（と並べ替えたとき）に計算した --p8・--p5・--p3（grid-area） */
  .board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--es-bg); }
  .cell { position: relative; min-width: 0; grid-area: var(--p3, auto); background: var(--es-bg); }
  @media (max-width: 609px) { .cell.is-off-3 { display: none; } }
  @media (min-width: 610px) and (max-width: 986px) { .board { grid-template-columns: repeat(5, minmax(0, 1fr)); } .cell { grid-area: var(--p5, auto); } .cell.is-off-5 { display: none; } }
  @media (min-width: 987px) { .board { grid-template-columns: repeat(8, minmax(0, 1fr)); } .cell { grid-area: var(--p8, auto); } .cell.is-off-8 { display: none; } }
  .cell__link { display: flex; flex-direction: column; height: 100%; outline-offset: -2px; }
  .cell__img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--es-surface); }
  .cell__tag { display: none; flex-direction: column; justify-content: center; min-width: 0; padding: 0 var(--es-space-13); }
  .cell__tag--s { display: flex; height: 55px; }
  /* 390（3 列）：作品名は 2 行まで（「…」を減らす）。札の高さは 2 行の名前＋作り手 */
  @media (max-width: 609px) {
    .cell__tag--s { height: auto; min-height: 55px; padding-top: var(--es-space-5); padding-bottom: var(--es-space-5); justify-content: flex-start; }
    .cell__tag--s .cell__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  }
  .cell__name { font-size: var(--es-text-13); line-height: var(--es-lh-13); font-weight: var(--es-fw-medium); color: var(--es-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cell__maker { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cell__name--l { font-size: var(--es-text-26); line-height: 32px; font-weight: var(--es-fw-bold); }
  .cell__meta { display: flex; column-gap: var(--es-space-21); font-size: var(--es-text-13); line-height: 18px; color: var(--es-text-sub); white-space: nowrap; overflow: hidden; min-width: 0; }
  .cell__meta > span { flex: 0 0 auto; } .cell__meta > span + span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .cell__line { font-size: var(--es-text-16); line-height: 22px; color: var(--es-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 大きい枠（列の数ごとに is-big-8・is-big-5・is-big-3） */
  @media (max-width: 609px) { .cell.is-big-3 .cell__tag--s { display: none; } .cell.is-big-3 .cell__tag:not(.cell__tag--s) { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: var(--es-space-5) var(--es-space-13); } .cell.is-big-3 .cell__name--l { font-size: var(--es-text-21); line-height: 28px; } }
  @media (min-width: 610px) and (max-width: 986px) { .cell.is-big-5 .cell__tag--s { display: none; } .cell.is-big-5 .cell__tag:not(.cell__tag--s) { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: var(--es-space-5) var(--es-space-13); } }
  @media (min-width: 987px) { .cell.is-big-8 .cell__tag--s { display: none; } .cell.is-big-8 .cell__tag:not(.cell__tag--s) { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: var(--es-space-5) var(--es-space-13); } }
  @media (hover: hover) and (pointer: fine) { .cell__link:hover, .next__link:hover { outline: var(--es-line-2) solid var(--es-accent); outline-offset: -2px; } }
  /* 最後の枠：次の作品の場所（熾の点は置かない） */
  .cell--next { background: var(--es-bg); }
  .next__link { height: 100%; min-height: 144px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--es-space-8); padding: var(--es-space-21); background: var(--es-surface); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-border); outline-offset: -2px; }
  .next__link .label { margin-bottom: 0; }
  .next__t { font-size: var(--es-text-21); line-height: var(--es-lh-21); font-weight: var(--es-fw-bold); color: var(--es-text-strong); }
  /* 語（.wd）の切れ目でだけ折り返す。広い枠は 26px */
  .next__t .w, .next__go .w { display: inline; white-space: normal; }
  @media (max-width: 609px) { .cell--next.is-wide-3 .next__t { font-size: var(--es-text-26); line-height: var(--es-lh-26); } }
  @media (min-width: 610px) and (max-width: 986px) { .cell--next.is-wide-5 .next__t { font-size: var(--es-text-26); line-height: var(--es-lh-26); } }
  @media (min-width: 987px) { .cell--next.is-wide-8 .next__t { font-size: var(--es-text-26); line-height: var(--es-lh-26); } }
  .next__go { min-height: 34px; }
  @media (max-width: 609px) { .cell--next.is-one-3 .next__t { font-size: var(--es-text-13); line-height: var(--es-lh-13); } .cell--next.is-one-3 .next__t .w, .cell--next.is-one-3 .next__go .w { display: inline; white-space: normal; } .cell--next.is-one-3 .next__go { font-size: var(--es-text-13); } .cell--next.is-one-3 .next__link { padding: var(--es-space-8); } .cell--next.is-one-3 .label::after { display: none; } .cell--next.is-wide-3 .next__link { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-21); } }
  @media (min-width: 610px) and (max-width: 986px) { .cell--next.is-one-5 .next__t { font-size: var(--es-text-13); line-height: var(--es-lh-13); } .cell--next.is-one-5 .next__t .w, .cell--next.is-one-5 .next__go .w { display: inline; white-space: normal; } .cell--next.is-one-5 .next__link { padding: var(--es-space-8); } .cell--next.is-one-5 .label::after { display: none; } .cell--next.is-one-5 .next__go { font-size: var(--es-text-13); } .cell--next.is-wide-5 .next__link { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-34); } }
  @media (min-width: 987px) { .cell--next.is-one-8 .next__t { font-size: var(--es-text-16); line-height: var(--es-lh-16); } .cell--next.is-one-8 .next__link { padding: var(--es-space-13); } .cell--next.is-one-8 .next__t .w, .cell--next.is-one-8 .next__go .w { display: inline; white-space: normal; } .cell--next.is-one-8 .next__go { font-size: var(--es-text-13); } .cell--next.is-wide-8 .next__link { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-34); } }
  .cell--next .label { flex: 0 0 auto; }
  /* 2 行以上の高さの大きい箱（試験用データ one の 1440 など）：空の箱に見せないよう、字を箱の大きさに合わせて上げる（G-C R2 の 10）。字は句読点の塊で折る */
  @media (max-width: 609px) { .cell--next.is-tall-3 .next__link { flex-direction: column; align-items: flex-start; } .cell--next.is-tall-3 .next__t { font-size: var(--es-text-34); line-height: var(--es-lh-34); } }
  @media (min-width: 610px) and (max-width: 986px) { .cell--next.is-tall-5 .next__link { flex-direction: column; align-items: flex-start; padding: var(--es-space-34); } .cell--next.is-tall-5 .next__t { font-size: var(--es-text-42); line-height: var(--es-lh-42); } }
  @media (min-width: 987px) {
    .cell--next.is-tall-8 .next__link { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: var(--es-space-13); padding: var(--es-space-34); }
    .cell--next.is-tall-8 .next__t { font-size: var(--es-text-42); line-height: var(--es-lh-42); }
    .cell--next.is-huge-8 .next__t { font-size: var(--es-text-55); line-height: var(--es-lh-55); }
    .cell--next.is-tall-8 .next__go { font-size: var(--es-text-21); }
  }
  @media (max-width: 609px) { .cell--next.is-tall-3 .next__t .w { display: inline-block; white-space: nowrap; } }
  @media (min-width: 610px) and (max-width: 986px) { .cell--next.is-tall-5 .next__t .w { display: inline-block; white-space: nowrap; } }
  @media (min-width: 987px) { .cell--next.is-tall-8 .next__t .w { display: inline-block; white-space: nowrap; } }

  /* 看板（E-9・E-12）：文字なしの絵を全面に切り、左と下に幕。高さは各ページで --bb-h を上書き */
  .bb { position: relative; isolation: isolate; height: var(--bb-h, 520px); min-height: 420px; overflow: clip; background: var(--es-color-sumi); color: var(--es-color-hakunetsu); }
  .bb__art { position: absolute; inset: 0; z-index: -2; }
  .bb__art img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--op, 70% 30%); }
  .bb__veil { position: absolute; inset: 0; z-index: -1; background:
      linear-gradient(90deg, color-mix(in srgb, var(--es-color-sumi) 92%, transparent) 0%, color-mix(in srgb, var(--es-color-sumi) 60%, transparent) 34%, color-mix(in srgb, var(--es-color-sumi) 0%, transparent) 62%),
      linear-gradient(0deg, color-mix(in srgb, var(--es-color-sumi) 85%, transparent) 0, color-mix(in srgb, var(--es-color-sumi) 0%, transparent) 144px); }
  .bb__info { position: absolute; left: max(var(--es-margin), env(safe-area-inset-left)); bottom: var(--es-space-55); width: min(610px, 50vw); display: flex; flex-direction: column; align-items: flex-start; }
  .bb__info .label { color: var(--es-color-hakunetsu); margin-bottom: var(--es-space-13); }
  .bb__title { width: 420px; max-width: 100%; }
  .bb__logo { width: auto; height: auto; max-width: 100%; max-height: 170px; object-fit: contain; object-position: left bottom; }
  .bb__name { display: block; font-size: var(--es-text-55); line-height: var(--es-lh-55); color: var(--es-color-hakunetsu); }
  .bb__tag { margin-top: var(--es-space-21); font-size: var(--es-text-21); line-height: var(--es-lh-21); color: var(--es-color-hakunetsu); }
  .bb__meta { margin-top: var(--es-space-8); display: flex; flex-wrap: wrap; column-gap: var(--es-space-21); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-color-kaihaku); }
  .bb__meta span { white-space: nowrap; }
  .bb__act { margin-top: var(--es-space-34); display: flex; flex-wrap: wrap; gap: var(--es-space-13); }
  .bb .btn--line { color: var(--es-color-hakunetsu); }
  @media (max-width: 986px) {
    .bb { height: var(--bb-h-m, 420px); }
    .bb__art img { object-position: var(--mop, 50% 30%); }
    .bb__veil { background: linear-gradient(0deg, var(--es-color-sumi) 0%, color-mix(in srgb, var(--es-color-sumi) 90%, transparent) 30%, color-mix(in srgb, var(--es-color-sumi) 0%, transparent) 233px); }
    .bb__info { left: var(--es-margin); right: var(--es-margin); width: auto; bottom: var(--es-space-21); align-items: stretch; }
    .bb__title { width: 233px; }
    .bb__logo { max-height: 96px; }
    .bb__name { font-size: var(--es-text-34); line-height: var(--es-lh-34); }
    .bb__tag { font-size: var(--es-text-16); line-height: var(--es-lh-16); margin-top: var(--es-space-13); }
    .bb__act { margin-top: var(--es-space-21); flex-direction: column; gap: var(--es-space-8); }
    .bb__act .btn { width: 100%; }
  }
}

/* ===================== キャンペーンの部品 C-1〜C-5（2.6） ===================== */
@layer components {
  .cslot { display: contents; }
  .cnote { margin-top: var(--es-space-8); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  /* C-1 札（1 行） */
  .cpill {
    display: inline-flex; align-items: center; gap: var(--es-space-13); max-width: 100%; min-height: 44px; padding: 0 var(--es-space-13) 0 var(--es-space-21);
    border-radius: var(--es-radius-full); box-shadow: inset 0 0 0 var(--es-line-1) var(--es-color-hakunetsu); color: var(--es-color-hakunetsu);
  }
  .cpill__state { font-size: var(--es-text-13); line-height: 1; font-weight: var(--es-fw-bold); white-space: nowrap; }
  .cpill__title { font-size: var(--es-text-16); line-height: var(--es-lh-16); font-weight: var(--es-fw-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
  .cpill__time { font-size: var(--es-text-16); line-height: var(--es-lh-16); white-space: nowrap; font-family: var(--es-font-num); font-variant-numeric: tabular-nums; }
  @media (hover: hover) and (pointer: fine) { .cpill:hover { background: color-mix(in srgb, var(--es-color-hakunetsu) 10%, transparent); } }
  @media (max-width: 609px) {
    .cpill { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "s t c" "n n c"; column-gap: var(--es-space-13); row-gap: 0; align-items: center; min-height: 0; max-height: 68px; width: 100%; padding: var(--es-space-8) var(--es-space-13) var(--es-space-8) var(--es-space-21); border-radius: var(--es-radius-l); }
    .cpill__state { grid-area: s; } .cpill__time { grid-area: t; font-size: var(--es-text-13); } .cpill__title { grid-area: n; } .cpill > .ico { grid-area: c; }
  }

  /* C-2 看板（1 区画）：左 5 列に絵、右 3 列に中身 */
  .cfeat { display: grid; grid-template-columns: repeat(var(--es-columns), minmax(0, 1fr)); column-gap: var(--es-gutter); row-gap: var(--es-space-21); align-items: start; }
  .cfeat__art, .cfeat__body { grid-column: 1 / -1; min-width: 0; }
  .cfeat__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--es-surface); }
  .cfeat__body { display: flex; flex-direction: column; align-items: flex-start; }
  .cfeat__body .label { width: 100%; }
  .cfeat__title { font-size: var(--es-text-26); line-height: var(--es-lh-26); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .cfeat__period { margin-top: var(--es-space-13); font-size: var(--es-text-16); line-height: var(--es-lh-16); color: var(--es-text); }
  .cfeat__k { margin-top: var(--es-space-21); font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .cfeat__remain { font-family: var(--es-font-num); font-variant-numeric: tabular-nums; font-size: var(--es-text-42); line-height: var(--es-lh-42); font-weight: var(--es-fw-bold); color: var(--es-text-strong); text-wrap: balance; } /* nowrap にしない（「3 araw 7 oras」など訳で長くなると列からはみ出す）。折れるときは釣り合いよく */
  .cfeat__game { display: flex; align-items: center; gap: var(--es-space-13); margin-top: var(--es-space-21); min-width: 0; max-width: 100%; }
  .cfeat__game img { width: 55px; aspect-ratio: 2 / 3; flex: 0 0 auto; }
  .cfeat__game > span { display: flex; flex-direction: column; min-width: 0; }
  .cfeat__gname { font-size: var(--es-text-16); line-height: var(--es-lh-16); font-weight: var(--es-fw-bold); color: var(--es-text-strong); overflow-wrap: anywhere; }
  .cfeat__gmaker { font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-text-sub); }
  .cfeat__act { margin-top: var(--es-space-34); display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-21); row-gap: var(--es-space-8); }
  @media (min-width: 987px) {
    .cfeat__art { grid-column: 1 / span 5; }
    .cfeat__body { grid-column: 6 / span 3; }
    .cfeat__title { font-size: var(--es-text-34); line-height: var(--es-lh-34); }
    .cfeat__remain { font-size: var(--es-text-55); line-height: var(--es-lh-55); }
  }
  @media (max-width: 430px) { .cfeat__remain { font-size: var(--es-text-34); line-height: var(--es-lh-34); } }
  @media (max-width: 609px) { .cfeat__act { flex-direction: column; align-items: stretch; } .cfeat__act .btn { width: 100%; } }

  /* C-3 帯：高さ 89・消炭・上下に燻の 1px */
  /* 入力の画面：cforms.js が準備を終えるまでフォームを出さない（JS なし・読み込みの失敗で、入力が送られる形にしない） */
  form[data-cform]:not(.is-ready) { display: none; }
  .cform-need { font-size: var(--es-text-16); line-height: var(--es-lh-16); color: var(--es-text-sub); }
  .cfeat__go { display: contents; } /* ログインの状態ごとの主ボタンの入れ物（並びには加わらない） */
  .cband { background: var(--es-color-keshizumi); border-top: var(--es-line-1) solid var(--es-color-ibushi); border-bottom: var(--es-line-1) solid var(--es-color-ibushi); color: var(--es-color-kaihaku); }
  .cband__in { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-21); row-gap: var(--es-space-8); min-height: 89px; padding-top: var(--es-space-13); padding-bottom: var(--es-space-13); }
  .cband__state { display: inline-flex; align-items: center; gap: var(--es-space-8); font-size: var(--es-text-13); line-height: var(--es-lh-13); font-weight: var(--es-fw-bold); color: var(--es-color-hakunetsu); white-space: nowrap; }
  .cband__state > span { display: inline-flex; align-items: center; gap: var(--es-space-8); }
  .cband__title { font-size: var(--es-text-21); line-height: var(--es-lh-21); font-weight: var(--es-fw-bold); color: var(--es-color-hakunetsu); min-width: 0; }
  .cband__time { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--es-space-13); }
  .cband__until { font-size: var(--es-text-16); line-height: var(--es-lh-16); white-space: nowrap; }
  .cband__remain { font-size: var(--es-text-21); line-height: var(--es-lh-21); color: var(--es-color-hakunetsu); white-space: nowrap; }
  .cband__closed { font-size: var(--es-text-16); line-height: var(--es-lh-16); flex: 1 1 377px; min-width: 0; }
  .cband__act { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--es-space-21); }
  .cband .btn--line { color: var(--es-color-hakunetsu); }
  .cband .tlink { color: var(--es-color-subaru); }
  .cband .cnote { flex: 1 0 100%; text-align: right; color: var(--es-color-hai); margin-top: 0; }
  @media (max-width: 609px) {
    .cband__in { flex-direction: column; align-items: flex-start; }
    .cband__closed { flex: 0 0 auto; } /* 縦に積むと flex-basis 377px が高さになり、帯が伸びるため（横に並ぶ 610 以上だけ幅として効かせる） */
    .cband__title { font-size: var(--es-text-16); line-height: var(--es-lh-16); }
    .cband__act { margin-left: 0; width: 100%; flex-direction: column; align-items: stretch; }
    .cband__act .btn { width: 100%; }
    .cband .cnote { text-align: left; }
  }

  /* C-5 細い表示 */
  .cmini { display: inline-flex; align-items: center; gap: var(--es-space-8); min-height: 44px; min-width: 0; max-width: 100%; font-size: var(--es-text-13); line-height: var(--es-lh-13); color: var(--es-color-hakunetsu); }
  .cmini__state { font-weight: var(--es-fw-bold); white-space: nowrap; }
  .cmini__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .cmini .num { white-space: nowrap; }
  @media (hover: hover) and (pointer: fine) { .cmini:hover .cmini__title { text-decoration: underline; text-underline-offset: 0.25em; } }
}

/* 作品名・ジャンル（G-C R2 の 1）：折ってよい所は shared.js の nameParts（空白・句読点・中黒・ハイフンの後だけ）。
   塊（.gw）の中では折らず、入れ物の幅を越える塊はその行を「…」で止める。gname--2 は 2 行まで（3 行目に入るものは 2 行目の末尾を「…」） */
@layer components {
  .gname { overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; word-break: normal; line-break: strict; }
  .gname .gw { white-space: nowrap; }
  .gname--2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
  /* 390 の大きい枠：名前は 2 行まで。名前と札が 1 行に入らないときは、札を 2 行目へ（名前を札で削らない） */
  @media (max-width: 609px) {
    .cell.is-big-3 .cell__row { flex-wrap: wrap; row-gap: var(--es-space-3); }
    .cell.is-big-3 .cell__name--l { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  }
  @media (min-width: 610px) { .cell__row { flex-wrap: wrap; row-gap: var(--es-space-3); } .cell__tag--s .cell__row { flex-wrap: nowrap; } }
}

/* 作品の札・壁の枠の C-4（開催中・まもなく）：作品の絵に重ねず、名前の行の右に置く（7.1・G-2。R1 で変更） */
@layer components {
  .pcard__row, .cell__row { display: flex; align-items: center; gap: var(--es-space-8); min-width: 0; }
  .pcard__row { margin-top: var(--es-space-8); }
  .pcard__row > .pcard__name { margin-top: 0; flex: 0 1 auto; min-width: 0; }
  .cell__row > .cell__name { flex: 0 1 auto; min-width: 0; }
  .pcard__row .tag, .cell__row .tag { flex: 0 0 auto; }
  /* 細い枠で札の訳が長いとき：名前を 2.5 字ぶんは残し、札の方を … で省く（札が隣の枠へ出ないように） */
  .cell__sub { display: flex; align-items: center; min-width: 0; }
  .cell__sub > .cslot:has(.tag:not([hidden])) + .cell__maker { display: none; }
  @media (max-width: 1279px) { .cell__tag--s { padding-left: var(--es-space-8); padding-right: var(--es-space-8); } } /* 細い枠（8 列の 987〜・5 列）：長い訳の札が切れないように、左右を 8 に */
  .cell__sub > .cell__maker { min-width: 0; }
  .cell__sub .tag { display: block; line-height: 21px; padding: 0 var(--es-space-5); flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
