/* ============================================================
   ITKAGYO ツールページ用スタイル（入力欄・結果表示など）
   旧ミニツール9カテゴリの style.css からツール部品だけを集約・重複除去し、
   新デザインの変数（--line / --mono / --font）に置き換えたもの。
   ============================================================ */

.tool-lead {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 24px;
}

.tool-panel {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 22px 20px;
  margin-bottom: 28px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field .hint {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 12px;
  margin-left: 6px;
}

.field input[type="text"],
.field input[type="number"],
.field select,
.nk-p input[type="text"],
.nk-p input[type="number"],
.nk-p select {  /* .nk-p：飲み会の割り勘の参加者カード */
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: var(--mono);
  border: 1px solid #c6ccd2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.field-row .field {
  flex: 1 1 200px;
}

.formula-out {
  margin-top: 6px;
}

.formula-out .label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.formula-box {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.formula-box code {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 15px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--accent-dark);
}

.copy-btn {
  flex: 0 0 auto;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--accent-dark);
}

.status-note {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  min-height: 1.5em;
}






@media (max-width: 560px) {
  

  

  .formula-box {
    flex-direction: column;
  }

  .copy-btn {
    padding: 12px 20px;
  }

}

.cond-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cond-row .field {
  flex: 1 1 170px;
  margin-bottom: 0;
}

.cond-remove {
  flex: 0 0 auto;
  width: 40px;
  height: 42px;
  border: 1px solid #c6ccd2;
  background: #fff;
  color: var(--ink-soft);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cond-remove:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cond-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.add-cond {
  background: #fff;
  border: 1px dashed var(--accent);
  color: var(--accent-dark);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  margin-bottom: 14px;
}

.add-cond:hover {
  background: var(--accent-tint);
}

.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--mono);
  border: 1px solid #c6ccd2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.text-io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 700px) {
  .text-io {
    grid-template-columns: 1fr;
  }
}

.text-io .field {
  margin-bottom: 0;
}

.text-io .field textarea {
  min-height: 220px;
}

.io-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.io-label-row label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0;
}

.io-count {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.dropzone {
  border: 2px dashed var(--accent-line);
  border-radius: 8px;
  padding: 34px 16px;
  text-align: center;
  color: var(--ink-soft);
  cursor: pointer;
  background: #fff;
}

.dropzone strong {
  color: var(--accent-dark);
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

.dropzone .dz-hint {
  font-size: 12px;
}

.dropzone.is-drag {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.file-list {
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.file-item img.thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: repeating-conic-gradient(#eceff1 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  flex: 0 0 auto;
}

.file-item .meta {
  flex: 1 1 200px;
  font-size: 12.5px;
  line-height: 1.7;
}

.file-item .meta .fname {
  font-family: var(--mono);
  font-size: 12px;
  word-break: break-all;
}

.file-item .shrink {
  color: var(--accent-dark);
  font-weight: 700;
}

.file-item .grow {
  color: #b45309;
  font-weight: 700;
}

.dl-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  flex: 0 0 auto;
}

.dl-btn:hover {
  background: var(--accent-dark);
}

.dl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ghost-btn {
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
}

.ghost-btn:hover {
  background: var(--accent-tint);
}

.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}

.canvas-wrap {
  margin-top: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 100%;
}

.canvas-wrap canvas {
  display: block;
  max-width: 100%;
  touch-action: none;
  cursor: crosshair;
  background: repeating-conic-gradient(#eceff1 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px;
}

.field input[type="color"] {
  width: 54px;
  height: 38px;
  padding: 2px;
  border: 1px solid #c6ccd2;
  border-radius: 8px;
  background: #fff;
}

.field input[type="range"] {
  width: 100%;
}

.out-text textarea {
  width: 100%;
  min-height: 110px;
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-tint);
  color: var(--accent-dark);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}

.color-swatch {
  display: inline-block;
  width: 100%;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.color-swatch-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.color-swatch-item {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.color-swatch-item .color-swatch {
  height: 48px;
  margin-bottom: 4px;
}

.preview-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

input[type="color"] {
  width: 44px;
  height: 42px;
  padding: 2px;
  border: 1px solid #c6ccd2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

.color-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.color-input-row input[type="text"] {
  flex: 1 1 auto;
}

.disclaimer-box {
  border: 1px solid #d4d4d8;
  background: #fafafa;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 20px 0;
  line-height: 1.8;
}

.disclaimer-box strong {
  color: var(--ink);
}

/* ---------- 新デザインへの上書き ---------- */
.tool-panel { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); padding: 22px 20px; margin: 0; }
.field input[type="text"], .field input[type="number"], .field select { border-radius: 8px; }
.formula-box code { font-size: 17px; font-weight: 500; }

/* ===== SEOツール（/seo/） ===== */
.seo-url-row { display: flex; gap: 8px; }
.seo-url-row input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 15px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.seo-url-row input:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
.seo-url-row .copy-btn { padding: 0 22px; min-height: 46px; }
.seo-url-row .copy-btn:disabled { opacity: .6; cursor: wait; }
.seo-status { margin: 12px 0 0; font-size: 13.5px; border-radius: 8px; padding: 0; overflow-wrap: anywhere; }
.seo-status:empty { display: none; }
.seo-status.busy, .seo-status.ok, .seo-status.warn, .seo-status.ng { padding: 10px 14px; }
.seo-status.busy { background: var(--accent-tint); }
.seo-status.ok { background: var(--safe-tint); color: var(--safe); }
.seo-status.warn { background: #fff7e6; color: #8a5a00; }
.seo-status.ng { background: #fdecec; color: #a3261f; }
.seo-spin { display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--accent-line); border-top-color: var(--accent); border-radius: 50%; animation: seo-spin .8s linear infinite; }
@keyframes seo-spin { to { transform: rotate(360deg); } }
.seo-result { margin-top: 18px; }
.seo-result h3 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin: 22px 0 8px; }
.seo-result h3:first-child { margin-top: 0; }
.seo-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0 0 6px; }
.seo-summary div { background: var(--accent-tint); border-radius: 10px; padding: 10px 12px; }
.seo-summary b { display: block; font-size: 20px; line-height: 1.3; }
.seo-summary span { font-size: 12px; color: var(--ink-soft); }
.seo-table td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; font-weight: 400 !important; }
.seo-table td:first-child { white-space: nowrap; font-weight: 700 !important; }
.seo-table.wide td:first-child { white-space: normal; }
.seo-badge { display: inline-block; font-size: 11.5px; font-weight: 700; line-height: 1.6; padding: 1px 8px; border-radius: 999px; margin: 0 4px 2px 0; white-space: nowrap; }
.seo-badge.ok { background: var(--safe-tint); color: var(--safe); }
.seo-badge.warn { background: #fff4d6; color: #8a5a00; }
.seo-badge.ng { background: #fdecec; color: #a3261f; }
.seo-badge.info { background: var(--accent-tint); color: var(--accent); }
.seo-checks { list-style: none; margin: 0; padding: 0; }
.seo-checks li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.seo-checks li:last-child { border-bottom: 0; }
.seo-value { font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }
.seo-value.empty { color: var(--ink-soft); }
.seo-meta-n { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0 0; }
.seo-pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 14px; overflow: auto; max-height: 420px; white-space: pre; margin: 6px 0 0; }
.seo-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.seo-tools .copy-btn, .seo-small-btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
.seo-small-btn { font: inherit; font-size: 13px; font-weight: 700; background: #fff; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.seo-small-btn:hover { background: var(--accent-tint); }
.seo-small-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.seo-tree { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.seo-tree li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.seo-tree .lv { flex: none; font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; padding: 0 6px; }
.seo-tree .lv.l2 { background: color-mix(in srgb, var(--accent), #fff 18%); } .seo-tree .lv.l3 { background: color-mix(in srgb, var(--accent), #fff 35%); }
.seo-tree .lv.l4, .seo-tree .lv.l5, .seo-tree .lv.l6 { background: color-mix(in srgb, var(--accent), #fff 50%); }
.seo-card { max-width: 520px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.seo-card .img { aspect-ratio: 1.91 / 1; background: #eef1f6 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 13px; }
.seo-card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seo-card .tx { padding: 10px 14px; }
.seo-card .dm { font-size: 12px; color: var(--ink-soft); }
.seo-card .tt { font-weight: 700; font-size: 15px; line-height: 1.45; margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seo-card .ds { font-size: 13px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seo-thumb { width: 72px; height: 48px; object-fit: contain; background: #eef1f6; border-radius: 4px; display: block; }
.seo-kwbar { display: inline-block; height: 8px; background: var(--accent-line); border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.seo-cross { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.seo-cross-t { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.seo-cross-list { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-cross-list .chip { text-decoration: none; color: var(--ink); }
details.seo-det { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: #fff; }
details.seo-det summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 14px; }
details.seo-det > div { padding: 0 14px 12px; }
@media (max-width: 600px) {
  .seo-url-row { flex-direction: column; }
  .seo-url-row .copy-btn { min-height: 44px; }
}
.seo-table.wide td:not(:first-child) { min-width: 9em; }

/* ===== 追加ツール（net・data ほか）共通 ===== */
.label-like { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.chip input { margin: 0 4px 0 0; vertical-align: -1px; }
.diff-out { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 640px; background: #fff; }
.diff-out:empty { display: none; }
.diff-table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.diff-table td { padding: 1px 8px; vertical-align: top; }
.diff-table .ln { width: 1%; color: var(--ink-soft); text-align: right; user-select: none; white-space: nowrap; background: #f8fafc; }
.diff-table .sg { width: 1%; user-select: none; font-weight: 700; }
.diff-table .tx { white-space: pre-wrap; word-break: break-all; }
.diff-table tr.add { background: #e8f7ee; } .diff-table tr.add .sg { color: #1a7f37; }
.diff-table tr.del { background: #fdecec; } .diff-table tr.del .sg { color: #b42318; }
.diff-table tr.add mark { background: #a6e3b8; } .diff-table tr.del mark { background: #f7b4ae; }
.diff-chars { margin: 0; padding: 12px; font-family: var(--mono); font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.diff-chars ins { background: #a6e3b8; text-decoration: none; } .diff-chars del { background: #f7b4ae; }
.pw-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 4px; }
.pw-meter span { height: 8px; border-radius: 4px; background: var(--line); }
.pw-meter.s0 span:nth-child(-n+1) { background: #d92d20; }
.pw-meter.s1 span:nth-child(-n+2) { background: #f79009; }
.pw-meter.s2 span:nth-child(-n+3) { background: #eaaa08; }
.pw-meter.s3 span:nth-child(-n+4) { background: #12b76a; }
.pw-meter.s4 span:nth-child(-n+5) { background: var(--safe); }
.tz-grid td, .tz-grid th { font-size: 12.5px; padding: 6px 10px; white-space: nowrap !important; min-width: 0 !important; }
.tz-grid td.w { background: var(--safe-tint); } .tz-grid td.n { background: #f3f4f6; color: var(--ink-soft); }
.tz-grid tr.ok td:first-child { box-shadow: inset 4px 0 0 var(--safe); }
.seo-table.wide td:first-child { min-width: 6.5em; }
.area-fig svg { width: 100%; max-width: 640px; height: auto; display: block; margin: 14px auto 0; font-size: 12px; fill: var(--ink-soft); }
.area-fig .room { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.area-fig .tt { fill: #e7efd9; stroke: #9cb27a; stroke-width: .8; }
.pc-grid .seo-tools input[type=number] { width: 7.5em; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.pc-grid .seo-tools select { font: inherit; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pc-grid .seo-tools strong { font-size: 18px; color: var(--accent); }
.pc-grid .field { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 10px; }
/* 関数ジェネレーター共通（fgen.js） */
.fg-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 16px; }
.fg-fields .field.wide { grid-column: 1 / -1; }
.fg-fields .field[hidden] { display: none; }
.fg-fields textarea { width: 100%; font-family: var(--mono); font-size: 13px; }
.fg-check { display: flex; align-items: center; gap: 8px; font-weight: 500; min-height: 44px; }
#fg-out .formula-out + .formula-out { margin-top: 14px; }
#fg-out .formula-box code { white-space: pre-wrap; word-break: break-all; }
/* イベントツール共通（ev.js） */
.ev-stage { text-align: center; padding: 22px 16px; border: 1px solid var(--accent-line); border-radius: 14px; background: var(--accent-tint); margin-top: 16px; }
.ev-stage:fullscreen { display: flex; flex-direction: column; justify-content: center; background: #fff; }
.ev-big { font-family: var(--mono); font-weight: 700; font-size: clamp(44px, 12vw, 104px); line-height: 1.1; color: var(--accent-dark); font-variant-numeric: tabular-nums; word-break: break-all; }
.ev-stage:fullscreen .ev-big { font-size: 22vw; }
.ev-sub { font-size: 15px; color: var(--muted, #475569); margin-top: 6px; }
.ev-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.ev-row .dl-btn, .ev-row .ghost-btn { min-width: 110px; }
.ev-canvas { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.ev-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.ev-list li { background: #fff; border: 1px solid var(--accent-line); border-radius: 10px; padding: 10px 14px; text-align: left; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.ev-card { background: #fff; border: 1px solid var(--accent-line); border-radius: 12px; padding: 12px; text-align: left; }
.ev-card h3 { font-size: 15px; margin: 0 0 6px; color: var(--accent-dark); }
.ev-card ol, .ev-card ul { margin: 0; padding-left: 1.3em; font-size: 14px; }
.ev-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 14px; }
.ev-tile { aspect-ratio: 3 / 4; border-radius: 10px; border: 1px solid var(--accent-line); background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; text-align: center; word-break: break-all; }
.ev-tile.open { background: #fff; color: var(--accent-dark); cursor: default; }
.ev-tile.win { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.ev-board { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin-top: 14px; font-family: var(--mono); font-size: 12px; }
.ev-board span { background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; padding: 4px 0; color: #94a3b8; }
.ev-board span.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ev-bar { height: 22px; background: var(--accent); border-radius: 6px; min-width: 2px; transition: width .3s; }
.ev-warn { background: #fef3c7 !important; }
.ev-over { background: #fee2e2 !important; }
.ev-over .ev-big { color: #b91c1c; }
.ev-team { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ev-team .n { font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--accent-dark); min-width: 2.5ch; text-align: center; }
.ev-team button { font: inherit; font-weight: 700; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--accent-line); background: #fff; color: var(--accent); cursor: pointer; }
.ev-seat { display: grid; gap: 6px; margin-top: 14px; }
.ev-seat div { background: #fff; border: 1px solid var(--accent-line); border-radius: 8px; padding: 10px 4px; font-size: 13px; text-align: center; min-height: 40px; }
.ev-seat .front { grid-column: 1 / -1; background: var(--accent); color: #fff; font-weight: 700; }
@media print { .ev-noprint { display: none !important; } }
/* CSSジェネレーター共通（cssgen.js） */
.cg-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cg-prev { position: sticky; top: 80px; border: 1px solid var(--accent-line); border-radius: 12px; overflow: hidden; background: #f1f5f9; }
.cg-prev iframe { display: block; width: 100%; height: 300px; border: 0; background: transparent; }
.cg-fields { grid-template-columns: 1fr 1fr; }
.cg-range { display: flex; align-items: center; gap: 10px; }
.cg-range input { flex: 1; accent-color: var(--accent); }
.cg-range output { font-family: var(--mono); font-size: 13px; min-width: 4.5em; text-align: right; color: var(--accent-dark); }
.cg-color { display: flex; gap: 8px; align-items: center; }
.cg-color input[type="color"] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--accent-line); border-radius: 8px; background: #fff; flex: none; }
.cg-color input[type="text"] { flex: 1; min-width: 0; font-family: var(--mono); }
.cg-code pre { flex: 1 1 auto; margin: 0; background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; max-height: 360px; }
.cg-code pre code { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--accent-dark); white-space: pre; background: none; border: 0; padding: 0; }
@media (max-width: 760px) { .cg-wrap { grid-template-columns: 1fr; } .cg-prev { position: static; } .cg-prev iframe { height: 220px; } .cg-fields { grid-template-columns: 1fr; } }
#fg-out .formula-box code { max-height: 460px; overflow: auto; }
.fg-html { overflow-x: auto; }
.fg-html .table-wrap { margin: 0; }
/* 画像1枚の加工（imgedit.js） */
.ie-stage { margin-top: 16px; padding: 14px; border: 1px solid var(--accent-line); border-radius: 12px; text-align: center;
  background: repeating-conic-gradient(#e2e8f0 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
.ie-stage canvas { max-width: 100%; max-height: 520px; height: auto; display: inline-block; }
.dropzone.over { border-color: var(--accent); background: var(--accent-tint); }
/* 早見表の連動（qt.js） */
#qt-table.qt-live tbody tr.qt-hit td { background: #fef3c7; font-weight: 700; color: #78350f; }

/* 畳・平米・坪の換算（life/menseki）：よく聞く広さボタン・説明文・ベッドの図 */
.ar-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 14px; font-size: 13px; color: var(--ink-soft); }
.ar-say p { margin: 10px 0 0; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--safe, #0f766e); border-radius: 10px; font-size: 14.5px; line-height: 1.9; }
.area-fig .bed { fill: #dbeafe; stroke: var(--accent); stroke-width: 1.2; }
.basics .table-wrap { margin: 8px 0 10px; }

/* 飲み会の割り勘計算（shinko/nomikai-warikan） */
.nk-pre { margin: 0 0 6px; }
.nk-lbl { font-size: 13px; font-weight: 700; margin: 0 0 6px; }
.nk-presets { justify-content: flex-start; margin: 0; max-width: none; }
.nk-h { font-size: 15.5px; margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.nk-list { display: grid; gap: 10px; }
.nk-p { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.nk-p-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.nk-p-h .nk-name { flex: 1; font-weight: 700; }
.nk-p-h .nk-del { padding: 6px 12px; min-height: 0; font-size: 13px; }
.nk-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 10px; }
.nk-g label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.nk-g select, .nk-g input { width: 100%; }
.nk-paid-l { display: none !important; }
.nk-list.show-paid .nk-paid-l { display: flex !important; }
.nk-tag { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.nk-pay { font-size: 16px; }
.nk-down { color: #0f766e; font-weight: 700; }
.nk-up { color: #b45309; font-weight: 700; }
.nk-moves { padding-left: 20px; margin: 6px 0 10px; }
.nk-moves li { margin: 4px 0; }

/* イベント：指定した部分だけを印刷（ev.js の EV.print） */
@media print {
  body.ev-printing * { visibility: hidden !important; }
  body.ev-printing .ev-print-area, body.ev-printing .ev-print-area * { visibility: visible !important; }
  body.ev-printing .ev-print-area { position: absolute; left: 0; top: 0; width: 100%; margin: 0; border: 0; box-shadow: none; }
}

/* 大会・対戦表（taikai） */
.tn-out { margin-top: 16px; }
.tn-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.tn-title { font-weight: 700; font-size: 16px; margin: 0 0 8px; color: var(--accent-dark); }
.tn-scroll { overflow-x: auto; }
.tn-scroll svg { display: block; max-width: none; }
.tn-slot.can { cursor: pointer; }
.tn-slot.can:hover rect { stroke: #1e3a8a; }
.tn-third { margin-top: 10px; font-size: 14px; }
.lg-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lg-ms, .sw-ms { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 6px; }
.lg-ms li { font-size: 14px; }
.lg-court { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.lg-vs { color: var(--ink-soft); font-size: 12px; margin: 0 2px; }
.lg-star td, .lg-star th { text-align: center; min-width: 3.2em; height: 2.4em; }
.lg-star td.lg-x { background: #e2e8f0; }
.sw-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sw-ms li { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; font-size: 14px; }
.sw-ms li span:last-child { text-align: right; }
.sw-ms select { font: inherit; font-size: 12.5px; padding: 4px; border: 1px solid #c6ccd2; border-radius: 6px; max-width: 10em; }

/* ゲーム・パーティー（game） */
.ww-stage { min-height: 260px; display: flex; flex-direction: column; justify-content: center; }
.ww-stage p { margin: 8px 0; }
.ww-name { font-size: clamp(30px, 8vw, 60px) !important; }
.ww-res { font-size: clamp(30px, 8vw, 58px) !important; }
.ww-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.ww-pick .ng-out { opacity: .55; text-decoration: line-through; }
.jr-roles .field { flex: 1 1 90px; }
.jr-wolf { color: #b91c1c !important; }
.jr-vil { color: var(--accent-dark); }
.tk-genres { display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 6px; }
.tk-big { font-size: clamp(24px, 6vw, 46px) !important; word-break: normal; line-height: 1.4; }
.bc-sheet { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 14px; }
.bc-card { background: #fff; border: 2px solid var(--accent); border-radius: 12px; padding: 12px; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bc-t { text-align: center; font-weight: 800; font-size: 20px; letter-spacing: .1em; margin: 0 0 6px; color: var(--accent-dark); }
.bc-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bc-grid th { background: var(--accent); color: #fff; font-size: 18px; padding: 4px 0; }
.bc-grid td { border: 1.5px solid var(--accent); text-align: center; font-weight: 700; font-size: 20px; height: 48px; padding: 2px; }
.bc-grid.bc-word td { font-size: 12px; font-weight: 600; word-break: break-all; line-height: 1.3; }
.bc-grid td.bc-free { background: #fef3c7; font-size: 13px; }
.bc-no { text-align: right; font-size: 11px; color: var(--ink-soft); margin: 4px 0 0; }
@media print {
  .bc-sheet { gap: 8mm; }
  .bc-per-1 { grid-template-columns: 1fr; }
  .bc-per-1 .bc-card { break-after: page; }
  .bc-per-2 { grid-template-columns: 1fr; }
  .bc-per-2 .bc-card:nth-child(2n) { break-after: page; }
  .bc-per-4 { grid-template-columns: 1fr 1fr; }
  .bc-per-4 .bc-card:nth-child(4n) { break-after: page; }
  .bc-grid td { height: 14mm; }
}

/* 幹事・準備（junbi） */
.mc-area { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; }
.mc-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; }
.mc-list li { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 4px 0; font-size: 14.5px; }
.mc-list li label { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.mc-list li.on span { color: var(--ink-soft); text-decoration: line-through; }
.mc-del { border: 0; background: none; color: var(--ink-soft); font-size: 16px; cursor: pointer; padding: 4px 8px; }
.nf-sheet { display: flex; flex-wrap: wrap; gap: 0; margin-top: 12px; }
.nf-card { border: 1px dashed #94a3b8; background: #fff; box-sizing: border-box; display: flex; flex-direction: column; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.nf-face { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 4mm; box-sizing: border-box; overflow: hidden; }
.nf-tent .nf-face { border-top: 1px dashed #cbd5e1; }
.nf-flip { transform: rotate(180deg); }
.nf-flip .nf-face { border-top: 0; }
.nf-sub { margin: 0 0 1.5mm; font-size: 3.2mm; color: #475569; line-height: 1.2; }
.nf-name { margin: 0; font-weight: 800; line-height: 1.15; color: #0f172a; white-space: nowrap; }
.sj-area { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.sj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sj-t { text-align: center; break-inside: avoid; }
.sj-svg { width: 100%; height: auto; max-width: 300px; }
.sj-tb { fill: #eef2ff; stroke: #1e3a8a; stroke-width: 1.5; }
.sj-lb { font: 700 22px sans-serif; fill: #1e3a8a; }
.sj-st rect { fill: #fff; stroke: #64748b; }
.sj-st text { font: 11px sans-serif; fill: #0f172a; }
.sj-st.empty rect { stroke-dasharray: 3 3; fill: #f8fafc; }
.an-out { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-family: inherit; font-size: 14.5px; line-height: 1.8; margin-top: 12px; }

/* タイマー・進行（追加：電光掲示板・効果音） */
.dk-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.dk-stage { position: relative; overflow: hidden; height: 42vh; min-height: 180px; border-radius: 12px; margin-top: 12px; display: flex; align-items: center; background: #0b0b0b; }
.dk-stage:fullscreen { height: 100vh; border-radius: 0; }
.dk-text { white-space: nowrap; font-weight: 800; line-height: 1; will-change: transform; font-family: var(--mono), sans-serif; }
.dk-glow .dk-text { text-shadow: 0 0 .08em currentColor, 0 0 .25em currentColor; }
.dk-static, .dk-blink { justify-content: center; }
.dk-static .dk-text, .dk-blink .dk-text { white-space: normal; text-align: center; padding: 0 4vw; }
.dk-blink .dk-text { animation: dk-blink 1s steps(2, start) infinite; }
@keyframes dk-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .dk-blink .dk-text { animation: none; } }
.kk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kk-b { font: inherit; font-weight: 700; font-size: 15px; min-height: 64px; border-radius: 12px; border: 1px solid var(--accent-line); background: #fff; color: var(--accent-dark); cursor: pointer; padding: 8px; }
.kk-b:hover { border-color: var(--accent); }
.kk-b.on { background: var(--accent); color: #fff; }
.kk-stage:fullscreen .kk-b { min-height: 18vh; font-size: 3vw; }

/* 正規表現ジェネレーター（dev/regex-gen） */
.rg-out { display: grid; gap: 12px; margin-top: 14px; }
.rg-known { background: var(--accent-tint); border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 14px; }
.rg-known code, .rg-use code { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.rg-c { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.rg-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.rg-n { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.rg-re { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; }
.rg-re code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; background: #f1f5f9; border-radius: 8px; padding: 8px 10px; word-break: break-all; color: #0f172a; }
.rg-use { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0; }
.rg-hl { white-space: pre-wrap; word-break: break-all; font-family: var(--mono); font-size: 13px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; }
.rg-hl mark { background: #fde68a; color: inherit; border-radius: 2px; }
.rg-h3 { font-size: 15.5px; margin: 24px 0 8px; }
.rg-tabs { justify-content: flex-start; margin: 0 0 8px; max-width: none; }
.rg-tabs .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rg-cheat code { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.rg-cheat .rg-ex { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); word-break: break-all; }
.rg-btns { white-space: nowrap; }
.rg-btns button + button { margin-left: 6px; }
.rg-btns .ghost-btn { padding: 4px 10px; min-height: 0; font-size: 12px; }
.rg-try { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 12px; margin-top: 14px; }
@media (max-width: 640px) {   /* スマホでは一覧を表ではなくカードの形にする */
  .rg-cheat thead { display: none; }
  .rg-cheat, .rg-cheat tbody, .rg-cheat tr, .rg-cheat td { display: block; width: auto; min-width: 0 !important; }
  .rg-cheat tr { border-bottom: 1px solid var(--line); padding: 8px 2px; }
  .rg-cheat tr[hidden] { display: none; }
  .rg-cheat td { border: 0 !important; padding: 2px 6px !important; text-align: left !important; height: auto !important; white-space: normal !important; }
  .rg-cheat td:first-child code { font-size: 13.5px; font-weight: 700; word-break: break-all; overflow-wrap: anywhere; }
  .rg-btns { padding-top: 6px !important; }
}
