/*
 * 가정법 엘리베이터 (/grammar/conditional/elevator.jsp, 2026-10-21) — 게임 js/ps2-conditional-elevator.js 의 꾸밈. 틀의 꾸밈은 css/ps2-conditional-arcade.css (.ga-*)
 *   층 색: 1층 현실의 조건 #34d399 · 2층 현실과 먼 가정 #38bdf8 · 3층 지난 일을 뒤집는 가정 #a78bfa · 4층 섞인 가정 #fbbf24
 */
#main .gi .ga--elevator { --ga-bg1: #121a3d; --ga-bg2: #0a0e24; --ga-glow: #fde68a; --ga-halo: rgba(56, 189, 248, .22); --ga-win: #155e75; --ga-hot: #f59e0b; }
#main .gi .ga--elevator .cel-cv { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer; }
#main .gi .ga--elevator .ga-q { min-height: 104px; }
#main .gi .ga--elevator .ga-q .cel-sent { margin: 2px 0 0; font-size: clamp(16px, 2.2vw, 20px); font-weight: 700; line-height: 1.5; color: #f8fafc; letter-spacing: -0.005em; text-align: center; }
#main .gi .ga--elevator .ga-q .cel-sent.is-ok { color: #a7f3d0; }
#main .gi .ga--elevator .cel-full { display: grid; gap: 4px; }
#main .gi .ga--elevator .cel-full .ga-sent { margin: 0; }
#main .gi .ga--elevator .cel-ans { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
#main .gi .ga--elevator .cel-ans__k { font-weight: 700; color: #334155; }
#main .gi .ga--elevator .cel-chip { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 800; line-height: 1.6; color: #0f172a; white-space: nowrap; }
#main .gi .ga--elevator .cel-chip--0 { background: #a7f3d0; }
#main .gi .ga--elevator .cel-chip--1 { background: #bae6fd; }
#main .gi .ga--elevator .cel-chip--2 { background: #ddd6fe; }
#main .gi .ga--elevator .cel-chip--3 { background: #fde68a; }
#main .gi .ga--elevator .ga-q .cel-okline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; font-size: clamp(14px, 1.9vw, 16px); }
#main .gi .ga--elevator .cel-okmark { color: #34d399; font-size: 1.15em; }
#main .gi .ga--elevator .cel-rides { display: inline-flex; align-items: center; gap: 2px; padding: 2px 9px; border-radius: 999px; background: rgba(56, 189, 248, .12); color: #0369a1; font-size: 12px; font-weight: 800; white-space: nowrap; }
#main .gi .ga--elevator .cel-rides i { font-style: normal; color: #0284c7; font-size: 11px; transition: color .2s, transform .2s; }
#main .gi .ga--elevator .cel-rides i.is-off { color: #cbd5e1; transform: scale(.8); }
#main .gi .ga--elevator .cel-speed { padding: 2px 9px; border-radius: 999px; background: rgba(251, 191, 36, .14); color: #b45309; font-size: 12px; font-weight: 800; white-space: nowrap; }
#main .gi .ga--elevator .cel-pad { min-width: 180px; height: 56px; }
#main .gi .ga--elevator .cel-pad b { font-size: 19px; }
#main .gi .ga--elevator .cel-pad.is-wait { opacity: .55; }
#main .gi .ga--elevator .ga-card .cel-sent, #main .gi .ga--elevator .ga-wrong .cel-sent { text-align: left; color: var(--ga-ink); font-size: 17px; }

/* 로비 그림: 층 넷 · 통로 · 올라가는 엘리베이터 · 기다리는 사람 */
#main .gi .ga--elevator .cel-hero { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(110% 80% at 50% 45%, rgba(56, 189, 248, .18), transparent 62%), linear-gradient(#1b2250, #0b1027); }
#main .gi .ga--elevator .cel-hero__floors { position: absolute; left: 7%; right: 36%; top: 12px; bottom: 12px; display: grid; grid-template-rows: repeat(4, 1fr); gap: 6px; }
#main .gi .ga--elevator .cel-hero__floor { display: grid; align-content: center; gap: 1px; padding: 4px 10px; border-radius: 10px; border: 1.5px solid rgba(var(--rgb), .55); border-left: 5px solid var(--c);
    background: linear-gradient(90deg, rgba(var(--rgb), .28), rgba(var(--rgb), .05)); color: #f8fafc; line-height: 1.2; }
#main .gi .ga--elevator .cel-hero__floor b { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#main .gi .ga--elevator .cel-hero__floor small { font-size: 10px; font-weight: 700; color: var(--l); white-space: nowrap; }
#main .gi .ga--elevator .cel-hero__floor--0 { --c: #34d399; --l: #a7f3d0; --rgb: 52, 211, 153; }
#main .gi .ga--elevator .cel-hero__floor--1 { --c: #38bdf8; --l: #bae6fd; --rgb: 56, 189, 248; }
#main .gi .ga--elevator .cel-hero__floor--2 { --c: #a78bfa; --l: #ddd6fe; --rgb: 167, 139, 250; animation: cel-lit 4.4s ease-in-out infinite; }
#main .gi .ga--elevator .cel-hero__floor--3 { --c: #fbbf24; --l: #fde68a; --rgb: 251, 191, 36; }
#main .gi .ga--elevator .cel-hero__shaft { position: absolute; right: 9%; top: 6px; bottom: 6px; width: 20%; border-radius: 10px; background: #060918; box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .3); }
#main .gi .ga--elevator .cel-hero__cable { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: linear-gradient(#94a3b8, rgba(148, 163, 184, .2)); }
#main .gi .ga--elevator .cel-hero__car { position: absolute; left: 12%; right: 12%; bottom: 8px; height: 50px; border-radius: 7px; background: linear-gradient(135deg, #f8fafc, #94a3b8); box-shadow: 0 0 16px rgba(253, 230, 138, .35);
    animation: cel-ride 4.4s ease-in-out infinite; overflow: hidden; }
#main .gi .ga--elevator .cel-hero__car::before { content: ""; position: absolute; inset: 5px; border-radius: 4px; background: linear-gradient(rgba(253, 230, 138, .6), #0e142d); }
#main .gi .ga--elevator .cel-hero__door { position: absolute; top: 5px; bottom: 5px; width: calc(50% - 5px); background: rgba(100, 116, 139, .95); animation: cel-door 4.4s ease-in-out infinite; }
#main .gi .ga--elevator .cel-hero__door--l { left: 5px; transform-origin: left center; }
#main .gi .ga--elevator .cel-hero__door--r { right: 5px; transform-origin: right center; }
#main .gi .ga--elevator .cel-hero__person { position: absolute; right: 30.5%; bottom: 0; width: 10px; height: 30px; border-radius: 5px 5px 2px 2px; background: #a78bfa; animation: cel-person 4.4s ease-in-out infinite; }
#main .gi .ga--elevator .cel-hero__person::before { content: ""; position: absolute; left: 50%; top: -11px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fde7c2; }
@keyframes cel-ride { 0%, 8% { bottom: 8px; } 46%, 78% { bottom: calc(50% - 4px); } 100% { bottom: 8px; } }
@keyframes cel-door { 0%, 48% { transform: scaleX(1); } 56%, 70% { transform: scaleX(.08); } 78%, 100% { transform: scaleX(1); } }
@keyframes cel-person { 0%, 50% { bottom: calc(50% + 4px); opacity: 1; transform: translateX(0); } 70% { transform: translateX(42px); opacity: 1; } 76%, 100% { transform: translateX(42px); opacity: 0; } }
@keyframes cel-lit { 0%, 40% { box-shadow: none; } 50%, 70% { box-shadow: 0 0 22px rgba(var(--rgb), .85); background: linear-gradient(90deg, rgba(var(--rgb), .6), rgba(var(--rgb), .15)); } 80%, 100% { box-shadow: none; } }
#main .gi .ga--elevator.cel-lv1 .ga-q { min-height: 112px; }
#main .gi .ga--elevator.cel-lv3 .ga-q { min-height: 124px; }
@media (max-width: 760px) {
    #main .gi .ga--elevator .ga-q { min-height: 96px; padding: 8px 10px; gap: 2px; }
    #main .gi .ga--elevator.cel-lv1 .ga-q { min-height: 116px; }
    #main .gi .ga--elevator.cel-lv3 .ga-q { min-height: 140px; }
    #main .gi .ga--elevator .ga-q .ga-ask { font-size: 13.5px; }
    #main .gi .ga--elevator .ga-q .cel-sent { font-size: 15.5px; line-height: 1.45; }
    #main .gi .ga--elevator .ga-ko { font-size: 13px; }
    #main .gi .ga--elevator .ga-side { display: none; }
    #main .gi .ga--elevator .cel-pad { min-width: 0; height: 50px; }
    #main .gi .ga--elevator .cel-hero__floors { left: 5%; right: 38%; top: 8px; bottom: 8px; gap: 4px; }
    #main .gi .ga--elevator .cel-hero__floor { padding: 2px 8px; }
    #main .gi .ga--elevator .cel-hero__floor b { font-size: 11px; }
    #main .gi .ga--elevator .cel-hero__floor small { font-size: 9px; }
    #main .gi .ga--elevator .cel-hero__car { height: 38px; }
    #main .gi .ga--elevator .cel-hero__person { height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    #main .gi .ga--elevator .cel-hero * { animation: none !important; }
    #main .gi .ga--elevator .cel-hero__car { bottom: calc(50% - 4px); }
}
