/* === App v2.1.0 === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic", Meiryo, sans-serif; background: #1a1a2e; color: #e0e0e0; height: 100vh; overflow: hidden; }
#app { display: flex; flex-direction: column; height: 100vh; }

/* Header */
#app-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #16213e; border-bottom: 1px solid #2a2a4a; flex-shrink: 0; }
#app-header h1 { font-size: 18px; font-weight: 700; color: #fff; }
.header-left { display: flex; align-items: center; gap: 14px; }
.version-badge { font-size: 12px; background: #e94560; color: #fff; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.header-actions button { background: #2a2a4a; color: #e0e0e0; border: 1px solid #3a3a5a; padding: 8px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit; }
.header-actions button:hover { background: #3a3a5a; border-color: #e94560; }
.header-actions button.active { background: #e94560; border-color: #e94560; color: #fff; }
.header-actions button i { margin-right: 4px; }

/* Layout */
#main-layout { display: grid; grid-template-columns: 340px 1fr 280px; flex: 1; overflow: hidden; }

/* Left Panel with Tabs */
#left-panel { background: #1e1e3a; overflow: hidden; display: flex; flex-direction: column; border-right: 1px solid #2a2a4a; }
.tab-bar { display: flex; border-bottom: 1px solid #2a2a4a; flex-shrink: 0; }
.tab-btn { flex: 1; padding: 12px 8px; border: none; background: #1e1e3a; color: #888; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; border-bottom: 2px solid transparent; }
.tab-btn:hover { color: #ccc; background: #252550; }
.tab-btn.active { color: #e94560; border-bottom-color: #e94560; }
.tab-btn i { margin-right: 4px; }
.tab-content { flex: 1; overflow: hidden; display: none; flex-direction: column; }
.tab-content.active { display: flex; }

/* Parts tab */
.panel-action-bar { padding: 10px 12px 0; flex-shrink: 0; }
.panel-action-bar button { width: 100%; padding: 9px 12px; border: 1px dashed #3a3a5a; border-radius: 5px; background: #2a2a4a; color: #e0e0e0; font-size: 13px; cursor: pointer; font-family: inherit; transition: all .15s; }
.panel-action-bar button:hover { border-color: #e94560; color: #e94560; background: #333360; }
.panel-action-bar button i { margin-right: 5px; }
.panel-search { padding: 10px 12px; flex-shrink: 0; border-bottom: 1px solid #2a2a4a; display: flex; gap: 6px; align-items: center; }
.panel-search input { flex: 1; padding: 8px 10px; border-radius: 4px; border: 1px solid #3a3a5a; background: #2a2a4a; color: #e0e0e0; font-size: 13px; font-family: inherit; }
#parts-list { overflow-y: auto; flex: 1; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.part-item { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 5px; padding: 6px; cursor: grab; transition: all .12s; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 90px; overflow: hidden; position: relative; }
.part-item:hover { border-color: #e94560; background: #333360; }
.part-item:active { cursor: grabbing; }
.part-item .part-preview-wrap { width: 100%; height: 58px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.part-item .part-preview { transform-origin: center; pointer-events: none; position: absolute; }
.part-item .part-label { font-size: 10px; color: #aaa; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; flex-shrink: 0; margin-top: 3px; }
.part-item .part-edit-btn { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; background: rgba(233,69,96,.85); color: #fff; border: none; border-radius: 50%; font-size: 9px; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 5; }
.part-item:hover .part-edit-btn { display: flex; }
.part-item .part-hide-btn { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: rgba(100,100,100,.85); color: #fff; border: none; border-radius: 50%; font-size: 8px; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 5; }
.part-item:hover .part-hide-btn { display: flex; }
.part-item .part-admin-btn { position: absolute; bottom: 3px; right: 3px; width: 20px; height: 20px; background: rgba(42,106,74,.9); color: #7affbf; border: none; border-radius: 50%; font-size: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; }
.part-item .part-admin-btn:hover { background: rgba(78,205,196,.9); color: #000; }
.parts-restore-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; background: #333360; border: 1px dashed #4a4a7a; border-radius: 5px; margin-top: 4px; }
.parts-restore-bar span { font-size: 10px; color: #aaa; }
.parts-restore-bar button { padding: 4px 8px; border: 1px solid #4a4a7a; border-radius: 4px; background: #2a2a4a; color: #e0e0e0; font-size: 10px; cursor: pointer; font-family: inherit; }
.parts-restore-bar button:hover { background: #4ecdc4; border-color: #4ecdc4; color: #000; }

/* Templates tab */
.tpl-actions button i { margin-right: 4px; }
#template-list { overflow-y: auto; flex: 1; padding: 10px; }
.tpl-card { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 6px; padding: 12px; margin-bottom: 10px; transition: all .12s; }
.tpl-card:hover { border-color: #4a4a7a; }
.tpl-preview { margin-bottom: 8px; border-radius: 4px; overflow: hidden; background: #1a1a2e; border: 1px solid #3a3a5a; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.tpl-preview img { width: 100%; height: auto; display: block; object-fit: contain; }
.tpl-preview-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; color: #666; }
.tpl-preview-placeholder i { font-size: 24px; color: #555; }
.tpl-preview-placeholder span { font-size: 11px; color: #777; }
.tpl-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tpl-card-name { font-size: 13px; font-weight: 600; color: #fff; }
.tpl-card-meta { font-size: 10px; color: #888; margin-bottom: 6px; }
.tpl-card-actions { display: flex; gap: 5px; }
.tpl-card-actions button { flex: 1; padding: 7px 10px; border-radius: 4px; border: 1px solid #3a3a5a; background: #333360; color: #e0e0e0; font-size: 12px; cursor: pointer; font-family: inherit; transition: all .12s; }
.tpl-card-actions button:hover { background: #e94560; border-color: #e94560; color: #fff; }
.tpl-card-actions button.danger:hover { background: #8b3a3a; border-color: #8b3a3a; }

/* Logo tab */
#logo-list { overflow-y: auto; flex: 1; padding: 10px; }
.logo-section-title { font-size: 12px; font-weight: 700; color: #e94560; padding: 4px 0; margin-bottom: 4px; }
.logo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.logo-item { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 5px; padding: 6px; cursor: grab; transition: all .12s; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 90px; overflow: hidden; position: relative; }
.logo-item:hover { border-color: #e94560; background: #333360; }
.logo-item:active { cursor: grabbing; }
.logo-preview-wrap { width: 100%; height: 58px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-preview-wrap img { max-width: 100%; max-height: 58px; object-fit: contain; pointer-events: none; }
.logo-label { font-size: 10px; color: #aaa; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; flex-shrink: 0; margin-top: 3px; }
.logo-delete-btn { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; background: rgba(233,69,96,.85); color: #fff; border: none; border-radius: 50%; font-size: 8px; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 5; }
.logo-item:hover .logo-delete-btn { display: flex; }

/* Right Panel (Props) */
#props-panel { background: #1e1e3a; overflow: hidden; display: flex; flex-direction: column; border-left: 1px solid #2a2a4a; }
.panel-header { padding: 12px 14px; border-bottom: 1px solid #2a2a4a; flex-shrink: 0; }
.panel-header h2 { font-size: 14px; font-weight: 700; color: #fff; }

/* Canvas */
#canvas-area { background: #252545; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; }
#canvas-container { position: relative; box-shadow: 0 4px 24px rgba(0,0,0,.4); }
#canvas { position: relative; background: #fff; overflow: hidden; }
#canvas-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
#canvas-grid { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
#canvas-grid.hidden { display: none; }
#canvas-grid line { stroke: rgba(0,0,0,0.12); stroke-width: 0.5; }
#snap-guides { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
#snap-guides .guide-h, #snap-guides .guide-v { position: absolute; background: #e94560; }
#snap-guides .guide-h { height: 1px; left: 0; right: 0; }
#snap-guides .guide-v { width: 1px; top: 0; bottom: 0; }
#spacing-guides { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
#spacing-guides .spacing-indicator { position: absolute; display: flex; align-items: center; justify-content: center; }
#spacing-guides .spacing-indicator.horizontal { height: 1px; background: #4ecdc4; }
#spacing-guides .spacing-indicator.vertical { width: 1px; background: #4ecdc4; }
#spacing-guides .spacing-label { position: absolute; background: #4ecdc4; color: #000; font-size: 8px; font-weight: 700; padding: 1px 3px; border-radius: 2px; white-space: nowrap; }
#placed-parts { position: absolute; inset: 0; z-index: 2; }

/* Placed Parts */
.placed-part { position: absolute; cursor: move; user-select: none; outline: 2px solid transparent; transition: outline-color .1s; }
.placed-part:hover { outline-color: rgba(233,69,96,.4); }
.placed-part.selected { outline: 2px solid #e94560; }
.placed-part .delete-btn { position: absolute; top: -10px; right: -10px; width: 18px; height: 18px; background: #e94560; color: #fff; border: none; border-radius: 50%; font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 10; line-height: 1; }
.placed-part.selected .delete-btn { display: flex; }
.placed-part .edit-placed-btn { position: absolute; top: -10px; left: -10px; width: 18px; height: 18px; background: #4ecdc4; color: #000; border: none; border-radius: 50%; font-size: 9px; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 10; }
.placed-part.selected .edit-placed-btn { display: flex; }

/* Props Panel Content */
#props-content { padding: 12px 14px; overflow-y: auto; flex: 1; }
#props-content .hint { color: #777; font-size: 13px; text-align: center; margin-top: 20px; line-height: 1.8; }
.prop-group { margin-bottom: 14px; }
.prop-group label { display: block; font-size: 12px; color: #aaa; margin-bottom: 4px; }
.prop-group input, .prop-group select { width: 100%; padding: 7px 10px; border: 1px solid #3a3a5a; border-radius: 4px; background: #2a2a4a; color: #e0e0e0; font-size: 13px; font-family: inherit; }
.prop-group input[type="color"] { height: 36px; padding: 2px; cursor: pointer; }
.prop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prop-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.align-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 10px; }
.align-buttons button { padding: 7px; border: 1px solid #3a3a5a; border-radius: 4px; background: #2a2a4a; color: #e0e0e0; font-size: 13px; cursor: pointer; }
.align-buttons button:hover { background: #3a3a5a; border-color: #e94560; }
.prop-section { border-top: 1px solid #2a2a4a; padding-top: 12px; margin-top: 12px; }
.prop-section-title { font-size: 12px; font-weight: 700; color: #e94560; margin-bottom: 10px; }
.prop-btn { padding: 9px 14px; border: 1px solid #3a3a5a; border-radius: 4px; background: #2a2a4a; color: #e0e0e0; font-size: 13px; cursor: pointer; font-family: inherit; text-align: center; }
.prop-btn:hover { background: #3a3a5a; border-color: #e94560; }
.prop-btn.danger { background: #5c1a1a; border-color: #8b3a3a; color: #ff6b6b; }
.prop-btn.primary { background: #2a4a6a; border-color: #3a6a8a; color: #7abfff; }
.text-card { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 5px; padding: 10px; margin-bottom: 8px; }
.text-card-label { font-size: 11px; color: #e94560; font-weight: 700; margin-bottom: 8px; }

/* Parts CSS (from original) */
.part { position: relative; display: block; line-height: 0; flex: 0 0 auto; overflow: visible; font-family: "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic", Meiryo, sans-serif; }
.txt { position: absolute; font-weight: 900; line-height: 1; letter-spacing: 0; white-space: pre; text-align: center; outline: 0; min-width: 1px; min-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.outline { paint-order: stroke fill; -webkit-text-stroke: 0px; letter-spacing: 0; }
.flowbox { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1; }
.flowbox .flow { position: static; display: block; }
.transparent { background: transparent; }
/* Burner type */
.burner { position: relative; overflow: hidden; }
.burner-inner { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 48px; background: #f7f7f7; border-radius: 4px; }
/* Spec rows (右上2段/3段/4段) */
.spec-rows { display: flex; flex-direction: column; overflow: hidden; }
.spec-row { display: flex; align-items: center; justify-content: center; border: 1px solid #b8b2ad; border-bottom: 0; flex: 1; }
.spec-row:last-child { border-bottom: 1px solid #b8b2ad; }
.spec-row .txt { position: static; }
/* Size table (右上サイズ) */
.size-table { display: flex; flex-direction: column; overflow: hidden; }
.size-row { position: relative; display: flex; align-items: center; justify-content: space-between; border: 1px solid #b8b2ad; border-bottom: 0; flex: 1; padding: 0 4px; }
.size-row:last-child { border-bottom: 1px solid #b8b2ad; }
.size-row .txt { position: static; }
.size-row .size-label { font-weight: 600; }
.size-row .size-value { font-weight: 850; text-align: right; }
/* Shelf count (庫内段数) */
.shelf-count { position: relative; overflow: hidden; }
/* Diameter (使用可能鍋最大直径) */
.diameter { position: relative; overflow: hidden; }
/* Set badge (右下セット) */
.set-badge { position: relative; overflow: visible; }
/* Topic (右上トピック) */
.topic { display: flex; flex-direction: column; gap: 7px; }
.topic-block { height: 119px; background: #fff4c9; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.topic-block .txt { position: static; }
/* Gas/Electric (右上 都市ガス/プロパン/電気式) */
.gas-electric { position: relative; overflow: hidden; }
.gas-body { position: absolute; left: 6px; right: 6px; bottom: 7px; height: 52px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 4px; }
.gas-body .txt { position: static; }
/* Diagonal (右上 IH_ガス火) */
.diagonal { position: relative; overflow: hidden; }
/* Right size (右上 サイズ cm) */
.right-size { position: relative; overflow: hidden; }
/* Depth (右上深さ) */
.depth { position: relative; overflow: hidden; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-content { position: relative; background: #1e1e3a; border: 1px solid #3a3a5a; border-radius: 12px; width: 500px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-content.modal-wide { width: 92vw; max-width: 1400px; height: 88vh; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #2a2a4a; }
.modal-header h3 { font-size: 18px; color: #fff; }
.modal-close { background: none; border: none; color: #aaa; font-size: 20px; cursor: pointer; }
#version-list { overflow-y: auto; padding: 12px; flex: 1; }
.version-item { display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 6px; margin-bottom: 6px; }
.version-item .ver-info { flex: 1; }
.version-item .ver-name { font-size: 14px; color: #fff; font-weight: 600; }
.version-item .ver-date { font-size: 12px; color: #888; margin-top: 2px; }
.version-item button { padding: 6px 12px; border-radius: 4px; border: 1px solid #3a3a5a; background: #333360; color: #e0e0e0; font-size: 13px; cursor: pointer; font-family: inherit; margin-left: 4px; }
.version-item button:hover { background: #e94560; border-color: #e94560; color: #fff; }
.no-items { color: #777; text-align: center; padding: 20px; font-size: 14px; }

/* Editor Modal */
.editor-body { display: grid; grid-template-columns: 1fr 1fr; flex: 1; overflow: hidden; min-height: 0; }
.editor-preview-area { display: flex; align-items: center; justify-content: center; padding: 32px; background: #252545; border-right: 1px solid #2a2a4a; min-height: 200px; overflow: auto; }
#editor-preview { background: #fff; padding: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; min-width: 200px; min-height: 150px; }
.editor-controls { padding: 20px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.editor-controls .prop-group { margin-bottom: 12px; }
.editor-controls .prop-group label { font-size: 15px; color: #aaa; margin-bottom: 6px; display: block; font-weight: 600; }
.editor-controls .prop-group input, .editor-controls .prop-group select { width: 100%; padding: 10px 14px; border: 1px solid #3a3a5a; border-radius: 4px; background: #2a2a4a; color: #e0e0e0; font-size: 15px; font-family: inherit; }
.editor-controls .prop-group input[type="color"] { height: 44px; padding: 2px; cursor: pointer; }
.editor-controls .text-block { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 6px; padding: 16px; margin-bottom: 14px; }
.editor-controls .text-block-title { font-size: 14px; color: #e94560; font-weight: 700; margin-bottom: 10px; }
.editor-footer { display: flex; gap: 12px; padding: 16px 24px; border-top: 1px solid #2a2a4a; justify-content: flex-end; }
.editor-footer .prop-btn { font-size: 15px; padding: 10px 20px; }

/* Occupancy Bar */
.occupancy-bar { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 10; background: rgba(30,30,58,.92); border: 1px solid #3a3a5a; border-radius: 6px; padding: 5px 14px; cursor: pointer; transition: all .15s; user-select: none; }
.occupancy-bar.hidden { display: none; }
.occupancy-bar:hover { border-color: #e94560; background: rgba(40,40,70,.95); }
.occupancy-bar #occupancy-text { font-size: 11px; font-weight: 700; color: #4ecdc4; }
.occupancy-bar.active { border-color: #e94560; background: rgba(233,69,96,.15); }
#occupancy-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.occupancy-highlight { position: absolute; background: rgba(200,30,50,.35); border: 1px solid rgba(200,30,50,.6); border-radius: 0; pointer-events: none; }

/* Settings Modal (same size as editor) */
.modal-content.modal-xlarge { width: 92vw; max-width: 1400px; height: 88vh; max-height: 90vh; }
.settings-body { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; }
.settings-tabs { display: flex; border-bottom: 1px solid #2a2a4a; flex-shrink: 0; }
.settings-tab-btn { flex: 1; padding: 16px; border: none; background: transparent; color: #888; font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent; transition: all .15s; }
.settings-tab-btn:hover { color: #ccc; background: #252550; }
.settings-tab-btn.active { color: #e94560; border-bottom-color: #e94560; }
.settings-tab-btn i { margin-right: 4px; }
.settings-content { flex: 1; overflow: hidden; min-height: 0; }
.settings-tab-content { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.settings-tab-content.active { display: flex; }
.settings-toolbar { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #2a2a4a; align-items: center; flex-shrink: 0; }
.settings-toolbar input { flex: 1; padding: 10px 14px; border-radius: 4px; border: 1px solid #3a3a5a; background: #2a2a4a; color: #e0e0e0; font-size: 15px; font-family: inherit; }
.settings-grid { overflow-y: auto; flex: 1; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-content: start; min-height: 0; }
.settings-item { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: all .12s; position: relative; }
.settings-item:hover { border-color: #4a4a7a; }
.settings-item .si-preview { width: 100%; height: 90px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.settings-item .si-preview .part-preview { transform-origin: center; pointer-events: none; position: absolute; }
.settings-item .si-preview img { max-width: 100%; max-height: 90px; object-fit: contain; }
.settings-item.si-template .si-preview-tpl { height: 120px; background: #1a1a2e; border-radius: 4px; border: 1px solid #3a3a5a; }
.settings-item.si-template .si-preview-tpl img { max-height: 120px; border-radius: 3px; }
#stab-s-templates .settings-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
#stab-s-templates .settings-item { padding: 12px; gap: 8px; }
#stab-s-templates .si-name { font-size: 13px; }
#stab-s-templates .si-actions button { padding: 6px 8px; font-size: 12px; }
.settings-item .si-name { font-size: 14px; color: #ccc; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.settings-item .si-actions { display: flex; gap: 5px; width: 100%; }
.settings-item .si-actions button { flex: 1; padding: 8px 12px; border-radius: 4px; border: 1px solid #3a3a5a; background: #333360; color: #e0e0e0; font-size: 14px; cursor: pointer; font-family: inherit; transition: all .12s; }
.settings-item .si-actions button:hover { background: #e94560; border-color: #e94560; color: #fff; }
.settings-item .si-actions button.si-danger:hover { background: #8b3a3a; border-color: #8b3a3a; }
.settings-item .si-badge { position: absolute; top: 6px; right: 6px; font-size: 11px; background: #e94560; color: #fff; padding: 3px 8px; border-radius: 8px; }
.settings-no-items { grid-column: 1 / -1; text-align: center; color: #777; padding: 40px; font-size: 16px; }

/* ========== PART CREATOR WIZARD ========== */
.creator-wizard { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; padding: 16px; }
.cr-step { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; }
.cr-step.hidden { display: none; }
.cr-step-header { flex-shrink: 0; margin-bottom: 14px; }
.cr-step-header h4 { font-size: 16px; color: #e0e0e0; margin-bottom: 4px; }
.cr-step-header h4 i { color: #e94560; margin-right: 6px; }
.cr-step-desc { font-size: 13px; color: #999; }
.cr-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; overflow-y: auto; flex: 1; align-content: start; padding: 4px; }
.cr-category-card { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 10px; padding: 20px 16px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.cr-category-card:hover { border-color: #e94560; background: #333360; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(233,69,96,.2); }
.cr-category-card .cr-cat-icon { font-size: 32px; color: #e94560; }
.cr-category-card .cr-cat-name { font-size: 14px; font-weight: 700; color: #e0e0e0; }
.cr-category-card .cr-cat-desc { font-size: 11px; color: #888; line-height: 1.4; }
.cr-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; overflow-y: auto; flex: 1; align-content: start; padding: 4px; }
.cr-preset-card { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 8px; padding: 14px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cr-preset-card:hover { border-color: #4ecdc4; background: #2a3a4a; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(78,205,196,.2); }
.cr-preset-card .cr-preset-preview { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: center; background: #1a1a2e; border-radius: 6px; padding: 12px; overflow: hidden; }
.cr-preset-card .cr-preset-name { font-size: 12px; color: #aaa; text-align: center; }
.cr-customize-body { display: flex; flex: 1; gap: 16px; overflow: hidden; min-height: 0; }
.cr-customize-preview { flex: 1; display: flex; align-items: center; justify-content: center; background: #1a1a2e; border-radius: 8px; padding: 20px; min-height: 0; overflow: auto; }
.cr-customize-controls { width: 320px; overflow-y: auto; padding: 4px 4px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.cr-customize-footer { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid #2a2a4a; margin-top: 12px; }

/* ========== BATCH GENERATION ========== */
.batch-body { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; padding: 16px; }
.batch-step { display: flex; flex-direction: column; flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.batch-step.hidden { display: none; }
.batch-step-header { flex-shrink: 0; margin-bottom: 12px; }
.batch-step-header h4 { font-size: 16px; color: #e0e0e0; margin-bottom: 6px; }
.batch-step-header h4 i { color: #e94560; margin-right: 6px; }
.batch-desc { font-size: 13px; color: #999; }
.batch-template-grid { overflow-y: auto; flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-content: start; min-height: 0; padding: 4px; }
.batch-tpl-card { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 8px; padding: 12px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.batch-tpl-card:hover { border-color: #e94560; background: #333360; }
.batch-tpl-card.btc-selected { border-color: #4ecdc4; background: #2a3a4a; box-shadow: 0 0 0 2px rgba(78,205,196,.3); }
.btc-checkbox { position: absolute; top: 8px; left: 8px; z-index: 2; cursor: pointer; display: flex; align-items: center; }
.btc-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: #4ecdc4; cursor: pointer; }
.batch-export-bar { flex-shrink: 0; padding: 12px 0; display: flex; align-items: center; gap: 12px; }
.batch-tpl-card .btc-preview { width: 100%; height: 80px; display: flex; align-items: center; justify-content: center; background: #1a1a2e; border-radius: 4px; overflow: hidden; }
.batch-tpl-card .btc-preview img { max-width: 100%; max-height: 80px; object-fit: contain; }
.batch-tpl-card .btc-name { font-size: 13px; color: #ccc; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.batch-tpl-card .btc-meta { font-size: 11px; color: #888; }
.batch-import-row { display: flex; align-items: center; gap: 12px; }
.batch-filename { font-size: 13px; color: #aaa; }
.batch-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.batch-preview-toolbar span { font-size: 14px; color: #ccc; }
.batch-gallery { overflow-y: auto; flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-content: start; min-height: 0; padding: 4px; }
.batch-gallery-item { background: #2a2a4a; border: 1px solid #3a3a5a; border-radius: 8px; padding: 8px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.batch-gallery-item:hover { border-color: #e94560; background: #333360; }
.batch-gallery-item .bgi-img { width: 100%; aspect-ratio: 1; background: #1a1a2e; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.batch-gallery-item .bgi-img img { width: 100%; height: 100%; object-fit: cover; }
.batch-gallery-item .bgi-img canvas { width: 100%; height: 100%; object-fit: cover; }
.batch-gallery-item .bgi-name { font-size: 11px; color: #aaa; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.batch-gallery-item .bgi-dl { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; background: rgba(233,69,96,.9); color: #fff; border: none; border-radius: 50%; font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center; }
.batch-gallery-item:hover .bgi-dl { display: flex; }
.batch-gallery-item .bgi-occ { background: rgba(30,30,58,.92); border: 1px solid #3a3a5a; border-radius: 6px; padding: 3px 10px; font-size: 10px; font-weight: 700; color: #4ecdc4; text-align: center; white-space: nowrap; align-self: center; }
.batch-edit-occ-bar { background: rgba(30,30,58,.92); border: 1px solid #3a3a5a; border-radius: 6px; padding: 5px 14px; flex-shrink: 0; text-align: center; width: auto; }
.batch-edit-occ-bar span { font-size: 11px; font-weight: 700; color: #4ecdc4; }
.batch-edit-body { display: flex; flex: 1; overflow: hidden; gap: 16px; min-height: 0; }
.batch-edit-preview-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1a1a2e; border-radius: 8px; overflow: hidden; min-height: 0; padding: 12px; gap: 8px; }
#batch-edit-canvas { width: 500px; height: 500px; position: relative; background: #fff; overflow: hidden; flex-shrink: 0; }
.batch-edit-controls { width: 320px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.batch-edit-controls .text-block { background: #2a2a4a; border-radius: 6px; padding: 10px; }
.batch-edit-controls .text-block-title { font-size: 13px; color: #e94560; margin-bottom: 8px; font-weight: 600; }
.batch-edit-controls .prop-group { margin-bottom: 6px; }
.batch-edit-controls label { display: block; font-size: 12px; color: #999; margin-bottom: 3px; }
.batch-edit-controls input[type="text"] { width: 100%; padding: 7px 10px; border-radius: 4px; border: 1px solid #3a3a5a; background: #1e1e3a; color: #e0e0e0; font-size: 14px; font-family: inherit; }
.batch-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: #2a2a4a; }
.batch-progress-bar { height: 100%; background: #e94560; transition: width .3s; }

/* Template Edit Bar */
.tpl-edit-bar { background: linear-gradient(135deg, #0f3460, #1a5276); border-bottom: 2px solid #4ecdc4; padding: 8px 16px; z-index: 50; }
.tpl-edit-bar.hidden { display: none; }
.tpl-edit-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tpl-edit-indicator { font-size: 13px; color: #b8e6d8; display: flex; align-items: center; gap: 8px; }
.tpl-edit-indicator i { color: #4ecdc4; }
.tpl-edit-indicator strong { color: #fff; }
.tpl-edit-actions { display: flex; gap: 8px; }
.tpl-edit-btn { padding: 6px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-family: inherit; transition: all .2s; }
.tpl-edit-btn.save { background: #2a6a4a; border-color: #3a8a5a; color: #7affbf; }
.tpl-edit-btn.save:hover { background: #3a8a5a; }
.tpl-edit-btn.new { background: #1a4a7a; border-color: #2a6aaa; color: #7ac8ff; }
.tpl-edit-btn.new:hover { background: #2a6aaa; }
.tpl-edit-btn.cancel { background: #4a2a2a; border-color: #7a3a3a; color: #ffaaaa; }
.tpl-edit-btn.cancel:hover { background: #6a3a3a; }

/* ===== Tutorial Styles v2 ===== */
.tutorial-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); z-index: 9990; transition: opacity .3s; pointer-events: none; }
.tutorial-overlay.hidden { display: none; }
.tutorial-highlight { position: fixed; z-index: 9998; border: 3px solid #4ecdc4; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0,0,0,.5), 0 0 24px rgba(78,205,196,.4); transition: all .35s ease; pointer-events: none; }
.tutorial-highlight.hidden { display: none; }
.tutorial-clickable { position: relative; z-index: 9995 !important; pointer-events: auto !important; }
.tutorial-tooltip { position: fixed; z-index: 9999; background: #1e1e3a; border: 2px solid #4ecdc4; border-radius: 14px; padding: 22px 26px; width: 400px; max-width: calc(100vw - 32px); box-shadow: 0 10px 50px rgba(0,0,0,.6), 0 0 20px rgba(78,205,196,.12); color: #e0e0e0; font-family: 'Noto Sans JP', sans-serif; animation: ttFadeIn .3s ease; }
.tutorial-tooltip.hidden { display: none; }
@keyframes ttFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.tt-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tt-section-badge { background: linear-gradient(135deg, #4ecdc4, #44a8b3); color: #1a1a2e; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 12px; }
.tt-progress { font-size: 12px; color: #888; }
.tt-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.tt-text { font-size: 14px; line-height: 1.9; color: #ccc; margin-bottom: 18px; }
.tt-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tt-actions-right { display: flex; align-items: center; gap: 10px; }
.tt-btn { padding: 9px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; font-family: inherit; transition: all .2s; }
.tt-btn-back { background: #2a2a4a; color: #aaa; font-size: 12px; padding: 7px 14px; }
.tt-btn-back:hover { background: #3a3a5a; color: #fff; }
.tt-btn-next { background: #4ecdc4; color: #1a1a2e; }
.tt-btn-next:hover { background: #7affbf; transform: translateY(-1px); }
.tt-hint { font-size: 13px; color: #4ecdc4; font-weight: 500; animation: ttPulse 1.5s infinite; }
@keyframes ttPulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.tt-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid #3a3a5a; text-align: center; }
.tt-btn-end { background: none; border: none; color: #666; font-size: 12px; cursor: pointer; font-family: inherit; padding: 4px 12px; }
.tt-btn-end:hover { color: #e94560; }

/* Tutorial Complete & Popup */
.tt-complete { text-align: center; padding: 16px 0; }
.tt-complete-icon { font-size: 48px; margin-bottom: 12px; }
.tt-complete-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.tt-complete-text { font-size: 14px; line-height: 1.8; color: #ccc; margin-bottom: 20px; }
.tt-popup { text-align: center; padding: 20px 10px; }
.tt-popup-icon { font-size: 48px; margin-bottom: 14px; }
.tt-popup-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.tt-popup-text { font-size: 14px; line-height: 1.8; color: #ccc; margin-bottom: 24px; }
.tt-popup-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.tt-btn-skip { background: #3a3a5a; color: #aaa; }
.tt-btn-skip:hover { background: #4a4a6a; color: #fff; }

/* ===== Help Modal (大きな画面) ===== */
.tutorial-help-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.7); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tutorial-help-modal.hidden { display: none; }
.help-modal-inner { background: #1a1a2e; border: 2px solid #3a3a5a; border-radius: 20px; width: 100%; max-width: 720px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 80px rgba(0,0,0,.7); overflow: hidden; }
.help-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 32px 16px; border-bottom: 1px solid #2a2a4a; }
.help-modal-header h2 { font-size: 22px; font-weight: 700; color: #fff; margin: 0; }
.help-modal-header h2 i { color: #4ecdc4; margin-right: 10px; }
.help-modal-close { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; padding: 8px; border-radius: 8px; transition: all .2s; }
.help-modal-close:hover { color: #fff; background: #3a3a5a; }
.help-modal-body { padding: 24px 32px; overflow-y: auto; flex: 1; }
.help-modal-desc { font-size: 14px; color: #aaa; margin-bottom: 24px; line-height: 1.6; }
.help-sections { display: flex; flex-direction: column; gap: 16px; }
.help-section-card { display: flex; align-items: flex-start; gap: 18px; padding: 20px 22px; background: #222244; border: 1px solid #3a3a5a; border-radius: 14px; transition: all .2s; }
.help-section-card:hover { border-color: #4ecdc4; background: #282850; }
.help-section-icon { width: 48px; height: 48px; background: linear-gradient(135deg, #4ecdc4, #44a8b3); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #1a1a2e; flex-shrink: 0; }
.help-section-info { flex: 1; }
.help-section-info h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.help-section-info p { font-size: 13px; color: #aaa; margin: 0 0 10px; line-height: 1.5; }
.help-section-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.help-step-tag { font-size: 11px; background: #2a2a4a; color: #9aa; padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.help-section-start { background: linear-gradient(135deg, #4ecdc4, #44a8b3); color: #1a1a2e; border: none; padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .2s; font-family: inherit; align-self: center; }
.help-section-start:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(78,205,196,.3); }
.help-section-start i { margin-right: 6px; }
.help-modal-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid #2a2a4a; text-align: center; }
.help-start-all { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; padding: 14px 36px; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s; font-family: inherit; }
.help-start-all:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(102,126,234,.4); }
.help-start-all i { margin-right: 8px; }

/* Help button style */
#btn-help { background: linear-gradient(145deg, #5de0d6 0%, #3ab8b0 50%, #2a9d96 100%); border: none; color: #1a3a3a; font-size: 14px; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .25s; box-shadow: 0 2px 8px rgba(78,205,196,.25), inset 0 1px 1px rgba(255,255,255,.2); }
#btn-help:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 4px 14px rgba(78,205,196,.45); }
#btn-help:active { transform: translateY(0) scale(.97); }
#btn-help i { filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }

/* ===== Tag styles ===== */
.si-info { flex: 1; min-width: 0; }
.si-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.si-tag { font-size: 10px; background: #2a3a4a; color: #4ecdc4; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.tag-suggestions { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 0; }
.tag-suggestion-btn { font-size: 11px; background: #2a3a5a; color: #4ecdc4; border: 1px solid #3a5a6a; padding: 3px 10px; border-radius: 10px; cursor: pointer; font-family: inherit; transition: all .2s; }
.tag-suggestion-btn:hover { background: #4ecdc4; color: #1a1a2e; border-color: #4ecdc4; }

/* Background scale indicator */
.bg-scale-indicator { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; z-index: 5; pointer-events: none; transition: opacity .3s; }
.bg-scale-indicator.hidden { opacity: 0; }
#canvas-bg { cursor: grab; }

/* ===== Batch Help Page ===== */
.batch-help-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s ease;
}
.batch-help-container {
  background: #1e1e3a; border-radius: 16px; width: 100%; max-width: 780px;
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.batch-help-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid #2a2a4a; flex-shrink: 0;
}
.batch-help-header h2 { font-size: 20px; font-weight: 700; color: #fff; margin: 0; }
.batch-help-header h2 i { color: #4ecdc4; margin-right: 10px; }
.batch-help-close {
  background: none; border: none; color: #888; font-size: 28px; cursor: pointer;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: all .2s;
}
.batch-help-close:hover { background: #2a2a4a; color: #fff; }
.batch-help-body {
  overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 24px;
}
.batch-help-body::-webkit-scrollbar { width: 6px; }
.batch-help-body::-webkit-scrollbar-track { background: transparent; }
.batch-help-body::-webkit-scrollbar-thumb { background: #3a3a5a; border-radius: 3px; }

/* Overview */
.bh-overview {
  background: linear-gradient(135deg, #1a2a4a, #1e2e5a); border: 1px solid #2a4a6a;
  border-radius: 12px; padding: 20px; line-height: 1.7;
}
.bh-overview p { margin: 0 0 8px; color: #ccc; font-size: 14px; }
.bh-overview p:last-child { margin-bottom: 0; }
.bh-overview strong { color: #4ecdc4; }

/* Flow diagram */
.bh-flow h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 14px; }
.bh-flow h3 i { color: #4ecdc4; margin-right: 8px; }
.bh-flow-steps {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  background: #15152a; border-radius: 12px; padding: 16px;
}
.bh-flow-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #1e2e4a; border: 1px solid #2a4a6a; border-radius: 10px; padding: 10px 14px;
  min-width: 70px;
}
.bh-num {
  width: 24px; height: 24px; background: #4ecdc4; color: #1a1a2e; font-size: 13px;
  font-weight: 700; border-radius: 50%; display: flex; align-items: center;
  justify-content: center;
}
.bh-flow-step span:last-child { font-size: 11px; color: #aaa; white-space: nowrap; }
.bh-flow-arrow { color: #4ecdc4; font-size: 12px; }

/* Sections */
.bh-section { background: #15152a; border-radius: 12px; padding: 20px; }
.bh-section h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.bh-step-badge {
  background: linear-gradient(135deg, #4ecdc4, #44a8b3); color: #1a1a2e;
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 6px;
  letter-spacing: 0.5px;
}
.bh-content { color: #bbb; font-size: 14px; line-height: 1.7; }
.bh-content p { margin: 0 0 10px; }
.bh-content ul { margin: 8px 0; padding-left: 20px; }
.bh-content ul li { margin-bottom: 6px; }
.bh-content strong { color: #e8e8e8; }
.bh-content code { background: #2a2a4a; color: #4ecdc4; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* Tip box */
.bh-tip {
  background: #1a2a3a; border: 1px solid #2a4a5a; border-left: 3px solid #4ecdc4;
  border-radius: 8px; padding: 10px 14px; margin-top: 12px; font-size: 13px; color: #9cc;
}
.bh-tip i { color: #4ecdc4; margin-right: 6px; }

/* Rules box */
.bh-rules { background: #1a1a2e; border: 1px solid #3a2a2a; border-radius: 10px; padding: 14px; margin: 10px 0; }
.bh-rules h4 { font-size: 13px; font-weight: 700; color: #f8a; margin: 0 0 8px; }
.bh-rules h4 i { margin-right: 6px; }
.bh-rules ul { margin: 0; padding-left: 18px; }
.bh-rules li { margin-bottom: 5px; font-size: 13px; }

/* Table explain */
.bh-table-explain { margin: 12px 0; }
.bh-table-explain h4 { font-size: 13px; font-weight: 700; color: #aaa; margin: 0 0 8px; }
.bh-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bh-table th { background: #2a2a4a; color: #4ecdc4; padding: 8px 10px; text-align: left; font-weight: 600; border: 1px solid #3a3a5a; }
.bh-table td { padding: 7px 10px; border: 1px solid #2a2a4a; color: #ccc; }
.bh-table-example td { font-family: 'Consolas', monospace; font-size: 11px; background: #1a1a2e; }
.bh-example { margin-top: 14px; }
.bh-example h4 { font-size: 13px; font-weight: 700; color: #aaa; margin: 0 0 8px; }

/* FAQ */
.bh-faq h3 i { color: #f8b64c; }
.bh-faq dl { margin: 0; }
.bh-faq dt { font-size: 14px; font-weight: 700; color: #e8e8e8; margin: 14px 0 6px; padding-left: 4px; }
.bh-faq dt:first-child { margin-top: 0; }
.bh-faq dd { margin: 0 0 0 16px; font-size: 13px; color: #aaa; line-height: 1.6; }

/* Responsive */
@media (max-width: 600px) {
  .batch-help-container { max-height: 95vh; border-radius: 12px; }
  .batch-help-header { padding: 16px 20px; }
  .batch-help-body { padding: 20px; }
  .bh-flow-steps { flex-direction: column; gap: 4px; }
  .bh-flow-arrow { transform: rotate(90deg); }
  .bh-table { font-size: 11px; }
}

/* Batch modal header actions */
.modal-header-actions { display: flex; align-items: center; gap: 10px; }
.batch-help-btn {
  background: linear-gradient(135deg, #2a3a5a, #1e2e4a); border: 1px solid #3a5a7a;
  color: #4ecdc4; font-size: 12px; font-weight: 600; padding: 6px 12px;
  border-radius: 8px; cursor: pointer; transition: all .2s; font-family: inherit;
  display: flex; align-items: center; gap: 5px;
}
.batch-help-btn:hover { background: #4ecdc4; color: #1a1a2e; border-color: #4ecdc4; }
.batch-help-btn i { font-size: 13px; }

/* Template delete button */
.tpl-delete-btn {
  background: none !important; border: 1px solid #4a2a2a !important; color: #e55 !important;
  width: 32px !important; height: 32px !important; min-width: 32px !important;
  padding: 0 !important; display: flex !important; align-items: center; justify-content: center;
  border-radius: 6px !important; font-size: 12px !important; cursor: pointer; transition: all .2s;
}
.tpl-delete-btn:hover { background: #e55 !important; color: #fff !important; border-color: #e55 !important; }

/* Template delete button */
.tpl-delete-btn {
  background: none !important; border: 1px solid #4a2a2a !important; color: #e55 !important;
  width: 32px !important; height: 32px !important; min-width: 32px !important;
  padding: 0 !important; display: flex !important; align-items: center; justify-content: center;
  border-radius: 6px !important; font-size: 12px !important; cursor: pointer; transition: all .2s;
}
.tpl-delete-btn:hover { background: #e55 !important; color: #fff !important; border-color: #e55 !important; }

/* Tutorial: highlight delete button pulse */
.tpl-delete-btn.tutorial-pulse {
  animation: deleteBtnPulse 1s infinite;
}
@keyframes deleteBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(238,85,85,.6); }
  50% { box-shadow: 0 0 0 8px rgba(238,85,85,0); }
}
