.halka-workspace {
  --halka-accent: color-mix(in srgb, var(--good) 62%, var(--info));
  --halka-ink: color-mix(in srgb, var(--brand-deep) 78%, var(--good-ink));
  --halka-canvas: color-mix(in srgb, var(--halka-accent) 7%, var(--surface));
  --halka-grid: color-mix(in srgb, var(--halka-accent) 30%, var(--surface));
  container: halka-layout / inline-size;
  min-width: 0;
  overflow: clip;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
}
.halka-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--halka-grid);
  background: var(--halka-canvas);
}
.halka-heading h3 {
  margin: 0;
  color: var(--halka-ink);
  font: 675 17px/1.24 var(--font-sans);
  letter-spacing: -.023em;
}
.halka-legend, .halka-legend span {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}
.halka-legend { gap: 5px 15px; color: var(--ink-2); font: 500 11.5px/1.4 var(--font-sans); }
.halka-legend span { gap: 6px; }
.halka-legend i {
  width: 14px;
  height: 6px;
  border: 1px solid var(--halka-accent);
  border-radius: var(--radius-sm);
  background: var(--halka-accent);
}
.halka-legend span:last-child i { background: var(--halka-grid); border-color: var(--halka-grid); }

.halka-orbit {
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(110px, 1fr));
  padding: 14px clamp(12px, 2.5cqi, 40px);
  min-width: 0;
  background: var(--halka-canvas);
}
.halka-orbit[data-halka-count="1"], .halka-orbit[data-halka-count="2"] { grid-template-rows: minmax(254px, 1fr); }
.halka-tracks, .halka-phone-tracks {
  grid-area: 1 / 1 / -1 / -1;
  position: relative;
  z-index: 0;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  pointer-events: none;
}
.halka-phone-tracks { display: none; }
.halka-paths, .halka-mobile-paths {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.halka-orbit-guide, .halka-spine {
  stroke: var(--halka-grid);
  stroke-width: 1;
  stroke-dasharray: 2 5;
  vector-effect: non-scaling-stroke;
}
.halka-selection-path {
  stroke: var(--halka-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.halka-pod {
  --halka-status: var(--idle);
  z-index: 1;
  position: relative;
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name name" "bank bank" "state time";
  align-items: baseline;
  gap: 1px 8px;
  width: 100%;
  min-width: 0;
  min-height: 75px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--halka-canvas);
  color: var(--ink);
  cursor: pointer;
  text-align: start;
}
.halka-pod[data-halka-seat="0"] { grid-area: 1 / 3 / 2 / 6; }
.halka-pod[data-halka-seat="1"] { grid-area: 1 / 10 / 2 / 13; }
.halka-pod[data-halka-seat="2"] { grid-area: 2 / 1 / 3 / 5; }
.halka-pod[data-halka-seat="3"] { grid-area: 2 / 11 / 3 / 15; }
.halka-pod[data-halka-seat="4"] { grid-area: 3 / 3 / 4 / 6; }
.halka-pod[data-halka-seat="5"] { grid-area: 3 / 10 / 4 / 13; }
.halka-orbit:is([data-halka-count="1"],[data-halka-count="2"]) .halka-pod { grid-row: 1; }
.halka-pod::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: -5px;
  width: 9px;
  height: 9px;
  transform: translateY(-50%);
  border: 1.5px solid var(--halka-accent);
  border-radius: 50%;
  background: var(--halka-canvas);
}
.halka-pod:is([data-halka-seat="1"],[data-halka-seat="3"],[data-halka-seat="5"])::after { inset-inline: -5px auto; }
.halka-pod:hover { border-color: var(--halka-grid); }
.halka-pod[aria-pressed="true"] { border-color: var(--halka-accent); background: var(--surface); }
.halka-pod[aria-pressed="true"]::after { background: var(--halka-accent); }
.halka-pod:focus-visible, .halka-minute-picker:focus-within, .halka-live-reset:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 3px;
}
.halka-pod-name {
  grid-area: name;
  min-width: 0;
  color: var(--halka-ink);
  font: 680 clamp(14px, 1.45cqi, 19px)/1.22 var(--font-sans);
  letter-spacing: -.021em;
  overflow-wrap: anywhere;
}
.halka-bank-line {
  grid-area: bank;
  min-width: 0;
  color: var(--ink-2);
  font: 480 11px/1.4 var(--font-sans);
  overflow-wrap: anywhere;
}
.halka-bank-line:empty { display: none; }
.halka-state, .halka-pod-time { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; }
.halka-state { grid-area: state; min-width: 0; color: var(--ink-2); font: 580 11px/1.32 var(--font-sans); overflow-wrap: anywhere; }
.halka-state i {
  flex: none;
  width: 7px;
  height: 7px;
  border: 1px solid var(--halka-status);
  border-radius: 50%;
  background: var(--halka-status);
}
.halka-pod[data-halka-state="connected"] { --halka-status: var(--good); }
.halka-pod[data-halka-state="reconnect_required"] { --halka-status: var(--bad); }
.halka-pod:is([data-halka-state="withdrawing"],[data-halka-state="result_check"]) { --halka-status: var(--warn); }
.halka-pod:is([data-halka-state="resuming"],[data-halka-state="logging_in"]) { --halka-status: var(--info); }
.halka-pod[data-halka-stale="true"] .halka-state i { background: transparent; }
.halka-pod-time {
  grid-area: time;
  justify-self: end;
  color: var(--ink-2);
  font: 500 11px/1.4 var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.halka-pod-time svg { flex: none; width: 13px; height: 13px; }

.halka-center {
  z-index: 1;
  grid-area: 1 / 6 / -1 / 10;
  display: grid;
  place-items: center;
  align-self: center;
  min-width: 0;
  color: var(--halka-ink);
}
.halka-now { color: var(--ink-2); font: 500 11px/1.3 var(--font-mono); }
.halka-now { display: grid; justify-items: center; gap: 3px; }
.halka-now::after { content: ""; width: 1px; height: 6px; background: var(--halka-ink); }
.halka-dial {
  position: relative;
  display: grid;
  place-items: center;
  width: min(calc(100% - 10px), 234px);
  aspect-ratio: 1;
  margin-top: 2px;
  padding: 13%;
  border-radius: 50%;
  background: var(--halka-canvas);
}
.halka-dial::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid var(--halka-grid);
  border-radius: 50%;
  background: var(--surface);
}
.halka-arc { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--halka-grid); pointer-events: none; }
.halka-arc-hit { pointer-events: stroke; cursor: pointer; }
.halka-arc-band, .halka-arc-mark { pointer-events: none; }
.halka-arc-mark { opacity: 0; fill: var(--halka-ink); }
.halka-arc[data-halka-picked="true"] .halka-arc-mark, .halka-arc:hover .halka-arc-mark { opacity: 1; }
.halka-arc[data-halka-seen="true"] { color: var(--halka-accent); }
.halka-face { pointer-events: none; position: absolute; inset: 13%; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; text-align: center; }
.halka-time-label { color: var(--ink-2); font: 550 11px/1.3 var(--font-sans); }
.halka-clock { margin: 4px 0 7px; color: var(--halka-ink); font: 580 clamp(18px, 2.35cqi, 29px)/1.15 var(--font-mono); letter-spacing: -.045em; }
.halka-focus-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 100%;
  color: var(--halka-ink);
  font: 650 clamp(12px, 1.2cqi, 15px)/1.26 var(--font-sans);
  overflow-wrap: anywhere;
}
.halka-focus-state { margin-top: 2px; color: var(--ink-2); font: 500 11px/1.3 var(--font-sans); overflow-wrap: anywhere; }

.halka-minute-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px 8px;
  margin-top: 4px;
}
.halka-minute-picker, .halka-live-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 6px;
  border: 1px solid var(--halka-grid);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--halka-ink);
  font: 600 11px/1.3 var(--font-sans);
}
.halka-minute-picker { position: relative; cursor: pointer; }
.halka-minute-picker svg { width: 11px; height: 11px; }
.halka-minute-select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.halka-live-reset { padding-inline: 2px; color: var(--halka-ink); border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

@container halka-layout (max-width: 775px) {
  .halka-heading { padding: 10px 12px; gap: 4px 12px; }
  .halka-heading h3 { font-size: 15px; }
  .halka-legend { gap: 5px 8px; font-size: 10.5px; }
  .halka-orbit, .halka-orbit:is([data-halka-count="1"],[data-halka-count="2"]) {
    grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr);
    grid-template-rows: auto repeat(3,minmax(74px,1fr));
    padding: 8px clamp(5px, 2cqi, 14px) 12px;
  }
  .halka-orbit:is([data-halka-count="1"],[data-halka-count="2"]) { grid-template-rows: auto minmax(74px,1fr); }
  .halka-orbit:is([data-halka-count="3"],[data-halka-count="4"]) { grid-template-rows: auto repeat(2,minmax(74px,1fr)); }
  .halka-tracks { display: none; }
  .halka-phone-tracks { display: block; grid-area: 2 / 1 / -1 / -1; }
  .halka-center { grid-area: 1 / 1 / 2 / -1; padding-bottom: 8px; }
  .halka-dial { width: clamp(125px, 39cqi, 145px); padding: 0; }
  .halka-clock { margin: 2px 0 4px; font-size: clamp(18px, 4.6cqi, 24px); }
  .halka-time-label, .halka-focus-state { font-size: 10.5px; }
  .halka-focus-name { font-size: 12px; }
  .halka-now { font-size: 10px; }
  .halka-minute-tools { margin-top: 2px; }
  .halka-pod { min-height: 64px; padding: 5px 8px; border-radius: var(--radius-sm); }
  .halka-pod[data-halka-position="0"] { grid-area: 2 / 1 / 3 / 2; }
  .halka-pod[data-halka-position="1"] { grid-area: 2 / 3 / 3 / 4; }
  .halka-pod[data-halka-position="2"] { grid-area: 3 / 1 / 4 / 2; }
  .halka-pod[data-halka-position="3"] { grid-area: 3 / 3 / 4 / 4; }
  .halka-pod[data-halka-position="4"] { grid-area: 4 / 1 / 5 / 2; }
  .halka-pod[data-halka-position="5"] { grid-area: 4 / 3 / 5 / 4; }
  .halka-orbit:is([data-halka-count="1"],[data-halka-count="2"]) .halka-pod { grid-row: 2; }
  .halka-pod-name { font-size: 14px; }
}
@container halka-layout (max-width: 440px) {
  .halka-heading { align-items: start; }
  .halka-focus-name { -webkit-line-clamp: 1; }
  .halka-pod { grid-template-columns: 1fr; grid-template-areas: "name" "bank" "state" "time"; gap: 1px; }
  .halka-pod-time { justify-self: start; margin-top: 2px; font-size: 10.5px; }
  .halka-state { margin-top: 3px; }
  .halka-bank-line, .halka-state { font-size: 10.5px; }
  .halka-pod-name { font-size: 13px; }
}
