@charset "utf-8";

/* 株式会社TIL 公式サイト：触れる小さなデモ（見本）の共通スタイル */

/* ---- タブ（用途の切り替え・これまで/これから・手順） ---- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.tab {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--brand);
  padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; line-height: 1.4;
}
.tab:hover { background: var(--bg-soft); }
.tab[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.tab:focus-visible, .dd-card:focus-visible, .dd-col:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tabpanel {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  box-shadow: var(--shadow);
}
.tabpanel[hidden] { display: none; }
.tabpanel + .tabpanel { margin-top: 14px; }
.js .tabpanel + .tabpanel { margin-top: 0; }
.tabpanel h3 { margin: 0 0 6px; font-size: 19px; color: var(--brand); }
.tabpanel > p { margin: 0 0 12px; color: var(--muted); }
.tabpanel .tab-actions { margin: 16px 0 0; }

.say-list { list-style: none; padding: 0; margin: 10px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.say-list li {
  background: #eef3f9; border-radius: 999px; padding: 6px 14px; font-size: 14.5px; color: var(--brand);
}
.say-list li::before { content: "「"; }
.say-list li::after { content: "」"; }

.tabpanel-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
.tabpanel-grid img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }

/* ---- これまで / これから ---- */
.ba-panel { border-radius: 14px; padding: 20px 22px; }
.ba-panel.is-before { background: #f3f4f6; border: 1px dashed #c9ced6; }
.ba-panel.is-after { background: #eef7f8; border: 1px solid #b9dde1; }
.ba-panel h3 { margin: 0 0 8px; font-size: 17px; }
.ba-panel ol, .ba-panel ul { margin: 0; padding-left: 1.3em; }
.ba-flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; padding: 0; list-style: none; }
.ba-flow li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-weight: 700; color: var(--brand); font-size: 15px; }
.ba-flow li + li::before { content: "→"; margin-right: 10px; color: var(--accent); font-weight: 700; }

/* ---- 文字入力デモ ---- */
.typedemo {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  max-width: 560px; overflow: hidden;
}
.typedemo-head { background: var(--brand); color: #fff; padding: 10px 16px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; }
.typedemo-input {
  margin: 16px 16px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  min-height: 50px; font-size: 16px; font-weight: 700; color: #0f2743; background: #fff;
}
.js .typedemo-input::after {
  content: ""; display: inline-block; width: 2px; height: 1.1em; background: var(--accent);
  margin-left: 2px; vertical-align: -.15em; animation: tdblink 1s steps(2) infinite;
}
.typedemo { color: #24364b; }
.typedemo-result {
  margin: 0 16px 16px; padding: 14px 16px; border-radius: 10px; background: var(--bg-soft);
  min-height: 112px; font-size: 15px; line-height: 1.8; transition: opacity .35s;
  color: #24364b; /* 暗い背景のヒーロー内でも、白を引き継がない */
}
.typedemo-result, .typedemo-result * { opacity: 1; }
.typedemo-result b { color: #0f2743; font-weight: 700; }
.typedemo-result small { display: inline-block; margin-top: 2px; font-size: 13.5px; color: #24364b; }
.typedemo-result.is-hidden { opacity: 0; }
.typedemo-note { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
@keyframes tdblink { 50% { opacity: 0; } }

/* ---- 料金の試算 ---- */
.sim { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; max-width: 520px; }
.sim label { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand); flex-wrap: wrap; }
.sim input[type="number"] { width: 110px; font: inherit; font-size: 20px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sim input[type="range"] { width: 100%; margin: 14px 0 6px; accent-color: var(--accent); }
.sim-out { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.sim-out b { display: block; font-size: 34px; color: var(--brand); line-height: 1.3; }
.sim-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

/* ---- 配車の札（動きの見本） ---- */
.dd { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; }
.dd-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px; }
.dd h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.dd-pool, .dd-slot { min-height: 64px; display: flex; flex-direction: column; gap: 8px; }
.dd-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dd-col { background: var(--bg-soft); border: 2px dashed #cbd5e1; border-radius: 12px; padding: 10px; cursor: pointer; }
.dd-col.is-over, .dd-col.is-target { border-color: var(--accent); background: #eaf6f7; }
.dd-card {
  appearance: none; text-align: left; font: inherit; font-size: 13.5px; line-height: 1.5; cursor: grab;
  background: #fff7e6; border: 1px solid #f1d49a; border-radius: 8px; padding: 8px 10px; color: #5c4300;
}
.dd-card.is-sel { outline: 3px solid var(--accent); }
.dd-card.is-placed { background: #e7f6ec; border-color: #a9d9b9; color: #1d5b33; cursor: default; }
.dd-msg { margin: 12px 0 0; font-size: 14px; color: var(--muted); min-height: 1.8em; }
.dd-reset { margin-top: 8px; appearance: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--brand); }

/* ---- 手順の切り替え ---- */
.stepper .tabs { gap: 6px; }
.stepper .tab { padding: 8px 14px; font-size: 14px; }
.step-nav { display: flex; gap: 10px; margin-top: 14px; }

@media (max-width: 860px) {
  .tabpanel-grid { grid-template-columns: 1fr; }
  .dd-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dd-cols { grid-template-columns: 1fr; }
  .tab { padding: 9px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .typedemo-input::after { animation: none; }
  .typedemo-result { transition: none; }
}

/* ---- ヒーロー内のデモ ---- */
.hero-demo { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.hero-demo .typedemo { width: 100%; }
.hero .typedemo-note { color: #cfe0f0; }
@media (max-width: 860px) { .hero-demo { align-items: stretch; } }

/* ---- 引用符なしのチップ ---- */
.say-list.plain li::before, .say-list.plain li::after { content: none; }
