/* ===================================================================
   추첨해 (zzan_luackydraw) — 독립형 앱 셸 + 추첨 스튜디오 스타일
   다크 우선. --ld-point / --ld-accent 는 #ld_app 인라인 스타일로 주입.
   =================================================================== */

/* 브라우저 기본 body 여백 제거 — 앱셸이 화면을 점유하므로 GNB/배경이 가장자리에 딱 붙음 */
html, body { margin: 0; padding: 0; }

:root[data-theme="dark"], :root:not([data-theme]) {
    --ld-bg: #0a0a12;
    --ld-bg-2: #11111e;
    --ld-surface: rgba(255,255,255,.04);
    --ld-surface-2: rgba(255,255,255,.07);
    --ld-border: rgba(255,255,255,.10);
    --ld-text: #f3f3fa;
    --ld-text-dim: rgba(243,243,250,.62);
    --ld-text-mute: rgba(243,243,250,.40);
    --ld-shadow: 0 18px 50px rgba(0,0,0,.55);
}
:root[data-theme="light"] {
    --ld-bg: #f4f5fb;
    --ld-bg-2: #eceefa;
    --ld-surface: #ffffff;
    --ld-surface-2: #f3f4fb;
    --ld-border: rgba(20,20,40,.10);
    --ld-text: #14141f;
    --ld-text-dim: rgba(20,20,31,.62);
    --ld-text-mute: rgba(20,20,31,.42);
    --ld-shadow: 0 18px 44px rgba(40,40,90,.16);
}

#ld_app {
    --ld-point: #7c5cff;
    --ld-accent: #ffd23f;
    --ld-radius: 18px;
    font-family: 'Pretendard Variable', Pretendard, system-ui, -apple-system, 'Segoe UI', Roboto, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    color: var(--ld-text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    background: var(--ld-bg);
    overflow-x: hidden;
}
#ld_app *, #ld_app *::before, #ld_app *::after { box-sizing: border-box; }
#ld_app button { font-family: inherit; cursor: pointer; }

/* ── 배경 연출 ── */
#ld_app::before {
    content: ""; position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(1100px 700px at 18% -8%, color-mix(in srgb, var(--ld-point) 32%, transparent), transparent 60%),
        radial-gradient(900px 620px at 92% 8%, color-mix(in srgb, var(--ld-accent) 22%, transparent), transparent 58%),
        radial-gradient(800px 700px at 60% 108%, color-mix(in srgb, var(--ld-point) 22%, transparent), transparent 60%),
        var(--ld-bg);
}
#ld_app[data-bg="aurora"]::after {
    content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
    background:
        radial-gradient(40% 38% at 30% 30%, color-mix(in srgb, var(--ld-point) 26%, transparent), transparent 70%),
        radial-gradient(36% 34% at 72% 64%, color-mix(in srgb, var(--ld-accent) 18%, transparent), transparent 70%);
    filter: blur(18px);
    animation: ld-aurora 18s ease-in-out infinite alternate;
}
#ld_app[data-bg="spotlight"]::after {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 70% at 50% 0%, color-mix(in srgb, var(--ld-point) 16%, transparent), transparent 72%);
}
@keyframes ld-aurora {
    0%   { transform: translate3d(-4%, -2%, 0) scale(1); }
    50%  { transform: translate3d(4%, 3%, 0) scale(1.12); }
    100% { transform: translate3d(-2%, 4%, 0) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
    #ld_app[data-bg="aurora"]::after { animation: none; }
}

/* ── 앱 셸 ── */
.ld-shell { max-width: 1180px; margin: 0 auto; padding: 0 18px 96px; }

.ld-topbar {
    position: sticky; top: 54px; z-index: 30;  /* ZzanTopBar(54px) 아래에 스택 */
    backdrop-filter: blur(12px);
    background: linear-gradient(var(--ld-bg), color-mix(in srgb, var(--ld-bg) 58%, transparent));
    border-bottom: 1px solid var(--ld-border);
}
.ld-topbar__inner {
    max-width: 1180px; margin: 0 auto; padding: 14px 18px;
    display: flex; align-items: center; gap: 14px;
}
.ld-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ld-text); font-weight: 800; font-size: 19px; }
.ld-brand__mark {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--ld-point), color-mix(in srgb, var(--ld-accent) 70%, var(--ld-point)));
    color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--ld-point) 50%, transparent);
}
.ld-brand__mark svg { width: 22px; height: 22px; }
.ld-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.ld-nav__item {
    display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
    color: var(--ld-text-dim); font-weight: 600; font-size: 14px;
    padding: 9px 13px; border-radius: 11px; transition: .15s;
}
.ld-nav__item svg { width: 18px; height: 18px; }
.ld-nav__item:hover { color: var(--ld-text); background: var(--ld-surface); }
.ld-nav__item.is-active { color: var(--ld-text); background: var(--ld-surface-2); }
.ld-spacer { flex: 1; }
.ld-controls { display: flex; align-items: center; gap: 8px; }

.ld-iconbtn {
    width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--ld-border);
    background: var(--ld-surface); color: var(--ld-text); display: grid; place-items: center;
}
.ld-iconbtn svg { width: 20px; height: 20px; }
.ld-iconbtn:hover { background: var(--ld-surface-2); }

.ld-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: 12px; font-weight: 700; font-size: 15px;
    padding: 11px 18px; text-decoration: none; color: var(--ld-text); transition: transform .12s, filter .15s, background .15s;
}
.ld-btn--sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.ld-btn--primary { background: linear-gradient(135deg, var(--ld-point), color-mix(in srgb, var(--ld-accent) 55%, var(--ld-point))); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--ld-point) 45%, transparent); }
.ld-btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ld-btn--ghost { background: var(--ld-surface); border-color: var(--ld-border); color: var(--ld-text); }
.ld-btn--ghost:hover { background: var(--ld-surface-2); }
.ld-btn:disabled { opacity: .6; cursor: default; transform: none; }

/* ── 히어로 + 모드 ── */
.ld-hero { text-align: center; padding: 26px 0 14px; }
.ld-hero h1 { margin: 0; font-size: clamp(26px, 4.4vw, 44px); font-weight: 900; letter-spacing: -.02em; }
.ld-hero h1 .ld-grad {
    background: linear-gradient(100deg, var(--ld-point), var(--ld-accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ld-hero p { margin: 10px 0 0; color: var(--ld-text-dim); font-size: clamp(14px, 2vw, 17px); }

.ld-modes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 6px; }
.ld-mode {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px;
    border: 1px solid var(--ld-border); background: var(--ld-surface); color: var(--ld-text-dim);
    font-weight: 700; font-size: 15px; transition: .15s;
}
.ld-mode__ico { font-size: 20px; line-height: 1; }
.ld-mode:hover { background: var(--ld-surface-2); color: var(--ld-text); }
.ld-mode.is-active {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--ld-point), color-mix(in srgb, var(--ld-accent) 55%, var(--ld-point)));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--ld-point) 40%, transparent);
}
.ld-mode-desc { text-align: center; color: var(--ld-text-mute); font-size: 13.5px; min-height: 20px; margin-bottom: 8px; }

/* ── 스튜디오 레이아웃 ── */
.ld-studio { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; margin-top: 14px; }
@media (max-width: 900px) { .ld-studio { grid-template-columns: 1fr; } }

.ld-stagebox {
    position: relative; background: var(--ld-surface); border: 1px solid var(--ld-border);
    border-radius: 22px; padding: 26px; min-height: 440px;
    display: grid; place-items: center; overflow: hidden; box-shadow: var(--ld-shadow);
}
.ld-stage { width: 100%; display: grid; place-items: center; }
.ld-stage-empty { color: var(--ld-text-mute); font-size: 15px; padding: 60px 0; text-align: center; }

.is-spinning .ld-stagebox { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ld-point) 50%, transparent), var(--ld-shadow); }

/* ── 컨트롤 패널 ── */
.ld-panel { background: var(--ld-surface); border: 1px solid var(--ld-border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ld-panel__title { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 15px; }
.ld-panel__title small { color: var(--ld-text-mute); font-weight: 600; }
.ld-count-badge { background: var(--ld-surface-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--ld-text-dim); font-weight: 700; }

.ld-textarea {
    width: 100%; min-height: 168px; resize: vertical; border-radius: 12px; padding: 12px 14px;
    border: 1px solid var(--ld-border); background: var(--ld-bg-2); color: var(--ld-text);
    font-size: 14.5px; line-height: 1.7; font-family: inherit;
}
.ld-textarea:focus { outline: none; border-color: var(--ld-point); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ld-point) 22%, transparent); }

.ld-addrow { display: flex; gap: 8px; }
.ld-input {
    flex: 1; border-radius: 10px; padding: 10px 12px; border: 1px solid var(--ld-border);
    background: var(--ld-bg-2); color: var(--ld-text); font-size: 14px; font-family: inherit;
}
.ld-input:focus { outline: none; border-color: var(--ld-point); }
.ld-minirow { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-chipbtn { font-size: 12.5px; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--ld-border); background: var(--ld-surface); color: var(--ld-text-dim); font-weight: 600; }
.ld-chipbtn:hover { background: var(--ld-surface-2); color: var(--ld-text); }

.ld-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ld-field label { font-size: 14px; color: var(--ld-text-dim); font-weight: 600; }
.ld-num { width: 76px; text-align: center; border-radius: 10px; padding: 9px; border: 1px solid var(--ld-border); background: var(--ld-bg-2); color: var(--ld-text); font-size: 15px; font-weight: 700; font-family: inherit; }

/* 토글 스위치 */
.ld-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 14px; color: var(--ld-text-dim); font-weight: 600; }
.ld-switch input { display: none; }
.ld-switch__track { width: 42px; height: 24px; border-radius: 999px; background: var(--ld-surface-2); border: 1px solid var(--ld-border); position: relative; transition: .18s; flex: none; }
.ld-switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ld-text-mute); transition: .18s; }
.ld-switch input:checked + .ld-switch__track { background: var(--ld-point); border-color: transparent; }
.ld-switch input:checked + .ld-switch__track::after { left: 21px; background: #fff; }

.ld-divider { height: 1px; background: var(--ld-border); margin: 2px 0; }

.ld-spin-btn { width: 100%; font-size: 19px; padding: 16px; border-radius: 15px; letter-spacing: .02em; }
.ld-spin-btn:not(:disabled):hover { transform: translateY(-2px); }

.ld-presets { display: flex; flex-direction: column; gap: 8px; }
.ld-presets__head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; }
.ld-preset { display: flex; align-items: center; background: var(--ld-bg-2); border: 1px solid var(--ld-border); border-radius: 10px; overflow: hidden; }
.ld-preset__load { flex: 1; text-align: left; background: none; border: none; color: var(--ld-text); padding: 10px 12px; font-size: 13.5px; font-weight: 600; }
.ld-preset__load:hover { background: var(--ld-surface); }
.ld-preset__del { border: none; background: none; color: var(--ld-text-mute); font-size: 18px; padding: 0 12px; align-self: stretch; }
.ld-preset__del:hover { color: #ff5a3c; }
.ld-preset-empty { color: var(--ld-text-mute); font-size: 13px; padding: 8px 2px; }

/* ===== 룰렛 휠 ===== */
.ld-wheel-wrap { position: relative; display: grid; place-items: center; }
.ld-wheel-canvas { display: block; filter: drop-shadow(0 14px 30px rgba(0,0,0,.45)); border-radius: 50%; }
.ld-wheel-pointer {
    position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 3;
    width: 0; height: 0; border-left: 17px solid transparent; border-right: 17px solid transparent;
    border-top: 30px solid var(--ld-accent);
    filter: drop-shadow(0 3px 5px rgba(0,0,0,.5));
}
.ld-wheel-hub {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 2;
    width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--ld-point), color-mix(in srgb, var(--ld-accent) 55%, var(--ld-point)));
    color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .08em;
    box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 2px 8px rgba(255,255,255,.3); border: 4px solid var(--ld-bg);
}

/* ===== 슬롯머신 ===== */
.ld-slot { position: relative; padding: 10px; }
.ld-slot-frame {
    display: flex; gap: 10px; padding: 14px; border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ld-point) 22%, var(--ld-bg-2)), var(--ld-bg-2));
    border: 2px solid color-mix(in srgb, var(--ld-accent) 40%, var(--ld-border));
    box-shadow: inset 0 0 30px rgba(0,0,0,.5);
}
.ld-reel {
    position: relative; width: 122px; height: var(--reel-h); overflow: hidden; border-radius: 12px;
    background: var(--ld-bg); border: 1px solid var(--ld-border);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.ld-reel-strip { position: absolute; top: 0; left: 0; right: 0; will-change: transform; }
.ld-reel-cell {
    height: var(--cell-h); display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; color: var(--ld-text); padding: 0 8px; text-align: center;
}
.ld-reel.is-locked { animation: ld-reel-bounce .24s ease; }
@keyframes ld-reel-bounce { 0%{transform:translateY(0)} 40%{transform:translateY(5px)} 100%{transform:translateY(0)} }
.ld-slot-line {
    position: absolute; left: 8px; right: 8px; top: 50%; height: calc(var(--cell-h)); transform: translateY(-50%);
    border-top: 2px solid var(--ld-accent); border-bottom: 2px solid var(--ld-accent);
    pointer-events: none; box-shadow: 0 0 18px color-mix(in srgb, var(--ld-accent) 50%, transparent);
}
@media (max-width: 480px) { .ld-reel { width: 92px; } .ld-reel-cell { font-size: 15px; } }

/* ===== 이름 셔플 ===== */
.ld-shuffle { width: 100%; }
.ld-shuffle-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-content: center; }
.ld-chip {
    padding: 14px 20px; border-radius: 14px; font-weight: 800; font-size: clamp(15px, 2.4vw, 22px);
    background: var(--ld-bg-2); border: 2px solid var(--ld-border); color: var(--ld-text-dim);
    transition: transform .1s, background .1s, color .1s, box-shadow .1s;
}
.ld-chip.is-on {
    color: #fff; border-color: transparent; transform: scale(1.06);
    background: linear-gradient(135deg, var(--ld-point), color-mix(in srgb, var(--ld-accent) 55%, var(--ld-point)));
    box-shadow: 0 8px 24px color-mix(in srgb, var(--ld-point) 50%, transparent);
}
.ld-chip.is-dim { opacity: .26; filter: grayscale(.5); }
.ld-chip.is-winner {
    color: #1a1400; border-color: transparent; transform: scale(1.18);
    background: linear-gradient(135deg, var(--ld-accent), #fff3b0);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ld-accent) 60%, transparent), 0 14px 34px color-mix(in srgb, var(--ld-accent) 55%, transparent);
    animation: ld-winner-pop .5s ease;
}
@keyframes ld-winner-pop { 0%{transform:scale(.8)} 60%{transform:scale(1.28)} 100%{transform:scale(1.18)} }

/* ===== 사다리타기 ===== */
.ld-ladder-wrap { width: 100%; }
.ld-ladder-canvas { display: block; width: 100%; }

/* ── 토스트 ── */
.ld-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
    background: #14141f; color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
    box-shadow: 0 12px 34px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: .25s; z-index: 200; border: 1px solid rgba(255,255,255,.12);
}
.ld-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 컨페티 캔버스 (결과 모달 위에서 터지도록) ── */
.ld-confetti-canvas { position: fixed; inset: 0; z-index: 190; pointer-events: none; }

/* ── 결과 모달 ── */
.ld-result {
    position: fixed; inset: 0; z-index: 160; display: none; align-items: center; justify-content: center; padding: 20px;
    background: rgba(6,6,14,.72); backdrop-filter: blur(6px);
}
.ld-result.is-show { display: flex; animation: ld-fade .2s ease; }
@keyframes ld-fade { from{opacity:0} to{opacity:1} }
.ld-result-card {
    width: min(460px, 100%); background: var(--ld-surface-2); border: 1px solid var(--ld-border);
    border-radius: 22px; padding: 30px 26px; text-align: center; box-shadow: var(--ld-shadow);
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--ld-accent) 12%, transparent), transparent 40%);
    animation: ld-pop .35s cubic-bezier(.2,1.2,.4,1);
}
@keyframes ld-pop { 0%{transform:scale(.86); opacity:0} 100%{transform:scale(1); opacity:1} }
.ld-result-head { font-size: 26px; font-weight: 900; margin-bottom: 18px; }
.ld-result-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; max-height: 50vh; overflow: auto; }
.ld-winner-row {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ld-point) 22%, var(--ld-bg-2)), var(--ld-bg-2));
    border: 1px solid var(--ld-border); animation: ld-slidein .4s both;
}
@keyframes ld-slidein { from{transform:translateY(10px); opacity:0} to{transform:translateY(0); opacity:1} }
.ld-winner-rank {
    width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: var(--ld-accent); color: #1a1400; font-weight: 900; font-size: 14px;
}
.ld-winner-name { font-size: 20px; font-weight: 800; text-align: left; word-break: break-all; }
.ld-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 프리셋 저장 모달 ── */
.ld-modal {
    position: fixed; inset: 0; z-index: 160; display: none; align-items: center; justify-content: center; padding: 20px;
    background: rgba(6,6,14,.66); backdrop-filter: blur(5px);
}
.ld-modal.is-show { display: flex; animation: ld-fade .2s ease; }
.ld-modal-card { width: min(400px, 100%); background: var(--ld-surface-2); border: 1px solid var(--ld-border); border-radius: 20px; padding: 24px; box-shadow: var(--ld-shadow); }
.ld-modal-card h3 { margin: 0 0 16px; font-size: 18px; font-weight: 800; }
.ld-modal-card .ld-input { width: 100%; margin-bottom: 14px; }
.ld-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ── 페이지(프리셋/이력 목록) ── */
.ld-page { padding: 8px 0 40px; }
.ld-page h2 { font-size: 22px; font-weight: 800; margin: 12px 0 18px; }
.ld-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ld-card { background: var(--ld-surface); border: 1px solid var(--ld-border); border-radius: 16px; padding: 16px; }
.ld-card__mode { font-size: 12px; font-weight: 700; color: var(--ld-point); text-transform: uppercase; letter-spacing: .04em; }
.ld-card__title { font-size: 16px; font-weight: 800; margin: 6px 0 8px; }
.ld-card__meta { font-size: 12.5px; color: var(--ld-text-mute); }
.ld-card__winners { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ld-tag { background: var(--ld-surface-2); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--ld-text-dim); }
.ld-tag--win { background: color-mix(in srgb, var(--ld-accent) 30%, transparent); color: var(--ld-text); }
.ld-empty-state { text-align: center; color: var(--ld-text-mute); padding: 60px 0; }

@media (max-width: 560px) {
    .ld-nav { display: none; }
    .ld-shell { padding-bottom: 80px; }
}

/* ===== 공지 (롤링 바 · 목록 · 상세 · 에디터) ===== */
.ld-rollbar {
    display: flex; align-items: center; gap: 10px; margin: 0 0 4px;
    padding: 9px 14px; border-radius: 12px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ld-point) 22%, var(--ld-bg-2)), var(--ld-bg-2));
    border: 1px solid var(--ld-border); overflow: hidden;
}
.ld-rollbar__ico { width: 18px; height: 18px; flex: none; color: var(--ld-accent); }
.ld-rollbar__track { position: relative; flex: 1; min-width: 0; height: 22px; }
.ld-rollbar__item {
    position: absolute; inset: 0; display: flex; align-items: center; gap: 8px;
    color: var(--ld-text); text-decoration: none; font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; pointer-events: none;
}
.ld-rollbar__item.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ld-rollbar__item:hover { color: var(--ld-point); }
.ld-rollbar__more { flex: none; font-size: 12.5px; color: var(--ld-text-mute); text-decoration: none; font-weight: 600; }
.ld-rollbar__more:hover { color: var(--ld-text); }

.ld-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 18px; }
.ld-page-head h2 { margin: 0; }

.ld-notice-list { background: var(--ld-surface); border: 1px solid var(--ld-border); border-radius: 16px; overflow: hidden; }
.ld-notice-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px; color: var(--ld-text); text-decoration: none; border-top: 1px solid var(--ld-border);
}
.ld-notice-row:first-child { border-top: none; }
.ld-notice-row:hover { background: var(--ld-surface-2); }
.ld-notice-row__title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: 15px; }
.ld-notice-row__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-notice-row__date { flex: none; color: var(--ld-text-mute); font-size: 13px; }

.ld-notice-body { font-size: 16px; line-height: 1.8; color: var(--ld-text); word-break: break-word; }
.ld-notice-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.ld-notice-body h3 { font-size: 19px; font-weight: 800; margin: 18px 0 8px; }
.ld-notice-body a { color: var(--ld-point); text-decoration: underline; }
.ld-notice-body ul { padding-left: 22px; }

.ld-ed-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--ld-border); border-bottom: none; border-radius: 10px 10px 0 0; background: var(--ld-bg-2); }
.ld-ed-btn { font-size: 13px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--ld-border); background: var(--ld-surface); color: var(--ld-text); }
.ld-ed-btn:hover { background: var(--ld-surface-2); }
.ld-ed-area {
    min-height: 260px; padding: 16px; border: 1px solid var(--ld-border); border-radius: 0 0 10px 10px;
    background: var(--ld-bg-2); color: var(--ld-text); font-size: 15.5px; line-height: 1.8; overflow-wrap: break-word;
}
.ld-ed-area:focus { outline: none; border-color: var(--ld-point); }
.ld-ed-area img { max-width: 100%; height: auto; border-radius: 8px; }
.ld-ed-area:empty::before { content: attr(data-placeholder); color: var(--ld-text-mute); }

/* ===================================================================
   키오스크(DID) 별도창
   =================================================================== */
#ld_kiosk_app {
    --ld-point: #7c5cff;
    --ld-accent: #ffd23f;
    --ld-radius: 18px;
    font-family: 'Pretendard Variable', Pretendard, system-ui, -apple-system, 'Segoe UI', Roboto, 'Apple SD Gothic Neo', sans-serif;
    color: var(--ld-text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    background: var(--ld-bg);
    overflow: hidden;
}
#ld_kiosk_app *, #ld_kiosk_app *::before, #ld_kiosk_app *::after { box-sizing: border-box; }
#ld_kiosk_app button { font-family: inherit; cursor: pointer; }
#ld_kiosk_app::before {
    content: ""; position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(1100px 700px at 18% -8%, color-mix(in srgb, var(--ld-point) 34%, transparent), transparent 60%),
        radial-gradient(900px 620px at 92% 8%, color-mix(in srgb, var(--ld-accent) 24%, transparent), transparent 58%),
        radial-gradient(800px 700px at 60% 108%, color-mix(in srgb, var(--ld-point) 24%, transparent), transparent 60%),
        var(--ld-bg);
}

.ld-kiosk { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 18px 22px 22px; gap: 14px; }
.ld-kiosk[data-orient="portrait"] { max-width: 600px; margin: 0 auto; }

.ld-kiosk__bar { display: flex; align-items: center; gap: 14px; flex: none; }
.ld-kiosk__title {
    flex: 1; min-width: 0; background: transparent; border: none; border-bottom: 2px dashed transparent;
    color: var(--ld-text); font-weight: 900; font-size: clamp(20px, 3.4vw, 40px); letter-spacing: -.02em; padding: 4px 2px;
}
.ld-kiosk__title::placeholder { color: var(--ld-text-mute); font-weight: 700; }
.ld-kiosk__title:hover { border-bottom-color: var(--ld-border); }
.ld-kiosk__title:focus { outline: none; border-bottom-color: var(--ld-point); }
.ld-kiosk__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.ld-kiosk__count { background: var(--ld-surface-2); color: var(--ld-text-dim); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 800; }
.ld-kiosk__btn {
    display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--ld-border); background: var(--ld-surface);
    color: var(--ld-text); border-radius: 11px; padding: 9px 13px; font-size: 14px; font-weight: 700;
}
.ld-kiosk__btn:hover { background: var(--ld-surface-2); }

.ld-kiosk__main { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; }
.ld-kiosk__stage { width: 100%; display: grid; place-items: center; }
.ld-kiosk[data-orient="portrait"] .ld-kiosk__stage { transform: scale(1); }

.ld-kiosk__spin {
    flex: none; width: 100%; max-width: 520px; margin: 0 auto; font-size: clamp(20px, 2.6vw, 30px);
    padding: 18px; border-radius: 18px; letter-spacing: .02em;
}
.ld-kiosk__spin:not(:disabled):hover { transform: translateY(-2px); }
.is-spinning .ld-kiosk__spin { opacity: .65; }

.ld-kiosk__editor { flex: none; background: var(--ld-surface); border: 1px solid var(--ld-border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ld-kiosk__editor .ld-textarea { min-height: 120px; }
.ld-kiosk__editrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ld-text-dim); }
.ld-kiosk__editrow label { display: inline-flex; align-items: center; gap: 8px; }
.ld-kiosk__editrow .ld-num { width: 70px; }
.ld-kiosk__editrow .ld-btn { margin-left: auto; }

@media (max-width: 560px) {
    .ld-kiosk { padding: 12px 14px 16px; }
    .ld-kiosk__tools .ld-kiosk__btn span { display: none; }
}
