/* ギターピック型キーホルダー（keyholder01）カラーシミュレーター専用スタイル
   folklore-clear-simulator.css / wellington-clear-simulator.css / kokuin-addon.css群と
   同じデザイン言語（zone-tab・swatch・summary・kokuin-toggle等）で統一。 */

.keyholder-simulator {
  background: #f0ede8;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  padding: 20px 0;
}
.keyholder-simulator * { box-sizing: border-box; }

.keyholder-simulator .app {
  width: 100%; max-width: 520px; display: flex; flex-direction: column; margin: 0 auto;
}

.keyholder-simulator .top-area {
  display: flex; flex-direction: row; padding: 10px 10px 0; gap: 10px; align-items: stretch;
}
.keyholder-simulator .ctrl-col { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.keyholder-simulator .svg-col {
  display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 180px; align-self: flex-start;
}

.keyholder-simulator .view-toggle {
  display: flex; gap: 6px; width: 100%; margin-bottom: 8px;
}
.keyholder-simulator .kh-view-btn {
  flex: 1; padding: 8px 4px; border: 1.5px solid #e0e0e0; border-radius: 8px;
  background: #fff; font-size: 11px; color: #666; cursor: pointer; transition: all .12s;
}
.keyholder-simulator .kh-view-btn.active { background: #111; color: #fff; border-color: #111; }

.keyholder-simulator .svg-scroll { width: 100%; display: flex; justify-content: center; }

.keyholder-simulator .pal-box { background: #fff; border-radius: 12px; padding: 10px 12px; }
.keyholder-simulator .box-label { font-size: 11px; color: #aaa; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.keyholder-simulator .sum-box { background: #fff; border-radius: 12px; padding: 10px 12px; }
.keyholder-simulator .summary { font-size: 11px; color: #666; line-height: 2; }

.keyholder-simulator .kh-zones { display: flex; flex-direction: column; gap: 4px; }
.keyholder-simulator .kh-zone-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 9px;
  border: 1.5px solid #ddd; border-radius: 7px; background: #fff; cursor: pointer;
  font-size: 11px; color: #444; font-weight: 400; text-align: left; width: 100%;
}
.keyholder-simulator .kh-zone-btn.active { border-color: #222; background: #222; color: #fff; font-weight: 500; }
.keyholder-simulator .kh-zone-dot { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,.15); }

.keyholder-simulator .palette { display: flex; flex-wrap: wrap; gap: 5px; }
.keyholder-simulator .kh-swatch {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(0,0,0,.12); transition: transform .1s;
}
.keyholder-simulator .kh-swatch:hover { transform: scale(1.15); }
.keyholder-simulator .kh-swatch.selected { border: 2.5px solid #111; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111; }

.keyholder-simulator .kh-summary-row { display: flex; align-items: center; gap: 5px; padding: 2px 0; font-size: 10.5px; }
.keyholder-simulator .kh-summary-label { color: #888; font-size: 9.5px; min-width: 0; flex: 1; }
.keyholder-simulator .kh-summary-dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); flex-shrink: 0; }
.keyholder-simulator .kh-summary-name { color: #333; font-weight: 500; font-size: 10.5px; }

/* 名入れ刻印（無料） */
.keyholder-simulator .kokuin-section { width: 100%; margin-top: 8px; padding: 0 10px; box-sizing: border-box; }
.keyholder-simulator .kokuin-inner { background: #fff; border-radius: 7px; padding: 10px; }
.keyholder-simulator .kokuin-section-title {
  font-size: 12.5px; color: #333; font-weight: 600; margin-bottom: 4px;
}
.keyholder-simulator .kokuin-section-title .kokuin-price { color: #888; font-weight: 400; margin-left: 4px; }

.keyholder-simulator .kokuin-field-label { font-size: 10px; color: #888; font-weight: 500; letter-spacing: .05em; margin: 10px 0 5px; }
.keyholder-simulator .kokuin-field-label:first-child { margin-top: 0; }
.keyholder-simulator input.kh-area-input {
  width: 100%; font-size: 13px; padding: 8px 10px; border: 1.5px solid #ddd; border-radius: 7px; background: #fff;
}
.keyholder-simulator input.kh-area-input:focus { outline: none; border-color: #222; }

.keyholder-simulator .kh-char-count {
  font-size: 10px; color: #999; text-align: right; margin-top: 3px;
}
.keyholder-simulator .kh-char-count.over { color: #c0392b; font-weight: 700; }

.keyholder-simulator .kh-warn {
  font-size: 11px; color: #856404; background: #fff3cd;
  border-radius: 6px; padding: 7px 9px; margin-top: 6px; line-height: 1.6;
  display: none;
}
.keyholder-simulator .kh-warn.show { display: block; }

.keyholder-simulator select#kh-kokuin-font-select {
  width: 100%; font-size: 12px; padding: 8px 10px; border: 1.5px solid #ddd; border-radius: 7px; background: #fff;
}
.keyholder-simulator select#kh-kokuin-font-select:focus { outline: none; border-color: #222; }

.keyholder-simulator .kokuin-notice {
  font-size: 10px; color: #666; background: #f5f2ec; border: 1px solid #e2ddd0;
  border-radius: 6px; padding: 8px 10px; margin-top: 10px; line-height: 1.7;
}
.keyholder-simulator .kokuin-notice strong { color: #856404; }

/* 価格・下部バー・モーダル・ローディング（他ラインと共通パターン） */
.keyholder-simulator [hidden] { display: none !important; }
.keyholder-simulator .price-bar { width: 100%; max-width: 500px; margin: 8px auto 0; display: flex; align-items: baseline; justify-content: space-between; background: #fff; border-radius: 7px; padding: 7px 10px; }
.keyholder-simulator .price-bar-label { font-size: 10px; color: #888; letter-spacing: .08em; font-weight: 500; text-transform: uppercase; }
.keyholder-simulator .price-bar-value { font-size: 15px; color: #222; font-weight: 700; }
.keyholder-simulator .order-note { font-size: 10px; color: #999; text-align: center; margin: 6px 10px 0; line-height: 1.5; }
.keyholder-simulator #kh-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: #111; color: #fff; padding: 8px 18px; border-radius: 20px; font-size: 11px; opacity: 0; transition: all .3s; pointer-events: none; white-space: nowrap; z-index: 9999; }
.keyholder-simulator #kh-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.keyholder-simulator .bottom-bar { width: 100%; max-width: 520px; padding: 8px 10px 24px; display: flex; gap: 6px; margin: 10px auto 0; }
.keyholder-simulator .btn-reset { flex: 1; padding: 14px; border: 1px solid #ddd; border-radius: 10px; background: #fff; font-size: 13px; color: #666; cursor: pointer; }
.keyholder-simulator .btn-undo { flex: 1; padding: 14px; border: 1px solid #ddd; border-radius: 10px; background: #fff; font-size: 13px; color: #666; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; }
.keyholder-simulator .btn-undo:disabled { opacity: .35; cursor: default; }
.keyholder-simulator .btn-order { flex: 2.5; padding: 14px; border: none; border-radius: 10px; background: #111; color: #fff; font-size: 13px; cursor: pointer; font-weight: 500; letter-spacing: .04em; }
.keyholder-simulator .btn-order:active { opacity: .7; }
.keyholder-simulator .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 20px; }
.keyholder-simulator .modal.show { display: flex; }
.keyholder-simulator .modal-content { background: #fff; border-radius: 16px; padding: 24px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; }
.keyholder-simulator .modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.keyholder-simulator .modal-header h2 { font-size: 18px; margin: 0; }
.keyholder-simulator .modal-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.keyholder-simulator .modal-close:hover { color: #333; }
.keyholder-simulator .modal-image { width: 100%; border-radius: 8px; margin-bottom: 16px; }
.keyholder-simulator .modal-info { font-size: 14px; color: #666; line-height: 1.8; }
.keyholder-simulator .modal-info strong { color: #111; font-weight: 600; }
.keyholder-simulator .modal-buttons { display: flex; gap: 8px; margin-top: 20px; }
.keyholder-simulator .modal-btn { flex: 1; padding: 14px; border: none; border-radius: 10px; font-size: 14px; cursor: pointer; font-weight: 500; }
.keyholder-simulator .modal-btn-secondary { background: #f0f0f0; color: #666; }
.keyholder-simulator .modal-btn-primary { background: #111; color: #fff; }
.keyholder-simulator .modal-btn:active { opacity: .7; }
.keyholder-simulator .loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 9999; display: none; align-items: center; justify-content: center; }
.keyholder-simulator .loading-overlay.show { display: flex; }
.keyholder-simulator .loading-content { background: #fff; border-radius: 16px; padding: 32px; text-align: center; }
.keyholder-simulator .loading-spinner { width: 40px; height: 40px; border: 4px solid #f0f0f0; border-top-color: #111; border-radius: 50%; animation: kh-spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes kh-spin { to { transform: rotate(360deg); } }
.keyholder-simulator .loading-text { font-size: 14px; color: #666; }
