﻿:root {
    --bg-color: #eef2f5; 
    --p1-text: #333; --p2-text: #333; 
    --sub-text-color: #888;
    --frame-bg: #ffffff; --frame-border: #ffffff;
    --component-bg: white; --input-bg: white; --input-border: #eee;
    --shadow-color: rgba(0,0,0,0.08);
    --accent-color: #444;
    --sidebar-bg: #fff; --sidebar-icon: #555;
    --sticker-border: #2196F3;
    --pair-name-color: #333;
    --pair-font: 'Dancing Script', cursive;
    --glass-bg: rgba(255, 255, 255, 0.15); 
    --glass-border: rgba(255,255,255,0.2);
    --phone-ui-text: white; 
    --mp-card-bg: #fff;
    --mp-text-color: #333;
    --mp-sub-text: #888;
}

body.dark-mode {
    --bg-color: #222; 
    --sub-text-color: #aaa;
    --frame-bg: #2b2b2b; --frame-border: #444;
    --component-bg: #444; --input-bg: #555; --input-border: #666;
    --shadow-color: rgba(0,0,0,0.5);
    --accent-color: #eee;
    --sidebar-bg: #333; --sidebar-icon: #eee;
    --glass-bg: rgba(0, 0, 0, 0.3); 
    --glass-border: rgba(255,255,255,0.05);
    --phone-ui-text: #eee; 
    --mp-card-bg: #444;
    --mp-text-color: #eee;
    --mp-sub-text: #aaa;
}
body.dark-mode .save-btn-round .material-icons { color: #333 !important; }
body.dark-mode .stats-line { color: #eee; background: #444; border-color: #555; }
body.dark-mode .bubble { color: #eee; } 
body.dark-mode .meme-tag { color: #eee; }
body.dark-mode .round-btn { background: #eee; color: #333; }
body.dark-mode .reset-btn-style { background: #ff4d4d; color: white; }

* { box-sizing: border-box; font-family: 'Pretendard', sans-serif; outline: none; }
[contenteditable] {
    font-family: 'Paperlogy', 'Pretendard', sans-serif !important;
}
.material-icons, .material-icons-outlined, img { user-select: none; -webkit-user-drag: none; }
.font-style-1 { font-family: 'Dancing Script', cursive !important; }
.font-style-2 { font-family: 'Pretendard', sans-serif !important; font-weight:800; text-transform:uppercase; letter-spacing:2px; }
.font-style-3 { font-family: 'Pixelify Sans', sans-serif !important; }

body { background-color: #333; margin: 0; padding: 20px; display: flex; min-height: 100vh; justify-content: center; align-items: center; }
.no-select { user-select: none; cursor: default; }

.sidebar { position: fixed; top: 50%; transform: translateY(-50%); background: var(--sidebar-bg); border-radius: 12px; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 1000; transition: opacity 0.3s; }
.left-sidebar { left: 15px; } .right-sidebar { right: 15px; }
.menu-item { width: 44px; height: 44px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--sidebar-icon); transition: 0.2s; position: relative; }
.menu-item:hover { background: rgba(0,0,0,0.05); transform: scale(1.05); }
.menu-item input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; left:0; top:0; }
.menu-item.active-link { background-color: #e0f7fa; color: #00bcd4; border: 1px solid #00bcd4; }
.menu-item.active-link .material-icons { color: #00bcd4; }

.divider { width: 24px; height: 1px; background: #ddd; margin: 4px 0; }
.save-btn-round { background: var(--accent-color); border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.2); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; display:flex; align-items:center; justify-content:center; color:white; transition:0.2s;}
.save-btn-round:hover { transform: scale(1.05); }

.menu-item::after, .save-btn-round::after, .reset-btn-style::after, .round-btn::after {
    content: attr(data-title); position: absolute; left: 60px; top: 50%; transform: translateY(-50%); background: #333; color: white; padding: 6px 12px; border-radius: 6px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s; visibility: hidden; z-index: 1100; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: 'Pretendard', sans-serif !important;
}
.right-sidebar .menu-item::after, .reset-btn-style::after { left: auto; right: 60px; }
.mp-sidebar .reset-btn-style::after { left: 60px !important; right: auto !important; }
.menu-item:hover::after, .save-btn-round:hover::after, .reset-btn-style:hover::after, .round-btn:hover::after { opacity: 1; visibility: visible; }

.bottom-right-controls { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 15px; z-index: 1000; align-items: center; transition: opacity 0.3s; }
.top-right-controls { position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 15px; z-index: 1000; transition: opacity 0.3s; }

.round-btn { 
    width: 50px; height: 50px; 
    background: #fff; color: #555; 
    border-radius: 50%; box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: 0.2s; position: relative; 
}
.round-btn:hover { transform: scale(1.1); background: rgba(0,0,0,0.05); }
.round-btn::after { left: auto; right: 60px; } 

.reset-btn-style { background: #ff4d4d; color: white; }
.reset-btn-style:hover { background: #ff3333; }
.reset-btn-style .material-icons { transition: 0.3s; }
.reset-btn-style:hover .material-icons { transform: rotate(180deg); }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; display: none; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { background: white; padding: 25px; border-radius: 15px; width: 300px; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.2); }
.emoji-content { width: 400px; padding: 0; border-radius: 10px; overflow: hidden; background: transparent; box-shadow: none;}
emoji-picker { width: 100%; height: 400px; border-radius: 10px; --background: var(--component-bg); --border-color: var(--input-border); }

.modal-btns { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }
.modal-btns button { border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.modal-btns button:first-child { background: #ff4d4d; color: white; }

.slot-list { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.slot-wrapper { display: flex; gap: 8px; align-items: center; }
.slot-item { flex-grow: 1; background: #f5f5f5; padding: 12px; border-radius: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; border: 1px solid #eee; }
.slot-item:hover { background: #e0f7fa; border-color: #00bcd4; }
.slot-info { font-size: 11px; color: #888; }
.slot-delete-btn { width: 40px; height: 40px; background: #ff4d4d; color: white; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.slot-delete-btn:hover { background: #cc0000; }

.cropper-content { width: 90%; max-width: 500px; height: auto; max-height: 90vh; display: flex; flex-direction: column; }
.canvas-container {
    width: 100%; height: 350px; background: #222; margin-bottom: 15px; overflow: hidden; border-radius: 10px; border: 1px solid #444;
    display: flex; justify-content: center; align-items: center; position: relative;
}
#cropper-canvas { max-width: 95%; max-height: 95%; border: 2px solid #00d2ff; box-shadow: 0 0 15px rgba(0, 210, 255, 0.3); background-color: white; }
.cropper-controls { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 20px; }
.icon-btn { background: none; color: #333; border: 1px solid #ddd; padding: 5px; border-radius: 5px; cursor: pointer; }

.auto-shrink { display: block; overflow: hidden; white-space: nowrap; width: 100%; }
#pair-name-container { width: 600px; height: 70px; text-align: center; overflow: hidden; }
#pair-sub-label-box span { display: block; max-width: 200px; height: 20px; overflow: hidden; white-space: nowrap; }

.sheet { 
    background-color: var(--bg-color); background-size: cover; background-position: center; 
    padding: 80px 60px 40px 60px; border-radius: 20px; transition: 0.3s; 
    display: flex; gap: 15px; 
    position: relative; 
}
.sheet.mode-1, .sheet.mode-2 { width: auto; justify-content: center; }

.pair-name { font-size: 50px; color: var(--pair-name-color); text-shadow: 0 2px 4px rgba(0,0,0,0.1); white-space: nowrap; font-family: var(--pair-font); cursor: text; transition: 0.2s; }
#pair-name-wrapper { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0px; z-index: 20; }

.pair-controls { display: flex; gap: 5px; background: rgba(255,255,255,0.8); padding: 4px; border-radius: 20px; opacity: 0; transition: 0.2s; pointer-events: none; }
#pair-name-wrapper:hover .pair-controls { opacity: 1; pointer-events: auto; }
.pair-sub-label { font-size: 14px; color: var(--sub-text-color); font-weight: bold; padding: 2px 8px; border-radius: 4px; position: relative; }
.pair-sub-color { position: absolute; right: -25px; top: 0; width: 20px; height: 20px; background: var(--accent-color); border-radius: 50%; cursor: pointer; opacity: 0; }
.pair-sub-label:hover .pair-sub-color { opacity: 1; }
.pair-sub-color input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.copyright-fixed { position: absolute; top: 30px; right: 40px; font-size: 10px; color: var(--sub-text-color); z-index: 10; max-width: 200px; text-align: right; overflow: hidden; white-space: nowrap; }
.other-info-fixed { position: absolute; top: 30px; left: 40px; font-size: 10px; color: var(--sub-text-color); z-index: 10; max-width: 200px; text-align: left; overflow: hidden; white-space: nowrap; }

.phone-frame { background-color: var(--frame-bg); border-radius: 30px; width: 290px; height: 660px; flex-shrink: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; border: 8px solid var(--frame-border); box-shadow: 5px 8px 25px rgba(0,0,0,0.1); z-index: 10; }
#p1-set .phone-frame { color: var(--p1-text); }
#p2-set .phone-frame { color: var(--p2-text); }
.main-pic-area { flex-grow: 1; background: #e0e0e0; position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; background-size: cover; background-position: center; background-repeat: no-repeat; }
.placeholder-text { text-align: center; color: #999 !important; font-size: 12px; pointer-events: none; font-family: 'Pretendard', sans-serif !important; }
.main-pic-area input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.glass-bar { background: var(--glass-bg); backdrop-filter: blur(8px); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); color: var(--phone-ui-text); text-shadow: 0 1px 2px rgba(0,0,0,0.3); position: absolute; width: 100%; z-index: 10; pointer-events: none; }
.status-bar { top: 0; height: 50px; display: flex; justify-content: space-between; padding: 0 20px; align-items: center; font-size: 14px; }
.dock-bar { bottom: 0; height: 70px; display: flex; justify-content: space-evenly; align-items: center; padding-bottom: 5px; }
.dock-item { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--phone-ui-text); width: 60px; cursor: default; text-shadow: none; }
.dock-item span:last-child { font-size: 9px; font-weight: 400; opacity: 0.9; transform: scale(0.95); }

.glass-effect { background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.2); }
.music-player { position: absolute; bottom: 85px; left: 15px; right: 15px; padding: 12px; border-radius: 16px; display: flex; gap: 12px; align-items: center; color: white; z-index: 5; cursor: default; }
.album-art { width: 55px; height: 55px; border-radius: 10px; background: rgba(255,255,255,0.1); position: relative; overflow: hidden; cursor: pointer; flex-shrink: 0; background-size: cover; background-position: center; display: flex; justify-content: center; align-items: center; }
.album-art input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.music-info { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.song-title { height: 18px; line-height: 18px; font-weight: bold; font-size: 13px; width: 100%; overflow: hidden; white-space: nowrap; display: block; }
.artist-name { height: 14px; line-height: 14px; font-size: 11px; opacity: 0.9; width: 100%; overflow: hidden; white-space: nowrap; display: block; }
.lyrics { height: 12px; line-height: 12px; font-size: 10px; opacity: 0.8; width: 100%; overflow: hidden; white-space: nowrap; display: block; }
.music-controls { display: flex; justify-content: space-between; align-items: center; font-size: 18px; opacity: 0.9; cursor: default; margin-top: 3px;}
.heart-btn.active { color: #ff4d4d; }

.info-frame { display: flex; flex-direction: column; width: 290px; padding-top: 0; height: 660px; }
#p1-set .info-frame { color: var(--p1-text); }
#p2-set .info-frame { color: var(--p2-text); }

.bubble { 
    width: fit-content; max-width: 240px; min-width: 40px; min-height: 30px; height: auto; 
    background: var(--component-bg); color: #333; padding: 8px 18px; border-radius: 16px; 
    font-size: 14px; box-shadow: 2px 2px 8px var(--shadow-color); position: relative; 
    border-top-left-radius: 0; display: flex; align-items: center; 
}
.bubble span.auto-shrink { white-space: pre-wrap; word-break: break-all; display: block; width: 100%; line-height: 1.3; }
.bubble::after { content: ''; position: absolute; top: 0; left: -8px; border-width: 0 10px 10px 0; border-style: solid; border-color: transparent var(--component-bg) transparent transparent; }
.bubble-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 15px; position: relative;}
.mode-2 #p1-set .bubble { border-top-left-radius: 16px; border-top-right-radius: 0; }
.mode-2 #p1-set .bubble::after { left: auto; right: -8px; border-width: 10px 10px 0 0; border-color: var(--component-bg) transparent transparent transparent; }
.mode-2 #p1-set .bubble-row { flex-direction: row-reverse; }
.inner-palette-btn { position: absolute; top: 4px; right: 4px; width: auto; height: auto; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: 0.2s; z-index: 5; }
.inner-palette-btn .material-icons { font-size: 14px; color: #bbb; text-shadow: 0 1px 1px rgba(0,0,0,0.1); }
.bubble:hover .inner-palette-btn { opacity: 1; }

.sub-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 15px; flex-grow: 1;}
.sub-row { display: flex; gap: 10px; align-items: flex-start; flex-grow: 1; }

.sub-img { 
    width: 130px; height: 130px;
    background: var(--input-bg); border-radius: 16px; position: relative; 
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; 
    background-size: cover; background-position: center; border: 1px solid var(--input-border); 
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}
.sub-img input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.plus { font-size: 24px; color: #ccc !important; } 

.sub-text-group { flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; height: 130px; min-width: 0; }
.sub-header-row { height: 16px; display: flex; font-size: 12px; align-items: center; overflow: hidden; width: 100%; }
.sub-header-row strong { max-width: 80px; } 
.sub-header-row .hash { margin-left: auto; max-width: 80px; font-size: 10px; color: var(--sub-text-color); text-align: right; }

.sub-description { 
    background: var(--component-bg); padding: 4px 10px; border-radius: 12px; font-size: 12px; border: 1px solid var(--input-border); 
    border-top-left-radius: 12px; overflow: hidden; display: flex; align-items: center; 
    flex-grow: 1; height: 100%; color: var(--sub-text-color); 
    box-shadow: 1px 1px 3px rgba(0,0,0,0.03);
}
.sub-description.auto-shrink { white-space: normal; }

.profile-set { display: flex; gap: 30px; transition: all 0.5s ease; }
.mode-1 .profile-set { flex-direction: row; }
.mode-2 .profile-set { gap: 30px; justify-content: center;}
.mode-2 #p1-set { flex-direction: row-reverse; } .mode-2 #p2-set { flex-direction: row; }
#p2-set { opacity: 0; width: 0; overflow: hidden; transition: opacity 0.5s ease, width 0.5s ease; }
.mode-2 #p2-set { opacity: 1; width: 610px; }
.profile-card { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;}
.name-row { display: flex; align-items: center; gap: 10px; }
.name-section { flex-grow: 1; display: flex; align-items: center; gap: 10px; width: 170px; overflow: hidden; }
.profile-image-area { width: 45px; height: 45px; background: var(--input-bg); border-radius: 12px; position: relative; overflow: hidden; cursor: pointer; border: 1px solid var(--input-border); background-size: cover; background-position: center; flex-shrink: 0; }
.profile-image-area input[type=file] { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2;}

.profile-color-trigger { position: absolute; bottom: 2px; right: 2px; width: auto; height: auto; background: transparent; display: flex; align-items: center; justify-content: center; z-index: 5; pointer-events: none; }
.profile-color-trigger span { font-size: 14px; color: #bbb; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.profile-color-trigger input { pointer-events: auto; position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; right:0; bottom:0; width:20px; height:20px;}

.name-texts { width: 130px; height: 45px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.name-texts h1 { margin: 0; font-size: 20px; color: inherit; height: 26px; line-height: 26px; overflow: hidden; white-space: nowrap; display: block; }
.name-texts p { margin: 0; font-size: 11px; color: var(--sub-text-color); height: 14px; line-height: 14px; overflow: hidden; white-space: nowrap; display: block; }

.palettes { display: flex; gap: 6px; }
.palette-item { display: flex; flex-direction: column; align-items: center; justify-content: center; } 
.p-circle { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--input-border); cursor: pointer; background: var(--input-bg); position: relative; }
.p-circle input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; left:0; top:0;}
.p-label { font-size: 8px; color: var(--sub-text-color); margin-top: 2px; text-align: center; width: 100%; }

.stats-line { border: 1px solid var(--input-border); border-radius: 50px; padding: 0 8px; font-size: 11px; color: #333; text-align: center; background: var(--component-bg); width: 100%; height: 30px; line-height: 30px; overflow: hidden; }
.theme-section { display: flex; align-items: center; gap: 8px; }
.theme-label { font-size: 10px; font-weight: 800; color: var(--sub-text-color); }
.theme-bar { flex-grow: 1; height: 20px; border-radius: 10px; background: linear-gradient(to right, #333, #333); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--input-border); }
.click-zone { position: absolute; top: 0; width: 50%; height: 100%; cursor: pointer; z-index: 5; }
.click-zone.left { left: 0; } .click-zone.right { right: 0; }
.theme-bar input { position: absolute; opacity: 0; }

.color-pickers.dropdown { position: absolute; top: 25px; right: 0; background: var(--component-bg); padding: 8px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: none; flex-direction: column; gap: 5px; z-index: 100; border: 1px solid var(--input-border); min-width: 120px; }
.color-pickers.show { display: flex; }
.cp-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #333;}
#sticker-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; overflow: hidden; border-radius: 20px; }
.mp-sticker-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; overflow: visible; }
.sticker { position: absolute; pointer-events: auto; display: inline-block; cursor: grab; user-select: none;}
.sticker img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.sticker.selected { outline: 2px solid #2196F3; }
.sticker .control-btn { display: none; position: absolute; width: 24px; height: 24px; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); align-items: center; justify-content: center; cursor: pointer; color: #333; font-size: 16px; z-index: 10; }
.sticker.selected .control-btn { display: flex; }
.sticker .delete-btn { top: -12px; right: -12px; color: #ff4444; }
.sticker .rotate-handle { top: -25px; left: 50%; transform: translateX(-50%); cursor: grab; color: #2196F3; }
.sticker .resize-handle { bottom: -12px; right: -12px; cursor: nwse-resize; color: #2196F3; }

body.capturing .hide-on-save, body.capturing .selected, body.capturing .control-btn { display: none !important; }
body.capturing .glass-bar { background: rgba(255, 255, 255, 0.4); border-color: rgba(255, 255, 255, 0.1); }
body.capturing .glass-effect { background: rgba(255, 255, 255, 0.25) !important; border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 4px 10px rgba(0,0,0,0.1); backdrop-filter: none; }
body.dark-mode.capturing .glass-effect { background: rgba(0, 0, 0, 0.4) !important; border: 1px solid rgba(255,255,255,0.05); }

.sheet.minimal-mode .sub-img, .sheet.minimal-mode .profile-image-area { display: none !important; }
.sheet.minimal-mode .sub-text-group { height: auto; min-height: 80px; justify-content: center; }
.sheet.minimal-mode .sub-description { border-radius: 12px; min-height: 50px; height: auto; padding: 8px 12px; background: transparent; border: none; box-shadow: none; }
.sheet.minimal-mode .name-section { width: auto; flex-grow: 1; }
.sheet.minimal-mode .name-texts { width: 100%; align-items: flex-start; }
.sheet.minimal-mode .emoji-trigger { display: none; }

.top-notice { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 13px; z-index: 500; pointer-events: none; line-height: 1.5; width: 100%; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.top-notice p { margin: 0; }

.meme-line {
    width: 100%;
    max-width: none;
    margin-top: 0;
    height: 30px;
    background: var(--component-bg);
    border: 1px solid var(--input-border);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    box-sizing: border-box;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.03);
    overflow: hidden; 
}

.meme-icon {
    color: #ff4d4d;
    font-weight: 900;
    font-size: 14px;
    flex-shrink: 0; 
}

.meme-desc {
    color: #bbb;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden; 
    text-overflow: ellipsis;
    flex-grow: 1;
    flex-shrink: 1; 
    min-width: 0; 
}

.meme-tag {
    color: #333;
    font-weight: bold;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45%; 
    flex-shrink: 0; 
    min-width: 0; 
}

body.dark-mode .meme-tag { color: #eee; }

.emoji-trigger {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 16px;
    color: #555;
    transition: 0.2s;
}
.emoji-trigger:hover { transform: scale(1.1); background: #eee; }
.emoji-display {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 70px;
    pointer-events: none;
    z-index: 1;
}

body.ui-hidden nav, 
body.ui-hidden .top-right-controls, 
body.ui-hidden .top-notice,
body.ui-hidden .reset-btn-style,
body.ui-hidden .profile-color-trigger, 
body.ui-hidden .inner-palette-btn,    
body.ui-hidden .emoji-trigger,
body.ui-hidden .bottom-right-controls,
body.ui-hidden .mode-switch-btn
{
    visibility: hidden !important;
    pointer-events: none;
}
body.ui-hidden .ui-toggle-btn {
    visibility: visible !important;
    pointer-events: auto;
    background: #00bcd4;
    color: white;
    transform: scale(1.05);
}
body.ui-hidden .ui-toggle-btn:hover {
    transform: scale(1.15);
    background: #0097a7;
}

.mode-switch-btn {
    position: fixed; top: 20px; left: 20px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #eee;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px; font-weight: bold;
    transition: 0.3s;
    z-index: 2500;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex; align-items: center; gap: 5px;
    font-family: 'Pretendard', sans-serif !important;
}
.mode-switch-btn:hover { background: rgba(255, 255, 255, 0.4); transform: scale(1.05); color: white;}
.mp-sidebar { display: none; z-index: 2600; }
body.multiplayer-active .sidebar:not(.mp-sidebar),
body.multiplayer-active .top-right-controls,
body.multiplayer-active .bottom-right-controls,
body.multiplayer-active .top-notice {
    display: none !important;
}
body.multiplayer-active .mp-sidebar { display: flex !important; }
#mp-wrapper { display: none; align-items: center; gap: 30px; }
#mp-wrapper.active { display: flex; }
#multiplayer-container {
    display: flex;
    background-color: var(--bg-color);
    padding: 60px;
    border-radius: 20px;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-height: 800px;
    flex-wrap: nowrap;
    position: relative; 
    zoom: 0.8;
}
.mp-card {
    width: 320px;
    min-height: 700px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    padding: 10px;
    transition: 0.3s;
    z-index: 10; 
}
.mp-header { width: 100%; display: flex; justify-content: center; align-items: center; margin-bottom: 15px; position: relative; flex-shrink: 0; height: 60px; }
.mp-number-badge {
    position: absolute; left: 0; top: 10px; width: 40px; height: 40px;
    background-color: #ddd; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 18px; color: #333;
    cursor: pointer; overflow: hidden; flex-shrink: 0;
    border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-family: 'Pretendard', sans-serif !important; 
}
.mp-number-badge input[type="color"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.mp-number-text { z-index: 2; pointer-events: none; }
.mp-titles { text-align: center; display: flex; flex-direction: column; align-items: center; width: 100%; flex-shrink: 0; }
.mp-title-main {
    font-size: 32px; font-weight: 900; color: var(--mp-text-color);
    margin-bottom: 0; min-width: 100px; max-width: 200px;
    white-space: nowrap; overflow: hidden;
    height: 38px; line-height: 38px; flex-shrink: 0;
}
.mp-title-sub {
    font-size: 14px; font-weight: 300; color: var(--mp-text-color);
    letter-spacing: 2px; text-transform: uppercase;
    height: 20px; line-height: 20px; flex-shrink: 0;
}
.mp-image-area {
    width: 100%; height: 420px; background-color: #dcdcdc;
    margin-bottom: 20px; position: relative; cursor: pointer;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    background-size: cover; background-position: center;
    transition: 0.2s; flex-shrink: 0; border-radius: 4px;
}
.mp-image-area:hover { filter: brightness(0.95); }
.mp-image-area input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; }
.mp-placeholder { text-align: center; color: #888; pointer-events: none; font-family: 'Pretendard', sans-serif !important; }
.mp-placeholder * { font-family: 'Material Icons' !important; }
.mp-info { width: 100%; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.mp-name-kor {
    font-size: 36px; font-weight: 500; color: var(--mp-text-color);
    text-align: center; margin-bottom: 10px; width: 100%; max-width: 280px;
    white-space: nowrap; overflow: hidden; height: 45px; line-height: 45px; flex-shrink: 0;
}
.mp-palette { display: flex; gap: 15px; justify-content: center; margin-bottom: 10px; flex-shrink: 0; }
.mp-color-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mp-dot { width: 30px; height: 30px; border-radius: 50%; background: #ffffff; position: relative; cursor: pointer; border: 1px solid rgba(0,0,0,0.1); }
.mp-dot input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mp-dot-label { font-size: 10px; color: var(--mp-sub-text); text-transform: uppercase; font-weight: bold; font-family: 'Pretendard', sans-serif !important; }
.mp-stats {
    font-size: 18px; color: var(--mp-text-color); text-align: center;
    margin-bottom: 20px; opacity: 0.8; width: 100%;
    white-space: nowrap; 
    overflow: hidden; 
    height: 28px; 
    line-height: 28px; 
    flex-shrink: 0;
    outline: none;
}
.mp-desc-box {
    width: 100%; min-height: 100px; background: var(--mp-card-bg);
    border-radius: 4px; padding: 15px; font-size: 14px;
    color: var(--mp-text-color); line-height: 1.6; white-space: pre-wrap;
    box-shadow: 0 2px 10px var(--shadow-color); border: 1px solid var(--input-border);
    flex-shrink: 1;
}
.add-card-btn {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(255,255,255,0.2); border: 2px dashed #999;
    color: #ccc; display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: 0.2s;
}
.add-card-btn:hover { background: rgba(255,255,255,0.4); transform: scale(1.1); color: white; border-color: white;}
.delete-card-btn {
    position: absolute; top: -10px; right: -10px;
    background: #ff4d4d; color: white; width: 24px; height: 24px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; transition: 0.2s; z-index: 100;
}
.mp-card:hover .delete-card-btn { opacity: 1; }
.kakao-content {
    width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
}
.kakao-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}
.kakao-controls label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}
.kakao-controls textarea, 
.kakao-controls input[type="text"], 
.kakao-controls select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    resize: vertical;
}
.kakao-controls textarea {
    height: 100px;
}
.color-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 5px 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 12px;
}
.kakao-preview {
    background-color: #f2f4f6;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    overflow: auto;
    min-height: 150px;
}
#kt-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}