* { box-sizing: border-box; }
        body { margin: 0; overflow: hidden; font-family: 'Noto Sans KR', 'Segoe UI', sans-serif; user-select: none; background-color: #aaccff; }

        #start-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 100; color: #333; transition: opacity 0.5s; background: linear-gradient(135deg, #aaccff 0%, #77aaff 100%); }
        #pause-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 90; cursor: pointer; background: rgba(0,0,0,0.05); }
        #pause-box { background: rgba(0,0,0,0.7); padding: 20px 40px; border-radius: 20px; backdrop-filter: blur(10px); text-align: center; border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 10px 30px rgba(0,0,0,0.2); pointer-events: none; }
        #pause-box h2 { margin: 0 0 10px 0; font-size: 2em; color: white; letter-spacing: 2px; }
        #pause-box p { margin: 0; font-size: 0.95em; color: #aaa; }
        #start-button { padding: 16px 56px; font-size: 1.5em; font-weight: bold; color: white; background: #007aff; border: none; border-radius: 50px; cursor: pointer; box-shadow: 0 10px 20px rgba(0,122,255,0.3); transition: all 0.2s cubic-bezier(0.25,0.8,0.25,1); }
        #start-button:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 15px 25px rgba(0,122,255,0.4); }
        
        #ui-container { position: absolute; top: 20px; left: 20px; display: none; flex-direction: column; gap: 12px; z-index: 120; pointer-events: auto; max-height: calc(100vh - 40px); overflow-y: auto; overflow-x: hidden; padding-right: 6px; }
        #ui-container::-webkit-scrollbar { width: 6px; }
        #ui-container::-webkit-scrollbar-track { background: rgba(255,255,255,0.25); border-radius: 3px; }
        #ui-container::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 3px; }
        .collapsible-panel { position: relative; transition: max-height 0.2s ease, padding 0.2s ease; }
        .panel-toggle { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border: 1px solid rgba(0,0,0,0.12); border-radius: 7px; background: rgba(255,255,255,0.9); color: #444; cursor: pointer; font: 900 14px 'Space Mono', monospace; display: flex; align-items: center; justify-content: center; z-index: 4; pointer-events: auto; }
        .panel-toggle:hover { border-color: #007aff; color: #007aff; background: #fff; }
        .collapsible-panel.panel-collapsed { max-height: 48px !important; overflow: hidden !important; padding-bottom: 12px !important; }
        .collapsible-panel.panel-collapsed .panel-toggle { color: #007aff; }
        .quick-save-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #ddd; }
        .quick-save-row button { height: 32px; border: 1px solid #cde9df; border-radius: 8px; background: #f3fffb; color: #08795f; cursor: pointer; font-size: 12px; font-weight: 900; }
        .quick-save-row button:hover { border-color: #20c997; background: #e8fff6; }
        #ui-guide, #metrics-panel { color: #333; background: rgba(255,255,255,0.95); padding: 20px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); width: 310px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.4); }
        #metrics-panel strong, #ui-guide strong { color: #007aff; display: block; margin-bottom: 12px; font-size: 1.15em; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; }
        .metric-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95em; color: #555; align-items: center; }
        #room-size-panel { color: #333; background: rgba(255,255,255,0.95); padding: 16px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); width: 310px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.4); pointer-events: auto; display: none; }
        .room-size-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; margin-bottom: 10px; }
        .room-size-head strong { color: #0d9488; font-size: 1.05em; font-family: 'Space Mono', monospace; }
        .room-size-head span { color: #777; font-size: 11px; font-weight: 700; }
        #room-preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
        .room-preset-btn { height: 30px; border: 1px solid #d8e2df; background: #f8fffd; color: #33625a; border-radius: 8px; cursor: pointer; font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; }
        .room-preset-btn:hover { border-color: #0d9488; color: #0d9488; background: #ecfffb; }
        .room-preset-btn.active { background: #0d9488; color: #fff; border-color: #0d9488; box-shadow: 0 4px 10px rgba(13,148,136,0.25); }
        .room-custom-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; }
        .room-custom-row label { color: #555; font-size: 11px; font-weight: 800; font-family: 'Space Mono', monospace; }
        .room-custom-row input { width: 100%; margin-top: 3px; height: 30px; border: 1px solid #d6d6d6; border-radius: 7px; padding: 0 6px; font: 700 12px 'Space Mono', monospace; color: #333; background: white; }
        .room-custom-row input:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 2px rgba(13,148,136,0.12); }
        #room-size-apply { height: 30px; padding: 0 10px; border: none; border-radius: 7px; background: #0d9488; color: #fff; font-weight: 800; cursor: pointer; white-space: nowrap; }
        #edit-merge-panel { color: #333; background: rgba(255,255,255,0.95); padding: 16px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); width: 310px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.4); pointer-events: auto; display: none; }
        .merge-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; margin-bottom: 10px; }
        .merge-head strong { color: #2563eb; font-size: 1.05em; font-family: 'Space Mono', monospace; }
        .merge-head span { color: #777; font-size: 11px; font-weight: 700; }
        #merge-status { min-height: 42px; color: #555; font-size: 12px; font-weight: 700; line-height: 1.55; margin-bottom: 10px; }
        .merge-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        .merge-actions button { height: 32px; border: 1px solid #d4dded; border-radius: 8px; background: #f8fbff; color: #244b8f; cursor: pointer; font-size: 12px; font-weight: 800; }
        .merge-actions button:hover:not(:disabled) { background: #eaf1ff; border-color: #2563eb; color: #2563eb; }
        .merge-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
        #merge-confirm-btn { background: #2563eb; border-color: #2563eb; color: #fff; }
        #merge-confirm-btn:hover:not(:disabled) { background: #1d4ed8; color: #fff; }
        #edit-plan-panel { color: #333; background: rgba(255,255,255,0.95); padding: 16px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); width: 310px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.4); pointer-events: auto; display: none; }
        #edit-plan-panel.active { border-color: rgba(8,145,178,0.35); box-shadow: 0 8px 25px rgba(8,145,178,0.16); }
        .edit-plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; margin-bottom: 10px; }
        .edit-plan-head strong { color: #0891b2; font-size: 1.05em; font-family: 'Space Mono', monospace; }
        .edit-plan-head span { color: #777; font-size: 11px; font-weight: 700; }
        .edit-plan-row { display: grid; grid-template-columns: 1fr 34px 1fr 34px; gap: 6px; align-items: center; margin-bottom: 10px; }
        .edit-plan-row button { height: 32px; border: 1px solid #cae7ee; border-radius: 8px; background: #f4fdff; color: #0e7490; cursor: pointer; font-size: 12px; font-weight: 900; }
        .edit-plan-row button:hover { background: #e6faff; border-color: #0891b2; }
        #edit-plan-toggle { background: #64748b; border-color: #64748b; color: #fff; }
        #edit-plan-panel.active #edit-plan-toggle { background: #0891b2; border-color: #0891b2; }
        #edit-plan-floor { height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #eef8fb; color: #155e75; font: 900 13px 'Space Mono', monospace; }
        #edit-plan-status { min-height: 38px; color: #555; font-size: 12px; font-weight: 700; line-height: 1.55; }
        
        #legend-panel { color: #333; background: rgba(255,255,255,0.95); padding: 18px 20px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); width: 310px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.4); display: none; flex-direction: column; pointer-events: none; }
        #legend-panel strong { color: #6f42c1; display: block; margin-bottom: 12px; font-size: 1.05em; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; }
        .legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; }
        .legend-item { display: flex; align-items: center; font-size: 0.85em; font-weight: 600; color: #555; transition: all 0.2s ease; }
        .legend-item .color-box { width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }

        #plan-panel { position: absolute; top: 65px; right: 20px; display: none; flex-direction: column; width: 340px; z-index: 110; pointer-events: none; }
        #plan-panel.panel-collapsed #plan-canvas-wrap { display: none; }
        #plan-panel.panel-collapsed { height: auto; }
        #plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; background: rgba(255,255,255,0.95); padding: 12px 14px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); backdrop-filter: blur(12px); pointer-events: auto; }
        #plan-title { font-size: 13px; font-weight: 800; color: #007aff; font-family: 'Space Mono', monospace; }
        .plan-controls { display: flex; gap: 4px; align-items: center; }
        .plan-btn { background: #f0f0f0; border: 1px solid #ddd; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 11px; font-weight: bold; color: #444; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
        .plan-btn:hover { background: #e0e0e0; color: #007aff; border-color: #c0c0c0; }
        
        #plan-canvas-wrap { width: 100%; height: 240px; background: transparent; border: 2px solid rgba(255,255,255,0.9); box-shadow: 0 8px 25px rgba(0,0,0,0.15); pointer-events: auto; position: relative; border-radius: 12px; overflow: hidden; cursor: grab; }
        #plan-canvas-wrap:active { cursor: grabbing; }
        #plan-canvas-wrap::before { content: '드래그(이동) 및 휠(확대/축소)'; position: absolute; bottom: 8px; right: 10px; font-size: 9px; color: rgba(0,0,0,0.5); font-weight: bold; pointer-events: none; z-index: 2; }

        #rule-panel { position: absolute; top: 370px; right: 20px; display: none; flex-direction: column; color: #333; background: rgba(255,255,255,0.95); padding: 20px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); width: 340px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.4); z-index: 10; pointer-events: auto; }
        #rule-panel strong { color: #dc3545; display: block; margin-bottom: 12px; font-size: 1.15em; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; }
        .rule-item { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95em; font-weight: bold; color: #444; align-items: center; }
        .rule-status { padding: 4px 10px; border-radius: 6px; font-size: 0.85em; color: white; letter-spacing: 0.5px; width: 45px; text-align: center; }
        .status-pass { background: #28a745; box-shadow: 0 2px 8px rgba(40,167,69,0.3); }
        .status-fail { background: #dc3545; box-shadow: 0 2px 8px rgba(220,53,69,0.3); }
        .status-idle { background: #6c757d; }
        
        #mode-bar { display: flex; gap: 8px; background: rgba(0,0,0,0.06); padding: 6px; border-radius: 14px; margin-bottom: 5px; pointer-events: auto; }
        .mode-tab { flex: 1; padding: 12px 0; font-size: 14px; font-weight: 700; color: #666; border-radius: 10px; transition: all 0.3s ease; text-align: center; cursor: pointer; }
        .mode-tab.active { background: #007aff; color: white; box-shadow: 0 4px 12px rgba(0,122,255,0.3); }
        #inventory-container { position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 12px; z-index: 10; }
        #tab-bar { display: flex; gap: 6px; background: rgba(0,0,0,0.15); padding: 6px; border-radius: 14px; backdrop-filter: blur(5px); }
        .tab { padding: 10px 20px; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; border-radius: 10px; transition: all 0.2s ease; pointer-events: auto; opacity: 0.7; position: relative; }
        .tab:hover { background: rgba(255,255,255,0.2); opacity: 1; }
        .tab.active { background: #007aff; color: white; opacity: 1; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
        .tab::before { content: attr(data-shortcut); position: absolute; top: 4px; left: 6px; font-size: 9px; opacity: 0.8; }
        #inventory { display: flex; gap: 12px; background: rgba(255,255,255,0.9); padding: 18px; border-radius: 24px; backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 12px 35px rgba(0,0,0,0.15); pointer-events: auto; }
        .slot { width: 95px; height: 95px; border: 2px solid #e0e0e0; background: #ffffff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #444; border-radius: 14px; position: relative; text-align: center; cursor: pointer; transition: all 0.25s cubic-bezier(0.25,0.8,0.25,1); box-shadow: 0 4px 10px rgba(0,0,0,0.04); }
        .slot:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,0.08); border-color: #aaccff; }
        .slot span { font-size: 10px; color: #888; margin-top: 6px; font-weight: 500; }
        .slot.active { border-color: #007aff; color: #007aff; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,122,255,0.25); }
        .cat-badge { padding: 3px 8px; border-radius: 6px; color: white; font-size: 0.85em; font-weight: bold; }
        #crosshair { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; transform: translate(-50%,-50%); pointer-events: none; z-index: 5; border: 2px solid #222; border-radius: 50%; opacity: 0.5; display: none; }
        #edit-tooltip { position: absolute; top: 55%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.85); color: white; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: bold; display: none; z-index: 5; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,0.2); backdrop-filter: blur(4px); text-align: center; line-height: 1.4; white-space: pre-line; }

        #market-fab { position: absolute; bottom: 35px; right: 30px; display: none; z-index: 110; pointer-events: auto; }
        #market-fab button { padding: 14px 26px; font-size: 15px; font-weight: 700; font-family: 'Space Mono', monospace; color: white; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border: 1px solid rgba(255,255,255,0.15); border-radius: 50px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.3); transition: all 0.2s ease; letter-spacing: 1px; }
        #market-fab button:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.4); }

        #market-overlay { position: fixed; inset: 0; background: rgba(10,12,24,0.75); backdrop-filter: blur(18px); z-index: 200; display: none; align-items: center; justify-content: center; animation: mktFadeIn 0.25s ease; }
        #market-overlay.open { display: flex; }
        @keyframes mktFadeIn { from { opacity:0; } to { opacity:1; } }
        #market-panel { width: min(900px, 95vw); height: min(640px, 90vh); background: #0f1120; border-radius: 24px; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06); display: flex; flex-direction: column; overflow: hidden; font-family: 'Noto Sans KR', sans-serif; }

        #market-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 18px; border-bottom: 1px solid rgba(255,255,255,0.07); }
        #market-header h2 { margin: 0; font-family: 'Space Mono', monospace; font-size: 1.3em; color: #e8eaf6; letter-spacing: 2px; }
        #market-header h2 span { color: #4f8fff; }
        .mkt-close { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #aaa; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
        .mkt-close:hover { background: rgba(255,80,80,0.2); color: white; border-color: rgba(255,80,80,0.4); }

        #market-tabs { display: flex; gap: 4px; padding: 0 28px; border-bottom: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.02); }
        .mkt-tab { padding: 14px 20px; font-size: 13px; font-weight: 700; color: #666; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; letter-spacing: 0.5px; }
        .mkt-tab:hover { color: #aaa; }
        .mkt-tab.active { color: #4f8fff; border-bottom-color: #4f8fff; }
        .mkt-content { flex: 1; overflow: hidden; display: none; }
        .mkt-content.active { display: flex; flex-direction: column; }

        #market-search-bar { padding: 16px 28px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
        #market-search-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 10px 16px; color: #e0e0e0; font-size: 14px; font-family: 'Noto Sans KR', sans-serif; outline: none; transition: border-color 0.2s; }
        #market-search-input:focus { border-color: #4f8fff; }
        .mkt-refresh-btn { background: rgba(79,143,255,0.15); border: 1px solid rgba(79,143,255,0.3); color: #4f8fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: 'Noto Sans KR', sans-serif; }
        .mkt-refresh-btn:hover { background: rgba(79,143,255,0.25); }

        #market-grid, #mine-grid { flex: 1; overflow-y: auto; padding: 20px 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-content: start; }
        #market-grid::-webkit-scrollbar, #mine-grid::-webkit-scrollbar { width: 6px; }
        #market-grid::-webkit-scrollbar-track, #mine-grid::-webkit-scrollbar-track { background: transparent; }
        #market-grid::-webkit-scrollbar-thumb, #mine-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

        .mkt-empty { grid-column: 1/-1; text-align: center; padding: 60px 0; color: #444; }
        .mkt-empty .mkt-empty-icon { font-size: 3em; margin-bottom: 12px; }
        .mkt-empty p { margin: 4px 0; font-size: 14px; }

        .building-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; padding: 18px; transition: all 0.25s ease; cursor: default; position: relative; overflow: hidden; }
        .building-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #4f8fff, #a855f7); opacity: 0; transition: opacity 0.25s; }
        .building-card:hover { border-color: rgba(79,143,255,0.3); background: rgba(79,143,255,0.06); transform: translateY(-2px); }
        .building-card:hover::before { opacity: 1; }

        .card-preview { width: 100%; height: 100px; background: linear-gradient(135deg, #1a1f3a 0%, #0d1024 100%); border-radius: 10px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; font-size: 2.5em; border: 1px solid rgba(255,255,255,0.05); position: relative; overflow: hidden; }
        .card-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(79,143,255,0.08), rgba(168,85,247,0.08)); }
        .card-preview-stats { position: absolute; bottom: 6px; right: 8px; font-family: 'Space Mono', monospace; font-size: 9px; color: rgba(255,255,255,0.35); z-index: 1; }
        .card-name { font-size: 14px; font-weight: 700; color: #e0e0e0; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .card-desc { font-size: 12px; color: #666; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; min-height: 36px; }
        .card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        .card-author { font-size: 11px; color: #4f8fff; font-weight: 600; }
        .card-date { font-family: 'Space Mono', monospace; font-size: 10px; color: #444; }
        .card-stats { display: flex; gap: 8px; margin-bottom: 14px; }
        .card-stat { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); border-radius: 6px; padding: 3px 8px; font-size: 10px; color: #888; font-family: 'Space Mono', monospace; }
        .card-download-btn { width: 100%; padding: 9px; background: linear-gradient(135deg, rgba(79,143,255,0.2), rgba(168,85,247,0.2)); border: 1px solid rgba(79,143,255,0.3); border-radius: 8px; color: #c0d8ff; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: 'Noto Sans KR', sans-serif; }
        .card-download-btn:hover { background: linear-gradient(135deg, rgba(79,143,255,0.35), rgba(168,85,247,0.35)); border-color: rgba(79,143,255,0.5); color: white; }
        .card-mine-badge { position: absolute; top: 12px; right: 12px; background: rgba(79,143,255,0.2); border: 1px solid rgba(79,143,255,0.4); color: #4f8fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
        .card-delete-btn { width: 100%; margin-top: 6px; padding: 7px; background: rgba(220,53,69,0.1); border: 1px solid rgba(220,53,69,0.25); border-radius: 8px; color: #ff6b7a; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: 'Noto Sans KR', sans-serif; }
        .card-delete-btn:hover { background: rgba(220,53,69,0.22); }

        #upload-content { flex: 1; overflow-y: auto; padding: 28px; }
        #upload-content::-webkit-scrollbar { width: 6px; }
        #upload-content::-webkit-scrollbar-track { background: transparent; }
        #upload-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

        .upload-section { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
        .upload-section h3 { margin: 0 0 18px; font-size: 13px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 1.5px; }
        .upload-field { margin-bottom: 16px; }
        .upload-field label { display: block; font-size: 12px; font-weight: 700; color: #777; margin-bottom: 7px; letter-spacing: 0.5px; }
        .upload-input, .upload-textarea { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 11px 14px; color: #e0e0e0; font-size: 14px; font-family: 'Noto Sans KR', sans-serif; outline: none; transition: border-color 0.2s; }
        .upload-input:focus, .upload-textarea:focus { border-color: #4f8fff; }
        .upload-textarea { resize: vertical; min-height: 80px; }

        .upload-preview-box { background: linear-gradient(135deg, #1a1f3a, #0d1024); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 20px; }
        .upload-preview-icon { font-size: 3em; }
        .upload-preview-info { flex: 1; }
        .upload-preview-info .upi-stat { font-family: 'Space Mono', monospace; font-size: 12px; color: #aaa; margin-bottom: 6px; }
        .upload-preview-info .upi-stat span { color: #4f8fff; font-weight: 700; }
        .upload-preview-warn { font-size: 12px; color: #f39c12; padding: 10px 14px; background: rgba(243,156,18,0.1); border: 1px solid rgba(243,156,18,0.2); border-radius: 8px; margin-top: 12px; }

        #upload-submit-btn { width: 100%; padding: 15px; background: linear-gradient(135deg, #4f8fff, #a855f7); border: none; border-radius: 12px; color: white; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: 'Noto Sans KR', sans-serif; letter-spacing: 0.5px; box-shadow: 0 6px 20px rgba(79,143,255,0.3); }
        #upload-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(79,143,255,0.4); }
        #upload-submit-btn:active { transform: translateY(0); }
        #upload-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

        #market-toast { position: fixed; bottom: 120px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(20,25,45,0.96); border: 1px solid rgba(79,143,255,0.3); color: #e0e0e0; padding: 12px 24px; border-radius: 50px; font-size: 14px; font-weight: 600; z-index: 500; pointer-events: none; opacity: 0; transition: all 0.3s ease; backdrop-filter: blur(10px); white-space: nowrap; }
        #market-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
        #market-toast.success { border-color: rgba(40,167,69,0.4); color: #a3f7b5; }
        #market-toast.error { border-color: rgba(220,53,69,0.4); color: #ffaaaa; }

        #nickname-badge { position: absolute; top: 20px; right: 20px; display: none; align-items: center; gap: 8px; background: rgba(15,17,32,0.8); border: 1px solid rgba(79,143,255,0.2); border-radius: 50px; padding: 6px 14px 6px 10px; backdrop-filter: blur(10px); pointer-events: auto; cursor: pointer; z-index: 100; transition: all 0.2s; }
        #nickname-badge:hover { border-color: rgba(79,143,255,0.5); }
        .nb-dot { width: 8px; height: 8px; background: #28a745; border-radius: 50%; box-shadow: 0 0 6px #28a745; }
        .nb-name { font-size: 12px; font-weight: 700; color: #4f8fff; font-family: 'Space Mono', monospace; }

        #nick-modal { position: fixed; inset: 0; background: rgba(10,12,24,0.85); backdrop-filter: blur(20px); z-index: 400; display: none; align-items: center; justify-content: center; }
        #nick-modal.open { display: flex; }
        #nick-box { position: relative; background: #0f1120; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 36px; width: 380px; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
        .nick-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: #aaa; cursor: pointer; font-size: 18px; transition: color 0.2s; }
        .nick-close:hover { color: white; }
        #nick-box h3 { margin: 0 0 8px; font-size: 1.4em; color: #e0e0e0; font-family: 'Space Mono', monospace; }
        #nick-box p { margin: 0 0 24px; font-size: 13px; color: #666; line-height: 1.6; }
        #nick-input { width: 100%; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 12px 16px; color: #e0e0e0; font-size: 15px; font-family: 'Space Mono', monospace; text-align: center; outline: none; margin-bottom: 16px; transition: border-color 0.2s; }
        #nick-input:focus { border-color: #4f8fff; }
        #nick-confirm-btn { width: 100%; padding: 13px; background: linear-gradient(135deg, #4f8fff, #a855f7); border: none; border-radius: 10px; color: white; font-size: 14px; font-weight: 700; cursor: pointer; font-family: 'Noto Sans KR', sans-serif; transition: all 0.2s; }
        #nick-confirm-btn:hover { opacity: 0.9; }
