/* 엑셀 스킨: body.excel 일 때만 적용. 게임 기능은 그대로, 겉모습만 스프레드시트처럼. */
.xl-top, .xl-rows, .xl-bottom { display: none; }

body.excel {
  --bg: #fff; --bg2: #fff; --panel: #fff; --ink: #222; --dim: #666;
  --yellow: #217346; --pink: #c00000; --orange: #c55a11; --green: #217346; --red: #c00000; --cyan: #1f6fb5;
  --font: Calibri, "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  --xl-top: 150px; --xl-left: 40px; --xl-bottom: 48px;
  background-color: #fff;
  background-image:
    linear-gradient(to right, #d9d9d9 1px, transparent 1px),
    linear-gradient(to bottom, #d9d9d9 1px, transparent 1px);
  background-size: 64px 20px;
  background-position: var(--xl-left) var(--xl-top);
  background-attachment: fixed;
  font-size: 14px; image-rendering: auto;
}
body.excel::after { display: none; }

/* --- 장식 틀 --- */
body.excel .xl-top, body.excel .xl-rows, body.excel .xl-bottom { display: block; position: fixed; z-index: 40; font-family: var(--font); font-size: 12px; color: #222; user-select: none; pointer-events: none; }
body.excel .xl-top { top: 0; left: 0; right: 0; height: var(--xl-top); background: #f3f3f3; border-bottom: 1px solid #bbb; overflow: hidden; }
.xl-title { height: 26px; background: #217346; color: #fff; text-align: center; line-height: 26px; }
.xl-tabs { height: 24px; display: flex; gap: 2px; padding: 0 8px 0 var(--xl-left); background: #f3f3f3; }
.xl-tabs span { padding: 0 12px; line-height: 24px; white-space: nowrap; }
.xl-tabs .on { background: #fff; color: #217346; border: 1px solid #ccc; border-bottom: 0; font-weight: 700; }
.xl-ribbon { height: 56px; display: flex; background: #fff; border-top: 1px solid #ccc; border-bottom: 1px solid #ddd; overflow: hidden; }
.xl-group { flex: 0 0 auto; width: 132px; border-right: 1px solid #e1e1e1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 6px 0 2px; color: #666; font-size: 11px; }
.xl-icons { display: flex; gap: 6px; }
.xl-icons i { width: 22px; height: 20px; background: #d6e4dc; border: 1px solid #b7cfc2; display: block; }
.xl-formula { height: 24px; display: flex; align-items: center; gap: 8px; padding: 0 8px; background: #fff; border-bottom: 1px solid #ccc; }
.xl-name { width: 70px; border: 1px solid #bbb; padding: 0 8px; line-height: 18px; }
.xl-fx { color: #777; font-style: italic; }
.xl-expr { flex: 1; line-height: 18px; }
.xl-cols { height: 20px; display: flex; background: #e6e6e6; border-bottom: 1px solid #bbb; overflow: hidden; }
.xl-cols b { flex: 0 0 64px; text-align: center; font-weight: 400; line-height: 19px; border-right: 1px solid #c8c8c8; }
.xl-cols .xl-corner { flex-basis: var(--xl-left); }
body.excel .xl-rows { top: var(--xl-top); left: 0; bottom: var(--xl-bottom); width: var(--xl-left); background: #e6e6e6; border-right: 1px solid #bbb; overflow: hidden; }
.xl-rows b { display: block; height: 20px; text-align: center; font-weight: 400; line-height: 19px; border-bottom: 1px solid #c8c8c8; }
body.excel .xl-bottom { left: 0; right: 0; bottom: 0; height: var(--xl-bottom); background: #f3f3f3; border-top: 1px solid #bbb; }
.xl-sheets { height: 26px; display: flex; gap: 2px; padding-left: var(--xl-left); }
.xl-sheets span { padding: 0 16px; line-height: 25px; border: 1px solid #ccc; border-top: 0; background: #e6e6e6; }
.xl-sheets .on { background: #fff; color: #217346; font-weight: 700; border-bottom: 2px solid #217346; }
.xl-status { height: 22px; display: flex; justify-content: space-between; padding: 0 12px 0 var(--xl-left); line-height: 22px; background: #217346; color: #fff; }

/* --- 상단 버튼은 제목줄 위로 --- */
body.excel .topbar { top: 0; height: 26px; padding: 0 8px; z-index: 60; justify-content: flex-end; gap: 8px; align-items: center; }
body.excel .topbar .btn { background: transparent; border: 0; color: #fff; font-size: 12px; font-weight: 400; padding: 2px 10px; box-shadow: none; }
body.excel .topbar .btn:hover { background: rgba(255,255,255,.2); }
body.excel #btn-home { margin-right: auto; font-size: 0; }
body.excel #btn-home::after { content: '파일'; font-size: 12px; }
body.excel #app { padding: calc(var(--xl-top) + 8px) 16px calc(var(--xl-bottom) + 8px) calc(var(--xl-left) + 12px); }
body.excel .play { min-height: calc(100vh - var(--xl-top) - var(--xl-bottom) - 24px); }

/* --- 게임 요소를 셀/표 느낌으로 --- */
body.excel .btn, body.excel .mode-btn, body.excel .tab { background: #f3f3f3; color: #222; border: 1px solid #adadad; box-shadow: none; border-radius: 2px; font-weight: 400; }
body.excel .btn:hover:not(:disabled), body.excel .mode-btn:hover, body.excel .tab:hover { background: #e1ecf7; }
body.excel .btn-big { background: #217346; color: #fff; border-color: #1a5c38; font-size: 16px; padding: 8px 24px; }
body.excel .btn-big:hover:not(:disabled) { background: #1a5c38; }
body.excel .btn-ghost { background: transparent; border-color: transparent; }
body.excel .mode-btn { font-size: 14px; padding: 6px 18px; min-width: 0; }
body.excel .mode-btn.on, body.excel .tab.on { background: #217346; color: #fff; border-color: #1a5c38; font-weight: 700; }
body.excel .mode-btn.rank-btn { border-color: #adadad; }
body.excel .panel, body.excel .modal-box, body.excel .mini-rank, body.excel .hud > div, body.excel .rank-row, body.excel .battle-result, body.excel .players li {
  background: #fff; border: 1px solid #bfbfbf; box-shadow: none; border-radius: 0; color: #222;
}
body.excel .hud > div { padding: 4px 16px; }
body.excel .hud span { font-size: 11px; }
body.excel .hud b { font-size: 22px; color: #217346; }
body.excel .hud .mult { color: #c55a11; }
body.excel .gauge { height: 34px; background: #fff; border: 1px solid #8c8c8c; box-shadow: none; }
body.excel .gauge-pct { font-size: 16px; color: #222; text-shadow: none; }
body.excel .stage-name { font-size: 14px; border-width: 1px; }
body.excel .stage-text { font-size: 15px; }
body.excel .hint { font-size: 18px; color: #217346; animation: none; }
body.excel .word-target { font-size: clamp(32px, 6vw, 64px); text-shadow: none; }
body.excel .word-target .ch { color: #222; }
body.excel .word-target .ch.ok { color: #217346; }
body.excel .word-input, body.excel .nick-input { background: #fff; color: #222; border: 2px solid #217346; border-radius: 0; font-size: 22px; }
body.excel .word-input:focus, body.excel .nick-input:focus { border-color: #1f6fb5; }
body.excel .mini-rank li.me, body.excel .rank-row.me { background: #fff2cc; color: #222; border-color: #bf9000; }
body.excel .season-banner { background: #fff2cc; color: #222; border: 1px solid #bf9000; font-size: 15px; }
body.excel .my-bar { background: #217346; color: #fff; border-top: 0; bottom: var(--xl-bottom); font-size: 15px; padding: 6px 16px; }
body.excel .my-bar em { color: #fff; }
body.excel .rank-row .rp, body.excel .big-rp strong, body.excel .rank-line { color: #217346; }
body.excel .big-rp strong { font-size: 48px; }
body.excel .title-chip { background: #fff2cc; color: #222; border: 1px solid #bf9000; }
body.excel .modal { background: rgba(0,0,0,.25); }
body.excel .toast { background: #fff; color: #222; border: 1px solid #8c8c8c; box-shadow: 2px 2px 4px rgba(0,0,0,.25); font-weight: 400; }
body.excel #toasts { top: 32px; }
body.excel .badge-pop { background: #fff; color: #222; border: 1px solid #8c8c8c; box-shadow: 2px 2px 6px rgba(0,0,0,.3); }
body.excel .banner { background: #fff; color: #217346; border: 2px solid #217346; box-shadow: none; font-size: 32px; }
body.excel .big-overlay { color: #217346; text-shadow: none; font-size: 120px; }
body.excel .combo-text { text-shadow: none; font-size: 40px; }
body.excel .word-pop { color: #217346; text-shadow: none; }
body.excel .score-pop { color: #217346; text-shadow: none; }
body.excel .card-canvas { border: 1px solid #8c8c8c; box-shadow: none; }
body.excel .logo { color: #217346; text-shadow: none; }

@media (max-width: 900px) {
  body.excel { --xl-top: 96px; --xl-left: 28px; }
  body.excel .xl-ribbon { display: none; }
  body.excel #app { padding: calc(var(--xl-top) + 6px) 8px calc(var(--xl-bottom) + 8px) calc(var(--xl-left) + 6px); }
  body.excel .topbar { padding: 0 4px; }
}

body.excel .gauge-pct { font-size: 15px; }
body.excel .gauge-val { font-size: 12px; text-shadow: none; color: #222; }
body.excel .mode-note { color: #c55a11; font-size: 14px; }
body.excel .word-guide { background: #fdecea; border-width: 2px; }

/* 엑셀 스킨에서는 사이트 nav·footer를 숨긴다 */
body.excel > header, body.excel > footer, body.excel > .hamburger-btn, body.excel > .mobile-nav-overlay, body.excel > .mobile-nav-panel { display: none !important; }
body.excel .topbar { position: fixed; } /* 제목줄 안에 붙어 있어야 하므로 엑셀 스킨에서는 고정 */
