

body.board main { padding: 0; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }

.sheets { display: flex; align-items: stretch; gap: 8px; height: 48px; min-width: 0;
  padding: 0 10px 0 26px; border-bottom: 1px solid var(--line); }
.sheets-host { min-width: 0; }

.gone { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px 0 26px;
  background: var(--panel); border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--s-rejected); font-size: 12.5px; }
.gone .gt { font-weight: 700; color: var(--ink); }
.gone .gd { color: var(--muted); }
.gone .gb { flex: 0 0 auto; margin-left: auto; border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel-solid); color: var(--accent-ink); font: inherit; font-size: 12px;
  padding: 4px 10px; cursor: pointer; }
.gone .gb:hover { border-color: var(--accent); }

.sheet-list { display: flex; align-items: stretch; gap: 2px; min-width: 0; overflow-x: auto;
  scrollbar-width: none; }
.sheet-list::-webkit-scrollbar { display: none; }

.sheet { flex: 0 0 auto; max-width: 220px; min-width: 56px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted); font: inherit; font-size: 12.5px;
  padding: 3px 10px 0; cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 1px;
  transition: color var(--t-fast), border-color var(--t-fast); }
.sheet-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: left; line-height: 24px; }

.sheet-who { display: flex; align-items: center; gap: 2px; height: 16px; min-width: 0; overflow: hidden; }

.swav { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pc, var(--accent));
  color: var(--on-status); font-size: 8px; font-weight: 600; letter-spacing: -.04em;
  overflow: hidden; }

.swav.more { width: auto; min-width: 14px; padding: 0 3px; border-radius: 7px;
  background: var(--ground); color: var(--muted); box-shadow: 0 0 0 1px var(--line2); }
.sheet:hover { color: var(--ink); }

.sheet.on { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 600; }

.sheet-list.reordering { user-select: none; cursor: grabbing; }
.sheet.dragging { background: var(--panel-solid); color: var(--ink);
  box-shadow: var(--shadow-lift); border-radius: 6px 6px 0 0; opacity: .92; }

.sheet-name { flex: 0 0 auto; width: 150px; align-self: flex-end; margin-bottom: 3px; height: 24px;
  border: 1px solid var(--hdr-focus); border-radius: 4px; background: var(--panel-solid);
  color: var(--ink); font: inherit; font-size: 12.5px; padding: 0 6px; }

.sheet-add { flex: 0 0 auto; align-self: flex-end; margin-bottom: 3px; width: 24px; height: 24px; margin-left: 2px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 4px; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.sheet-add:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }

.ctxmenu { position: fixed; z-index: 70; min-width: 140px; padding: 4px;
  background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 6px;
  box-shadow: var(--shadow-lift); font-size: 12.5px; }

.ctxmenu .ctxh { padding: 4px 8px 6px; color: var(--muted); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctxmenu .ctxi { display: block; width: 100%; text-align: left; border: 0; border-radius: 4px;
  background: transparent; color: var(--ink); font: inherit; font-size: 12.5px;
  padding: 6px 8px; cursor: pointer; }
.ctxmenu .ctxi:hover:not([disabled]) { background: var(--accent-soft); color: var(--accent-ink); }
.ctxmenu .ctxi.danger:hover:not([disabled]) { background: var(--s-rejected); color: var(--on-status); }

.ctxmenu .ctxi[disabled] { color: var(--muted); opacity: .55; cursor: default; }

@media (hover: none) { .sheet { padding: 0 12px; } .sheet-add { width: 30px; height: 30px; }
  .ctxmenu .ctxi { padding: 10px 10px; } }

@media (max-width: 760px) { .sheets { padding-left: 34px; } }

.seg-wrap { position: relative; height: 100%; }

.stage-wrap { position: absolute; inset: 0; padding: 34px 10px 10px 26px; }
.rect-wrap { position: relative; height: 100%; overflow: auto; }
.rect-zoom { position: relative; }

.rect { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: grid; gap: 7px; }

.cutbar { position: absolute; z-index: 3; cursor: crosshair; }
.cutbar.cols { left: 26px; right: 10px; top: 8px; height: 26px; }
.cutbar.rows { top: 34px; bottom: 10px; left: 0; width: 26px; }

.cutbar.no { cursor: not-allowed; }
.cutbar::after { content: ""; position: absolute; border-radius: 999px; background: var(--line2);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease), opacity var(--t); }

.cutbar.cols::after { left: var(--from, 0); right: 0; bottom: 4px; height: 3px; transform: scaleY(.55); }
.cutbar.rows::after { top: var(--from, 0); bottom: 0; right: 4px; width: 3px; transform: scaleX(.55); }
.cutbar.cols:hover::after { transform: none; background: linear-gradient(90deg, var(--accent), var(--pop2), var(--pop)); }
.cutbar.rows:hover::after { transform: none; background: linear-gradient(180deg, var(--accent), var(--pop2), var(--pop)); }
.cutbar.no:hover::after { background: var(--line2); transform: none; }

.cuttag { position: absolute; z-index: 5; pointer-events: none; opacity: 0;
  font-family: var(--mono); font-size: 10px; line-height: 1; white-space: nowrap;
  padding: 3px 5px; border-radius: 4px; background: var(--accent); color: var(--on-accent);
  transition: opacity var(--t-fast); }
.cutbar.cols .cuttag { top: 3px; transform: translateX(-50%); }
.cutbar.rows .cuttag { left: 2px; transform: translateY(-50%); }
.cutbar.on .cuttag { opacity: 1; }
.cutline { position: absolute; z-index: 4; pointer-events: none; opacity: 0; transition: opacity var(--t-fast); }
.cutline.on { opacity: 1; animation: cutpulse 1.5s var(--ease) infinite; }
.cutline.v { top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: linear-gradient(to bottom, transparent, var(--accent-line) 12%, var(--pop) 88%, transparent);
  box-shadow: 0 0 12px 1px rgba(107, 140, 245, .5); }
.cutline.h { left: 0; right: 0; height: 2px; margin-top: -1px;
  background: linear-gradient(to right, transparent, var(--accent-line) 12%, var(--pop) 88%, transparent);
  box-shadow: 0 0 12px 1px rgba(107, 140, 245, .5); }

body[data-write="no"] .cutbar { display: none; }

.lhdr { position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; padding: 6px 6px;
  background: var(--hdr); border: 1px solid var(--hdr-line); border-radius: 6px; overflow: hidden; }
.lhdr:hover { box-shadow: var(--shadow-card); }

.cutzone { position: absolute; z-index: 2; cursor: crosshair; }
.cutzone.col { left: 0; right: 0; bottom: 0; height: 10px; }
.cutzone.row { top: 0; bottom: 0; right: 0; width: 10px; }
.cutzone::after { content: ""; position: absolute; border-radius: 999px; background: transparent;
  transition: background var(--t) var(--ease); }
.cutzone.col::after { left: 4px; right: 4px; bottom: 2px; height: 3px; }
.cutzone.row::after { top: 4px; bottom: 4px; right: 2px; width: 3px; }
.cutzone.col:hover::after { background: linear-gradient(90deg, var(--accent), var(--pop2), var(--pop)); }
.cutzone.row:hover::after { background: linear-gradient(180deg, var(--accent), var(--pop2), var(--pop)); }
@media (hover: none) { .cutzone.col { height: 16px; } .cutzone.row { width: 16px; } }

.lhdr.group { background: transparent; border-color: transparent; border-radius: 0; }
.lhdr.group:hover { box-shadow: none; }
.lhdr.col.group { border-bottom: 1px solid var(--hdr-line); padding: 2px 6px 5px; }
.lhdr.row.group { border-right: 1px solid var(--hdr-line); padding: 6px 5px 6px 2px; }

.lhdr.group .lname { font-size: 11.5px; font-weight: 600; color: var(--hdr-soft); }

.lhdr.group .lname:hover { background: transparent; border-color: var(--hdr-line); }

.lhdr.corner { background: transparent; border-color: transparent; }

.lhdr.row { writing-mode: vertical-rl; text-orientation: mixed; flex-direction: row; padding: 6px 2px; }

.lhdr.row.clip { justify-content: flex-start; }

.lhdr.row .lname { writing-mode: vertical-rl; text-orientation: mixed;
  
  flex: 0 0 auto;
  
  white-space: nowrap;
  
  padding: 3px 1px; }

.lname { flex: 0 1 auto; min-width: 0; text-align: center; background: transparent; color: var(--hdr-ink);
  border: 1px solid transparent; border-radius: 4px; padding: 2px 4px; font: inherit; font-weight: 600;
  font-size: 12.5px; line-height: 1.35; resize: none; overflow: hidden; }
.lname::placeholder { color: var(--hdr-soft); font-weight: 400; }
.lname:hover { border-color: rgba(34, 66, 184, .28); background: rgba(255, 255, 255, .45); }
.lname:focus { outline: none; border-color: var(--hdr-focus); background: var(--panel-solid);
  box-shadow: 0 0 0 3px var(--hdr-ring); }
.lname.saved { animation: savedflash var(--t-slow) var(--ease); }

.lprobe { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none;
  writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap;
  font: inherit; font-weight: 600; font-size: 12.5px; line-height: 1.35; padding: 2px 4px; }
@media (hover: none) { .lprobe { font-size: 16px; } }

.lhdr.row .lpct { writing-mode: horizontal-tb; font-size: 10.5px; letter-spacing: -.03em; }

.lpct { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--hdr-ink); opacity: .72; padding: 0; background: transparent; white-space: nowrap; }

.lhdr.group .lpct { opacity: .6; }

.lhdr.col .lname { flex: 0 1 auto; width: 100%; }

.lhdr.col.vtitle .lname { writing-mode: vertical-rl; text-orientation: mixed;
  white-space: nowrap; width: auto; flex: 0 0 auto; }

.lgrip { position: absolute; z-index: 3; touch-action: none; }
.lhdr.col .lgrip { top: 0; bottom: 0; right: 0; width: 9px; cursor: col-resize; }
.lhdr.row .lgrip { left: 0; right: 0; bottom: 0; height: 9px; cursor: row-resize; }
.lgrip::after { content: ''; position: absolute; background: var(--accent); opacity: 0; border-radius: 2px; }
.lhdr.col .lgrip::after { top: 2px; bottom: 2px; left: 3px; width: 3px; }
.lhdr.row .lgrip::after { left: 2px; right: 2px; top: 3px; height: 3px; }
.lgrip:hover::after { opacity: .85; }
.rect.resizing-col, .rect.resizing-col * { cursor: col-resize !important; }
.rect.resizing-row, .rect.resizing-row * { cursor: row-resize !important; }

.rect.resizing-col .lname, .rect.resizing-row .lname { pointer-events: none; }

body[data-write="no"] .lgrip { display: none; }

.lhdr.justcut { animation: justcut 900ms var(--ease); }

.cell { position: relative; background: var(--cell); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 13px 15px; cursor: pointer; overflow: hidden;
  display: grid; grid-template-rows: auto auto auto;
  align-content: center; justify-items: center; text-align: center; gap: 4px;
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
  animation: cellin var(--t-slow) var(--ease) backwards; animation-delay: calc(var(--i, 0) * 13ms); }
.cell:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lift); z-index: 1; }

.cell .cn, .cell .csub, .cell .cnum { transition: opacity var(--t) var(--ease); }
.cell:hover .cn, .cell:hover .csub, .cell:hover .cnum { opacity: .22; }
.cell.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 86, 224, .16), var(--shadow-lift); }

.cell.seen { border-color: var(--sc); }
.cell.seen.on { border-color: var(--accent); }
.cell.target::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--accent), var(--pop)); }

.cell .cn { display: inline-flex; align-items: baseline; gap: 6px; align-self: center; justify-self: center;
  font-family: var(--mono); font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--muted);
  font-variant-numeric: tabular-nums; padding: 2px 10px 2px 2px; border-radius: 999px;
  white-space: nowrap; max-width: 100%; overflow: hidden; }
.cell .cn span { font-family: var(--font); font-size: 11px; font-weight: 400; color: var(--muted); }

.cell .cnum { font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; }
.cell .cn.has { background: var(--pill); color: var(--accent-ink); padding-left: 10px; }
.cell .cn.has span { color: var(--accent-ink); opacity: .8; }
.cell .cn.bump { animation: bump 400ms var(--ease); }

.cell .csub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%; }
.cell.empty-all { display: grid; place-items: center; text-align: center; padding: 22px; }
.cell.empty-all .cn { font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--muted);
  display: block; background: none; padding: 0; }

.cell .plus { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; border-radius: 50%;
  transform: translate(-50%, -50%) scale(.82);
  border: 0; background: linear-gradient(140deg, var(--accent), var(--pop)); color: var(--on-accent);
  font-size: 21px; line-height: 1; cursor: pointer; opacity: 0;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), filter var(--t);
  box-shadow: 0 6px 20px rgba(47, 86, 224, .38); z-index: 2; }
.cell:hover .plus { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cell .plus:hover { transform: translate(-50%, -50%) scale(1.09); filter: brightness(1.08); }
.cell .plus:active { transform: translate(-50%, -50%) scale(.95); }

.segpane {
  --fs-body: 15.5px;    
  --fs-sub: 14.5px;     
  --fs-label: 13px;     
  --fs-tag: 12.5px;     
}

.segpane { position: absolute; top: 0; right: 0; bottom: 0; width: 40%; min-width: 400px; max-width: 720px; z-index: 20;
  background: var(--panel); backdrop-filter: blur(22px) saturate(1.15);
  border-left: 1px solid var(--line2); box-shadow: var(--shadow-lift);
  display: flex; overflow: hidden; transform: translateX(101%); transition: transform .22s ease-out; }
.panebody { flex: 1 1 auto; min-width: 0; overflow-y: auto; }

.ears { flex: 0 0 38px; display: flex; flex-direction: column; align-items: stretch; gap: 3px;
  padding: var(--phh, 78px) 0 12px 3px; overflow-y: auto; scrollbar-width: none;
  border-right: 1px solid var(--line); }
.ears::-webkit-scrollbar { display: none; }

.ear { flex: 0 0 auto; height: 32px; border: 1px solid var(--line2); border-right: 0;
  border-radius: 5px 0 0 5px; background: transparent; color: var(--muted);
  font: inherit; font-size: var(--fs-label); font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.ear:hover { color: var(--ink); border-color: var(--accent-line); }

.ear.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink);
  font-weight: 700; margin-right: -1px; }

.ear.add { color: var(--accent-ink); background: transparent; }

.ear.pick { box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); }

.tabbox { margin: 10px 0 0; }
.tabs { display: flex; align-items: flex-end; gap: 2px; }
.tab { flex: 0 1 auto; min-width: 0; height: 30px; padding: 0 11px;
  border: 0; border-radius: 5px 5px 0 0;
  background: transparent; color: var(--muted);
  font: inherit; font-size: var(--fs-label); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast); }
.tab:hover { color: var(--ink); background: var(--accent-soft); }
.tab.add { flex: 0 0 auto; padding: 0 9px; color: var(--accent-ink); }

.tab.on { background: var(--cell); color: var(--accent-ink); font-weight: 700; }

.tab.on:disabled { opacity: 1; cursor: default; }
.tabpanel { border: 0; border-radius: 0 6px 6px 6px; background: var(--cell); padding: 11px 12px; }

.tabpanel .card { border: 0; border-radius: 0; padding: 0; margin: 0; background: transparent; }
.tabpanel > .ofh:first-child { margin-top: 0; }
.tabpanel > .openform:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.stepbody .pickwrap { --pickrow: 30px; position: relative; }
.stepbody .pickwrap input { width: 100%; }
.stepbody .picklist { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  max-height: calc(var(--pickrow) * 7); overflow-y: auto;
  margin-top: 2px; border: 1px solid var(--line2); border-radius: 5px;
  background: var(--panel-solid); box-shadow: var(--shadow-lift); }
.stepbody .pickwrap.on .picklist { display: block; }
.stepbody .pickrow { display: block; width: 100%; height: var(--pickrow); padding: 0 9px;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink);
  font: inherit; font-size: var(--fs-sub); text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepbody .pickrow:last-child { border-bottom: 0; }
.stepbody .pickrow:hover { background: var(--accent-soft); color: var(--accent-ink); }

.tabpanel .react { margin-top: 14px; }

.tabpanel .tabbox { margin-top: 0; }
.tabpanel .tabbox > .tabpanel { background: var(--panel-solid); border: 1px solid var(--line); }
.tabpanel .tabbox > .tabs .tab.on { background: var(--panel-solid);
  border: 1px solid var(--line); border-bottom-color: var(--panel-solid); margin-bottom: -1px; }
.segpane.open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .segpane { transition: none; } }

.segpane .ph { position: sticky; top: 0; z-index: 2; padding: 12px 14px 10px;
  background: var(--panel-solid); border-bottom: 1px solid var(--line); }
.segpane .prow { display: flex; gap: 7px; align-items: center; }
.segpane .prow input { flex: 1 1 auto; min-width: 0; height: 32px; background: var(--panel-solid); color: var(--ink);
  border: 1px solid var(--line2); border-radius: 5px; padding: 0 9px; font: inherit; font-size: var(--fs-body); font-weight: 600; }

.segpane .save { flex: 0 0 auto; white-space: nowrap;
  height: 32px; padding: 0 12px; border-radius: 5px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-status); font: inherit; font-size: var(--fs-sub); cursor: pointer; }

.segpane .save.off { border-color: var(--line2); background: transparent; color: var(--muted); cursor: default; }
.segpane .save.off:hover { border-color: var(--line2); }

.segpane .paneback { display: none; width: 32px; height: 32px; border-radius: 5px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.segpane .paneback:hover { color: var(--ink); border-color: var(--accent); }
.segpane .ps { font-size: var(--fs-label); color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.segpane .ps .tgt { color: var(--accent-ink); margin-left: 8px; }
.segpane .pt { font-weight: 650; font-size: var(--fs-body); }

.segpane .paneload { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center;
  background: rgba(127, 127, 127, .16); backdrop-filter: blur(1.5px); cursor: progress; }
.segpane .paneload .spin { width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line2); border-top-color: var(--accent); animation: paneload .8s linear infinite; }
@keyframes paneload { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .segpane .paneload .spin { animation-duration: 2.4s; } }

.stepbox { border-bottom: 1px solid var(--line); }

.stepbox > summary { position: sticky; top: var(--phh, 78px); z-index: 1;
  background: var(--panel-solid);
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; font-size: var(--fs-sub); list-style: none; }

.stepbox > summary::-webkit-details-marker { display: none; }
.stepbox > summary:hover { background: var(--accent-soft); }
.stepbox > summary .no { width: 19px; height: 19px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
  font-size: var(--fs-label); font-family: var(--mono); display: grid; place-items: center; flex: 0 0 auto; }
.stepbox > summary .st { margin-left: auto; font-size: var(--fs-tag); color: var(--muted); }
.stepbox > summary .st.done { color: var(--sage); }

.stepbody { padding: 10px 14px 14px; }
.stepbody.newissue { padding-top: 12px; }
.stepbody .empty { font-size: var(--fs-sub); color: var(--muted); }

.stepbody .card { border: 0; border-radius: 6px; padding: 10px 11px; margin-bottom: 8px; background: var(--cell); }

.tabpanel > .card { padding: 0; margin: 0; background: transparent; }
.stepbody .card .issue { font-size: var(--fs-body); font-weight: 600; line-height: 1.5; }
.stepbody .card .prow { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sub); }
.stepbody .tag { font-size: var(--fs-tag); color: var(--muted); border: 1px solid var(--line2); border-radius: 10px; padding: 0 8px; }

.stepbody .who { font-size: var(--fs-tag); color: var(--muted); margin-top: 7px; text-align: right; }
.stepbody .sub { font-size: var(--fs-label); color: var(--muted); margin-top: 4px; line-height: 1.5; }

.stepbody .kv { display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 14px 12px; font-size: var(--fs-sub); margin: 0; }
.stepbody .kv dt { color: var(--muted); font-size: var(--fs-label); line-height: 1.45; }
.stepbody .kv dd { margin: 0; line-height: 1.45; }

.stepbody .kv dd:empty { min-height: 1.45em; }

.stepbody .kv dd.pre { white-space: pre-wrap; }

.stepbody .w5ai { display: grid; gap: 6px; margin: 0 0 12px; padding: 9px 10px;
  border-radius: 6px; background: var(--soon); }
.stepbody .w5ai-t { width: 100%; min-height: 62px; resize: vertical; }
.stepbody .w5ai-o { display: flex; justify-content: flex-end; }
.stepbody .w5ai-b { height: 28px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 5px;
  background: var(--panel-solid); color: var(--ink); font: inherit; font-size: var(--fs-label); cursor: pointer; }
.stepbody .w5ai-b:hover:not([disabled]) { border-color: var(--accent); color: var(--accent-ink); }
.stepbody .w5ai-b[disabled] { color: var(--muted); cursor: default; }

body[data-write="no"] .w5ai { display: none; }

.stepbody .w5moreo { display: flex; justify-content: flex-start; margin: 0 0 10px; }
.stepbody .w5more { height: 26px; padding: 0 10px; border: 1px dashed var(--line2); border-radius: 5px;
  background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-label); cursor: pointer; }
.stepbody .w5more:hover { border-style: solid; border-color: var(--accent); color: var(--accent-ink); }

.stepbody .w5ai .lead { font-size: var(--fs-label); color: var(--muted); margin: 0; line-height: 1.5; }
.stepbody .allin { border: 1px solid var(--accent-line); }
.stepbody .allin .w5ai-t { min-height: 208px; }

.stepbody .sub { font-size: var(--fs-sub); font-weight: 700; color: var(--ink);
  margin: 14px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.stepbody .sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.stepbody .w5 .lead { font-size: var(--fs-label); color: var(--muted); margin: 2px 0 9px; line-height: 1.5; }
.stepbody .f { display: grid; gap: 4px; margin-bottom: 8px; }
.stepbody .f label { font-size: var(--fs-label); color: var(--muted); }
.stepbody .fresh { display: contents; }
.stepbody input[type="text"], .stepbody input[type="date"], .stepbody textarea, .stepbody select {
  width: 100%; box-sizing: border-box; background: var(--panel-solid); color: var(--ink);
  border: 1px solid var(--line2); border-radius: 5px; padding: 6px 8px; font: inherit; font-size: var(--fs-sub); }
.stepbody textarea { resize: vertical; min-height: 52px; }
.stepbody input:focus, .stepbody textarea:focus, .stepbody select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.stepbody .ops { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 24px; margin-bottom: 4px; }
.stepbody .ops button { height: 29px; padding: 0 13px; border-radius: 5px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-status); font: inherit; font-size: var(--fs-sub); cursor: pointer; }
.stepbody .ops button.plain { border-color: var(--line2); background: transparent; color: var(--ink); }
.stepbody details > summary { font-size: var(--fs-sub); color: var(--accent-ink); cursor: pointer; margin: 8px 0; }

.stepbody .openform { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.stepbody .openform:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.stepbody .ofh { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sub);
  font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.stepbody .ofh .oft { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stepbody .ofh.noname { margin-bottom: 0; margin-top: -4px; }
.stepbody .ofops { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }

.stepbody .oficon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  line-height: 1; cursor: pointer; opacity: .8; }
.stepbody .oficon:hover { background: var(--accent-soft); border-color: var(--accent-line); opacity: 1; }

.stepbody .ops[hidden], .stepbody .oficon[hidden] { display: none; }

.stepbody .oficon svg { width: 20px; height: 20px; display: block; fill: none;
  stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.stepbody .hist { margin: 4px 0 10px; border: 1px solid var(--line2); border-radius: 6px;
  background: var(--panel-solid); overflow: hidden; }
.stepbody .histlist { max-height: 148px; overflow-y: auto; }
.stepbody .histrow { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink);
  font: inherit; font-size: var(--fs-sub); padding: 7px 10px; cursor: pointer; }
.stepbody .histrow:last-child { border-bottom: 0; }
.stepbody .histrow:hover { background: var(--accent-soft); }
.stepbody .histrow .hl { font-variant-numeric: tabular-nums; }

.stepbody .histrow .hw { margin-left: auto; color: var(--muted); font-size: var(--fs-tag); }
.stepbody .histbody:not(:empty) { padding: 10px; border-top: 1px solid var(--line2); background: var(--soon); }

.stepbody .mini { height: 23px; padding: 0 9px; border: 1px solid var(--line2); border-radius: 4px; background: transparent; color: var(--ink); font: inherit; font-size: var(--fs-label); cursor: pointer; }

.zoom { position: absolute; right: 14px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 2px;
  background: var(--panel); backdrop-filter: blur(18px) saturate(1.1); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.zoom button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--ink);
  font-size: 14px; line-height: 1; cursor: pointer; }
.zoom button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.zoom button.fit { width: auto; padding: 0 10px; border-radius: 999px; font-size: 11.5px; }
.zoom .pct { min-width: 44px; text-align: center; font-family: var(--mono); font-size: 11.5px;
  font-variant-numeric: tabular-nums; color: var(--muted); }

.pcur-layer { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; }
.pcur { position: absolute; will-change: left, top; }
.pcur svg { position: absolute; left: 0; top: 0; width: 15px; height: 15px; fill: var(--pc);
  stroke: var(--panel-solid); stroke-width: 1.1; }
.pcur .pn { position: absolute; left: 13px; top: 13px; padding: 2px 7px; border-radius: 999px;
  background: var(--pc); color: var(--on-status); font-size: 11px; line-height: 1.5; white-space: nowrap; }

.rect.noanim .cell { animation: none; }

.scrim { position: absolute; inset: 0; z-index: 10; display: none; background: rgba(16, 38, 66, .16);
  backdrop-filter: blur(.5px); cursor: pointer; }
.scrim.on { display: block; animation: scrimin var(--t) var(--ease); }

@keyframes bump { 0% { transform: none; } 35% { transform: translateY(-3px) scale(1.06); } 100% { transform: none; } }
@keyframes scrimin { from { opacity: 0; } to { opacity: 1; } }
@keyframes cellin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cutpulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes savedflash { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .95); } 40% { box-shadow: 0 0 0 5px rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes justcut { 0% { filter: brightness(1.7); } 100% { filter: none; } }
@keyframes popin { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.pav { animation: popin var(--t) var(--ease) backwards; }
@media (prefers-reduced-motion: reduce) {
  .cell, .pav, .lhdr.justcut, .lname.saved, .cutline.on, .cell .cn.bump, .scrim.on { animation: none; }
  
  .zoom { transition: none; }
}

.scrim { position: absolute; inset: 0; z-index: 10; display: none; background: rgba(11, 16, 32, .14);
  backdrop-filter: blur(1px); cursor: pointer; }
.scrim.on { display: block; animation: scrimin var(--t) var(--ease); }

.rect.noanim .cell { animation: none; }

@keyframes cellin { from { opacity: 0; transform: translateY(7px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: none; } 35% { transform: translateY(-3px) scale(1.06); } 100% { transform: none; } }
@keyframes cutpulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.4); } }
@keyframes savedflash { 0% { box-shadow: 0 0 0 0 rgba(47, 86, 224, .8); } 40% { box-shadow: 0 0 0 6px rgba(47, 86, 224, .18); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes justcut { 0% { box-shadow: 0 0 0 3px rgba(123, 92, 240, .5); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes popin { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
@keyframes scrimin { from { opacity: 0; } to { opacity: 1; } }
.pav { animation: popin var(--t) var(--ease) backwards; }
@media (prefers-reduced-motion: reduce) {
  .cell, .pav, .lhdr.justcut, .lname.saved, .cutline.on, .cell .cn.bump, .scrim.on { animation: none; }
  
  .zoom { transition: none; }
}

@media (hover: none) {
  
  .lname { font-size: 16px; }
  
  .stage-wrap { padding: 42px 10px 10px 34px; }
  .cutbar.cols { left: 34px; top: 8px; height: 34px; }
  .cutbar.rows { top: 42px; width: 34px; }
  
  
  .cell .plus { display: none; }
  
  .cell .cn, .cell .csub, .cell .cnum { opacity: 1 !important; }
  
  .rect-wrap { touch-action: pan-x pan-y; }
  
  
  .lhdr.col .lgrip { right: 0; width: 20px; }
  .lhdr.row .lgrip { bottom: 0; height: 20px; }
  .lgrip::after { opacity: .5; }
  .zoom button { width: 40px; height: 40px; }
  
  .zoom { opacity: 0; pointer-events: none; transition: opacity .28s var(--ease); }
  .zoom.awake { opacity: 1; pointer-events: auto; }
  .stepbody .ops button { height: 40px; padding: 0 16px; }
  .stepbody .mini { height: 34px; padding: 0 12px; font-size: var(--fs-sub); }
  .stepbody details > summary { padding: 6px 0; }
  .lname { min-height: 32px; }
}

@media (max-width: 1024px) {
  .segpane { width: 58%; min-width: 340px; }
}

@media (max-width: 760px) {
  
  .zoom { display: none; }

  
  .segpane { width: 100%; min-width: 0; max-width: none; border-left: 0; }
  
  .segpane .paneback { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  
  .segpane .save { width: 32px; padding: 0; font-size: 16px; }
  .segpane .ph { padding: 10px 12px 9px; }
  .stepbody { padding: 0 12px 12px; }
  
  .stepbody .kv { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .stepbody .kv dt { margin-top: 7px; }
  .stepbody .kv dt:first-of-type { margin-top: 0; }
  
  .stepbody textarea { min-height: 64px; }
  
  .zoom { right: 10px; bottom: 18px; }
  .lhdr { padding: 3px 4px; }

}

.stepbody .ops.left { justify-content: flex-start; margin-top: 8px; }
