/* ================================================================ 新しいデザイン (2026-11-29)
   html[data-design="2"] のときだけ効く。外すと今までの画面 (app.css / web.css / extras.css) のまま。
   方針: 影の付いた丸いカードを並べるのをやめて、細い線・左の太い色の線・はっきりした文字の大小で区切る。
   チームの色 (--brand / --brand2) は design2.js が入れる。ブランドがオフのチームは 緑と紺 */
html[data-design="2"] {
  --radius: 6px; --shadow: none;
  --bg: #f3f4f7; --line: #e2e5eb; --soft: #f1f2f5;
  --num: "Bahnschrift", "DIN Alternate", "Barlow", "Arial Narrow", "BIZ UDPGothic", sans-serif;   /* 数字用 (幅のそろった細めの太字) */
  --jp-bold: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "BIZ UDPMincho", serif;
}

/* ---------------------------------------------------------------- 上の帯 */
html[data-design="2"] .topbar.d2-top { display: block; position: sticky; top: 0; z-index: 20; height: auto; min-height: 0; padding: 0;
  background: var(--panel); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: none; }
html[data-design="2"] body[data-page="home"] .topbar.d2-top { position: relative; }
/* 試合一覧以外: いちばん上にチームの色の細い縞 */
html[data-design="2"] .topbar.d2-top::before { content: ""; display: block; height: 5px;
  background: repeating-linear-gradient(135deg, var(--brand) 0 16px, var(--brand2) 16px 32px); }
html[data-design="2"] body[data-page="home"] .topbar.d2-top::before { display: none; }

/* 大きい帯 (試合一覧だけ) */
.d2-band { display: none; position: relative; height: 236px; overflow: hidden; background: var(--panel); }
html[data-design="2"] body[data-page="home"] .d2-band { display: block; }
.d2-corner { position: absolute; left: 0; top: 0; width: 190px; height: 190px; pointer-events: none;
  background: linear-gradient(135deg, transparent 0 34px, var(--brand) 34px 50px, transparent 50px 58px, var(--brand2) 58px 74px,
    transparent 74px 82px, #b9bec8 82px 88px, transparent 88px 95px, #d3d6dd 95px 99px, transparent 99px); }
.d2-art { position: absolute; right: 0; top: 0; bottom: 0; width: 54%; clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  background: repeating-linear-gradient(135deg, var(--brand) 0 58px, var(--brand2) 58px 116px); color: #fff; }
.d2-art svg { position: absolute; right: 2%; top: 50%; width: min(600px, 88%); height: auto; transform: translateY(-50%) rotate(-7deg); opacity: .92; }
.d2-id { position: relative; z-index: 1; display: flex; align-items: center; gap: 30px; height: 100%; padding: 22px 56px 22px 72px;
  color: var(--ink); text-decoration: none; width: max-content; max-width: 60%; }
.d2-id .d2-crest { height: 140px; flex: none; display: flex; align-items: center; justify-content: center; }
.d2-id .d2-crest img { height: 140px; width: auto; max-width: 170px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.22)); }
.d2-crest-txt { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: var(--brand2); color: var(--brand2-ink, #fff);
  font: 900 36px/1 var(--jp-bold); border: 5px solid var(--panel); box-shadow: 0 0 0 2px var(--brand2), 0 6px 14px rgba(0,0,0,.2); }
.d2-txt { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.d2-pill { display: inline-block; padding: 4px 16px; border-radius: 999px; background: var(--brand); color: var(--brand-ink);
  font: 700 12px/1.4 var(--num); letter-spacing: .12em; }
.d2-team { font: 900 46px/1.15 var(--jp-bold); letter-spacing: .05em; color: var(--ink); white-space: nowrap; overflow: hidden; max-width: 100%; }
.d2-tag { display: flex; align-items: center; gap: 16px; font: 600 24px/1.3 var(--mincho); letter-spacing: .12em; color: #2b2f38; }
.d2-tag::before, .d2-tag::after { content: ""; width: 64px; height: 1px; background: currentColor; opacity: .6; }

/* メニューの行 */
.d2-row { display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 24px; position: relative; }
html[data-design="2"] body[data-page="home"] .d2-row { border-top: 1px solid var(--line); padding-left: 56px; }
.d2-mini { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; color: var(--ink); max-width: 220px; }
.d2-mini b { font: 900 15px/1.2 var(--jp-bold); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-mini .d2-crest { height: 38px; display: flex; align-items: center; justify-content: center; flex: none; }
.d2-mini .d2-crest img { height: 38px; width: auto; max-width: 60px; object-fit: contain; }
.d2-mini .d2-crest-txt { width: 34px; height: 34px; font-size: 13px; border-width: 2px; box-shadow: 0 0 0 1px var(--brand2); }
html[data-design="2"] body[data-page="home"] .d2-mini { display: none; }

html[data-design="2"] .d2-row .ed-nav { display: flex; flex-wrap: nowrap; gap: 2px; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; align-self: stretch; }
html[data-design="2"] .d2-row .ed-nav::-webkit-scrollbar { display: none; }
html[data-design="2"] .d2-row .ed-nav a { display: flex; align-items: center; position: relative; padding: 0 14px; border-radius: 0; background: none;
  color: #3a404c; font: 700 15px/1 var(--jp-bold); letter-spacing: .03em; white-space: nowrap; opacity: 1; }
html[data-design="2"] .d2-row .ed-nav a:hover { color: var(--brand); background: none; }
html[data-design="2"] .d2-row .ed-nav a.on { color: var(--brand); background: none; }
html[data-design="2"] .d2-row .ed-nav a.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 4px; border-radius: 3px 3px 0 0;
  background: var(--brand); box-shadow: 0 -2px 10px color-mix(in srgb, var(--brand) 45%, transparent); }
html[data-design="2"] .d2-row .ed-nav a.on::before { display: none; }
@media (max-width: 1440px) { html[data-design="2"] .d2-row .ed-nav a { padding: 0 10px; font-size: 14px; } html[data-design="2"] .d2-row { gap: 10px; padding: 0 16px; } }
@media (max-width: 1180px) { html[data-design="2"] .d2-row .ed-nav a { padding: 0 7px; font-size: 13px; letter-spacing: 0; } }
html[data-design="2"] .d2-row .ed-user { margin-left: 0; color: var(--ink); flex: none; }
html[data-design="2"] .d2-row .ed-tenant { display: none; }   /* チーム名は左に出ている */
html[data-design="2"] .d2-row .ed-badge { background: var(--brand); color: var(--brand-ink); }
html[data-design="2"] .d2-row .fs-btn, html[data-design="2"] .d2-row .x-burger { height: 32px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; }

/* ---------------------------------------------------------------- 共通の部品: 影と丸みを減らして、線で区切る */
html[data-design="2"] .panel { border-radius: 6px; box-shadow: none; border: 1px solid var(--line); }
html[data-design="2"] main h2 { font: 800 18px/1.4 var(--jp-bold); letter-spacing: .02em; }
html[data-design="2"] .panel > h2:first-child { display: flex; align-items: center; gap: 10px; }
html[data-design="2"] .panel > h2:first-child::before { content: ""; width: 4px; height: 1.05em; border-radius: 2px; background: var(--brand); flex: none; }
html[data-design="2"] .btn { border-radius: 6px; }
html[data-design="2"] .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
html[data-design="2"] .seg { border-radius: 6px; }
html[data-design="2"] .seg button.on, html[data-design="2"] .chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
html[data-design="2"] input[type=text], html[data-design="2"] input[type=number], html[data-design="2"] input[type=url],
html[data-design="2"] select, html[data-design="2"] textarea { border-radius: 6px; }
html[data-design="2"] :is(input, select, textarea):focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 1px; border-color: var(--brand); }
html[data-design="2"] .tab { font-weight: 700; }
html[data-design="2"] .tab.on { color: var(--brand); border-bottom: 3px solid var(--brand); box-shadow: none; background: none; }
html[data-design="2"] .card:hover { border-color: var(--brand); }
/* 数字: 幅のそろった太めの字 */
html[data-design="2"] .kpi .v { font-family: var(--num); font-size: 28px; font-weight: 700; letter-spacing: .01em; }
html[data-design="2"] table.t td { font-family: var(--num); }
html[data-design="2"] table.t th { font-size: 12px; letter-spacing: .03em; }

/* ---------------------------------------------------------------- ホーム */
.d2-home { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.d2-main, .d2-side { display: grid; gap: 22px; min-width: 0; }
html[data-design="2"] .b-matches { margin: 0; }
html[data-design="2"] .b-sec { font: 800 18px/1.4 var(--jp-bold); color: var(--ink); letter-spacing: .02em; margin-bottom: 10px; }
html[data-design="2"] .b-mrow { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
html[data-design="2"] .b-mcard { position: relative; gap: 4px; padding: 14px 16px 14px 22px; border-radius: 6px; border: 1px solid var(--line); border-top: 1px solid var(--line);
  background: var(--panel); transition: border-color .15s, transform .15s; overflow: hidden; }
html[data-design="2"] .b-mcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--brand); }
html[data-design="2"] .b-mcard:hover { border-color: var(--brand); transform: none; }
html[data-design="2"] .b-mcard .b-mcat { order: -1; justify-self: start; padding: 1px 8px; border-radius: 3px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; }
html[data-design="2"] .b-mcard .b-mcat:empty { display: none; }
html[data-design="2"] .b-mcard .b-mvs { margin-top: 6px; font-size: 16px; }
html[data-design="2"] .b-vs { font: 800 22px/1 var(--num); color: var(--ink); letter-spacing: .04em; }
html[data-design="2"] .b-mcard .b-mdate { font: 700 14px/1.4 var(--num); color: var(--muted); margin-top: 2px; }
/* 新しい試合: 左に太い線 */
html[data-design="2"] .d2-main > .panel { position: relative; padding: 20px 22px 20px 26px; overflow: hidden; }
html[data-design="2"] .d2-main > .panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--brand); }
html[data-design="2"] .d2-main > .panel > h2:first-child::before { display: none; }
/* 右の列 */
.d2-guide { padding: 0; }
.d2-guide summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; padding: 14px 16px; font: 800 16px/1.4 var(--jp-bold); }
.d2-guide summary::-webkit-details-marker { display: none; }
.d2-guide summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
.d2-guide[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.d2-guide summary .sub { font-weight: 400; }
.d2-guide > :not(summary) { margin: 0 16px 14px; }
.d2-kpi { display: grid; gap: 12px; padding: 16px 18px; }
.d2-h { font: 800 16px/1.4 var(--jp-bold); }
.d2-kgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
.d2-k { display: grid; justify-items: center; gap: 2px; text-align: center; }
.d2-kv { font: 700 34px/1 var(--num); color: var(--brand); letter-spacing: .01em; white-space: nowrap; }
.d2-kv small { font-size: .55em; margin-left: 1px; }
.d2-kv i { font-style: normal; opacity: .45; margin: 0 1px; }
.d2-k.alt .d2-kv { color: var(--brand2); }
.d2-kl { font-size: 12px; color: var(--muted); font-weight: 700; }
.d2-more { justify-self: end; font-size: 13px; font-weight: 700; color: var(--brand); text-decoration: none; }
.d2-more:hover { text-decoration: underline; }
/* 試合一覧 (下のカード) */
html[data-design="2"] body[data-page="home"] #plist .panel { position: relative; overflow: hidden; padding-left: 20px; }
html[data-design="2"] body[data-page="home"] #plist .panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand2); }

/* ---------------------------------------------------------------- 狭い画面 */
@media (max-width: 1100px) {
  .d2-home { grid-template-columns: minmax(0, 1fr); }
  .d2-team { font-size: 36px; }
  .d2-id { padding-left: 48px; max-width: 64%; }
}
@media (max-width: 900px) {
  .d2-band { height: 160px; }
  .d2-art { width: 40%; }
  .d2-corner { width: 110px; height: 110px; }
  .d2-id { gap: 16px; padding: 16px 20px 16px 32px; max-width: 68%; }
  .d2-id .d2-crest, .d2-id .d2-crest img { height: 88px; } .d2-crest-txt { width: 80px; height: 80px; font-size: 24px; }
  .d2-team { font-size: 26px; } .d2-tag { font-size: 16px; } .d2-tag::before, .d2-tag::after { width: 28px; }
  .d2-row { padding: 0 12px; } html[data-design="2"] body[data-page="home"] .d2-row { padding-left: 12px; }
  .d2-mini b { display: none; }
}
