/* 공학용 계산기 — 공통 모양. 색·글꼴·모서리는 :root 토큰에만. */
/* 디자인: 시안 D '스튜디오' (따뜻한 미색 바탕 + 주황 포인트, 밝은 몸체·어두운 화면·기능 키 계산기). 2026-10-06 5차(사용자가 D 고름) */
:root {
  --bg: #f7f4ee; --card: #fffdf8; --ink: #1f1d1a; --ink-2: #3a3732; --muted: #6a655c; --line: #e8e2d6; --line-2: #d9d2c4;
  --main: #1f1d1a; --main-ink: #fffdf8; --main-soft: #f0ebe1; --link: #b84300;
  --accent: #f25c05; --accent-ink: #ffffff;
  --hero: #f1ece2; --hero-ink: #1f1d1a; --hero-2: #57524a;
  --body: #e4ded2; --body-2: #fffdf8; --body-ink: #2b2925;
  --screen: #2b2a27; --screen-ink: #f6f1e4; --screen-line: #4a4741; --screen-muted: #b3ac9e;
  --key: #f2f4f7; --key-ink: #101214; --key-shadow: #b9b1a2;
  --fkey: #34322e; --fkey-ink: #f6f1e4; --fkey-shadow: #151412;
  --nkey: #fbf9f4; --nkey-ink: #1f1d1a;
  --opkey: #cbc4b6; --opkey-ink: #1f1d1a;
  --eqkey: #f25c05; --eqkey-ink: #ffffff; --eqkey-shadow: #a63c00;
  --ackey: #d9452b; --ackey-ink: #ffffff; --ackey-shadow: #8f2a18;
  --shift: #e8a317; --cursor: #f6f1e4;
  --err: #c2321f; --err-bg: #fff0ec;
  --radius: 18px; --kr: 10px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --math: "STIX Two Text", "Cambria Math", Cambria, "Times New Roman", "Noto Serif KR", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131210; --card: #1c1b18; --ink: #f2ede2; --ink-2: #d4cec2; --muted: #a29c90; --line: #2b2925; --line-2: #3a3833;
    --main: #f2ede2; --main-ink: #131210; --main-soft: #2b2925; --link: #ff8a3d;
    --accent: #ff7a2e; --accent-ink: #131210;
    --hero: #1b1a17; --hero-ink: #f2ede2; --hero-2: #b8b1a4;
    --body: #2b2925; --body-2: #1c1b18;
    --screen: #0f0e0d; --screen-ink: #f6f1e4; --screen-line: #34322e; --screen-muted: #9a9385;
    --fkey: #1c1b19; --nkey: #46433d; --opkey: #5a564f; --key-shadow: #0f0e0d;
    --cursor: #ff7a2e;
    --err: #ff8a73; --err-bg: #3a1d17;
    color-scheme: dark;
    --body-ink: #f2ede2;
    --fkey-ink: #f2ede2;
    --fkey-shadow: #000;
    --nkey-ink: #f6f1e4;
    --opkey-ink: #f6f1e4;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
.nw { white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font); letter-spacing: -0.005em;
  word-break: keep-all; overflow-wrap: anywhere;
}
main { width: 100%; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--main); outline-offset: 2px; }
select, input, button, textarea { font: inherit; color: inherit; }
a, button, input, select, label, summary { touch-action: manipulation; }
h1, h2, h3 { text-wrap: balance; }

/* ------------------------------------------------ 언어 안내 띠 */
.langbar { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 7px 16px; background: var(--ink); color: var(--bg); font-size: 14px; }
.langbar a { font-weight: 700; }
.langbar button { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer; }

/* ------------------------------------------------ 머리 */
.top-band { background: var(--hero); color: var(--hero-ink); }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 12px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.top-nav { display: flex; gap: 4px 14px; margin-left: auto; font-size: 15px; font-weight: 600; }
.top-nav a { text-decoration: none; padding: 4px 2px; opacity: .92; }
.top-nav a:hover { text-decoration: underline; }
.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1.5px solid currentColor; font-size: 13px; font-weight: 800; text-decoration: none; }

/* ------------------------------------------------ 첫 화면 */
.hero { background: var(--hero); color: var(--hero-ink); padding-bottom: 28px; }
.after-hero { padding-top: 20px; }
.hero h1 { margin: 4px 0 4px; font-size: clamp(26px, 6.4vw, 46px); line-height: 1.16; letter-spacing: -0.035em; font-weight: 850; }
.hero .lede { margin: 0; color: var(--hero-2); font-size: clamp(14.5px, 3.6vw, 18px); line-height: 1.55; max-width: 34em; }
.hero .lede b { color: var(--hero-ink); }
.modes { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.modes a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 700;
  text-decoration: none; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: var(--hero-ink); white-space: nowrap; }
.modes a:hover { background: rgba(255, 255, 255, .24); }
.modes a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.modes { position: relative; }
.modes small { display: none; }

/* 배치 (2026-10-06 4차, 시안 B '세로 기기 + 옆 메뉴'): 왼쪽 제목·모드 메뉴(설명 포함), 가운데 계산기, 오른쪽 기록·키보드.
   휴대폰: 제목 → 모드 줄 → 계산기 → 소개 → 기록 */
.work { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "h1" "nav" "tool" "side" "lede"; gap: 0; padding-top: 8px; }
.hero .work > h1 { grid-area: h1; }
.work > .lede { grid-area: lede; }
.work > .w-nav { grid-area: nav; }
.work > .tool { grid-area: tool; min-width: 0; }
.work > .side { grid-area: side; }
.work-mode { grid-template-areas: "h1" "lede" "nav" "tool"; }
.hero .work > .lede { margin-top: 14px; }
.hero .work-mode > .lede { margin-top: 2px; }
.work .modes { margin: 10px 0 12px; }
.feat { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 0; font-size: 14.5px; color: var(--muted); }
.feat li { display: flex; gap: 8px; align-items: baseline; }
.feat b { color: var(--ink); }
.feat .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.feat-wrap { padding-top: 6px; }

.side { display: grid; gap: 14px; align-content: start; margin-top: 16px; }
.side-box { background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; padding: 14px 16px; color: var(--ink); }
.side-box h2 { font-size: 15px; margin: 0; letter-spacing: -0.01em; }
.side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-x { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 2px; cursor: pointer; }
.side-x:hover { color: var(--ink); text-decoration: underline; }
.side .hist-list { margin: 10px 0 0; gap: 4px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.side .hist-item { flex-wrap: wrap; gap: 2px 8px; border: 0; background: var(--main-soft); color: var(--ink); padding: 8px 10px; font-size: 15px; }
.side .hist-item:hover { filter: brightness(.97); }
.side-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.side-sub { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.kbd-list { margin: 0; display: grid; gap: 7px; font-size: 13.5px; }
.kbd-list div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kbd-list dd { margin: 0; color: var(--muted); text-align: right; }
.kbd-list kbd { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; }
.side-link { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--link); text-decoration: none; }
.side-link:hover { text-decoration: underline; }
.side-kbd { display: none; }

@media (min-width: 900px) {
  .hero { padding-bottom: 32px; }
  .work { grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto;
    grid-template-areas: "h1 tool" "lede tool" "nav tool" "side side"; gap: 0 28px; padding-top: 18px; }
  .work > .tool { max-width: 470px; }
  .work-mode { grid-template-rows: auto auto 1fr; grid-template-areas: "h1 tool" "lede tool" "nav tool"; }
  .work-mode > .tool { max-width: none; }
  .hero .work > h1 { font-size: 30px; margin: 0; letter-spacing: -0.03em; }
  .hero .work > .lede, .hero .work-mode > .lede { font-size: 14px; margin: 6px 0 0; }
  .work .modes { flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 18px 0 0; }
  .work .modes a { display: block; border: 0; background: transparent; border-radius: 12px; padding: 9px 12px; font-size: 15px; }
  .work .modes a:hover { background: var(--main-soft); }
  .work .modes a[aria-current="page"] { background: var(--card); color: var(--ink); border: 0; box-shadow: inset 3px 0 0 var(--accent), 0 1px 0 var(--line-2); }
  .work .modes small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 1px; line-height: 1.35; }
  .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-kbd { display: block; }
  .work .keys-f .k { min-height: 42px; }
  .work .keys-n .k { min-height: 48px; }
  .work .keys-f { gap: 7px 6px; }
  .work .keys-n { gap: 7px 7px; margin-top: 10px; }
  .work .expr { min-height: 44px; }
  .work .result { min-height: 42px; }
}
@media (min-width: 900px) and (max-width: 1139px) {
  .work { grid-template-columns: 170px minmax(0, 440px) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    grid-template-areas: "h1 tool side" "lede tool side" "nav tool side"; gap: 0 20px; }
  .work-mode { grid-template-columns: 170px minmax(0, 1fr); grid-template-areas: "h1 tool" "lede tool" "nav tool"; }
  .hero .work > h1 { font-size: 25px; }
  .work .modes small { display: none; }
  .side { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
}
@media (min-width: 1140px) {
  .work { grid-template-columns: 220px 450px minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    grid-template-areas: "h1 tool side" "lede tool side" "nav tool side"; gap: 0 24px; }
  .work-mode { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "h1 tool" "lede tool" "nav tool"; }
  .side { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
}
@media (min-width: 900px) {
  .work > .tool { max-width: none; }
  .work .calc-brand { display: none; }
  .work .calc { padding-top: 12px; }
  .work .modes a { white-space: normal; }
  .side .hist-list { max-height: 236px; }
  .work-mode .chart { max-width: 520px; }
}
@media (min-width: 900px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .work .modes a[aria-current="page"] { background: rgba(255, 122, 46, .12); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
}
@media (max-width: 899px) {
  .hero .work > h1 { font-size: 22px; margin: 0; letter-spacing: -0.03em; }
  .hero .work > .lede { font-size: 14.5px; }
  .hero .work-mode > .lede { font-size: 14px; }
}
@media (max-width: 600px) {
  .hero { padding: 0 0 18px; }
  .work .modes { margin: 10px -16px 12px; padding: 0 16px 2px; }
  .work .modes.more-r { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
  .work > .tool .calc { margin: 0 -10px; padding: 10px 8px 12px; }
  .work .keys-n .k { min-height: 56px; }
  .work .keys-n .k .kl { font-size: 22px; }
  .work .keys-f .k { min-height: 42px; padding-top: 13px; }
}

/* ------------------------------------------------ 계산기 몸체 */
.calc { position: relative; background: var(--body); color: var(--body-ink); border-radius: 26px; padding: 14px 12px 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 18px 40px -18px rgba(10, 20, 60, .55); }
.calc-brand { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; opacity: .85; }
.screen { background: var(--screen); color: var(--screen-ink); border-radius: 14px; padding: 8px 12px 10px; box-shadow: inset 0 2px 0 rgba(0,0,0,.08); }
.status { display: flex; gap: 6px; align-items: center; min-height: 22px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; color: var(--screen-muted); }
.status button { border: 1px solid var(--screen-line); background: transparent; color: inherit; border-radius: 6px; padding: 1px 7px; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.status .st-flag { padding: 1px 6px; border-radius: 5px; background: var(--screen-ink); color: var(--screen); }
.status .st-shift { background: var(--shift); color: #fff; }
.status .st-right { margin-left: auto; display: flex; gap: 6px; }
.expr { display: block; min-height: 54px; padding: 8px 2px 4px; font-size: 22px; line-height: 1.25; white-space: nowrap; overflow-x: auto; overflow-y: hidden;
  outline: none; cursor: text; scrollbar-width: none; }
.expr::-webkit-scrollbar { display: none; }
.expr:focus-visible { box-shadow: 0 2px 0 0 var(--cursor); }
.result { min-height: 46px; text-align: right; font-size: 30px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow-x: auto; overflow-y: hidden;
  font-variant-numeric: tabular-nums; scrollbar-width: none; padding-bottom: 2px; }
.result::-webkit-scrollbar { display: none; }
.result.is-preview { opacity: .45; font-weight: 600; font-size: 22px; }
.result.is-err { color: var(--err); font-size: 16px; font-weight: 700; white-space: normal; text-align: left; }
.result-hint { display: block; font-weight: 500; font-size: 13px; opacity: .85; }
.acts { display: flex; gap: 6px; padding: 8px 2px 4px; overflow-x: auto; scrollbar-width: none; }
.acts::-webkit-scrollbar { display: none; }
.acts button { flex: none; border: 0; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: var(--body-ink); }
.acts button:disabled { opacity: .5; cursor: default; }
.acts .acts-sep { flex: 1 0 4px; }

/* 키 */
.keys-f { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 6px; margin-top: 8px; }
.keys-n { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 7px; margin-top: 12px; }
.k { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; min-width: 0;
  border: 0; border-radius: var(--kr); cursor: pointer; padding: 15px 2px 6px; font-weight: 700; line-height: 1.05;
  background: var(--fkey); color: var(--fkey-ink); box-shadow: 0 3px 0 var(--fkey-shadow); transition: transform .06s ease, box-shadow .06s ease; }
.k:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--fkey-shadow); }
.k .kl { font-size: 15px; white-space: nowrap; }
.k .ks { position: absolute; top: 3px; left: 0; right: 0; font-size: 9.5px; font-weight: 800; color: var(--shift); white-space: nowrap; text-align: center; letter-spacing: -.01em; }
.keys-f .k { min-height: 48px; }
.keys-n .k { min-height: 54px; background: var(--nkey); color: var(--nkey-ink); box-shadow: 0 3px 0 var(--key-shadow); }
.keys-n .k .kl { font-size: 21px; font-weight: 650; }
.keys-n .k.op { background: var(--opkey); color: var(--opkey-ink); }
.keys-n .k.op .kl { font-size: 22px; }
.keys-n .k.eq { background: var(--eqkey); color: var(--eqkey-ink); box-shadow: 0 3px 0 var(--eqkey-shadow); }
.keys-n .k.ac { background: var(--ackey); color: var(--ackey-ink); box-shadow: 0 3px 0 var(--ackey-shadow); }
.keys-n .k.del .kl, .keys-n .k.ac .kl { font-size: 16px; font-weight: 800; }
.k.shift { background: var(--shift); color: #fff; box-shadow: 0 3px 0 #c06a00; }
.k.shift .kl { font-size: 12px; letter-spacing: .02em; }
.k.menu .kl { font-size: 13px; }
.k.arrows { padding: 0; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.k.arrows button { border: 0; background: transparent; color: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.calc.is-shift .k[data-s] { box-shadow: 0 3px 0 var(--shift); }
.calc.is-shift .k[data-s] .ks { color: var(--shift); text-decoration: underline; }
.k sup { font-size: .62em; line-height: 0; }
.k i, .k var { font-family: var(--math); font-style: italic; }

/* 판 (함수·변수·설정·기록) */
.sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; top: 64px; z-index: 5; background: var(--card); color: var(--ink);
  border-radius: 18px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.45); display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sheet-title { margin: 0; font-size: 17px; }
.sheet-close { border: 0; background: var(--main-soft); color: var(--main); border-radius: 999px; padding: 6px 14px; font-weight: 800; cursor: pointer; }
.sheet-body { overflow-y: auto; padding: 6px 14px 18px; -webkit-overflow-scrolling: touch; }
.sk-group { margin-top: 12px; }
.sk-title { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 800; }
.sk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sk-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk { border: 1px solid var(--line-2); background: var(--bg); border-radius: 10px; padding: 9px 4px; font-weight: 700; font-size: 14px; cursor: pointer; }
.sk:hover, .sk-row:hover { border-color: var(--main); }
.sk-list { display: grid; gap: 6px; }
.sk-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 10px; text-align: left; border: 1px solid var(--line-2); background: var(--bg);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.sk-sym { grid-row: span 2; font-family: var(--math); font-style: italic; font-size: 20px; align-self: center; }
.sk-name { font-weight: 700; font-size: 14px; }
.sk-val { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.var-list { display: grid; gap: 6px; margin-top: 10px; }
.var-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.var-name { font-family: var(--math); font-style: italic; font-size: 20px; font-weight: 700; }
.var-val { overflow-x: auto; white-space: nowrap; font-size: 16px; }
.var-btn { border: 1px solid var(--line-2); background: var(--bg); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sheet-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.set-row { margin-top: 14px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.seg-btn { border: 0; background: transparent; border-radius: 9px; padding: 7px 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.seg-btn[aria-checked="true"] { background: var(--main); color: var(--main-ink); }
.set-disp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.set-digits { border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; background: var(--card); }
.set-check { display: flex; gap: 8px; align-items: center; margin-top: 16px; font-weight: 600; }
.hist-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.hist-item { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 12px;
  padding: 8px 12px; cursor: pointer; overflow-x: auto; white-space: nowrap; font-size: 16px; }
.hist-eq { color: var(--muted); }
.hist-res { font-weight: 800; margin-left: auto; }

/* ------------------------------------------------ 수식 그리기 (자연 표시) */
.mrow { display: inline-block; white-space: nowrap; }
.mc { display: inline-block; }
.mop { margin: 0 .16em; }
.mcomma { margin-right: .18em; }
.mvar, .mpi, .mk-s { font-family: var(--math); font-style: italic; }
.mpi { font-style: normal; }
.mraw { color: var(--err); }
.mans { font-weight: 800; font-size: .82em; letter-spacing: -.01em; }
.mfn { display: inline-block; margin-right: .04em; }
.mE { font-size: .78em; margin: 0 .1em; }
.mperm { font-family: var(--math); font-weight: 700; font-size: .9em; }
.mk sub, .mk-sub { font-size: .6em; font-style: normal; font-family: var(--font); }
.mu { display: inline-block; font-size: .62em; font-weight: 800; padding: .1em .35em; border-radius: .4em; border: 1px solid currentColor; vertical-align: middle; margin: 0 .2em; }
.mfrac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .12em; font-size: .94em; }
.mfrac > .mnum { display: block; border-bottom: .07em solid currentColor; padding: 0 .16em .06em; }
.mfrac > .mden { display: block; padding: .06em .16em 0; }
.mfrac-sm { font-size: .8em; }
.mmixed { display: inline-flex; align-items: center; }
.mmixed .mfrac { font-size: .78em; }
.msqrt { display: inline-flex; align-items: stretch; margin: 0 .04em; }
.mrad { display: inline-flex; align-items: flex-end; font-size: 1.05em; line-height: 1; padding-bottom: .05em; }
.mrad-in { border-top: .07em solid currentColor; padding: .08em .12em 0 .06em; margin-top: .12em; }
.mroot-n { font-size: .55em; align-self: flex-start; margin-right: -.45em; margin-top: .1em; }
.msup { display: inline-block; vertical-align: .55em; font-size: .68em; margin-left: .03em; }
.msub-in { display: inline-block; vertical-align: -.35em; font-size: .62em; margin: 0 .06em; }
.mabs { display: inline-block; border-left: .07em solid currentColor; border-right: .07em solid currentColor; padding: 0 .12em; margin: 0 .08em; }
.mparen { display: inline-block; }
.mbig { display: inline-flex; align-items: center; }
.mlim { display: inline-flex; flex-direction: column; align-items: flex-start; margin-right: .1em; }
.mlim-c { align-items: center; }
.mbig-sym { font-family: var(--math); font-size: 1.6em; line-height: 1; }
.mlim-hi, .mlim-lo { font-size: .58em; min-width: .6em; }
.mlim-eq { display: inline-flex; align-items: baseline; }
.mdx { margin-left: .14em; font-family: var(--math); font-style: italic; }
.mder { display: inline-flex; align-items: center; }
.mat { display: inline-flex; align-items: flex-end; align-self: stretch; }
.mat-bar { width: .07em; background: currentColor; align-self: stretch; margin: 0 .08em; }
.mat-lo { font-size: .58em; display: inline-flex; align-items: baseline; }
.mph { display: inline-block; width: .62em; height: .86em; border: 1.5px dashed currentColor; opacity: .45; border-radius: 3px; vertical-align: -.08em; margin: 0 .04em; }
.mcur { display: inline-block; width: 2px; height: 1.08em; margin: 0 -1px; background: var(--cursor); vertical-align: -.16em; animation: blink 1.05s steps(1) infinite; }
.expr:not(:focus) .mcur { animation: none; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mcur { animation: none; } }
.is-err .mrow { color: var(--err); }

/* ------------------------------------------------ 본문 */
.section { margin: 40px auto 0; }
.section h2 { font-size: clamp(21px, 4.6vw, 28px); line-height: 1.3; letter-spacing: -0.025em; margin: 0 0 12px; }
.section p { margin: 0 0 12px; color: var(--ink-2); }
.prose { max-width: 720px; }
.prose h2 { margin-top: 36px; }
.prose h3 { font-size: 18px; margin: 26px 0 8px; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--ink-2); }
.prose li { margin: 4px 0; }
.prose code, .kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--main-soft); color: var(--ink); padding: 1px 6px; border-radius: 6px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 10px 0 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { color: var(--muted); font-weight: 700; }
.tips { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
@media (min-width: 720px) { .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tip { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.tip h3 { margin: 0 0 6px; font-size: 16px; }
.tip p { margin: 0; font-size: 15px; }
.tip .eg { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--main); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 8px 0 0; }
.links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
@media (min-width: 720px) { .links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.links a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; font-weight: 700; }
.links a span { display: block; font-weight: 500; font-size: 14px; color: var(--muted); }
.links a:hover { border-color: var(--main); }

/* ------------------------------------------------ 광고 자리 (자동 광고 + 수동 자리 미리 잡기) */
.ad { margin: 40px auto; min-height: 0; }
.ad-label { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-bottom: 4px; }
.ad-preview { display: flex; align-items: center; justify-content: center; min-height: 120px; border-radius: 4px; color: var(--muted); font-size: 13px;
  background: repeating-linear-gradient(135deg, var(--line) 0 8px, transparent 8px 16px); }

/* ------------------------------------------------ 모드 페이지 공통 (표·입력 칸) */
.panel { background: var(--card); color: var(--ink); border-radius: 22px; padding: 16px; box-shadow: 0 18px 40px -22px rgba(10, 20, 60, .5); }
.panel h2 { font-size: 17px; margin: 0 0 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; border-radius: 9px; padding: 7px 11px; font-weight: 700; font-size: 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--main); color: var(--main-ink); }
.field { display: grid; gap: 4px; }
.field label, .lab { font-size: 13px; font-weight: 700; color: var(--muted); }
.inp { width: 100%; min-width: 0; border: 1.5px solid var(--line-2); border-radius: 10px; padding: 9px 10px; background: var(--bg); font-size: 16px; font-variant-numeric: tabular-nums; }
.inp:focus { border-color: var(--main); outline: none; box-shadow: 0 0 0 3px var(--main-soft); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 800; cursor: pointer; background: var(--main); color: var(--main-ink); }
.btn-ghost { background: var(--main-soft); color: var(--main); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.out { margin-top: 14px; border-radius: 14px; background: var(--screen); color: var(--screen-ink); padding: 12px 14px; font-size: 17px; overflow-x: auto; }
.out:empty { display: none; }
.out .is-err, .out.is-err { color: var(--err); font-weight: 700; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; align-items: baseline; }
.kv dt { font-weight: 700; color: var(--screen-muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 700; overflow-x: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grid-in { width: 100%; border-collapse: collapse; }
.grid-in th { font-size: 12px; color: var(--muted); font-weight: 700; padding: 2px 4px; text-align: left; }
.grid-in td { padding: 3px; }
.grid-in td:first-child { width: 2.2em; color: var(--muted); font-size: 12px; text-align: right; }
.data-wrap { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.mat-grid { display: grid; gap: 4px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid var(--screen-line); text-align: right; white-space: nowrap; }
.tbl th { font-size: 13px; color: var(--screen-muted); }
.tbl td.is-err { color: var(--err); }
.chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.chart .ax { stroke: var(--screen-line); }
.chart .lf { stroke: var(--main); fill: none; stroke-width: 2; }
.chart .lg { stroke: var(--accent); fill: none; stroke-width: 2; }
.chart .pt { fill: var(--main); }
.chart text { fill: var(--screen-muted); font-size: 11px; }
.base-out { display: grid; gap: 6px; }
.base-out div { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.base-out b { font-size: 13px; color: var(--screen-muted); }
.base-out code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; overflow-x: auto; white-space: nowrap; }

/* ------------------------------------------------ 글 페이지 */
.page-head { background: var(--hero); color: var(--hero-ink); padding: 18px 0 30px; }
.page-head h1 { margin: 8px 0 8px; font-size: clamp(25px, 5.6vw, 38px); line-height: 1.22; letter-spacing: -0.03em; }
.page-head p { margin: 0; color: var(--hero-2); max-width: 40em; }
.crumbs { font-size: 13px; color: var(--hero-2); }
.crumbs a { color: inherit; }
.answer { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 14px; padding: 14px 16px; margin: 24px 0 8px; }
.answer p { margin: 0; color: var(--ink); }
.try { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--main); color: var(--main-ink); font-weight: 800; text-decoration: none; }
.sources { font-size: 14px; color: var(--muted); }
.updated { font-size: 13px; color: var(--muted); }
.guide-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.guide-list a { display: block; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-decoration: none; }
.guide-list b { display: block; font-size: 17px; }
.guide-list span { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------ 꼬리 */
.foot { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-pub { margin: 0 0 10px; color: var(--ink-2); }
.foot-pub a { font-weight: 700; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.foot p { margin: 4px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 700; z-index: 40; transition: opacity .2s ease, transform .2s ease; pointer-events: none; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast, .k { transition: none; } }

/* 작은 휴대폰 */
@media (max-width: 380px) {
  .calc { padding: 10px 8px 10px; border-radius: 22px; }
  .keys-f { gap: 6px 5px; }
  .keys-n { gap: 6px 6px; }
  .k .kl { font-size: 14px; }
  .keys-f .k { min-height: 44px; }
  .keys-n .k { min-height: 48px; }
  .keys-n .k .kl { font-size: 19px; }
  .expr { font-size: 20px; min-height: 48px; }
  .result { font-size: 26px; min-height: 40px; }
}

/* ------------------------------------------------ 키 글자 모양 */
.kph { display: inline-block; width: .62em; height: .8em; border: 1.5px solid currentColor; border-radius: 2px; vertical-align: -.06em; opacity: .8; }
.kfrac { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 15px; }
.kfrac i { display: block; width: .7em; height: .55em; border: 1.5px solid currentColor; border-radius: 2px; }
.kfrac b { display: block; width: .95em; height: 1.5px; background: currentColor; }
.k sub { font-size: .62em; }
.kbd-help { font-size: 13.5px; color: var(--muted); margin: 0 auto; line-height: 1.9; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--card); border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--ink); padding: 0 5px; border-radius: 5px; }
.noscript { background: var(--card); color: var(--ink); border-radius: 12px; padding: 12px; }
.hero-mode .mode-ui { min-height: 360px; }
.hero-mode + .after-hero { padding-top: 0; }
.crumbs a { text-decoration: underline; text-underline-offset: 2px; }

/* 휴대폰: 첫 화면에 키가 더 보이게 */
@media (max-width: 600px) {
  .calc-brand { display: none; }
  .calc { padding-top: 10px; }
  .expr { min-height: 44px; padding-top: 4px; }
  .result { min-height: 38px; font-size: 27px; }
  .acts { padding-top: 6px; padding-bottom: 2px; }
  .keys-f { margin-top: 6px; gap: 7px 6px; }
  .keys-f .k { min-height: 44px; padding-top: 14px; }
  .keys-n { margin-top: 10px; }
  .keys-n .k { min-height: 50px; }
}

/* 시안 D 모양 (2026-10-06 5차: 사용자가 색은 D로. 따뜻한 미색 + 주황 한 색, 밝은 몸체·어두운 화면·기능 키, 주황 = 키) */
.prose a, .faq a, .foot a { color: var(--link); }
.prose a.try { color: #fff; background: #cc4a00; }
.prose a.try:hover { filter: brightness(1.06); }
.prose th, .prose td:first-child { white-space: nowrap; }
.page-head a, .crumbs a { color: inherit; }
.hero, .page-head { background-color: var(--hero); background-image: radial-gradient(900px 420px at 92% 0%, rgba(242, 92, 5, .07), transparent 65%); border-bottom: 1px solid var(--line); }
.top-band { background: var(--hero); position: relative; z-index: 3; }
.hero h1 { font-size: clamp(34px, 9vw, 64px); letter-spacing: -0.05em; font-weight: 850; color: var(--hero-ink); }
.hero .lede b { background: #cc4a00; color: #fff; padding: 0 4px; border-radius: 4px; }
.modes a { background: var(--card); border-color: var(--line-2); color: var(--hero-ink); }
.modes a:hover { background: var(--main-soft); }
.modes a[aria-current="page"] { background: var(--hero-ink); color: var(--hero); border-color: var(--hero-ink); }
.calc { background: var(--body); border: 1px solid color-mix(in srgb, var(--body-ink) 10%, transparent); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 34px 64px -34px rgba(60, 40, 10, .5); }
.screen { box-shadow: inset 0 3px 8px rgba(0, 0, 0, .45); }
.acts button { background: color-mix(in srgb, var(--body-ink) 10%, transparent); color: var(--body-ink); }
.acts .starter button { background: #cc4a00; color: #fff; }
.k.shift { color: #2b1d00; box-shadow: 0 3px 0 #a87400; }
.answer { border-left-color: var(--accent); }
.lm-b { fill: #f25c05; } .lm-s { fill: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero, :root:not([data-theme="light"]) .page-head { background-image: radial-gradient(900px 420px at 92% 0%, rgba(255, 122, 46, .10), transparent 65%); }
  :root:not([data-theme="light"]) .calc { box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 34px 64px -30px rgba(0,0,0,.8); }
  :root:not([data-theme="light"]) .modes a[aria-current="page"] { background: #f2ede2; color: #1f1d1a; border-color: #f2ede2; }
}

/* ------------------------------------------------ 모드 화면 부품 */
.mode-ui { display: grid; gap: 12px; align-content: start; }
.mode-ui > * { min-width: 0; }
.mode-ui .tabs { margin-bottom: 0; }
.mode-ui .out { margin-top: 0; }
.opt-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--main); }
.out-h { font-size: 13px; margin: 10px 0 6px; color: var(--screen-muted); }
.out-h:first-child { margin-top: 0; }
.val { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.val-approx { font-weight: 500; font-size: .86em; color: var(--screen-muted); }
.eq-form { margin: 0; font-family: var(--math); font-size: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inp-op { width: auto; font-family: var(--font); }
.inp-sm { width: auto; padding: 5px 8px; font-size: 14px; }
.ratio-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.ratio-sep { font-weight: 800; font-size: 20px; }
.mat-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .mat-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mat-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.mat-head b { margin-right: auto; }
.mat-grid .inp { text-align: center; padding: 8px 4px; }
.eq-grid .lab { text-align: center; font-family: var(--math); font-style: italic; font-size: 16px; }
.mat-out { border-collapse: separate; border-spacing: 10px 4px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; border-radius: 6px; margin: 4px 0; }
.mat-out td { text-align: center; white-space: nowrap; }
.ops .btn { padding: 9px 13px; font-size: 15px; }
.btn-sm { padding: 6px 11px; font-size: 14px; }
.tbl-wrap { max-height: 420px; overflow: auto; margin-top: 8px; }
.ineq-out { font-size: 18px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.est { display: grid; gap: 8px; }
.est:empty { display: none; }
.est .out-h { margin: 4px 0 0; color: var(--muted); }
select.inp { appearance: auto; }
.grid-in .inp { padding: 6px 9px; border-radius: 8px; }
.data-wrap { max-height: 236px; }
@media (max-width: 600px) { .modes { gap: 5px; } .modes a { padding: 5px 10px; font-size: 13.5px; } }
@media (max-width: 420px) { .top { gap: 6px 12px; } .logo { font-size: 16px; gap: 8px; } .top-nav { gap: 2px 10px; font-size: 14px; } .lang { min-width: 34px; height: 30px; padding: 0 8px; } .hero h1 { font-size: clamp(28px, 8.4vw, 40px); } }
@media (max-width: 420px) { .top-nav a + a { display: none; } }
/* 점검표(Vercel) 반영 */
.sheet-body { overscroll-behavior: contain; }
.k, .acts button, .status button, .btn, .tabs button, .sk { -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .k:hover { filter: brightness(1.08); } .btn:hover { filter: brightness(1.12); } .tabs button:hover:not([aria-selected="true"]) { background: var(--line); } }
select.inp, .set-digits { background-color: var(--card); color: var(--ink); }
.inp { color: var(--ink); }

/* ------------------------------------------------ 처음 화면 예시 칩 + 키 뜻 */
.acts .starter { display: none; align-items: center; gap: 6px; flex: none; font-size: 12px; white-space: nowrap; }
.acts.is-start .starter { display: flex; }
.acts.is-start > button, .acts.is-start .acts-sep { display: none; }
.status .st-right a { border: 1px solid var(--screen-line); color: inherit; text-decoration: none; border-radius: 6px; padding: 1px 7px; }

.keyhelp > p { color: var(--muted); margin: 0 0 12px; }
.keyhelp dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; margin: 0; }
.keyhelp dl div { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.keyhelp dt { flex: none; min-width: 64px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.keyhelp dd { margin: 0; font-size: 14px; }

/* 2차 블라인드 검토 반영: 보조 글자 대비, 휴대폰 첫 화면에 = 키까지, 어두운 화면 안내 띠 */
.k .ks { font-size: 10.5px; }
.keys-f .k .ks { color: #f5b04a; }
.keys-n .k .ks { color: #b4460a; }
.keys-n .k.op .ks { color: #843000; }
.keys-n .k.eq .ks, .keys-n .k.ac .ks { color: rgba(255, 255, 255, .92); }
.keys-n .k.eq .ks { color: #3a1800; }
.calc.is-shift .k[data-s] .ks { text-decoration: none; }
.acts .starter { color: var(--ink-2); }
.langbar { background: #1f1d1a; color: #f6f1e4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .langbar { background: #23211d; border-bottom: 1px solid #3a3833; }
  :root:not([data-theme="light"]) .keys-f .k .ks, :root:not([data-theme="light"]) .keys-n .k .ks { color: #f5b04a; }
  :root:not([data-theme="light"]) .keys-n .k.op .ks { color: #ffc49b; } }
@media (max-width: 600px) {
  .modes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; }
  .modes::-webkit-scrollbar { display: none; }
  .modes li { flex: none; }
  .hero { padding-bottom: 20px; }
  .keys-f .k { min-height: 40px; padding-top: 13px; }
  .keys-n .k { min-height: 47px; }
  .keys-n { margin-top: 8px; gap: 7px; }
}

/* 3차 블라인드 검토 반영: SHIFT 누른 상태의 보조 글자 대비, 어두운 화면 보라 버튼 글자 대비, 어두운 계산 화면 위 그래프 색 */
.calc.is-shift .k[data-s] { box-shadow: 0 3px 0 color-mix(in srgb, var(--shift) 55%, var(--key-shadow)); }
.calc.is-shift .keys-n .k[data-s] .ks { color: #b4460a; }
.calc.is-shift .keys-n .k.op[data-s] .ks { color: #843000; }
.calc.is-shift .keys-f .k[data-s] .ks { color: #f5b04a; }
.calc.is-shift .keys-n .k.eq[data-s] .ks, .calc.is-shift .keys-n .k.ac[data-s] .ks { color: rgba(255, 255, 255, .92); }
.calc.is-shift .keys-n .k.eq[data-s] .ks { color: #3a1800; }
.chart .lf, .chart .pt { stroke: #ff9a52; } .chart .pt { fill: #ff9a52; stroke: none; }
.chart .lg { stroke: #9fd3c7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose a.try, :root:not([data-theme="light"]) .acts .starter button, :root:not([data-theme="light"]) .hero .lede b { background: var(--accent); color: #131210; }
  :root:not([data-theme="light"]) .calc.is-shift .keys-n .k[data-s] .ks { color: #f5b04a; }
  :root:not([data-theme="light"]) .calc.is-shift .keys-n .k.op[data-s] .ks { color: #ffc49b; } }
/* 휴대폰 언어 안내 띠를 한 줄로 (계산기 = 키가 첫 화면에 남게) */
@media (max-width: 600px) { .langbar { gap: 8px; padding: 6px 10px 6px 14px; font-size: 12.5px; justify-content: space-between; }
  .langbar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .langbar a { white-space: nowrap; } .langbar button { font-size: 16px; padding: 2px 4px; } }
/* 시안 D: = 키(주황) 위 보조 글자는 어두운 글자로 (어두운 화면 포함) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .keys-n .k.eq .ks, :root:not([data-theme="light"]) .calc.is-shift .keys-n .k.eq[data-s] .ks { color: #3a1800; } }
