/* 사용 안내 라벨, 하단 바, 푸터, 만든 이 소식 행, 업데이트 내역. 기존 서당 색을 그대로 쓴다. */

/* 사용 안내 칩: 첫 화면 타이틀 아래, 시작 버튼보다 튀지 않게 */
.usage-chips{position:relative;display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;padding:0;background:none;color:#46583f;text-align:left;border-radius:999px}
.usage-chips .chip{padding:4px 11px;border-radius:999px;background:#eaeedd;border:1px solid #d9e0c9;font-size:13px;line-height:1.3;white-space:nowrap}
.usage-chips .chip:first-child{background:#dde8cf;color:#2a4d3b}
.usage-chips .chip-info{display:inline-grid;place-items:center;color:#5d6d55}
.usage-chips:disabled{opacity:1}

/* 하단 바 + 푸터 */
.app-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:6px 12px;margin-top:18px;color:#64748b;font-size:12px}
.app-footer [hidden]{display:none!important}
.bar-left{display:flex;align-items:center;gap:4px}
.bar-icon{position:relative;display:inline-grid;place-items:center;width:42px;height:42px;padding:0;border-radius:12px;background:transparent;color:#3f5d45;text-decoration:none}
.bar-icon:hover{background:#e9efdf}
.bar-right{display:flex;align-items:center;gap:8px;margin-left:auto}
.app-footer .bar-text{background:none;color:#56664f;font-size:13px;padding:8px 4px;min-height:42px}
.app-footer .bar-ver{position:relative;padding:7px 13px;min-height:34px;border-radius:999px;background:#e9efdf;color:#2f5140;font-size:13px}
.ver-dot{position:absolute;top:0;right:0;width:10px;height:10px;border-radius:50%;background:#d85a41;box-shadow:0 0 0 2px #f5f6eb}
.credit{flex-basis:100%;margin:6px 0 24px;text-align:center;color:#64748b;font-size:12px}
.credit a{color:inherit;text-decoration:underline;text-decoration-color:#64748b80;text-underline-offset:3px}

/* 결과·안내 화면의 만든 이 소식 한 줄 */
.author-row{position:relative;display:flex;align-items:center;gap:12px;margin:16px 0 4px;padding:11px 14px;border-radius:14px;background:#f1f4e6;border:1px solid #e1e7d3;color:#2f5140;text-decoration:none}
.author-row:hover{background:#eaf0dc}
.author-icon{display:grid;place-items:center;color:#3f5d45}
.author-text strong{display:block;font-weight:normal;font-size:15px}
.author-text small{display:block;margin-top:2px;font-size:12px;color:#56664f}
.author-arrow{margin-left:auto;font-size:24px;line-height:1;color:#7b8770}
#modalBody .usage-line{margin:14px 0 0;text-align:center;font-size:12px;color:#5f6f58}

/* 업데이트 내역 */
.changelog-ver h3{margin:18px 0 8px;font-size:19px;color:#2f5140}
.changelog-ver h3 small{margin-left:6px;font-size:13px;color:#6c7b63}
.changelog-ver ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.changelog-ver li{display:flex;align-items:baseline;gap:9px;line-height:1.5;color:#3d5238;word-break:keep-all}
.log-kind{flex:none;padding:2px 9px;border-radius:999px;background:#e3ecd5;color:#2f5140;font-size:12px}
.log-kind.new{background:#dfeaf5;color:#284f70}
.log-kind.fix{background:#f6e4dc;color:#7a3a26}
.changelog-older summary{margin-top:16px;cursor:pointer;color:#56664f}

/* 사용 안내 패널 */
.usage-block h3{margin:18px 0 4px;font-size:17px;color:#2f5140}
#modalBody .usage-block p{margin:0}
#modalBody .usage-block small{font-size:13px}
.install-steps{padding-left:22px;line-height:1.9;color:#3d5238}

/* 조작 안내: 손가락 기기와 마우스 기기에 맞는 문장만 보인다 */
@media (hover:hover) and (pointer:fine){.view-hint .touch-only{display:none}}
@media not all and (hover:hover) and (pointer:fine){.view-hint .mouse-only{display:none}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* 화면 전환: 첫 화면·컷신이 떠 있으면 게임 화면은 뒤에서 멈춰 있다 */
body[data-screen="landing"],body[data-screen="story"]{overflow:hidden}
body:not([data-screen="landing"]) .landing{display:none}

/* 첫 화면 */
.landing{position:fixed;inset:0;z-index:40;display:flex;flex-direction:column;overflow-y:auto;padding:0 20px;background:radial-gradient(120% 80% at 15% 0%,#fffbe6 0%,#f5f6eb 55%,#e7eed8 100%)}
.landing-main{flex:1;display:grid;align-content:center;justify-items:center;gap:22px;width:100%;max-width:1100px;margin:0 auto;padding:28px 0 12px}
.landing-art{width:min(480px,100%);aspect-ratio:8/5;overflow:hidden;border-radius:28px;background:#fff4d2;box-shadow:0 8px 0 #d6dfc4,0 20px 40px #31593e24}
.landing-art svg{display:block;width:100%;height:100%}
.landing-copy{display:flex;flex-direction:column;align-items:center;width:100%;max-width:470px;text-align:center}
.landing-eyebrow{font-size:14px;color:#5b6b50;letter-spacing:.5px}
.landing-title{margin:6px 0 2px;font-size:clamp(40px,9vw,62px);font-weight:normal;line-height:1.15;letter-spacing:2px;color:#1f4a38;text-shadow:0 3px 0 #ffd36b}
.landing-sub{margin:0 0 16px;font-size:18px;color:#46583f;word-break:keep-all}
.landing-copy .usage-chips{justify-content:center;margin:0 0 20px}
.landing-start{max-width:340px;min-height:60px;padding:16px 22px;font-size:22px;gap:10px}
.landing-links{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:14px}
.landing-links button{min-height:44px;padding:10px 16px;border-radius:12px;background:#e9efdf;color:#2f5140;font-size:15px}
.landing .app-footer{width:100%;max-width:1100px;margin:0 auto;padding-top:6px}
.landing-toast{position:fixed;left:50%;bottom:120px;z-index:41;max-width:calc(100% - 40px);padding:14px 20px;border-radius:15px;background:#fffef1f2;color:#31573c;box-shadow:0 8px 24px #31593e2e;transform:translateX(-50%);opacity:0;pointer-events:none;transition:opacity .2s;text-align:center}
.landing-toast.show{opacity:1}
@media (min-width:740px) and (orientation:landscape){
 .landing-main{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:40px;padding:22px 0 8px}
 .landing-art{width:100%;max-height:calc(100dvh - 140px)}
 .landing-copy{align-items:flex-start;text-align:left}
 .landing-copy .usage-chips,.landing-links{justify-content:flex-start}
}
@media (orientation:landscape) and (max-height:620px){
 .landing-main{gap:26px;padding:14px 0 4px}
 .landing-title{font-size:44px}.landing-sub{margin-bottom:12px;font-size:17px}
 .landing-copy .usage-chips{margin-bottom:14px}
 .landing-start{min-height:52px;padding:12px 18px;font-size:20px}
 .landing-links{margin-top:10px}
 .landing .credit{margin-bottom:12px}
}

/* 이야기 컷신 */
.cutscene{position:fixed;inset:0;z-index:45;display:flex;flex-direction:column;background:#f5f6eb;transition:background .5s}
.cutscene[hidden]{display:none}
.cutscene[data-scene="ink"]{background:#2b2739}
.cutscene-art{flex:1;min-height:0;display:grid;place-items:center;padding:16px 16px 0;cursor:pointer;container-type:size}
/* 그림 틀은 늘 8:5. 남는 자리 안에서 가장 크게(폭 또는 높이에 맞춤) 그려 잘리지 않게 한다. */
.cutscene-art svg{display:block;width:min(820px,100%);width:min(820px,100cqw,160cqh);height:auto;aspect-ratio:8/5;border-radius:26px;animation:lk-scene-in .5s ease-out}
.cutscene-box{position:relative;width:min(820px,calc(100% - 32px));margin:22px auto 20px;padding:24px 24px 16px;border-radius:22px;background:#fffdf4;box-shadow:0 6px 0 #d6dfc4,0 16px 36px #0000002e}
.cutscene-speaker{position:absolute;top:-16px;left:22px;padding:6px 16px;border-radius:999px;background:#285b43;color:#fffde9;font-size:15px}
.cutscene-text{min-height:3.3em;margin:2px 0 0;font-size:21px;line-height:1.65;color:#24443b;word-break:keep-all}
.cutscene-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.cutscene-steps div{padding:10px 12px;border-radius:12px;background:#eef3e2;font-size:14px;color:#3d5238}
.cutscene-steps b{display:block;font-weight:normal;font-size:16px;color:#285b43}
.cutscene-note{margin:10px 0 0;font-size:12px;color:#56664f}
.cutscene-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.cutscene-dots{display:flex;gap:6px}
.cutscene-dots i{width:9px;height:9px;border-radius:5px;background:#d3dcc2;transition:width .2s}
.cutscene-dots i.on{width:24px;background:#285b43}
.cutscene-next{width:auto;min-width:160px;gap:8px}
.cutscene-skip{position:absolute;top:14px;right:14px;z-index:1;min-height:44px;padding:10px 16px;border-radius:999px;background:#fffdf2e0;color:#2f5140;font-size:15px}
.cutscene[data-scene="ink"] .cutscene-skip{background:#ffffff2e;color:#f6f2ff}
@media (orientation:landscape) and (max-height:620px){
 .cutscene-art{padding-top:10px}
 .cutscene-box{margin:18px auto 10px;padding:18px 20px 10px}
 .cutscene-text{min-height:0;font-size:18px;line-height:1.55}
 .cutscene-steps div{padding:6px 10px;font-size:13px}.cutscene-steps b{font-size:14px}
 .cutscene-note{margin-top:6px}
 .cutscene-foot{margin-top:8px}.cutscene-next{min-height:46px;padding:10px 16px}
}
@media (max-width:520px){
 .cutscene-text{font-size:18px}
 .cutscene-steps{grid-template-columns:1fr;gap:5px}.cutscene-steps div{padding:7px 10px}
 .cutscene-next{min-width:0}
}

/* 그림 움직임: 움직임 줄이기를 켠 기기에서는 모두 끈다 */
@keyframes lk-float{50%{transform:translateY(-9px)}}
@keyframes lk-creep{from{transform:translateX(-110px);opacity:0}to{transform:none;opacity:1}}
@keyframes lk-twinkle{50%{opacity:.25}}
@keyframes lk-bob{50%{transform:translateY(-3px)}}
@keyframes lk-scene-in{from{opacity:0;transform:translateY(8px)}}
.landing-art .float,.cutscene-art .float{animation:lk-float 3.2s ease-in-out infinite}
.cutscene-art .creep{animation:lk-creep 1.6s ease-out both}
.landing-art .twinkle,.cutscene-art .twinkle{animation:lk-twinkle 2.4s ease-in-out infinite}
.landing-art .bob,.cutscene-art .bob{animation:lk-bob 2.6s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){
 .landing-art *,.cutscene-art *,.cutscene-art svg{animation:none!important}
}
