
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600&display=swap');

/* ─── 기본 리셋 ─── */

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #1a1a1a;
    font-family: 'Outfit', sans-serif;
    color: #f8fafc;
}

/* ─── 패스워드 게이트 ─── */

#password-gate {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.gate-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 300px;
}

.gate-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gate-desc {
    font-size: 13px;
    color: #888;
    margin: 0 0 24px;
}

#gate-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

#gate-input:focus {
    border-color: rgba(96, 165, 250, 0.5);
}

#gate-submit {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #3b82f6;
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

#gate-submit:hover {
    background: #2563eb;
}

.gate-error {
    font-size: 13px;
    color: #f87171;
    margin: 12px 0 0;
    height: 18px;
}

/* ─── 2-Screen Scroll Snap ─── */

#scroll-container {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.screen {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
}

.screen-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ─── Screen 1: 런처 헤더 ─── */

.launcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.launcher-title {
    font-size: 26px;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ─── 섹션 제목 ─── */

.section-title {
    font-size: 16px;
    font-weight: 500;
    color: #a0a0a0;
    margin: 24px 0 14px;
}

/* ─── App Grid (Screen 1) ─── */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 24px;
    justify-items: center;
    position: relative;
}

.app-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.app-icon-item:hover {
    transform: scale(1.05);
}

.app-icon-box {
    width: 66px;
    height: 66px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.app-icon-item:hover .app-icon-box {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.app-label {
    font-size: 12px;
    color: #d0d0d0;
    text-align: center;
    width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-btn {
    border-style: dashed !important;
    background: rgba(255, 255, 255, 0.04);
}

/* ─── 추천 가로 카드 (Screen 1) ─── */

.rec-horizontal-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rec-horizontal-list::-webkit-scrollbar {
    display: none;
}

.rec-card {
    flex: 0 0 148px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.rec-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.rec-card-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rec-card-info {
    flex: 1;
}

.rec-card-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.rec-card-desc {
    font-size: 10px;
    color: #888;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-card-btn {
    padding: 4px 12px;
    font-size: 11px;
    align-self: flex-start;
}

.no-rec {
    color: #666;
    text-align: center;
    font-size: 13px;
    padding: 20px 0;
}

/* ─── 스크롤 인디케이터 ─── */

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 36px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.scroll-indicator:hover {
    color: #999;
}

.scroll-indicator-arrow {
    font-size: 20px;
    animation: bounce 1.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ─── Screen 2: 검색바 ─── */

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 0;
    background: #1a1a1a;
}

#search-input {
    flex: 1;
    height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

#search-input::placeholder {
    color: #666;
}

#search-input:focus {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(255, 255, 255, 0.09);
}

/* ─── 검색 결과 / 인기 리스트 아이템 ─── */

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.sr-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-info {
    flex: 1;
    min-width: 0;
}

.sr-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.sr-desc {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sr-popularity {
    font-size: 11px;
    color: #666;
}

/* ─── 버튼 스타일 ─── */

.install-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.install-btn:hover {
    background: #2563eb;
}

.launch-btn {
    background: #22c55e;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.launch-btn:hover {
    background: #16a34a;
}

/* ─── 카테고리 패널 ─── */

.category-section {
    margin-bottom: 24px;
}

.category-header {
    font-size: 16px;
    font-weight: 500;
    color: #c0c0c0;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.category-grid {
    display: flex;
    flex-direction: column;
}

/* ─── 토스트 메시지 ─── */

.toast-message {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 30, 0.95);
    color: #f8fafc;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
    pointer-events: none;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── 드래그 모드: 아이콘 흔들림 (iOS 스타일) ─── */

@keyframes wiggle {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(-2deg); }
    50%  { transform: rotate(0deg); }
    75%  { transform: rotate(2deg); }
    100% { transform: rotate(0deg); }
}

.app-icon-item.wiggle {
    animation: wiggle 0.3s ease-in-out infinite;
    user-select: none;
    -webkit-user-select: none;
}

.app-icon-item.wiggle:hover {
    transform: none;
}

/* ─── 드래그 고스트 (포인터를 따라다니는 복제 아이콘) ─── */

.drag-ghost {
    opacity: 0.85;
    transform: scale(1.15);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
    pointer-events: none;
    z-index: 10000;
}

/* ─── 드래그 placeholder (원래 위치 표시) ─── */

.drag-placeholder {
    opacity: 0.25;
}

.drag-placeholder .app-icon-box {
    border-color: rgba(96, 165, 250, 0.3);
    border-style: dashed;
}

/* ─── 드래그 모드 "완료" 버튼 ─── */

.done-drag-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    animation: fadeIn 0.2s ease;
}

.done-drag-btn:hover {
    background: #2563eb;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── 삭제 드롭 아이콘 (드래그 모드에서 (+)추가 대신 표시) ─── */

.delete-drop-target {
    pointer-events: none;
}

.delete-drop-box {
    border-color: rgba(239, 68, 68, 0.3) !important;
    border-style: dashed !important;
    background: rgba(239, 68, 68, 0.08) !important;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.delete-drop-target.active .delete-drop-box {
    background: rgba(239, 68, 68, 0.35) !important;
    border-color: rgba(239, 68, 68, 0.8) !important;
    transform: scale(1.1);
}

/* ─── 메뉴 오버레이 ─── */

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s;
}

.menu-overlay.show {
    background: rgba(0, 0, 0, 0.4);
}

/* ─── 메뉴 패널 (드롭다운) ─── */

.menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9001;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: #222;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    padding: 24px 0;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.menu-panel.show {
    transform: translateX(0);
}

/* ─── 메뉴 항목 ─── */

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item-text {
    flex: 1;
    min-width: 0;
}

.menu-item-label {
    font-size: 15px;
    font-weight: 500;
    color: #f0f0f0;
    margin-bottom: 2px;
}

.menu-item-desc {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 20px;
}

/* ─── 에디터 오버레이 (전체 화면) ─── */

.editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #1a1a1a;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.25s, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-overlay.show {
    opacity: 1;
    transform: translateX(0);
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 720px;
    margin: 0 auto;
}

/* ─── 에디터 헤더 ─── */

.editor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.editor-back-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.editor-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.editor-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #f0f0f0;
}

/* ─── 에디터 본문 ─── */

.editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    overscroll-behavior: contain;
}

/* ─── 에디터 하단 버튼 ─── */

.editor-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.editor-cancel-btn,
.editor-save-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.editor-cancel-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
}

.editor-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.editor-save-btn {
    background: #3b82f6;
    color: white;
}

.editor-save-btn:hover {
    background: #2563eb;
}

/* ─── 에디터 폼 필드 ─── */

.editor-field {
    margin-bottom: 16px;
}

.editor-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #a0a0a0;
    margin-bottom: 6px;
}

.editor-input,
.editor-select,
.editor-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.editor-input:focus,
.editor-select:focus,
.editor-textarea:focus {
    border-color: rgba(96, 165, 250, 0.5);
}

.editor-input::placeholder,
.editor-textarea::placeholder {
    color: #555;
}

.editor-textarea {
    resize: vertical;
    min-height: 80px;
}

.editor-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.editor-select option {
    background: #2a2a2a;
    color: #f8fafc;
}

/* ─── 라디오 그룹 ─── */

.editor-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #d0d0d0;
    cursor: pointer;
    padding: 6px 0;
}

.editor-radio {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
}

/* ─── 섹션 제목 ─── */

.editor-section-title {
    font-size: 14px;
    font-weight: 500;
    color: #a0a0a0;
    margin: 20px 0 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.editor-note {
    font-size: 13px;
    color: #666;
    margin: 8px 0;
}

/* ─── 이름 검증 상태 ─── */

.editor-name-status {
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
    transition: color 0.2s;
}

.editor-name-status.name-checking {
    color: #888;
}

.editor-name-status.name-available {
    color: #4caf50;
}

.editor-name-status.name-unavailable {
    color: #f44336;
}

/* ─── 버튼 미리보기 ─── */

.editor-preview-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.editor-preview-button {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #e0e0e0;
}

/* ─── 뷰 타입 선택 그리드 ─── */

.editor-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.editor-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #ccc;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.editor-type-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.editor-type-btn.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.editor-type-icon {
    font-size: 20px;
}

.editor-type-label {
    font-size: 12px;
    font-weight: 500;
}

.editor-config-section {
    margin-bottom: 8px;
}

/* ─── 뷰 미리보기 ─── */

.view-preview {
    flex-direction: column;
    align-items: stretch;
}

.view-preview-mock {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
}

.vpm-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.vpm-value {
    font-size: 22px;
    font-weight: 500;
    color: #f0f0f0;
}

.vpm-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 16px;
    color: #e0e0e0;
}

.vpm-tag {
    font-size: 11px;
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

.vpm-graph-placeholder {
    margin-top: 8px;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.vpm-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #f0f0f0;
    padding: 6px 0;
}

/* ─── 계산기 빌더 ─── */

.builder-panel-list {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    min-height: 60px;
    margin-bottom: 12px;
}

.builder-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.builder-panel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: grab;
    transition: background 0.15s;
}

.builder-panel-item:last-child {
    border-bottom: none;
}

.builder-panel-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.builder-panel-item.dragging {
    opacity: 0.4;
}

.builder-panel-item.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border-bottom-color: #3b82f6;
}

.builder-panel-handle {
    font-size: 16px;
    color: #555;
    cursor: grab;
    user-select: none;
}

.builder-panel-type {
    font-size: 16px;
    flex-shrink: 0;
}

.builder-panel-name {
    flex: 1;
    font-size: 13px;
    color: #d0d0d0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.builder-panel-height {
    width: 52px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    font-family: inherit;
    font-size: 12px;
    text-align: center;
    outline: none;
    flex-shrink: 0;
}

.builder-panel-height:focus {
    border-color: rgba(96, 165, 250, 0.5);
}

.builder-panel-del {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.builder-panel-del:hover {
    background: rgba(239, 68, 68, 0.25);
}

.builder-add-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.builder-add-btn {
    flex: 1;
    padding: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: #888;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.builder-add-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ccc;
}

.builder-search-wrap {
    margin-bottom: 16px;
}

.builder-search-results {
    margin-top: 8px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.builder-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.builder-search-item:last-child {
    border-bottom: none;
}

.builder-search-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.builder-search-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.builder-search-info {
    flex: 1;
    min-width: 0;
}

.builder-search-name {
    font-size: 13px;
    font-weight: 500;
    color: #e0e0e0;
}

.builder-search-desc {
    font-size: 11px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.builder-search-add-btn {
    padding: 5px 14px;
    border: none;
    border-radius: 16px;
    background: #3b82f6;
    color: white;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.builder-search-add-btn:hover {
    background: #2563eb;
}
