@font-face { font-family: 'JKTitle'; src: url('fonts/SongMyung-sub.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JKBody'; src: url('fonts/GowunDodum-sub.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #2a211b;
  --paper: #f5ecd6;
  --paper2: #eadcbc;
  --lacquer: #23302f;
  --lacquer2: #2f4341;
  --gold: #f0cf86;
  --red: #b23b30;
  --green: #2f7f6f;
  --blue: #2f5f8c;
  --panel-w: clamp(300px, 30vw, 400px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f2ddca; color: var(--ink);
  font-family: 'JKBody', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; -webkit-tap-highlight-color: transparent; user-select: none; }
#app { position: fixed; inset: 0; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hide { display: none !important; }
button { font-family: inherit; }

/* 흔들림 */
body.shake #app { animation: shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%,90% { transform: translate(-1px, 1px); } 20%,80% { transform: translate(3px, -1px); } 30%,50%,70% { transform: translate(-4px, 2px); } 40%,60% { transform: translate(4px, -2px); } }

/* 위쪽 띠 */
#hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 14px; pointer-events: none; z-index: 20; }
#stage { display: flex; align-items: center; gap: 10px; font-family: 'JKTitle', serif; font-size: 20px; color: #2a211b; background: rgba(245,236,214,.82); padding: 6px 14px 6px 6px; border-radius: 999px; box-shadow: 0 2px 10px rgba(60,40,20,.15); opacity: 0; transition: opacity .8s; }
body.playing #stage { opacity: 1; }
.seal { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--red); color: #fbe9d0; font-size: 14px; font-family: 'JKTitle', serif; letter-spacing: -1px; }
.topbtns { display: flex; gap: 8px; pointer-events: auto; }
.ibtn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(35,48,47,.86); color: var(--gold); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.ibtn svg { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; }
.ibtn .cross { display: none; }
.ibtn.off .wave { display: none; }
.ibtn.off .cross { display: inline; }
.ibtn.off { color: #e9a99f; }

/* 카드 자리 */
#panel { position: absolute; top: 0; bottom: 0; right: 0; width: var(--panel-w); margin-right: 18px; display: flex; flex-direction: column; justify-content: center; gap: 14px; z-index: 10; pointer-events: none; opacity: 0; transform: translateX(30px); transition: opacity .7s, transform .7s; }
body.playing #panel { opacity: 1; transform: none; }
body.over #panel { opacity: 0 !important; pointer-events: none; }
#gauges { display: flex; justify-content: space-around; background: linear-gradient(var(--lacquer2), var(--lacquer)); border-radius: 16px; padding: 10px 6px 8px; box-shadow: 0 6px 18px rgba(30,30,30,.25), inset 0 0 0 2px rgba(240,207,134,.25); position: relative; }
#gauges::before { content: ''; position: absolute; left: 10px; right: 10px; top: 0; height: 5px; border-radius: 0 0 4px 4px; background: repeating-linear-gradient(90deg, var(--red) 0 14px, var(--gold) 14px 20px, var(--green) 20px 34px, var(--blue) 34px 40px); opacity: .9; }
.gauge { display: flex; flex-direction: column; align-items: center; width: 64px; position: relative; }
.g-icon { position: relative; width: 40px; height: 40px; }
.g-icon svg { position: absolute; inset: 0; width: 40px; height: 40px; }
.g-bg { fill: rgba(240,207,134,.22); }
.g-fill { fill: var(--gold); }
.g-fillwrap { position: absolute; inset: 0; transition: clip-path .8s cubic-bezier(.3,1.4,.5,1); }
.g-name { font-size: 13px; color: #e8dcc0; margin-top: 2px; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff3d0; margin-top: 4px; transform: scale(0); transition: transform .2s; box-shadow: 0 0 8px #ffe7a0; }
.gauge.pv .g-dot { transform: scale(.7); }
.gauge.pv-big .g-dot { transform: scale(1.35); }
.gauge.pv .g-icon { filter: drop-shadow(0 0 6px #ffe7a0); }
.gauge.up .g-icon { animation: gup .8s; }
.gauge.down .g-icon { animation: gdown .8s; }
@keyframes gup { 30% { transform: scale(1.18); filter: drop-shadow(0 0 8px #b8f0a0); } }
@keyframes gdown { 30% { transform: scale(.88) rotate(-6deg); filter: drop-shadow(0 0 8px #ff8f80); } }

#deck { position: relative; aspect-ratio: 0.8; width: 100%; max-height: 66vh; margin: 0 auto; perspective: 900px; pointer-events: auto; }
.card-back { position: absolute; inset: 8px 4px -10px 4px; border-radius: 18px; background-color: #e3cfa6; box-shadow: 0 10px 24px rgba(30,30,30,.22), inset 0 0 0 2px #f4e6c8, inset 0 0 0 8px #d8c194; opacity: 0; transition: opacity .4s;
  background-image: radial-gradient(circle at 50% 46%, rgba(178,59,48,.9) 0 26px, transparent 27px), radial-gradient(circle at 50% 46%, transparent 0 34px, rgba(178,59,48,.35) 35px 37px, transparent 38px), repeating-linear-gradient(45deg, rgba(120,80,30,.06) 0 6px, transparent 6px 12px); }
#deck.show .card-back { opacity: 1; }
#card { position: absolute; inset: 0; border-radius: 18px; padding: 14px 16px 16px; cursor: grab; touch-action: none; display: flex; flex-direction: column; opacity: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 14px 30px rgba(40,25,10,.28), inset 0 0 0 2px #fff7e6, inset 0 0 0 7px var(--paper2); }
#card:active { cursor: grabbing; }
.por-wrap { position: relative; flex: 1 1 0; min-height: 0; display: flex; justify-content: center; }
#portrait { height: 100%; width: auto; aspect-ratio: 1; max-width: 100%; object-fit: cover; border-radius: 50% 50% 14px 14px / 46% 46% 14px 14px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.4), 0 4px 0 rgba(90,60,30,.15); pointer-events: none; }
.who-line { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 8px; }
#who { font-family: 'JKTitle', serif; font-size: 25px; }
#whoTitle { font-size: 13px; color: #fff; background: var(--green); padding: 1px 8px; border-radius: 999px; }
#text { margin: 6px 2px 0; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.5; text-align: center; word-break: keep-all; min-height: 4.5em; }
#turn { position: absolute; top: 14px; right: 18px; font-size: 12px; color: #8a6b4a; }
.choice { position: absolute; top: 18px; z-index: 2; max-width: 60%; padding: 6px 12px; border-radius: 10px; font-family: 'JKTitle', serif; font-size: 19px; opacity: 0; pointer-events: none; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.choice.left { left: 14px; background: #3a4450; color: #f3ead6; transform: rotate(-6deg); }
.choice.right { right: 14px; background: var(--red); color: #fff3e2; transform: rotate(6deg); }
#hint { display: flex; justify-content: space-between; font-size: 13px; color: #5a4636; padding: 0 10px; opacity: .8; }
#result { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0 auto; width: max-content; max-width: 100%; text-align: center; padding: 10px 16px; border-radius: 12px; background: rgba(35,48,47,.9); color: #f6ead0; font-size: 16px; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; word-break: keep-all; }
#result.show { opacity: 1; transform: none; }

/* 건물 이름표 */
#labels { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.b-label { position: absolute; left: 0; top: 0; font-family: 'JKTitle', serif; font-size: 20px; color: #2a211b; background: #fbf3df; padding: 4px 12px; border-radius: 10px; white-space: nowrap; box-shadow: 0 4px 12px rgba(60,40,20,.25); border-bottom: 3px solid var(--red); }
.b-label::after { content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--red); }

/* 제목 화면 */
#title { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; padding-left: 7vw; background: linear-gradient(90deg, rgba(250,236,220,.75), rgba(250,236,220,0) 55%); transition: opacity .8s; }
.t-box { max-width: 520px; }
.t-small { font-size: 16px; color: #7b5b3e; letter-spacing: .2em; }
#title h1 { font-family: 'JKTitle', serif; font-weight: normal; font-size: clamp(56px, 9vw, 110px); margin: 6px 0 4px; color: #2a1d16; text-shadow: 0 3px 0 rgba(255,255,255,.5); letter-spacing: .04em; }
.t-sub { font-family: 'JKTitle', serif; font-size: 24px; color: #6b3a2a; }
button.big, .btns button { margin-top: 26px; font-size: 22px; font-family: 'JKTitle', serif; padding: 12px 34px; border: 0; border-radius: 999px; background: var(--red); color: #fff4e4; cursor: pointer; box-shadow: 0 6px 0 #7d2820, 0 10px 20px rgba(80,30,20,.3); }
button.big:active, .btns button:active { transform: translateY(3px); box-shadow: 0 3px 0 #7d2820; }
.t-note { margin-top: 22px; font-size: 15px; color: #5a4636; line-height: 1.6; }

/* 끝 화면 (시제품에서 이어받음) */
.e-box, .f-box { pointer-events: auto; text-align: center; background: rgba(250,242,226,.92); border-radius: 22px; padding: 18px 34px 22px; box-shadow: 0 12px 30px rgba(40,25,10,.3); animation: rise .6s cubic-bezier(.2,1.3,.4,1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.e-small { font-size: 15px; color: #7b5b3e; }
.e-box h2, .f-box h2 { font-family: 'JKTitle', serif; font-weight: normal; font-size: 44px; margin: 2px 0; }
.e-title { font-family: 'JKTitle', serif; font-size: 22px; color: var(--red); }
#endSummary { font-size: 14px; color: #6a5440; margin-top: 6px; }
.btns { display: flex; gap: 12px; justify-content: center; }
.btns button { margin-top: 16px; font-size: 19px; padding: 10px 26px; }
.btns button.ghost { background: #3a4450; box-shadow: 0 6px 0 #222a33, 0 10px 20px rgba(0,0,0,.25); }
.f-box { background: rgba(244,238,226,.94); filter: grayscale(1); }
.f-box img { width: 96px; height: 96px; border-radius: 50%; filter: grayscale(1) contrast(1.1); }
.f-box h2 { font-size: 54px; color: #1d1b1b; }
#fallMsg { font-size: 19px; margin: 4px 0 0; }

/* 설정 */

#debug { position: absolute; left: 12px; top: 64px; z-index: 50; background: rgba(0,0,0,.72); color: #b7f7c4; font: 12px/1.45 Consolas, monospace; padding: 8px 10px; border-radius: 8px; max-width: 360px; }
#debug pre { margin: 0; white-space: pre-wrap; font: inherit; }
.dbg-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.dbg-btns button { font: 12px sans-serif; padding: 3px 8px; border-radius: 6px; border: 0; cursor: pointer; }
#lost, #loading { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: #f2ddca; font-family: 'JKTitle', serif; font-size: 24px; color: #5a4636; text-align: center; transition: opacity .6s; }


/* 세로 화면: 카드가 아래로 */
body.portrait #panel { top: auto; left: 0; right: 0; width: auto; margin: 0 auto; max-width: 480px; height: 50vh; padding: 0 14px 34px; gap: 8px; justify-content: flex-end; transform: translateY(30px); }
body.portrait.playing #panel { transform: none; }
body.portrait #deck { aspect-ratio: auto; flex: 1 1 0; min-height: 0; max-height: none; width: 100%; }
body.portrait #text { min-height: 0; font-size: 16px; }
body.portrait #who { font-size: 21px; }
body.portrait #title { align-items: flex-start; padding: 16vh 24px 0; background: linear-gradient(180deg, rgba(250,236,220,.8), rgba(250,236,220,0) 60%); }
body.portrait #stage { font-size: 16px; }
@media (max-height: 700px) { #text { font-size: 16px; min-height: 3.5em; } #who { font-size: 22px; } .g-icon, .g-icon svg { width: 34px; height: 34px; } }

/* ===== 본편(P0) 추가 ===== */
#title.gone { opacity: 0; pointer-events: none; }
#loading.gone { opacity: 0; pointer-events: none; }
.t-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.t-btns button.big { margin-top: 0; }
button.big.ghost, .btns button.ghost { background: #3a4450; box-shadow: 0 6px 0 #222a33, 0 10px 20px rgba(0,0,0,.25); }
#btnContinue { background: var(--green); box-shadow: 0 6px 0 #1d5248, 0 10px 20px rgba(20,60,50,.3); }
.hide { display: none !important; }

/* 모달 공통 */
.modal { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(40,30,20,.18); }
.modal.bottom { align-items: flex-end; padding-bottom: 6vh; background: none; pointer-events: none; }
.modal.side { align-items: flex-start; justify-content: flex-end; padding: 70px 14px 14px; background: none; pointer-events: none; }
.m-box { pointer-events: auto; background: #fbf4e4; border-radius: 20px; box-shadow: 0 12px 30px rgba(40,25,10,.3); padding: 18px 24px 20px; max-height: calc(100vh - 32px); overflow: auto; animation: rise .5s cubic-bezier(.2,1.3,.4,1); }
.m-box h3 { margin: 0 0 8px; font-family: 'JKTitle', serif; font-weight: normal; font-size: 24px; }
.m-box h4 { margin: 14px 0 4px; font-family: 'JKTitle', serif; font-weight: normal; font-size: 18px; color: #6b3a2a; }
.m-box button { font-family: inherit; }

/* 설정 */
.s-box { width: min(380px, 100%); font-size: 16px; }
.s-box .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.s-box .row.small { font-size: 13px; color: #7b6650; }
.s-box .row.warn { color: var(--red); }
.s-box label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.s-box button { padding: 6px 16px; border-radius: 999px; border: 0; background: var(--lacquer); color: var(--gold); font-size: 15px; cursor: pointer; }
.s-box button.danger { background: #8d2f2a; color: #fff1e2; }
#codeBox { width: 100%; font: 12px/1.4 Consolas, monospace; border-radius: 10px; border: 1px solid #d8c7a4; padding: 8px; background: #fffaf0; resize: vertical; word-break: break-all; }

/* 나의 기록 */
.r-box { width: min(560px, 100%); font-size: 15px; }
#recSummary { font-size: 14px; color: #6a5440; }
.r-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.r-box li { padding: 6px 10px; border-radius: 8px; background: #f3e8cf; }
.r-box li.off { color: #a9977a; background: #efe6d3; }
.r-box .close { margin-top: 14px; padding: 8px 22px; border-radius: 999px; border: 0; background: var(--lacquer); color: var(--gold); font-size: 16px; cursor: pointer; }

/* 사관 퀴즈 */
.q-box { width: min(520px, 100%); text-align: center; background-color: #f6ecd4; }
.q-head { display: flex; justify-content: center; gap: 8px; align-items: center; font-size: 14px; color: #7b5b3e; }
#qText { font-family: 'JKTitle', serif; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.45; margin: 10px 0 16px; word-break: keep-all; }
#qOpts { display: grid; gap: 10px; }
.q-opt { position: relative; font-size: 18px; padding: 12px 16px; border-radius: 14px; border: 2px solid #d9c49b; background: #fffaf0; color: var(--ink); cursor: pointer; word-break: keep-all; }
.q-opt:hover:not(:disabled) { border-color: var(--red); }
.q-opt:disabled { cursor: default; }
.q-opt.right { border-color: var(--green); background: #e7f3e9; }
.q-opt.wrong { border-color: var(--red); background: #f9e3df; text-decoration: line-through; }
/* 맞히면 붓 동그라미 */
.q-opt.circle::after { content: ''; position: absolute; left: -10px; right: -10px; top: -9px; bottom: -9px; border: 4px solid rgba(178,59,48,.85); border-radius: 50% 46% 52% 48% / 60% 50% 54% 44%; transform: rotate(-3deg); animation: brush .5s ease-out; pointer-events: none; }
@keyframes brush { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#qFeedback { min-height: 1.6em; margin-top: 12px; font-size: 17px; }
#qFeedback.ok { color: var(--green); font-family: 'JKTitle', serif; font-size: 22px; }
#qFeedback.no { color: #8d2f2a; }
#qNext { margin-top: 12px; }
.tag-out, #outside { font-size: 12px; color: #fff; background: #6b5aa0; padding: 1px 8px; border-radius: 999px; }
#outside { position: absolute; top: 14px; left: 18px; z-index: 1; }

/* 실각·사관 기록 끝 */
.f-box, .e-box { text-align: center; }
#fallName { font-family: 'JKTitle', serif; font-size: 22px; color: #333; }
#fallReal { font-size: 15px; color: #555; margin: 4px 0 0; }
#soonQuiz, #soonVals { font-size: 15px; color: #6a5440; margin-top: 4px; }
#soonNext { font-size: 17px; margin: 10px 0 0; }

/* 사관 두루마리 카드 */
#card.scroll { background-color: #efe3c4; box-shadow: 0 14px 30px rgba(40,25,10,.28), inset 0 0 0 2px #fff7e6, inset 0 14px 0 #c9a96c, inset 0 -14px 0 #c9a96c; }
#card.scroll #text { font-family: 'JKTitle', serif; font-size: clamp(17px, 1.5vw, 20px); }

/* 손 모양 안내 */
#hand { position: absolute; left: 50%; bottom: 42%; width: 64px; margin-left: -32px; opacity: 0; pointer-events: none; transition: opacity .3s; text-align: center; z-index: 3; }
#hand svg { width: 52px; height: 52px; fill: #fff; stroke: #2a211b; stroke-width: 1.6; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
#hand span { display: block; font-size: 12px; color: #fff; background: rgba(35,48,47,.85); border-radius: 999px; padding: 2px 6px; white-space: nowrap; margin-left: -20px; margin-right: -20px; }
#hand.show { opacity: 1; animation: handSwipe 2.2s ease-in-out infinite; }
@keyframes handSwipe { 0%, 100% { transform: translateX(-40px) rotate(-8deg); } 50% { transform: translateX(40px) rotate(8deg); } }
#hint span { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#btnHome { display: none; }
body.playing #btnHome { display: grid; }
#hint { transition: opacity .3s; }
#deck:not(.show) ~ #hint { opacity: 0; }
#records { z-index: 45; }
#settings { z-index: 50; }
#title.gone { visibility: hidden; transition: opacity .8s, visibility 0s .8s; }
#loading.gone { visibility: hidden; transition: opacity .6s, visibility 0s .6s; }

/* ===== 태조 데이터(설계서 v2) ===== */
/* 두루마리: 「이번 판에서」 + 📜 「실제 역사」 */
#runBox { margin: 6px 2px 0; padding: 8px 10px; border-radius: 10px; background: rgba(255,250,236,.75); border: 1px dashed #c9a96c; font-size: clamp(14px, 1.2vw, 16px); line-height: 1.5; word-break: keep-all; text-align: left; }
.run-label { display: block; font-size: 12px; color: #8a6b4a; margin-bottom: 2px; }
#realLabel { margin: 8px 0 0; font-size: 13px; color: #6b3a2a; text-align: center; }
#card.record .por-wrap { flex: 0 0 22%; }
#card.record #text { min-height: 0; font-size: clamp(15px, 1.3vw, 18px); }
#card.record .who-line { margin-top: 4px; }
#year { position: absolute; top: 14px; right: 64px; font-size: 12px; color: #8a6b4a; }
#card.scroll:not(.record) .por-wrap { flex: 1 1 0; }
/* 하늘에 먹으로 쓰는 글씨 */
#skyText { position: absolute; left: 0; right: 0; top: 9vh; text-align: center; z-index: 4; pointer-events: none; font-family: 'JKTitle', serif; font-size: clamp(64px, 11vw, 150px); color: rgba(30,26,30,.88); letter-spacing: .1em; opacity: 0; text-shadow: 0 0 18px rgba(255,255,255,.35); }
body:not(.portrait) #skyText { right: var(--panel-w); }
#skyText.show { animation: inkWrite 4.2s ease-out forwards; }
@keyframes inkWrite { 0% { opacity: 0; clip-path: inset(0 100% 0 0); filter: blur(6px); } 25% { opacity: 1; filter: blur(0); } 55% { clip-path: inset(0 0 0 0); } 80% { opacity: 1; } 100% { opacity: 0; clip-path: inset(0 0 0 0); } }
/* 성문 글자 빛 (仁·義·禮) */
.b-label.glyph { background: none; box-shadow: none; border: 0; font-size: 46px; color: #fff3c4; text-shadow: 0 0 12px #ffcf5a, 0 0 28px #ffb12e; }
.b-label.glyph::after { display: none; }

/* ===== 담임 피드백: 그래도 역사는 흘렀다 · 건물 모습 · 난이도 ===== */
#runBox.against { background: rgba(255,236,230,.85); border: 2px solid #b23b30; }
#runBox.against .run-label { color: #b23b30; font-weight: bold; }
#stamp { position: absolute; right: 20px; top: 13%; z-index: 4; width: 92px; height: 92px; border-radius: 12px; border: 4px solid rgba(178,59,48,.9); color: rgba(178,59,48,.95); font-family: 'JKTitle', serif; font-size: 17px; line-height: 1.15; display: grid; place-items: center; text-align: center; transform: rotate(-12deg) scale(0); opacity: 0; pointer-events: none; background: rgba(255,248,236,.55); }
#stamp.show { animation: stampIn .55s .25s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes stampIn { 0% { transform: rotate(-12deg) scale(2.2); opacity: 0; } 100% { transform: rotate(-12deg) scale(1); opacity: 1; } }
body.beat #gauges { animation: beatShake .9s cubic-bezier(.36,.07,.19,.97); }
@keyframes beatShake { 10%,90% { transform: translate(-2px,0) rotate(-.5deg); } 20%,80% { transform: translate(5px,0) rotate(1deg); } 30%,50%,70% { transform: translate(-8px,2px) rotate(-1.5deg); } 40%,60% { transform: translate(8px,-2px) rotate(1.5deg); } }
.gauge.hit .g-icon { animation: ghit 1.1s; }
@keyframes ghit { 15% { transform: scale(1.35) rotate(-10deg); filter: drop-shadow(0 0 12px #ff5040); } 35% { transform: scale(.8) rotate(8deg); } 60% { transform: scale(1.1); } }
.gauge.warn .g-fill { animation: gwarn 1s infinite; }
@keyframes gwarn { 50% { fill: #ff7a66; } }
/* 미리보기 ▲▼ (새싹) */
.gauge.pv-arrow .g-dot { width: auto; height: auto; background: none; box-shadow: none; font-size: 12px; color: #fff3d0; line-height: 1; }
.gauge.pv-arrow.pv-mid .g-dot { font-size: 16px; }
.gauge.pv-arrow.pv-big .g-dot { font-size: 21px; }
.gauge.pv-arrow .g-dot { transform: none !important; }
/* 건물 모습 띠 */
.bst { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #e7f1e4; color: #2f5f3a; margin: 2px 2px 0 0; }
.bst.forced { background: #eee0dc; color: #7d2820; font-family: 'JKTitle', serif; }
.bst.late { background: #efe7d2; color: #6b4a1e; font-family: 'JKTitle', serif; }
#soonBuilt { margin-top: 6px; max-width: 520px; }
#fallHint { font-size: 15px; color: #2f5f3a; background: #eef5ea; border-radius: 10px; padding: 6px 10px; margin: 8px 0 0; }
#optDiff { font-family: inherit; font-size: 15px; padding: 4px 6px; border-radius: 8px; }
#runText { white-space: pre-line; }
