---
// TOP の「ブラウザで動かすシミュレーション」。配膳ロボット（テスト版）・自動運転バス（試作）・歩道の配送ロボット（試作）の3つを1つのセクションに並べる
// （2026-11-21 エイイチの指示「webシミュレーションのセクションが幅とりすぎ」「3つを1セクションにする？」）。
// 「まだのこと」の箇条書きは置かない（同じ日のエイイチの指示「この辺のテキストいらないかな」）。注意書きは各シミュレーションの中と記録にある。
// /series8 の BrowserSimTest、記事の中のバナー、課題地図のバナーはそのまま。押された数が前と続けて数えられるよう、data-ev は前の3つの入口と同じ名前にした
const sims = [
  {
    id: 'browser-test', tag: 'テスト版', href: '/sim/serving-robot-3d',
    title: '配膳ロボットの店を3Dで動かす',
    note: 'ファミレスの店をブラウザの中に建て、スタッフ・ロボットの台数と混み具合を選ぶと、その場で1日が回ります。',
    img: '/site/sim/browser-test.webp', w: 1920, h: 1080, pos: 'center',
    alt: '配膳ロボットのシミュレーションの画面。3Dの店の中をスタッフ・お客さん・ロボットが動く',
    ev: 'TOP:ブラウザ版のテスト版を開く', log: '/record/serving-robot-store-sim-in-the-browser', logText: '作り方の記録（LOG506）', logEv: 'TOP:ブラウザ版の記録を開く',
  },
  {
    id: 'accident-sim', tag: '試作', href: '/sim/av-accident-responsibility',
    title: '自動運転バスの事故、誰の責任？',
    note: '交差点で人と接触したとき、運行の形や点検を変えると、問題が人・企業・決まりのどこへ移るかを確かめます。',
    img: '/site/sim/accident-sim.webp', w: 1920, h: 973, pos: 'left center',
    alt: '自動運転バスのシミュレーションの画面。T字路で左折したバスが歩行者と接触した',
    ev: 'TOP:事故責任シミュレーションを開く', log: '/record/autonomous-bus-accident-responsibility-shift-simulation', logText: '作り方の記録（LOG538）', logEv: 'TOP:事故責任シミュレーションの記録を開く',
  },
  {
    id: 'delivery-sim', tag: '試作', href: '/sim/delivery-robot-accident-responsibility',
    title: '歩道の配送ロボットの事故、誰の責任？',
    note: '車いすの人・子ども・踏切など13の場面で、ロボットの作りと運行会社の決まりを選んで見直します。',
    img: '/site/sim/delivery-card.webp', w: 1600, h: 1000, pos: 'center',
    alt: '歩道の配送ロボットのシミュレーションの画面。歩道に配送ロボットが何台も並び、人の通り道をふさいでいる',
    ev: 'TOP:配送ロボットの事故責任シミュレーションを開く', log: '/record/delivery-robot-sidewalk-accident-responsibility-simulation', logText: '作り方の記録（LOG541）', logEv: 'TOP:配送ロボットの事故責任シミュレーションの記録を開く',
  },
];
---
<section class="sec s-trio" data-ev-area="top-browser-test"><div class="panel">
  <h2 class="sec-h">ブラウザで動かすシミュレーション | Test</h2>
  <div class="tr-grid">
    {sims.map((s) => (
      <div class="tr-card" id={s.id}>
        <a class="tr-img" href={s.href} target="_blank" rel="noopener" data-ev={`${s.ev}（画像）`}>
          <img src={s.img} alt={s.alt} width={s.w} height={s.h} loading="lazy" style={`object-position:${s.pos}`} />
        </a>
        <p class="tr-tag">{s.tag}</p>
        <h3 class="tr-title">{s.title}</h3>
        <p class="tr-note">{s.note}</p>
        <div class="tr-foot">
          <a class="tr-btn" href={s.href} target="_blank" rel="noopener" data-ev={s.ev}>開く ↗</a>
          <a class="tr-log" href={s.log} data-ev={s.logEv}>{s.logText} →</a>
        </div>
      </div>
    ))}
  </div>
</div></section>

<style>
  .s-trio .tr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .s-trio .tr-card { display: flex; flex-direction: column; min-width: 0; }
  .s-trio .tr-img { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #eceef2; }
  .s-trio .tr-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
  .s-trio .tr-img:hover img { transform: scale(1.03); }
  .s-trio .tr-tag { align-self: flex-start; margin: 16px 0 8px; padding: 1px 8px; border-radius: 4px; background: #ecebe7; color: #555; font: 600 12px/20px var(--sans); }
  .s-trio .tr-title { margin: 0 0 6px; font: 600 17px/26px var(--sans); color: var(--ink); }
  .s-trio .tr-note { margin: 0 0 16px; font: 400 14px/24px var(--sans); color: var(--ink-2); }
  .s-trio .tr-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
  .s-trio .tr-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 8px; background: var(--ink, #242424); color: #fff; font: 600 14px/20px var(--sans); }
  .s-trio .tr-btn:hover { opacity: .85; }
  .s-trio .tr-log { font: 500 13px/20px var(--sans); color: var(--ink); }
  .s-trio .tr-log:hover { text-decoration: underline; }
  @media (max-width: 1023px) { .s-trio .tr-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
</style>
