/* 08:00 매니저 · 엑셀 장면 — 맥용 Microsoft Excel(한국어) 창을 줄여 놓은 모습.
   모든 선택자는 .s-excel 아래. 곡선은 KINETICS.md 네 가지(--glide --spring --overshoot --inout)만 쓴다. */
.s-excel {
  --xg: #107c41;                 /* 엑셀 초록(활성 탭·선택 테두리) */
  --xtb: #217346;                /* 제목 줄 */
  --ui: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, sans-serif;
  --cellf: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, sans-serif;
  --chrome: #f3f3f3;
  --gl: #dedede;                 /* 눈금선 */
  --hdbg: #f2f2f2;               /* 행·열 머리 */
  --hdln: #c9c9c9;
  --tblue: #4472c4;              /* 표·차트 기본 파랑 */
  --band: #d9e1f2;
  --k1: #1f6fd8; --k2: #c8382c; --k3: #7b3fb0;
}
.s-excel [hidden] { display: none !important; }

/* ── 1막: 예약 칩 + 맡긴 말 ── */
.s-excel .xl-ask { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.s-excel .xl-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 5px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px rgba(17, 17, 16, .05); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.s-excel .xl-chip-i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(22, 89, 239, .1); }
.s-excel .xl-chip-i svg { width: 15px; height: 15px; fill: none; stroke: var(--cobalt); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-excel .xl-ask .bubble { min-width: 0; }

/* ── 창 ── */
.s-excel .xl-body { position: relative; }
.s-excel .xl-win { position: relative; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .16); font-family: var(--ui); color: #262626; -webkit-user-select: none; user-select: none; line-height: 1.2; }
.s-excel .xl-win svg { flex: none; fill: none; stroke: #3f3f3f; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.s-excel .xl-win p { margin: 0; }

/* 제목 줄 */
.s-excel .xl-tb { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px 0 12px; background: var(--xtb); color: #fff; font-size: 11px; }
.s-excel .xl-lights { flex: none; display: flex; gap: 8px; }
.s-excel .xl-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .22); }
.s-excel .xl-lights i:nth-child(2) { background: #febc2e; }
.s-excel .xl-lights i:nth-child(3) { background: #28c840; }
.s-excel .xl-as { flex: none; display: flex; align-items: center; gap: 6px; margin-left: 6px; white-space: nowrap; }
.s-excel .xl-tg { display: inline-flex; align-items: center; gap: 4px; height: 17px; padding: 0 6px 0 2px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75); font-size: 11px; }
.s-excel .xl-tg i { width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.s-excel .xl-qa { flex: none; display: flex; align-items: center; gap: 2px; }
.s-excel .xl-qa svg, .s-excel .xl-save svg { width: 20px; height: 20px; padding: 2px; stroke: #fff; stroke-width: 1.2; }
.s-excel .xl-qa svg.dots circle { fill: #fff; stroke: none; }
.s-excel .xl-save { display: inline-flex; border-radius: 4px; transition: background .2s; }
.s-excel .xl-save.hit { background: rgba(255, 255, 255, .22); }
.s-excel .xl-ttl { min-width: 0; margin: 0 auto !important; display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; overflow: hidden; }
.s-excel .xl-ttl > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.s-excel .xl-ttl-s { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.s-excel .xl-ttl b { font-weight: 600; }
.s-excel .xl-ttl-s { display: inline-flex; align-items: center; gap: 3px; color: rgba(255, 255, 255, .85); }
.s-excel .xl-ttl-s:not(:empty)::before { content: "—"; margin-right: 3px; }
.s-excel .xl-ttl-s svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 1.6; }
.s-excel .xl-srch { flex: none; display: flex; align-items: center; gap: 5px; width: 130px; height: 20px; padding: 0 8px; border-radius: 5px; background: rgba(255, 255, 255, .17); color: rgba(255, 255, 255, .85); }
.s-excel .xl-srch svg { width: 13px; height: 13px; stroke: rgba(255, 255, 255, .85); }
.s-excel .xl-me { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #f4dcb6; color: #6b4a1a; font-size: 11px; font-weight: 700; }

/* 리본 탭 */
.s-excel .xl-tabs { display: flex; align-items: stretch; height: 28px; padding: 0 8px; background: var(--chrome); font-size: 12px; color: #3a3a3a; }
.s-excel .xl-tab { position: relative; display: flex; align-items: center; padding: 0 9px; white-space: nowrap; transition: color .2s; }
.s-excel .xl-tab::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 2px; height: 2.5px; border-radius: 2px; background: var(--xg); transform: scaleX(0); transition: transform .3s var(--glide); }
.s-excel .xl-tab.on { color: var(--xg); font-weight: 600; }
.s-excel .xl-tab.on::after { transform: none; }
.s-excel .xl-tab.ctx { max-width: 0; padding: 0; overflow: hidden; opacity: 0; color: var(--xg); transition: max-width .35s var(--glide), padding .35s var(--glide), opacity .25s; }
.s-excel .xl-tab.ctx.show { max-width: 96px; padding: 0 9px; opacity: 1; }
.s-excel .xl-tmore { display: none; }
.s-excel .xl-tbtns { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.s-excel .xl-tbtn { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px 0 6px; border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px #cbcbcb; font-size: 11.5px; white-space: nowrap; }
.s-excel .xl-tbtn svg { width: 14px; height: 14px; }
.s-excel .xl-tbtn.sh { background: var(--xg); color: #fff; box-shadow: none; }
.s-excel .xl-tbtn.sh svg { stroke: #fff; }

/* 리본 본문 */
.s-excel .xl-rib { position: relative; height: 64px; background: var(--chrome); border-bottom: 1px solid #d9d9d9; }
.s-excel .xl-rb { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 6px; transition: opacity .2s, visibility .2s; }
.s-excel .xl-rib[data-tab="home"] .xl-rb-ins, .s-excel .xl-rib[data-tab="ins"] .xl-rb-home { opacity: 0; visibility: hidden; }
.s-excel .xl-grp { display: flex; align-items: center; gap: 2px; height: 100%; padding: 0 6px; }
.s-excel .xl-sep { flex: none; width: 1px; height: 46px; background: #d4d4d4; }
.s-excel .xl-vs { flex: none; width: 1px; height: 16px; margin: 0 3px; background: #d4d4d4; }
.s-excel .xl-big { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 56px; padding: 3px 3px 0; border-radius: 5px; font-size: 11px; line-height: 12.5px; text-align: center; color: #333; white-space: nowrap; }
.s-excel .xl-big svg.big { width: 26px; height: 26px; }
.s-excel .xl-rows { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.s-excel .xl-rows.tight { gap: 1px; }
.s-excel .xl-rows.tight .xl-ic { height: 18px; }
.s-excel .xl-row { display: flex; align-items: center; gap: 2px; }
.s-excel .xl-ic { display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 4px; color: #2b2b2b; transition: background .15s, box-shadow .15s; }
.s-excel .xl-ic svg { width: 16px; height: 16px; }
.s-excel .xl-ic svg.cv, .s-excel .xl-cb svg.cv, .s-excel .xl-nb svg.cv { width: 7px; height: 7px; stroke: #555; stroke-width: 1.3; }
.s-excel .xl-ic.on { background: #dcdcdc; }
.s-excel .xl-ic.hit { background: #d6e7dd; box-shadow: inset 0 0 0 1px #9ccbb0; }
.s-excel .xl-ic.tx { justify-content: flex-start; gap: 4px; font-size: 11px; }
.s-excel .xl-ic.gl { font-size: 13px; line-height: 1; font-family: var(--cellf); }
.s-excel .xl-ic.gl sup { display: block; align-self: flex-start; margin: 1px 0 0 0; }
.s-excel .xl-ic.gl sup svg { width: 7px; height: 7px; stroke-width: 1.4; }
.s-excel .xl-ic.b { font-weight: 800; }
.s-excel .xl-ic.it { font-style: italic; }
.s-excel .xl-ic.u { text-decoration: underline; text-underline-offset: 2px; }
.s-excel .xl-ic.fc > span { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.s-excel .xl-ic.fc > span i { width: 13px; height: 3px; background: #e0302a; }
.s-excel .xl-ic.won { font-size: 12.5px; }
.s-excel .xl-ic.cm { font-size: 16px; font-weight: 700; padding-bottom: 5px; }
.s-excel .xl-cb { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; height: 22px; padding: 0 5px 0 7px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px #c9c9c9; font-size: 11.5px; color: #222; white-space: nowrap; }
.s-excel .xl-cb.font { width: 82px; }
.s-excel .xl-cb.size { width: 36px; }
.s-excel .xl-cb.fmt { width: 112px; }

/* 수식 줄 */
.s-excel .xl-fx { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; background: var(--chrome); border-bottom: 1px solid #d0d0d0; }
.s-excel .xl-nb { flex: none; display: flex; align-items: center; justify-content: space-between; width: 74px; height: 20px; padding: 0 6px 0 7px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px #cdcdcd; font-size: 11.5px; white-space: nowrap; }
.s-excel .xl-nb b { font-weight: 400; font-variant-numeric: tabular-nums; }
.s-excel .xl-fxi { flex: none; display: flex; align-items: center; gap: 7px; padding: 0 3px; }
.s-excel .xl-fxi svg { width: 13px; height: 13px; stroke: #b5b5b5; stroke-width: 1.4; transition: stroke .15s; }
.s-excel .xl-fx.ed .xl-fxi svg { stroke: #3f3f3f; }
.s-excel .xl-fxi i { font: italic 13px/1 "Times New Roman", Georgia, serif; color: #444; padding: 0 2px; }
.s-excel .xl-fx-t { flex: 1; min-width: 0; height: 20px; padding: 0 8px !important; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px #cdcdcd; font: 12px/20px var(--cellf); color: #111; white-space: nowrap; overflow: hidden; }

/* ── 시트 ── */
.s-excel .xl-sheet {
  --rh: 30px; --hh: 20px; --r1: 24px; --rr: 19px; --fs: 11.5px;
  --cA: 50px; --cB: 40px; --cC: 64px; --cD: 40px; --cE: 78px; --cF: 14px; --cG: 46px; --cH: 82px; --cI: 64px; --cJ: 64px; --cK: 64px; --cL: 64px;
  --sx: 0px;
  position: relative; height: 281px; overflow: hidden; background: #fff; font-family: var(--cellf);
}
.s-excel .xl-rhs, .s-excel .xl-cells, .s-excel .xl-ov { display: grid; grid-template-rows: var(--hh) var(--r1) repeat(15, var(--rr)); }
.s-excel .xl-cells, .s-excel .xl-ov { grid-template-columns: var(--cA) var(--cB) var(--cC) var(--cD) var(--cE) var(--cF) var(--cG) var(--cH) var(--cI) var(--cJ) var(--cK) var(--cL); }
.s-excel .xl-rhs { position: absolute; z-index: 3; left: 0; top: 0; width: var(--rh); background: var(--hdbg); }
.s-excel .xl-rhs b, .s-excel .xl-corner { display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--hdln); border-bottom: 1px solid #dadada; font: 400 11px/1 var(--ui); color: #555; }
.s-excel .xl-corner { position: relative; border-bottom-color: var(--hdln); }
.s-excel .xl-corner::after { content: ""; position: absolute; right: 2px; bottom: 2px; border: 4px solid transparent; border-right-color: #b3b3b3; border-bottom-color: #b3b3b3; }
.s-excel .xl-rhs b.on { background: #e1e1e1; color: var(--xg); font-weight: 600; box-shadow: inset -2px 0 0 var(--xg); }
.s-excel .xl-pane { position: absolute; left: var(--rh); top: 0; right: 0; bottom: 0; overflow: hidden; }
.s-excel .xl-g { position: relative; width: max-content; transition: transform .55s var(--glide); }
.s-excel .xl-sheet.scr .xl-g { transform: translateX(calc(var(--sx) * -1)); }
.s-excel .xl-ov { position: absolute; inset: 0; pointer-events: none; }

.s-excel .ch { display: flex; align-items: center; justify-content: center; background: var(--hdbg); border-right: 1px solid #dadada; border-bottom: 1px solid var(--hdln); font: 400 11px/1 var(--ui); color: #555; }
.s-excel .ch.on { background: #e1e1e1; color: var(--xg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--xg); }
.s-excel .c { position: relative; display: flex; align-items: center; min-width: 0; padding: 0 4px; border-right: 1px solid var(--gl); border-bottom: 1px solid var(--gl); font-size: var(--fs); line-height: 1; color: #111; white-space: nowrap; overflow: hidden; transition: background-color .3s, border-color .3s; }
.s-excel .c em { font-style: normal; }
.s-excel .c.n { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.s-excel .c.ttl { overflow: visible; padding-top: 2px; border-bottom: 2px solid var(--tblue); font-size: 14px; font-weight: 700; color: #1f3864; letter-spacing: -.01em; }
.s-excel .c.sub { color: #595959; font-size: 11px; }
.s-excel .c.blk { font-weight: 700; color: #1f3864; }
.s-excel .c.th { justify-content: space-between; gap: 2px; padding-right: 2px; background: var(--tblue); border-color: var(--tblue); color: #fff; font-weight: 700; }
.s-excel .c.th .fb { flex: none; display: grid; place-items: center; width: 13px; height: 13px; border-radius: 2px; background: #fff; box-shadow: inset 0 0 0 1px #a8a8a8; }
.s-excel .c.th .fb svg { width: 8px; height: 8px; stroke: #444; stroke-width: 1.4; }
.s-excel .c.sh { background: var(--band); border-right-color: var(--band); border-bottom-color: #8ea9db; font-weight: 700; color: #1f3864; }
.s-excel .c.ub { border-bottom-color: var(--tblue); }
.s-excel .c.tot { font-weight: 700; border-bottom: 3px double var(--tblue); }
.s-excel .c.v em { display: inline-block; }

/* 주문 줄이 차례로 들어옴 */
.s-excel .c[data-land] em { opacity: 0; transform: translateY(-5px); transition: opacity .25s, transform .35s var(--glide); }
.s-excel .c[data-land].in em { opacity: 1; transform: none; }
.s-excel .c.bd.in { background: var(--band); border-color: var(--band); }

/* 선택·참조 표시 */
.s-excel .xl-tint { position: relative; z-index: 1; background: rgba(0, 0, 0, .09); }
.s-excel .xl-ref { position: relative; z-index: 2; margin: -1px 0 0 -1px; border: 1.5px solid var(--k1); background: rgba(31, 111, 216, .07); }
.s-excel .xl-ref.k2 { border-color: var(--k2); background: rgba(200, 56, 44, .06); }
.s-excel .xl-ref.k3 { border-color: var(--k3); background: rgba(123, 63, 176, .06); }
.s-excel .xl-selb { position: relative; z-index: 3; }
.s-excel .xl-selb::before { content: ""; position: absolute; inset: -1px; border: 2px solid var(--xg); }
.s-excel .xl-selb::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 6px; height: 6px; background: var(--xg); box-shadow: 0 0 0 1px #fff; }
.s-excel .xl-ov.chartsel .xl-selb, .s-excel .xl-ov.chartsel .xl-tint { display: none; }
.s-excel .xl-edit { position: relative; z-index: 4; display: flex; align-items: center; justify-self: start; min-width: calc(100% - 1px); margin: 1px 0 1px 1px; padding: 0 3px; background: #fff; font-size: var(--fs); line-height: 1; color: #111; white-space: nowrap; }
.s-excel .xl-edit .k1, .s-excel .xl-fx-t .k1 { color: var(--k1); }
.s-excel .xl-edit .k2, .s-excel .xl-fx-t .k2 { color: var(--k2); }
.s-excel .xl-caret { display: inline-block; width: 1px; height: 13px; margin-left: 1px; background: #111; animation: xl-blink 1s steps(1) infinite; }
@keyframes xl-blink { 50% { opacity: 0; } }

/* ── 차트(묶은 세로 막대형) ── */
.s-excel .xl-chart { position: relative; z-index: 5; grid-column: 9 / 13; grid-row: 3 / 15; margin: 6px 10px 6px 8px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 9px 12px 6px 6px; background: #fff; box-shadow: 0 0 0 1px #d6d6d6; font-family: var(--cellf); color: #595959; opacity: 0; transform: scale(.96); transform-origin: 30% 20%; transition: opacity .25s, transform .45s var(--glide), box-shadow .2s; }
.s-excel .xl-chart.show { opacity: 1; transform: none; }
.s-excel .xl-chart.sel { box-shadow: 0 0 0 1px #8c8c8c; }
.s-excel .xl-chart p { text-align: center; }
.s-excel .xl-ch-t { font-size: 13px; color: #404040; }
.s-excel .xl-ch-u { margin: 2px 0 6px !important; font-size: 11px; color: #7f7f7f; }
.s-excel .xl-ch-p { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 18px; min-height: 0; }
.s-excel .xl-ch-y { position: relative; font-size: 11px; font-variant-numeric: tabular-nums; }
.s-excel .xl-ch-y span { position: absolute; right: 6px; bottom: calc(var(--p) * 100%); transform: translateY(50%); line-height: 1; }
.s-excel .xl-ch-plot { position: relative; display: flex; justify-content: space-around; align-items: flex-end; border-bottom: 1px solid #bfbfbf; }
.s-excel .xl-ch-plot > i { position: absolute; left: 0; right: 0; bottom: calc(var(--p) * 100%); height: 1px; background: #e3e3e3; }
.s-excel .xl-col { position: relative; width: 26%; height: calc(var(--v) * 100%); }
.s-excel .xl-col i { position: absolute; inset: 0; background: var(--tblue); transform-origin: 50% 100%; transform: scaleY(0); transition: transform .75s var(--glide); }
.s-excel .xl-col:nth-of-type(2) i { transition-delay: .08s; }
.s-excel .xl-col:nth-of-type(3) i { transition-delay: .16s; }
.s-excel .xl-col em { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -3px); font-size: 11px; font-style: normal; color: #404040; line-height: 1; opacity: 0; transition: opacity .3s .55s; font-variant-numeric: tabular-nums; }
.s-excel .xl-chart.go .xl-col i { transform: none; }
.s-excel .xl-chart.go .xl-col em { opacity: 1; }
.s-excel .xl-ch-x { grid-column: 2; display: flex; justify-content: space-around; padding-top: 4px; font-size: 11px; line-height: 1; }
.s-excel .xl-ch-x span { width: 26%; text-align: center; }
.s-excel .xl-chart .hd { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #6f6f6f; opacity: 0; transition: opacity .15s; }
.s-excel .xl-chart.sel .hd { opacity: 1; }
.s-excel .hd.tl, .s-excel .hd.ml, .s-excel .hd.bl { left: 0; }
.s-excel .hd.tc, .s-excel .hd.bc { left: 50%; }
.s-excel .hd.tr, .s-excel .hd.mr, .s-excel .hd.br { left: 100%; }
.s-excel .hd.tl, .s-excel .hd.tc, .s-excel .hd.tr { top: 0; }
.s-excel .hd.ml, .s-excel .hd.mr { top: 50%; }
.s-excel .hd.bl, .s-excel .hd.bc, .s-excel .hd.br { top: 100%; }

/* 시트 탭 */
.s-excel .xl-st { display: flex; align-items: stretch; height: 26px; background: var(--chrome); border-top: 1px solid #cfcfcf; font-size: 12px; color: #444; }
.s-excel .xl-st-nav { display: flex; align-items: center; gap: 2px; padding: 0 8px; }
.s-excel .xl-st-nav svg { width: 14px; height: 14px; stroke: #9a9a9a; stroke-width: 1.4; }
.s-excel .xl-sh { display: flex; align-items: center; padding: 0 14px; border-right: 1px solid #d6d6d6; white-space: nowrap; }
.s-excel .xl-sh:first-of-type { border-left: 1px solid #d6d6d6; }
.s-excel .xl-sh.on { background: #fff; color: var(--xg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--xg); }
.s-excel .xl-sh-add { display: grid; place-items: center; width: 26px; }
.s-excel .xl-sh-add svg { width: 14px; height: 14px; stroke: #666; }
.s-excel .xl-hs { flex: 1; display: flex; align-items: center; padding: 0 12px 0 18px; }
.s-excel .xl-hs i { width: 42%; height: 7px; border-radius: 4px; background: #c4c4c4; }

/* 상태 줄 */
.s-excel .xl-sb { display: flex; align-items: center; gap: 14px; height: 23px; padding: 0 10px; background: var(--chrome); border-top: 1px solid #dadada; font-size: 11px; color: #444; white-space: nowrap; }
.s-excel .xl-acc { display: inline-flex; align-items: center; gap: 4px; color: #555; }
.s-excel .xl-acc svg { width: 12px; height: 12px; stroke: #555; }
.s-excel .xl-stats { margin-left: auto; display: flex; gap: 14px; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .2s; }
.s-excel .xl-stats.on { opacity: 1; }
.s-excel .xl-views { display: flex; gap: 6px; }
.s-excel .xl-views svg { width: 14px; height: 14px; stroke: #777; }
.s-excel .xl-views svg:first-child { stroke: var(--xg); }
.s-excel .xl-zoom { display: flex; align-items: center; gap: 5px; }
.s-excel .xl-zoom svg { width: 12px; height: 12px; stroke: #666; }
.s-excel .xl-zoom .rail { position: relative; width: 70px; height: 2px; background: #b5b5b5; }
.s-excel .xl-zoom .rail i { position: absolute; left: 50%; top: 50%; width: 3px; height: 10px; margin: -5px 0 0 -1.5px; border-radius: 1px; background: #555; }

/* ── 3막: 휴대폰 알림 ── */
.s-excel .xl-ban { position: absolute; z-index: 25; top: 42px; right: 14px; width: 338px; display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px 12px 10px; border-radius: 22px; background: rgba(246, 246, 246, .86); -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .34), 0 0 0 .5px rgba(0, 0, 0, .1); font-family: var(--ui); color: #111; opacity: 0; transform: translateY(-22px) scale(.97); transition: transform .55s var(--overshoot), opacity .3s; pointer-events: none; }
.s-excel .xl-ban.show { opacity: 1; transform: none; }
.s-excel .xl-ban img { flex: none; width: 42px; height: 42px; margin: -1px -2px 0 -2px; }
.s-excel .xl-ban-b { flex: 1; min-width: 0; }
.s-excel .xl-ban p { margin: 0; }
.s-excel .xl-ban-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.35; }
.s-excel .xl-ban-h b { font-weight: 600; }
.s-excel .xl-ban-h time { font-size: 12px; color: #6e6e73; }
.s-excel .xl-ban-t { font-size: 14px; line-height: 1.4; font-weight: 500; letter-spacing: -.01em; }
.s-excel .xl-ban-f { display: flex; align-items: center; gap: 7px; margin-top: 7px !important; padding: 6px 9px 6px 7px; border-radius: 10px; background: rgba(0, 0, 0, .05); font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.s-excel .xl-ban-f span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-excel .xl-ban-f em { margin-left: auto; font-style: normal; font-weight: 400; font-size: 12px; color: #6e6e73; }
.s-excel .xl-doc { flex: none; position: relative; width: 20px; height: 24px; border-radius: 3px; background: #1d7044; }
.s-excel .xl-doc::before { content: ""; position: absolute; right: 0; top: 0; border: 4px solid transparent; border-right-color: #fff; border-top-color: #fff; opacity: .9; }
.s-excel .xl-doc i { position: absolute; left: 4px; right: 4px; top: 9px; height: 10px; background: linear-gradient(#fff, #fff) 0 0 / 100% 1px no-repeat, linear-gradient(#fff, #fff) 0 4.5px / 100% 1px no-repeat, linear-gradient(#fff, #fff) 0 9px / 100% 1px no-repeat, linear-gradient(#fff, #fff) 5.5px 0 / 1px 100% no-repeat; opacity: .92; }

/* 티파이브 커서 */
.s-excel .xl-cur { position: absolute; z-index: 30; left: 0; top: 0; pointer-events: none; opacity: 0; transition: transform .5s var(--glide), opacity .25s; will-change: transform; }
.s-excel .xl-cur.on { opacity: 1; }
.s-excel .xl-cur svg { display: block; width: 19px; height: 23px; margin: -2px 0 0 -2px; fill: var(--cobalt); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3)); transform-origin: 3px 3px; transition: transform .12s var(--glide); }
.s-excel .xl-cur.tap svg { transform: scale(.82); }
.s-excel .xl-cur b { position: absolute; left: 13px; top: 19px; padding: 2px 7px 3px; border-radius: 999px; background: var(--cobalt); color: #fff; font: 600 11px/1.3 var(--font); white-space: nowrap; box-shadow: 0 2px 6px -1px rgba(0, 0, 0, .25); }

/* ───────── 휴대폰(따로 짠다) ───────── */
@media (max-width: 860px) {
  .stage.s-excel { padding-top: 0; }
  .s-excel .xl-ask { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 86px; padding-right: 92px; margin-bottom: 12px; }
  .s-excel .xl-chip { height: 30px; font-size: 12.5px; padding-right: 11px; }
  .s-excel .xl-chip-i { width: 22px; height: 22px; }

  .s-excel .xl-win { border-radius: 12px; }
  .s-excel .xl-tb { height: 30px; gap: 8px; padding: 0 10px; }
  .s-excel .xl-lights { gap: 6px; }
  .s-excel .xl-lights i { width: 10px; height: 10px; }
  .s-excel .xl-as, .s-excel .xl-srch, .s-excel .xl-me, .s-excel .xl-qa > svg { display: none; }

  .s-excel .xl-tabs { height: 30px; padding: 0 4px; font-size: 12.5px; }
  .s-excel .xl-tab { padding: 0 8px; }
  .s-excel .xl-tab::after { left: 8px; right: 8px; }
  .s-excel .xl-tab.m-x, .s-excel .xl-tab.ctx, .s-excel .xl-tbtns { display: none; }
  .s-excel .xl-tmore { display: flex; margin-left: auto; color: #777; }

  /* 리본은 접어 두고, 탭을 누르면 잠깐 펼친다 */
  .s-excel .xl-rib { display: none; position: absolute; z-index: 12; left: 0; right: 0; top: 60px; box-shadow: 0 12px 22px -10px rgba(0, 0, 0, .3); }
  .s-excel .xl-rib.pop { display: block; }
  .s-excel .xl-rb .m-x { display: none; }
  .s-excel .xl-rb { padding: 0 4px; }

  .s-excel .xl-fx { height: 30px; gap: 5px; padding: 0 6px; }
  .s-excel .xl-nb { width: 52px; height: 22px; font-size: 12px; }
  .s-excel .xl-fxi svg { display: none; }
  .s-excel .xl-fx-t { height: 22px; font-size: 12px; line-height: 22px; padding: 0 6px !important; }

  .s-excel .xl-sheet {
    --rh: 26px; --hh: 20px; --r1: 26px; --rr: 21px; --fs: 12px;
    --cA: 46px; --cB: 38px; --cC: 60px; --cD: 36px; --cE: 74px; --cF: 12px; --cG: 40px; --cH: 78px; --cI: 66px; --cJ: 66px; --cK: 66px; --cL: 66px;
    --sx: 180px;
    height: 351px;
  }
  .s-excel .ch, .s-excel .xl-rhs b { font-size: 12px; }
  .s-excel .xl-cur b { font-size: 12px; }
  .s-excel .c.sub { font-size: 12px; }
  .s-excel .c.ttl { font-size: 14px; }
  .s-excel .xl-chart { grid-column: 7 / 11; grid-row: 9 / 17; margin: 8px 18px 6px 4px; padding: 8px 10px 6px 4px; }
  .s-excel .xl-ch-t { font-size: 12.5px; }
  .s-excel .xl-ch-u { display: none; }
  .s-excel .xl-chart { grid-template-rows: auto minmax(0, 1fr); }
  .s-excel .xl-ch-t { margin-bottom: 6px !important; }
  .s-excel .xl-ch-t::after { content: " (만 원)"; font-size: 12px; color: #7f7f7f; }
  .s-excel .xl-ch-y, .s-excel .xl-ch-x, .s-excel .xl-col em { font-size: 12px; }
  .s-excel .xl-ch-p { grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 19px; }

  .s-excel .xl-st { height: 30px; font-size: 12.5px; }
  .s-excel .xl-st-nav { padding: 0 4px 0 6px; }
  .s-excel .xl-sh { padding: 0 12px; }
  .s-excel .xl-hs { display: none; }
  .s-excel .xl-sb { height: 26px; font-size: 12px; gap: 10px; }
  .s-excel .xl-acc, .s-excel .xl-views, .s-excel .xl-zoom svg, .s-excel .xl-zoom .rail { display: none; }
  .s-excel .xl-stats { gap: 10px; }
  .s-excel .xl-stats span:not(:last-child) { display: none; }

  .s-excel .xl-ban { top: 34px; left: 8px; right: 8px; width: auto; padding: 10px 12px 11px 9px; border-radius: 20px; }
  .s-excel .xl-ban img { width: 38px; height: 38px; }
  .s-excel .xl-ban-t { font-size: 13.5px; }
  .s-excel .xl-ban-f { font-size: 12px; }
}

/* 동작 줄이기: 마지막 화면 그대로 */

/* 중간 너비(861~1180px): 왼쪽 칸이 좁아져 열 너비·글자를 줄여 차트까지 창 안에 들어오게 */
@media (min-width: 861px) and (max-width: 1280px) {
  /* 좁은 창의 실제 엑셀처럼 뒷순위 탭을 접어 문맥 탭(차트 디자인·서식)이 메모·공유와 겹치지 않게 */
  .s-excel .xl-tab.m-x { display: none; }
  .s-excel .xl-sheet { --fs: 10.5px; --rr: 18px; --r1: 22px; --cA: 38px; --cB: 32px; --cC: 50px; --cD: 32px; --cE: 62px; --cF: 10px; --cG: 36px; --cH: 66px; --cI: 46px; --cJ: 46px; --cK: 46px; --cL: 46px; height: 266px; }
  .s-excel .xl-chart { margin: 5px 6px 5px 5px; padding: 7px 8px 5px 4px; }
  .s-excel .xl-big { font-size: 10.5px; line-height: 11.5px; }
  .s-excel .xl-srch { width: 96px; }
}

/* 더 좁은 중간 너비: 검색칸을 접어 파일 이름이 보이게 */
@media (min-width: 861px) and (max-width: 1060px) {
  .s-excel .xl-srch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .s-excel .xl-cur { display: none; }
  .s-excel .xl-caret { animation: none; }
}

/* 수식을 치는 동안 비켜 간 커서의 이름표가 가장 좁은 화면 밖으로 나가지 않게 */
@media (max-width: 345px) {
  .s-excel .xl-cur b { display: none; }
  /* 차트 오른쪽 막대가 창 밖으로 나가지 않게 한 칸 줄인다 */
  .s-excel .xl-chart { grid-column: 7 / 10; }
}

/* 중간 너비에서 홈 리본 오른쪽 끝 글자가 창에서 뚝 끊기지 않게 흐리게 사라진다 */
@media (min-width: 861px) and (max-width: 1200px) {
  .s-excel .xl-rb-home { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
}
