/* User-approved deep teal / limestone / wood miniature. Scoped to the component. */
.xb-sandtable {
  --sand-ink: #f5eee2;
  --sand-muted: #bdc6bd;
  --sand-orange: #f15a25;
  --sand-edge: #4a5854;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-width: 0;
  color: var(--sand-ink);
  font: inherit;
}
.xb-sandtable *, .xb-sandtable *::before, .xb-sandtable *::after { box-sizing: border-box; }
.xb-sandtable__viewport {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  height: var(--xb-sandtable-height, clamp(440px, 62vw, 660px));
  min-height: 400px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--sand-edge);
  border-radius: 24px;
  background: radial-gradient(ellipse at 26% 6%, #3b413c 0, #1c2c2e 48%, #15252a 100%);
  box-shadow: inset 0 1px 2px #e8d0a425, inset 0 -28px 50px #06141955, 0 16px 36px #07121718;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.xb-sandtable__svg, .xb-sandtable__labels { position: absolute; inset: 0; width: 100%; height: 100%; }
.xb-sandtable__svg { display: block; overflow: visible; pointer-events: none; }
.xb-sandtable__labels { pointer-events: none; }
.xb-sandtable__label {
  appearance: none;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 112px;
  min-height: 48px;
  padding: 2px 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--sand-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.xb-sandtable__label small {
  display: block;
  padding: 0 4px;
  border-radius: 4px;
  background: #263a35ed;
  color: #d8d5be;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}
.xb-sandtable__label strong {
  display: block;
  padding: 3px 7px;
  border: 1px solid #baa78d55;
  border-radius: 6px;
  background: #283b35f0;
  color: #f2ebd6;
  box-shadow: 0 4px 9px #00000045, inset 0 -2px #101d20;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}
.xb-sandtable__label[aria-pressed="true"] strong { background: #cf4d1c; border-color: #fa935c; color: #fff9ed; }
.xb-sandtable__label[aria-pressed="true"] small { color: #ffc291; }
.xb-sandtable__label:focus-visible { outline: 2px solid #ffbb86; outline-offset: 4px; border-radius: 8px; z-index: 3; }
.xb-sandtable__route { fill: none; stroke: #dfac74; stroke-width: 1.4; stroke-dasharray: 3 5; stroke-linecap: round; opacity: .85; }
.xb-sandtable__leader { stroke: #d1c09b; stroke-width: .7; opacity: .5; }
.xb-sandtable__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.xb-sandtable__control {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--sand-edge);
  border-radius: 11px;
  background: #2a393c;
  color: #e4e4d8;
  box-shadow: inset 0 1px #d6dcce0b, 0 2px #07171866;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.xb-sandtable__control[data-action="top"][aria-pressed="true"] { border-color: var(--sand-orange); color: #ffbd89; background: #42362e; }
.xb-sandtable__control:focus-visible { outline: 2px solid #ffbb86; outline-offset: 3px; }
.xb-sandtable__control:active { transform: translateY(1px); }
.xb-sandtable__hint { display: flex; justify-content: space-between; gap: 16px; padding: 0 4px; color: var(--sand-muted); font-size: 12px; line-height: 16px; }
.xb-sandtable__hint p { margin: 0; }
.xb-sandtable__hint [data-readout] { flex-shrink: 0; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .xb-sandtable__viewport { cursor: grab; }
  .xb-sandtable__viewport[data-dragging="true"] { cursor: grabbing; }
  .xb-sandtable__control:hover { border-color: #a49579; background: #334347; }
  .xb-sandtable__label:hover strong { border-color: #dfac74; }
}
@media (max-width: 420px) {
  .xb-sandtable { gap: 12px; }
  .xb-sandtable__viewport { border-radius: 20px; height: var(--xb-sandtable-height, 500px); }
  .xb-sandtable__controls { gap: 8px; }
  .xb-sandtable__control { padding-inline: 10px; }
  .xb-sandtable__hint { gap: 8px; }
}
