/* 응원창(공개 대화상자 + 관리자 미리보기). P-PATCH의 응원창과 같은 모양. */
dialog#support-dialog.sg-layer { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: #fafaf6; color: #292a25; border: 0; border-radius: 16px; padding: 30px 26px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: left; }
.sg-layer .sg-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #e2e5c9; }
.sg-layer .sg-head .eyebrow { display: block; font-size: 10px; font-weight: 800; letter-spacing: 2.2px; color: #7a5ac8; margin-bottom: 4px; }
.sg-layer .sg-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.5px; color: #292a25; }
.sg-layer .sg-head .close { position: static; border: 0; background: none; font-size: 26px; line-height: 1; color: #748255; cursor: pointer; padding: 0 2px; font-weight: 700; }
.sg-lead { margin: 16px 0 12px; text-align: center; font-size: 13px; color: #62645d; }
.sg-card { background: #fcfcfc; border-radius: 12px; padding: 0 0 16px; text-align: center; }
.sg-art { display: block; width: 100%; height: auto; }
.sg-qr { position: relative; display: inline-block; margin-top: 8px; padding: 16px; background: #fff; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.07); line-height: 0; }
.sg-qr svg { width: 176px; height: 176px; display: block; }
.sg-avatar { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); border-radius: 11px; border: 3px solid #fff; box-sizing: content-box; }
.sg-foot { margin: 14px 0 0; text-align: center; font-size: 12px; line-height: 1.5; font-weight: 700; color: #62645d; word-break: keep-all; }
.sg-gauge { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; text-align: left; }
.sg-dial { flex: none; width: 112px; height: auto; overflow: visible; }
.sg-needle { transform: rotate(0deg); transition: transform 1.1s cubic-bezier(.3,1.4,.5,1); }
.sg-num { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sg-end { font-size: 11px; font-weight: 800; fill: #9a9c8d; }
.sg-read { flex: 1; display: grid; gap: 2px; min-width: 0; }
.sg-read > span { justify-self: start; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; font-weight: 800; letter-spacing: 0; color: #fff; background: #292a25; padding: 3px 8px 3px 18px; border-radius: 999px; position: relative; margin-bottom: 3px; }
.sg-read > span::before { content: ''; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #ff5252; animation: sg-blink 1.4s ease-in-out infinite; }
.sg-read b { font-size: 19px; font-weight: 800; letter-spacing: -.5px; }
.sg-read small { display: block; font-size: 12.5px; font-weight: 600; color: #3f413a; line-height: 1.4; word-break: keep-all; }
.sg-date { font-style: normal; font-size: 10.5px; color: #8a8c80; margin-top: 4px; }
.sg-face { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.sg-face span { font-size: 36px; line-height: 1; display: block; }
.sg-face i { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: 20px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.sg-fx-doom .sg-face { animation: sg-alarm .8s ease-in-out infinite; }
.sg-fx-doom .sg-face span { animation: sg-shake .25s linear infinite; }
.sg-fx-doom .sg-face i { animation: sg-float 1.6s ease-in-out infinite; }
.sg-fx-siren .sg-face span { animation: sg-bob 1s ease-in-out infinite; }
.sg-fx-siren .sg-face i { animation: sg-siren .6s ease-in-out infinite; }
.sg-fx-droop .sg-face span { animation: sg-droop 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.sg-fx-bob .sg-face span { animation: sg-bob 2s ease-in-out infinite; }
.sg-fx-jump .sg-face span { animation: sg-jump .9s cubic-bezier(.3,0,.5,1) infinite; }
.sg-fx-jump .sg-face i { animation: sg-wave .9s ease-in-out infinite; }
.sg-fx-flex .sg-face span { animation: sg-flex .7s ease-in-out infinite; }
.sg-fx-flex .sg-face i { animation: sg-rain 1.2s ease-in infinite; }
.sg-fx-flex .sg-face { box-shadow: 0 0 0 4px rgba(255,193,7,.35), 0 4px 14px rgba(0,0,0,.08); }
@keyframes sg-blink { 50% { opacity: .25; } }
@keyframes sg-bob { 50% { transform: translateY(-3px); } }
@keyframes sg-droop { 50% { transform: rotate(-7deg) translateY(2px); } }
@keyframes sg-siren { 50% { transform: translateX(-5px); } }
@keyframes sg-jump { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.1, .9); } 50% { transform: translateY(-14px) scale(.95, 1.05); } }
@keyframes sg-wave { 50% { transform: rotate(-15deg); } }
@keyframes sg-flex { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-3px); } }
@keyframes sg-rain { 0% { transform: translateY(-30px) rotate(-10deg); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(4px) rotate(10deg); opacity: 1; } }
@keyframes sg-float { 50% { transform: translateY(-6px); opacity: .7; } }
@keyframes sg-shake { 25% { transform: translate(-2px,1px) rotate(-6deg); } 50% { transform: translate(2px,-1px) rotate(5deg); } 75% { transform: translate(-1px,-1px) rotate(-3deg); } }
@keyframes sg-alarm { 50% { box-shadow: 0 0 0 8px rgba(229,57,53,.25), 0 4px 14px rgba(0,0,0,.08); } }
/* needle keeps moving around its value: --a = degrees, --d = period */
.sg-wob { animation: var(--d) ease-in-out 1.1s infinite; }
.sg-sway { animation-name: sg-sway; }
.sg-shake { animation-name: sg-needle-shake; animation-timing-function: cubic-bezier(.5,0,.5,1); }
@keyframes sg-sway { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(calc(var(--a) * 1deg)); } 75% { transform: rotate(calc(var(--a) * -1deg)); } }
@keyframes sg-needle-shake { 0%, 100% { transform: rotate(0deg); } 9% { transform: rotate(calc(var(--a) * .7deg)); } 17% { transform: rotate(calc(var(--a) * -.4deg)); } 31% { transform: rotate(calc(var(--a) * 1deg)); } 38% { transform: rotate(calc(var(--a) * -.2deg)); } 52% { transform: rotate(calc(var(--a) * -.9deg)); } 60% { transform: rotate(calc(var(--a) * .3deg)); } 71% { transform: rotate(calc(var(--a) * .8deg)); } 79% { transform: rotate(calc(var(--a) * -1deg)); } 90% { transform: rotate(calc(var(--a) * .4deg)); } }
@media (prefers-reduced-motion: reduce) { .sg-gauge *, .sg-gauge *::before { animation: none !important; } }
@media (max-width: 420px) { .sg-gauge { flex-wrap: wrap; justify-content: center; text-align: center; } .sg-read { flex-basis: 100%; order: 3; justify-items: center; } .sg-read > span { justify-self: center; } }

/* 관리자 > 응원창 관리 */
.sga { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .sga { grid-template-columns: minmax(0, 1fr); } }
.sga-form { display: grid; gap: 14px; min-width: 0; }
.sga-box { background: #fff; border: 1px solid #e3e4dc; border-radius: 12px; padding: 16px; display: grid; gap: 10px; }
.sga-box h3, .sga-preview h3 { margin: 0 0 2px; font-size: 14px; }
.sga-field { display: grid; gap: 4px; font-size: 12px; color: #62645d; }
.sga-field input { font: inherit; font-size: 14px; color: #292a25; padding: 8px 10px; border: 1px solid #d8dacf; border-radius: 8px; }
.sga-field small { color: #8a8c80; }
.sga-level { display: flex; gap: 10px; align-items: center; }
.sga-level input[type=range] { flex: 1; }
.sga-level input[type=number] { width: 72px; font: inherit; padding: 6px 8px; border: 1px solid #d8dacf; border-radius: 8px; }
.sga-marks, .sga-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sga-marks button, .sga-tabs button { border: 1px solid #d8dacf; background: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums; }
.sga-marks button.on, .sga-tabs button.on { background: #292a25; color: #fff; border-color: #292a25; }
.sga-mode { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; }
.sga-mode > span { font-size: 12px; color: #62645d; }
.sga-setname { display: flex; gap: 10px; align-items: end; }
.sga-setname .sga-field { flex: 0 1 50%; }
.sga-emoji { align-self: end; padding: 8px 12px; border: 1px dashed #c9cbbf; border-radius: 8px; font-size: 13px; color: #292a25; text-decoration: none; white-space: nowrap; }
.sga-emoji:hover { background: #f4f4ef; }
.sga-setname .sga-del { margin-left: auto; }
.sga-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sga-size { display: inline-flex; align-items: center; gap: 2px; font-weight: 400; }
.sga-size button { width: 22px; height: 22px; padding: 0; border: 1px solid #d8dacf; background: #fff; border-radius: 6px; font: inherit; font-size: 14px; line-height: 1; cursor: pointer; color: #292a25; }
.sga-size em { min-width: 40px; text-align: center; font-style: normal; font-size: 11px; color: #62645d; font-variant-numeric: tabular-nums; }
.sga-stages { table-layout: fixed; }
.sga-stages col.c-at { width: 44px; } .sga-stages col.c-emo { width: 62px; } .sga-stages col.c-word { width: 190px; }
.sga-stages thead .sga-label { white-space: nowrap; justify-content: flex-start; gap: 10px; }
.sga-del { border: 1px solid #e0b4b4; color: #c62828; background: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.sga-stages { width: 100%; border-collapse: collapse; font-size: 13px; }
.sga-stages th, .sga-stages td { padding: 4px; text-align: left; }
.sga-stages thead th { font-size: 11px; color: #8a8c80; font-weight: 700; }
.sga-stages tbody th { font-variant-numeric: tabular-nums; }
.sga-stages input { width: 100%; box-sizing: border-box; font: inherit; padding: 6px 8px; border: 1px solid #d8dacf; border-radius: 6px; }
.sga-stages input.emo { width: 52px; text-align: center; font-size: 18px; padding: 4px; }
.sga-hint { margin: 0; font-size: 11.5px; color: #8a8c80; }
.sga-save { display: flex; gap: 12px; align-items: center; position: sticky; bottom: 0; background: linear-gradient(transparent, #f4f4ef 30%); padding: 14px 0 6px; }
.sga-save span { font-size: 13px; color: #62645d; }
.sga-preview { position: sticky; top: 16px; }
.sga-layer { background: #fafaf6; color: #292a25; border-radius: 16px; padding: 26px 22px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.15); }
.sga-layer .close { display: none; }
