:root {
  color-scheme: light;
  --ink: #182d32;
  --muted: #586d70;
  --line: #dce5e2;
  --teal: #12695c;
  --green: #c2ed96;
  --dark: #102f35;
  --paper: #f4f7f4;
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: var(--teal);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  border: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
/* One focus ring for every screen (design system v4). Tokens live in system.css. */
:focus-visible {
  outline: 2px solid var(--k-brand);
  outline-offset: 2px;
}
.icon {
  flex: none;
  vertical-align: middle;
}
.skip {
  position: fixed;
  top: -90px;
  left: 8px;
  background: white;
  padding: 10px;
  z-index: 40;
}
.skip:focus {
  top: 6px;
}
.initial {
  margin: 10vh auto;
  text-align: center;
}
/* Shell (design system v4 · Shell-A): fixed sidebar of --k-side-w, top row, body that fills the rest. */
.shell {
  display: flex;
  min-height: 100dvh;
}
#side {
  width: var(--k-side-w);
  flex: none;
  background: var(--k-dark);
  color: var(--k-dark-text);
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
#side :focus-visible {
  outline-color: var(--k-lime);
}
.brand {
  flex: none;
  display: flex;
  gap: 10px;
  align-items: center;
  height: 64px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: #fff;
}
.brand img {
  width: 30px;
  height: 30px;
  flex: none;
}
.brand small,
.side-foot small {
  display: block;
}
.brand small {
  margin-top: 3px;
  font: 600 9px/1 var(--k-mono);
  letter-spacing: 0.22em;
  color: var(--k-dark-muted);
}
.nav-label {
  font-size: 11px;
  font-weight: 650;
  color: var(--k-dark-muted);
  padding: 0 10px;
  margin: 16px 0 4px;
}
/* Only the menu scrolls, with no scrollbar; when it overflows, its last 24px fade to say there is more
   (the bottom padding keeps the last entry clear of the fade once scrolled to the end). */
#side nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 26px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
}
#side nav::-webkit-scrollbar {
  display: none;
}
#side nav .nav-label:first-child {
  margin-top: 4px;
}
#side nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  margin: 2px 0;
  border-radius: var(--k-r);
  color: var(--k-dark-text);
  font-size: 14px;
}
#side nav a:hover {
  background: var(--k-dark-2);
  color: #fff;
}
#side nav a[aria-current] {
  background: var(--k-lime);
  color: var(--k-lime-ink);
  font-weight: 700;
}
#side nav a > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A subgroup inside a group (플랫폼팀 › 고객분석): its head line is not a link, the rows under it are indented
   and carry no icon. It never folds. */
#side .nav-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  margin-top: 2px;
  color: var(--k-dark-text);
  font-size: 13px;
  font-weight: 650;
}
#side .nav-sub > svg {
  flex: none;
}
#side .nav-subitems {
  margin: 0 0 4px 18px;
  padding-left: 10px;
  border-left: 1px solid var(--k-dark-line);
}
#side nav .nav-subitems a {
  height: 32px;
  font-size: 13px;
}
/* System menu (시스템 관제 · 설정): fixed under the team menu and right above the account area, one step lighter.
   It never takes more than about half the height, and it does not fade. */
#side .side-system {
  flex: none;
  max-height: 52vh;
  padding: 2px 12px 8px;
  border-top: 1px solid var(--k-dark-line);
  -webkit-mask-image: none;
  mask-image: none;
}
#side .side-system a {
  height: 34px;
  font-size: 13px;
}
/* The two folded groups: 실험실 at the end of the team menu, 시스템 관제 at the head of the system menu.
   Each opens on entry to one of its screens. */
#sidebar-lab {
  margin: 12px 0 0;
  padding-top: 4px;
  border-top: 1px solid var(--k-dark-line);
}
#sidebar-lab summary,
#sidebar-system summary {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--k-r);
  cursor: pointer;
  list-style: none;
  color: var(--k-dark-muted);
  font-size: 12px;
  font-weight: 650;
}
#sidebar-system summary {
  height: 38px;
  color: var(--k-dark-text);
}
#sidebar-system summary > svg {
  flex: none;
}
#sidebar-lab summary::-webkit-details-marker,
#sidebar-system summary::-webkit-details-marker {
  display: none;
}
/* Fold mark. 실험실 keeps its small corner; 시스템 관제 carries a 14px chevron at the end of its line that turns over
   when the group is open. */
#sidebar-lab summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 3px 3px auto;
  border: solid currentColor;
  border-width: 0 1.65px 1.65px 0;
  transform: rotate(45deg);
}
#sidebar-lab[open] summary::after {
  margin-bottom: -3px;
  transform: rotate(-135deg);
}
#sidebar-system summary > svg:last-child {
  width: 14px;
  height: 14px;
  margin-left: auto;
}
#sidebar-system[open] summary > svg:last-child {
  transform: rotate(180deg);
}
#sidebar-lab summary:hover,
#sidebar-system summary:hover { color: #fff; }
#sidebar-lab summary:focus-visible,
#sidebar-system summary:focus-visible {
  outline-offset: -2px;
}
.section-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.section-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.section-links a:hover,
.section-links a[aria-current] {
  color: var(--teal);
}
.section-links a[aria-current] {
  border-color: currentColor;
}
.section-links a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}
/* Account area: the last row of the sidebar, no gap under it (the floating buttons sit over the body). */
.side-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--k-dark-line);
}
.env i,
.badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex: none;
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100dvh;
  flex: 1;
}
.top {
  flex: none;
  height: var(--k-top-h);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 var(--k-gutter);
  background: var(--k-surface);
  border-bottom: 1px solid var(--k-line);
}
/* The path never drops a piece: when the row is short it scrolls sideways inside itself (no scrollbar). */
.crumb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 13px;
  color: var(--k-muted);
  white-space: nowrap;
}
.crumb::-webkit-scrollbar {
  display: none;
}
.crumb strong {
  color: var(--k-ink);
  font-weight: 650;
}
.crumb i {
  font-style: normal;
  color: var(--k-line-2);
}
.top-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.top-end .tip > span {
  left: auto;
  right: 0;
}
.env {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #c9dfd5;
  background: #edf7f0;
  border-radius: 22px;
  padding: 3px 10px;
  color: #2a614e;
  font-size: 11px;
  font-weight: 700;
}
/* Body: no width cap, fills the height left under the top row. The 72px at the bottom keeps the last
   table row clear of the floating capture · ticket buttons (screen-tickets.css). */
main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 24px var(--k-gutter) 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* Scripts focus #main on every page open (skip link, screen readers): it takes the focus without a ring. */
#main:focus,
#main:focus-visible {
  outline: none;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 21px;
}
.kicker {
  font:
    700 10px/1.5 ui-monospace,
    monospace;
  letter-spacing: 0.16em;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 8px;
}
.kicker:before {
  content: "";
  background: var(--teal);
  width: 19px;
  height: 2px;
}
.page-head h1 {
  font-size: clamp(27px, 2.5vw, 38px);
  letter-spacing: -0.065em;
  line-height: 1.2;
  margin: 7px 0 0;
}
.tools,
.actions,
.inline {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.period {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #cdd9d4;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
}
select,
input,
textarea {
  color: var(--ink);
}
.period select {
  border: 0;
  outline-offset: 0;
  min-width: 0;
  background: transparent;
  font-size: 12px;
}
.primary,
.secondary,
.textbtn,
.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1.5;
  font-weight: 650;
  min-height: 36px;
  border-radius: 6px;
  padding: 7px 13px;
  font-size: 13px;
}
.primary {
  color: #fff;
  background: var(--teal);
}
.primary:hover {
  background: #0d584d;
}
.secondary,
.iconbtn {
  background: white;
  border: 1px solid #cfdbd6;
  color: #2a4946;
}
.secondary:hover,
.iconbtn:hover {
  background: #f1f7f2;
}
.textbtn {
  color: var(--teal);
  background: transparent;
  padding: 3px;
  min-height: 24px;
}
.iconbtn {
  padding: 6px;
  min-width: 34px;
}
.panel,
.step-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.panel {
  min-width: 0;
  overflow: visible;
}
.panel-head {
  padding: 18px 20px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2 {
  font-size: 17px;
  font-weight: 730;
  letter-spacing: -0.04em;
  margin: 0;
}
.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.minor,
.panel-head small {
  color: var(--muted);
  font-size: 11px;
}
.attention {
  padding: 0 20px 16px;
}
.record p {
  font-size: 12px;
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 21px;
  background: #fae7d9;
  color: #915034;
  font-size: 11px;
  letter-spacing: 0;
  border-radius: 5px;
}
.chart {
  padding: 0 20px 17px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: clamp(2px, 1vw, 20px);
  height: 127px;
  padding: 8px 10px 0;
  border-bottom: 1px solid #aebfb7;
  background: repeating-linear-gradient(
    to top,
    transparent 0px,
    transparent 30px,
    #eaf0ec 30.5px,
    #eaf0ec 31.5px
  );
}
.bar {
  max-width: 40px;
  width: 72%;
  border-radius: 4px 4px 0 0;
  background: #328575;
  min-height: 1px;
}
.axis {
  display: flex;
  justify-content: space-between;
  font:
    10px/1.5 ui-monospace,
    monospace;
  color: var(--muted);
  margin-top: 5px;
}
.legend {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #328575;
  border-radius: 2px;
  margin-right: 4px;
}
.records {
  padding: 0 20px 12px;
}
.record {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 9px;
  border-top: 1px solid #e8eeeb;
  padding: 8px 0;
}
.record:first-child {
  border: 0;
}
.record > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ca48b;
}
.record > i.err {
  background: #cd7950;
}
.record strong {
  font-size: 13px;
}
.record time {
  font:
    11px ui-monospace,
    monospace;
  color: var(--muted);
}
.record p {
  margin: 1px 0 0;
  font-size: 11px;
}
.step-panel {
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.steps {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  flex-wrap: wrap;
}
.steps span {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334d48;
}
.steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: #e9f4ea;
  color: #376b50;
  border-radius: 50%;
  font:
    650 11px ui-monospace,
    monospace;
}
.steps > .icon {
  color: #97afa2;
}
.badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 650;
  color: #55686a;
  background: #edf1f2;
}
.badge i {
  width: 5px;
  height: 5px;
}
.badge.good {
  background: #e5f3e9;
  color: #246a49;
}
.badge.wait {
  background: #fbf2d9;
  color: #805e16;
}
.badge.bad {
  background: #ffede6;
  color: #a34729;
}
.table-wrap {
  overflow: auto;
  border-radius: 0 0 12px 12px;
}
.table-wrap:focus:not(:focus-visible) {
  outline: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: #57706b;
  font-weight: 650;
  background: #f5f8f4;
  text-align: left;
}
td,
th {
  padding: 12px 15px;
  border-top: 1px solid #e3ebe5;
}
th:first-child,
td:first-child {
  padding-left: 20px;
}
td small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.mono {
  font:
    500 11px ui-monospace,
    monospace;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}
.rule,
.draft {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
}
.inner {
  padding: 0 20px 18px;
}
.rule strong,
.draft strong {
  display: block;
  font-size: 16px;
}
.rule p,
.draft p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0;
}
.rule b {
  font-size: 22px;
}
.empty {
  text-align: center;
  padding: 25px 16px;
  color: var(--muted);
}
.empty p {
  margin: 5px 0 0;
}
.tip {
  color: #6b8079;
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tip > span {
  display: none;
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: -50px;
  width: min(240px, 55vw);
  background: #203d3a;
  color: white;
  padding: 9px 11px;
  border-radius: 6px;
  font:
    500 12px/1.55 -apple-system,
    sans-serif;
  letter-spacing: 0;
  white-space: normal;
  box-shadow: 0 3px 12px #102f3522;
}
.tip:hover > span,
.tip:focus > span {
  display: block;
}
dialog {
  color: var(--ink);
  border: 0;
  margin: 0 0 0 auto;
  padding: 0;
  width: min(490px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  max-width: 100vw;
  background: #f6f8f5;
  box-shadow: -8px 0 40px #102f3522;
}
dialog::backdrop {
  background: #0e242b66;
}
.drawer-head {
  padding: 18px 20px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-head h2 {
  font-size: 21px;
  margin: 2px 0 0;
}
.drawer-body {
  padding: 16px;
  display: grid;
  gap: 13px;
}
.drawer-body .panel {
  padding: 15px;
}
.drawer-body h3 {
  font-size: 14px;
  margin: 0 0 11px;
}
.drawer-body p {
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.drawer-body textarea,
.drawer-body input:not([type="checkbox"]),
.drawer-body select {
  width: 100%;
  border: 1px solid #bfcec6;
  border-radius: 5px;
  background: #fff;
  padding: 8px 9px;
  font: inherit;
}
textarea {
  resize: vertical;
  min-height: 130px;
}
.defs {
  margin: 0;
}
.defs div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid #e9eeea;
  padding: 7px 0;
}
.defs div:first-child {
  border: 0;
}
.defs dt {
  font-size: 12px;
  color: var(--muted);
  flex: none;
}
.defs dd {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  margin: 0;
  overflow-wrap: anywhere;
}
.drawer-body pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.drawer-body summary {
  cursor: pointer;
}
.history {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}
.history li {
  padding: 4px 0;
}
.history summary {
  color: var(--ink);
}
#notice {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  padding: 10px 16px;
  background: var(--dark);
  color: white;
  border-radius: 7px;
  max-width: min(92vw, 650px);
  box-shadow: 0 3px 13px #173b3b33;
}
#notice:empty {
  display: none;
}
.banner {
  border: 1px solid #e0b49e;
  background: #fff5ed;
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.shade,
#menubtn {
  display: none;
}
.full {
  width: 100%;
}
.spaced {
  margin-top: 12px;
}
.wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}
.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  font-size: 13px;
}
@media (max-width: 900px) {
  /* The sidebar is a drawer; its rows are touch sized. The two menus and the account area follow one another
     and the drawer scrolls as a whole (no menu scrolls inside itself, nothing fades). */
  #side {
    position: fixed;
    transform: translateX(-103%);
    visibility: hidden;
    overflow-y: auto;
    scrollbar-width: none;
  }
  #side::-webkit-scrollbar {
    display: none;
  }
  #side nav {
    flex: 1 0 auto;
    overflow: visible;
    padding-bottom: 12px;
    -webkit-mask-image: none;
    mask-image: none;
  }
  #side .side-system {
    flex: none;
    max-height: none;
    padding-bottom: 8px;
  }
  .menu-open #side {
    transform: none;
    visibility: visible;
  }
  .menu-open .shade {
    display: block;
    position: fixed;
    inset: 0;
    background: #102f3555;
    z-index: 9;
  }
  #side nav a,
  #side nav .nav-subitems a,
  #side .side-system a,
  #sidebar-lab summary,
  #sidebar-system summary {
    height: 44px;
  }
  #menubtn {
    display: inline-flex;
  }
  main {
    padding-top: 16px;
  }
  .step-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
}
@media (max-width: 640px) {
  /* A phone keeps the whole top row in two lines: menu button and marks, then the path under them. */
  .top {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--k-top-h);
    padding-block: 4px 8px;
    row-gap: 2px;
  }
  .top-end {
    flex: 1 1 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
  }
  .crumb {
    order: 3;
    flex: 0 0 100%;
  }
  /* The mode mark's tooltip spans the row instead of hanging from its "i", so no end of it leaves the screen. */
  .top {
    position: relative;
  }
  .top-end .tip {
    position: static;
  }
  .top-end .tip > span {
    top: calc(100% + 4px);
    left: var(--k-gutter);
    right: var(--k-gutter);
    width: auto;
  }
}
@media (max-width: 720px) {
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 15px;
  }
  .page-head h1 {
    font-size: 29px;
  }
  .minor {
    font-size: 10px;
  }
  .panel-head,
  .step-panel {
    padding: 15px;
  }
  .panel-head {
    padding-bottom: 11px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .inner,
  .records,
  .chart,
  .attention {
    padding-left: 15px;
    padding-right: 15px;
  }
  .steps {
    gap: 5px;
  }
  .steps span {
    font-size: 11px;
  }
  .steps b {
    width: 18px;
    height: 18px;
  }
  td,
  th {
    padding: 10px;
  }
  .env {
    font-size: 10px;
  }
  .tools {
    gap: 6px;
  }
  .period {
    padding: 5px 8px;
  }
  .table-wrap {
    max-width: 100%;
  }
  .top,
  .drawer-head {
    position: relative;
  }
}
.panel-head > .tip > span {
  left: auto;
  right: 0;
}
.drawer-body #drawer-msg:empty {
  display: none;
}
.drawer-body .panel .records {
  padding: 0;
}
.drawer-head h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.drawer-head .iconbtn {
  flex-shrink: 0;
}
.drawer-body {
  grid-template-columns: minmax(0, 1fr);
}
.drawer-body > * {
  min-width: 0;
}
.drawer-body :is(strong, summary, li) {
  overflow-wrap: anywhere;
}

/* Resource views, source handoff, and a compact audit trail. */
.kicker {
  font-family: inherit;
  letter-spacing: 0.035em;
  font-size: 11px;
}
.record {
  position: relative;
  border-top: 0;
}
.record:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 22px;
  bottom: -8px;
  width: 1px;
  background: #d9e4dc;
}
.record > i {
  z-index: 1;
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
}
dialog :is(input, textarea, button, summary),
#drawer-msg {
  scroll-margin-top: 90px;
}
.plot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
}
.ticks {
  height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font:
    10px ui-monospace,
    monospace;
  text-align: right;
}
.plot .bars {
  gap: 0;
  height: 128px;
  padding: 0;
  border-top: 1px solid #e2e9e4;
  background: linear-gradient(
    to top,
    transparent calc(50% - 1px),
    #e3eae5 50%,
    transparent calc(50% + 1px)
  );
}
.plot .bar {
  min-height: 0;
}

/* One non-blocking status for requests on the current page, including refreshes over existing data. */
#data-loading {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 26;
  pointer-events: none;
}
/* The capture · ticket buttons hold the bottom corners (screen-tickets.css): the notice and the loading status
   sit above their row, never over a button. */
body:has(.kt-fab:not([hidden])) :is(#notice, #data-loading) {
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 52px);
}
#data-loading:not(:empty) {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper, white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 3px 12px #15383024;
}
#data-loading:not(:empty)::before,
.loading-cue::before,
.v3 .state.loading > .chip::before,
.desk .emptyBox[role="status"]::before {
  content: "";
  display: inline-block;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.12em;
  border: 2px solid #bdd6cf;
  border-top-color: #176954;
  border-radius: 50%;
  animation: data-loading-spin .8s linear infinite;
}
.loading-cue::before,
.desk .emptyBox[role="status"]::before { margin-inline-end: .5em; }
@keyframes data-loading-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  #data-loading:not(:empty)::before,
  .loading-cue::before,
  .v3 .state.loading > .chip::before,
  .desk .emptyBox[role="status"]::before { animation: none; }
}

/* A date and its clock read as one line. Each piece is unbreakable, so a narrow cell wraps only between the two. */
time.kst-stamp {
  display: inline;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}
time.kst-stamp > .kst-date, time.kst-stamp > .kst-clock {
  display: inline;
  font: inherit;
  color: inherit;
  white-space: nowrap;
}

/* The logistics store control sits inside the real application breadcrumb. */
.work-shell-top .work-shell-picker { position: relative; display: inline-flex; align-items: center; flex: none; min-height: var(--k-touch); }
.work-shell-picker > span { min-height: 30px; display: inline-flex; align-items:center; justify-content:space-between; gap: 5px; padding: 0 8px; color: var(--k-brand-2); border: 1px solid var(--k-line-2); border-radius: var(--k-r); background: var(--k-surface); font-size: 12px; font-weight: 700; }
.work-shell-round { color: var(--k-ink-2); font-size: 11px; font-weight: 650; }
.work-shell-picker > select { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; font: inherit; }
.work-shell-picker:focus-within > span { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.work-shell-home { display: inline-flex; align-items: center; min-height: var(--k-touch); padding-inline: 4px; font-size: 13px; font-weight: 700; color: var(--k-brand-2); text-decoration: none; white-space: nowrap; }
@media (max-width: 900px) {
  .work-shell-top { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 4px; min-height: var(--k-touch); height:auto; padding: 2px clamp(6px,2vw,16px); }
  .work-shell-top .crumb { order: 0; flex-wrap: wrap; gap: 1px 2px; line-height: 1.2; overflow: visible; font-size: 12px; }
  .work-shell-top .top-end { margin:0; gap:4px; flex-wrap:nowrap; }
  .work-shell-top .work-shell-picker { flex:0 1 auto; min-width:0; max-width:100%; }
  .work-shell-top .work-shell-picker > span { max-width:100%; }
  .work-shell-top [data-release-notice] .k-btn { gap:3px; padding-inline:6px; min-height:var(--k-touch); }
  .work-shell-top .work-shell-home { padding-inline:2px; }
  .work-shell-picker > span { padding: 0 5px; font-size: 11px; }
}
@media (max-width: 640px) {
  .work-shell-top:has([data-release-notice]) { padding-inline:clamp(4px,calc(10vw - 28px),12px); column-gap:1px; }
  .work-shell-top:has([data-release-notice]) .crumb { column-gap:1px; }
  .work-shell-top:has([data-release-notice]) .work-shell-picker > span { padding-inline:3px; gap:2px; letter-spacing:-.1px; }
  .work-shell-top:has([data-release-notice]) .work-shell-picker svg { width:10px; }
  .work-shell-top:has([data-release-notice]) .top-end { gap:2px; }
  .work-shell-top [data-release-notice] .k-btn { padding-inline:3px; }
}
