* { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary: #6366f1; --primary-dark: #4f46e5; --secondary: #64748b; --success: #22c55e; --danger: #ef4444; --warning: #f59e0b; --bg: #0f172a; --surface: #1e293b; --surface-light: #334155; --text: #f1f5f9; --text-muted: #94a3b8; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); overflow-x: hidden; /* body 가로 스크롤 방지 */ } .header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 12px 16px; position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; } .header h1 { font-size: 1.2em; } .header-controls { display: flex; align-items: center; gap: 8px; } .connection-status { font-size: 0.75em; padding: 3px 10px; border-radius: 20px; background: rgba(0,0,0,0.3); } .connection-status.connected { background: var(--success); } .connection-status.disconnected { background: var(--danger); } .btn-icon { width: 36px; height: 36px; border: none; border-radius: 8px; background: rgba(255,255,255,0.2); color: var(--text); font-size: 1em; cursor: pointer; } .btn-icon:active { transform: scale(0.95); background: rgba(255,255,255,0.3); } /* 캐릭터 컨테이너 - 가로 배치 + 가로 스크롤 */ .characters-container { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 12px; padding-bottom: 20px; gap: 12px; min-height: calc(100vh - 60px); align-items: flex-start; -webkit-overflow-scrolling: touch; } .characters-container::-webkit-scrollbar { height: 12px; } .characters-container::-webkit-scrollbar-track { background: var(--surface); border-radius: 6px; } .characters-container::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 6px; } .characters-container::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); } .loading-message { color: var(--text-muted); padding: 20px; text-align: center; width: 100%; } /* 캐릭터 패널 */ .character-panel { width: 480px; min-width: 480px; background: var(--surface); border-radius: 12px; flex-shrink: 0; } .character-header { background: var(--surface-light); padding: 12px; border-radius: 12px 12px 0 0; } .character-header h2 { font-size: 1em; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; } .character-header h2::before { content: '👤'; } .character-content { padding: 12px; } /* 섹션 */ .section { background: rgba(0,0,0,0.2); border-radius: 8px; margin-bottom: 8px; overflow: hidden; } .section-header { padding: 10px 12px; font-weight: 600; font-size: 0.85em; cursor: pointer; display: flex; align-items: center; justify-content: space-between; background: rgba(0,0,0,0.2); } .section-header::after { content: '▼'; font-size: 0.6em; transition: transform 0.3s; } .section-header.collapsed::after { transform: rotate(-90deg); } .section-content { padding: 10px; } .section-content.hidden { display: none; } /* 컨트롤 */ .control-group { margin-bottom: 12px; } .slider-header { display: flex; justify-content: space-between; margin-bottom: 4px; } .slider-header label { font-size: 0.8em; color: var(--text-muted); } .value-input { font-family: monospace; background: var(--bg); border: 1px solid var(--surface-light); border-radius: 4px; padding: 4px 6px; font-size: 0.8em; color: var(--text); width: 80px; text-align: right; } .value-input:focus { outline: none; border-color: var(--primary); } .value-input::-webkit-inner-spin-button, .value-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } .slider-row { display: flex; align-items: center; gap: 4px; } input[type="range"] { flex: 1; height: 32px; -webkit-appearance: none; background: transparent; } input[type="range"]::-webkit-slider-track { height: 5px; background: var(--bg); border-radius: 3px; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: var(--primary); border-radius: 50%; cursor: pointer; margin-top: -7px; } .btn-fine { width: 32px; height: 32px; border: none; border-radius: 6px; background: var(--bg); color: var(--text); font-size: 1em; font-weight: bold; cursor: pointer; } .btn-fine:active { background: var(--primary); } .btn { padding: 10px 14px; border: none; border-radius: 6px; font-size: 0.85em; font-weight: 600; cursor: pointer; width: 100%; margin-top: 6px; } .btn-primary { background: var(--primary); color: white; } .btn-secondary { background: var(--secondary); color: white; } .btn-danger { background: var(--danger); color: white; } .button-group { display: flex; gap: 6px; } .button-group .btn { flex: 1; margin-top: 0; } .calibration-status { text-align: center; padding: 6px; border-radius: 6px; margin-bottom: 10px; background: var(--bg); font-size: 0.8em; } .calibration-status.has-data { background: var(--success); color: white; } select { width: 100%; padding: 8px; border: none; border-radius: 6px; background: var(--bg); color: var(--text); font-size: 0.85em; } .sub-section-title { font-size: 0.75em; color: var(--text-muted); margin: 10px 0 6px 0; padding-bottom: 3px; border-bottom: 1px solid var(--bg); } .toggle-row { display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; } .toggle-label { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 0.8em; } .toggle-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); } .preset-hint { font-size: 0.7em; color: var(--text-muted); margin-bottom: 6px; text-align: center; } .preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; } .preset-btn { padding: 8px 4px; border: none; border-radius: 6px; background: var(--bg); color: var(--text); font-size: 0.7em; cursor: pointer; text-align: center; word-break: break-word; } .preset-btn:active { background: var(--primary); } /* 토스트 */ .toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 10px 20px; border-radius: 8px; background: var(--surface); color: var(--text); font-size: 0.85em; opacity: 0; transition: opacity 0.3s; z-index: 1000; max-width: 85%; text-align: center; } .toast.show { opacity: 1; } .toast.success { background: var(--success); } .toast.error { background: var(--danger); } /* 범위 슬라이더 (MinMax) */ .range-slider-group { margin-bottom: 12px; } .range-slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; } .range-slider-header label { font-size: 0.8em; color: var(--text-muted); } .range-slider-values { display: flex; gap: 8px; font-family: monospace; font-size: 0.75em; } .range-slider-values input { width: 50px; padding: 2px 4px; background: var(--bg); border: 1px solid var(--surface-light); border-radius: 4px; color: var(--text); text-align: center; } .range-slider-container { position: relative; height: 32px; display: flex; align-items: center; } .range-slider-track { position: absolute; width: 100%; height: 5px; background: var(--bg); border-radius: 3px; } .range-slider-fill { position: absolute; height: 5px; background: var(--primary); border-radius: 3px; } .range-slider-container input[type="range"] { position: absolute; width: 100%; pointer-events: none; -webkit-appearance: none; background: transparent; height: 32px; } .range-slider-container input[type="range"]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 18px; height: 18px; background: var(--primary); border-radius: 50%; cursor: pointer; border: 2px solid white; box-shadow: 0 2px 4px rgba(0,0,0,0.3); } .range-slider-container input[type="range"]::-webkit-slider-track { background: transparent; } /* 모바일 - 세로 스크롤 */ @media (max-width: 768px) { .characters-container { flex-direction: column; flex-wrap: nowrap; overflow-x: visible; } .character-panel { width: 100%; min-width: 100%; max-width: 100%; } }