:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #1a1d20;
  --line: #35393c;
  --text: #f4f5f3;
  --muted: #b1b6b8;
  --lime: #c0f66a;
  --display: "Barlow Condensed", "Bahnschrift Condensed", "Arial Narrow", Impact, "Malgun Gothic", sans-serif;
  --body: "Inter", "Segoe UI", Arial, "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.5 var(--body); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2, h3 { line-height: 1.25; }
.icon { width: 22px; height: 22px; flex: none; }
.container, .topbar { width: min(1240px, calc(100% - clamp(36px, 9vw, 144px))); margin-inline: auto; }
header { background: #151719; border-bottom: 1px solid #303437; }
.topbar { display: flex; align-items: center; gap: clamp(24px, 4.3vw, 75px); min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font: 800 italic 1.85rem/1 "Barlow", "Segoe UI", Arial, sans-serif; letter-spacing: -.075em; }
.brand > span > span, .mark { color: var(--lime); }
.mark { width: 38px; height: 38px; }
.topbar nav { display: flex; align-self: stretch; gap: 26px; }
.topbar nav a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; color: #bdc1c3; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.topbar nav .icon { width: 17px; height: 17px; }
.topbar nav a[aria-current] { color: var(--lime); }
.topbar nav a[aria-current]::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--lime); }
.lang { margin-left: auto; display:flex; align-items:center; gap:2px; }
.lang > .icon { width: 17px; color: #aab0b1; margin-right: 8px; }
.lang a { display: grid; place-items: center; min-height: 44px; min-width: 34px; color: #a1a6a8; font-size: .8rem; font-weight: 700; }
.lang a[aria-current] { color: var(--text); background: #2a2d30; border-radius: 5px; background-clip: padding-box; border-block: 8px solid #151719; }
a:hover, .topbar a:hover { color: var(--lime); }
.ad { display: grid; place-items: center; height: 55px; border: 1px dashed #34383b; border-radius: 6px; background: #151719; margin-top: 24px; }
.ad span, .micro { color: #969d9e; text-transform: uppercase; font: 600 .71rem/1.2 var(--body); letter-spacing: .15em; }
.intro { padding: 30px 0 24px; }
h1 { font: italic 800 clamp(2.5rem,4.1vw,3.85rem)/1.06 var(--display); text-transform: uppercase; letter-spacing: -.035em; }
.intro p { color: var(--muted); margin-top: 8px; }
.workspace { display: grid; grid-template-columns: minmax(300px,.88fr) minmax(0,1.62fr); gap: 20px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; overflow: hidden; }
.panel-head, .result-title { display: flex; align-items: center; }
.panel-head { gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); min-height: 60px; }
.panel-head .icon { color: var(--lime); width: 21px; height: 21px; }
.panel-head h2 { font-size: 1.13rem; font-weight: 690; letter-spacing: -.025em; }
.result-title { justify-content: space-between; padding-right: 22px; border-bottom: 1px solid var(--line); }
.result-title .panel-head { border: 0; }
.live, .match { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .76rem; }
.live { color: var(--lime); background: #28331e; border: 1px solid #404e32; padding: 3px 9px; border-radius: 20px; }
.live i { border-radius: 50%; height: 6px; width: 6px; background: var(--lime); }
.controls { padding: 16px 22px 20px; display: grid; gap: 15px; }
.field { display: block; font-weight: 600; font-size: .91rem; margin-bottom: 8px; }
.unitrow { display: flex; align-items: center; justify-content: space-between; }
.unitrow .field { margin: 0; }
.switch { display: flex; padding: 3px; border: 1px solid #3b4042; border-radius: 7px; background: #121416; }
.switch button { background: transparent; border: 0; color: #aeb4b5; min-width: 48px; min-height: 36px; border-radius: 4px; font-weight: 700; }
.switch button[aria-pressed="true"] { background: var(--lime); color: #17220c; }
.stepper { display: grid; grid-template-columns: 50px minmax(0,1fr) 50px; gap: 8px; }
.stepper button { border: 1px solid #42484b; background: #292d30; border-radius: 6px; font-size: 1.55rem; line-height: 1; font-weight: 500; }
.stepper button:hover, .plate-toggle:hover, select:hover { border-color: #828b83; }
.weight-input { display: flex; align-items: baseline; justify-content: center; gap: 5px; border: 1px solid #4b504b; background: #111416; border-radius: 6px; padding: 6px 3px; color: #b8bfba; min-height: 50px; }
.weight-input:focus-within { border-color: var(--lime); }
.weight-input input { color: var(--text); padding: 0; width: 3ch; max-width: 78%; min-width: 1ch; border: 0; background: transparent; font: 700 1.85rem/1.2 var(--display); text-align: right; appearance: textfield; }
.weight-input input::-webkit-inner-spin-button, .weight-input input::-webkit-outer-spin-button { appearance: none; }
.weight-input span { font-size: .9rem; }
select { appearance: none; width: 100%; min-height: 46px; padding: 9px 38px 9px 14px; border: 1px solid #42474a; border-radius: 6px; background: #222629 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23c6cacf' stroke-width='1.5'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; font-weight: 600; }
.inventory { border-top: 1px solid var(--line); padding-top: 14px; }
.inventory p { margin: -4px 0 10px; font-size: .81rem; color: var(--muted); }
#inventory { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.plate-toggle { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 4px; min-height: 40px; background: #272b2d; border: 1px solid #414749; border-radius: 6px; font-size: .88rem; font-weight: 650; }
.dot { height: 11px; width: 11px; flex: none; background: var(--plate); box-shadow: inset 0 0 0 1px #ffffff38; border-radius: 50%; }
.plate-toggle[aria-pressed="false"] { background: #151719; color: #9ca3a3; border-style: dashed; }
.plate-toggle[aria-pressed="false"] .dot { background: transparent; border: 1px solid #83908d; }
.drawing { position: relative; overflow: hidden; margin: 16px 16px 0; height: clamp(240px,21vw,305px); border: 1px solid #343a3b; border-radius: 8px; background-color: #14191b; background-image: linear-gradient(#83969a11 1px,transparent 1px),linear-gradient(90deg,#83969a11 1px,transparent 1px),radial-gradient(ellipse at center,#272e2e70,transparent 74%); background-size: 24px 24px,24px 24px,100% 100%; }
.mass { position: absolute; z-index: 1; top: 14px; left: 19px; pointer-events: none; }
.mass strong, .rm-output strong { font: 750 2.95rem/.98 var(--display); letter-spacing: -.04em; }
.mass .micro { font-size: .66rem; color: #b0b7b5; }
.mass div { margin-top: 4px; }
.mass div span { color: #b0b7b5; font: 600 1rem var(--body); }
#barbell { position: absolute; top: 15%; height: 82%; width: 100%; left: 0; }
.axis { position: absolute; bottom: 15px; left: 20px; width: 37%; display: flex; align-items: center; opacity: .55; }
.axis i { height: 5px; width: 1px; background: #748280; }
.axis b { height: 1px; flex: 1; background: #596361; }
.match { position: absolute; right: 12px; bottom: 10px; color: var(--lime); background: #1c241bf2; border: 1px solid #424f36; border-radius: 5px; padding: 2px 7px; }
.match[data-exact="false"] { color: #edd28d; border-color: #584c31; background: #2a251b; }
.match:empty { display: none; }
.breakdown { padding: 16px 22px 20px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-head h3 { font-size: 1rem; }
.side-head > span { font-size: .84rem; color: #b4bcba; }
#combination { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.combo { display: inline-flex; align-items: center; gap: 9px; background: #25292b; padding: 8px 12px; border: 1px solid #42474a; border-radius: 6px; font-size: 1.09rem; font-weight: 700; }
.combo i { height: 22px; width: 6px; border-radius: 3px; background: var(--plate); box-shadow: inset 0 0 0 1px #ffffff24; }
.combo small { color: #b5bcbc; font-size: .86rem; font-weight: 500; }
.join { color: #8d9596; font-weight: 500; }
.notice:not(:empty) { padding: 12px 16px; background: #2a271f; border: 1px solid #514939; border-radius: 7px; margin-top: 12px; color: #eedcae; }
.related { margin: 26px 0 32px; }
.related h2, .reading h2, .article h2 { font-size: 1.23rem; letter-spacing: -.025em; }
.related > div { display: flex; gap: 14px; margin-top: 13px; }
.tool-link { flex: 1; display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 650; }
.tool-icon { display: grid; place-items: center; border-radius: 7px; background: #303825; color: var(--lime); width: 43px; height: 43px; flex: none; }
.tool-link small { display: block; margin-top: 2px; color: var(--muted); font-size: .83rem; font-weight: 400; }
.reading { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-top: 1px solid var(--line); padding: 30px 0 44px; }
.reading p, .article p { margin: 12px 0 18px; color: var(--muted); line-height: 1.7; }
.reading h3 { font-size: 1rem; }
details { border-bottom: 1px solid var(--line); }
summary { padding: 15px 24px 15px 0; list-style: none; position: relative; font-weight: 550; }
summary::-webkit-details-marker { display:none; }
summary::after { content: "+"; position: absolute; right: 4px; color: var(--lime); }
details[open] summary::after { content: "−"; }
details p { margin-top: 0 !important; }
.article { padding: 24px; max-width: 820px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
footer { border-top: 1px solid var(--line); background: #151719; }
.foot { padding-block: 20px; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.foot > div, .foot nav { display: flex; align-items: center; gap: 20px; }
.foot .brand { font-size: 1.4rem; }
.foot .mark { width: 29px; }
.foot div > span, .foot nav { color: var(--muted); font-size: .84rem; }
.foot nav a { padding: 12px 0; }
.rm-output { margin: 18px; background: #20281e; border: 1px solid #404a38; padding: 20px; border-radius: 8px; color: var(--lime); }
.rm-output p { margin-top: 8px; color: #b7c2b4; }
.tables { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; padding: 0 18px 18px; }
.tables h3 { font-size: 1rem; margin: 4px 0 10px; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; width: 100%; }
th, td { padding: 7px; text-align: right; font-size: .89rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #24282a; font-weight: 500; }
th:first-child, td:first-child { text-align: left; }
#warmsets { padding: 6px 20px; }
.warmrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.warmrow:last-child { border-bottom: 0; }
.warmrow strong, .warmrow b { display: block; }
.warmrow b { color: var(--lime); text-align: right; }
.warmrow small { color: var(--muted); }
.skip, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { width: auto; height: auto; clip-path: none; background: var(--lime); color: black; padding: 10px; z-index: 5; }
[hidden] { display: none !important; }
@media (min-width: 801px) {
  body[data-page="plate"] .workspace { align-items: stretch; }
  body[data-page="plate"] .result { display: flex; flex-direction: column; }
  .drawing { flex: 1; min-height: 245px; }
}
@media (max-width: 1000px) {
  .topbar { gap: 28px; }
  .topbar nav { gap: 15px; }
  .workspace { grid-template-columns: minmax(290px,.88fr) minmax(0,1.45fr); gap: 14px; }
}
@media (max-width: 800px) {
  .topbar { display: grid; grid-template-columns: 1fr auto; gap: 0; padding-top: 9px; }
  .topbar nav { grid-row: 2; grid-column: 1/-1; justify-content: space-between; gap: 5px; margin-top: 4px; }
  .topbar nav a { min-height: 43px; }
  .lang { grid-row: 1; grid-column: 2; }
  .workspace { grid-template-columns: 1fr; }
  .drawing { height: clamp(240px,46vw,310px); }
  .reading { gap: 20px; }
  .controls { gap: 14px; }
  .switch button, .plate-toggle { min-height: 44px; }
  .lang a { min-width: 44px; }
}
@media (max-width: 550px) {
  .container, .topbar { width: calc(100% - 28px); }
  .topbar nav a { font-size: .76rem; gap: 4px; }
  .topbar nav .icon { width: 14px; }
  .topbar .brand { font-size: 1.6rem; }
  .topbar .mark { width: 32px; }
  .ad { height: 50px; margin-top: 16px; }
  h1 { font-size: clamp(1.95rem,7.6vw,2.6rem); }
  .intro { padding: 22px 0 18px; }
  .intro p { font-size: .92rem; }
  .panel-head { padding: 14px 16px; min-height: 50px; }
  .controls, .breakdown { padding: 14px 16px 16px; }
  .drawing { height: 224px; margin: 10px 10px 0; }
  .mass { left: 13px; top: 10px; }
  .mass strong { font-size: 2.35rem; }
  .related > div, .foot { flex-direction: column; align-items: stretch; }
  .reading { grid-template-columns: 1fr; gap: 18px; }
  .foot { gap: 6px; }
  .tables { gap: 12px; padding-inline: 12px; }
  .tables h3 { font-size: .9rem; }
}
@media (max-width: 370px) { .topbar nav .icon { display: none; } }
html[lang="ko"] { word-break: keep-all; overflow-wrap: anywhere; }
html[lang="ko"] h1 { font-style: normal; letter-spacing: -.055em; }

.topbar { min-width: 0; }
.topbar nav { min-width: 0; max-width: 100%; overflow-x: auto; gap: 20px; justify-content: flex-start; }
.topbar nav a { flex: none; min-height: 44px; }
.foot { flex-wrap: wrap; }
.foot nav { flex-wrap: wrap; column-gap: 18px; row-gap: 2px; }
.training-number { display: block; width: 100%; background: #121517; border: 1px solid var(--line); border-radius: 6px; min-height: 46px; padding: 8px 12px; margin-top: 5px; }
#training-output { padding: 16px; min-width: 0; }
#training-output .rm-output { margin: 0 0 16px; }
#training-output h3 { margin-bottom: 12px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.table-scroll th { white-space: nowrap; }
