/* 入力デバイスチェック */
.ic-panel[hidden] { display: none; }
.ic-focus { border: 2px dashed var(--border); border-radius: 6px; padding: 0.6rem; outline: none; background: var(--surface); }
.ic-focus:focus, .ic-focus.is-focus { border-style: solid; border-color: var(--pt-accent); }
.ic-focus-msg { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 0.5rem; text-align: center; }
.ic-focus.is-focus .ic-focus-msg { color: var(--pt-accent); font-weight: 700; }

.ic-kb-scroll { overflow-x: auto; padding-bottom: 0.2rem; }
.ic-kb { --u: clamp(1.6rem, 3.2vw, 2.2rem); display: flex; gap: calc(var(--u) * 0.35); width: max-content; margin: 0 auto; user-select: none; }
.ic-col > .ic-row:first-child { margin-bottom: calc(var(--u) * 0.45); }
.ic-row { display: flex; height: calc(var(--u) * 1); }
.ic-k { box-sizing: border-box; flex: 0 0 auto; padding: 2px; }
.ic-k.gap { visibility: hidden; }
.ic-kk { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font-size: calc(var(--u) * 0.3); line-height: 1; overflow: hidden; white-space: nowrap; }
.ic-k.tested .ic-kk { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.ic-k.held .ic-kk { background: #2563eb; border-color: #1d4ed8; color: #fff; }
.ic-k.chat .ic-kk { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
html[data-theme="dark"] .ic-k.tested .ic-kk { background: #14532d; border-color: #22c55e; color: #dcfce7; }
html[data-theme="dark"] .ic-k.chat .ic-kk { background: #7f1d1d; border-color: #f87171; color: #fee2e2; }

.ic-stat { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; margin: 0.8rem 0; font-size: 0.93rem; }
.ic-stat b { font-size: 1.15rem; }
.ic-last { color: var(--text-sub); overflow-wrap: anywhere; }
.ic-logbox { margin-top: 0.6rem; font-size: 0.85rem; }
.ic-logbox summary { cursor: pointer; color: var(--text-sub); }
.ic-log { margin: 0.4rem 0 0; padding-left: 1.6rem; font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; list-style: none; padding-left: 0; }
.ic-log li { padding: 0.1rem 0; border-bottom: 1px solid var(--border); }

.ic-mpad { height: 11rem; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; border: 2px dashed var(--border); border-radius: 6px; color: var(--text-sub); background: var(--surface); cursor: crosshair; outline: none; user-select: none; }
.ic-mpad:hover, .ic-mpad:focus { border-style: solid; border-color: var(--pt-accent); }
.ic-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.5rem; margin-top: 0.8rem; }
.ic-btn { border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.6rem; text-align: center; background: var(--surface); }
.ic-btn small { display: block; color: var(--text-sub); font-size: 0.75rem; }
.ic-btn b { font-size: 1.3rem; }
.ic-btn.held { background: #2563eb; border-color: #1d4ed8; color: #fff; }
.ic-btn.held small { color: #dbeafe; }
.ic-btn.tested { border-color: #16a34a; }
.ic-cps { margin-top: 1rem; }
.ic-cps-out { font-size: 1rem; font-weight: 700; min-height: 1.6rem; }

.ic-tpad-wrap { position: relative; }
.ic-tpad { display: block; width: 100%; height: 18rem; border: 2px dashed var(--border); border-radius: 6px; background: var(--surface); touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.ic-tpad-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: var(--text-sub); pointer-events: none; }
.ic-tpad-msg.gone { display: none; }
.ic-points { display: grid; gap: 0.3rem; margin-bottom: 0.8rem; font-size: 0.85rem; font-family: ui-monospace, Consolas, monospace; }
.ic-points div { padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); overflow-wrap: anywhere; }
.ic-points i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.4rem; }

@media (max-width: 560px) {
  .ic-tpad { height: 14rem; }
  .ic-focus { padding: 0.4rem; }
}
