.sg {
  --sg-step: 25px;
  --sg-axis: 54px;
  --sg-tail: 17px;
  --sg-line: #dce7e2;
  --sg-accent: #197966;
  --sg-ink: #183f3a;
  width: 100%;
  min-width: 0;
  overflow: visible;
  color: var(--sg-ink);
  font-variant-numeric: tabular-nums;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sg, .sg * { box-sizing: border-box; }
.sg-head, .sg-body {
  display: grid;
  grid-template-columns: var(--sg-axis) repeat(var(--sg-columns, 7), minmax(0, 1fr));
}
.sg-head {
  min-height: 47px;
  background: #f1f6f3;
  border: 1px solid var(--sg-line);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}
.sg-date, .sg-axis-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: .4rem;
}
.sg-date { border-left: 1px solid var(--sg-line); flex-wrap: wrap; align-content: center; row-gap: 0; }
.sg-daylabel { font-size: .94rem; line-height: 1.2; letter-spacing: -.025em; }
.sg-daylabel[aria-current="date"] {
  padding: 2px 4px;
  border-radius: 5px;
  background: var(--sg-accent);
  color: #fff;
}
.sg-axis-name, .sg-weekday { font-size: .785rem; color: #526e65; }
.sg-weekday[data-weekday="6"] { color: #51729c; }
.sg-weekday[data-weekday="0"], .sg-weekday[data-holiday="jp"] { color: #a25c65; }
.sg-body { border: 1px solid var(--sg-line); border-top: 0; border-radius: 0 0 8px 8px; background: #fff; }
.sg-axis, .sg-column { position: relative; min-width: 0; }
.sg-axis { background: #fbfcfb; border-radius: 0 0 0 8px; }
.sg-column { border-left: 1px solid var(--sg-line); container-type: inline-size; }
.sg-tick {
  position: absolute;
  top: calc(var(--sg-i) * var(--sg-step));
  left: 0;
  right: 0;
  text-align: center;
  padding-top: 2px;
  font-family: "Inter", system-ui, sans-serif;
  color: #536c63;
  font-size: .78rem;
  font-weight: 550;
  letter-spacing: -.015em;
  line-height: 1.1;
}
.sg-slot {
  --sg-heat: 0;
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--sg-step);
  min-height: 0;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-top: 1px solid var(--sg-line);
  border-radius: 0;
  background: rgba(37, 137, 107, var(--sg-heat));
  box-shadow: none;
  color: #1d5546;
  font-family: inherit;
  line-height: 1;
  cursor: crosshair;
  touch-action: manipulation;
}
.sg-slot.sg-half-hour { border-top-color: #e8eeea; border-top-style: dashed; }
.sg-slot:first-child { border-top: 0; }
.sg-slot.sg-last { height: var(--sg-tail); background: transparent; }
.sg-slot:disabled { cursor: default; color: inherit; opacity: 1; }
.sg[data-mode="team"] .sg-slot { cursor: default; }
.sg[data-mode="team"] .sg-slot[data-has-details] { cursor: pointer; }
.sg-count { font-size: .75rem; font-weight: 650; line-height: 1; }
.sg-slot.sg-planned {
  border-inline-start: 3px solid #8a5a15;
  gap: 2px;
}
.sg-plan-start { position: relative; }
.sg-plan-start::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 5px;
  border-top: 2px solid #8a5a15;
  pointer-events: none;
}
.sg-plan-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 3px;
  padding: 2px 3px;
  background: #fff2ce;
  color: #5a3b10;
  font-size: .73rem;
  font-weight: 650;
}
@container (max-width: 52px) {
  .sg-count + .sg-plan-label { display: none; }
  .sg-plan-label { padding-inline: 1px; }
}
.sg-dense { color: #13392e; }
.sg-inspected { position: relative; z-index: 1; box-shadow: inset 0 0 0 2px var(--sg-ink); }
.sg-slot:focus-visible, .sg-handle:focus-visible { z-index: 4; outline: 2px solid #134e92; outline-offset: -3px; }
.sg-slot:focus-visible { position: relative; }
@media (hover:hover) {
  .sg-slot:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px #5c9c87; }
}
.sg-block {
  position: absolute;
  z-index: 2;
  top: calc(var(--sg-start) * var(--sg-step) + 1px);
  left: 3px;
  right: 3px;
  height: calc(var(--sg-length) * var(--sg-step) - 2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3px 2px 0;
  border: 1px solid #68a992;
  border-left: 3px solid var(--sg-accent);
  border-radius: 5px;
  background: #daeee4;
  color: #1a5444;
  pointer-events: none;
}
.sg-selected {
  z-index: 3;
  background: #c9e9d9;
  border: 2px solid var(--sg-accent);
}
.sg-range-label {
  display: block;
  max-width: 100%;
  color: inherit;
  font-family: "Inter", system-ui, sans-serif;
  font-size: .735rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.sg-handle {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(40px, 100%);
  height: min(38px, calc(var(--sg-length) * var(--sg-step) - 3px));
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  touch-action: none;
  cursor: ns-resize;
}
.sg-handle::after {
  content: "";
  width: 11px;
  height: 11px;
  box-sizing: content-box;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--sg-accent);
  box-shadow: 0 0 0 1px var(--sg-accent);
}
.sg-start { top: 0; left: 0; transform: translateY(-50%); }
.sg-end { bottom: 0; right: 0; transform: translateY(50%); }
@media (max-width: 700px), (pointer: coarse) {
  .sg { --sg-step: 34px; --sg-axis: 47px; --sg-tail: 22px; }
  .sg-handle { width: min(44px, 100%); height: min(44px, calc(var(--sg-length) * var(--sg-step) - 3px)); }
}
@container (max-width: 76px) {
  .sg-range-label { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.1; }
  .sg-dash, .sg-single .sg-to { display: none; }
  .sg-block { justify-content: center; align-items: center; padding: 0; }
}
@media (max-width: 450px) {
  .sg-date { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  .sg { --sg-axis: 38px; }
  .sg-daylabel { font-size: .76rem; letter-spacing: -.04em; white-space: nowrap; }
  .sg-daylabel[aria-current="date"] { padding-inline: 1px; }
  .sg-block { left: 2px; right: 2px; }
  .sg-range-label { font-size: .71rem; }
}
