/**
 * KEEL 公開HTML向け：技術ブロックのぼかし・選択抑止（カジュアルな盗用抑止用）
 * 注意: 開発者ツール・ソース表示・スクショでは回避可能。完全なDRMにはなりません。
 */

.keel-tech-host {
  position: relative;
}

/* オーバーレイ（ぼかし時のみ視認） */
.keel-tech-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 3.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.35em;
  color: rgba(100, 116, 139, 0.22);
  text-transform: uppercase;
  user-select: none;
  transition: opacity 0.25s ease;
}

.keel-tech-overlay span {
  transform: rotate(-8deg);
  white-space: nowrap;
}

/* ぼかし対象（初期） */
.keel-tech-host.keel-locked .keel-tech-content {
  filter: blur(5px);
  user-select: none;
  -webkit-user-select: none;
  transition: filter 0.35s ease;
}

.keel-tech-host.keel-locked .keel-tech-overlay {
  opacity: 1;
}

.keel-tech-host:not(.keel-locked) .keel-tech-overlay {
  opacity: 0;
}

.keel-tech-host:not(.keel-locked) .keel-tech-content {
  filter: none;
  user-select: auto;
  -webkit-user-select: auto;
}

/* ヒント行 */
.keel-tech-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

@media (prefers-color-scheme: dark) {
  .keel-tech-hint {
    color: #94a3b8;
    background: #1e293b;
    border-color: #334155;
  }
}

/* 固定バー（JSが挿入する #keel-tech-bar 用） */
#keel-tech-bar {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  max-width: min(22rem, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

#keel-tech-bar .keel-bar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

#keel-tech-bar button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #3b82f6;
  color: #fff;
}

#keel-tech-bar button.keel-btn-secondary {
  background: #475569;
}

#keel-tech-bar button:hover {
  filter: brightness(1.08);
}

#keel-tech-bar[hidden] {
  display: none !important;
}

/* 印刷時もぼかし（data-keel-print-lock=1 のホストのみ・画面で解除していても印刷はぼかす） */
@media print {
  .keel-tech-host[data-keel-print-lock="1"] .keel-tech-content {
    filter: blur(8px) !important;
    user-select: none !important;
  }
}
