:root { --ink: #231a15; --muted: #756a62; --paper: #f5f1eb; --surface: #fffdf9; --line: #ded4c8; --accent: #7c3d1e; --accent-dark: #4e2413; --wood: #7d4224; --wood-dark: #2a1b15; --wood-light: #bc7541; --focus: #1e6790; --shadow: 0 18px 45px rgba(52, 33, 22, .16); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); padding: 9px 12px; border-radius: 8px; color: #fff; background: var(--accent-dark); text-decoration: none; }.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid rgba(112, 88, 68, .15); background: rgba(255,253,249,.94); backdrop-filter: blur(12px); }.header-inner { display: flex; min-height: 69px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.04rem; font-weight: 850; letter-spacing: -.04em; text-decoration: none; }.brand small { display: block; margin-top: 1px; color: #967a66; font-size: .57rem; font-weight: 750; letter-spacing: .14em; }.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #bc8b68; border-radius: 8px; color: #fff8ef; background: linear-gradient(135deg, #9a5230, #60301d); box-shadow: inset 0 1px rgba(255,255,255,.32); font-family: Georgia, serif; font-size: 1.12rem; }
.site-nav { display: flex; gap: 6px; align-items: center; }.site-nav a { padding: 7px 10px; border-radius: 7px; color: #68584d; font-size: .82rem; font-weight: 750; text-decoration: none; }.site-nav a:hover, .site-nav a:focus-visible { color: var(--accent-dark); background: #f3e9df; outline: none; }
.tool-section { padding: clamp(38px, 7vw, 76px) 0 52px; }.tool-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 24px; }.eyebrow { margin: 0 0 8px; color: #9b5f3a; font-size: .68rem; font-weight: 900; letter-spacing: .14em; }.tool-heading h1 { margin: 0; color: #2f211a; font-size: clamp(2rem, 4.5vw, 3.8rem); line-height: 1.06; letter-spacing: -.07em; }.tool-heading p:not(.eyebrow) { max-width: 590px; margin: 14px 0 0; color: #6a5b51; font-size: .96rem; }
.readout { min-width: min(270px, 100%); padding: 17px 20px; border: 1px solid #d8c6b4; border-radius: 13px; background: #fffaf4; box-shadow: 0 8px 18px rgba(67, 39, 22, .06); text-align: right; }.readout span { display: block; color: #8f6d56; font-size: .7rem; font-weight: 850; letter-spacing: .08em; }.readout output { display: block; overflow: hidden; margin-top: 2px; color: #3c2418; font-size: clamp(1.7rem, 4vw, 2.75rem); font-variant-numeric: tabular-nums; font-weight: 900; letter-spacing: -.05em; text-overflow: ellipsis; }.readout small { color: #896e5c; font-size: .72rem; }
.control-bar { display: flex; align-items: end; gap: 13px; padding: 15px; border: 1px solid #ddd2c7; border-radius: 13px 13px 0 0; background: #fffdf9; }.control-group { flex: 0 0 auto; }.control-group--grow { flex: 1 1 340px; }.control-label { display: block; margin-bottom: 6px; color: #715f53; font-size: .69rem; font-weight: 850; }.segmented { display: inline-flex; overflow: hidden; border: 1px solid #d5c3b4; border-radius: 8px; }.segmented button { min-width: 37px; min-height: 35px; border: 0; border-right: 1px solid #d5c3b4; color: #665449; background: #fff; font-size: .8rem; font-weight: 850; }.segmented button:last-child { border-right: 0; }.segmented button.is-active { color: #fff; background: var(--accent); }.number-controls { display: flex; gap: 6px; }.number-controls input { min-width: 0; width: 100%; height: 35px; padding: 0 10px; border: 1px solid #d3c2b4; border-radius: 7px; color: #43291b; background: #fff; font-variant-numeric: tabular-nums; }.number-controls input:focus { border-color: #a15c37; outline: 3px solid rgba(161,92,55,.15); }.button { min-height: 35px; padding: 0 11px; border-radius: 7px; font-size: .76rem; font-weight: 850; white-space: nowrap; }.button--secondary { border: 1px solid #b99278; color: #6a351e; background: #fff9f4; }.button--secondary:hover { background: #f5e5d9; }.button--quiet { border: 1px solid transparent; color: #77655a; background: transparent; }.button--quiet:hover { border-color: #ddcfc4; background: #f5eeea; }.control-help { margin: 0; padding: 9px 15px; border: 1px solid #ddd2c7; border-top: 0; color: #7a6a5f; background: #faf7f3; font-size: .72rem; }.interaction-note { margin: 16px 0 9px; color: #755f50; font-size: .78rem; }
.abacus-scroll { overflow-x: auto; padding: 4px 2px 16px; overscroll-behavior-x: contain; }.abacus-frame { position: relative; min-width: calc(var(--columns) * 56px + 58px); padding: 26px 28px 22px; border: 1px solid #1c1410; border-radius: 15px; background: linear-gradient(135deg, #3c271e 0%, #1b1411 45%, #3b251c 100%); box-shadow: 0 16px 28px rgba(47, 27, 17, .26), inset 0 1px rgba(255,255,255,.16); }.abacus-frame::before { position: absolute; inset: 9px; border: 2px solid rgba(221,157,103,.3); border-radius: 8px; content: ""; pointer-events: none; }.beam-caption { position: relative; z-index: 3; display: flex; justify-content: space-between; margin: 0 2px 2px; color: #cda27f; font-size: .62rem; font-weight: 850; letter-spacing: .08em; }.beam-caption b { color: #f3d4b4; font-size: .64rem; }.abacus { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--columns), minmax(44px, 1fr)); gap: clamp(5px, 1.1vw, 14px); }.rod { position: relative; display: grid; min-width: 0; grid-template-rows: 98px 18px 220px 22px; outline: none; }.rod:focus-visible::after { position: absolute; z-index: 9; inset: -4px; border: 2px solid #8dd8ef; border-radius: 7px; box-shadow: 0 0 0 3px rgba(141,216,239,.2); content: ""; pointer-events: none; }.rod-line { position: absolute; z-index: 0; top: 11px; bottom: 24px; left: calc(50% - 2px); width: 4px; border-radius: 99px; background: linear-gradient(90deg, #59351f, #d4a16d 45%, #704422); box-shadow: inset 1px 0 rgba(255,255,255,.25), 0 0 2px rgba(0,0,0,.6); }.rod-top, .rod-bottom { position: relative; z-index: 1; }.rod-beam { position: relative; z-index: 4; margin: 0 -4px; border-top: 2px solid #dca270; border-bottom: 2px solid #251812; background: linear-gradient(#a05731, #68331f 48%, #b66a3e); box-shadow: 0 2px 4px rgba(0,0,0,.42); }.bead { position: absolute; z-index: 2; left: 3%; width: 94%; height: 37px; padding: 0; border: 1px solid #452013; border-radius: 50%; background: radial-gradient(ellipse at 50% 28%, #e5a369 0 10%, #b76535 38%, #71361e 78%, #3e1b12 100%); box-shadow: inset 0 2px 2px rgba(255,225,191,.46), inset 0 -3px 4px rgba(61,23,10,.45), 0 3px 4px rgba(0,0,0,.3); transition: top .18s cubic-bezier(.2,.8,.2,1), bottom .18s cubic-bezier(.2,.8,.2,1), filter .12s ease; touch-action: none; }.bead::before { position: absolute; top: 50%; left: 50%; width: 10px; height: 17px; transform: translate(-50%, -50%); border: 1px solid rgba(25,13,7,.7); border-radius: 50%; background: radial-gradient(ellipse, #2c190d 0 40%, #90603a 43%, #60331d 70%); box-shadow: inset 0 1px rgba(255,255,255,.18); content: ""; }.bead:hover { filter: brightness(1.1); }.bead:active, .bead.is-dragging { cursor: grabbing; filter: brightness(1.17); }.bead--heaven { top: 8px; }.bead--heaven.is-active { top: 53px; }.bead--earth { bottom: calc(7px + (3 - var(--slot)) * 42px); }.bead--earth.is-active { top: calc(7px + var(--slot) * 42px); bottom: auto; }.place-label { position: relative; z-index: 2; display: grid; place-items: center; align-self: end; color: #f0cfb0; font-size: .63rem; font-variant-numeric: tabular-nums; font-weight: 800; }.place-label sup { margin-left: 1px; font-size: .58rem; }.status-message { min-height: 23px; margin: 0; color: #755f50; font-size: .76rem; }
.guide-section { padding: 66px 0 78px; border-top: 1px solid #e1d8cf; background: #fffdf9; }.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }.guide-grid article { padding: 23px; border: 1px solid #e4dacf; border-radius: 13px; background: #fff; }.guide-grid h2 { margin: 0; color: #432b1e; font-size: 1.15rem; letter-spacing: -.04em; }.guide-grid p:not(.eyebrow) { margin: 10px 0 0; color: #6e6056; font-size: .89rem; }
.footer { padding: 40px 0 22px; border-top: 1px solid #dfd5cb; color: #6d5e54; background: #f1ebe3; }.footer-inner { display: flex; align-items: start; justify-content: space-between; gap: 28px; }.footer p { margin: 10px 0 0; font-size: .78rem; }.footer nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 14px; }.footer nav a { color: #625247; font-size: .8rem; text-decoration: none; }.footer nav a:hover { color: var(--accent-dark); text-decoration: underline; }.footer-bottom { margin-top: 30px; padding-top: 17px; border-top: 1px solid #ddd0c3; color: #88766a; font-size: .7rem; }
.article-hero { padding: 76px 0 48px; border-bottom: 1px solid #e1d7cc; background: #f7f1e9; }.article-hero h1 { max-width: 760px; margin: 0; color: #352319; font-size: clamp(2.2rem,5vw,4rem); line-height: 1.07; letter-spacing: -.07em; }.article-hero p:last-child { max-width: 700px; color: #68584d; }.article { padding: 56px 0 80px; background: #fffdf9; }.narrow { width: min(760px, calc(100% - 40px)); margin: 0 auto; }.article h2 { margin: 42px 0 10px; color: #472d1e; font-size: 1.26rem; }.article h2:first-child { margin-top: 0; }.article p, .article li { color: #65564d; }.article a { color: #813e20; }.article-note { padding: 15px 17px; border-left: 4px solid #b67144; background: #fbf4eb; color: #6c594c; }
@media (max-width: 780px) { .shell { width: min(100% - 28px, 1180px); }.tool-heading { display: block; }.readout { width: 100%; margin-top: 22px; }.control-bar { display: grid; grid-template-columns: 1fr auto; align-items: end; }.control-group--grow { grid-column: 1 / -1; }.number-controls { flex-wrap: wrap; }.number-controls input { flex: 1 1 100%; }.guide-grid { grid-template-columns: 1fr; }.footer-inner { display: block; }.footer nav { justify-content: start; margin-top: 22px; } }
@media (max-width: 520px) { .header-inner { min-height: 61px; }.site-nav a { padding: 6px; font-size: .74rem; }.brand { font-size: .96rem; }.brand-mark { width: 30px; height: 30px; }.control-bar { padding: 11px; }.abacus-frame { min-width: calc(var(--columns) * 31px + 56px); padding: 20px 16px 18px; }.abacus { grid-template-columns: repeat(var(--columns), minmax(31px, 1fr)); gap: 3px; }.rod { grid-template-rows: 88px 17px 196px 20px; }.bead { height: 30px; }.bead::before { width: 8px; height: 14px; }.bead--heaven.is-active { top: 49px; }.bead--earth { bottom: calc(7px + (3 - var(--slot)) * 36px); }.bead--earth.is-active { top: calc(7px + var(--slot) * 36px); }.interaction-note, .control-help { font-size: .7rem; }.tool-heading h1 { font-size: 2.25rem; } }
.bead { -webkit-user-select: none; user-select: none; }
.abacus, .abacus-frame { -webkit-user-select: none; user-select: none; }
.abacus-scroll { width: 100vw; margin-left: calc(50% - 50vw); padding-right: 20px; padding-left: 20px; }
.abacus-frame { width: max-content; min-width: calc(var(--columns) * 60px + 56px); }
.abacus { grid-template-columns: repeat(var(--columns), 54px); gap: 6px; }
.rod { width: 54px; }
@media (max-width: 520px) { .abacus-scroll { padding-right: 14px; padding-left: 14px; }.abacus-frame { min-width: calc(var(--columns) * 47px + 42px); }.abacus { grid-template-columns: repeat(var(--columns), 42px); gap: 5px; }.rod { width: 42px; } }
.bead::before { display: none; }
.rod.is-group-marker .rod-beam::after { position: absolute; z-index: 6; top: 50%; left: 50%; width: 8px; height: 8px; transform: translate(-50%, -50%); border: 1px solid rgba(69,38,20,.78); border-radius: 50%; background: #fff8ed; box-shadow: 0 1px 2px rgba(0,0,0,.48); content: ""; }
.rod.is-group-marker .place-label { color: #fff3df; font-weight: 950; }
@media (max-width: 520px) { .rod.is-group-marker .rod-beam::after { width: 7px; height: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
