:root {
  /* ShopRef "Blue & Grey" theme */
  --bg: #1A2027; --card: #252D36; --ink: #F0F3F6; --mute: #9AA7B4; --line: #364250; --page: #12171C;
  --acc: #4DA3FF; --acc-ink: #0B1420; --warn: #FFB078; --ok: #7BD88F; --field: #1A2027; --r: 10px;
  --display: 'Arial Narrow', 'Roboto Condensed', 'Helvetica Neue', sans-serif-condensed, system-ui, sans-serif;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { font-feature-settings: "calt" 0; margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.4; }
a { color: var(--acc); }
h2 { font-size: 20px; margin: 24px 0 12px; }
h3 { margin: 0 0 10px; font-size: 17px; }
h2, h3, .pname { font-family: var(--display); }
h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--page); color: var(--ink); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .01em; }
.logo b { color: var(--acc); }
.tag { color: var(--mute); font-size: 13px; }
.back { color: var(--ink); text-decoration: none; font-size: 20px; margin-right: 4px; }
.acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 8px 20px 48px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--acc); background: var(--acc); color: var(--acc-ink);
  border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: inherit; border-color: var(--line); font-weight: 500; }
.top .btn.ghost { border-color: var(--line); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { color: #FF7A72; }
.btn.wide { width: 100%; justify-content: center; margin: 14px 0; padding: 12px; border-style: dashed; }
.saved { color: var(--ok); font-size: 13px; opacity: 0; transition: opacity .3s; }
.saved.on { opacity: 1; }
.in { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: var(--field); color: inherit; }
.in:focus { outline: 2px solid color-mix(in srgb, var(--acc) 45%, transparent); border-color: var(--acc); }
.in:disabled { background: #20272F; color: #5E6A76; }
.in.big { font-size: 18px; font-weight: 600; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); margin-bottom: 10px; }
.f .in { color: var(--ink); font-size: 15px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 10px; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row.end { justify-content: flex-end; }
.hint { color: var(--mute); font-size: 12.5px; margin: 6px 0 0; }
.fine { color: var(--mute); font-size: 13px; margin-top: 28px; }
.proj { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 16px 4px; margin: 16px 0; }
.grow { flex: 1 1 280px; }
.mat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin: 14px 0; overflow: hidden; }
.mhead { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #2B343E; }
.mnum { width: 28px; height: 28px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.mname { font-weight: 600; font-size: 16px; }
.mbody { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 0; }
.col { padding: 14px; }
.col.settings { border-right: 1px solid var(--line); }
.t { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.t th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 600; padding: 4px 4px; }
.t td { padding: 2px 4px; }
.t .num { color: var(--mute); font-size: 12px; width: 26px; text-align: right; }
.t .c { text-align: center; width: 56px; }
.partt td:nth-child(2) { width: 34%; } .partt td:nth-child(3) { width: 14%; }
.x { border: 0; background: none; color: var(--mute); font-size: 20px; cursor: pointer; line-height: 1; padding: 2px 6px; }
.x:hover { color: #FF7A72; }
body.nolabels .lblcol { display: none; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.pname { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.pmeta { color: var(--mute); font-size: 13px; margin: 4px 0 10px; }
.pacts { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 40px 20px; margin-top: 24px; }
.empty p { max-width: 560px; margin: 0 auto 18px; color: var(--mute); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 14px 0; }
.card.warn { border-color: #7A4A2C; background: #33281F; }
.card.warn ul { margin: 0; padding-left: 20px; }
.reshead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.reshead h2 { margin: 0; }
.pill { background: var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 4px; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 12px; color: var(--mute); font-weight: 600; }
.stats span { font-size: 18px; font-weight: 700; }
.warnline { color: var(--warn); font-size: 14px; }
.lay { margin-top: 14px; }
.lh { display: flex; gap: 12px; align-items: baseline; margin-bottom: 4px; }
.lh span { color: var(--mute); font-size: 13px; }
.bar { position: relative; width: 100%; height: 46px; }
.bar .stock { position: absolute; left: 0; top: 0; bottom: 0; border: 1px solid #C9D3DD; border-radius: 2px; pointer-events: none; z-index: 2; }
.bar .bx { position: absolute; top: 1px; bottom: 1px; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; white-space: nowrap; line-height: 1.15; }
.bar .pc { border: 1px solid #7896aa; }
.bar .trim { background: #e6e6e6; border: 1px solid #a0a0a0; }
.bar .drop { background: #1A2027; border: 1px dashed #9AA7B4; }
.bar .bl { font: 700 13px system-ui, sans-serif; color: #191919; max-width: 100%; overflow: hidden; text-overflow: clip; }
.bar .bs { font: 11px system-ui, sans-serif; color: #505050; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
@media (max-width: 600px) { .bar { height: 40px; } .bar .bl { font-size: 11px; } .bar .bs { font-size: 9.5px; } }
.li { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--mute); margin-top: 4px; }
dialog { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 20px; width: min(640px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(5,8,12,.65); }
dialog textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; background: var(--field); color: var(--ink); }
.msg { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: #2B343E; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; display: flex; gap: 16px; align-items: flex-start; max-width: min(640px, 92vw); transition: transform .25s; z-index: 20;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 14px; }
.msg.on { transform: translate(-50%, 0); }
.msg .btn.ghost { border-color: var(--line); color: var(--ink); }
@media (max-width: 820px) {
  .mbody { grid-template-columns: 1fr; }
  .col.settings { border-right: 0; border-bottom: 1px solid var(--line); }
}
.foot { text-align: center; color: var(--mute); font-size: 13px; padding: 18px 20px 28px; border-top: 1px solid var(--line); }
.lock { vertical-align: -2px; margin-left: 2px; color: var(--acc); }
.plan { background: transparent; border: 1px solid var(--line); color: var(--mute); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.plan.pro { color: var(--acc); border-color: var(--acc); cursor: default; }
.prolist { margin: 8px 0; padding-left: 20px; }
.doc { max-width: 900px; }
.doc h1 { font-family: var(--display); font-size: 34px; line-height: 1.1; margin: 28px 0 8px; }
.doc .lead { font-size: 17px; color: var(--mute); max-width: 70ch; }
.doc h2 { margin-top: 36px; }
.doc h3 { margin-top: 22px; font-size: 17px; }
.doc p, .doc li { max-width: 75ch; }
.doc li { margin: 6px 0; }
.doc code { background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 14px; white-space: nowrap; }
.scroll { overflow-x: auto; }
.gt { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
.gt th { text-align: left; background: #2B343E; color: var(--ink); padding: 8px 10px; font-size: 13px; white-space: nowrap; }
.gt td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.gt td:last-child { white-space: nowrap; }
.gt.sheet td { font-family: ui-monospace, Consolas, monospace; font-size: 13px; white-space: nowrap; }
.shot { margin: 18px 0 8px; } .shot img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: block; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.seg button { background: transparent; color: var(--mute); border: 0; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--acc); color: var(--acc-ink); }
svg.sheet { display: block; max-width: 100%; height: auto; margin: 4px 0; }
svg.sheet .sh { fill: #3A4654; stroke: #C9D3DD; stroke-width: .3; }
svg.sheet .trimline { fill: none; stroke: #9AA7B4; stroke-width: .15; stroke-dasharray: .8 .6; }
svg.sheet .keep { fill: #2E4A38; stroke: #7BD88F; stroke-width: .2; stroke-dasharray: 1 .6; }
svg.sheet .waste { fill: #2B343E; }
svg.sheet .pt { stroke: #5A7A90; stroke-width: .2; }
svg.sheet .pd { fill: #191919; text-anchor: middle; font-weight: 700; font-family: system-ui, sans-serif; }
svg.sheet .pl { fill: #505050; text-anchor: middle; font-family: system-ui, sans-serif; }
svg.sheet .cut { stroke: #FF7A72; stroke-width: .25; }
svg.sheet .cn { fill: #FF7A72; }
svg.sheet .cnt { fill: #fff; text-anchor: middle; font-weight: 700; font-family: system-ui, sans-serif; }
.partt.k-sheet td:nth-child(2), .partt.k-sheet td:nth-child(3) { width: 18%; } .partt.k-sheet td:nth-child(4) { width: 11%; }

/* sign in */
.in.code { letter-spacing: .3em; font-size: 22px; text-align: center; max-width: 220px; }
#signbox .f, #acctdlg .f { display: block; margin: 10px 0; }
#signbox .warnline:empty { display: none; }
#acctbtn { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-size: 17px; margin: 6px 0 2px; } .price b { color: var(--acc); }
